What MIDI is, what MIDI does.

While MIDI (Musical Instrument Digital Interface) can be used to play back songs from your sound card, or a chip in old console games, its main purpose is music production (it's also used for controlling lighting or anything that accepts the MIDI protocol). In music production MIDI is used to give performance information to samplers, drum machines , synths and many other musical devices. The first demonstration of the MIDI protocol was two synthesizers connected by MIDI cables, you play a key on one keyboard and the note would sound from the other. With a MIDI sequencer you can arrange songs using multiple musical devices. A MIDI sequencer (normally a computer running a sequencer program like Cubase VST or Cakewalk or Logic) sends information about what note to play, how long to play it, wether there is a pitch bend or filter sweep and many other things to a instrument/device which generates the actual sound. MIDI has no audio properties, it's just instructions, so when .mid files sound like crap it's because of your soundcard not the file. The classic example is that of the player piano, where MIDI would be the piano roll.

MIDI IN and MIDI OUT and MIDI THRU, oh my!

Here is an example of a basic MIDI setup with one musical device and a sequencer to play it. The MIDI cables are setup up so when you play a note on the synth it sends the information (what key was pressed, the velocity) from the MIDI OUT to the sequencers MIDI IN, which may record that information for later playback. When playing a song the MIDI out sends information to the synths MIDI in to play.
 ___________________
|Sequencer         |  
|            MIDI IN ----------
|            MIDI OUT ---      |
|___________________|    |     |
                         |     |
 __________________      |     | 
|SYNTHESIZER       |     |     |
|                  |     |     |  
|          MIDI IN===----      |
|          MIDI OUT== ---------|
|__________MIDI THRU
Here is the setup with two musical devices and a sequencer that has only one MIDI out. Here you would have to use the MIDI THRU. We are assuming the Sythesizer has a keyboard so it would be the instrument you would play on.
 ___________________
|Sequencer         |  
|            MIDI IN ----------
|            MIDI OUT ---      |
|___________________|    |     |
                         |     |
 __________________      |     |
|SYNTHESIZER       |     |   |  
|                  |     |     |  
|          MIDI IN===----      |
|          MIDI OUT==----------
|__________MIDI THRU=------    
                           |  
 __________________        |  
|Sampler           |     |         
|                  |     |      
|          MIDI IN===----      
|__________MIDI OUT== 


The more devices the more complicated this can get especially if you want instruments to be able to play eachother or want to draw diagrams of it in ascii.

The limitations of MIDI and How to make it work beter

MIDI surfaced in 1983 at the North American Music Manufacturers show in Los Angeles and is still the standard for sequencing in music production despite its many limitations. The main limitation being that MIDI is serial ("The MIDI data stream is a unidirectional asynchronous bit stream at 31.25 Kbits/sec. with 10 bits transmitted per byte (a start bit, 8 data bits, and one stop bit)"1). So that if you're trying to trigger 2 samples to play at the same time one will actually start playing an instant (not audible) later. If you try and trigger too many samples at the same time and have not optimized your setup there will be audible timing errors because MIDI can’t handle it and is trying to catch up, this sounds terrible. Another thing is that MIDI measures many variables between 0-127 (not note placement.). So the velocity of a kick drum is always between 0-127 which might not seem like a big deal but if you emulating real instruments something closer to infinity is necessary.

MIDI is cool, history wise, because it was so necessary when it came out. It’s a big part of why electronic music, and the techniques that came with it, became so huge. The fact that it hasn’t been replaced after almost 20 years is annoying. The alternative to using MIDI to control machines is voltage control which pre dates MIDI, lacks the functionality of MIDI but is dead on timing wise. The other option is doing everything in your computer with .wav and .aif files played by soft synths and soft samplers and forgetting about external hardware all togther (except a midi controller keyboard with lots of knobs). This option makes me sad but really does seem to be the most sensible for numerous reasons beyond the midi protocol.

If you want to make your MIDI work better try getting a sound card for each of the devices you are using. Or if that is too expensive then buy an extra sound card for your percussion parts. There is also a technique called running status which involves manipulating the information in the messages, I do not understand this technique. The other, probably best and easiest, option is an external MIDI box, MIDI Man makes a few good ones, I use an external MIDI box with 6 outs and have no timing problems.

Here is a neat quote about the inner workings of the MIDI IN jack.

"In a studio containing dozens of discrete components, ground loops from audio and power cables are always a danger - and the designers of MIDI didn't want their cables to contribute to the problem. In addition, the MIDI specification states that the actual shield connections on the MIDI jacks should never be attached to any chassis or electrical grounds. To prevent other possible electrical problems, MIDI IN jacks are not hardwired to the device on which they are mounted. Instead all MIDI IN jacks contain an optoisolator, which is an electronic device consisting of a tiny LED and a photocell. When the jack receives a bit the LED lights up, and the photocell responds by sending current into the rest of the receiving device. In this way, there is never any direct electrical connection between the MIDI encoding/decoding circuitry of two different pieces of equipment."2

1http://www.harmony-central.com/MIDI/Doc/tutorial.html#intro
2"MIDI for the Professional" by Paul D. Lehrman

It should be said that, when purchasing equipment, 'MIDI Compatible' and 'General MIDI Compliant' are not the same thing. 'General MIDI Compliant' mean the device conforms to the MIDI interface standards as well as the MIDI instrument reference designs, whilst 'MIDI Compatible' just means (generally) that it has a MIDI plug.

The differnce is a 'General MIDI Compliant' piece of hardware will support all 128 standard (and maybe even the 512 extended) MIDI instruments; it also means that it can concurrently produce those instrument sounds -- i.e. I can have a guitar and piano at the same time. Under basic MIDI compatability, it just means it will send midi signals out the port and (sometimes) recieve them in a singular instrument pattern, so even though your computer is sending piano, guitar and drum signals to your keyboard, they will all be produced as if by one instrument.

In the days of IBM PC-Compatibles and CGA graphics, someone conceived of doing something useful with MIDI. It's a music protocol. I'm talking about something useful besides making music.

This is in the days when I ruled the roost with my dad's Atari/ST 520. My friends would come to my place to play the latest games, because all they had was ybaby and a really crappy version of Epyx's Summer Games. I had Gauntlet II and Battle Chess. Mad graphics and pretty decent sound. Better than Nintendo. 256 colors, or something.

This is in the days of BBSs and the 400-baud modem. The Atari/ST came equipped with not one, but two MIDI ports built into the side (the wrong side), ostensibly to facilitate electronic music. The often-forgotten cartridge port was on that side as well. The other side (the right side) had the joystick and mouse ports, plus (sometimes) the disk drive -- seeing as there was no hard drive, that was where you spent most of your time. But I digress.

This is in the days of Super Mario Brothers and Duck Hunt. Someone made a game called "MidiMaze". It closely resembled a later game for the Super Nintendo called "Faceball 2000". Floating faces, mazes. Some clever programmer had figured out how to hook up two Atari/STs with MIDI cables and transfer the game info in real time, pretty fast. Pseudo-3D (a la Doom). And this was in, like, 1988.

This is in the days before 3Com and dot.com and all that crap, and I had multiplayer gaming! Right in my own bedroom, with the Sesame Street bedspread and the Tinkertoys all over the place. In those days, I looked way down on PC tinkerers, because all the real action was on the Atari/ST, with back issues of Antics magazine and a lot of hacked games on floppies. We had a rogue port. And our ST didn't bother with those big flimsy black disks. To this day I've never owned a 5.25" floppy drive. MIDI was a whole world of floating happy faces and multiplayer carnage. That's how cool I was.

Then ten years later, I played a lot of Quake on a 28.8 kbps modem, with people who were actually downtown and in other towns, and I wasn't very cool anymore. Plus, one of my dumb friends hooked me up with ScreamTracker and I didn't think too much about MIDI after that.

OK, I'd like to set the record straight about MIDI. I've heard far too many geeks who are otherwise very knowledgeable about technology say things like "MIDI sounds terrible!" which, once you know what MIDI actually is, makes about as much sense as saying that sheet music sounds terrible.

MIDI stands for "musical instrument digital interface." It is a protocol that says when an instrument should start playing a note, how hard the key was pressed (known as the note's velocity), when it should stop playing the note, and various other information about what kind of sounds to play and when. It replaced CV (control voltage) as the standard in the mid eighties, and is here to stay for a while longer. Pretty much any synthesizer you can buy brand new will have "MIDI in," "MIDI out" and "MIDI through" sockets built into it so that you can use its keyboard or sequencer to control another instrument, control it with another keyboard or use a sequencer to keep track of every single detail of the music and play it back upon request. This is how pretty much all popular music is written these days.

MIDI is not limited to synthesizers, though. Yamaha have even made a range of acoustic pianos that use the MIDI protocol, the Disklavier series. This is basically the same technique used by old upright pianos that had punchcards with music stored on them, only using much more sophisticated technology. As MIDI can store subtle nuances that the old punchcards didn't, such as assigning a seven bit number (between 0 and 127) for how hard each key is pressed, you'd find it hard to tell the difference between someone actually playing a piano and a recording of their movements instructing hardware to play it in exactly the same fashion.

In short, from the ubiquitous Roland TR-909 drum machine and the phenomenally popular Yamaha DX-7 synthesizer to acoustic pianos, many different instruments can talk via MIDI.

Then there's General MIDI, abbreviated as GM. This is the same as regular MIDI except it specifies 128 instruments (mainly classical, acoustic instruments) for the GM compatible instrument to emulate. This is where the problem lies: I have yet to hear a MIDI compatible xylophone or harpsichord. Instead, any GM instrument you are likely to own is probably going to be a synthesizer that doesn't sound very much like any of the general MIDI instruments it's supposed to emulate. While this may change with physical modelling, a technique that uses complex mathematics to generate realistic recreations of acoustic instruments, the current methods of synthesis (subtractive synthesis, FM synthesis and PCM synthesis are the main three) do not sound very much like acoustic instruments. PCM synthesis, which uses actual recordings of real sounds (it's the same technology that CDs use), is probably the best candidate for the task, and even then, it won't convince anyone that they're listening to a full orchestra.

Then there's internal sound cards that play MIDI files on PCs. These are what give MIDI such a bad reputation. They attempt to recreate an orchestra or a set of rock instruments using FM synthesis. Without going into details of how FM synthesis works, it sounds great for synthetic sounds that can be used in dance music, but can't sound remotely like any acoustic instrument. The best example of FM synthesis put to good use is probably Yuzo Koshiro's soundtrack to the Mega Drive game Streets of Rage. Many artists from Brian Eno to Type O Negative also make use of the DX-7, an FM synthesizer. Rick Smith of Underworld says of it "The DX-7 is my oldest and favourite synth. I have a set of sounds that I've programmed and that seem to work consistently." FM synthesis does sound good, it's just futile to try to emulate acoustic instruments with it.

So remember, although playing a MIDI file on a cheap sound card can sound less than euphoric, MIDI is still the industry standard for getting instruments to talk to one another. It doesn't sound bad because it doesn't dictate how music should sound, only which notes should be played and sometimes which instrument they should try to sound vaguely like. If it wasn't for MIDI, Fatboy Slim probably wouldn't still be writing songs on an Atari 1040ST.

The Rick Smith quote is from a Sound on Sound interview with Underworld, available at http://www.soundonsound.com/sos/dec00/articles/underworld.asp

Log in or register to write something here or to contact authors.