Main Page | See live article | Alphabetical index

Musical Instrument Digital Interface

Musical Instrument Digital Interface, or MIDI, is a system designed to transmit information between electronic musical instruments.

MIDI allows computers, synthesizers, sound cards and drum machines to control one another, and to exchange system information. Though modern computer sound-cards are MIDI-compatible and capable of creating realistic instrument sounds, the fact that sound cards' MIDI synthesizers have historically produced sounds of dubious quality has tarnished the image of a general purpose computer as a MIDI instrument.

MIDI is almost directly responsible for bringing an end to the "wall of synthesizers" phenomenon in 1970s-80s rock music concerts. Following the advent of MIDI, many synthesizers were released in rack-mount versions, enabling performers to control multiple instruments from a single keyboard. Another important effect of MIDI has been the development of hardware and computer-based sequencerss, which can be used to record, edit and play back performances.

Synchronisation of MIDI sequences is made possible by the use of MIDI timecode, an implementation of the SMPTE time code standard using MIDI messages, and MIDI timecode has become the standard for digital music synchronization.

Table of contents
1 Electrical connections
2 Message format
3 IN, OUT, THRU
4 General MIDI
5 Low bandwidth
6 MIDI file formats
7 Extensions of the MIDI standard
8 Beyond MIDI
9 Other applications of MIDI
10 External links

Electrical connections

The MIDI standard consists of a messaging protocol designed for use with musical instruments, as well as a physical interface standard. A physical MIDI connection consists of a one-way (half-duplex) serial current-loop connection running at 31,250 bits per second.

Only one end of the loop is referenced to ground, with the other end 'floating', to prevent ground loops from producing analog audio interference and hum. The current loop on the transmitter side drives the LED of an opto-coupler on the receiver side. This means, the devices are in fact opto-isolated. The opto-coupler must be a high-speed type (the Sharp PC900 is very common). As most opto-couplers have asymetrical switching times (delays for switching on are different from the delays when switching off), they distort the signal (the zero to one relations). If you connect several MIDI devices in series by daisy-chaining the MIDI-THRU to the next devices MIDI-IN, the signal gets more and more distorted (until receive errors happen because the pulses get too narrow).

Message format

Each connection can transmit standard musical messages, such as note-on, note-off, volume, pitch-bend and modulation signals coded with 16 "channel" identifiers. Note messages can represent any note from C,,,, (i.e. five octaves below middle c or 8.175 Hz in common Western musical tuning; designated as MIDI note 0) to g''''' (i.e. five octaves above the g above middle c or 12,557 Hz; designated as MIDI note 127) with precision down to the semitone. Pitch-bend messages range in ±2 semitones (sometimes adjustable witho Registered Parameter Numbers), with precision of 1/4,096 semitone. (The human hearing system can't hear the difference between adjacent pure tones that differ by less than 1/20 semitone.)

It should be noted that MIDI can be used to provide facilities for playing in nonstandard musical tunings. However, these features are not standardised across all instruments.

The ability to multiplex 16 "channels" onto a single wire makes it possible to control several instruments at once using a single MIDI connection.

IN, OUT, THRU

Most MIDI-capable instruments feature a MIDI-IN, MIDI-OUT and occasionally a MIDI-THRU connection in the form of 5-pin DIN jacks. In order to build a two-way physical connection between two devices, a pair of cables must be used. The MIDI-THRU jack simply echoes the signal entering the device at MIDI-IN (with a delay of a few milliseconds), making it possible to control several devices from a single source. Although most PC soundcards have the ability to terminate a MIDI connection (usually through a converter on the joystick port) the Atari ST was the first home computer to sport the original 5 pin format which made it a very popular platform for running MIDI sequencer software such as Steinberg's Cubase.

General MIDI

The MIDI standard does not specify what number (0 to 127) corresponds to what instrument sound. General MIDI was an attempt to resolve this problem by specifying a profile for MIDI instruments, whereby a range of 'standard' instrument sounds must be implemented with standard setting codes on all General MIDI-conforming devices. General MIDI was a mixed success.

Low bandwidth

MIDI messages are extremely compact, due to the low bandwidth of the connection, and the need for near real-time accuracy. Most messages consists of a byte containing a channel number and an opcode, followed by one or two data bytes. However, the serial nature of MIDI messages means that long strings of MIDI messages take an appreciable time to send, and many people can hear those delays, especially when dealing with complicated musical information on many channels.

MIDI file formats

MIDI information can be collected and stored on a computer disk (along with timing information), where it is called a MIDI file. MIDI files are created using a hardware-based (MIDI workstation) or desktop computer-based sequencing software that contains one or more "tracks" of MIDI data assigned to specific channels, and in most cases, pre-determined General MIDI sound patches. Although some MIDI workstation hardware saves MIDI sequences in a proprietary format, recent developments in and the shift to desktop computer-based sequencing software has pushed General MIDI as the accepted standard format for MIDI files Large collections of MIDI files can be found on the web, most commonly with the extension .mid; however, the limited number of instrument types in the General MIDI standard and the historically poor synthesis of what instruments were there have led some listeners and composers to shun MIDI files and use the MOD format instead.

MIDI-Karaoke (which uses the ".kar" file extension) files are an "unofficial" extension to the MIDI Standard, used to add synchronized lyrics to standard MIDI files. Standard audio players cannot take advantage of these lyrics (probably due to copyright issues). However, many players are available that display the lyrics synchronized with the music in "follow-the-bouncing-ball" fashion, essentially turning any PC into a Karaoke machine.

Note: *.kar files renamed into *.mid files can be played by standard midi programs.

The MIDI Association has now defined a new format, XMF (eXtensible Music File) which packages SMF (Standard MIDI File) format data with downloadable sounds, to much the same effect as MOD files. In spite of its name, XMF is not XML-based.

Extensions of the MIDI standard

Although traditional MIDI connections work well for most purposes, in 1994 a new high-bandwidth standard, named ZIPI, was proposed to replace MIDI for professional purposes. ZIPI failed due primarily to lack of demand.

USB and Firewire embeddings of MIDI are now entering the market, and in the long run USB MIDI is likely to replace the old current loop implementation of MIDI, as well as providing the high-bandwidth channel that ZIPI was intended to provide.

Beyond MIDI

OpenSound Control or OSC, devised by CNMAT is generally considered to be superior, and has been implemented in software like SuperCollider, Max/MSP and Csound. It can run over ethernet connections.

Yamaha has its mLAN standard, which is a variation on firewire [1].

Other applications of MIDI

MIDI can also be used for applications other than music:

Any device built with a standard MIDI-OUT port should (in theory) be able to control another with a MIDI-IN port, providing that basics such as note numbers and controller numbers have a meaning that is agreed upon by both manufacturers.

See also: mobile phone ringtone.

External links