MIDIMessageDispatcher is used to dispatch incoming MIDI noteOn, noteOff, control, and polytouch messages to matching functions. Normally users should not have to create or message instances of this class directly.
Create a new instance.
messageType |
A Symbol indicating the message type, one of |
A new MIDIMessageDispatcher.
Get this dispatcher's message type, one of \noteOn
, \noteOff
, \control
, or \polytouch
.
A Symbol.
Get the keys at which a responder func's functions are stored in this dispatcher's active dictionary. The keys will be MIDI message numbers.
funcProxy |
Attempt to match an incoming MIDI message with this dispatcher's responder funcs, and evaluate their functions for all matches found.
src |
The UID of the source of the MIDI message as an Integer. |
chan |
The channel number of the MIDI message as an Integer. Note this should be in the range 0-15. |
num |
The message number (e.g. note number, etc.) of the MIDI message as an Integer. Note this should be in the range 0-127. |
val |
The message value (e.g. velocity, etc.) of the MIDI message as an Integer. Note this should be in the range 0-127. |
Adds this dispatcher to the appropriate receive hook in MIDIIn.
Removes this dispatcher from the appropriate receive hook in MIDIIn.
Called internally to wrap functions in message matcher objects, if needed.
funcProxy |
An instance of MIDIFunc or MIDIdef whose function(s) are to be wrapped. |
Gets a key indicating the type of message this dispatcher responds to, in the form: ('MIDI ' ++ messageType).asSymbol
.
A Symbol.