- Musical Instrument Digital Interface
MIDI (Musical Instrument Digital Interface, IPAEng|ˈmɪdi) is an industry-standard protocol that enables
electronic musical instruments, computers, and other equipment to communicate, control, and synchronize with each other. MIDI allows computers, synthesizers, MIDI controllers, sound cards, samplers and drum machines to control one another, and to exchange system data (acting as a raw data encapsulation method for sysexcommands).
MIDI does not transmit an audio signal or media — it transmits "event messages" such as the pitch and intensity of musical notes to play, control signals for parameters such as volume,
vibratoand panning, cues, and clock signals to set the tempo. As an electronic protocol, it is notable for its widespread adoption throughout the industry, and for continuing in use since its introduction in 1983.
The physical MIDI interface uses DIN 5/180° connectors. Logically, MIDI is based on a
ring networktopology, with a transceiverinside each device. The transceivers physically and logically separate the input and output lines, meaning that MIDI messages received by a device in the network not intended for that device will be re-transmitted on the output line (MIDI-OUT). This introduces a delay, one that is long enough to become audible on larger MIDI rings.
MIDI-THRU ports started to be added to MIDI-compatible equipment soon after the introduction of MIDI, in order to improve performance. The MIDI-THRU port avoids the aforementioned retransmission delay by linking the MIDI-THRU port to the MIDI-IN socket almost directly.The difference between the MIDI-OUT and MIDI-THRU ports is that data coming from the MIDI-OUT port has been generated on the device containing that port. Data that comes out of a device's MIDI-THRU port, however, is an exact duplicate of the data received at the MIDI-IN port.
Such chaining together of instruments via MIDI-THRU ports is unnecessary with the use of MIDI "patch bay," "mult" or "Thru" modules consisting of a MIDI-IN connector and multiple MIDI-OUT connectors to which multiple instruments are connected. Some equipment has the ability to merge MIDI messages into one stream, but this is a specialized function and is not universal to all equipment.
All MIDI compatible instruments have a built-in MIDI interface. Some computers' sound cards have a built-in MIDI Interface, whereas others require an external MIDI Interface which is connected to the computer via the
game port, the newer DA-15 connector, a USBconnector or by FireWireor ethernet.MIDI connectors are defined by the MIDI interface standard.
All MIDI compatible controllers, musical instruments, and MIDI-compatible software follow the same MIDI 1.0 specification, and thus interpret any given MIDI message the same way, and so can communicate with and understand each other. For example, if a note is played on a MIDI controller, it will sound at the right pitch on any MIDI instrument whose MIDI In connector is connected to the controller's MIDI Out connector.
When a musical performance is played on a MIDI instrument (or controller) it transmits "MIDI channel messages" from its MIDI Out connector. A typical MIDI channel message sequence corresponding to a key being struck and released on a keyboard is:
#The user presses the
middle Ckey with a specific "velocity" (which is usually translated into the volume of the note but can also be used by the synthesiser to set characteristics of the timbreas well). ---> The instrument sends one "Note-On" message.
#The user changes the pressure applied on the key while holding it down - a technique called "Aftertouch" (can be repeated, optional). ---> The instrument sends one or more Aftertouch messages.
#The user releases the middle C key, again with the possibility of velocity of release controlling some parameters. ---> The instrument sends one "Note-Off" message.
"Note-On", "Aftertouch", and "Note-Off" are all channel messages. For the Note-On and Note-Off messages, the MIDI specification defines a number (from 0–127) for every possible note pitch (C, Cmusic|#, D etc.), and this number is included in the message.
Other performance parameters can be transmitted with channel messages, too. For example, if the user turns the pitch wheel on the instrument, that gesture is transmitted over MIDI using a series of "Pitch Bend" messages (also a channel message). The musical instrument generates the messages autonomously; all the musician has to do is play the notes (or make some other gesture that produces MIDI messages). This consistent, automated abstraction of the musical gesture could be considered the core of the MIDI standard.
MIDI composition takes advantage of the MIDI interface to allow musical data files to be shared among various electronic instruments by using a standard list of commands and parameters known as
General MIDI(GM). Because the music is simply data and not actually recorded wave forms, it is therefore maintained in a small file format. Several computer programs allow manipulation of the data so that composing for an entire orchestraof synthesized instrument sounds is possible. The data can be reproduced by any electronic instrument that adheres to the GM standard. There are many websites that allow downloads of popular songs as well as classical music, and there are also websites where MIDI composers can share their works.
MIDI music was much more viable back before broadband internet was available to the masses, due to its small file size. Also, the advent of high quality audio compression such as the
MP3format decreased the utility of MIDI music.
tandard MIDI File (SMF) Format
MIDI messages (along with timing information) can be collected and stored in a
computer filesystem, 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 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 sequencers, each track is assigned to a specific MIDI channel and/or a specific General MIDIinstrument "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 exist three different SMF formats; the format of a given SMF is specified in its file header. A Format 0 file 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. Sequencers do not commonly support Format 2.
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
MIDI Karaoke File (.KAR) Format
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. SMF players play the music as they would a .mid file but do not display these lyrics unless they have specific support for .kar messages. These often display the lyrics synchronized with the music in "follow-the-bouncing-ball" fashion, essentially turning any PC into a
MIDI-Karaoke file formats are not maintained by any standardization body.
XMF File Formats
The MMA has also defined (and AMEI has approved) 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/AMEI specification), to much the same effect as the MOD file format. The XMF container is a binary format (not XML-based, although the file extensions are similar). See the main article Extensible Music Format (XMF).
RIFF-RMID File Format
Microsoft Windows, the system itself uses RIFF-based MIDI files with the ".rmi" extension. Note, Standard MIDI Files are not RIFF-compliant. A RIFF-RMID file, however, is simply a Standard MIDI File wrapped in a RIFF chunk. By extracting the data part of the RIFF-RMID chunk, the result will be a regular Standard MIDI File.
In recommended practice RP-29 ( [http://www.midi.org/about-midi/rp29spec(rmid).pdf] ), the MMA defined a method for bundling one Standard MIDI file (SMF) image with one Downloadable Sounds (DLS) image, however, this method was obsoleted by the introduction of the
Extensible Music Format (XMF), which should be used for this purpose.
Usage and applications
Extensions of the MIDI standard
Many extensions of the original official MIDI 1.0 spec have been standardized by MMA/AMEI. Only a few of them are described here; for more comprehensive information, see the MMA web site.
General MIDI(hereafter referred to as "GM") standard addresses the indeterminacy of the MIDI standard regarding the meaning of program change and controller messages and other synthesizer features: early synthesizers could, and actually did, sound completely different in response to the same MIDI messages and required different controller messages for similar purposes.The GM standard mandates an assignment of specific instruments to program change settings (for example, 3 is "Grand Piano"), the mapping of several controller numbers to important effects, use of channel 10 for percussions (a specific unpitched sound in place of each note), and various minimum specifications.Currently, only very old, very low-end or very specialized synthesizers do not implement the General MIDI standard or one of its successors; General MIDI compatibility is almost universal for music distributed in SMF formats, which relies on this standard for portability.Although dependent on the basic MIDI 1.0 specification, the GM and GM2 specifications are each separate from it. As such, it is not generally safe to assume that any given MIDI message stream or MIDI file is intended to drive GM-compliant or GM2-compliant MIDI instruments. General Midi 1 was introduced in 1991.
GS and XG
To improve the General MIDI Standard and match the improvements of newer synthesizers both Roland, with its GS specification, and Yamaha, with its XG specification, introduced stricter requirements while maintaining compatibility with GM commands. Adoption of these two standards has been generally limited to the respective manufacturer.
General MIDI Level 2
Later, companies in Japan's Association of Musical Electronics Industry (sic) (AMEI) developed General MIDI Level 2 (
GM2), incorporating aspects of the Yamaha XG and Roland GS formats, further 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.General MIDI 2 was introduced in 1999 and it is commonly implemented in newer synthesizers.
Later still, GM2 became the basis of the instrument selection mechanism in 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.
By convention, instruments that receive MIDI generally use the conventional 12-pitch per octave equal temperament tuning system. Unfortunately this tuning system makes many types of music inaccessible because they depend on different intonation systems. To address this issue in a standardised manner, in 1992 the MMA ratified the
MIDI Tuning Standard, or MTS. This standard allows MIDI instruments that support MTS to be tuned in any way desired, through the use of a MIDI Non-Real Time System Exclusive message.
MTS uses three bytes, which can be thought of as a three-digit number base 128, to specify a pitch in logarithmic form. The following formula gives the value "p" encoding a given frequency "f": :
For a note in A440 equal temperament, this formula delivers the standard MIDI note number. Any other frequencies fill the space evenly.While support for MTS is not particularly widespread in commercial hardware instruments, it is nonetheless supported by some instruments and software, for example the
free softwareprograms TiMidityand Scala, as well as other microtuners.
Alternate Hardware Transports
In addition to the original 31.25 kBaud current-loop, 5-pin DIN transport, transmission of MIDI streams over USB, IEEE 1394 a.k.a
FireWire, and Ethernetis now common (see below).
Compared to USB or FireWire, the
Ethernetimplementation of MIDI provides network routing capabilities, which are extremely useful in studio or stage environments (USB and FireWire are restricted to connections between one computer and some devices and do not provide any routing capabilities).
Ethernet is moreover capable of providing the high-bandwidth channel that earlier alternatives to MIDI (such as
ZIPI) were intended to bring.
After the initial fight between different protocols (IEEE-P1639, MIDI-LAN, IETF RTP-MIDI), it appears that IETF's RTP MIDI specification for transport of MIDI streams over
Ethernetand Internetis now spreading faster and faster since more and more manufacturers are integrating RTP-MIDI in their products (Apple, CME, Kiss-Box, etc...). Mac OS X, Windows and Linux drivers are also available to make RTP MIDI devices appear as standard MIDI devices within these operating systems.
IEEE-P1639 is now a dead project. The other proprietary MIDI/IP protocols are slowly disappearing one after the other, since most of them require expensive licensing to be implemented (while RTP MIDI is completely opened) or the MIDI implementation does not bring any real advantage (apart from speed) over original MIDI protocol.
RTP-MIDI Transport Protocol
The RTP-MIDI protocol has been officially released in public domain by
IETFin December 2006 (IETF RFC4695). [ [http://www.rfc-editor.org/rfc/rfc4695.txt IETF RTP-MIDI specification] ] RTP-MIDI relies on the well-known RTP (Real Time Protocol) layer (most often running over UDP, but compatible with TCP also), widely used for real-time audio and video streaming over networks. The RTP layer is easy to implement and requires very little power from the microprocessor, while providing very useful information to the receiver (network latency, dropped packet detection, reordered packets, etc.). RTP-MIDI defines a specific payload type, that allows the receiver to identify MIDI streams.
RTP-MIDI does not alter the MIDI messages in any way (all messages defined in the MIDI norm are transported transparently over the network), but it adds additional features such as timestamping and
sysexfragmentation. RTP-MIDI also adds a powerful 'journalling' mechanism that allows the receiver to detect and correct dropped MIDI messages.The first part of RTP-MIDI specification is mandatory for implementors and describes how MIDI messages are encapsulated within the RTP telegram. It also describes how the journalling system works. The journalling system is not mandatory (journalling is not very useful for LAN applications, but it is very important for WAN applications).
The second part of RTP-MIDI specification describes the session control mechanisms that allow multiple stations to synchronize across the network to exchange RTP-MIDI telegrams. This part is informational only, and it is not required.
RTP-MIDI is included in Apple's
Mac OS X, as standard MIDI ports (the RTP-MIDI ports appear in Macintosh applications as any other USB or FireWire port. Thus, any MIDI application running on Mac OS X is able to use the RTP-MIDI capabilities in a transparent way). However, Apple's developers considered the session control protocol described in IETF's specification to be too complex, and they created their own session control protocol. Since the session protocol uses a UDP port different from the main RTP-MIDI stream port, the two protocols do not interfere (so the RTP-MIDI implementation in Mac OS X fully complies to the IETF specification).
Apple's implementation has been used as reference by other MIDI manufacturers. A Windows XP RTP-MIDI driver [ [http://www.kiss-box.com Windows XP RTP-MIDI driver download] ] for their own products only has been released by the Dutch company
Kiss-Boxand a Linux implementation is currently under development by the Grameassociation. [ [http://www.grame.fr Grame's website] ] So it seems probable that the Apple's implementation will become the "de-facto" standard (and could even become the MMA reference implementation).
MIDI is also used as a control protocol in applications other than music, including:
recording system synchronization
audio processor control
*computer networking, as demonstrated by the early
first-person shootergame " MIDI Maze", 1987
*animatronic figure control
*animation parameter control, as demonstrated by
Apple Motionv2Such non-musical applications of MIDI are possible because any device built with a standard MIDI Out connector should in theory be able to control any other device with a MIDI In port, just as long as the developers of both devices have the same understanding about the semantic meaning of all the MIDI messages the sending device emits. This agreement can come either because both follow the published MIDI specifications, or else in the case of any non-standard functionality, because the message meanings are agreed upon by the two manufacturers.
Beyond MIDI 1.0
Although traditional MIDI connections work well for most purposes, a number of newer message protocols and hardware transports have been proposed over the years to try to take the idea to the next level. Some of the more notable efforts include:
Open Sound Control(OSC) protocol was at CNMAT. OSC has been implemented in the well-known software synthesizer Reaktorand in other projects including SuperCollider, Pure Data, Isadora, Max/MSP, Csound, vvvvand ChucK. The Lemur Input Device, a customizable touch panel with MIDI controller-type functions, also uses OSC. OSC differs from MIDI over traditional 5-pin DIN in that it can run at broadband speeds when sent over Ethernetconnections. Unfortunately few mainstream musical applications and no standalone instruments support the protocol so far, making whole-studio interoperability problematic. OSC is not owned by any private company, however it is also not maintained by any standards organization. Since September 2007, there is a proposal for a [http://stud3.tuwien.ac.at/~e0725639/OSC-SYN.txt standardized namespace within OSC] for communication between and controllers, synthesizers and hosts.
Yamaha has its
mLAN[http://www.yamaha.co.jp/tech/1394mLAN/english/] protocol, which is a based on the IEEE 1394transport (also known as FireWire) and carries multiple MIDI message channels and multiple audio channels. mLAN is not maintained by a standards organization as it is a proprietary protocol. mLAN is open for licensing, although covered by patents owned by Yamaha.
Development of a major modernization of MIDI is now under discussion in the MMA. Tentatively called "HD Protocol", this new standard would support modern high-speed transports, provide greater range and/or resolution in data values, increase the number of Channels, and support the future introduction of entirely new kinds of messages. Representatives from all sizes and types of companies are involved, from the smallest speciality show control operations to the largest musical equipment manufacturers. No technical details or projected completion dates have been announced. [ [http://www.midi.org/newsviews/hdmidipr2.shtml MMA Hosts HD-MIDI Discussion at NAMM] , MIDI Manufacturers Association.] [ [http://blogs.oreilly.com/digitalmedia/2005/10/finally-midi-20.html Finally: MIDI 2.0] , O'Reilly Digital Media Blog.]
It has been proposed that ACN be used as the sole or primary transport for HD-MIDI.
Studio Connections [http://www.studioconnections.org/concept/index.html] is a joint project lead by Steinberg and Yamaha. There is now a situation which demands a closer integration between software and hardware in a music production system. The aim of Studio Connections is quite simply to offer a more convenient environment that will make using hardware and software easier. There has always the need for users to endure setting up parameters between the hardware and software separately. But now at last with Studio Connections there is the ability for Total Recall, a seamless solution where setup and recall issues are now a thing of the past, and where users can operate the hardware as if it were a plug-in within their software. In order to encourage further developments and to expand the possibilities of Studio Connections, there is now available the (SDK) development tools. Developed solutions a re also offered to the industry, in order to further support an easy to use computer music system.
Example MIDI files
List of MIDI editors and sequencers
Comparison of MIDI standards
* (under construction).
Karaokeand midi *.kar files.
LRC (file format)
The MIDI 1.0 Protocol
MIDI Machine Control
MIDI Show Control
MIDI usage and applications
Pitch to MIDI
Official MIDI Standards Organizations
* [http://www.midi.org/ MIDI Manufacturers Association] (MMA) – Source for English-language MIDI specs
* [http://www.amei.or.jp/index_e.html Association of Musical Electronics Industry] (AMEI) – Source for Japanese-language MIDI specs
* [http://www.midisamples.com: Keyfax - the first makers of MIDI loops for music production - Twiddly.Bits]
* [http://www.midi.com MIDI.COM: The original MIDI portal for the web]
* [http://www.buongiornoweb.com/music_zone/basi_karaoke_gratis/index_basi_midi_e_karaoke_gratis.htm Software and midi bases of world music]
* [http://largonet.net/midiboutique/sales/gallery/gallery.html An extensive MIDI projects gallery from MIDIBOUTIQUE.com]
* [http://www.aboutmidi.com A guide for composers using MIDI software, technical information about MIDI]
* [http://hinton-instruments.co.uk/reference/midi/protocol/index.htm Hinton Instruments' MIDI Protocol Guide]
* [http://hinton-instruments.co.uk/reference/midi/promidi/index.htm Hinton Instruments' Professional MIDI Guide]
* [http://www.richmondsounddesign.com/txt/mscspec.txt The MIDI Show Control (MSC) standard]
* [http://www.tweakheadz.com/how_to_get_started_with_midi.html TWEAKHEADZ Labs Introduction to Midi]
* [http://www.chrisbsmusic.com/howmidiworks.html How MIDI Works]
* [http://www.richmondsounddesign.com/faq.html#midilen MIDI Cable Length limitations]
* [http://www.webdoodles.org/pages/playingmidis.htm Help with playing MIDI files found on web pages.]
* [http://gospelmidi.blogspot.com/2008/03/essential-vanbascos-karaoke-player.html Help learning MIDI files found on web pages.]
* [http://pinouts.ru/DevicesCables/pc2midicable_pinout.shtml Scheme of PC MIDI cable]
* [http://www.saxmusicplus.com/articles-reviews/Music-Technology/Articles/MIDI-controllers/midi-controllers.htm MIDI controllers come in all shapes and sizes. Music Tech author Keith Gemmell explains how they work.]
* [http://recording.songstuff.com/articles.php?selected=55 Songstuff Midi - Midi Message Format]
* [http://www.skytopia.com/project/articles/midi.html Crash Course in MIDI format]
* [http://www.kuhmann.com/Yamaha.htm Disklavier World] Public Domain MIDI-music in FIL (e-SEQ format) for YAMAHA Disklavier pianos ~ live performances!
* [http://vmm.audionetwork.be Virtual MIDI Machine - VMM is a c-like multithreading language that allows a composer to write low-level MIDI algorithms]
* [http://www.sengpielaudio.com/calculator-notenames.htm MIDI keyboard, frequencies, note names, numbers and Note systems]
* [http://www.practicalpc.co.uk/computing/sound/miditop5.htm midi troubleshooting]
* [http://www.butkaj.com/midi?id_menu=750 MIDI Tutorials, Guides, Tunings, Examples, MIDI Samples and Latest News]
* [http://www.circuitsarchive.org/index.php/Category:MIDI MIDI Electronic Circuits]
*WikiAudio's [http://wiki.wikiaudio.org/MIDI_Implementation_Chart_Simplified Simplified MIDI "Everything" Chart]
Wikimedia Foundation. 2010.