MIDI stands for Musical Instrument Digital Interface. It is a specification of a communications scheme for digital music devices and represents a formal set of hardware and software rules for sending and receiving musical-event data between computers and synthesizers. MIDI is currently the de facto standard for the interconnection of musical devices. Musical data such as notes or other performance parameters such as pitch-bending are typically input by the musician using a keyboard synthesizer equipped with a MIDI hardware interface. This MIDI hardware encodes the key depressions and transmits them serially over the MIDI port. The output of this port may be connected to the input of another MIDI port that is either attached to a computer or another synthesizer.
The basic idea behind MIDI is a two-layer network consisting of a physical interconnection scheme and a code to communicate information across the channel.
The physical layer of MIDI is a simple point-to-point opto-isolated 5 mA current loop using a 5-pin DIN connector in which three of the pins are used. The cable is made of a shielded twisted pair with the shield being grounded at the source end only. Each twisted pair implements a one-direction transmission line. Hence two cables are needed to implement a two-way communication path between MIDI stations. An instrument implementing the interface must have MIDI input and output jacks, to be labelled MIDI IN and MIDI OUT. A MIDI THRU jack may also be provided, which simply provides a buffered electrical copy of the input signal. Information is transmitted across as asynchronous serial data at a baud rate of 31250 baud with 1 start bit, 8 data bits and 1 stop bit.
Some interconnection schemes for the interconnection of musical instruments:
Note that a single MIDI cable is a unidirectional single-talker / single-listener network. Using a MIDI THRU connection allows it to become a multilistener network.
The code specification consists of three elements: modes, channels, and commands.
There are three modes and sixteen channels, which provide for multisynthesizer control within a single MIDI network. The modes establish the relationship between the channels and voice assignment methods within a synthesizer. MIDI commands with a field for channel number are called channel commands. The MIDI mode configures synthesizers to receive or ignore channel commands depending on the channel number. The three modes are
The modes may be grouped into four states:
There are five categories of MIDI commands:
System realtime commands have the highest priority (can interrupt multibyte commands) followed by System exclusive. All other commands have equal priority.
A typical MIDI command byte is as follows:
Status byte
10010010
1XXXYYYY
1 Leading Sentinel bit
XXX Command ID
YYYY Channel ID
The sentinel signals the start of a new command (status byte). Data bytes must have this bit reset. The Command ID identifies the MIDI command. If the command ID identifies the command to be a channel command then the Channel field contains the channel number of the command, otherwise the channel field is used as an extension of the command field.
Each command type contains a specified number of trailing data bytes. The only exception is System exclusive, which may contain an unspecified number of trailing data bytes (with sentinel bit reset) terminated by an EOX (End of Exclusive) command. Some commands have no trailing data bytes at all.
If a subsequent command have a status byte identical to the command prior to it, then the status byte need not be sent and will be assumed by the receiver. This feature is called MIDI running status and reduces the amount of information that has to be passed through the MIDI interface.
| Status | Arg 1 | Arg 2 | Mnemonic |
| 8Y | Key | Velocity | Key off |
| 9Y | Key | Velocity | Key on |
| AY | Key | Pressure | Polyphonic Key Pressure |
| BY | Index | Value | Control Change |
| CY | Index | | Program Change |
| DY | Pressure | | Pressure (combined) |
| EY | LSB | MSB | Pitch Wheel change |
| Status | Arg 1 | Arg 2 | Mnemonic |
| F0 | Mfg. ID | ... | System Exclusive Command |
| Status | Arg 1 | Arg 2 | Mnemonic |
| F2 | LSB | MSB | Program Position Select |
| F3 | Index | | Program Select |
| F6 | | | Tune request |
| F7 | | | End of System Exclusive (EOX) |
| Status | Arg 1 | Arg 2 | Mnemonic |
| F8 | | | Timing Clock |
| F9 | | | Undefined |
| FA | | | Start |
| FB | | | Continue |
| FC | | | Stop |
| FD | | | Undefined |
| FE | | | Active sensing |
| FF | | | System reset |
Next: Appendix 4: SAMPLE PROGRAMS
Previous: Appendix 3: Summary and Description of MIDI
Back to: Table of Contents