MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical...

57
MIDI MIDI
  • date post

    22-Dec-2015
  • Category

    Documents

  • view

    287
  • download

    12

Transcript of MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical...

Page 1: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDIMIDI

Page 2: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

What is MIDI?What is MIDI?

MIDI stands for MIDI stands for MMusical usical IInstrument nstrument DDigital igital IInterfacenterface

Some Clarification:Some Clarification: MIDI doesn’t directly describe MIDI doesn’t directly describe

musical soundmusical sound MIDI is not a languageMIDI is not a language It is a data communications It is a data communications protocolprotocol

Page 3: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

History of MIDIHistory of MIDI

1900s: electronic synthesizers developed1900s: electronic synthesizers developed 1970s: digital synthesizers developed1970s: digital synthesizers developed Each manufacturer used different design Each manufacturer used different design

scheme, with their own keyboard / panelscheme, with their own keyboard / panel At that time, synthesizers were At that time, synthesizers were

monophonicmonophonic With a particular input device, each player With a particular input device, each player

can only run one or two synthesizers at the can only run one or two synthesizers at the same timesame time

To use a wide range of synthesized To use a wide range of synthesized sounds, many players were neededsounds, many players were needed

Page 4: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

History of MIDIHistory of MIDI

People decided to do something about it.People decided to do something about it. 1981, 3 synthesizer companies1981, 3 synthesizer companies

Sequential CircuitsSequential Circuits RolandRoland Oberheim ElectronicsOberheim Electronics

met in to start to discuss the issuemet in to start to discuss the issue 1982, synthesizer companies such as Yamaha, Korg, Ka1982, synthesizer companies such as Yamaha, Korg, Ka

wai joined. wai joined. 1983, full MIDI 1.0 Detailed Specification released1983, full MIDI 1.0 Detailed Specification released

It standardized the It standardized the control signalcontrol signal and and inter-machine comminter-machine communicationunication between synthesizer devices between synthesizer devices

The last official edition incorporated eveThe last official edition incorporated everything through 1996 (still 1.0, version 9rything through 1996 (still 1.0, version 96.1)-- an updated edition is expected in 6.1)-- an updated edition is expected in 20042004

Page 5: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI PortsMIDI Ports

It use a five-pin DIN connectorIt use a five-pin DIN connector

Inexpensive and readily availableInexpensive and readily available Only 3 pins among 5 are used until Only 3 pins among 5 are used until

nownow Both ends of MIDI line are the same.Both ends of MIDI line are the same.

Page 6: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI PortsMIDI Ports

Serial transfer, data are sent bit Serial transfer, data are sent bit by bitby bit

Hence:Hence:

- transmission rate is slow at only - transmission rate is slow at only 31,250 bits/sec.31,250 bits/sec.

- Too slow to transmit samples in - Too slow to transmit samples in real-time real-time - have to do off-line sample dump- have to do off-line sample dump

Page 7: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI InterfaceMIDI Interface

MIDI In MIDI In MIDI data enters each item of MIDI equipment MIDI data enters each item of MIDI equipment

through the MIDI In port. through the MIDI In port. MIDI Out MIDI Out All the MIDI data generated by individual pieces of All the MIDI data generated by individual pieces of

equipment are sent out through the MIDI Out port. equipment are sent out through the MIDI Out port. A common error for MIDI setup is: inverted A common error for MIDI setup is: inverted

connection of MIDI IN/OUTconnection of MIDI IN/OUT MIDI Thru MIDI Thru These are used to These are used to re-transmit re-transmit all information all information

received at the MIDI In port using the MIDI Thru received at the MIDI In port using the MIDI Thru port connections. port connections.

Often these ports are used to create a chain of Often these ports are used to create a chain of connected devices in a single MIDI data path, called connected devices in a single MIDI data path, called a a 'daisy chain'daisy chain'.'.

Page 8: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Limitations of MIDILimitations of MIDI

1. Slow -- Serial transfer 1. Slow -- Serial transfer When there have too much When there have too much

continuous data transfer (e.g. a continuous data transfer (e.g. a lot of control data)lot of control data) MIDI choke MIDI choke Solution: can be solved by Solution: can be solved by EVENT EVENT

FILTERINGFILTERING e.g., discard less important e.g., discard less important

messages (esp., system exclusive messages (esp., system exclusive messages)messages)

Page 9: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Limitations of MIDILimitations of MIDI

2. Slow -- MIDI is only control 2. Slow -- MIDI is only control information (like Csound score), information (like Csound score), and time is needed to and time is needed to synthesize the soundsynthesize the sound

computation time computation time MIDI lagMIDI lag Solution: users have to avoid Solution: users have to avoid

using patch (instrument) which using patch (instrument) which uses a lot of memory uses a lot of memory

e.g. Cymbal in channel 10 of e.g. Cymbal in channel 10 of Nokia Cellular phoneNokia Cellular phone

Page 10: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Limitations of MIDILimitations of MIDI

3. Sound quality varies3. Sound quality varies It depends on which synthesizer It depends on which synthesizer

you useyou useSolution: Solution: users have to judge by ear, to see users have to judge by ear, to see

which sound is goodwhich sound is good Standardized with Standardized with General MIDIGeneral MIDI

(GM) (discussed later)(GM) (discussed later)

Page 11: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Limitations of MIDILimitations of MIDI

3. Sound quality varies3. Sound quality varies the size of MIDI file is very small!the size of MIDI file is very small!

e.g. : e.g. : a three minutes wav file, 48kHz, stereo: a three minutes wav file, 48kHz, stereo:

size of 40MBsize of 40MB a three minutes MIDI file, with 10 a three minutes MIDI file, with 10

channels:channels: size of 40kbsize of 40kb

It is because MIDI file doesn’t It is because MIDI file doesn’t actually contain audio data, but only actually contain audio data, but only control information (like Csound control information (like Csound score)score)

Page 12: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI Transmission ProtocolMIDI Transmission Protocol

Each message begin with ONE Each message begin with ONE start bitstart bit (logical 0) (logical 0)

Then followed by EIGHT Then followed by EIGHT message bitsmessage bits

End with ONE End with ONE stop bitstop bit (logical 1) (logical 1) Each 8-bit MIDI message byte, Each 8-bit MIDI message byte,

specifies either a status value, or specifies either a status value, or data valuedata value

11 00 LSTMST

Page 13: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message typesMIDI message types

MIDI Messages

Channel

System

Mode

Voice

Real Time

Common

System Exclusive

Page 14: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message typesMIDI message types

1. channel messages:1. channel messages: MIDI channel messages have 4 modes:MIDI channel messages have 4 modes:

Mode 1: Omni On + Poly, Mode 1: Omni On + Poly, usually for testing devicesusually for testing devices Mode 2: Omni On + Mono, Mode 2: Omni On + Mono, has little purposehas little purpose Mode 3: Omni Off + Poly, Mode 3: Omni Off + Poly, for general purposefor general purpose Mode 4: Omni Off + Mono, Mode 4: Omni Off + Mono, for general purposefor general purpose

where:where: i. i. Omni On/Off:Omni On/Off:

respond to all messages regardless of their channelrespond to all messages regardless of their channel ii. ii. Poly/Mono:Poly/Mono:

respond to multiple/single notes per channelrespond to multiple/single notes per channel

Page 15: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message typesMIDI message types

2. channel voice messages2. channel voice messages Carries the Carries the MUSICAL COMPONENTMUSICAL COMPONENT of of

a piecea piece usually has 2 types:usually has 2 types:

i. i. statusstatus byte: byte: the first 4 most significant bits identify the the first 4 most significant bits identify the

message type, message type, the 4 least significant bits identify which the 4 least significant bits identify which

channel is to be affectedchannel is to be affected ii. ii. data data byte: byte:

the most significant bit is 0, indicating a data the most significant bit is 0, indicating a data byte. byte.

The rest are data bitsThe rest are data bits

00 dd dd dd dd dd dd dd

mm mm mm mm cc cc cc cc

Page 16: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

1st byte: Status byte1st byte: Status byte

1001 means “note on”, 1001 means “note on”, cccc is the binary representation of the messacccc is the binary representation of the messa

ge ge channelchannel

MIDI message types: MIDI message types: channel voice messageschannel voice messages

a. Note Ona. Note On To start a note, with particular pitch To start a note, with particular pitch

and velocity, on a particular and velocity, on a particular channelchannel

11 00 00 11 cc cc cc cc

Page 17: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: channel voice messageschannel voice messages

a. Note Ona. Note On 2nd byte: Pitch Data byte2nd byte: Pitch Data byte

0 means “it is a data byte” 0 means “it is a data byte” ddddddd is the binary representation of the ddddddd is the binary representation of the pitcpitc

h.h. (decimal 0-127). (decimal 0-127). A particular MIDI note number does not designA particular MIDI note number does not design

ate a particular pitch. ate a particular pitch. But most commonly, for example, for GM, 60 = But most commonly, for example, for GM, 60 =

Middle C (C4), then 59 = B just below middle C Middle C (C4), then 59 = B just below middle C (B3), 62 = D just above middle C (D4).(B3), 62 = D just above middle C (D4).

00 dd dd dd dd dd dd dd

Page 18: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: channel voice messageschannel voice messages

a. Note Ona. Note On 3rd byte: Velocity Data byte3rd byte: Velocity Data byte

vvvvvvv is the binary representation of vvvvvvv is the binary representation of velocvelocityity (loudness) of the note (decimal 0-127). (loudness) of the note (decimal 0-127).

The velocity value does not specify a particThe velocity value does not specify a particular loudness. It depends on velocity map of ular loudness. It depends on velocity map of the synthesizer/sampler, but 0 is typically silthe synthesizer/sampler, but 0 is typically silence and 127 is typically loudest.ence and 127 is typically loudest.

00 vv vv vv vv vv vv vv

Page 19: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: channel voice messageschannel voice messagesb. Note Offb. Note Off To end a note, with particular pitch, on a To end a note, with particular pitch, on a

particular channelparticular channel Its structure is very similar to Note On, except Its structure is very similar to Note On, except

that the 1st byte (status byte) is that the 1st byte (status byte) is 10001000cccc.cccc. Note off message will stop a presently playing Note off message will stop a presently playing

note of the same pitch. note of the same pitch.

The velocity data byte of note off, however, does The velocity data byte of note off, however, does not mean “to end a note with a particular not mean “to end a note with a particular velocity”. velocity”.

It describes how toIt describes how to release release a note instead. a note instead. For example, end velocity = 127, means to For example, end velocity = 127, means to

release the note immediately. End velocity = 0 release the note immediately. End velocity = 0 means to die away slowly.means to die away slowly.

““End velocity” is not implemented on many End velocity” is not implemented on many synthesizerssynthesizers

Page 20: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: channel voice messageschannel voice messages

c. Program Changec. Program Change Assign particular patch (instrument) Assign particular patch (instrument)

to a channelto a channel Usually, synthesizers have assigned Usually, synthesizers have assigned

““program numbersprogram numbers” to each patch” to each patch The manufacturer decides how to The manufacturer decides how to

assign which number to which patch assign which number to which patch (GM has a table to standardize this)(GM has a table to standardize this)

1st byte: 1st byte: Status byteStatus byte 1100cccc 1100cccc 2nd byte: program number data 2nd byte: program number data

bytebyte 0ddddddd 0ddddddd

Page 21: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: channel voice messageschannel voice messagesc. Program Changec. Program Change Some synthesizer have less than 128 Some synthesizer have less than 128

patchespatches They will ignore the program number assigned, They will ignore the program number assigned,

which are too largewhich are too large Some synthesizers have more than 128 Some synthesizers have more than 128

possible patches. possible patches. User can use any of the 128 patches at the User can use any of the 128 patches at the

same time same time But not more than that 128 patches at the same But not more than that 128 patches at the same

timetime They can choose a different setting by selecting They can choose a different setting by selecting

a different BANK.a different BANK.

Page 22: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: channel voice messageschannel voice messagesd. Control Changed. Control Change Assigns some effect to the sound in the Assigns some effect to the sound in the

channelchannel 1st byte: 1st byte: Status byte Status byte 1011cccc 1011cccc 2nd byte:2nd byte: control change type control change type

0ddddddd0ddddddd 3rd/4th byte: control change value3rd/4th byte: control change value 0ddddddd 0ddddddd

We can use a different controller hardware We can use a different controller hardware to input control changesto input control changes for example, modulation wheel, foot pedalfor example, modulation wheel, foot pedal

Page 23: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: channel voice messageschannel voice messagese. Pitch Bende. Pitch Bend

1st byte: 1st byte: Status byte Status byte 1110cccc 1110cccc 2nd byte: pitch bend value 2nd byte: pitch bend value

(least significant 7 bits) (least significant 7 bits) 0ddddddd 0ddddddd 3nd byte: pitch bend value 3nd byte: pitch bend value

(most significant 7 bits) (most significant 7 bits) 0ddddddd 0ddddddd data bytes usually of have14 bits of resolutiondata bytes usually of have14 bits of resolution describes the pitch bend of a played notedescribes the pitch bend of a played note

e.g. while playing a middle C notee.g. while playing a middle C notea Pitch bend message, of data “-100”a Pitch bend message, of data “-100”will bend the middle C a bit downward, toward Bwill bend the middle C a bit downward, toward B

The amount of bending, depends of different The amount of bending, depends of different synthesizer settingssynthesizer settings

Page 24: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: System messagesSystem messages

System messages affect the entire System messages affect the entire device, regardless of the channel.device, regardless of the channel.

For system message:For system message: the most significant 4 bits are always the most significant 4 bits are always

1111, 1111, the least significant 4 bits will identify the least significant 4 bits will identify

the TYPE of the message. the TYPE of the message. Since system messages affect Since system messages affect all channelsall channels. . (No need to use 4 bits to specify which (No need to use 4 bits to specify which

channel is affected.)channel is affected.)

11 11 11 11 tt tt tt tt t = type

Page 25: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: System messagesSystem messages

1. real-time system messages1. real-time system messages co-ordinate and synchronize co-ordinate and synchronize

the timing of clock-based MIDI the timing of clock-based MIDI devicesdevices

Usually sent at Usually sent at regular regular intervalsintervals, to ensure that every , to ensure that every device in a MIDI system device in a MIDI system marches to the same beatmarches to the same beat

Page 26: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: System messagesSystem messages

1. real-time system messages1. real-time system messagesa. Timing Clocka. Timing Clock 1st byte: 1st byte: Status byteStatus byte 11111 11111

000000 sent at sent at regular intervalsregular intervals (e.g. 24 (e.g. 24

per quarter note for tpq=24)per quarter note for tpq=24) sent sent by masterby master clock, clock, toto the othe the othe

r r slaveslave devices devices provides timing reference for the provides timing reference for the

slave devicesslave devices

Page 27: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: System messagesSystem messages

1. real-time system messages1. real-time system messagesb. Startb. Start 1st byte: 1st byte: Status byteStatus byte 11111010 11111010 Direct slave devices to start playback from Direct slave devices to start playback from

time 0time 0c. Stopc. Stop 1st byte: 1st byte: Status byteStatus byte 11111100 11111100 direct slave devices to stop playback direct slave devices to stop playback song position value song position value doesn’t changedoesn’t change

can restore the playback at the place can restore the playback at the place where it stops with the “continue message”where it stops with the “continue message”

d. Continued. Continue 1st byte: 1st byte: Status byteStatus byte 11111011 11111011 direct slave devices to start playback from the direct slave devices to start playback from the

present “present “song position value”song position value”

Page 28: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: System messagesSystem messages

1. real-time system messages1. real-time system messages

e. System Resete. System Reset 1st byte: 1st byte: Status byteStatus byte

1111111111111111 devices will return the control value devices will return the control value

to default setting.to default setting. e.g. reset MIDI mode / program e.g. reset MIDI mode / program

number assigned to patchnumber assigned to patch

Page 29: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: System messagesSystem messages2. System Exclusive messages2. System Exclusive messages MIDI specification can’t address every unMIDI specification can’t address every un

ique need of each MIDI deviceique need of each MIDI device leave room for “device-specific data”leave room for “device-specific data” sysEx message are sysEx message are unique unique to a to a specific specific

manufacturermanufacturer 1st byte: 1st byte: Status byte Status byte 11110000 11110000 2nd byte: 2nd byte: manufacturer ID, manufacturer ID,

e.g. 1 = sequential, 67=Yamahae.g. 1 = sequential, 67=Yamaha

3rd byte (3rd byte (onwardsonwards)): data byte(s): data byte(s)

Page 30: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI message types: MIDI message types: System messagesSystem messages

3. common system messages3. common system messagesd. End of Exclusive (EOX)d. End of Exclusive (EOX) System Exclusive messageSystem Exclusive message can can

carries any number of bytescarries any number of bytes No other message can arrive untNo other message can arrive unt

il it endsil it ends EOX will be used to indicate that EOX will be used to indicate that

a sysEx message is endeda sysEx message is ended 1st byte: 1st byte: Status byteStatus byte 11110111 11110111

Page 31: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Running StatusRunning Status

Not a type of MIDI messageNot a type of MIDI message It is a short-cut techniqueIt is a short-cut technique A series of notes are A series of notes are

represented with a single status represented with a single status byte byte

Better transfer efficiencyBetter transfer efficiency e.g. very useful for drum-set e.g. very useful for drum-set

patterns…etcpatterns…etc

Page 32: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Running StatusRunning Status

144144 6060 3939 144144 6767 3737

144144 6060 3939

144144 6464 4343

6767 37376464 4343

Series of messages with Status Bytes

Running Status

1st message, C note on, velocity= 39

2nd message, E note on, velocity= 43

3rd message, G note on, velocity= 37

1st message, C note on, velocity= 39

2nd message, E note on, velocity= 43

3rd message, G note on, velocity= 37

Page 33: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

General MIDIGeneral MIDI

Optional to manufacturerOptional to manufacturer But it is a good addendum But it is a good addendum

to the MIDI 1.0 Detailed Specificationto the MIDI 1.0 Detailed Specification

MIDI itself doesn’t specify message or MIDI itself doesn’t specify message or datadata

Program number 1 Program number 1 What does it mean? What does it mean? Piano? Flute? It is up to Manufacturer’s Piano? Flute? It is up to Manufacturer’s

decision!decision! Program number 3 can be “flute” on Program number 3 can be “flute” on

synthesizer A, but can be “horn” on synthesizer A, but can be “horn” on synthesizer B!synthesizer B!

Page 34: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

What is General MIDIWhat is General MIDI

So, we have GMSo, we have GM Define a set of available sound Define a set of available sound

patches, with their patches, with their program numbers program numbers fixedfixed Sequence recorded on one GM Sequence recorded on one GM

synthesizer is then recognizable synthesizer is then recognizable on other synthesizers.on other synthesizers.

Page 35: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

General MIDI specificationGeneral MIDI specification

1. 1. Instrument Patch MapInstrument Patch Map a list of 128 sounds, with assigned a list of 128 sounds, with assigned

program numbersprogram numbers Loosely grouped into 16 families, each Loosely grouped into 16 families, each

with 8 variationswith 8 variations

2. 2. Percussion Key MapPercussion Key Map3. Other specification generally follow 3. Other specification generally follow

MIDI 1.0MIDI 1.0 32 simultaneous notes32 simultaneous notes MIDI Channels: 16 MIDI Channels: 16 60 = Middle C60 = Middle C

Page 36: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

General MIDI specificationGeneral MIDI specification

Instrument Patch MapInstrument Patch Map Family Classification Family Classification 1-8 1-8 Piano Piano 9-16 9-16 Pitched Percussion Pitched Percussion 17-24 Organ 17-24 Organ 25-32 Guitar 25-32 Guitar 33-40 Bass 33-40 Bass 41-48 Strings 41-48 Strings 49-56 Ensemble 49-56 Ensemble 57-64 Brass57-64 Brass 65-72 Reed 65-72 Reed 73-80 Pipe 73-80 Pipe 81-88 Synth Lead81-88 Synth Lead 89-96 Synth Pad89-96 Synth Pad 97-104 Synth Effects 97-104 Synth Effects 105-112 Ethnic105-112 Ethnic 113-120 Percussive 113-120 Percussive 121-128 Sound Effects121-128 Sound Effects

Page 37: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

General MIDI 2General MIDI 2

Now we have Now we have GM2GM2 already already Increases:Increases:

number of available soundsnumber of available sounds amount of control available for sound amount of control available for sound

editing / musical performance. editing / musical performance. For example:For example:

control number 75 = Decay Timecontrol number 75 = Decay Time control number 76 = Vibrato Rate (cc#76)control number 76 = Vibrato Rate (cc#76)

All GM2 devices are also fully All GM2 devices are also fully compatible with GM1.compatible with GM1.

Page 38: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Other General MIDI standardsOther General MIDI standards

1. GM Lite1. GM Lite Based on the assumption that thBased on the assumption that th

e reduced performance may be e reduced performance may be acceptable acceptable - For example, different in specificati- For example, different in specificati

on compared with GM1:on compared with GM1: 16 16 (half GM1) simultaneous notes(half GM1) simultaneous notes 11 Simultaneous Percussion Kits Simultaneous Percussion Kits

(GM1 has two – channel 11 can be set a(GM1 has two – channel 11 can be set as percussion kit if necessary) s percussion kit if necessary)

Page 39: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Other General MIDI standardsOther General MIDI standards

2. Scalable Polyphony MIDI (SP-MIDI) 2. Scalable Polyphony MIDI (SP-MIDI) composers can indicate how MIDI data composers can indicate how MIDI data

should be performed by devices, with should be performed by devices, with different polyphony.different polyphony.

by eliminating certain instrument parts, by eliminating certain instrument parts, chosen by the composer.chosen by the composer.

Widely used for Widely used for mobile cellular phonesmobile cellular phonese.g. for a SP-4 polyphony can be preset for a e.g. for a SP-4 polyphony can be preset for a

Nokia 3200 phone:Nokia 3200 phone: it have 4 channel polyphonyit have 4 channel polyphony with melody line be the 1st prioritywith melody line be the 1st priority channel 10 be the 2nd priority channel 10 be the 2nd priority and the rest be the 3rd priorityand the rest be the 3rd priority

Page 40: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Limitations of GMLimitations of GM

1. Dynamics 1. Dynamics How should a note of “pressure 120” How should a note of “pressure 120”

on program number 1 be performed?on program number 1 be performed? Different samplers use different Different samplers use different

voice samplesvoice samples what if manufacturer A uses a what if manufacturer A uses a

Steinway piano, manufacturer B Steinway piano, manufacturer B uses a Yamaha piano?uses a Yamaha piano?

The The dynamicsdynamics can be very different! can be very different!

Page 41: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Limitations of GMLimitations of GM

2. Instrument definition2. Instrument definition We know what is a “flute”We know what is a “flute”

But, what is “FX2 (sound track)” ?But, what is “FX2 (sound track)” ?

?

Page 42: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI HardwareMIDI Hardware

a. Pure Musical Input Devicesa. Pure Musical Input Devices Most common: Keyboard Most common: Keyboard

Optional FeaturesOptional Featuresi. i. Note Polyphony:Note Polyphony:

Nowadays, most keyboard have polyphony Nowadays, most keyboard have polyphony (a $200 keyboard made in the Mainland, (a $200 keyboard made in the Mainland, can have 10 polyphony)can have 10 polyphony)

ii. ii. Touch responseTouch response A keyboard can sense different levels of A keyboard can sense different levels of

input pressureinput pressure

Page 43: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI HardwareMIDI Hardware

Other possible pure input MIDI I/O dOther possible pure input MIDI I/O devices:evices: Guitar, Flute, Violin, DrumsetGuitar, Flute, Violin, Drumset

Page 44: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI HardwareMIDI Hardware

b. Other Musical Input Devices b. Other Musical Input Devices Keyboard + synthesizer Keyboard + synthesizer = keyboard synthesizer= keyboard synthesizer

have real-time audio outputhave real-time audio output Some keyboard synthesizers support DSP (Digital Some keyboard synthesizers support DSP (Digital

Signal Processing)Signal Processing) Which gives more available effects Which gives more available effects e.g. phaser, choruse.g. phaser, chorus

Keyboard + synthesizer + sequencer /sampleKeyboard + synthesizer + sequencer /sampler/effects processors…. r/effects processors….

= keyboard workstation= keyboard workstation you can then compose and make music,you can then compose and make music, just with a keyboardjust with a keyboard

Page 45: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI HardwareMIDI Hardware

c. Controllers c. Controllers Numbered controllersNumbered controllers

e.g. volume panele.g. volume panel

Continuous ControllersContinuous Controllers You can roll the controller to get a particular You can roll the controller to get a particular

valuevalue e.g. modulation wheele.g. modulation wheel

On/Off controllers On/Off controllers can send two different values (e.g. 0/127)can send two different values (e.g. 0/127) e.g. foot pedal (sustain pedal)e.g. foot pedal (sustain pedal)

Page 46: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI HardwareMIDI Hardware

c. Controllers c. Controllers bidirectional controllersbidirectional controllers

it will jump back to the center it will jump back to the center when releasedwhen released e.g.. pitch wheele.g.. pitch wheel

universal MIDI controller universal MIDI controller

Can control all types of control eventsCan control all types of control events In some products, the panel can synchronize In some products, the panel can synchronize

with the software: the panel will move if you with the software: the panel will move if you adjust parameters in the software.adjust parameters in the software.

Page 47: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI HardwareMIDI Hardware

d. Synthesizer d. Synthesizer Generates sound from scratchGenerates sound from scratch

Method:Method:1. Wavetable/direct synthesis. 1. Wavetable/direct synthesis.

store the series of numbers the represent the amplitude store the series of numbers the represent the amplitude values of a waveform, at each sample interval, then recall values of a waveform, at each sample interval, then recall the stored value to produce soundthe stored value to produce sound

2. frequency modulation (FM) synthesis2. frequency modulation (FM) synthesis Simple waveforms change the frequencies of other simple Simple waveforms change the frequencies of other simple

waveform, produce a new waveform.waveform, produce a new waveform.3. additive synthesis3. additive synthesis

add together a number of harmonics at different frequencyadd together a number of harmonics at different frequency4. subtractive synthesis4. subtractive synthesis

starts with a waveform that is already rich in harmonics, starts with a waveform that is already rich in harmonics, then filter out unwanted harmonics to produce a desired then filter out unwanted harmonics to produce a desired soundsound

5, phase distortion5, phase distortion a simple waveform is altered to produce a more complex a simple waveform is altered to produce a more complex

oneone

Page 48: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI HardwareMIDI Hardware

Example:Example: Yamaha SY85 Synthesizer Yamaha SY85 Synthesizer What synthesis technique does it use?What synthesis technique does it use?

Plays back samples in attack, and then begins looping Plays back samples in attack, and then begins looping one period of samples for sustain and decay. one period of samples for sustain and decay.

Uses LPF with decreasing cutoff frequency to make Uses LPF with decreasing cutoff frequency to make wavetable output gradually become less bright.wavetable output gradually become less bright.

Uses 5-segment amplitude envelopes for wavetable Uses 5-segment amplitude envelopes for wavetable synthesis.synthesis.

Samplingfor attack

wavetablefor sus/decay

lowpassfilter

out

Page 49: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI HardwareMIDI Hardware

e. Sequencer e. Sequencer replay a sequence of MIDI messagesreplay a sequence of MIDI messages

f. MIDI interfacef. MIDI interface

connect a group of MIDI devices togetherconnect a group of MIDI devices togetherg. sound samplerg. sound sampler

record sound, then replay it on requestrecord sound, then replay it on request Can perform transposition shift of one base sample, Can perform transposition shift of one base sample,

to produce different pitchesto produce different pitches Can take average Can take average

of several samples, of several samples, then produce a then produce a timbre interpolated timbre interpolated output soundoutput sound

Page 50: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI SoftwareMIDI Software

a. Software Sampler a. Software Sampler e.g. Gigastudio, Kontakte.g. Gigastudio, Kontakt

P.S. now, most studio use software samplers for pop song, inP.S. now, most studio use software samplers for pop song, instead of hardware sampler.stead of hardware sampler.

WHY?WHY? Since it is more economical, and more efficient to updateSince it is more economical, and more efficient to update

For example, the hardware sampler Roland XV5080, cost For example, the hardware sampler Roland XV5080, cost HK$17500.HK$17500.

Its additional sound sample sub-cards are very expensive Its additional sound sample sub-cards are very expensive ($2000 for 100 samples)($2000 for 100 samples)

Also, the model of samplers are updated very quickly. For Also, the model of samplers are updated very quickly. For example, the last model XV5050 already cannot use the lexample, the last model XV5050 already cannot use the latest Roland SRX sub-card alreadyatest Roland SRX sub-card already

Page 51: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI SoftwareMIDI Softwarea. Software Samplers a. Software Samplers However, for example, Gigastudio costs around $4However, for example, Gigastudio costs around $4

000 for the software000 for the software A 3GB of additional sound samples only costs arouA 3GB of additional sound samples only costs arou

nd HK$1000. nd HK$1000. All new samples are compatible to latest version siAll new samples are compatible to latest version si

nce version 2.5nce version 2.5

As you can hear in the later section, you will find thAs you can hear in the later section, you will find that the software synthesizer is actually performing at the software synthesizer is actually performing MUCH BETTER than hardware synthesizer OF SIMUCH BETTER than hardware synthesizer OF SIMILAR PRICE RANGE.MILAR PRICE RANGE.

Page 52: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI SoftwareMIDI Software

b. Recording softwareb. Recording software e.g cakewalk sonar, cool ee.g cakewalk sonar, cool e

dit pro , CUbase, logic, protdit pro , CUbase, logic, protoolsools

Much more efficient than uMuch more efficient than using tape recordingsing tape recording

Can redo recording procesCan redo recording processs

Can easily do editingCan easily do editing Also allows effects (reverb, Also allows effects (reverb,

echo, etc)echo, etc)

Page 53: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

MIDI SoftwareMIDI Software

c. Score editor :c. Score editor : e.g. Finale, cakewalk overturee.g. Finale, cakewalk overture you can “listen to the score” by you can “listen to the score” by

playback optionplayback option neat and tidyneat and tidy can do transposition/chord can do transposition/chord

identification….etc, more easily identification….etc, more easily than using handwritten scorethan using handwritten score

Can input a score with real Can input a score with real instruments, then tidy it up by instruments, then tidy it up by quantizationquantization

Page 54: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Example of a recording Example of a recording processprocess

This is a “Daisy-chain network”, where This is a “Daisy-chain network”, where device are connected seriallydevice are connected serially

Page 55: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Example of Comparing Example of Comparing different sampler performancedifferent sampler performance You can hear the difference between You can hear the difference between

different synthesizers/modules, for different synthesizers/modules, for playing the same MIDI file.playing the same MIDI file.

1. Yamaha PCI FM Synthesizer 1. Yamaha PCI FM Synthesizer

2. Roland XV-5050 (JV series)2. Roland XV-5050 (JV series)

3. Gigastudio3. Gigastudio

And one more demo for Gigastudio:And one more demo for Gigastudio:

Page 56: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Applications of MIDIApplications of MIDI

1. Studio Production1. Studio Production recording, playback, cut-and-splice recording, playback, cut-and-splice

editingediting creative control/effect can be addedcreative control/effect can be added

2. Making score2. Making score with score editing software, MIDI is with score editing software, MIDI is

excellent in making scoreexcellent in making score some MIDI software provide function of some MIDI software provide function of

auto accompaniment/intelligent chord auto accompaniment/intelligent chord arrangementarrangement

3. Learning3. Learning You can write a MIDI orchestra, who are You can write a MIDI orchestra, who are

always eager to practice with you!always eager to practice with you!

Page 57: MIDI. What is MIDI? MIDI stands for Musical Instrument Digital Interface MIDI stands for Musical Instrument Digital Interface Some Clarification: MIDI.

Applications of MIDIApplications of MIDI

4. Commercial products4. Commercial products mobile phone ring tones, music box mobile phone ring tones, music box

music…..music…..

5. Musical Analysis 5. Musical Analysis MIDI has detailed parameters for every MIDI has detailed parameters for every

input noteinput note It is useful for doing researchIt is useful for doing research For example, a pianist can input his For example, a pianist can input his

performance with a MIDI keyboard, then performance with a MIDI keyboard, then we can analyze his performance style we can analyze his performance style by the parametersby the parameters