Midi 01
Midi 01
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
1
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
USB/MIDI
Interface In Thru
Out
In
Out
2
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
USB/MIDI
Interface
6/17
3
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 supports 128x128 different voice
banks, each with 128 different voices.
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
4
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
5
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
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
12/17
6
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
7
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
USB Hub
USB USB
16/17
8
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