midi
[To find out about different kinds of MIDI equipment, click here.]

Due to the large number of requests received, this site's information about the MIDI protocol has been extended in this new page. It now covers everything that a beginner will need to get on with their music production and more.

midi definition

MIDI is the industry standard communication protocol that allows electronic musical instruments to communicate with each other.

Musical Instrument Digital Interface (MIDI) is the industry standard communication protocol that allows electronic musical instruments to communicate and interact with each other. The first thing to understand about the MIDI protocol is that it does not deal with sounds directly. This means that no audio is passed through MIDI cables. Instead, the information that it conveys simply consists of different kinds of timed events, or MIDI messages, that control sounds made from external sources. These messages can control a wide variety of things, from making a synthesiser play notes, or change it's sound bank, to controlling, or even simulating audio effects.

top

midi channels

Every piece of MIDI-capable equipment will have at least one set of sixteen MIDI channels, through which it can independantly communicate in two directions simultaneously.

Every piece of MIDI-capable equipment will have at least one set of sixteen MIDI channels, through which it can independently communicate in two directions simultaneously. Some equipment provide more than one interface (set of sixteen channels), but one set of sixteen is the standard amount. This allows a sequencer to control sixteen different pieces of MIDI equipment simultaneously. Alternatively, it could interact with all sixteen sounds on a sixteen channel, multitimbral synthesiser.

All that is required to allow two pieces of equipment to communicate with each other, is the setting of their MIDI channels to the same channel. For example, if you have a sequencer with a MIDI track with notes for a bass sound set to output (send) on MIDI channel one, then simply set your sound generator that has the bass sound to recieve from MIDI channel one. If you have some drum patterns set to MIDI channel ten on the sequencer, then set your drum machine to recieve data from MIDI channel ten. Simple.

If you have more than a few multitimbral synthesisers, these sixteen channels can run out quite quickly. One workaround is to allow your sounds to share MIDI channels, by restricting them in the synthesiser to only play half of the keyboard range each, ie. the bass sound could be restricted to the lower half of the keyboard, while the strings sound could only play notes from the upper half. A far more common solution is to use either a stand-alone MIDI patch bay, or a MIDI interface for a computer. These provide up to eight sets of sixteen MIDI channels, allowing 128 independant communications to be made simultaneously.

top

midi connections

MIDI in sockets should be connected to MIDI out and/or MIDI thru sockets...

MIDI-capable equipment will usually have one MIDI input, one MIDI output and often a MIDI thru socket too, which allows any MIDI signals being received at the input to be passed on un-altered to another MIDI-equipped unit. Some equipment have a combined out/thru socket, which merge any incoming data with signals being generated by the unit itself. MIDI in sockets should be connected to MIDI out and/or MIDI thru sockets, so that signals going out of one unit go in to another.

In a small studio with only a few pieces of equipment, it is quite possible to work from one MIDI input and output by assigning each item to work on different MIDI channels and connecting the units together in a MIDI chain, ie. sequencer out to unit one in, unit one thru (carrying sequencer signal) to unit two, etc. The picture below shows an example setup using this method.

An example MIDI setup
midi connections - example setup
top

midi messages

The MIDI protocol allows the communication of several different types of MIDI messages between equipment.

The MIDI protocol allows the communication of several different types of MIDI messages between equipment. The main similarity to these messages is that they all contain timing data, a MIDI channel number and (almost) all have a data value range of just 128, from 0 to 127. Although this provides a very low resolution, it does work adequately for most purposes. The timing data is generated at certain intervals and is expressed as having a 96 Pulses Per Quarter Note (PPQN) resolution. In layman's terms, this means that it can handle MIDI message events at a rate of up to 96 messages in every beat, or quarter note.

midi messages  •  program change

Program change messages ... are used to change from one sound to another at specific parts of a song.

Program change messages change the patch, or 'programmed' sound of sound generators, or the effects preset of effects units. They are used to change from one sound to another at specific parts of a song. Note that the sound's parameters are not altered during this procedure, but instead the whole sound is changed, as if you had selected a different sound from your keyboard's control panel. Indeed, this is the easiest way to enter the message into a sequencer, ie. set the sequencer to record at the specific point in the song and then change the sound from the control panel.

There is just one extra value that is sent in a program change message and that is the patch number. This is the reason that patches on MIDI sound generators are usually split into banks of (up to) 128 sounds (the maximum MIDI value). To change to a sound in a different bank, you need to send a bank change message before sending the program change message.

Program change messages are most useful if you either only have a few sound generators or effects units, or do not have a MIDI patch bay. Used carefully and in the right places, they can allow you to use different sounds and/or effects in different parts of a performance from the same machines. One word of warning though, is to be careful when editing your sounds if you have program change messages in your song - as the patch changes and a new sound loads, you will lose all unsaved edits that you have made to the previous sound.

top

midi messages  •  bank change

A bank change message is very similar to a program change message. It is only needed if your sound generator has more than one bank of sounds, although most do these days. As all MIDI messages have a maximum value of 128, this means that a sound generator can have a maximum number of 128 banks, although it is quite rare to see more than a dozen or so. Each sound bank can have 128 sounds in it, so having 128 banks on a keyboard would mean having a maximum number of 16,384 patches... a somewhat unlikely number.

...a bank change message only changes the sound bank and not the patch number.

Note that a bank change message only changes the sound bank and not the patch number. If you want to select a sound from a different bank with a different patch number to the currently selected one, you will need to first use the bank change message and then a program change message. As with program change messages, there is only one main value passed and that represents the bank number to change to.

midi messages  •  note on and note off

The most commonly used MIDI messages are note on and note off messages. Put simply, a note on message tells a sound generator to start playing its current sound and a note off message tells it to stop playing the sound. These messages are automatically triggered when a key on a MIDI keyboard is pressed and released.

...the note on message actually forces the sound to start its amplifier envelope and the note off message instructs the envelope to enter its release stage.

Note that technically, the sound may not start as soon as a note on message is received and not stop as soon as a note off message is received. This will depend on the sound being played. For example, a string sound may receive a note on message which triggers its amplifier envelope to start, but it may have a long attack and so not be audible at once. Also, it may have a long release setting, which may continue for some time after the note off message is received. Hence, the note on message actually forces the sound to start its amplifier envelope and the note off message instructs the envelope to enter its release stage.

Each note on message has two main parts; the note number and the note velocity. Every note on a full size, 88 key keyboard has been assigned a number. For example, the middle C has a MIDI note number of 60 and this will be the same on all MIDI keyboards. The value for the velocity is automatically calculated when a key is pressed, by how hard it is pressed. These velocity values are converted to note volume information by the sound generator, although it is usually possible to assign other parameters to be affected by them. It is worth pointing out that not all MIDI keyboards are velocity sensitive, in which case every note played is given a note velocity of 64.

top

midi messages  •  aftertouch (key pressure)

Aftertouch, or key pressure, is the name of any pressure that is applied to a MIDI keyboard's keys while notes are being held down.

When a key on a MIDI keyboard has been pressed and held, varying pressure can be applied to it. Aftertouch, or key pressure, is the name of this pressure and its effect will depend on the settings in the sound generator playing the sound. It is most usually set by default to control the sustain level parameter of the amplifier envelope (ie. the volume of the sound), or the cutoff frequency parameter of the filter. Many synthesisers also allow aftertouch data to be assigned to other parameters.

Aftertouch can give the advanced keyboard player a way to add expression to their performances. It can have quite different effects depending on the parameter in the sound generator that it is controlling. For example, when it is set to control the amplitude, a player can give more weight to one (or more) keys in a chord which can change the sound of the chord quite noticeably. Also, when the cutoff frequency is being controlled, applying different pressure to different keys can have the effect of having a separate filter for each key.

...not all MIDI keyboards have the ability to generate aftertouch data...

It should be noted that not all MIDI keyboards have the ability to generate aftertouch data in the same way that not all keyboards can generate velocity data. Usually, if a keyboard is 'touch sensitive', it can generate both of these types of data and if not, it can not generate either, as they use the same pressure sensors to register the data. Note also that unlike channel pressure, aftertouch is generated on a per key basis and therefore consists of many more data events.

midi messages  •  channel pressure

Channel pressure ... conveys the [average] pressure applied to a MIDI keyboard's keys while a key is being held down.

Channel pressure is similar to aftertouch in that it conveys the pressure applied to a MIDI keyboard's keys while a key is being held down. The difference is that instead of using a pressure sensor for each key, it uses one 'global' sensor that generates a value for the overall, or average pressure applied to the keys. As its use requires less sensors, it is more commonly found than aftertouch on lower priced keyboards and it generates less data when used.

It is also most commonly set by default to control the sustain level of the sound's amplifier envelope, or its cutoff frequency. Despite just using one value that is shared across every key (or MIDI channel), it's effect can be very similar to that of aftertouch and it can be used to add expression to a keyboard performance.

top

midi messages  •  pitch bend

Pitch bend messages are transmitted from a MIDI keyboard every time its pitch wheel is moved.

Pitch bend messages are automatically transmitted from a MIDI keyboard every time its pitch wheel is moved. When these messages are received by a sound generator, it simply raises or lowers the sound's pitch accordingly. It is quite common that a sound generator will allow these messages to control other parameters instead of the pitch. This can make the pitch wheel very useful for recording modulation data into a sequencer. Using pitch bend is another way that a keyboard player can apply expression to a performance.

midi messages  •  control change

What parameter each controller controls in a sound generator is defined in the sound generator.

Perhaps the most useful type of MIDI message for sound modulation is the control change message. These messages have two main components; a controller number and a value for that controller. There are dozens of preset controller numbers, ie. controller number one is the controller number that is always transmitted when a modulation wheel on a MIDI keyboard is moved. There are also many user assignable controller numbers. What parameter each controller controls in a sound generator is defined in the sound generator.

The better the sound generator, the more modulation sources can be set on it... each modulation source will have a unique controller number. On the best sound generators, it is possible to freely assign controller numbers to almost every parameter and this allows the freedom to manipulate the sound greatly, either in real-time, or during playback from a sequencer. Using MIDI controllers to modulate different aspects of a sound as a song plays is a great way to add interest to your productions.

[To find out more about modulation, click here.]
top

midi messages  •  nrpn

A non registered parameter number (NRPN) message provides a way to control parameters on a sound generator that does not use standard parameter numbers. They work just the same as standard MIDI controllers, but are specified by individual manufacturers, as opposed to being specified by the MIDI standard.

midi messages  •  system exclusive (sysex)

The final type of MIDI message is called SysEx, which is short for System Exclusive and is by far the most complex. The other types of MIDI messages provide just about every use that a general user may require, but for those that want more, there is SysEx. Basically, it provides a way to pass other kinds of information between MIDI equipment, such as sample waveforms or patch data and also to control parameters in the same way that the controllers do. Strings of SysEx data can be connected, allowing the construction of macro commands to be sent and/or assigned to a MIDI controller unit. The manual creation of SysEx data is beyond the scope of this article and this section should be seen as merely an introduction to it.

top

general midi

General MIDI is a specification that ... standardises the sounds playable from different MIDI sound generators.

General MIDI (GM) is a MIDI specification that MIDI-equipped sound generator manufacturers can choose to follow or not, although most do implement it in one fashion or another. While MIDI is a communication protocol, GM is an attempt to standardise the sounds playable from different MIDI sound generators. It specifies certain things, like the requirement of a minimum polyphony level of 24 simultaneous notes and a totally preset bank of sounds. For example, the first patch in every GM-compatible sound generator should always be an acoustic grand piano.

Note that manufacturers are still free to implement their own versions of each sound, which means that although the first patch will sound something like an acoustic grand piano, some instruments will be more realistic sounding, while others less. Indeed, some manufacturers have implemented their own GM style specifications that surpass the minimum requirements of GM, such as Roland's GS format.

GM also reserves MIDI channel 10 for drum sounds, with most keys on a keyboard being assigned a different drum sound.

GM also reserves MIDI channel 10 for drum sounds, with most keys on a keyboard being assigned a different drum sound. Again, each sound is allocated the same note number on every GM-compatible instrument, so for instance, hitting a C1 note will always play a bass drum sound. Along with the preset sound bank, this is to ensure that a song made using the GM bank of one synthesiser will sound similar when played on any other GM-compatible instrument. Because of the compatibility of GM sounds, you can download MIDI files from the internet, play them on any GM sound generator and hear them (roughly) as they were meant to be heard.

Unfortunately, the GM sound bank only really includes emulations of real instruments and this fact renders the specification somewhat useless for those interested in making more electronic, or adventurous music. Furthermore, the quality of sounds on many GM-compatible instruments can be rather poor, as emulating some realistic sounds, such as pianos, can be quite processor-intensive and not all instruments have the required processing power. Therefore, using GM can make your music compatible with a large number of sound sources, but you will pay for it through a lack of original sounds and/or sound quality.

top

midi files

A MIDI file (ending in '.mid') uses a format that stores MIDI song and instrument data.

A MIDI file (ending in '.mid') uses a format that stores MIDI song and instrument data. Virtually all MIDI equipment provides an option to store their internal user patches, sounds, sequences, or even whole songs as MIDI files. In the current age of computer sequencers, most of this information can be recorded easily and stored on a computer, rendering the need to save sound patches as MIDI 'patch dumps' somewhat redundant.

One thing to note is that a MIDI file that is saved in one studio, with one set of equipment, will most likely sound different when played in another studio, unless it has the same equipment, with the same sounds stored in the same patch locations. This is the reason why the General MIDI specification was created - any MIDI files saved using GM sounds will sound (at least) similar when played on any other GM-compatible instrument.

By far the most common use of MIDI files nowadays is for storing song data. A MIDI file can store all of the sequences in all of the sequencer tracks, with all of the MIDI channel and controller data. Many mobile phones now have General MIDI specified sounds on board and play ring tones from MIDI files.

top

 

 

Copyright © 2015 nitetime productions. All rights reserved.