MIDI In CHOP

From Derivative
Jump to: navigation, search

Summary
[edit]

The MIDI In CHOP reads Note events, Controller events, Program Change events, System Exclusive messages and Timing events from both MIDI devices and files. See also MIDI In Map CHOP.

The MIDI In CHOP receives MIDI events from MIDI devices connected to the serial port, reads MIDI events internal to the workstation (i.e. the built-in software synth), and interprets musical scores in MIDI files. Supported MIDI events are:

Note On, Note Off
Polyphonic Aftertouch
Channel Pressure
Program Change
Control Change (MIDI controller devices)
Pitch Wheel
Timer Events including beat pulses
Bar Messages
Start, Stop, Continue
Song Position Pointer
System Exclusive Messages

MIDI events arriving on separate MIDI channels may be recorded on separate CHOP channels. Also, any number of MIDI CHOPs can read from the same or different sources. TouchDesigner can be configured such that MIDI Start, Stop, or Continue events can control the Timeline and Beat Dialog.

The 'Simplified Output' option creates a channel for every type of MIDI event received, so number of channels expands while the devices is being used. No need to specify name, channel and index patterns.

Note: The values of the MIDI inputs are saved into the TouchDesigner .toe file, and are restored when the file is reloaded. The physical controllers may be in a different position when the .toe is restarted, causing the values to jump when the controllers are moved. This is unavoidable.

See also the MIDI In DAT, MIDI Event DAT, MIDI In Map CHOP, MIDI Out CHOP.

PythonIcon.pngmidiinCHOP_Class


Parameters - Source Page

Active active -

MIDI Source source - - Get MIDI input from a device or a file.

  • Device device -
  • File file -

Device Table device - Path to the MIDI device Table DAT

Device ID id - Specify the id of which device to use.

MIDI File file - If MIDI file is selected as the MIDI source use this field to specify the name of the MIDI file to read. The file can be read in from disk or from the web. Use http:// when specifying a URL.

Read Entire MIDI File entire - If enabled, the entire MIDI file is read. Otherwise, the Start and End parameters on the Channel page determine the segment of the file to read.

Simplified Output simplified - When this is on channels are automatically created when MIDI signal is detected from the selected MIDI device.

1 Based Index onebased - Make the index 1 based instead of the default 0 based.

MIDI Channels channel - The CHOP may read from any number of MIDI channels, numbered 1-16. Ranges and multiple entries are supported (i.e. "1 4 6", "1-7 12", "1-5:2").

If Channel Prefix is left blank, then the input streams from multiple MIDI channels will be combined into one set of CHOP channels (i.e., a "note 64 on" event on channel 12 followed by a "note 64 off" event on channel 8 appears in the note 64 CHOP channel as a single note).

Channel Prefix prefix - When recording from multiple MIDI channels, putting a string like "ch" in this parameter causes the MIDI channel to be split into separate CHOP channels per MIDI channel. Otherwise the MIDI channels are all merged into one set of CHOP channels.


Parameters - Record Page

These parameters are disabled when Simplified Output is on.

Record Method recordtype - - Determine what to record.

  • Single Frame single - This only outputs the current value of notes, controllers, etc. It does not retain prior values. It creates a CHOP at frame 1 always, so the CHOP causes cooking only when MIDI events come in.
  • Current Frame current - Same as "Single Frame", but the CHOP frame is always at the current frame, so the CHOP changes every frame, causing other CHOPs to recook every frame.
  • Current Time Slice ind - The CHOP frame is always at the current Time Slice.
  • Full Length timeline - The entire length of the timeline is recorded.

Record record - This parameter is used as a button to start and stop recording into the CHOP channels.

Reset reset - Sets the CHOP length to one sample, erasing the data in the channels.

Reset Pulse resetpulse -


Parameters - Note Page

Note Name notename - Put an "n" in here to generate channels for note events. It is the base name of the CHOP channel used to record notes. If blank, notes are ignored. If the Note Output parameter is set to Separate Channels, then CHOP channels will be created for each note in the Note Scope, of the form: notename

Note Scope notescope - The scope of notes to record. Multiple ranges and notes can be recorded (i.e., "50-60", "64 65 66 70-80").

Note Output notemeth - -

  • One Multiplexed Channel mult - One CHOP channel per MIDI channel is used for all notes. The value in the note channel is the number of the note currently playing (in the case of multiple notes playing, the most recent note is selected).
  • Separate Channels sep - Each note number gets its own CHOP channel.

Velocity velocity - -

  • Off veloff - Velocity is not recorded.
  • Note Amplitude velencode - The velocity is recorded as the amplitude of the note. Only valid when Note Output is set to Separate Channels.
  • Separate Channels velsep - Velocity is recorded in separate CHOP channels. Each note channel will have a corresponding velocity channel.

Velocity Name velname - When Velocity is set to Separate Channels, this parameter is the base name of the Velocity CHOP channel (try "v"). If blank, no velocity channels will be recorded.

Aftertouch Name aftername - The base name of the polyphonic Aftertouch CHOP channels. One aftertouch channel is created for each note in the Note Scope. If blank, no aftertouch channels will be created.

Pressure Name pressname - The name of the Channel Pressure channel. If multiple channels are being recorded, all channel pressure changes of interest will be recording on this CHOP channel. If blank, this channel will not be created.

Normalize notenorm - - Note values can be normalized for convenience:

  • None off - When Normalize is Off, 7 bit controllers will return values in the range 0-127 and 14 bit controllers will return values in the range 0-16383.
  • 0 to 1 0to1 - These values are normalized to lie in the range 0 to 1.

Pitch Wheel Name pitchname - The name of the Pitch Wheel CHOP channel. Pitch wheel values range from -1 to +1. If blank, this channel will not be created. Put "p" in here to generate a channel.


Parameters - Control Page

Controller Name controlname - The base name of the Control Change CHOP channels. The channel names are appended with the controller index (0-127). If blank, control changes will not be recorded. It typically contains "c".

Controller Type controltype - - There are 128 different controllers available. By choosing By Index Only, you can specify any number of controllers in the Control Index parameter. Otherwise, you can select a controller from the list from this menu. Some controllers have multiple instances, such as Sound Controllers 1-10. Selecting a controller with multiple instances allows you to use the Control Index parameter to select which instances you want. Any invalid control indices will be ignored.

  • By Index Only index -
  • Bank Select n0 -
  • Modulation Wheel n1 -
  • Breath Control n2 -
  • Foot Controller n3 -
  • Portamento Time n4 -
  • Data Entry n5 -
  • Channel Volume n6 -
  • Balance n7 -
  • Pan n8 -
  • Expression Control n9 -
  • Effect Control 1-2 n10 -
  • 14 bit General Purpose 1-4 n11 -
  • Sustain on/off n12 -
  • Portamento on/off n13 -
  • Sustenuto on/off n14 -
  • Soft Pedal on/off n15 -
  • Legato Footswitch on/off n16 -
  • Hold 2 on/off n17 -
  • Sound Controller 1-10 n18 -
  • 7 bit General Purpose 5-8 n19 -
  • Portamento Control n20 -
  • Effect Depth 1-5 n21 -
  • Non-Registered Parameter n22 -
  • Registered Parameter n23 -

Controller Index controlind - Used to select controllers by number, or multiple controllers by ranges. When in By Index Only Controller Type mode, you can select up to the full 128 controllers or sub-ranges thereof (i.e. "1-10", "2 34 70", "1-32 70-80:2").

Controller Format format - - Some controllers can be paired together to form 14 bit controllers, rather than the normal 7 bit controllers (controller indices 0-31, 98 and 100). Selecting 14 bit Controllers interprets a pair as one 14 bit controller. Otherwise, they are interpreted as separate 7 bit Controllers.

  • 7 bit Controllers 7bit -
  • 14 bit Controllers 14bit -

Normalize norm - - Controller values can be normalized for convenience:

  • None off - When Normalize is Off, 7 bit controllers will return values in the range 0-127 and 14 bit controllers will return values in the range 0-16383.
  • 0 to 1 0to1 - These values are normalized to lie in the range 0 to 1.
  • -1 to 1 -1to1 - These values are normalized to lie in the range -1 to +1.
  • On/Off onoff - Several of the controllers are simply on/off states. When Convert to On/Off is enabled, values greater than or equal to 64 will be interpreted as "1" and all values less than 64 will be interpreted as "0".

Unwrap unwrap -

Program Change progname - The name of the Program Change CHOP channel. All program change messages will be recorded onto this channel. If blank, this channel will not be created.


Parameters - Sys Page

Parameters - Clock Page
[edit]

Timer Pulse Name pulsename -

Timer Ramp Name rampname -

Timer Period timerperiod -

Timer Start timerstart -

Ticks per Beat ticks -

Bar Ramp Name barname -

Bar Period barperiod -

Bar Start barstart -

Bar Message barmsg -

Song Pos Name songpos -



Parameters - Exclusive1 Page
[edit]

Channel Name 1 exname1 -

Message 1 exmsg1 -

Channel Name 2 exname2 -

Message 2 exmsg2 -

Channel Name 3 exname3 -

Message 3 exmsg3 -

Channel Name 4 exname4 -

Message 4 exmsg4 -



Parameters - Exclusive2 Page
[edit]

Channel Name 5 exname5 -

Message 5 exmsg5 -

Channel Name 6 exname6 -

Message 6 exmsg6 -

Channel Name 7 exname7 -

Message 7 exmsg7 -

Channel Name 8 exname8 -

Message 8 exmsg8 -



Parameters - Exclusive3 Page
[edit]

Channel Name 9 exname9 -

Message 9 exmsg9 -

Channel Name 10 exname10 -

Message 10 exmsg10 -

Channel Name 11 exname11 -

Message 11 exmsg11 -

Channel Name 12 exname12 -

Message 12 exmsg12 -


Parameters - Chan Page

This is similar to other generators' Channel page. However, there are a few points to consider on how they affect the Midi In CHOP.

Start start - Defines where recording begins. In "Tie to Time Line" mode, any events received before the start time will be ignored. In "Time Line Independent" mode, recording will start at this point and continue on (not looping back). If reading from a MIDI File, Start/End will determine the start of the segment to read.  

Start Unit startunit - -

End end - Defines the end of the segment to read for MIDI Files.  

End Unit endunit - -

Sample Rate rate - Defines the sample rate of this CHOP. If the sample rate is too low, a rapidly changing input may be misrepresented.

Note: If the sample rate is too low, you may miss MIDI events. A note event may set a sample value to 1, and then the next note event less than 1/30 second later can set it to 0 on the same sample in the CHOP channel. So the event will be missed. Make the sample rate higher, like 600, to catch these events, or make sure that your on-off events coming in are a minimum time separation, as can be achieved through Opcode's MAX.  

Extend Left left - -

  • Hold hold -
  • Slope slope -
  • Cycle cycle -
  • Mirror mirror -
  • Default Value default -

Extend Right right - -

  • Hold hold -
  • Slope slope -
  • Cycle cycle -
  • Mirror mirror -
  • Default Value default -

Default Value defval -  


Parameters - Common Page

Time Slice timeslice - Turning this on forces the channels to be "Time Sliced". A Time Slice is the time between the last cook frame and the current cook frame.

Scope scope - To determine which channels get affected, some CHOPs use a Scope string on the Common page.

Sample Rate Match srselect - - Handle cases where multiple input CHOPs' sample rates are different. When Resampling occurs, the curves are interpolated according to the Interpolation Method Option, or "Linear" if the Interpolate Options are not available.

  • Resample At First Input's Rate first - Use rate of first input to resample others.
  • Resample At Maximum Rate max - Resample to the highest sample rate.
  • Resample At Minimum Rate min - Resample to the lowest sample rate.
  • Error If Rates Differ err - Doesn't accept conflicting sample rates.

Export Method exportmethod - - This will determine how to connect the CHOP channel to the parameter. Refer to the Export article for more information.

  • DAT Table by Index datindex - Uses the docked DAT table and references the channel via the index of the channel in the CHOP.
  • DAT Table by Name datname - Uses the docked DAT table and references the channel via the name of the channel in the CHOP.
  • Channel Name is Path:Parameter autoname - The channel is the full destination of where to export to, such has geo1/transform1:tx.

Export Root autoexportroot - This path points to the root node where all of the paths that exporting by Channel Name is Path:Parameter are relative to.

Export Table exporttable - The DAT used to hold the export information when using the DAT Table Export Methods (See above).


CHOPs
Ableton Link • Analyze • Angle • Attribute • Audio Band EQ • Audio Device In • Audio Device Out • Audio Dynamics • Audio File In • Audio Filter • Audio Movie • Audio Oscillator • Audio Para EQ • Audio Play • Audio Render • Audio Spectrum • Audio Stream In • Audio Stream Out • Beat • BlackTrax • Blend • Clip Blender • Clip • Clock • Composite • Constant • Copy • Count • CPlusPlus • Cross • Cycle • DAT to • Delay • Delete • DMX In • DMX Out • Envelope • EtherDream • Event • Expression • Extend • Fan • Feedback • File In • File Out • Filter • Function • Gesture • Handle • Helios DAC • Hog • Hokuyo • Hold • In • Info • Interpolate • Introduction To CHOPs id• Inverse Curve • Inverse Kin • Join • Joystick • Keyboard In • Keyframe • Kinect • Lag • Leap Motion • Leuze ROD4 • LFO • Limit • Logic • Lookup • LTC In • LTC Out • Math • Merge • MIDI In • MIDI In Map • MIDI Out • Mouse In • Mouse Out • NatNet In • Noise • Null • Object • Oculus Audio • Oculus Rift • OpenVR • OSC In • OSC Out • Out • Override • Panel • Parameter • Pattern • Perform • Pipe In • Pipe Out • PosiStageNet • Pulse • RealSense • Record • Rename • Render Pick • Reorder • Replace • Resample • S Curve • Scan • Script • Select • Sequencer • Serial • Shared Mem In • Shared Mem Out • Shift • Shuffle • Slope • SOP to • Sort • Speed • Splice • Spring • Stretch • Switch • Sync In • Sync Out • Tablet • Time Slice • Timeline • Timer • TOP to • Touch In • Touch Out • Trail • Transform • Trigger • Trim • Warp • Wave • ZED

An which operate on (a series of numbers) which are used for animation, audio, mathematics, simulation, logic, UI construction, and many other applications.

TOuch Environment file, the file type used by TouchDesigner to save your project.

The location of an operator within the TouchDesigner environment, for example, /geo1/torus1, a node called torus1 in a component called geo1. The path / is called . To refer instead to a filesystem folder, directory, disk file or http: address, see .

The term "Frame" is used (1) in the , (2) as a time-unit in CHOPs, (3) as a time-unit in TOPs, and (4) with movies images which are read and created with TOPs.

A Time Slice is the time from the last cook frame to the current cook frame. In CHOPs it is the set of short channels that only contain the CHOP channels' samples between the last and the current cook frame.

To pulse a parameter is to send it a signal from a CHOP or python or a mouse click that causes a new action to occur immediately. A pulse from a CHOP is typically a 0 to 1 to 0 signal in a channel, and a pulse via python is via a .pulse() call on a pulse-type parameter, such as Reset in a .

A parameter in most CHOPs that restricts which channels of that CHOP will be affected. Normally all channels of a CHOP are affected by the operator.

A outputs one or more channels, where a channel is simply a sequence of numbers, representing motion, audio, etc. Channels are passed between CHOPs in TouchDesigner networks. See also .

A text string that contains data (string, float, list, boolean, etc.) and operators (+ * < etc) that are evaluated by the node's language (python or Tscript) and returns a string, float list or boolean, etc. Expressions are used in parameters, and in scripts.

Parameters in TouchDesigner are an operator's settings (numbers, menus, flags, strings, paths) which the user can alter. Parameters for any operator can be opened by right-clicking on the operator and selecting "Parameters..." A currently selected operator's parameters can be viewed in a by pressing the keyboard shortcut 'p'.

samples-per-second of a CHOP. Each CHOP in your network has a sample rate, whether it is used or not. The overall timeline has a "frame rate", which is the number of animation frames per second, generally your monitor display frequency.

Exporting is the connection of CHOP channels to parameters of operators. The output of each exporting CHOP is one or more channels, active only while the is on. The current value of a channel can be exported to a parameter of any operator, overriding that parameter's value. See .

An that manipulates text strings: multi-line text or tables. Multi-line text is often a command , but can be any multi-line text. are rows and columns of cells, each containing a text string.

TouchDesigner is a hierarchy of components. "root" is the top-most network in the hierarchy. The is simply /. A typical path is /project1/moviein1.