Midi

Methods

allNotesOff()
Turn off all notes on all connected devices.
blockMidiDevice(name, output)
Block an input/output by name.
Parameters:
Name Type Description
name string
output boolean
broadcastEnable(enable)
Broadcast on all unblocked devices.
Parameters:
Name Type Description
enable boolean
listMidiDevices(output) → {Array.<string>}
Get a list of inputs/outputs.
Parameters:
Name Type Description
output boolean
Returns:
Type: Array.<string>
playMidiNote(status, note, velocity)
Play a note on all connected devices.
Parameters:
Name Type Description
status number 0x80 is note off, 0x90 is note on (if velocity=0, note off), etc.
note number MIDI note number.
velocity number Note velocity (0 means note off).
resetDevices()
Clean up and re-discover attached devices.
sendMidiMessage(device, channel, type, note, velocity)
Send MIDI message to a particular device.
Parameters:
Name Type Description
device number Integer device number.
channel number Integer channel number.
type number 0x8 is note off, 0x9 is note on (if velocity=0, note off), etc.
note number MIDI note number.
velocity number Note velocity (0 means note off).
sendRawDword(device, raw)
Send Raw MIDI packet to a particular device.
Parameters:
Name Type Description
device number Integer device number.
raw number Integer (DWORD) raw MIDI message.
thruModeEnable(enable)
Repeat all incoming notes to all outputs (default disabled).
Parameters:
Name Type Description
enable boolean
typeChanPressureEnable(enable)
Parameters:
Name Type Description
enable boolean
typeControlChangeEnable(enable)
Parameters:
Name Type Description
enable boolean
typeNoteOffEnable(enable)
Parameters:
Name Type Description
enable boolean
typeNoteOnEnable(enable)
Parameters:
Name Type Description
enable boolean
typePitchBendEnable(enable)
Parameters:
Name Type Description
enable boolean
typePolyKeyPressureEnable(enable)
Parameters:
Name Type Description
enable boolean
typeProgramChangeEnable(enable)
Parameters:
Name Type Description
enable boolean
typeSystemMessageEnable(enable)
Parameters:
Name Type Description
enable boolean
unblockMidiDevice(name, output)
Unblock an input/output by name.
Parameters:
Name Type Description
name string
output boolean