This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
midi_specification [2006/10/15 09:35] 127.0.0.1 (old revision restored) |
midi_specification [2012/10/02 06:42] (current) cheater Reverting spam from lauraholden |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== MIDI Specifications ====== | ====== MIDI Specifications ====== | ||
+ | |||
+ | If you'd like a simplified explanation, see [[http://www.midibox.org/dokuwiki/simple_midi_specification|here]]... Otherwise this page contains some more technical info. | ||
[[MIDI]] is a standardized way for the communication between musical devices. It specifies the physical interface as well as the transmission protocol. There are different types of MIDI messages, for a full list please follow the links below. | [[MIDI]] is a standardized way for the communication between musical devices. It specifies the physical interface as well as the transmission protocol. There are different types of MIDI messages, for a full list please follow the links below. | ||
Line 35: | Line 37: | ||
F identifies a System Message which either addresses all listeners (there is no MIDI channel), or which addresses dedicated MIDI devices which are parsing for a SysEx (System Exclusive) stream. | F identifies a System Message which either addresses all listeners (there is no MIDI channel), or which addresses dedicated MIDI devices which are parsing for a SysEx (System Exclusive) stream. | ||
- | E.g., MIOS "feels addressed" on SysEx messages which are starting with 0xF0 0x00 0x00 0x7E 0x40, followed by data byte which selects the device (Device ID), followed by a command to the operating system (e.g. Code Upload). | + | E.g., MIOS "feels addressed" on [[SysEx]] messages which are starting with 0xF0 0x00 0x00 0x7E 0x40, followed by data byte which selects the device (Device ID), followed by a command to the operating system (e.g. Code Upload). |
- | SysEx messages should be finished with 0xF7, thereafter any other MIDI event can be sent again. | + | [[SysEx]] messages should be finished with 0xF7, thereafter any other MIDI event can be sent again. |
The last Status Bytes within the range of 0xF8..0xFF - also called "Realtime messages" - have (again) a special purpose, because it's allowed to send them at any time, even in between any other MIDI message without violating the protocol. | The last Status Bytes within the range of 0xF8..0xFF - also called "Realtime messages" - have (again) a special purpose, because it's allowed to send them at any time, even in between any other MIDI message without violating the protocol. | ||
Line 45: | Line 47: | ||
\\ | \\ | ||
\\ | \\ | ||
+ | |||
====== Programming Examples ====== | ====== Programming Examples ====== | ||
Line 104: | Line 107: | ||
\\ | \\ | ||
\\ | \\ | ||
+ | |||
+ | ====== 14-bit MIDI Messages ====== | ||
+ | |||
+ | There are two ways to use 14-bit MIDI Messages; the trick is, to combine two 7-bit Messages to one 14-bit: | ||
+ | <code c> | ||
+ | unsigned int MSB = 127 << 7; // 16256 | ||
+ | unsigned char LSB = 127; // 127 | ||
+ | unsigned int largeNumber = MSB + LSB; // 16383: | ||
+ | </code> | ||
+ | * using RPNs | ||
+ | * using NRPNs: <code c> | ||
+ | CC98 01100010 0x62 Non-Registered Parameter Number (NRPN) - LSB 0-127 LSB | ||
+ | CC99 01100011 0x63 Non-Registered Parameter Number (NRPN) - MSB 0-127 MSB | ||
+ | </code> | ||
+ | * sending two Controller Messages, eg:<code> | ||
+ | CC 12, Effect Ctrl 1 (MSB = Most Significant Byte) | ||
+ | CC 44, Effect Ctrl 1 (LSB = Least Significant Byte)</code> | ||
+ | |||
+ | Sending 14bit from one pot is only possible if you're hacking the code. Because Pots are being read as 10-bit value, you have to interpolate to 14 bit and implement a NRPN or dual-CC method. | ||
+ | |||
+ | Further informations: \\ | ||
+ | [[http://home.roadrunner.com/~jgglatt/tech/midispec.htm|Jglatt's Technical MIDI Specs Page]] or \\ | ||
+ | [[http://www.midi.org/about-midi/table3.shtml|Table 3: Summary of Control Change Messages (Data Bytes)]] for further examples and explanations | ||
+ | |||
+ | |||
+ | \\ | ||
+ | \\ | ||
+ | |||
====== Tools & Helpers ====== | ====== Tools & Helpers ====== | ||
Line 115: | Line 146: | ||
More informations can be found online:\\ | More informations can be found online:\\ | ||
- | * [[http://www.borg.com/~jglatt|MIDI Technical Fanatic's Brainwashing Center]] <sup>must-read!</sup>\\ | + | * [[http://home.roadrunner.com/~jgglatt/|MIDI Technical Fanatic's Brainwashing Center]] <sup>must-read!</sup> [[http://web.archive.org/web/20070813201804/www.borg.com/~jglatt/|Archive]]\\ |
- | * [[http://www.borg.com/~jglatt/tech/midispec.htm|Jglatt's Technical MIDI Specs Page]]\\ | + | * [[http://home.roadrunner.com/~jgglatt/tech/midispec.htm|Jglatt's Technical MIDI Specs Page]] [[http://web.archive.org/web/20070820161159/http://www.borg.com/~jglatt/tech/midispec.htm|Archive]]\\ |