MIDI
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
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
MIDI
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
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:
Channel messages are messages assigned to a specific MIDI channel
System messages address all devices in a system, without regard to
channel assignment
MIDI Messages
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)
MIDI
MIDI Channel Messages
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 device’s 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
MIDI Channel Voice Messages
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 Off
Polyphonic Key Pressure
Channel Pressure
Program Change
Control Change
Pitch Bend Change
MIDI Channel Voice Messages
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
MIDI Channel Voice Messages
A Note Off 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
MIDI Channel Voice Messages
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
MIDI Channel Voice Messages
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 different sounds
of a synthesizer or to change the rhythm patterns of a drum machine
MIDI Channel Voice Messages
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
MIDI Channel Mode Messages
Controller numbers 121-127 are reserved for Channel
Mode messages. These include:
Reset all controllers
Local control
All Notes Off
MIDI Mode messages
General MIDI
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
General MIDI
Program # Instrument Group
1-8 Piano
9-16 Chromatic Percussion
17-24 Organ
25-32 Guitar
33-40 Bass
41-48 Strings
49-56 Ensemble
57-64 Brass
65-72 Reed
General MIDI
Program # Instrument Group
73-80 Pipe
81-88 Synth Lead
89-96 Synth Pad
97-104 Synth Effects
105-112 Ethnic
113-120 Percussive
121-128 Sound Effects