Modifiers browser MIDI events.
Create a filter:
var midiModify = new MIDIModify(options);
This creates a modify node.
The new
keyword is optional.
To pass messages into the filter, call the filter's in
method:
midiModify.in(e);
To listen to the output, register a listener with the filter's out
method:
midiModify.out(fn);
The callback function fn
will be called whenever a MIDI message is passed
through the modifier. It is given the message e
as it's first argument.
A modifier understands the options:
{
port: number | string | target
channel: number (1-16) | fn
message: string
data1: number (0-127) | fn
data2: number (0-127) | fn
}
message
should be one of:
'noteoff'
'noteon'
'polytouch'
'cc'
'pc'
'channeltouch'
'pitch'
Functions should return a number.