MIDI (Musical Instrument Digital Interface) is a digital, non-proprietary hardware and software protocol for data communications among electronic musical instruments and computers.
MIDI data describes many aspects of a musical performance. For example, the note "middle C" is assigned the number 60 in a range of notes from 0-127. When a key is struck on a keyboard, the speed with which it moves from top to bottom and bottom to top is recorded as a velocity with a range of 0-127. The duration of the note and other attributes are also assigned numerical values. These values are used to define each MIDI event and a sequence of MIDI events can be recorded and played back using computer software. The actual sound is generated by a synthesizer receiving the MIDI data. A common analogy is the player piano. The piano roll contains a description of the musical performance which is transmitted to the player piano through a mechanical process. The actual sound is created by the piano not the piano roll. Similarly, MIDI data produces no sound by itself. Instead MIDI data, like the piano roll, contains a description of the musical performance which, when received by a synthesizer, can be rendered as sound.
The MIDI 1.0 specification was developed in 1983 by a consortium of hardware and software manufacturers responding to a proposal by Dave Smith of Sequential Circuits. Mr. Smith was reflecting the expressed needs of electronic music performers who desired a standard method for controlling electronic instruments made by different manufacturers. For example, a rock musician would typically have several keyboards onstage to use the unique sounds or each. Moving among these keyboards created logistical difficulties in performance. After the advent of MIDI it became possible to package the sounds of each keyboard into a small sound module. Performers would then control the sounds of multiple sound modules using one master keyboard connected to the modules with MIDI cables.
In 1988 the Standard MIDI File specification was created to allow files created by one MIDI software application to be used by other software applications. This standard has allowed hobbyists and professionals alike to more easily share their work with others, especially over the internet.
In 1991 the General MIDI Standard version 1.0 (GM1) was developed by the MIDI Manufacturers Association (MMA at http://www.midi.org) with a standard bank of 128 timbres divided into 16 timbre families as well as a set of 47 percussion sounds accessible on channel 10. This standard has become extremely popular because it allows Standard MIDI Files to be distributed and played with the original timbre choices on any General MIDI device. In addition to a standard sound bank, the General MIDI Standard ensures that all General MIDI devices will be at least 24 note polyphonic, 16-part multi-timbral, velocity sensitive, respond to all 16 MIDI channels, respond to channel pressure and pitch bend, and support controllers 1, 7, 10, 11, 64, 121 and 123. Instruments being developed today conform to the GM2 standard which increases polyphony to 32 notes and adds support for more universal system exclusive messages. All GM2 instruments are completely backward compatible with GM1 and are able to accurately process files created with the GM1 standard. The GM2 standard incorporates many of the features of the Roland GS standard such as support for reverb and chorus effects (controllers 91 and 93).
The MIDI specification describes a software language for describing a musical performance. A musical performance is described as a series of MIDI Events such as Note On, Note Off, Sustain Pedal, Volume changes, etc. The specification also defines the specific hardware needed to transmit MIDI performance data from one device to another. The MIDI cable is a five-pin connector. One of the pins transmits a constant 5-volt electrical signal. A second pin transmits binary data by using a five-volt signal to represent a "1" and no signal to represent a "0". A third pin is used as an electrical ground. The remaining two pins currently have no function but were included to provide for future enhancements to the specification. Because only one pin is transmitting binary data, the bits flow in series. Serial communications is slower than parallel but more than fast enough for musical applications. Each MIDI word consists of 10 bits (one 8-bit byte with a start bit before and after) and 3125 words can be transmitted per second for a data communications rate of 31,250 bits per second.
A MIDI cable (male) plugs into a MIDI port (female). MIDI devices have ports labeled IN, OUT, and THRU. Some devices, like silent controller keyboards only have an OUT port because they are used to transmit information only. Other devices like simple sound modules may have IN and THRU ports but lack an OUT port because they are used to receive information only. Typical synthesizer keyboards, however, have IN, OUT, and THRU ports. All MIDI data is received at the IN port. All MIDI data is transmitted out the OUT port. Any MIDI data received at the IN port of given MIDI device is also available to any other device connected to the first device's THRU port.
5-pin MIDI Cable
Data Flow Through MIDI Ports
In setup number 1 a computer with a MIDI Interface is connected to an integrated MIDI device using two MIDI cables.
In setup number 2 a computer with a MIDI
Interface is connected to an integrated MIDI device using two MIDI
cables.
A sound module is also connected via the THRU port of the
integrated MIDI device.
Daisy-chaining is especially convenient for small MIDI studios but
chaining more than a few devices together can lead to timing
errors.
In setup number 3 a computer with a MIDI
Interface is connected to an integrated MIDI device using two MIDI
cables.
A sound module is then connected via the second OUT port of the
MIDI Interface.
Using a MIDI Interface with multiple OUTs prevents timing errors
associated with daisy-chaining multiple devices.
MIDI data is transmitted and received on "channels". The MIDI specification allows for 16 MIDI channels through which MIDI data can be sent and received. Each byte of data is classified as either a status byte or a data byte. Status bytes begin with a 1 and data bytes begin with a 0. That leaves 7 bits remaining to represent a value in each byte. 7 bits can represent 128 values (2 to the 7th power) which is why so many MIDI messages have data values ranging from 0 to 127 (128 total values). A status byte describes the type of data that will follow. For example, a typical status byte is the NOTE ON message on a given channel. This status byte is then followed by two data bytes. The first data byte is the note number and the second data byte is the velocity (how quickly the key goes from top to bottom). Velocity messages are most often used to control the attack volume of individual note. A typical MIDI data communication might look like the table below.
Status Byte (Note ON message sent to MIDI Channel 1) | Data Byte (note number) |
Data Byte (note velocity) |
|
Binary | 10010000 | 00111110 | 01100100 |
Decimal Equivalent | The first nybble (4 bits) specifies the NOTE ON message. The second nybble specifies the channel. The 16 MIDI channels are represented as 0 to 15 in binary (0000 is channel 1). |
62 (D above Middle C) |
100 (mezzo forte) |
The number of data bytes which follows a status byte will vary depending on the nature of the status byte. For example, a program change status byte is sent to a MIDI device to instruct it to use a different instrumental timbre. That status byte is followed by only one data byte which specifies the number of the timbre (0 - 127) to be selected.
Status Byte (Program Change message sent to MIDI Channel 2) | Data Byte (Program no.) |
|
Binary | 11000001 | 00001011 |
Decimal Equivalent | The first nybble (4 bits) specifies the Program Change
message. The second nybble specifies the channel. The 16 MIDI channels are represented as 0 to 15 in binary (0001 is channel 2). |
11 (Vibraphone) |
MIDI Messages | ||||
Channel Message | System Messages | |||
Voice | Mode | Common | Real Time | Exclusive |
Note On/Off Velocity Aftertouch Pitch Bend Program Change Control Change |
Omni On Omni Off Poly On Poly Off |
MIDI Time Code Song Position Pointer Tune Request Song Select End of Exclusive |
Start Stop Continue Timing Clock Active Sensing System Reset |
System Exclusive |
No. | Controller Name | Comments | Range |
1 | Modulation Wheel | Usually assigned to produce vibrato | 0-127 |
7 | Main Volume | 0-127 | |
10 | Stereo Pan Position | 0 = Left, 127 = Right, 64 = Middle | 0-127 |
64 | Sustain Pedal | Switch Controller | On/Off |
91 | Reverb effect | GS and GM2 Instruments Only | 0-127 |
93 | Chorus effect | GS and GM2 Instruments Only | 0-127 |
MIDI messages are divided into Channel Messages and System messages. Channel messages are addressed to any MIDI device that receives a given channel. System messages address an entire MIDI system which may include several midi devices. A special type of system message called "System Exclusive" is addressed to a specific MIDI device by referring to that device's Manufacturer's identification number. Typical MIDI devices include controllers (MIDI devices that transmit data but cannot generate sound), MIDI Modules (MIDI devices that generate sound but lack keyboards or other input devices), and Integrated MIDI Devices (MIDI keboards that also contain the electronics necessary to produce sound).
Piano 1 Acoustic Grand 2 Bright Acoustic 3 Electric Grand 4 Honky Tonk 5 Electric Piano 1 6 Electric Piano 2 7 Harpsichord 8 Clavinet |
Chromatic Percussion 9 Celesta 10 Glockenspiel 11 Music Box 12 Vibraphone 13 Marimba 14 Xylophone 15 Tubular Bells 16 Dulcimer |
Organ 17 Drawbar 18 Percussive 19 Rock Organ 20 Church Organ 21 Reed Organ 22 Accordian 23 Harmonica 24 Tango Accordian |
Guitar 25 Nylon String 26 Steel String 27 Jazz Electric 28 Clean Electric 29 Muted Electric 30 Overdrive 31 Distortion 32 Harmonics |
Bass 33 Acoustic Bass 34 Fingered Bass 35 Picked Bass 36 Fretless Bass 37 Slap Bass 1 38 Slap Bass 2 39 Synth Bass 1 40 Synth Bass 2 |
Strings 41 Violin 42 Viola 43 Cello 44 Contrabass 45 Tremolo 46 Pizzicato 47 Orchestral Harp 48 Timpani |
Ensemble 49 Strings 50 Slow Strings 51 Syn Strings 1 52 Syn Strings 2 53 Choir Aahs 54 Choir Oohs 55 Synth Voice 56 Orchestra Hit |
Brass 57 Trumpet 58 Trombone 59 Tuba 60 Muted Trumpet 61 French Horn 62 Brass Section 63 SynthBrass 1 64 SynthBrass 2 |
Reed 65 Soprano Sax 66 Alto Sax 67 Tenor Sax 68 Baritone Sax 69 Oboe 70 English Horn 71 Bassoon 72 Clarinet |
Pipe 73 Piccolo 74 Flute 75 Recorder 76 Pan Flute 77 Bottle 78 Shakuhchi 79 Whistle 80 Ocorina |
Synth Lead 81 Square 82 Sawtooth 83 Calliope 84 Chiff 85 Charang 86 Voice 87 Fifths 88 Bass/Lead |
Synth Pad 89 New Age 90 Warm 91 Polysynth 92 Choir 93 Bowed 94 Metallic 95 Halo 96 Sweep |
Synth FX 97 Ice Rain 98 Sound Track 99 Crystal 100 Atmosphere 101 Brightness 102 Goblins 103 Echos 104 Sci-Fi |
Ethnic 105 Sitar 106 Banjo 107 Shamisen 108 Koto 109 Kalimba 110 Bagpipe 111 Fiddle 112 Shanai |
Percussion 113 Tinkle Bell 114 Agogo 115 Steel Drums 116 Woodblock 117 Taiko Drum 118 Melodic Tom 119 Synth Drum 120 Rev Cymbal |
Sound FX 121 Fret Noise 122 Breath Noise 123 Seashore 124 Bird Tweet 125 Telephone 126 Helicopter 127 Applause 128 Gunshot |
Common MIDI software applications include notation programs, music sequencing programs, and programs for computer assisted instruction. In notation programs, MIDI data can be viewed as notes on a staff.
Screen Shot from Finale by Coda Music Technology
In sequencing programs, MIDI data is organized into tracks and edited either graphically or through a MIDI event list.
Performer by Mark of the Unicorn, Track Window view showing tracks on the left and graphic data on the right.
Performer by Mark of the Unicorn, Event List Window showing MIDI events in sequence.
Computer Assisted Instruction software takes advantage of the flexibility of MIDI to perform note events on demand and respond to user input.
Practica Musica by Ars Nova Software
To learn more about MIDI, point your web
browser to:
ZZounds Learning MIDI web site at http://www.zzounds.com/edu--learningmidi
MIDI Manufacturer's Association (MMA) at http://www.midi.org