Midi

Description

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts

Methods

Name Return Value Summary
allNotesOff None Turn off all notes on all connected devices.
blockMidiDevice None Block an input/output by name.
broadcastEnable None Broadcast on all unblocked devices.
listMidiDevices Array.<string> Get a list of inputs/outputs.
playMidiNote None Play a note on all connected devices.
resetDevices None Clean up and re-discover attached devices.
sendMidiMessage None Send MIDI message to a particular device.
sendRawDword None Send Raw MIDI packet to a particular device.
thruModeEnable None Repeat all incoming notes to all outputs (default disabled).
typeChanPressureEnable None
typeControlChangeEnable None
typeNoteOffEnable None
typeNoteOnEnable None
typePitchBendEnable None
typePolyKeyPressureEnable None
typeProgramChangeEnable None
typeSystemMessageEnable None
unblockMidiDevice None Unblock an input/output by name.

Method Details

(static) allNotesOff( )

Turn off all notes on all connected devices.

(static) blockMidiDevice( name, output )

Block an input/output by name.

Parameters

Name Type Description
name string
output boolean
(static) broadcastEnable( enable )

Broadcast on all unblocked devices.

Parameters

Name Type Description
enable boolean
(static) listMidiDevices( output ) → {Array.<string>}
Returns: Array.<string>

Get a list of inputs/outputs.

Parameters

Name Type Description
output boolean
(static) 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).
(static) resetDevices( )

Clean up and re-discover attached devices.

(static) 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).
(static) 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.
(static) thruModeEnable( enable )

Repeat all incoming notes to all outputs (default disabled).

Parameters

Name Type Description
enable boolean
(static) typeChanPressureEnable( enable )

Parameters

Name Type Description
enable boolean
(static) typeControlChangeEnable( enable )

Parameters

Name Type Description
enable boolean
(static) typeNoteOffEnable( enable )

Parameters

Name Type Description
enable boolean
(static) typeNoteOnEnable( enable )

Parameters

Name Type Description
enable boolean
(static) typePitchBendEnable( enable )

Parameters

Name Type Description
enable boolean
(static) typePolyKeyPressureEnable( enable )

Parameters

Name Type Description
enable boolean
(static) typeProgramChangeEnable( enable )

Parameters

Name Type Description
enable boolean
(static) typeSystemMessageEnable( enable )

Parameters

Name Type Description
enable boolean
(static) unblockMidiDevice( name, output )

Unblock an input/output by name.

Parameters

Name Type Description
name string
output boolean