MIDI messages
See also
Channel voice messages
A channel number is an integer in the range [1, 16].
A channel index is one less than its corresponding channel number.
Prefix | MessageType | Followed by |
---|---|---|
9 | .note_on | channel_index :u4, piano_key :u8, key_on_velocity :u8` |
8 | .note_off | channel_index :u4, piano_key :u8, release_velocity :u8 (e.g. 64) |
A | .poly_key_pressure | channel_index:u4 , ... |
B | .control_change | channel_index:u4 , ... |
C | .program_change | channel_index:u4 , ... |
D | .channel_pressure | channel_index:u4 , ... |
E | .pitch_bend | channel_index:u4 , ... |
Channel mode messages
TODO
System common messages
TODO
System real time messages
TODO
System exclusive messages
TODO
Time code messages
Prefix | MessageType | Followed by |
---|---|---|
F10 | .timecode_quarter_1_of_8 | SMPTE frame number, lower nibble : u4 |
F11 | .timecode_quarter_2_of_8 | SMPTE frame number, upper nibble : u4 |
F12 | .timecode_quarter_3_of_8 | SMPTE second, lower nibble : u4 |
F13 | .timecode_quarter_4_of_8 | SMPTE second, upper nibble : u4 |
F14 | .timecode_quarter_5_of_8 | SMPTE minute, lower nibble : u4 |
F15 | .timecode_quarter_6_of_8 | SMPTE minute, upper nibble : u4 |
F16 | .timecode_quarter_7_of_8 | SMPTE hour, lower nibble : u4 |
F17 | .timecode_quarter_8_of_8 | SMPTE hour, upper nibble : u4 |
F07F | .timecode_full | recipient :u8 (0x7F for "all"), ...full SMPTE time code (TODO)... |
Meta messages
Prefix | MessageType | Followed by | Notes |
---|---|---|---|
FF00 | .sequence_number | TODO | |
FF01 | .text | length + text | e.g. "asdf" |
FF02 | .copyright_notice | length + text | |
FF03 | .sequence_or_track_name | length + text | |
FF04 | .instrument_name | length + text | |
FF05 | .lyric | length + text | |
FF05 | .marker | length + text | e.g. "where the beat drops" |
FF07 | .cue_point | length + text | e.g. "Exeunt." |
FF2001 | .midi_channel_prefix | TODO | |
FF2F00 | .end_of_track | ||
FF5103 | .set_tempo | microseconds per quarter note | |
FF5405 | .smpte_offset | u8 u8 u8 u8 u8 | (hour, minute, second, frame, frame_100th). This defines the SMPTE timecode at the start of the track chunk, and must occur (if at all) before any non-zero timestamps within the chunk. |
FF5804 | .time_signature | num, denom_exp, ticks per quarter note, notated_32nd_notes_per_quarter_note | |
FF5902 | .key_signature | TODO | |
FF7F | .sequencer_specific_meta_event | length + data |
General MIDI sound set
Hex | Dec | GMSoundSet |
---|---|---|
00 | 0 | .acoustic_grand_piano |
... | ||
0C | 12 | .marimba |
... | ||
7F | 127 | .gunshot |
General MIDI precussion map
Channel 10 uses these instead of the sound set above:
Hex | Dec | GMPrecussionMap |
---|---|---|
22 | 34 | .acoustic_bass_drum |
... | ||
50 | 80 | .open_triangle |
Time Signature
See midi.TimeSignature
(TODO).
Key Signature
See music.KeySignature
(TODO).
Tuning
TODO