Thursday, April 10, 2008

MIDI Basics (Musical Text Messaging)

When dealing with Sythesizers, you will end up messing with MIDI, the Musical Instrument Digital Interface. Because it is easy to implement, it is almost universally implemented electronic musical instruments, from synths to guitar amplifiers to video projectors. It allows you to chain together several dissimilar devices and have them do the Right Thing.

MIDI is pretty much Morse Code. When you hit middle C on your keyboard, the keyboard will send a MIDI message that says, "Dude: Play middle C kinda quiet." MIDI does not send audio. Just the code. Literally, it sends this message in morse code: 9A 60 31.
  • 9 means "play a note."
  • A means "Dude:" (specifically, dude #11).
  • 60 is middle C (so, 61 is C#, 62 is D...).
  • 31 is "kinda quiet" on a scale of 0 to 127. (0 is silent).
These letters are sent over the modem to the synthesizer. The synthesizer says, "Hey, that's me!" and produces generates a middle C. So, you see, there's no music going across the wire. It's just note numbers. Data. In a lot of ways, MIDI is a lot like ethernet, telephones, modems, and text messaging. u dwn W dat?

Notice above that A was "Dude #11." A single MIDI wire can only transmit over 16 channels (i.e. 16 dudes). However, it's possible for 2 or dudes (synths, sequencers) to listen to the same channel. Most devices have a setup where you select the "MIDI Channel(s)" to listen (or transmit) on.

You probably first encountered MIDI by seeing this:

These are called MIDI ports, and here's what they mean:
  • MIDI IN - Messages coming in to the device. If this is a synth, you would plug your keyboard controller in to this port.
  • MIDI OUT - Messages coming from this device. So, if this is a keyboard (or controller), then the note messages will come out of this port.
  • MIDI THRU - This port will make an exact copy of everything that comes from the MIDI IN port, and resend the messages. This will not contain any of the data that is coming out of MIDI OUT. (However, some devices will allow you to do this.)
The MIDI THRU port is useful for creating a MIDI Chain, a one-way connected path for midi messages to go through. A really typical MIDI Chain is as follows:


One keyboard (or sequencer or computer) can send messages to a bunch of synths that are chained together. Notice that we're making good use of the MIDI THRU port. You will typically set Synth #1 to Channel 1, Synth #2 to Channel 2, etc. This way, you can have an analog synth making really cool analog sounds, and a sampling synth doing brass or strings, and a drum machine. All of them doing what they do best. From the keyboard, you can change the sounds, volume, pitchwheel, etc., etc.

You can chain together more than 16 synths. However, you will have to have 2 or more that will play the same thing at the same time. Often, you will do this to make cool multitimbral sounds — sounds made by combining other dissimilar sounds.

That's enough for today. The basic things that you should take away are these:
  • MIDI is like a text messaging system, and there's several types of commands that you can use it for.
  • There are 16 channels on MIDI. You can only do 16 things at a time on a single MIDI chain.
  • Understand what the MIDI IN, OUT, and THRU ports do.
  • Understand how to chain devices together.

No comments: