You are on page 1of 19

The MIDI protocol a language that

lets synthesizers, computers and other


devices talk to each other.

One choice for adding sounds to


multimedia applications is the use of
digital audio soundfiles
This can become very memory intensive,

however, for large soundfiles


For example, a stereo 16 bit/sample 22 kHz
soundfile requires > 5 mbytes per minute of
audio

As an alternative to the use of


soundfiles, MIDI files have been
considered

MIDI (Musical Instrument Digital


Interface) is a standardized control
language and hardware specification
allows suitably equipped electronic musical

instruments and devices to communicate


real-time and nonreal-time performance
and control data

MIDI data is communicated digitally


through a production system as a
string of MIDI messages

The messages are transmitted (in a


serial fashion) through a single MIDI
line at 31.25 K bits/second
Usually, MIDI instruments and devices
are linked together in a daisy-chain
fashion
The following slide shows an example

MIDI messages are bytes that are


interpreted by the MIDI devices
The messages are used to convey a
series of instructions to one or all of the
MIDI devices within the system.
The messages can be divided into two
types:
messages
are
messages
Channel
assigned to a specific MIDI channel
System messages address all devices in
a system, without regard to channel
assignment

The following is a typical 3 byte MIDI Note On


message: (10010101) (01000000) (01011010)
This message is interpreted as follows.
The first byte is the status byte while the
second and third are data bytes
The most significant bit of the byte
determines which type of byte it is
The next three bits of the status byte code
the Note On message
The four least significant bits give the
channel to which this message is directed
In the case, channel #5. (Note that we can
have up to 16 channels addressed through
a single MIDI cable)

Whenever a MIDI device is instructed to respond


to a specific channel number, it will ignore any
message not directed to that channel
On the other hand, if a message is transmitted
to that channel, the device will respond to the
message (within the devices capability limits).
The 7 bits (not including the MSB) of the first
data byte code the note # that should be turned
on - here, it is 64
The 7 bits of the second data byte indicate the
attack velocity (volume level of the note) - here,
it is 90

Channel voice messages are used to transmit


real-time performance data throughout a
connected MIDI system
There are seven channel voice messages:
Note On
Note Of
Polyphonic Key Pressure
Channel Pressure
Program Change
Control Change
Pitch Bend Change

A Note On message indicates the beginnning of a


MIDI note
The message consists of three bytes of information:
MIDI channel number; MIDI note number; Attack
velocity value
In general, MIDI note 60 is assigned to middle C
key, and notes 21-108 correspond to the 88 keys
of an extended keyboard controller
The final byte indicates the velocity at which the
key was pressed
Higher velocities lead to louder notes
Not all instruments interpret all attack velocities,
and some do not respond dynamically at all

A Note Of message indicates the end of a MIDI


note
If the instrument being played has a release
(or decay) phase, it will begin that phase when
the message is received
The release velocity byte indicates the speed
at which the key was released
Few instruments generate or respond to
release velocity

Polyphonic Key Pressure messages are transmitted by


instruments that are capable of playing more than
one sound at a time (e.g. a chord on a keyboard
instrument)
The message indicates a pressure message for
each key that is depressed
Pressure values can commonly be assigned to such
parameters as vibrato, loudness, and pitch
Channel Pressure messages are commonly
transmitted by polyphonic instruments that will only
respond to a single overall pressure applied to their
controllers, regardless of the number of keys being
played at any one time

The Program Change message changes the


program or preset number that is active in a
device or instrument
Up to 128 presets can be selected by using
this message
This can be used, for example, to switch
between the diferent sounds of a synthesizer
or to change the rhythm patterns of a drum
machine

The Control Change message transmits


information that relates to real-time control over
the performance parameters of a MIDI
instrument
Control change messages correspond to
changes in controllers such as foot pedals,
relative balance of a stereo sound field, etc.
Pitch Bend Change messages are transmitted by
an instrument whenever its pitch bend wheel is
moved either in the positive (raise pitch) or
negative (lower pitch) position from its central
(no pitch bend) point

Controller numbers 121-127 are reserved for


Channel Mode messages. These include:
Reset all controllers
Local control
All Notes Of
MIDI Mode messages

The basic instrument sounds that are reproduced


by almost any electronic music setup will
invariably change from one setup to the next
This lack of conformity has brought about a
single set of standardized MIDI patch settings
that have come to be known as General MIDI
This standardized series of sound settings has
been defined so that common and popular
instrument sounds are mapped to various
program change numbers

Program #
1-8
9-16
17-24
25-32
33-40
41-48
49-56
57-64
65-72

Instrument Group
Piano
Chromatic Percussion
Organ
Guitar
Bass
Strings
Ensemble
Brass
Reed

Program #
73-80
81-88
89-96
97-104
105-112
113-120
121-128

Instrument Group
Pipe
Synth Lead
Synth Pad
Synth Efects
Ethnic
Percussive
Sound Efects

You might also like