Use the JavaScript MIDI object

The MIDI object contains a number of convenient and easy to use functions that can be used when writing your scripts.

Note: The MIDI object is a property of the global object, which means that you do not instantiate it but access its functions much like you would the JavaScript Math object. An example is calling MIDI.allNotesOff() directly.

MIDI object properties

Use the following method names and arguments to perform these functions:

Load the corresponding Tutorial setting to view the script in the Script Editor. This will help you to understand the syntax structure and layout of code and comments. See Use the Script Editor.

Tutorial script 10: Event Detection

This script passes all events through and sends an “all notes off” message when receiving a MIDI continuous controller 20 event.