Dr. Estrella's Incredibly Abridged Guide to MIDI

Dr. Steven G. Estrella
Courtesy of StevenEstrella.com

 

Contents


Definition

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.

Table of Contents


History

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

Table of Contents


Hardware Communications

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


Table of Contents


MIDI Setups

Setup Number 1

In setup number 1 a computer with a MIDI Interface is connected to an integrated MIDI device using two MIDI cables.

 

Setup Number 2

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.

 

Setup Number 3

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.

 

Table of Contents


Software Communications

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)

 

Table of Contents



Summary of the MIDI Specification

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





Common Controllers

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

Table of Contents


Glossary

Note On and Note Off
messages are sent to a MIDI device to turn individual notes on or off. These messages do not have a range of values other than on and off.
Velocity
sent to a MIDI device to indicate the speed with which a key is depressed or released. Most commonly, this message is used to control the volume of individual notes in a manner similar to that of an acoustic piano; if you hit it harder, the key goes down faster, and the sound for that note is louder. Velocity messages have values ranging from 0 to 127. Velocity is a voice message that affects the sound of individual pitches only on their attacks or releases. A crescendo executed with velocity messages only would sound like a crescendo one might hear from a piano.
Aftertouch (also called pressure sensitivity or second touch)
a measure of the pressure exerted on the key after it is depressed. There are two types of aftertouch: Channel Pressure and Key Pressure. Channel Pressure is an average pressure reading for everything on a given MIDI channel. Key pressure (also called polyphonic pressure) is measured and sent by the individual key, which allows one to add vibrato to a single note while holding a chord that does not have vibrato. Aftertouch can be assigned to change many aspects of tone. Common assignments include vibrato (modulation) and volume. Range of values is 0 to 127.
Pitch Bend
a message sent from a pitch wheel to a MIDI module (or the MIDI module portion of an integrated device). Movement of the pitch bend causes changes in the pitch of all notes being played on a given channel. The values of pitch bend include a null position for normal pitch and positive and negative ranges from -8192 to +8191.
Program Change
messages are sent to an instrument on a given MIDI channel to change timbre. For example, a program change value 1 would be sent to one of the channels on the Roland Sound Canvas to indicate a change to Grand Piano.
Control Change
sent to an instrument on a given MIDI channel to change the quality of the sound. For example, a control change value 7 (the volume controller) sent to MIDI channel 1 is one way to globally affect the volume of all notes produced on that MIDI channel. Volume is a continuous controller that can affect the sound of individual pitches even during long held notes. A crescendo executed with volume changes only would sound like a crescendo one might hear from a wind instrument.
OMNI ON
A device set to omni on responds to messages sent on all channels.
OMNI OFF
A device set to omni off responds only to messages sent on its designated receive channel.
POLY ON
allows an instrument to play more than one note at a time.
POLY OFF
allows an instrument to play only one note at a time.
MODE 1
Omni On, Poly On - rarely used today.
MODE 2
Omni On, Poly Off - rarely used today.
MODE 3
Omni Off, Poly On - This mode is the most commonly used mode today.
MODE 4
Omni Off, Poly Off - Used to ensure monophonic response from a synthesizer.
MIDI Time Code
A time code which establishes an absolute reference for synchronizing MIDI data with SMPTE Time Code. Each frame of SMPTE is divided into 4 frames of MIDI Time Code.
SMPTE Time Code
A time code used to synchronize MIDI data with film or video. In SMPTE TIME CODE absolute time is divided into 24, 25, 30, or 29.97 frames per second depending on the video source. 24 frames per second is used for U.S. film. 25 frames per second is used by European film. 30 frames per second was the standard for black and white television. 29.97 frames per second is the standard for NTSC color television. Today a standard called "30 drop frame" is used to digitize and synchronize at 30 frames per second dropping frames periodically to achieve the rate of 29.97 frames per second.
Song Position Pointer
A status byte is created every 6 MIDI clocks to keep track of the current location of a song in terms of measure, beat, and clock.
Tune Request
A message to request an analog synthesizer to tune its oscillators to a given frequency.
Song Select
A message sent usually to a workstation to play a given song stored in memory.
End of Exclusive
A message sent to indicate that the stream of system exclusive data is at an end.
Start, Stop, and Continue
These real time messages are sent to sequencing software to control playback of a sequence of MIDI events.
Timing Clock
A status byte is created 24 times per quarter note. The rate, therefore, varies with tempo. 24 parts per quarter note (PPQ) allows sequencers to accurately resolve 32nd note triplets. Professional-level sequencers will subdivide the Timing Clock 20 times to achieve 480 PPQ.
Active Sensing
A status byte is sent every 300 milliseconds. Once active sensing is begun, the receiving device expects to receive the active sensing message every 300 ms. If the signal is not received, the receiving device will assume the connection has been severed. This feature is optional and often used to test the integrity of MIDI cables in a studio.
System Reset
A status byte is sent to reset a MIDI device to its default settings.
System Exclusive
A status byte followed by a data byte identifying a specific MIDI device by manufacturer's ID. Other data bytes will follow to access features unique to a particular MIDI device. System Exclusive was included in the MIDI specification to allow manufacturers to continue to distinguish their products from the competitors by including proprietary features accessible only through System Exclusive messages.
Standard MIDI File
In 1988 the Standard MIDI File was created to allow different software applications to share MIDI data through a common file format. Type 0 Standard MIDI Files place all MIDI data in one track. Type 1 files place data in separate tracks with the time signature and tempo included in the first track. Type 2 files place data in separate tracks with time signature and tempo data in each track. Type 1 files are most common today.
General MIDI Standard
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 (1999) conform to the GM2 standard which increases polyphony to 32 notes and adds support for more controllers and 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). Apple Computer's QuickTime format allows General MIDI files to be played by the QuickTime Musical Instruments software synthesizer on Macintosh and Windows computers equipped with QuickTime.
GM Drums
A standard set of drum kits included with all General MIDI Devices. The standard drum kit contains at least 47 percussion sounds, each of which is played by depressing a different key on the keyboard.
GS Standard
The GS standard is a superset of the General MIDI Standard developed by Roland Corp. Instruments which conform to the GS standard include support for reverb and chorus effect controllers and have a higher polyphonic limit than dictated in the GM1 standard. The GS Standard was a great influence on the development of GM2 which supersedes it today.
Multi-Timbral
Most MIDI devices today contain multiple sythesizers, usually 16, each of which can receive a different MIDI channel and be set to play a different timbre.
MIDI Controller
A MIDI device which transmits MIDI events but contains no sound generating circuitry. Keyboards are the most common controller devices but controllers exist for all the major categories of traditional instruments.
MIDI Sound Module
A MIDI device which contains sound generating circuitry but no controller hardware. Sound modules are typically set up to receive MIDI data from MIDI Controllers and/or sequencing software.
Integrated MIDI Device
A MIDI device, usually a keyboard, which combines controller hardware with sound generating circuitry. An Integrated MIDI Device is what we commonly think of as a "synthesizer keyboard".
MIDI Workstation
A MIDI device, usually a keyboard, which combines an Integrated MIDI Device with an onboard computer, small LCD screen, and sequencing software. A floppy disk drive is usually included to allow for storage and retrieval of Standard MIDI Files.
Table of Contents

General MIDI Sound Bank

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

Table of Contents

Key Map of General MIDI Drums

Table of Contents


MIDI Applications

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

Table of Contents


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

Table of Contents

Dr. Estrella's Home Page