参考资料:IETF RFC 6295 — RTP Payload Format for MIDI
概述
- MIDI(Musical Instrument Digital Interface),中文名称为乐器数字接口
- 音乐家通过一系列身体运动来演奏音乐,比如
- 按下键
- 放开键
- 踏板操作
- MIDI通过将身体运动转换为MIDI命令来表示音乐
MIDI命令
- 声音命令(Voice Commands)
- NoteOff (end a note) –> 1000cccc 0nnnnnnn 0vvvvvvv
- NoteOn (start a note) –> 1001cccc 0nnnnnnn 0vvvvvvv
- PTouch (Polyphonic Aftertouch) –> 1010cccc 0nnnnnnn 0aaaaaaa
- CControl (Controller Change) –> 1011cccc 0xxxxxxx 0yyyyyyy
- PChange (Program Change) –> 1100cccc 0ppppppp
- CTouch (Channel Aftertouch) –> 1101cccc 0aaaaaaa
- PWheel (Pitch Wheel) –> 1110cccc 0xxxxxxx 0yyyyyyy
- 系统常用命令(System Common Commands)
- System Exclusive –> 11110000, followed by a list of 0xxxxxxx octets, followed by 11110111
- MIDI Time Code Quarter Frame –> 11110001 0xxxxxxx
- Song Position Pointer –> 11110010 0xxxxxxx 0yyyyyyy
- Song Select –> 11110011 0xxxxxxx
- Undefined –> 11110100
- Undefined –> 11110101
- Tune Request –> 11110110
- System Exclusive End Marker –> 11110111
- 系统实时命令(System Real-Time Commands)
- Clock –> 11111000
- Undefined –> 11111001
- Start –> 11111010
- Continue –> 11111011
- Stop –> 11111100
- Undefined –> 11111101
- Active Sense –> 11111110
- System Reset –> 11111111