-
Notifications
You must be signed in to change notification settings - Fork 53
Scripting
SammyIAm edited this page May 8, 2018
·
1 revision
Moppy 2.0 uses Javascript to map MIDI events (a channel and note number) to Moppy note Messages (a device address, sub address, and note number). Four separate scripts are used to determine which MIDI events to receive and the three values of the resulting Moppy Messages:
Condition | Device Address | Sub-Address | Note |
---|---|---|---|
If result is true (as a Javascript Boolean then the MIDI event will be considered, if not it will be skipped. | The result should be an integer from 1-255 indicating the device address (as configured on the Arduino) that this note should be sent to. | The result should be an integer from 1-255 indicating the sub-address on that device the note should be played on (i.e. which floppy drive the note should play on). | The result should be an integer indicating the MIDI note to be played. |
All of these scripts have the following two variables pre-defined:
c
= The MIDI channel the event was received on.
n
= The MIDI note of the event.
The default available range (as coded in the Arduino sketch) is note number 24 (C1) to note number 71 (B4). Without modifications to the code, notes outside this range will be ignored by the Arduino.