Download presentation
Presentation is loading. Please wait.
1
EE2F2 - Music Technology 5. MIDI
2
A Musical Interface Early synthesisers were often modular designs Sounds were built up by patching together several separate processing blocks To get a really big sound, you could patch together more than one synthesiser To do this, the signals generated by the keyboard must control more than one instrument In the analogue world, this was done with the gate-CV interface In digital synthesisers, it is done using the Musical Instrument Digital Interface (MIDI)
3
MIDI MIDI doesn’t transmit digital audio. What it does transmit is the basic information supplied by the performer: What keys are pressed/released, and when What pedals are pressed etc.
4
MIDI Specification – The Techy Bit Physically MIDI is: A simplex asynchronous serial interface Simplex – data only flows in one direction, from transmitter to receiver Serial – bits of data are transmitted one at a time in series (rather than all at once in parallel) Asynchronous – the duration of each bit is fixed (32 µs for MIDI). Both the transmitter and receiver need a separate accurate clock to measure this duration. No clock signal is transmitted so only a single pair of wires is needed. Baud rate = 31250 bits/second Data is transmitted in 8-bit packets with one start bit, one stop bit and no parity.
5
Digital Serial Communications time LSBMSB Start bit (always 0) Stop bit (always 1) Data bits 320 s 1010 Eg. To transmit (105) 10 = (01101001) 2 Start bit Stop bit 10010110 Start bit detected 48 µs 1 0 32 µs 0 10110
6
MIDI Connections Most MIDI devices have three sockets: MIDI In: Receives MIDI information MIDI Out: Transmits MIDI information MIDI Thru: Repeats exactly the ‘MIDI In’ signal Using the ‘Thru’ socket, more than one instrument can be controlled by a single MIDI output: INOUTTHRUINOUTTHRUINOUTTHRU ABC
7
MIDI Messages All that the physical MIDI interface does is allow the transmission and reception of 8-bit numbers To play music, a language or protocol is needed to make sense of the numbers MIDI uses messages consisting of one or more bytes Most messages use 2 or 3 bytes in this format: Status ByteData Byte 1Data Byte 2 100 Message Type Channel No.Data 1 (0-127)Data 2 (0-127)
8
Status Bytes and MIDI Channels All MIDI messages begin with a status byte The most significant bit of a status byte is always ‘1’, for any other byte, it is ‘0’ Bits 4,5 and 6 of the status byte indicate the message type (giving eight possible messages) The lowest 4 bits hold the channel number MIDI devices can be set to only respond to a particular channel number, allowing up to 16 instruments to be independently controlled from a single MIDI output Status ByteData Byte 1Data Byte 2 100 Message Type Channel No.Data 1 (0-127)Data 2 (0-127)
9
Message Types Message bitsMessage TypeData Byte 1Data Byte 2 000 Note Off Note NumberVelocity 001 Note On Note NumberVelocity 010 Polyphonic Aftertouch Note NumberPressure 011 Control Change Controller Number Value 100 Program Change Program Number (not used) 101 Channel Aftertouch Pressure(not used) 110 Pitch Bend LSByteMSByte 111 System Message Data
10
Note On/Off When a key is pressed, a note-on message is transmitted When a key is released, a note-off message is transmitted C3 60 D3 62 E3 64 F3 65 G3 67 A4 69 B4 71 A#4 70 G#3 68 F#3 66 D#3 63 C#3 61 C2 48 D2 50 E2 52 F2 53 G2 55 A3 57 B3 59 A#3 58 G#2 56 F#2 54 D#2 51 C#2 49 Status ByteData Byte 1Data Byte 2 1 00 Off/On Channel No.Note Number (0-127)Velocity (0-127) 000/1
11
Example No key pressed ActionMIDI messageMIDI Output NothingIdle F3 releasedNote Off, F3, Velocity=55 10000000, 01000001, 00110111 (128, 65, 55) F3 pressedNote On, F3, Velocity=100 10010000, 01000001, 01100100 (144, 65, 100) F3 HeldNothingIdle
12
Control Change Other than the keyboard, several other controls affect the sound e.g. the volume knob, sustain pedal, modulation wheel etc. When any of these controls are adjusted, the new value is transmitted using a control change message. Controller number identifies the control to be altered (e.g. 1 = modulation, 7 = volume) The value can be either: A number between 0 and 127 for continuous controllers Either 0 or 127 indicating ‘off’ and ‘on’ for switches Status ByteData Byte 1Data Byte 2 1 00Channel No.Controller Number (0-127)Value (0-127) 011
13
Program Change Most electronic instruments are capable of producing a variety of sounds Different sounds are stored in memory and are known as programs (or patches, voices etc.) To select a different sound, a program change message is transmitted Note, this is only a two-byte message Status ByteData Byte 1 1 0Channel No.Program Number (0-127) 100
14
Other Messages Aftertouch Polyphonic Aftertouch When a key is held down, pressure sensors can detect how hard it is pressed – this is known as aftertouch Channel Aftertouch Polyphonic aftertouch keyboards measure the pressure for every key. Cheaper keyboards measure the average pressure for the whole keyboard – channel aftertouch. Pitch Bend A special controller that subtly changes the pitch of all notes played on a channel System Messages Various system specific message relating to timing and used for reprogramming synthesisers
15
Early Applications In the early days of MIDI, most instruments had limited polyphony and could only play one voice (patch/program) at a time Using more than one instrument and MIDI connections, performers could: Build up more complex sounds by mixing multiple voices Create keyboard splits and cross-fades Control synthesisers with different devices (e.g. MIDI pedals, guitars, clarinets, violins etc.)
16
Multi-Timbral Instruments INOUTTHRUINOUTTHRUINOUTTHRU MasterChannel 1Channel 2 INOUTTHRU Channel 3 Etc. (i) (ii) INOUTTHRU Master Synthesiser Channel 1 Synthesiser Channel 2 Synthesiser Channel 3 Etc. Single Multi- timbral synthesiser
17
General MIDI In the original MIDI specification, no assumptions were made about the instruments being used in terms of: Program number allocations Controllers Polyphony (how many notes can be played at once) A General MIDI synthesiser (e.g. all sound cards) meets the specification: Fixed program names and controllers 16-channel multi-timbrality 64-note polyphony Channel 10 reserved for drums
18
MIDI, Digital Audio & Computers MIDI transmits performance information between instruments. It does not transmit digital audio Consequently, the bandwidth required is much smaller E.g. AES/EBU (@ 44.1 kHz) – 2822.4 kbit/s MIDI – 31.25 kbits/s General MIDI is an extension to the MIDI language, standardising various aspects NB. MIDI is also an ideal way to interface computers with musical instruments… …more on this next time.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.