You are on page 1of 15

MIDI

MIDI (Musical Instrument Digital Interface) is an industry-standard protocol that enables electronic musical instruments (synthesizers, drum machines), computers and other electronic equipment (MIDI controllers, sound cards, samplers) to communicate and synchronize with each other. Unlike analog devices, MIDI does not transmit an audio signal: it sends event messages about musical notation, pitch and intensity, control signals for parameters such as volume, vibrato and panning, cues, and clock signals to set the tempo. As an electronic protocol, it is notable for its widespread adoption throughout the music industry. MIDI protocol was defined in 1982. 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. MIDI composition and arrangement takes advantage of MIDI 1.0 and General MIDI (GM) technology to allow musical data files to be shared among many different devices due to some incompatibility with various electronic instruments by using a standard, portable set of commands and parameters. Because the music is stored as instructions rather than recorded audio waveforms, the data size of the files is quite small by comparison.

History
In the late seventies, Dave Smith was working on a polyphonic analog synthesizer which was to become the Prophet 5. Early analog synthesizers could only play one note or "voice" at a time. The keyboard had a single voltage output,

and controlled the sound directly, as did each knob, switch and other control on the instrument. Dave's innovative idea was to create an instrument with multiple identical soundproducing engines ("voices") and make all the parameters of the voices digitally controllable. Now, when the player turned a knob on the front panel, instead of the knob being part of and directly controlling some element of the signal path, its setting would be digitized, and the same parameter could be simultaneously affected on all of the voices. And, instead of having the keyboard control a single note, a microprocessor was used that would rapidly and continuously scan all of the keys to detect which ones were currently pressed, and convert that information to a pitch control that would be assigned to the next available voice. In this manner, the musician playing the instrument would experience it as if the keyboard and all of the knobs and other controls were directly controlling a multivoice instrument. This innovation meant two very important things: since all of the controls were digitized, their settings could be remembered, and the synthesizer could be provided a memory wherein "patches" could be stored and instantly recalled. More significantly, it abstracted the keyboard, knobs, pedals, and other controls away from the sound-producing circuitry and made it necessary to develop a protocol for communication between the former and the latter. Dave Smith had the insight that the data connection could be made accessible with input and output jacks on the instrument, and, if the protocol were standardized between manufacturers, would provide a means for a myriad of instruments and other devices to interoperate, controlling and being controlled by each other at the digital level. Thus, MIDI was born.

Following several months of discussion between US and Japanese manufacturers, in November 1981, audio engineer and synthesizer designer Dave Smith of Sequential Circuits, Inc. proposed a digital standard for musical instruments at the Audio Engineering Society show in New York. By the time of the January, 1983 Winter NAMM Show, Smith was able to demonstrate a MIDI connection between his Prophet 600 (a later version of the groundbreaking Prophet 5 analog synthesizer) and a Roland JP-6. The MIDI Specification 1.0 was published in August 1983. MIDI brought an unprecedented state of compatibility which revolutionized the market by ridding musicians of the need for excessive hardware. In the early 1980s, MIDI was a major factor in bringing an end to the "wall of synthesizers" phenomenon in progressive rock band concerts, when keyboard performers were often hidden behind huge banks of analog synthesizers and electric pianos. Following the advent of MIDI, many synthesizers were released in rack-mount versions, which meant that keyboardists could control many different instruments (e.g., synthesizers) from a single keyboard. In the 1980s, MIDI facilitated the development of hardware and computer-based sequencers, which can be used to record, edit and playback performances. In the years immediately after the 1983 ratification of the MIDI specification, MIDI features were adapted to several early computer platforms including Apple II Plus and IIe, Apple Macintosh, Commodore 64, Commodore Amiga and PCDOS. This allowed the development of a market for powerful, inexpensive, and now-widespread computer-based MIDI sequencers. The standard Atari ST came equipped with MIDI ports and was commonly used in recording studios for this reason. In 1991, the MIDI Show Control (MSC) protocol (in the Real Time System Exclusive subset) was ratified by the MIDI Manufacturers Association.

The MSC protocol is an industry standard which allows all types of media control devices to talk with each other and with computers to perform show control functions in live and canned entertainment applications. Just like musical MIDI, MSC does not transmit the actual show media: it simply transmits digital data providing information such as the type, timing and numbering of technical cues called during a multimedia or live theatre performance. Small file sizes made MIDI files a popular way of sharing music on the Internet in the early to mid 1990s, before broadband connections made it practical to share files in the MP3 format. MIDI initially made no provision for specifying timbre. In other words, each MIDI synthesizer had its own methods for producing the sound from MIDI instructions, with no standard sounds at all. For example, a producer might want a MIDI file played back through the Microsoft MIDI Synthesizer (included in any Windows operating system) to sound the same or similar on all machines. But because the quality of synthesis hardware might vary widely between machinesone might use a generic sound card, another might use professional-quality synthesis there was no way to assure that what the listener heard was anything like what the producer intended. This situation was the impetus for the introduction of General MIDI in 1991. It created a standard set of 128 familiar sound types (piano, organ, guitar, strings). While manufacturers were still unable to decide what 'piano' sounded like, they at least had a standard to aim for and a location in which to place it. In the early decades of MIDI, computer hardware was not able to play many samples or synthesize quality sounds. Quality hardware was too expensive; sound cards kept the price down, but many relied on unsophisticated synthesis methods to produce audio. As a result "the "MIDI sound" acquired a poor

reputation with some critics.

Interfaces

MIDI connector diagram

MIDI connectors and a MIDI cable

The original physical MIDI connection uses a 5 pin connection. The MIDI 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 must be re-transmitted on the output line (MIDI-OUT) by means of a "soft through". This can introduce a delay, one that is long enough to become musically significant on larger MIDI chains. 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 MIDIIN 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; this is a specialized function and is not universal to all equipment. Such MIDI Merge boxes digitally merge all MIDI messages appearing at its inputs to its output, which allows a musician to plug in several MIDI controllers (e.g., two musical keyboards and a pedal keyboard) to a single synth voice device such as an EMU or Proteus. All MIDI compatible instruments have built-in MIDI. Some computers' sound cards have built-in MIDI, whereas others require an external MIDI connection. MIDI connectors are defined by the MIDI standard. In the 2000s, as computer equipment increasingly used USB connectors, companies began making USBto-MIDI data interfaces which can transfer MIDI channels to USB-equipped computers. As well, due to the increasing use of computers for music-making and composition, some MIDI keyboard controllers were equipped with USB jacks, so that they can be plugged into computers that are running "software synths" or other music software.

Controllers
In popular parlance, piano-style musical keyboards are called "keyboards", regardless of their functions or type. Amongst MIDI enthusiasts, however, keyboards and other devices used to trigger musical sounds are

called "controllers", because with most MIDI set-ups, the keyboard or other device does not make any sounds by itself. MIDI controllers need to be connected to a voice bank or sound module in order to produce musical tones or sounds; the keyboard or other device is "controlling" the voice bank or sound module by acting as a trigger. The most common MIDI controller is the pianostyle keyboard, either with weighted or semi-weighted keys, or with unweighted synth-style keys. Keyboard-style MIDI controllers are sold with as few as 25 keys (2 octaves), with larger models such as 49 keys, 61 keys, or even the full 88 keys being available. Different models have different feature sets, the simplest being only keys, while the more extravagant have sliders, knobs, and wheels to provide more controlling options. These include a variety of parameters that can be programmed within the controller, or sent to a computer to control software. MIDI controllers are also available in a range of other forms, such as electronic drum triggers, EWI wind controllers for performing saxophone-style music; and MIDI guitar synthesizer controllers. Pad controllers are used by musicians and DJs who make music through use of sampled sounds or short samples of music. Pad controllers often have banks of assignable pads and assignable faders and knobs for transmitting MIDI data or changes; the better-quality models are velocity-sensitive. More rarely, some performers use more specialized MIDI controllers, such as triggers that are affixed to their clothing or stage items (e.g., magicians Penn and Teller's stage show). A MIDI foot-controller is a pedalboard-style device with rows of switches that control banks of presets, MIDI program change commands and send MIDI note numbers (some also do MIDI merges).

Messages
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: 1. The user presses the middle C key with a specific velocity (which is usually translated into the volume of the note but can also be used by the synthesizer to set characteristics of the timbre as well). The instrument sends one Note-On message. 2. 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. 3. 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 0127) for every possible note pitch (C, C, 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). This consistent, automated abstraction of the musical gesture could be considered the core of the MIDI standard.

Composition
MIDI composition and arrangement typically takes place using either MIDI sequencing/editing software on PC-type computers, or using specialized hardware music workstations.Digital Audio Workstations (DAW) is the most centric and common tool in the studio, and many are specifically designed to work with MIDI as an integral component. Through the use of MIDI mapping, various MIDI controllers can be used to command the program. Virtual Instruments known as VSTi's are plug-ins created by third party companies which provide a virtually limitless supply of sounds for a musician, and are designed to be commanded by MIDI controllers, especially in the DAW environment. The data composed via the sequenced MIDI recordings can then be saved as a Standard MIDI File (SMF), digitally distributed, and reproduced by any computer or electronic instrument that also adheres to the same MIDI, GM, and SMF standards.

File formats
Standard MIDI (.mid or .smf) Standard 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 instrument patch; if the attached music synthesizer has a known instrument palette (for example because it conforms to the General MIDI standard), then the instrument for each track may be selected by name. 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.

Alternative hardware transports


In addition to the original midi cable and connector, other connectors have been used for the same electrical data, and transmission of MIDI streams in different forms over USB, FireWire, and Ethernet.

USB
A standard for MIDI over USB was developed in 1999. To transmit MIDI over USB a Cable Number and Cable Index are added to the message, and the result is encapsulated in a USB packet. The resulting USB message can be double the size of the native MIDI message. Since USB is over 15,000 times faster than MIDI (480,000 Kbits/sec vs 31.25 Kbits/sec,) USB has the potential to be much faster. However, due to the nature of USB there is more latency and jitter introduced. Some comparisons done in the early part of the 2000s showed USB to slightly slower with higher latency, and this is still the case today. Despite the latency and jitter disadvantages, MIDI over USB is increasingly common on musical instruments.

Over a computer network

Compared to USB or FireWire, the computer network implementation of MIDI provides network routing capabilities, which are extremely useful in studio or stage environments (USB and FireWire are more restrictive in the connections between computers and devices). Ethernet is more capable of providing the highbandwidth channel that earlier alternatives to MIDI were intended to bring.

MIDI Continuous Controllers


A MIDI continuous controller command consists of the MIDI controller command followed by two data bytes that specify the controller number and the controller's value: 0xb0 | channel = MIDI continuous controller command 0 .. 127 0 .. 127 = MIDI continuous controller number = MIDI continuous controller value

Controller Number Hex Dec Controller Name Data Range

0 Bank Select (coarse) 1 Modulation Wheel (coarse) 2 Breath Control (coarse) 3 Continuous controller #3 4 Foot Controller (coarse) 5 Portamento Time (coarse) 6 Data Entry Slider (coarse) 7 Main Volume (coarse) 8 Stereo Balance (coarse) 9 Continuous controller #9 10 Pan (coarse) 11 Expression (sub-Volume) (coarse)

0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0=left 64=center 127=righ 0..127

12 Effect Control 1 (coarse) 13 Effect Control 2 (coarse) 14 Continuous controller #14 15 Continuous controller #15 16 General Purpose Slider 1 17 General Purpose Slider 2 18 General Purpose Slider 3 19 General Purpose Slider 4 20 Continuous controller #20 21 Continuous controller #21 22 Continuous controller #22 23 Continuous controller #23 24 Continuous controller #24 25 Continuous controller #25 26 Continuous controller #26 27 Continuous controller #27 28 Continuous controller #28 29 Continuous controller #29 30 Continuous controller #30 31 Continuous controller #31 32 Bank Select (fine) 33 Modulation Wheel (fine) 34 Breath Control (fine) 35 Continuous controller #3 (fine) 36 Foot Controller (fine) 37 Portamento Time (fine) 38 Data Entry Slider (fine) 39 Main Volume (fine) 40 Stereo Balance (fine) 41 Continuous controller #9 (fine)

0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 usually ignored 0..127 0..127 0..127 0..127 0..127 0..127 0..127 usually ignored 0..127 0..127

42 Pan (fine) 43 Expression (sub-Volume) (fine) 44 Effect Control 1 (fine) 45 Effect Control 2 (fine) 46 Continuous controller #14 (fine) 47 Continuous controller #15 (fine) 48 Continuous controller #16 49 Continuous controller #17 50 Continuous controller #18 51 Continuous controller #19 52 Continuous controller #20 (fine) 53 Continuous controller #21 (fine) 54 Continuous controller #22 (fine) 55 Continuous controller #23 (fine) 56 Continuous controller #24 (fine) 57 Continuous controller #25 (fine) 58 Continuous controller #26 (fine) 59 Continuous controller #27 (fine) 60 Continuous controller #28 (fine) 61 Continuous controller #29 (fine) 62 Continuous controller #30 (fine) 63 Continuous controller #31 (fine) 64 Hold pedal (Sustain) on/off 65 Portamento on/off 66 Sustenuto Pedal on/off 67 Soft Pedal on/off 68 Legato Pedal on/off 69 Hold Pedal 2 on/off 70 Sound Variation 71 Sound Timbre

0..127 usually ignored 0..127 usually ignored 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..127 0..127

72 Sound Release Time 73 Sound Attack Time 74 Sound Brighness 75 Sound Control 6 76 Sound Control 7 77 Sound Control 8 78 Sound Control 9 79 Sound Control 10 80 General Purpose Button 81 General Purpose Button 82 General Purpose Button 83 General Purpose Button 84 Undefined on/off 85 Undefined on/off 86 Undefined on/off 87 Undefined on/off 88 Undefined on/off 89 Undefined on/off 90 Undefined on/off 91 Effects Level 92 Tremulo Level 93 Chorus Level 94 Celeste (Detune) Level 95 Phaser Level 96 Data entry +1 97 Data entry -1 98 Non-Registered Parameter (coarse) 99 Non-Registered Parameter (fine) 100 Registered Parameter (coarse) 101 Registered Parameter (fine)

0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..127 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..63=off 64..127=on 0..127 0..127 0..127 0..127 0..127 ignored ignored 0..127 0..127 0..127 0..127

102 Undefined 103 Undefined 104 Undefined 105 Undefined 106 Undefined 107 Undefined 108 Undefined 109 Undefined 110 Undefined 111 Undefined 112 Undefined 113 Undefined 114 Undefined 115 Undefined 116 Undefined 117 Undefined 118 Undefined 119 Undefined 120 All Sound Off 121 All Controllers Off 122 Local Keyboard On/Off 123 All Notes Off 124 Omni Mode Off 125 Omni Mode On 126 Monophonic Mode On 127 Polyphonic Mode On (mono=off)

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ignored ignored 0..63=off 64..127=on ignored ignored ignored ** ignored

You might also like