List of MIDI events

The following table summarizes the byte codes of the MIDI events. Short events are the ones with data stored in the Data member of the BRELS_MIDI_EVENT structure. Long events are the ones with data stored in variable size array with address stored in the lpData of the structure.

EventByteTypeDescription
Sequence number0x00Long2 bytes informing the sequence number
Text0x01LongGeneral-purpose text
Copyright0x02LongCopyright information
Track name0x03LongText corresponding to the name of a track
Instrument name0x04LongName of the instrument
Lyrics0x05LongLyrics text. Generally, each event corresponds to syllable of the song. Use a slash (either "\" or "/") to cause a line break.
Marker0x06LongMarker text for something internal to the sequence (for example, "piano plays")
Cue point0x07LongHint text for something external to the sequence (for example, "curtains open")
Channel prefix0x20Long1 byte to associate events to a channel
End of track0x2FLongMarks the end of track. Contains no data
Tempo change0x51Long3-byte value indicating the duration of a beat in microseconds
SMPTE offset0x54LongOffset in SMPTE format of the start of an assynchronous track (not supported in the API)
Time signature0x58LongTime signature of the sequence
Key signature0x59LongKey signature of the sequence
Sequencer specific data0x7FLongSequencer specific data
Note off0x8nShortTurns the sound of a note off in channel n. The first byte of data is the note and the second byte of data is the velocity. Both range from 0 to 127.
Note on0x9nShortTurns the sound of a note on in channel n. The first byte of data is the note and the second byte of data is the velocity. Both range from 0 to 127.
Key aftertouch0xAnShortSets the pressure of a note in channel n. The first byte of data is the note and the second byte of data is the pressure. Both range from 0 to 127.
Controller change0xBnShortSets the value of a controller in channel n. The first byte of data is the controller number and the second byte of data is the controller value. Both range from 0 to 127.
Program change0xCnShortSets the instrument for channel n. The byte of data is the program number and ranges from 0 to 127.
Channel pressure0xDnShortSets the note pressure for channel n. The byte of data is the pressure value and ranges from 0 to 127.
Pitch change0xEnShortSets the relative pitch for channel n. The pitch is stored this way: 0xxxxxxx 0yyyyyyy, where the value is yyyyyyyxxxxxxx. It ranges from 0x0000 to 0x3FFF. Zero corresponds to -1.0 tone, 0x2000 means normal pitch and 0x3FFF means +1.0 tone.
System exclusive data0xF0LongSpecific to MIDI hardware devices. You should strip it from MIDI files
MTC Quarter Frame0xF1ShortSpecific to MIDI hardware devices. You should strip it from MIDI files
Song position pointer0xF2ShortSpecific to MIDI hardware devices. You should strip it from MIDI files
Song select0xF3ShortSpecific to MIDI hardware devices. You should strip it from MIDI files
Tune request0xF6ShortSpecific to MIDI hardware devices. You should strip it from MIDI files
MIDI Clock0xF8ShortSpecific to MIDI hardware devices. You should strip it from MIDI files
MIDI Start0xFAShortSpecific to MIDI hardware devices. You should strip it from MIDI files
MIDI Continue0xFBShortSpecific to MIDI hardware devices. You should strip it from MIDI files
MIDI Stop0xFCShortSpecific to MIDI hardware devices. You should strip it from MIDI files
Active Sense0xFEShortSpecific to MIDI hardware devices. You should strip it from MIDI files

You can find a list of controllers and instruments in this website: The void. The sample application midi decoder can help you to understand this list better.


Further information

Released in November 19th, 2003
Updated in April 29th, 2004
Property of Breno de Lima Sarmento
Home page: http://www27.brinkster.com/brels
E-mail: [email protected]
ICQ: 78977999 ()