You are on page 1of 17

Introduction to MIDI

Musical Instrument Digital


Interface
(Thanks to Bob Lang)
1

MIDI Overview
Developed in mid 1980s by a consortium
of synthesizer manufacturers.

Now fitted to budget equipment.


Initially used point-to-point serial lines
(current loop) with 5 pin DIN plugs.

Sends commands, not note samples.

Serial lines being phased out and replaced


by the faster USB.
2 /17

MIDI Data Flows


The original serial line system only allowed
for point-to-point connections and data flow
in ONE direction.

There are three possible connection ports on


a MIDI device:
Out - for transmitting data to another device.
In - for receiving data from another device.
Thru - re-transmits data received at the In port.

The Thru port allows several devices to be


connected into a network.
3 /17

Typical Studio Setup


Data flow

USB/MIDI
Interface
Out

In

Thru

In

MIDI Controller Keyboard

Data
flow

Out
Rack mounted synthesizers
(each set to a different channel)
4 /17

MIDI Channels
In a traditional setup, each instrument receives the
commands for every other instrument on the
network. Therefore, it must ignore commands for
other instruments.

This is achieved using channels:


Each command holds a channel number (1-16).
Simple (single voice) instruments are set up to respond to
commands on one fixed channel.
Multi-timbral instruments are often set up to respond to
commands on more than one channel, with each channel
number controlling a different voice.

5 /17

Typical Home Setup


USB/MIDI
Interface

Multi-timbral Home Keyboard:


responds on all channels
each channel has a different voice

Out

In

6 /17

Channels and Voices


Each channel corresponds to a different voice: 1:
piano; 2: bass; 10: drums

The precise voicing for each channel is specified by


a Program Change command.

As defined, a Program Change can only choose


between 128 different voices.

However, a Bank Select command can also be


used. This supports128 different voice banks, each
with 128 different voices (=16,384 voices)
Note: Voice = Patch = Program
Bank = Collection of 128 different voices
7 /17

Playing Notes
A MIDI instrument starts playing a note
when it receives a Note On command for
a channel that it is currently monitoring.

The Note On command specifies which


note to play and how loud to play it.

The instrument stops playing the note


when it receives a Note Off command for
that note.
8 /17

Playing Chords
Most modern instruments can play
chords.

Each note in the chord must be triggered


by an individual Note On command.

Each note in the chord must be turned off


by an individual Note Off command.

9 /17

Note On Command
A Note On command contains the following
data:
The channel number (1-16)
The pitch of the note (see next slide)
The velocity (loudness) of the note (1-127)

The command requires just 3 bytes.


The note plays until stopped by a Note Off.
The note sounds using the currently selected
voice for the channel number.
10 /17

Note Pitch
In MIDI, the pitch of a note is specified by a
number:

36 38 40 41 43 45 47 48 50 52 53 55 57 59 60 62 64 65 67 69 71 72 74 76 77 79 81 83

Middle C = 60.
Add or subtract 12 for each octave up or down.
Add or subtract 1 for each semitone up or down.
Total range 1-127 or around 10 octaves!
11 /17

Drum Sounds and Pitch


Most drum sounds do not have a pitch.
Many drum sounds can be put into a single patch.
Pitch number selects the required drum sound.
Hand
Clap

Hi
Hat

Ride
Cymbal

Vibra
slap

Open
Conga

Short
Guiro

36 38 40 41 43 45 47 48 50 52 53 55 57 59 60 62 64 65 67 69 71 72 74 76 77 79 81 83

Bass
Drum

Low
Tom

Hi Mid
Tom

Splash
Cymbal

Hi
Bongo

Hi
Agogo

Open
Cuica
12 /17

Note Off Command


A Note Off command turns off a note that is
playing. It has the following data:
The channel number and note pitch
The Release Velocity

As with Note On, it only requires 3 bytes.


Release Velocity specifies how quickly the
note should die away (but is usually ignored
on cheap equipment).
An alternative form of Note Off is to send a
Note On with a velocity (loudness) of zero.
13 /17

Control Change Command


An instrument may support some controls.
Set up using a Control Change command.
Each command works on a single channel.
Typical controls are:

Bank Select - select voice bank for this channel.


Pan - stereo placement between Left and Right.
Volume - overall volume level.
Expression - varying volume level.
Sustain - how the note sound dies away.
Chorus - a special effect.
14 /17

General MIDI (or GM)


General MIDI was devised to allow easy
swapping of MIDI files and sequences.
Instruments marked with the GM logo must
conform to a minimum specification:
A bank of 128 named voices with fixed numbers.
Channel 10 reserved for drums and percussion.
A minimum set of controls, including volume,
pan, expression and sustain.

Manufacturers such as Yamaha and Roland


have brought in their own extensions to GM
to lock in users to their platforms.
15 /17

Newer Studio Setup (USB)


Note: MIDI commands sent via USB

USB Hub

USB Controller Keyboard

Other USB devices

USB
USB

USB

Multi-timbral Tone generators


16 /17

USB and MIDI


MIDI originally used a relatively slow serial
transmission system.

Increasingly, instruments are implemented with


USB replacing the slow serial ports.

USB is faster, more flexible and supported by all


modern computers.

Multiple tone generators (each with 16 channels)


can be individually addressed.

The MIDI commands are the same in all cases.


17 /17

You might also like