Musical Instrument Digital Interface

Template:Dablink

Musical Instrument Digital Interface, or MIDI, is an industry-standard protocol that defines each note precisely and concisely, allowing electronic musical instruments and computers to talk to each other. The MIDI standard was first proposed by Dave Smith in 1981 in a paper to the Audio Engineering Society and the MIDI Specification 1.0 was published in August 1983.

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. This despite the fact that the MIDI specification itself has nothing to do with the quality of the sound produced which varies depending on the sound card used.

MIDI is almost directly responsible for bringing an end to the "wall of synthesizers" phenomenon in 1970s-80s rock music concerts, when musical keyboard performers were sometimes hidden behind banks of various instruments. 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 sequencers, which can be used to record, edit and play back performances.

Synchronization 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.

A number of music file formats have been based on the MIDI bytestream. These formats are very compact; a file of only 10 kilobytes can produce a full minute of music.

Contents

The MIDI specification

Electrical connections

MIDI ports and cable.
Enlarge
MIDI ports and cable.

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 (simplex) 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 asymmetrical switching times (delays for switching on are different from the delays when switching off), they distort the signal (the zero to one relations). If several MIDI devices are connected 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 one-way connection (called a port) can transmit or receive standard musical messages, such as note-on, note-off, volume, pitch-bend and modulation signals. These signals are sent along with one of 16 channel identifiers. The channels are used to separate "voices" or "instruments", somewhat like tracks in a multi-track mixer.

The ability to multiplex 16 "channels" onto a single wire makes it possible to control several instruments at once using a single MIDI connection. When a MIDI instrument is capable of producing several independent sounds simultaneously (a multi-timbral instrument), MIDI channels are used to address these sections independently. (This should not be confused with "polyphonic"; the ability to play several notes simultaneously in the same "voice".)

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 with Registered Parameter Numbers), with precision of 1/8192 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 standardized across all instruments.

IN, OUT, THRU

Most MIDI-capable instruments feature a MIDI-IN, MIDI-OUT, and occasionally a MIDI-THRU connection in the form of five-pin DIN plugs. 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. This makes it possible to control several devices from a single source.

Daisy chaining of multiple devices on a single port can be accomplished using the MIDI-THRU port. This technique is generally limited to three devices in a row due to latency. The latency is caused by the fact that MIDI-IN ports are optically isolated. Instead of making a physical connection to pass electrical signals, the electrical signals arriving at the MIDI-IN port turn an LED on and off, which is read by a photo sensor. This physical break in the flow of electricity prevents the forming of ground loops. It also introduces a small amount of latency. Generally after travelling through 3 devices in a daisy chain, this latency beacomes noticeable.

Although nowadays most PC soundcards have the ability to terminate a MIDI connection (usually through a MIDI-IN/MIDI-OUT converter on the game port), the 1985 Atari ST was the first home computer to sport the original five-pin format — which made the ST a very popular platform for running MIDI sequencer software.

General MIDI

In MIDI, instruments (one per channel) are selected by number (0-127), using the Program Change message. However, the basic MIDI 1.0 specification did not specify what instrument sound (piano, tuba, etc.) corresponds to each number. This was intentional, as MIDI originated as a professional music protocol, and in that context it is typical for a performer to assemble a custom palette of instruments appropriate for their particular repertoire, rather than taking a least-common-denominator approach.

Eventually interest developed in adapting MIDI as a consumer format, and for computer multimedia applications. In this context, in order for MIDI file content to be portable, the instrument program numbers used must call up the same instrument sound on every player. General MIDI (GM) was an attempt by the MIDI Manufacturer's Association (MMA) to resolve this problem by standardizing an instrument program number map, so that for example Program Change 1 always results in a piano sound on all GM-compliant players. GM also specified the response to certain other MIDI messages in a more controlled manner than the MIDI 1.0 specification. The GM spec is maintained and published by the MIDI Manufacturer's Association (MMA).

From a musical perspective, GM has a mixed reputation, mainly because of small or large audible differences in corresponding instrument sounds across player implementations, the limited size of the instrument palette (128 instruments), its least-common denominator character, and the inability to add customized instruments to suit the needs of the particular piece. Yet the GM instrument set is still included in most MIDI instruments, and from a standardization perspective GM has proven durable.

Later, companies in Japan's Association for Musical Electronic Industry (sic) (AMEI) developed General MIDI Level 2 (GM2), incorporating aspects of the Yamaha XG and Roland GS formats, extending the instrument palette, specifying more message responses in detail, and defining new messages for custom tuning scales and more. The GM2 specs are maintained and published by the MMA and AMEI.

Later still, GM2 became the basis of Scalable Polyphony MIDI (SP-MIDI), a MIDI variant for mobile applications where different players may have different numbers of musical voices. SP-MIDI is a component of the 3GPP mobile phone terminal multimedia architecture, starting from release 5.

GM, GM2, and SP-MIDI are also the basis for selecting player-provided instruments in several of the MMA/AMEI XMF file formats (XMF Type 0, Type 1, and Mobile XMF), which allow extending the instrument palette with custom instruments in the Downloadable Sound (DLS) formats, addressing another major GM shortcoming.

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 consist of a status byte (channel number in the low 4 bits, and an opcode in the high 4 bits), 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 dense musical information or when many channels are particularly active. "Running status" is a convention that allows the status byte to be omitted if it would be the same as that of the previous message, helping to mitigate bandwidth issues somewhat.

MIDI file formats

MIDI messages (along with timing information) can be collected and stored in a computer file system, in what is commonly called a MIDI file, or more formally, a Standard MIDI File (SMF). The SMF specification was developed by, and is maintained by, the MIDI Manufacturers Association (MMA). MIDI files are typically created using desktop/laptop computer-based sequencing software (or sometimes a hardware-based MIDI instrument or workstation) that organizes MIDI messages into one or more parallel "tracks" for independent recording and editing. In most but not all sequencers, each track is assigned to a specific MIDI channel and/or a specific General MIDI instrument patch. Although most current MIDI sequencer software uses proprietary "session file" formats rather than SMF, almost all sequencers provide export or "Save As..." support for the SMF format.

An SMF consists of one header chunk and one or more track chunks. There are three SMF formats; the format is encoded in the file header. Format 0 contains a single track and represents a single song performance. Format 1 may contain any number of tracks, enabling preservation of the sequencer track structure, and also represents a single song performance. Format 2 may have any number of tracks, each representing a separate song performance. Format 2 is not commonly supported by sequencers nor commonly found in the wild.

Large collections of SMFs can be found on the web, most commonly with the extension .mid. These files are most frequently authored with the assumption that they will be played on General MIDI players, but not always. Occasional unintended bad-sounding playback is the result.

MIDI-Karaoke (which uses the ".kar" file extension) files are an "unofficial" extension of MIDI files, used to add synchronized lyrics to standard MIDI files. Most SMF players do not display these lyrics, however numerous .kar-specific players are available. These often display the lyrics synchronized with the music in "follow-the-bouncing-ball" fashion, essentially turning any PC into a Karaoke machine.

Note: ".kar" files can often be played by SMF players if the filename extension is changed to ".mid".

The MIDI Manufacturer's Association has now defined a new family of file formats, XMF (eXtensible Music File), some of which package SMF chunks with instrument data in DLS format (Downloadable Sounds, also an MMA specification), to much the same effect as MOD files. The XMF container is a binary format (not XML-based).

MIDI usage and applications

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.

In 1992 the MIDI Tuning Standard, or MTS, was ratified by the MIDI Manufacturers' Association. While support for this standard is not great, it is supported by some instruments and software; in particular the freeware program Timidity supports it. MTS uses three bytes, which can be thought of as a three-digit number base 128, to specify a pitch in logarithmic form. Use of MTS allows any midi file to be tuned in any way desired, something which can be accomplished using the freeware program Scala.

Beyond MIDI

The Open Sound Control or OSC protocol, devised by CNMAT, transcends some of MIDI's musical coding limitations, and is considered by some to be technically superior. OSC has been implemented in software like SuperCollider, Max/MSP and Csound, however at present few mainstream musical applications and no standalone instruments support OSC, making whole-studio interoperability problematic. It can run over ethernet connections. OSC is not owned by any private company, however it is also not maintained by any standards organization.

Yamaha has its mLAN standard, which is a variation on firewire [1] (http://www.yamaha.co.jp/tech/1394mLAN/english/) that carries multiple MIDI message channels and multiple audio channels. mLAN is a proprietary protocol.

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 any other device with a MIDI-IN port, providing that developers of both devices have the same understanding about the semantic meaning of all the transmitted MIDI messages. This agreement can come either because both follow the published MIDI specifications, or else because for non-standard functionality the message meanings are agreed upon by both manufacturers.

See also: mobile phone ringtone, sound font, Pulse-code modulation (PCM).

MIDI editors/sequencers

External links

Multimedia

fr:Musical Instrument Digital Interface it:Musical Instrument Digital Interface nl:MIDI ja:MIDI pl:MIDI ru:MIDI fi:MIDI sv:MIDI

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools