Welcome to No Limit Sound Productions

Company Founded
2005
Overview

Our services include Sound Engineering, Audio Post-Production, System Upgrades and Equipment Consulting.
Mission
Our mission is to provide excellent quality and service to our customers. We do customized service.

Tuesday, April 7, 2015

MIDI Basics, Part 3: MIDI Messages

Exploration


Technique : Theory + Technical


What are MIDI messages and what do they do? PAUL WHITE explains.



Over the past couple of months I've introduced the concept of MIDI and explored the basic role of MIDI sequencers, but as I've already hinted, there's a lot more to MIDI than simply sending note information from one machine to another. In computer terms, MIDI is simply a serial data link system and you could, in theory, send any kind of musically relevant digital information along it. Unfortunately, because MIDI is a serial system, packets of information have to move in single file, one after another. If you try to put too much data down the cable, you end up with the MIDI equivalent of a traffic jam -- which might leave you with some notes apologising for arriving late!



Because there is a limit to how quickly you can pipe data down a MIDI cable, MIDI can't be used for the transmission of audio or sample information in real time, though you can transfer samples in non-real time from a computer sample editor to a sampler using MIDI's Sample Dump protocol (if you're prepared to put up with the slowness of it).

MIDI CHANNEL MESSAGES



The majority of MIDI messages are Channel messages. As the name implies, these messages are accepted by the receiving device (synth module, drum machine etc) on the basis that they are addressed to a specific MIDI channel. MIDI notes are Channel messages, as are all other types of performance data relating to Velocity, Release Velocity (where supported), Pitch Bend, Controller Data, Aftertouch, Polyphonic Key Pressure, and of course Program Changes. Whereas a MIDI note is a fairly basic type of MIDI message requiring only a Note-On event followed by a Note-Off event, controller information can be far busier, and if you look at the event list in a typical sequencer after you've recorded a part which uses lots of Pitch Bend, you'll probably find that the Controller change events outnumber the notes by at least 10 to one.



Aftertouch also throws out an enormous amount of MIDI data, whether the receiving device can make use of it or not, and if you're experiencing inexplicable MIDI timing problems, try turning off the aftertouch on your master keyboard. It's good practice to switch off aftertouch unless you're using it in, as unnecessary aftertouch data will quickly fill up your sequencer's memory.



If you own one of the rare keyboards that isn't velocity-sensitive, whenever you play a note it will be sent with a fixed velocity level of 64, which is a little too low. So it's best to increase this value to around 100 using your sequencer's edit facilities. If you don't do this, the signal-to-noise ratio of the receiving instrument won't be as good as if all the notes were playing at or near maximum level.



Any MIDI message that includes a variable value (such as MIDI note number or controller information) comprises, in addition to the MIDI channel address, two parts: one to say what sort of message it is, and the other to say what value is being transmitted. Because MIDI is an 8-bit system where seven of the eight bits are used to carry data values, the maximum range of a conventional MIDI message is from 0 to 127. This limit also applies to musical notes, which means MIDI can address a maximum of 128 different notes. Similarly, you can only address 128 different patches directly over MIDI, but with modern synths coming packed with more and more sounds, MIDI Bank Change messages are often used to access multiple sound banks, each containing up to 128 patches.

MIDI CONTROLLERS



Modern synths may look pretty inscrutable, but there are lots of parameters that can be twiddled in real time using MIDI Controllers -- such as wheels, pedals, or simply Controller data created in your sequencer. MIDI effects units are also often provided with some form of real-time control, so you could, for example, send MIDI Controller messages to vary the delay time of an echo effect during performance, or to to change an EQ setting. Quite often, instruments and effects units allow you to assign which Controller relates to a specific parameter. So the Modulation Wheel on your synth, to take one example, could be used to control the reverb decay time of an effects unit or the filter brightness of a synth module.



MIDI Controllers can be divided into two main types: those that are variable or continuous (like a knob) and those that are either on or off (like a switch). For example, a Sustain Pedal is simply a switch, so it can only be on or off, whereas Pitch Bend is described as a Continuous Controller because the actual position of the Controller is transmitted. In theory, MIDI could allow you to have up to 128 different Controllers working at the same time, but this is far greater than would ever be needed in practice. This being the case, the architects of MIDI have reserved Controllers 122 and upwards for selecting the various MIDI modes (Local On/Off, All Notes Off, Omni Off, Omni On, Mono On and Poly On). MIDI modes aren't really Controller messages at all, but this just seemed like a convenient place for the designers to put them! (See 'MIDI Modes' box.)



The remaining slots are broken down into Continuous Controllers 0 to 63, Switch Controllers 64 to 95 and Undefined Controllers (free for future use) 96 to 121. If you look at MIDI Controllers 0 to 31, you'll find that they are duplicated in slots 32 to 63, the reason being that by using two Controller messages rather than one, you can generate Controller information with a much higher resolution than 128 steps. In effect, one Controller provides you with 128 steps and the other puts up to 128 smaller steps within each of the larger ones, providing 14-bit resolution. Controllers 0 to 31 handle the most significant 'bit' (MSB) of the data while Controllers 32 to 63 handle the least significant bit (LSB). In practice, most instruments stick with the basic 128 steps, though I have experienced instruments where the Controller data is only read with 4-bit or 5-bit accuracy, which means that functions like pitch bend have noticeable steps in them rather than operating smoothly. However, some modern synths use both MSB and LSB Controllers to provide Bank Change commands.



As touched upon earlier, Controllers are particularly useful for adding movement and interest to electronic sounds, where parameters such as filter frequency or effect level can be changed during performance. You can also create some very interesting dynamic effects by using one or more MIDI Controllers in conjunction with a MIDI effects unit, but you don't have to operate all the Controllers as you play. If you're working with a sequencer, Controller information may be recorded on a separate track (usually after you've recorded the basic notes), simply by going into record, then moving the appropriate Controller wheels, sliders or pedals but without playing any notes. Using this technique, you can create MIDI volume changes, pan position changes, and timbral changes -- and if you feel really creative, you can construct short Controller sequences which are related to the tempo of your song, then save these for use in future compositions.

MIDI SYSTEM MESSAGES



MIDI System messages have no particular channel address, so they are received by all the instruments in your MIDI system. The most common form of System message is related to timing in the context of drum machines and sequencers, and perhaps the most important of all these messages is MIDI Clock. MIDI Clock is related to the tempo of the sending device and provides 96 clocks for each 4-beat bar of music. A practical use of MIDI Clock is to synchronise a drum machine to a sequencer, with either one acting as the 'master' timing source. The machine(s) being controlled (often known as the 'slave'), must be set to external MIDI sync, which means that it will follow the tempo generated by the master device.



Of course, there's more to getting in sync than a simple timing clock -- the slave device needs to know when to start and stop, so MIDI also includes Start, Stop and Continue messages. There also needs to be a way of getting into sync if you commence a MIDI sequence from a point that isn't the start of the song, which is why the MIDI Song Position Pointer (SPP) message was added. This is quite transparent to the user, but on starting your sequence, a Song Position Pointer message is sent which tells the receiving MIDI device how many one sixteenths of a bar have elapsed since the start of the song. Using this information, the slave device can lock up almost instantaneously and start at the correct beat and bar of the song. All the so-called 'Smart FSK' tape-to-MIDI sync boxes rely on MIDI Song Position Pointers to work.



MIDI also includes something called Active Sensing (though it isn't always implemented), which is MIDI's way of checking that a connection exists between several devices. In reality, it's the MIDI equivalent of the receiving device shouting "Are you still there?", and a short while later the transmitting device shouts back "Yes!" If a Yes is not forthcoming, the receiving device assumes the transmitting device has gone off in a sulk and, metaphorically speaking, takes its ball home! What actually happens is that the receiving device shuts off all notes that are playing. If it didn't do this and the MIDI cable was accidentally unplugged between a Note-On being sent and a Note-Off being sent, the receiving instrument would continue to play that note until it eventually rusted away!



Because MIDI sequencers can hold more than one song in memory, MIDI also includes a Song Select message. As you might expect, tunes can be requested by number in the range 0 to 127.



Nowadays we're all very used to MIDI instruments being perfectly in tune, but it is still possible for MIDI-controlled analogue synths to drift in pitch over a period of time, unless they incorporate intelligent auto-retuning systems. However, many of them do have an internal tuning routine which can be initiated manually or over MIDI, using a Tune Request command. If a Tune Request command is sent, all the MIDI instruments in the system that have a tuning routine will give themselves a quick checkover and retune to their own internal reference. There's no guarantee that they'll all end up at the same pitch, but at least the thought was there!

SYSTEM EXCLUSIVE MESSAGES



System Exclusive (or SysEx) messages are also part of the MIDI System message portfolio, but whereas the rest of MIDI is pretty precisely defined, SysEx is provided so that manufacturers can build instruments with unique facilities yet still conform to the MIDI Specification. For example, the programming parameters of analogue and digital synths tend to be quite different, so if you want to allow the user to get at these parameters via MIDI, then a system such as SysEx is the only viable means of doing it. It's important to be able to adjust parameters via MIDI, because if this wasn't possible, editor/librarian programs would have no way to pass patch information back and forth.



Since SysEx messages are only recognised by the instrument type for which they are designed, there's no worry that your drum machine might try to interpret a message intended for your Waldorf Microwave and blow a fuse. The way this works is that each SysEx message kicks off with a manufacturer's ID code -- if the identification code isn't recognised by the receiving instrument, then the rest of the message is ignored.



Only very advanced MIDI users tend to have more than a passing association with MIDI SysEx data, but anyone can use it at a basic level for copying patches or banks of patches from a synth into a MIDI storage device, such as a sequencer or MIDI data filer. You'll find that most modern MIDI instruments have a SysEx dump facility tucked away somewhere in their MIDI configuration pages -- all you have to do is connect the MIDI Out of the instrument to your sequencer's input, put the sequencer into record mode, and then activate the SysEx dump procedure.



The SysEx data usually takes a few seconds to record, after which it can be played back into the instrument at any time to restore the patches you saved. If you are in the habit of using lots of different patches in your songs and you don't have enough user memories to hold them all, you can store a SysEx dump in your sequencer, right at the start of each song, to automatically set up the required patches for you. Depending on how long the dump takes, you may have to leave a few bars of count-in to allow it to finish before the music starts. Once you've loaded your new sounds, it might be a good idea to mute the SysEx track, otherwise the patches will get reloaded every time you start the song sequence from the top.

AND FINALLY...



If you expect every MIDI instrument to support every feature implemented in the MIDI Specification, you're destined to lead a sad and disappointed life. Most new instruments support most of the features, but few are actually compulsory and about the only thing you can take for granted is that a MIDI synth will send and receive MIDI note data. If a MIDI message is received by an instrument incapable of responding to that message, then the message is simply ignored. However, you should be aware that different instruments can legitimately respond to the same MIDI message in different ways. For example, the Pitch Bend range of an instrument is not tied to the data received but is specified in the MIDI menu of the instrument itself. Here, full movement of the Pitch Bend wheel (or a full range of Pitch Bend messages) can be made to shift the pitch by as little as one semitone or by as much as an octave. Unless all your instruments are set to the same Pitch Bend range (two semitones is popular), you could end up with an horrendous discord.



Very few instruments incorporate Polyphonic Key Pressure or Release Velocity, but just about everything you can buy now (other than some really basic home keyboards) is velocity-sensitive and even relatively inexpensive keyboards have aftertouch. Some older instruments (like my otherwise deeply-revered Proteus 1), don't respond to MIDI Bank Change messages, which can be rather frustrating, and you may also find some instruments which refuse to respond to Controller 7 (Master Volume) commands, my old Yamaha EMT10 being one of them. If in doubt, the back of the relevant equipment manual should show a table of what MIDI facilities are supported.



Next month I'll be taking a first look at samplers and sampling."...you should be aware that different instruments can legitimately respond to the same MIDI message in different ways."



MIDI MODES



Most of the time, we use our synths polyphonically and set to a specific MIDI channel, so we rarely give MIDI modes a second thought. But there are actually four possible modes of operation defined by the official MIDI Spec.



• MODE 1: OMNI ON/POLY. In practical terms, this means that the instrument will play polyphonically but MIDI channel data is ignored. In other words, whatever you send it, on whatever channel, it'll have a go at playing it. Some older instruments still default to Omni On mode when they're first powered up, which can be a nuisance as you have to switch them back to Omni Off mode before you can use them in a multi-keyboard setup. There are few things that sound worse than a single synth trying to play back an entire composition -- including the drum parts! The only good thing about instruments defaulting to Omni mode is that shop assistants with little or no MIDI experience can usually get a sound out of them.



• MODE 2: OMNI ON/MONO. This is the monophonic equivalent of Mode 1. Mode 2 is little used, but if you want a polyphonic synth to behave like an old monosynth, then it may be useful. Mono mode is also useful for guitar synths, where each string controls what is in effect a separate mono synth, but this requires Omni mode to be switched off.



• MODE 3: OMNI OFF/POLY. This is the most commonly used MIDI mode, especially for MIDI sequencing. In Mode 3, the instrument responds to messages only on its own MIDI channel and plays polyphonically.



• MODE 4: OMNI OFF/MONO. This is the monophonic equivalent of Mode 3. Before multitimbral synths came along, Mode 4 was incredibly useful because it was possible to use simple 4-voice synths (such as the Casio CZ101) to play four different mono sounds on four different MIDI channels. Now that we have multitimbrality coming out of our ears, this kind of dodge is perhaps less important than it previously was. However, Mode 4 is still vital to MIDI guitar players, who need to have each string working on a separate MIDI channel in order to be able to bend notes or apply vibrato on independent strings. Because each string of a guitar is mono (it can only play one note at a time), it makes sense to use the receiving synth in Mono mode to emulate the way a real guitar handles notes.

   

No comments:

Post a Comment