MIDI

Transcription

MIDI
äl
MIDI
Musical Instrument Digital Interface
030-MIDI: 1
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
What’s MIDI
u
A hardware and software specification
u
Allows musical instruments and devices to exchange
information: musical notes, program changes, expression
controls
u
Examples of MIDI-supporting devices: synthesizers,
samplers, keyboard controllers, lighting controllers,
sequencers,. . .
u
“Supporting the Arts through Technology”
030-MIDI: 2
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI: the origin
u
First idea: 1982–1983
u
The Complete MIDI 1.0 Detailed Specification is jointly
prepared by the MIDI Manufacturers Association (MMA)
and the Japan MIDI Standards Committee (JMSC)
u
Now JMSC becomes Association of Musical Electronics
Industry (AMEI)
030-MIDI: 3
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI: the specification
u
The specification, last revised 1996, has seven sections
• MIDI and Music Synthesis Tutorial
• MIDI 1.0 Detailed Specification
• MIDI Time Code (MTC)
• Standard MIDI Files (SMF)
• General MIDI (GM)
• MIDI Show Control (MSC)
• MIDI Machine Control (MMC)
030-MIDI: 4
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI: recent developments
u
u
u
u
u
u
u
u
u
1998: DLS: Downloadable Sounds Level 1 specification
1999-01: DLS Level 1.1 specification
1999-11: GM2: General MIDI Level 2 specification
2000-02: DLS: Downloadable Sounds Level 2.1 amendment text
2000-02: RMID (SMF w/DLS) specification
2000-10: MIDI Over IEEE-1394 specification
2001-08: Amendment 1 to DLS-2.0 specification
2001-11: GM-Lite: GM Lite Specification and Guidelines for Mobile
Applications
2001-11: eXtensible Music Format (XMF) specification
030-MIDI: 5
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI: more recent developments
u
u
u
u
u
u
u
u
2002-02,
2003-07:
2003-07:
2003-09:
2004-09:
2004-09:
2004-11:
2004-11:
2002-05: SP-MIDI: Scalable Polyphony MIDI specification
ZLIB Audio Compression Unpacker ID for XMF
XMF: eXtensible Music File (XMF) Specification v.1.01
GM-2: General MIDI 2 Specification v 1.1 (updated)
DLS Level 1.1b
DLS Level 2.1 amended
DLS Level 2.1 corrected
SP-MIDI amended
030-MIDI: 6
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Event-based vs. sample based
u
MIDI data focus on events rather than samples
u
Musical events, rather than the sound waveform itself,
are exchanged between MIDI devices using MIDI
messages
u
Examples:
Pressing a piano key
Releasing a piano key
Changing instrument sound
Changing volume
Crescendo and diminuendo
Note On
Note Off
Program Change
Volume controller
Expression controller
030-MIDI: 7
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Events, events
u
Only a few bytes are needed to represent an event
u
Storage-friendly, network-friendly
u
Easy to edit, e.g., can change the speed or pitch of
notes easily
u
Hardware or software needed to generate sound
u
Not easy to specify sound parameters precisely
030-MIDI: 8
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI: the physical specification
u
Transmission parameters: asynchronous serial, 31.25k
baud ±1%; one start bit, 8 data bits, one stop bit
u
Circuit: Point-to-point opto-isolated 5mA current loop,
current on = logic 0, fan out = 1, rise/fall time < 2µs
u
Connector: DIN 5 pin (180◦) female panel mount
receptacle, labeled “MIDI IN” and “MIDI OUT”. “MIDI
THRU”, which copies MIDI IN data, is optional
u
Cable: shielded twisted pair (STP), cannot be longer
than 50 feet (15 m)
030-MIDI: 9
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI Cable
030-MIDI: 10
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Words to know
Channel mode message
Control change
Digital piano
General MIDI
MIDI keyboard
Multitimbral
Note on
Patch
Pitch wheel
Polyphonic key pressure
Running status
Sound generator
Soundbank
Sysex
System real time message
Channel pressure
Controller
Electronic organ
Keyboard controller
MIDI mode
Note number
Octave number
Patch map
Poly mode
Program
Sampler
Sound module
Status byte
System common message
Velocity
Channel voice message
Data bytes
Electronic piano
Local control
Monophonic
Note off
Omni mode
Pitch bending
Polyphonic
Program change
Sequencer
Sound set
Synthesizer
System exclusive message
Voice
030-MIDI: 11
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Some jargons
u
Both controllers and sequencers generate MIDI data
u
A controller is a device played as an instrument and
translates the performance into a MIDI data stream in
real time. e.g., musical instrument keyboard (keyboard
controller or simply “MIDI keyboard”)
u
A sequencer is a device which allows MIDI data
sequences to be captured, stored, edited, combined, and
replayed
030-MIDI: 12
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Some more jargons
u
A sound module, or sound generator, respond to MIDI
messages received at its MIDI IN port by playing sounds
u
Many keyboard instruments, often called digital pianos,
include both a keyboard controller and a MIDI sound
module within the same unit
u
The local control function of such instruments enables
or disables the internal link between the keyboard
controller and the sound module
030-MIDI: 13
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Connecting MIDI instruments:
an example
MIDI OUT
MIDI IN
Keyboard controller
Sound module
030-MIDI: 14
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Digital Pianos
and local control
Sound
module
MIDI IN
Local control
MIDI OUT
Keyboard
controller
Digital piano
030-MIDI: 15
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Connecting MIDI instruments
u
MIDI data-producing devices (e.g., controllers and
sequencers) are connected to MIDI data-receiving
devices (e.g., sound modules — what besides that?)
u
Computers can make use of MIDI interfaces to connect
to MIDI instruments
u
Devices can be daisy-chained together using the MIDI
THRU port
u
Daisy-chaining using MIDI THRU may introduce delay
030-MIDI: 16
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Connecting MIDI instruments:
another example
MIDI OUT
MIDI IN
MIDI THRU
Sound
module 1
MIDI IN
MIDI THRU
Sound
module 2
Keyboard controller
MIDI IN
MIDI IN
MIDI THRU
Sound
module 3
Drum machine
030-MIDI: 17
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Use of MIDI interfaces
MIDI OUT
MIDI IN
Digital piano
IN
1 OUT
IN
2 OUT
MIDI IN
Sound module 1
IN
3 OUT
IN
4 OUT
Computer
MIDI IN
Sound module 2
MIDI interface
MIDI IN
Drum machine
030-MIDI: 18
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Mixing audio outputs
Computer
MIDI interface
IN
1 OUT
IN
2 OUT
MIDI OUT
Digital piano
Audio Out
MIDI IN
IN
3 OUT
Audio Out
IN
4 OUT
Loudspeakers
Sound module 1
MIDI IN
Audio Out
Sound module 2
Mixer
Audio Out
MIDI IN
Drum machine
MIDI IN
Audio Out
Audio Inputs
030-MIDI: 19
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Confusion of terminologies
u
The use of the words “synthesizer”, “sampler”, “digital
piano”, “MIDI keyboard”, “electonic organ”, “electronic
piano”, and “MIDI controller” are often used
interchangably, especially as marketing terms
u
Always check the functionalities of a MIDI device before
purchasing it
030-MIDI: 20
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Confusion: an example
u
Samplers are essentially digital recorders with some
control functions such as playing back samples at a
different pitch
u
Synthesizers generate sound by computing its waveform
in real time, using, for example, Frequency Modulation
(FM) synthesis algorithms
030-MIDI: 21
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Confusion: an example continued
u
The majority of today’s “synthesizers” are actually
sample playback devices. Waveform data are often
stored in disk or ROM
u
Does a sound card with wavetables function as a
synthesizer or sampler?
030-MIDI: 22
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
More jargons: polyphony
u
A sound module is said to be polyphonic if it can play
more than one note at a time
u
Otherwise, it’s monophonic
u
Modern sound modules often support 32-note or
64-note polyphony
u
What if five keys are pressed at the same time on a
digital piano with 4-note polyphony?
030-MIDI: 23
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI channels
u
There are 16 logical MIDI channels
u
Channels are identified by a 4 bit number in some
messages (Channel messages)
u
A device can be set to receive commands from, or send
commands to, a specific set of channels only
u
How a device respond to channel commands depends on
the MIDI mode it is in
030-MIDI: 24
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Sound set
Patch number /
Program number
Channel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Voice / Timbre
Patch
(Percussion)
1
2
3
:
:
:
41
42
43
44
:
:
:
Acoustic Grand Piano
Bright Acoustic Piano
Electric Grand Piano
:
:
:
Violin
Viola
Cello
Contrbass
:
:
:
127
128
Applause
Gunshot
Sound set / Patch map
030-MIDI: 25
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Voices and patches
u
Voices are sounds of instruments (e.g., acoustic grand
piano, violin)
u
Patches are assignment of voices. There are 128
patches in MIDI
u
Example: in a particular sound module, patch 1 can be
assigned to the voice of marimba, patch 2 violin, etc.
u
The association of all patch numbers to sounds is called
the patch map (example later)
030-MIDI: 26
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Patches and programs
u
The word “patch” originates from the use of real
“patch cables” in some sound systems to select voices
u
Patches are called programs in some contexts
u
MIDI Program Change message instruct devices to
change the patch of a certain channel
u
Yet, having only 128 programs may not be enough for
sound systems
030-MIDI: 27
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Banks (no money, though)
u
A bank or soundbank is an extension of a patch. There
are 16384 possible banks
u
MIDI Bank Select message instruct devices to change
its bank, a Program Change message must follow it
u
A Bank Select message can be seen as an instruction for
a device to change its internal patch map
u
Confusion, again: “soundbank” is often used to describe
a sound set
030-MIDI: 28
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Multitimbral instruments
u
A sound module is said to be multitimbral if it is
capable of producing two or more different instrument
sounds at the same time
u
Example: a synthesizer that can produce a piano sound
and a marimba sound at the same time is multitimbral
u
What’s the difference between a polyphonic sound
module and a multitimbral one?
u
Can a sound module be both polyphonic and
multitimbral?
030-MIDI: 29
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI modes
u
MIDI modes establish the relationship between channels
and voice-assignment methods within a synthesizer
u
The modes are Omni On/Off and Mono/Poly
u
Each device has a basic channel for sending or receiving
MIDI messages
u
The number of voices for devices supporting mono
mode is also used in one of the MIDI modes
030-MIDI: 30
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap



Omni on
Omni off




×

Mono
Poly
ä
MIDI modes: Omni on/off



Omni off : Channel commands are recognized only if it
matches the receiving channel or channel range
Omni on : All commands are recognized, regardless of
their channel numbers
030-MIDI: 31
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI modes: Mono, Poly



Omni on
Omni off




×

Mono
Poly



Poly : Voices are assigned polyphonically. Simultaneous
sounding of different notes possible
Mono : Often assigned one voice per channel. Note On
commands on a channel causes all other sounding notes
in that channel to be turned off
030-MIDI: 32
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI messages
u
MIDI messages consists of a status byte (0x80–0xFF) and
zero or more data bytes (0x00–0x7F)
u
A single message can occupy one, two or three bytes
including the status
u
System exclusive messages (described later) occupy a
varying number of bytes
030-MIDI: 33
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI message types
u
Channel messages
• Channel voice messages
• Channel mode messages
u
System messages
• System common messages
• System real time messages
• System exclusive messages
030-MIDI: 34
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Channel messages: a summary
Status
Message
(hex)
Note Off
8n
9n
Note On
Polyphonic Key Pressure
An
Control Change
Bn
Program Change
Cn
Channel Pressure
Dn
Pitch Bend
En
Data1
NoteNo
NoteNo
NoteNo
Controller
PgmNo
Pressure
LSB
Data2
Velocity
Velocity
Pressure
Value
MSB
n: zero-based channel number
030-MIDI: 35
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
u
ä
Channel voice messages
Note Off (0x8n), Note On (0x9n): a note is turned on or
off. Followed by a note number and a velocity
u
The nibble n corresponds to the channel number
u
n=0 ⇒ channel 1, n=1 ⇒ channel 2, and so on
u
A Note On message with velocity 0 is equivalent to a
Note Off message with velocity 0x40 (Why do we need
that? Explained later)
030-MIDI: 36
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
More channel voice message
u
Polyphonic Key Pressure (0xAn): change of key pressure
after it has been turned on
u
Followed by note number and a pressure value
u
Also called Polyphonic Aftertouch
u
Useful for controllers for string instruments, e.g., violin
030-MIDI: 37
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Note numbers and octave number
u
Each note is assigned a numeric value, which is
transmitted with any Note On/Off message
u
Middle C has a reference value of 60 (0x3C)
u
To distinguish notes from different octaves, an octave
number is appended to the note name
u
Middle C is C4 (some systems use C3, C5 or even C6)
u
Octave numbers change at the B–C boundary, so B3
and C4 is one semitone apart, so is C4 and C]4
030-MIDI: 38
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
The piano keyboard
C]3
D[3
C3
D]3
E[3
D3
E3
F] 3
G[ 3
F3
G] 3
A[3
G3
A]3
B[ 3
A3
B3
C]4
D[4
C4
D]4
E[4
D4
E4
F] 4
G[ 4
F4
G] 4
A[4
G4
A]4
B[ 4
A4
B4
030-MIDI: 39
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Velocity
u
Interpretation of the Velocity byte is left to the receiving
instrument
u
Usually indicates how hard or fast a key has been
pressed or released
u
The larger the value, the stronger the
velocity-controlled effect
u
Devices without velocity sensitivity should use a velocity
of 0x40
030-MIDI: 40
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
More channel voice messages
u
Control Change (0xBn): change controller values.
Followed by controller number, ranging from 0 to 119,
then controller value
u
Note that “controller” here is different from the
“controller” in “keyboard controller”
u
Program Change (0xCn): change internal patch map,
followed by program (patch) number
030-MIDI: 41
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Even more channel voice messages
u
Channel Pressure (0xDn): change of key pressure for all
keys of the channel. Followed by the pressure amount
u
Channel Pressure is also called Channel Aftertouch
u
Pitch Bend (or pitch wheel) (0xEn): modify the pitch of
sounding notes. Followed first by least significant seven
bits, then the most significant seven bits of pitch bend
value. 0x2000 means centered pitch wheel
030-MIDI: 42
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Controllers
0
1
2
3
4
5
6
7
8
9
10
11
12–13
14–15
16–19
20–31
32–63
64
65
66
67
68
69
Bank select
70 Sound controller 1 (default: Sound variation)
Modulation wheel or lever
71 Sound controller 2 (default: Timbre/harmonic intensity)
Breath controller
72 Sound controller 3 (default: Release time)
(undefined)
73 Sound controller 4 (default: Attack time)
Foot controller
74 Sound controller 5 (default: Brightness)
Portamento time
75–79 Sound controller 6–10 (no defaults)
Data entry MSB
80–83 General purpose controllers 5–8
Channel volume (formerly Main volume)
84 Portamento control
Balance
85–90 (undefined)
(undefined)
91 Effects 1 depth (formerly External effects depth)
Pan
92 Effects 2 depth (formerly Tremolo depth)
Expression controller
93 Effects 3 depth (formerly Chorus depth)
Effect control 1,2
94 Effects 4 depth (formerly Celeste (detune) depth)
(undefined)
95 Effects 5 depth (formerly Phaser depth)
General Purpose Controllers 1–4
96 Data increment
(undefined)
97 Data decrement
LSB for values 0–31
98 Non-Registered Parameter Number (NRPN) LSB
Damper pedal (sustain)
99 Non-Registered Parameter Number (NRPN) MSB
Portamento On/Off
100 Registered Parameter Number (RPN) LSB
Sostenuto
101 Registered Parameter Number (RPN) MSB
Soft pedal
102–119 (undefined)
Legato footswitch
120–127 (reserved for channel mode messages)
Hold 2
030-MIDI: 43
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
u
ä
Channel mode messages
Channel mode messages are Control Change message
with controller number 120–127
Controller
120
121
122
123
124
125
126
127
Message
All Sound Off
Reset All Controllers
Local Control
All Notes Off
Omni Off
Omni On
Mono On (Poly off)
Poly On (Mono off)
030-MIDI: 44
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
u
Mainly deal with sequencer operations
u
Also for tuning analog synthesizers
Status (hex)
F1
F2
F3
F6
F7
ä
System common messages
Message
MIDI Time Code Quarter Frame
Song Position Pointer
Song Select
Tune Request
EOX (End Of Exclusive)
030-MIDI: 45
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
u
ä
System real time messages
Used to synchronize clock-based MIDI equipments
Status (hex)
F8
FA
FB
FC
FE
FF
Message
Timing Clock
Start
Continue
Stop
Active Sensing
System Reset
030-MIDI: 46
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
ä
System exclusive messages
u
Often called SysEx messages
u
For sending byte sequences to a MIDI device
u
Followed by a one-byte or three-byte (manufacturer) ID
number, then a Device ID, the data, and an EOX
message
u
MIDI Sample Dump Standard (SDS) specifies the use of
SysEx messages to send sampler data dumps between
devices
030-MIDI: 47
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Sending MIDI messages: question
Suppose 22 notes are to start sounding simultaneously.
What’s the time needed to send
all the MIDI Note On messages?
030-MIDI: 48
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Sending MIDI messages: answer
Time needed to transmit one byte = 1/ 31.25k
= 320µs
10
Number of bytes for a Note On message = 3
Time needed to send 22 Note On messages
= 320 × 3 × 22µs = 21.12ms
u
Example MIDI stream: Note On messages on channel 1
for every note from A3 till D4 (piano keyboard here)
90 39 40 90 3A 40 90 3B 40 90 3C 40 90 3D 40 90 3E 40
030-MIDI: 49
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Running status
u
The status byte takes time to send
u
Simultaneous events of the same type (e.g., Note On)
often have the same status byte
u
To save bandwidth, running status is used. The status
byte of channel messages are remembered at the
receiver
u
Status bytes need not be sent if a message have the
same status byte as the preceding message
030-MIDI: 50
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Running status: example
u
The MIDI data stream shown previously can be
shortened
u
Original:
90 39 40 90 3A 40 90 3B 40 90 3C 40 90 3D 40 90 3E 40
u
After using running status:
90 39 40 3A 40 3B 40 3C 40 3D 40 3E 40
030-MIDI: 51
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Running status:
another example, question
u
What’s the MIDI data stream of a chord where C4, E4
and G4 are turned on in succession, with each note
sounding for half a second and turned off when another
note starts sounding? Assume that all notes are turned
on with velocity 96 and turned off with velocity 64
030-MIDI: 52
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Running status:
another example, answer
u
Answer:
90 3C 60 80 3C 40 90 40 60 80 40 40 90 43 60 80 43 40
u
Alternative answer:
90 3C 60 90 3C 00 90 40 60 90 40 00 90 43 60 90 43 00
u
After using running status:
90 3C 60 3C 00 40 60 40 00 43 60 43 00
u
Now, do you know why Note On with velocity zero is
allowed and is indeed often used?
030-MIDI: 53
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI: problems
u
MIDI does not specify the patch map for instruments
u
Inconsistency may occur between different MIDI
instruments having different patch maps. e.g., Acoustic
Grand Piano may be patch 1 on one system but patch
13 on another
u
The same MIDI stream played on different sound
modules may sound differently
u
Affects portability of MIDI files
030-MIDI: 54
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
The solution: General MIDI
u
General MIDI (GM) System describes the minimum
requirement of sound generators
u
Specifies minimum number of voices, sound locations,
drum note mapping, octave registration, pitch bend
range, and controller usage
u
Does not specify exact timbre and characteristics of
instruments
u
Identified by the GM logo
030-MIDI: 55
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
GM system
u
Specifies the followings:
• GM sound generator requirements
• GM sound generator recommended hardware
• GM protocol implementation requirements
030-MIDI: 56
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
u
ä
GM System Level 1
sound generator requirements
Minimum of 24 fully dynamically allocated voices
available simultaneously for both melodic and percussive
sounds, or 16 dynamically allocated voices for melody
and 8 for percussion
u
Support all 16 MIDI polyphonic channels
u
Each channel can play a different instrument
030-MIDI: 57
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
u
ä
More on GM System Level 1
sound generator requirements
At least 128 presets for instruments (MIDI program
numbers) conforming to the GM sound set
u
At least 47 preset percussion sounds conforming to the
GM percussion map
030-MIDI: 58
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
General MIDI sound set groupings
ProgNo
1–8
9–16
17–24
25–32
33–40
41–48
29–56
57–64
u
Instrument group
Piano
Chromatic percussion
Organ
Guitar
Bass
Strings
Ensemble
Brass
ProgNo
65–72
73–80
81–88
89–96
97–104
105–112
113–120
121–128
Instrument group
Reed
Pipe
Synth Lead
Synth Pad
Synth Effects
Ethnic
Percussive
Sound Effects
Both GM sound set groupings and the GM sound set
apply to all channels except channel 10
030-MIDI: 59
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
General MIDI sound set
Prog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Instrument
Acoustic Grand Piano
Bright Acoustic Piano
Electric Grand Piano
Honky-tonk Piano
Rhodes Piano
Chorused Piano
Harpsichord
Clavi
Celesta
Glockenspiel
Music Box
Vibraphone
Marimba
Xylophone
Tubular Bells
Dulcimer
Drawbar Organ
Percussive Organ
Rock Organ
Church Organ
Reed Organ
Accordion
Harmonica
Tango Accordion
Acoustic Guitar (nylon)
Acoustic Guitar (steel)
Electric Guitar (jazz)
Electric Guitar (clean)
Electric Guitar (muted)
Overdriven Guitar
Distortion Guitar
Guitar Harmonics
Prog
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Instrument
Acoustic Bass
Electric Bass (finger)
Electric Bass (pick)
Fretless Bass
Slap Bass 1
Slap Bass 2
Synth Bass 1
Synth Bass 2
Violin
Viola
Cello
Contrabass
Tremolo Strings
Pizzicato Strings
Orchestral Harp
Timpani
String Ensemble 1
String Ensemble 2
SynthStrings 1
SynthStrings 2
Choir Aahs
Voice Oohs
Synth Voice
Orchestra Hit
Trumpet
Trombone
Tuba
Muted Trumpet
French Horn
Brass Section
Synth Brass 1
Synth Brass 2
Prog
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Instrument
Soprano Sax
Alto Sax
Tenor Sax
Baritone Sax
Oboe
English Horn
Bassoon
Clarinet
Piccolo
Flute
Recorder
Pan Flute
Blown Bottle
Shakuhachi
Whistle
Ocarina
Lead 1 (square)
Lead 2 (sawtooth)
Lead 3 (calliope)
Lead 4 (chiff)
Lead 5 (charang)
Lead 6 (voice)
Lead 7 (fifths)
Lead 8 (bass + lead)
Pad 1 (new age)
Pad 2 (warm)
Pad 3 (polysynth)
Pad 4 (choir)
Pad 5 (bowed)
Pad 6 (metallic)
Pad 7 (halo)
Pad 8 (sweep)
Prog
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Instrument
FX 1 (rain)
FX 2 (soundtrack)
FX 3 (crystal)
FX 4 (atmosphere)
FX 5 (brightness)
FX 6 (goblins)
FX 7 (echoes)
FX 8 (sci-fi)
Sitar
Banjo
Shamisen
Koto
Kalimba
Bag pipe
Fiddle
Shanai
Tinkle Bell
Agogo
Steel Drums
Woodblock
Taiko Drum
Melodic Tom
Synth Drum
Reverse Cymbal
Guitar Fret Noise
Breath Noise
Seashore
Bird Tweet
Telephone Ring
Helicopter
Applause
Gunshot
030-MIDI: 60
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
General MIDI percussion map
MIDI
Key
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Drum sound
Acoustic Bass Drum
Bass Drum 1
Side Stick
Acoustic Snare
Hand Clap
Electric Snare
Low Floor Tom
Closed Hi Hat
High Floor Tom
Pedal Hi-Hat
Low Tom
Open Hi-Hat
Low-Mid Tom
Hi Mid Tom
Crash Cymbal 1
High Tom
MIDI
Key
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Drum sound
Ride Cymbal 1
Chinese Cymbal
Ride Bell
Tambourine
Splash Cymbal
Cowbell
Crash Cymbal 2
Vibraslap
Ride Cymbal 2
Hi Bongo
Low Bongo
Mute Hi Conga
Open Hi Conga
Low Conga
High Timbale
Low Timbale
MIDI
Key
67
68
69
70
71
72
73
75
76
77
78
79
80
81
Drum sound
High Agogo
Low Agogo
Cabasa
Maracas
Short Whistle
Long Whistle
Short Guiro
Claves
Hi Wood Block
Low Wood Block
Mute Cuica
Open Cuica
Mute Triangle
Open Triangle
030-MIDI: 61
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
General MIDI Level 2
u
Published in 1999-11-15, extends GM Level 1
u
Support up to 2 simultaneous percussion kits
u
New control change messages (Decay time, Vibrato
rate, Vibrato depth, Vibrato delay)
u
Defines universal SysEx messages, mainly for tuning,
reverb and chorus settings
u
Recommends response behavior of some messages
u
Logo:
030-MIDI: 62
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
SMF: Standard MIDI Files
u
Specifies how the MIDI data stream is stored with
timing information, the .MID stuff
u
Need to encode timing information
u
A chunk-based file format
u
Support tracks
u
Support meta-events
030-MIDI: 63
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
SMF timing
u
MIDI “ticks” is the finest unit of timing
u
Header chunk specifies of number of ticks per quarter
note or ticks per SMPTE frame
u
The Set Tempo meta-event specifies the number of
microseconds per MIDI quarter note
u
The Time Signature meta-event specifies number of
MIDI clocks in a metronome click
u
A system common message also deal with MIDI Time
Code time
030-MIDI: 64
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
SMF formats
Format 0 — most interchangable format
u
one header, one track
Format 1 — vertically one dimensional form
u
one header, one or more tracks
u
a collection of simultaneous tracks
Format 2 — horizontally one dimensional form
u
one header, one or more tracks
u
one independent pattern in each track
030-MIDI: 65
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
SMF meta-events
Format (hex)
FF 00 02 ssss
FF 01 len text
FF 02 len text
FF 03 len text
FF 04 len text
FF 05 len text
FF 06 len text
FF 07 len text
FF 20 01 cc
FF 2F 00
FF 51 03 tttttt
FF 54 05 hr mn se fr ff
FF 58 04 nn dd cc bb
FF 58 02 sf mi
FF 7F len data
Description
Sequence number
Text event
Copyright notice
Sequence/Track name
Instrument name
Lyric
Marker
Cue point
MIDI channel prefix
End of track (mandatory meta-event)
Set tempo, µs per quarter note
SMPTE Offset
Time signature nn/2dd
cc MIDI clock per metronome click
bb notated 32nd note as 24 MIDI clock
Key signature, sf sharps (negative=flats)
mi = h0, 1i ⇒ hmajor, minori
Sequencer-specific meta-event
030-MIDI: 66
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Other parts of
the MIDI specification
MIDI Time Code (MTC) — for synchronization and
control of MIDI devices
MIDI Show Control (MSC) — allow MIDI systems to
communication with and to control dedicated intelligent
control equipment in theatrical, live performance,
multimedia, audio-visual and similar environments
030-MIDI: 67
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Other parts of
the MIDI specification
MIDI Machine Control (MMC) — allow MIDI systems
to communication with and to control some of the more
traditional audio recording and production systems
MIDI Media Adaptation Layer for IEEE-1394 — (Oct
2000) describes how MIDI data is transmitted over
IEEE-1394 (Firewire)
Downloadable Sounds Specification (DLS) — Levels 1,
2, and 2.1, formats for defining musical instruments
using waveform information
030-MIDI: 68
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI: an evaluation
u
Provides a nice framework for musicians to experiment
on musical arrangements and orchestrations
u
Favors piano or keyboard type of instruments
u
Flexible, because it does not specify how an instrument
should sound
u
Too much flexibility, the same sequence can play very
differently under different system configurations
030-MIDI: 69
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
MIDI: an evaluation
u
No standard way of access to synthesizer parameters
u
Lack of bidirectional communication facilities
u
It’s a “standard” anyway (though de facto
/di: ‘fæktou/)
u
Any more?
030-MIDI: 70
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
Section references
u
The Complete MIDI 1.0 Detailed Specification
Version 96.1, MIDI Manufacturers Association
u
General MIDI Level 2
MIDI Manufacturers Association
u
Downloadable Sounds Level 2.1
MIDI Manufacturers Association
MIDI specifications from the source. These are some of the more
readable specifications.
u
http://www.midi.org/
The MIDI Manufacturers Association (MMA) website.
030-MIDI: 71
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap
More references
u
lä
Beyond MIDI: The Handbook of Musical Codes
edited by Eleanor Selfridge-Field
The MIT Press, ISBN 0-262-19394-9
MIDI, although influential, is not the only way music can be
represented in computers. This book introduces readers a number of
musical codes designed for a number of very different purposes.
u
Musicians Make a Standard: The MIDI Phenomenon
Gareth Loy
Computer Music Journal, Vol.9, No.4, Winter 1985.
Quite a nice reference to MIDI that brings you back to the days MIDI
was designed. So, it is outdated. Don’t expect information from the
article to be completely accurate in today’s situations.
030-MIDI: 72
HKU ICOM6018 2006–2007
Multimedia Computing
Dr. YIP Chi Lap