MIDI
Introduction to MIDI
MIDI stands for Musical Instrument Digital Interface and has traditionally been used by electronic musicians, because it is a powerful tool for composing. It allows musicians to be more creative on stage and in the studio, it allows composers to write music that no human could ever perform, and it allows music to be distributed in a standard format. MIDI is a standard communications protocol that allows electronic musical instruments to 'talk' to each other.
In the computer world MIDI are commands sent by or to synthesizers saying which note is being / to be played: it's a kind of recording of the keys from someone playing his synthesizer. So a MIDI file has to be played on a synth, or a computer soundcard, or a MIDI module.
A MIDI instrument will have up to three MIDI ports. The MIDI Out port will send data that originates from that instrument. The MIDI In port will deliver data to the instrument. The MIDI Thru port will send an exact copy of the data coming into the MIDI In port and pass it on to another instrument or device.
The basis for MIDI communication is the byte. Through a combination of bytes a vast amount of information can be transferred. Each MIDI command has a specific byte sequence. The first byte is the status byte, which tells the MIDI device what function to perform. Encoded in the status byte is the MIDI channel. MIDI operates on 16 different channels, numbered 0 through 15. MIDI units will accept or ignore a status byte depending on what channel the machine is set to receive. Only the status byte has the MIDI channel number encoded. All other bytes are assumed to be on the channel indicated by the status byte until another status byte is received.
Some of the functions indicated in the status byte are Note On, Note Off, System Exclusive (SysEx), Pitch Change, and so on. Depending on the status byte, a number of different byte patterns will follow. The Note On status byte tells the MIDI device to begin sounding a note. Two additional bytes are required, a pitch byte, which tells the MIDI device which note to play, and a velocity byte, which tells the device how loud to play the note. Even though not all MIDI devices recognize the velocity byte, it is still required to complete the Note On transmission.
Technical Specification
The MIDI Interface operates at a nominal 31.25 kBaud using an asynchronous serial data byte comprising of: 1 Start bit, 8 Data bits (0 to 7) and 1 Stop bit. This makes a total of 10 bits per serial byte with a period of 320 microseconds.
MIDI Cabling
Cables shall have a maximum length of fifty feet (15 metres) and shall be terminated on each end by a corresponding 5-pin DIN male plug.. The cable shall be shielded twisted pair, with the shield connected to pin 2 at both ends.
The outer shell screen of the plugs MUST NOT be connected to the cable screen which should only use pin 2. There are several factors which limit the cable length, the two most significant are the MIDI Out hardware circuit itself and the Opto-isolator used in the MIDI In circuit. Neither of these can be changed and the opto-isolator may also vary considerably. If a good cable such as those suitable for balanced audio or data transmission is used and the maximum length is not exceeded then reliable operation may be expected. Deviations from the standard may lead to all sorts of intermittent problems which inevitably lead to loss of work.
MIDI Testing
A simple tester can be constructed with one LED and a 5-pin DIN plug or line socket by trimming the cable strain relief and soldering the LED between pins 4 and 5, with the anode to pin 4, so that the LED just protrudes. These testers may be used to check that MIDI data is being transmitted by substituting them for the receiving equipment, they should not be used in parallel.
MIDI Show Control (abbreviated to MSC) has become a standard for running stage shows. The parameters of MSC are: MSC Device ID, MSC Group ID and MSC Peer ID. When a device sends a MSC message, it is addressed to an entity with some ID. It may be a single-device ID (0¸0x6F, in decimal 0-111), a device-group ID (0x70¸0x7E, in decimal 112-126) or all the devices (0x7F in decimal 127).
Therefore, there may be assigned Device ID and/or Group ID to a device. If a system has both Device ID and Group ID, it will receive MSC messages sent with its device ID (messages sent only to that system), MSC messages sent with its Group ID (messages sent to all the devices in the group) and MSC messages sent with the broadcast ID (messages sent to all the devices at all). If a system has no device ID but has group ID, it will receive the messages sent to its group and the broadcasts.
If there is no Group ID but Device ID exists, then messages sent explicitly to the device and broadcasts will be received. The MSC Peer ID parameter tells the system which device the outgoing messages should be sent to. It may be a single Device ID, device Group ID or Broadcast ID.
See also:
|