Firmware-811 Command-094

From I-CubeX Wiki
Jump to: navigation, search

MIDI CONFIG (94, 5Eh)

This command enables / disables MIDI running status and active sensing, and the sending of a MIDI byte each time the WiDig's sampling loop starts.

When running status is enabled the WiDig will always send the MIDI status byte each time it sends a MIDI message. For example, if the running status feature of the WiDig is ON then the output MIDI message from the WiDig for two MIDI Note-On message (9xh where x is a number from 0 to 15 representing the MIDI channel number between 1 and 16) on MIDI channel 1 will be “90h n1 v1 90h n2 v2”. Where 90h is the running status byte for a Note-On message on channel 1, n1 & n2 are the note number values between 0 to 127 (for MIDI Note-On 1 and 2) and v1 & v2 are the velocity values between 0 and 127 for MIDI Note-On 1 and 2. When the MIDI running status feature is disabled the WiDig will only send a running status byte when it is different from the last one that was sent. For example the running status for two Note-On messages would be: “90h n1 v1 n2 v2”. This feature is useful when the data stream is large. It removes unwanted repetition of the current status so that this can slightly reduce the latency and the amount of MIDI data flow.

When active sensing is enabled the WiDig will send a single MIDI System Exclusive Realtime byte 254 (FEh) every 300 ms. Connected MIDI devices can use this information to turn off MIDI notes if the active sensing message is not received, and hence avoid "hanging notes".

When sampling interval marking is enabled the WiDig will send a single MIDI System Exclusive Realtime byte 253 (FDh) each time the sampling loop is started. By measuring the time passed between the receipt of these bytes it's possible to more accurately determine the actual sampling interval of the WiDig. This may be useful when the sampling interval is below 10 ms and many sensors are connected and/or many processing features are enabled.

Upon completion of the MIDI CONFIG command the same message is sent out by the WiDig.

The [BODY] of the MIDI CONFIG command is:

00000zyx: x = 0; MIDI running status enabled (channel voice MIDI messages only include a MIDI status byte when it changes)
x = 1; MIDI running status disabled (each channel voice MIDI message includes a MIDI status byte)
y = 0; MIDI active sensing disabled
y = 1; MIDI active sensing enabled
z = 0; Sampling interval marking disabled
z = 1; Sampling interval marking enabled