Presentation is loading. Please wait.

Presentation is loading. Please wait.

MIDI Musical Instrument Digital Interface A digital communication protocol allowing devices to send and/or respond to instructions.

Similar presentations


Presentation on theme: "MIDI Musical Instrument Digital Interface A digital communication protocol allowing devices to send and/or respond to instructions."— Presentation transcript:

1 MIDI Musical Instrument Digital Interface A digital communication protocol allowing devices to send and/or respond to instructions

2 Function of MIDI n The MIDI protocol allows devices to exchange various types of instructions n MIDI data is not an audio signal n As a comparison: – a tape or CD contains a description of an audio signal – a printed page of music contains instructions that a (human) instrumentalist is trained to carry out – a MIDI file contains instructions that a (computer) instrumentalist is trained to carry out

3 Function of MIDI n Thus, a MIDI file is small and easily transmitted n It contains instructions only, leaving the creation of the actual audio signal to the receiving device n Instruction messages are transmitted in the form of binary numbers n Binary numbers may be transmitted by alternating voltage between set high and low levels – high = 1 – low = 0

4 Connecting MIDI Instruments n Typically, a MIDI instrument has three MIDI ports – IN, OUT and THRU n In a simple configuration, one main instrument will act as the master to a number of slave instruments.

5 Connecting MIDI Instruments n The sound of the master may be enhanced by doubling its sound with a slave instrument that is set to play a different type of sound. n This is accomplished by connecting the MIDI OUT Of the master to the MIDI IN of the slave. master slave

6 Connecting MIDI Instruments n To enhance the sound still further, more slave devices may be added by “daisy chaining” more instruments together via the MIDI THRU port. n The MIDI THRU port simply passes on what comes to the instrument via the IN port. master slave 1slave 2slave n...

7 Connecting MIDI Instruments n In some situations, daisy chains can lead to delays at the end of the chain. n A tidier configuration is to use a MIDI Thru Box master

8 Connecting MIDI Instruments n To play an arrangement, a sequencer can send MIDI to a group of instruments. sequencer n MIDI has 16 channels n Each instrument can be set to play a different sound and base channel, with each part corresponding to a different channel. Channel 1Channel 2Channel 16...

9 Configuring MIDI Instruments n MIDI came into being at the same time as the personal computer. Soon, programmers began writing MIDI software. A MIDI interface translates computer code to MIDI code

10 MIDI Software n A software sequencer could have more features than a dedicated hardware sequencer, and have more memory. n Editor/Librarian software could allow complex synthesizer patches to be created more intuitively. – Patches could be arranged and stored in banks – Groups of banks could be stored in a computer and transferred to the instrument n Notation software could translate MIDI information into notated music, as well as transpose, create parts, allow easy creation of alternate arrangements, etc.

11 Configuring MIDI Instruments n The most flexible configuration makes use of a MIDI patchbay MIDI patchbay With successive IN/OUT port pairs, each device connected to the patchbay can send and receive information Tone modules are synthesizers without keyboards A master controller keyboard produces no sound, but only sends MIDI information Many devices can play on more than one MIDI channel A patchbay allows a software synthesizer to address both port and channel number Thus, the number of available channels becomes * 16

12 Computer as Sound Generator n It is also possible to use the computer as a sound generating instrument n A MIDI interface is often combined with a sound card that has banks of wavetable sounds n Apple’s QuickTime, a free download, comes bundled with a set of instrument sounds, which are used by the computer to play MIDI files: n The QuickTime instruments also function as an internet browser plug-in, allowing web pages to play MIDI files on a computer that has the plug-in installed. J.S. Bach, Trio Sonata BWV.525

13 The MIDI Language n MIDI messages fall into two main categories: – Channel (pertaining to information on a particular channel) n Voice n Mode – System (pertaining to the system as a whole) n Real time n Common n System Exclusive (SysEx)

14 Channel Voice Messages n MIDI is transmitted in 10-bit bytes start stop n The first and last bits are start and stop bits, used to identify the beginnings and ends of bytes MIDI n The actual MIDI information is in the middle eight bits 1 0

15 Channel Voice Messages n There are two types of MIDI Channel Voice bytes: status bytes and data bytes n A status byte determines the type of message and the channel (what? and where?) – The MSB of a status byte is 1: 1nnnnnnn n A data byte gives a value (how much?) – The MSB of a data byte is 0: 0nnnnnnn – With seven bits following the MSB, a data byte’s range of expressible values is 0-127

16 Channel Voice Messages n A Channel Voice message consists of one status byte and at least one data byte n The status byte is divided into nibbles: 1nnn nnnn message type channel no. (0-15) n With three bits to define message types, there are eight possible types of messages. Seven are implemented.

17 Channel Voice Messages 1000nnnn 0nnnnnnn Note Off status note number velocity two data bytes n Velocity: how quickly a note is released – A higher number is a quicker release, corresponding to a note fading quickly – A lower number is a slower release, corresponding to a note fading slowly Middle C = MIDI note number 60

18 Channel Voice Messages 1001nnnn 0nnnnnnn Note On status note number velocity two data bytes n Velocity: how quickly a note is depressed – A higher number results in a louder tone – A velocity value of 0 is the same as a Note Off.

19 Channel Voice Messages 1010nnnn 0nnnnnnn Polyphonic Key Pressure (Poly Aftertouch) status note number pressure two data bytes n Pressure applied to the keys is mapped to some modulation parameter (within the particular instrument) n Thus, each key can generate its own degree of modulation n This is a feature found mainly in higher-end instruments (separate sensors must be installed for each key)

20 Channel Voice Messages 1101nnnn 0nnnnnnn Channel Key Pressure (Channel Aftertouch) status pressure one data byte n “Poor person’s” aftertouch – less costly to implement, and thus found on more instruments than poly aftertouch n One pressure value is applied to all notes on a given channel n The value is read from the key that is being pressed hardest

21 Channel Voice Messages 1100nnnn 0nnnnnnn Program Change status program number one data byte n Change to a specified patch number on an instrument n With one data byte, up to 128 patch numbers may be specified n A separate message type (that we will see shortly) can allow specification of more than 128 patches

22 Channel Voice Messages 1110nnnn 0nnnnnnn Pitch Bend status pitch bend value, LSB two data bytes n Pitch bend has 14 bits of resolution, a value range of 0 to 16,383. n The range of pitch shift is programmable within an instrument, typically from one semitone to an octave above and below the note being bent. n 64 values within the range of a semitone would be acceptable, but within the range of an octave there would be audible discontinuities (“zipper noise”). Hence, two data bytes for better resolution. n Pitch bend is a special class of controller (the next message type). It is its own message type so that the two data bytes may be combined into one value. pitch bend value, MSB

23 Channel Voice Messages 1011nnnn 0nnnnnnn Control change status Controller number two data bytes Controller value Controllers modify the sound of a sounding note The controller number specifies a stream of information. Controller information is commonly described either in terms of what type of device is producing the stream (pedal, wheel, slider, etc.) or what type of sound parameter is being controlled (volume, tremolo, pan position, etc.) The first data byte defines the control stream being addressed, the second data byte determines its value (or position).

24 Channel Voice Messages Control change The implementation of controller messages was meant to be open-ended, to allow the creation of new types of modulation. Many controller numbers remain undefined. Controller numbers 120-127 are reserved for another MIDI message type (our next topic), leaving 120 definable controllers. The sound parameter affected by a physical controller may vary from instrument to instrument, or may be mappable within a particular instrument.

25 Channel Voice Messages Control change Controllers 64-69 are typically ON/OFF controllers. Value of 0 = OFF; Value of 127 = ON ControllerNumber Sostenuto (damper) pedal66 Soft pedal67

26 Channel Voice Messages Control change Sometimes more resolution than 0-127 is needed.

27 Channel Voice Messages Control change Another example addresses the problem of instruments that have more than 128 patches. Such an instrument will have a number of banks, with each bank containing 128 patches. Controller 0 typically defines bank number. A bank select message (controller 0) followed by a program change message allows selection of this many patches: * 128


Download ppt "MIDI Musical Instrument Digital Interface A digital communication protocol allowing devices to send and/or respond to instructions."

Similar presentations


Ads by Google