-
Notifications
You must be signed in to change notification settings - Fork 65
MidiSupport
By default, the MIDI support is disabled to avoid handling unnecessary information in order to optimize the plugin. To use MIDI events in the plugin, the MIDI input and/or the MIDI output must be enabled. If the plugin handles only MIDI event and no audio signal the plugin can also be optimized by disabling audio processing. MIDI support can be enabled regardless of whether the plugin is an effect or an instrument.
To support input MIDI events, the properties file of the plugin must contains the entry midiin true
(default is midiin false
). In the patch, use the MIDI objects [notein]
, [ctlin]
, [bendin]
, [touchin]
, [polytouchin]
, [pgmin]
, [midiin]
, [sysexin]
and [midirealtimein]
with the standard syntax of arguments to receive MIDI events. The MIDI port of the objects [midiin]
, [sysexin]
and [midirealtimein]
doesn't seem to be supported by the digital audio workstation so their port numbers are always set to zero.
Important: The objects [midiin]
, [sysexin]
and [midirealtimein]
have not been well tested yet. If you encounter any issue, feel free to report it.
To support output MIDI events, the properties file of the plugin must contains the entry midiout true
(default is midiout false
). In the patch, use the MIDI objects [noteout]
, [ctlout]
, [bendout]
, [touchout]
, [polytouchout]
, [pgmout]
and [midiout]
with the standard syntax of arguments to send MIDI events. The MIDI port of the object [midiout]
doesn't seem to be supported by the digital audio workstation so the port number is always set to zero.
Important: The objects [midiout]
has not been well tested yet. If you encounter any issue, feel free to report it.
If the plugin doesn't process any audio signal, the audio processing can be bypassed using the entry midionly true
in the properties file of the plugin (default is midionly false
). This option optimizes the plugin and help the digital audio workstation to manage the audio chain.
To support play head information, the properties file of the plugin must contains the entry playhead true
(default is playhead false
). In the patch, use the object [receive playhead]
to retrieve the play head information.
The object outputs lists of messages with different symbol selectors that can be used to route the information. At each DSP tick, each message is sent in this specific order:
-
playing
followed by one number:1
is the transport is currently looping and otherwise0
. -
recording
followed by one number:1
is the transport is currently recording and otherwise0
. -
looping
followed by three numbers:1
is the transport is currently looping and otherwise0
, the start position of the loop in units of quarter-notes and the end position of the loop in units of quarter-notes. -
edittime
followed by one number: the position of the start of the timeline is seconds. -
framerate
followed by one number: the video frame rate, if applicable. -
bpm
followed by one number: the tempo in beats per minute. -
lastbar
followed by one number: the position of the start of the last bar, in units of quarter-notes. -
timesig
followed by two numbers: the time signature numerator and the time signature denumerator. -
position
followed by three numbers: the current play head position in units of quarter-notes from the start of the timeline, the current play head position in samples from the start of the timeline and the current play head position in seconds from the start of the timeline.
These information can be used to control the patch like generating MIDI notes. For example, using the current play head position in units of quarter-notes with the time signature and the last bar information can be used to compute the play head position in the current bar and the remaining beats in the bar and each new beat can generate a note. See this patch for an example.