Making the Most of Midi by Paul Overaa
All rights reserved No part of this book may be reproduced or transmitted in any form or by any means, graphic, electronic, or mechanical, including photocopying, recording, taping, or by any information storage or retrieval system, without permission in writing from the publisher.
Bookmark Publishing ISBN 1-85550-006-X
1 Making a StartWe're going to begin by answering the question that all musicians ask initially: What is Midi? From a purely technical viewpoint Midi is a communications scheme that has been designed to allow standardised messages to be passed between pieces of musical equipment (synthesizers, drum machines etc.).What this means in practice is that Midi allows you to connect together all sorts of different pieces of musical equipment (from any number of manufacturers) and, providing a few ground rules are followed, they'll all work together quite happily. Nowadays it's possible to connect a dozen keyboard synthesizers together in such a way that when you sit at one of them and play something, all the other synths will play the same thing automatically, but perhaps using different sounds. That in itself is quite an achievement but it is one of the very simplest of the benefits Midi has bought to the world of music. Midi has done far more than this: It has enabled computers to be used to read, store, edit and replay those messages (acting like a digital message tape-recorder) and this has led to a development which has turned the music world upside down... I'm talking about the Midi sequencer. Not only has sequencing made life easier for the competent musician but it has opened the doors for everyone else. It is no exaggeration to say that the sequencer has made it possible for anyone with the slightest ear for music to play things that sound good without necessarily having to spend years mastering a musical instrument. In many ways the sequencer is to the musician what the word-processor is to the secretary. Why was Midi developed? This is a bit harder to explain. In fact to explain it at all we need to step back in time and look at some of the things that were happening in the music world just before Midi arrived...
Setting the SceneYou will appreciate the problems that either a lack of standards or a proliferation of non-identical standards can cause. With the early video era we had the format confusion: VHS, Beta, Phillips 2000 and so on. Computer floppy disks going from 8", to 5 1/4" to 3 1/2", coupled with the adoption of many different incompatible formatting schemes, was another nasty many of us could have done without.Now, if you think the above examples were troublesome you should have seen what was happening in the music business 10-20 years ago. Synthesizers, electronic keyboards with oscillator and sound circuits that could both generate and modify complex sound waveforms, thus mimicking other instruments as well as creating their own special sounds, were beginning to appear. That was great, but incompatibilities between different units spoilt things. Manufacturers would set their own standards for such things as oscillator control voltages and as a direct consequence of this was that linking equipment from different manufacturers was usually a nightmare. When electronic drum machines came on the scene the situation got worse because many manufacturers chose to adopt different standards for their timing signals. The real problem was not that any of the manufacturers had chosen bad standards, it was just that because they had chosen different ones, each manufacturer's standards were only coherent within the realms of their own products. From the end-user musician's viewpoint this situation was hopeless because they ended up becoming locked into one particular range of equipment just to get some level of compatibility. The compatibility issues were seen as a threat to what was expected to become, and in hindsight has become, a major consumer industry. After all... would you nowadays buy a video recorder that had to have a special tape format that was only available from the manufacturer of that recorder? Of course you wouldn't! The early musicians using synthesizers, drum machines and the like were taking the brunt of the compatibility problems. It didn't take too long before the manufacturers realised that something was going to have to be done. Some real effort was going to have to be put into finding a workable, cost effective solution. Within a relatively short time some of the major manufacturers of electronic music equipment, from the States, Germany, Japan, and the U.K. among others, got together to produce a working framework which aimed to allow all types of musical equipment to use a common communications protocol. The initial ideas and experimental trials seemed to revolve around relatively straightforward instrument-to-instrument links similar to those already in use by companies like Sequential Circuits. Such ideas were quickly replaced, quite possibly by pressure from the high-tech Japanese companies, and a far more adventurous scheme developed which involved the fast serial transfer of data based on the use of optically isolated shielded twisted pair cable links. The cables would be used to transmit information using a well defined, flexible multi-byte message protocol. I'll explain what all that means shortly but the important point to grasp for the moment is just how much musical information was going to be carried by this system. The messages were to cover musical note information, dynamics (measuring how hard keyboard notes were being pressed), internal voice (sound circuitry) selection, pitchbend and modulation effects, and a great many other things besides. The proposed scheme would also cater directly for the simultaneous control of many different instruments. So as far as musical technology was concerned this was going to be a communications spec second to none. They even gave it a name: the Musical Instrument Digital Interface. Midi!
Some Midi PreliminariesI'm not going to dive in by giving you loads of technical material. The techie stuff serves little purpose until the underlying ideas have been explained. Having said that, some general info will help because Midi will make sense to you as a musician only if you have a rough idea of how it works and what goes on beneath the surface.I've already explained that Midi is a musical instrument communications standard. So how exactly do the instruments communicate? Let's deal with the physical connections first. Midi equipment usually has two or three 5-pin DIN sockets. The terminal marked Midi In is where the equipment receives its Midi information; that marked Midi Out is the terminal from where messages are transmitted. Usually you'll also find something called a Midi Thru socket and this provides a duplicate of whatever is being received at the Midi In terminal. Midi Thru connectors are useful for chaining two or more Midi instruments, a subject that we'll return to in Chapter 3. For one piece of Midi equipment to communicate with another there needs to be some kind of physical cable connection. The leads used, screened twin-wire cables terminated with 5-pin DIN plugs, are (for obvious reasons) called Midi cables. You can easily make your own Midi cables, but since they are reasonably priced and readily available from computer and music stores most users buy them ready made.
Making Your Own Midi CablesWiring a Midi cable is surprisingly easy if you are handy with a soldering iron. All you need are a couple of 180 degree type 5-pin DIN connectors and a suitable length of thin, screened cable containing two inner wires. Midi cables can be up to 15 metres long, but don't make excessively long cables unless you really need them since they can degrade the shape of the signal pulses passing through them.The pin in the centre of a DIN plug (pin 2) is used for the earth screen connection, so the screen has to be soldered to the central pin 2 at either end of the lead. The remaining two wires that run through the centre of the cable are then soldered to the pins that are immediately to the left and right of those centre terminals (pins 4 and 5). It is important that each wire is joined to the same numbered pin at each end of the cable-pin 4 to pin 4, pin 5 to pin 5. They should not be cross connected. Both outer DIN connector pins (1 and 3) on both connectors should be left unconnected. Some 5-pin DIN hi-fi leads, which look very much as though they would double for Midi leads, fail to work as expected. This is often because pins 4 and 5 are cross connected. Other problems can occur with some equipment where leads have inadvertently been acquired which use 4-strand multicore cable with pins 1 and 3 (which should not be connected to anything) being linked. That takes care of the physical connections, but once connected how do these instruments actually talk to each other? And what exactly is a Midi message? Well, forget about the normal 'Sorry but we're going to be late for the gig because our van has broken down' variety of message. Midi messages have nothing to do with words, phrases or any other kind of text. Midi communications is all done with numbers and the underlying magic here is performed by computer chips.
Midi CommunicationsThe chips used in Midi instruments and all other digital computer equipment involve thousands upon thousands of micro circuits that are basically switches that can exist in one of only two states. It goes without saying that these circuits are very good at representing On/Off, Yes/No,and True/False type situations. Unfortunately they are not much good at anything else and because of this the numbers that computers work with need to be stored and manipulated in a special form that corresponds to these logic circuit on/off type states. The number system associated with this is called binary. It's a system with just two digits-0 and 1.It should be pretty obvious that in order to represent the normal decimal numbers 0 and 1, only one binary digit or 'bit' needs to be used. But in order to represent larger decimal numbers more bits are needed. Here are a few examples of decimal numbers and their binary equivalents...
So how does all this relate to Midi and those Midi messages? Midi communications are based on the transmission of numbers between 0 and 255, and this entire range of numbers can be stored within an 8-bit binary package which the computer world calls a byte. These bytes can be transmitted through a Midi cable as a series of pulses created by switching circuits that are able to change between their on and off states very quickly-many thousands of times per second. As far as transmission of 8-bit digital data goes there are actually two different approaches available. You can either use separate wires to carry the individual bits of a given number, so that the whole number is transmitted in one go. Or you can send the individual bits of the number down the same wire one after the other. The first approach is called parallel transmission and though it is potentially faster it suffers from the dis-advantage of being more complex electronically, requiring more expensive cables. The second approach, called serial data transmission, is slower but has the important advantage of being cheap and simple. When the Midi standard was devised everybody involved knew that it would only catch on if Midi equipment, in general, was as affordable as possible. Because of this the manufacturers formulating the standard decided that Midi communications were to be based on serial transmission. Let's get one thing straight. When I was talking about communications speed I was talking relative potential speeds. Midi's serial approach is no slouch. Messages are sent as streams of pulses that travel at a speed of 31.25 kilobaud. That's about one byte of Midi information every 320 millionths of a second! There are two approaches available for the transmission of pulsed serial data. One approach, which is used extensively for things like computer to printer and computer to modem links, represents the two binary states using different voltages. The RS232C standard for example uses -12v and +12v to represent the two logic states 0 and 1. The alternative approach, which is the one Midi uses, is based on an electrical current loop and is more akin to sending pulses by switching a light on and off, which is almost exactly what happens. Midi signals do drive a light, or rather a light emitting diode (LED) which is present in every piece of Midi equipment's receiving circuitry. These light pulses are picked up by an adjacent photocell which converts the light pulses back into the pulses representing the digital data. The LED/ photocell arrangement is therefore able to propagate the switching pulses representing the digital data, whilst providing a physical barrier which prevents current flowing between the various pieces of equipment. This is what is meant by opto-isolation. Midi's optically isolated closed loop current system has two main benefits. Firstly, it eliminates potential 'earth hum' and other electrical noise problems. Secondly, it is safer than approaches involving direct equipment signal connection. Midi messages, then, are sent then as streams of bits representing one or more eight bit numbers whose meanings have been defined by the Midi standard. There's nothing magical about this. A group of people simply sat down together and decided what all the various number combinations were to mean. A lot of thought went into the structure of these messages and, once the completed standard was available to follow, the manufacturers of Midi based musical equipment started to manufacture their new instruments with the Midi standard guidelines in mind. Not all types of Midi equipment are expected to understand all types of Midi messages. Nor does every piece of Midi equipment send every possible type of Midi message, but this doesn't usually cause much in the way of problems - providing you know what types of messages your particular equipment is capable of sending and understanding. More on that later. I've already mentioned that Midi messages can consist of more than one byte. The first byte, called a status byte, acts as a message identifier and enables the receiving equipment to tell what type of message is coming in. Subsequent bytes of the message, if indeed they exist, are known as data bytes.
Status versus DataHow does Midi distinguish between status bytes and data bytes? It has opted for using the uppermost bit of each byte. Status bytes always have the high bit (bit 7) set so these numbers can range from 10000000 binary to 11111111 binary (decimal 128 to decimal 255). Because bit 7 is effectively used as a status byte indicator all data bytes are restricted to values ranging from 00000000 binary to 01111111 binary (decimal 0 to decimal 127).
Midi ChannelsMidi recognises the existence of 16 separate channels and a large class of Midi messages, known as Channel messages, contain a channel number encoded within the status byte of the message. Pieces of equipment can therefore be selective about the messages they make use of and the result is that it is possible to have drummers, sequencers, synthesizers etc., all attached to each other via a single Midi communications cable loop. By setting up each unit to respond to a different Midi channel all of the Midi messages can be sent down the same set of cables with each unit responding to only those messages that have the matching channel number identification.It's a bit like someone writing a letter to you, sticking it in an addressed envelope and posting it - the letter, along with thousands of others, gets carried around the postal system but, as far as reading the contents goes, it is ignored until it arrives at your front door-its final destination. You know the letter is for you because it has got your name and address on it. Midi units know when a channel message has arrived for them because it will have a suitable channel number built into the message's status byte. Midi at the highest level distinguishes between the channel messages just mentioned and messages of more general interest to the system. You might at this stage be wondering just when all these messages get transmitted. It's usually when you do something - press a note on a synthesizer keyboard, turn a control knob, or select a particular synth voice setting. All of this will be dealt with in the fullness of time but for now we have more pressing things to discuss. Namely, what equipment you need to get started.
|