MD_MIDIFile Standard MIDI File Processing 2.6
Library to play Standard MIDI Files (SMF)
|
#include <MD_MIDIFile.h>
Public Attributes | |
uint8_t | track |
the track this was on | |
uint8_t | channel |
the midi channel | |
uint8_t | size |
the number of data bytes | |
uint8_t | data [4] |
the data. Only 'size' bytes are valid | |
MIDI event definition structure
Structure defining a MIDI event and its related data. data[0] contains the midi channel message identifier. data[1] onwards contains the relevant parameters for the message id, as described below.
data[0] | data[1] | data[2] |
---|---|---|
0x80 (Note off) | note number (0-127) | note velocity |
0x90 (Note on) | note number (0-127) | note velocity^ |
0xA0 (Polyphonc key) | note number (0-127) | pressure |
0xB0 (Ctl change) | controller number^^ | Controller value |
0xC0 (Prog change) | program number | - |
0xD0 (Chan Pressure) | pressure value | - |
0xE0 (Pitch Bend) | MSB | LSB |
^ Note on with velocity 0 is same as note off
^^ Control Change with controller numbers 121 thu 127 (0x79 thru 0x7f) are reserved for Channel Mode messages as follows:
data[0] | data[1] | data[2] |
---|---|---|
0xB0 (Ctl change) | 0x79 (Reset all) | - |
0xB0 (Ctl change) | 0x7a (Local control) | 0 = off; 127 = on |
0xB0 (Ctl change) | 0x7b (All notes off) | - |
0xB0 (Ctl change) | 0x7c (Omni mode off) | - |
0xB0 (Ctl change) | 0x7d (Omni mode on) | - |
0xB0 (Ctl change) | 0x7e (Mono mode on) | 0 (all) or specific number |
0xB0 (Ctl change) | 0x7f (Poly mode on) | - |
A pointer to this structure type is passed to the callback function registered using setMidiHandler().