As explained in Chapter 1, MIDI (the Musical Instrument Digital Interface) is a simple way of storing sequences of musical events. It's the player piano concept brought into the modern age: By separating the mechanism that produces sound (the piano) from the score (the piano roll), MIDI lets you store, edit, and play back performances .
Obviously, you'll want three things: a way of sending MIDI messages (a controller , usually a keyboard), something to receive and respond to the messages (typically a sound module or virtual instrument), and some software in which to record and edit your MIDI performance (a sequencer ) ( Figure 8.1 ).
The MIDI device that originates the messages is called a controller . Any device that can transmit MIDI can be a controller. Some examples include:
Fader box, control surface
Foot pedals, footswitch boxes
Digital drum pads
MIDI-enabled guitar or bass
Virtual turntable or scratch interface
Sequencer (software or hardware)
As long as the device has a MIDI out port or a software driver to convert its output to MIDI, it can be a controller. It doesn't even have to be a traditional musical instrument: tools are available for translating the output from QWERTY keyboards, game controllers and joysticks, graphic tablets, electrical sensors, video cameras , and more into MIDI data. Your MIDI controller could be you waving your arms in front of a webcam, playing with a sock puppet with sensors, or anything else that can be made to transmit MIDI data.
To produce sound, you can either use the internal sound generation facilities on your controller, if it has any, or give the controller something to control: a receiver . Without internal sounds for stand-alone operation or a receiver to produce sounds, your controller is like a conductor without an orchestra: MIDI needs a sound source or other device to respond to the MIDI messages. Common examples of receivers include:
MIDI receiving devices: Unconventional possibilities for MIDI receivers include robotics , lasers, and pyrotechnics, but the most common application is a keyboard controller that triggers a virtual instrument.
Software virtual instrument
Mix and effects settings
Hardware sound modules and effects
Video playback and VJ gear
Lighting (many standard light boards include MIDI inputs)
Many devices, especially hardware keyboards, have the ability to act both as controllers (producing MIDI control data) and as receivers (producing sound, video, or some other event).
Of course, the real joy of MIDI isn't just the ability to use one piece of equipment or software to control another: it's the fact that you can record and edit MIDI events. Any device with the ability to record and play back MIDI is considered a sequencer . This includes both hardware keyboards with built-in sequencers and the MIDI sequencers integrated within DAWs like Cubase, Pro Tools, and Live.
Is it live, or is it sequenced ? Sequencers work well for recording and editing, but MIDI is also useful onstage. Because MIDI data is simple and standardized, it's easy to build everything from basic real-time transposers to sophisticated interactive setups. MIDI effects in sequencers or modular MIDI systems like Max/MSP, Jade, Pure Data (Pd), Reaktor, and Logic's Environments let you create custom performance rigs that work as you play.
Sequencing MIDI data lets you record, edit, and arrange compositions. You might use sequencing as a simple writing tool for recording ideas and adjusting and arranging them, or to create instrumental performances so complex that you couldn't play them in real time. Since MIDI stores only event information and not sound, it's possible to make edits with MIDI that are difficult or impossible with audio recordings. For example, you can change a recorded part to another instrument, make quick, fine- tuned pitch adjustments without having to select audio waveforms, draw in unplayable notes and rhythms , or make radical alterations to tempo.
What if you're "all virtual"? You might think that MIDI doesn't concern you, because you make music directly in software and don't have a controller. Well, think again: if you're playing a virtual instrument in a DAW or loop-based "virtual studio," you're using MIDI every time you click with the pencil tool to add a note. If anyone tells you, "MIDI is dead," they're wrongfor now, at least. (See the sidebar "OSC: MIDI's Successor?" on p. 324.)
Connecting a USB or FireWire MIDI device to your computer is basically plug-and-play. Connect the USB or FireWire cable to your computer, as in Figure 8.2 , and your software should recognize the device automatically. (Some devices require driver installation first.) If you have more devices, just plug them in via USB or FireWire ports as well. If you're out of USB ports, connect a USB hub (making sure your devices have enough power), and you're done.
Now that computers are ubiquitous in music-making and an increasing number of instruments include onboard USB or FireWire ports, you may use MIDI happily for years without ever plugging in a standard 5-pin MIDI cable. However, there's still a lot of equipment that uses 5-pin MIDI ports, and since the port hasn't changed since its introduction over two decades ago, a wide range of new and old gear is available for computer-based music.
Connecting MIDI to a computer does require some additional steps. Since computers lack MIDI ports (unless you have an internal interface with onboard MIDI), you'll need a separate piece of hardware to make the connection. Many audio interfaces have built-in MIDI ports, as do some USB- and FireWire-connected instruments, so you can connect your MIDI equipment to one of these devices, and then connect that USB or FireWire device to your computer. If you lack an audio interface or USB- or FireWire instrument with a MIDI port, you'll need a USB-to-MIDI adapter like the M-Audio Uno ( Figure 8.3 ). The Uno has only one in and one out port; if you have a lot of MIDI gear, a multiport MIDI interface becomes desirable.
Gear with standard 5-pin MIDI ports also requires a different cabling arrangement than connections like USB. MIDI is unidirectional (data flows in only one direction within a given cable). If you have two devices and you want each to be able to receive information from the other, you'll need two cables.
The three basic MIDI connections are in, out, and thru ( Figure 8.4 ):
In: Receives MIDI data from external sources.
Out: Transmits MIDI data originating within the device to external destinations.
Thru: Repeats whatever messages are received at the in portthus, messages from an external source (like a computer) travel "thru" the device to any connected gear.
Since data flows only one way, you'll connect ins to outs and outs to ins. Thru ports are also connected to ins. If you're just using one device to control another, you'll need only one cable: you'll connect the MIDI out of the controlling device to the MIDI in of the device being controlled. For example, if you want to control a sound module with a keyboard, you'd connect the out of the keyboard to the in of the sound module. For bidirectional communication, you'll need two cables. For instance, if you want to play the pads on a MIDI drum machine, record your playing with your computer, and then play back that performance using the drum machine's internal sounds, you need data flowing in both directions between the computer and drum machine. One cable will transmit data from the drum machine to the computer, and the other cable will transmit data from the computer to the drum machine.
If you want to connect multiple devices to a single port on your interface, you can use the thru ports. The thru port repeats data received at the in port, so the data can travel "through" the device to another device. By connecting the thru of each device to the in of the next device, you can chain multiple instruments. See Figure 8.5 for a diagram of how these different cabling setups work in practice.
Basic interconnection: A single device's in and out ports can be connected to a computer MIDI interface via two cables. For instance, you might connect an external keyboard with internal sound capabilities to your computer (via a dedicated MIDI interface or the MIDI port on an audio interface). The keyboard's MIDI out will send the notes you play to the computer for recording by a sequencer. When the sequencer plays those notes back, they are transmitted to the keyboard's MIDI in, allowing you to hear the music that has been recorded.
MIDI chain: Chaining multiple devices allows MIDI data to travel through a single port on the interface to multiple devices. For instance, if you want notes played by the keyboard or computer sequencer to produce sound on a synthesizer sound module and a drum machine, you could connect the thru port of the keyboard to the in port of the sound module (Device 2), and the thru port on the sound module to the in port on the drum machine (Device 3). The disadvantage of this setup is that the chained devices can only receive data through the chain: they can't transmit data generated with onboard keys or controls. For instance, you couldn't record yourself playing the pads on the drum machine with your computer's sequencer.
Multiport MIDI interconnection: If you need multiple MIDI devices to both receive and transmit, you'll need a multiport computer MIDI interface (or multiple MIDI interfaces). Each port includes both in and out connections.
No thru traffic? Just because you have a device with only in and out and no thru port doesn't mean you can't chain devices to it. Some equipment has a merge function that combines the data received on the in port with data generated by the device, so the out port is effectively both an out and a thru port. Check your device's documentation to see if this is the case.
What are those other ports for? Most MIDI keyboards have additional ¼" jacks near the 5-pin MIDI ports for inserting pedals, for punch in/out, sustain, expression, and other functions. Pedals built by one manufacturer may work with keyboards from other manufacturers, but some are not compatible.
The first MIDI devices were keyboards, and keyboards have remained the model for a generic MIDI device. In addition to the obligatory keys, a typical MIDI keyboard usually includes controllers for modulation ("mod") and pitch-bend somewhere on the left side of the instrument ( Figure 8.6 ). Often, these controls are in the form of two wheels, one for pitch-bend and one for modulation, though some manufacturers prefer X/Y joysticks, paddles, flat faders , or other controls. Some low-end keyboards lack pitch and mod controls altogether.
Many keyboards have additional faders, knobs, and other controllers capable of sending MIDI. In addition to controlling any internal sounds (if the keyboard has an internal synth), you can use these to control another MIDI hardware instrument or, more likely, the parameters on your software. You might use a bank of faders and knobs, for instance, to control the mix of an arrangement in a sequencer or the timbral controls of a software synth. Some keyboards have more exotic controllers, like a set of pads for triggering samples and drum sounds, or even infrared controllers in front of which you can wave your hands.
In response to the popularity of computers and powerful software-based synthesizers, many keyboards do not produce sound on their own. With such keyboards you'll need to plug in a sound module via MIDI or connect to your computer's software synth to play sounds.
For the many other keyboards that do produce sound, the local on and local off settings determine whether the MIDI data from the keyboard, pitch wheel, mod wheel, and other controls will be sent to the internal sound generation facility. With the keyboard set to local on, your playing will produce sound on the instrument, as well as being transmitted via the MIDI out port to your computer or other connected devices. With the keyboard set to local off, the sound generator in the instrument will respond to MIDI data received from an external source (like your computer sequencer), and anything you play will be sent to the MIDI out port, but your playing won't produce sound directly. Why would you want to do this? There are two possible scenarios: you might want to use the keyboard to play a software instrument while a sequencer triggers the internal sounds on the keyboard, or you might want to enable a MIDI thru (also, confusingly, called MIDI echo) setting on the computer so that MIDI data is routed through the computer and then back to the synth. If you're using a keyboard that has its own internal synth along with a software sequencer, you'll normally keep the keyboard in local-off mode: if it's set to local-on, the sequencer's MIDI thru will cause each note you play to be heard twice, because each MIDI message will reach the keyboard's internal synth both directly (via local-on) and again after passing through the computer. These doubled notes will usually sound strangely hollow or blurred due to phase cancellation. If you're not hearing sound when you play, keep in mind that you might want to double-check whether your keyboard is in local-off mode.
Not hearing anything? In addition to local-off settings, many keyboards can turn off MIDI receiving for local-only performance. Since you'll want your keyboard to receive MIDI when working with a computer, make sure your keyboard is set to receive MIDI data.
Since electric guitars and bass are by definition analog devices, you'll need to translate your playing into MIDI if you want to control MIDI instruments or input and edit MIDI notes. The connection is one-way: you can use a guitar as a MIDI controller, but MIDI obviously can't play your guitar, so you'll have to use a synthesizer to produce sound with recorded MIDI performances. There are two basic elements to a MIDI hookup for guitars and basses:
The pickup: To capture your playing as analog signal
Signal-to-MIDI conversion: To convert the analog signal captured to digital form, as MIDI pitches and rhythms
Electric guitars and basses ordinarily combine the sounds from all the strings on a single cable as an analog electrical signal. If you're playing single-note lines and carefully muting the other strings, you may be able to use your standard instrument pickups for MIDI. Using a specialized pickup (sometimes called a hexaphonic pickup because it has a separate output for each of the six strings), you can isolate signal from each string for more reliable tracking and the ability to capture multiple notes played at once.
Many pickups use a 13-pin connector called the Roland RMC connector for plugging into guitar tone modules and effects from Roland, Yamaha , and Axon (www.terratec.com). These pickups can be connected to a module like the Roland GI-20 (or similar device), which outputs MIDI via USB for easy connection to a computer ( Figure 8.7 ). Plug a 13-pin guitar plug into one end of the GI-20, and then plug your computer into the other end via a USB cable. Now you can do most of what a keyboardist can do with your MIDI instruments and sequencer. (You'll also find that playing idiomatic guitar phrases on these instruments is easier than it is with a keyboard.)
To reduce the number of separate components for digital connections, specialized guitars like the Brian Moore iGuitar (www.iguitar.com) come from the factory with a specialized pickup and RMC connection ( Figure 8.8 ). (Brian Moore's iGuitar. USB adds USB out for audio, though it still needs to connect via the RMC connector to a device like the GI-20 for MIDI.)
Do you really need MIDI? If you just want to plug in your instrument and play, adding effects and recording audio, a normal pickup and audio connection are fine. You can then add effects via hardware or software amp simulations with effects, like the AmpliTube Uno software included on the accompanying DVD. You'll need to enable your guitar or bass for MIDI if you want to:
Percussionists have two basic options for MIDI: you can either capture MIDI events from a traditional acoustic drum kit by adapting it with piezo sensors and audio-to-MIDI conversion or use a digital drum system designed specifically for use with MIDI. Both systems convert your drum hits into MIDI events, which enables you to play virtual drum kits in software or hardware instruments, trigger sampled sounds, match the software's tempo to your playing, start and stop videos , or perform other MIDI tasks .
Piezo sensors (or simply "drum triggers") are extremely simple electrical devices that happen to be perfect for use with drums. They're thin pieces of material ( piezopolymer ) that produce an electrical pulse when disturbed by vibrations. If you attach a piezo to a drum head or shell and hit the drum, the piezo produces a brief electrical pulse. Piezo triggers can either be taped directly to the drum head or mounted in specialized trigger attachments like the ddrum triggers in Figure 8.9 . (The latter arrangement is generally preferable, as it's less fragile and tracks playing more reliably by maintaining consistent pressure with the drum.) The trigger produces an electrical signal, carried via standard audio cables, which can then be converted into digital MIDI data.
To convert the analog electrical signal to MIDI, you'll need a trigger-to-MIDI converter. You can purchase newer models like the Roland TMC-6 or scour eBay and other used equipment sources for inexpensive older models.
As an alternative to piezo sensors, you can use software-based audio-to-MIDI conversion, like the donationware Mac/Windows VST KTDrumTrigger by Koen Tanghe of Smartelectronix, which is included on the DVD. This type of software analyzes close-miked acoustic drums and outputs a MIDI note each time the incoming signal passes a threshold set by the user . A major advantage of software-based conversion is that you can use recorded audio or sampled loops as triggers. In addition to doing some adjustments to make them accurate, you'll also need a host software application that supports receiving MIDI from plug-ins; some major DAWs lack this capability.
Do you really need MIDI? If you're happy just recording the sound of your acoustic kit, you don't need MIDI triggering, but MIDI gives you some capabilities that can turn a skilled drummer into a veritable one-person band :
Whether you're using piezos or audio-to-MIDI conversion, you may need to experiment with your setup to get the results that you need, by adjusting triggering thresholds and watching for errors.
If you decide to go all-digital rather than banging on real drums, you can use digital drum pads. Digital drum pads either include built-in MIDI ports or use pads with integrated piezo sensors attached to a MIDI converter. Options include hardware for use with:
Hands: Drum pads for use with your hands, like M-Audio's Trigger Finger and Akai's MPD-16, both of which divide pads into a 4x4 grid (as used on Akai's wildly popular MPC-series samplers), or Roland's Handsonic HPD-15, which arranges pads in a circular layout familiar to those who play hand percussion like bongos.
Sticks: Drum pads for use with sticks, like KAT Percussion's DrumKAT and TrapKAT, and drum pads from Yamaha and Roland.
Mallets: Digital mallet instruments, like KAT Percussion's MalletKAT.
Feet: Hardware kits can provide digital triggering via foot pedals that work like an acoustic drum kit's kick and hat pedals; Hart Dynamics, for instance, makes specialized pedals.
Whole Enchilada: Fully digital, complete drum kits with kick, hats, mesh drum triggers, synthesis, and MIDI conversion, like Roland's V-Drum system ( Figure 8.10 ) and Yamaha's DTX series.
Resources for MIDI percussion equipment:
Roland: digital drum pads and fully digital kits (www.roland.com)
Yamaha: drum triggers, digital drum pads, and fully digital kits (www.yamaha.com)
ddrum: drum triggers, pads, and kits (www.ddrum.com)
Hart Dynamics: electronic drums, triggers, kick/hat pedals, and kits (www.hartdynamics.com)
KAT Percussion: digital mallet instruments and digital pads (www.alternatemode.com)
DIY and cheap solutions: Because piezo sensors are simple electrical devices, building custom drum pads is a popular project for do-it-yourselfers. A quick Google search for "Drum Trigger DIY" will bring up many alternative ideas. You don't have to build your own triggers just to save money, but piezo sensors run just a few dollars (you can find half a dozen for around $30), and vintage trigger-to-MIDI converters are often as little as $80100 on eBay (or less at a local garage sale). You may find integrated pads worth the extra money, since they tend to provide more consistent results.
Keyboardists have some advantages over other musicians when it comes to MIDI, but other options are available for other instruments:
Pianos: Some acoustic pianos, like Yamaha's Disklavier line, include built-in MIDI outputs so they can be used as a MIDI controller. The Disklaviers can even respond to MIDI, so they can be triggered by a sequencer. If you don't have access to such an instrument, you can use an add-on device like the Moog Music Piano Bar (www.moogmusic.com) to convert keyboard performances played on any piano to MIDI.
Wind instruments: Wind controllers like Yamaha's WX5 ( Figure 8.11 ) are specialized digital instruments intended to provide the flexibility of a MIDI keyboard with the expressivity of a wind instrument. The WX5 can even mimic different fingering layouts like flute and sax. Inexpensive breath controllers provide breath input without any fingering, which is useful even if you're not a wind player. You'll usually need a conversion box, such as a Yamaha keyboard with a breath controller input, to make use of them.
Accordion: Even accordions are going digital: Roland's V-Accordion has onboard MIDI to capture your accordion performance or play other instrument sounds with the accordion keyboard.
Pitch-to-MIDI: Pitch-to-MIDI software or hardware converts incoming audio signal to MIDI data, meaning you can use any instrument you choose (though it typically works only with instruments that play one note at a timenot chords). Examples include Antares Kantos (www.antarestech.com), a Mac/Windows synth plug-in that can be controlled by monophonic input like voice, and Lateral Solutions' Guitar Synth (www.lateralsol.com), a Windows application that converts pitch to MIDI in real time and can be connected to other Windows applications via MIDI-Yoke (included on the DVD). For more control, you may prefer to build your own simple converter in a modular environment like Max/MSP.
Once your equipment is connected to your computer via MIDI, you can configure your software to communicate with your hardware. With data flowing in both directions, your software can record and edit performances that originate on your hardware instruments and other MIDI devices, and your hardware can control parameters in software.
Since MIDI instruments treat MIDI data (the data that provides the control) separately from audio data (the sound the instrument makes), you'll need to make sure both MIDI and audio are properly routed in the software.
If you only ever needed to control one instrument sound with one MIDI input, you wouldn't need to separate MIDI data. However, real music has ensembles . If, for example, you want to play a bass on the bottom half of your keyboard and a piano with the top half, or play back a sequence from software involving a drum kit, horns, and organ, you need a way of separating information (so the horns won't try to play the drum sounds or vice versa). MIDI uses channels to route data between multiple sources and destinations. The MIDI specification has 16 channels, numbered 116.
Sometimes each device will be assigned its own channel. For instance, if you have two hardware synths and a hardware drum machine, the synths might respond to messages on channels 1 and 2, respectively, while the drum machine might be assigned to channel 3. But often, a single device will be configured as if it were several "virtual" devices. A hardware synth, for example, might play a drum kit on channel 1, an organ on channel 2, and a horn sound on channel 3, all at the same time. A MIDI device that can do this is referred to as multitimbral , because it can produce several timbres (sounds) at once. A multitimbral instrument has several parts (usually four, eight, or 16), each of which is assigned both a MIDI channel and a sound program. Using a multitimbral instrument is a bit like assembling a virtual ensemble ( Figure 8.12 ). For instance, you might arrange a few of your 16 channels into a jazz quartet:
Channel 1: Acoustic piano
Channel 2: Upright bass
Channel 3: Alto sax
Channel 10: Drum kit
Each of the sound presets for piano, bass, sax, and drums is assigned to a different MIDI channel to create the ensemble. (Many multitimbral instruments default to channel 10 for the drums. It's just a convenient location; you can use whichever channel you like.)
Sound programs: The terms voice, tone, preset , and patch are all used interchangeably to refer to sound programs. A sound program is a group of settings for parameters, which together determine what sort of sound the instrument will make.
MIDI is technically limited to 16 channels, but it's possible to use 32, 64, or even more channels by assigning 16 channels to each of a number of ports . A port is any standard 116 channel MIDI connection, usually representing a physical MIDI connection but sometimes referring to a virtual MIDI connection in software. If you want 64 channels, for instance, you'll need four MIDI ports. Most of the instruments that can respond to MIDI data, however, are limited to 16 channels (or fewer), so the only reason to use a multiport configuration is if you're using several MIDI instruments at once, each of which needs to use a number of channels simultaneously.
To play into your sequencer using a keyboard or other MIDI controller, you'll need to set up a MIDI track to receive MIDI from the keyboard as you play. Create a MIDI track, then select the MIDI input port to receive data from your keyboard or other controller. Many sequencers will receive on all MIDI channels at once by default. If you want to receive on only one channel while ignoring others, select that channel; otherwise , receiving on all channels at once will do the job. If you want to record on multiple tracks at once, with each track recording from a different channel, you'll need to specify the channel on each track and arm those tracks for recording.
If you want to use the internal sounds on your external hardware to play back recorded MIDI performances transmitted by your sequencer, you'll need to set an output port and channel in the sequencer that corresponds to that device. Now, not only can you record your performances, you can play them back as well ( Figure 8.13 ).
Software instruments can make MIDI routing easier, although different applications handle these instruments in different ways. Some applications have "virtual instrument" tracks that bundle MIDI and audio data together, handling the two seamlessly. They'll automatically route the MIDI data to your software instrument, and route the audio into your mix. Others require you to set this up manually: you'll set up a MIDI track just as you would with hardware, then set up a separate audio channel in the mixer to handle the audio output from your virtual instrument.
Whether your instrument is a virtual instrument in software or an external hardware synth, you'll want to choose a sound program for it. Sequencers often allow you to choose a program for each MIDI track, but some virtual instruments require you to set a patch from their own onscreen interface. Hardware instruments will almost always respond to MIDI program change messages transmitted from your sequencer, although hardware instruments usually also have onboard controls for selecting a patch. (Just remember that you'll probably want to set the patch in software as well so that the next time you load your sequence, you don't wind up with a tuba playing your harp line.) For more details, see the section "Programs and Banks," later in this chapter.
If you're using only the MIDI features of your hardware and software, you may not need to route audio signals in or out of the computer at all: with your external synth hooked up to speakers , you'll hear its output when your sequence plays back. However, if you want to add audio effect plug-ins on your computer to the output of your synth, or record the synth's audio output so you can hear the song when your synth isn't hooked up, or output the final mix of your song to a CD, an MP3, or another audio format, you'll need to get the audio from your synth into the sequencer/DAW.
MIDI track archive: After recording (rendering) external synth tracks as audio tracks in your DAW, mute the MIDI tracks but don't delete them. If you later want to change anything, you'll find it easier to edit MIDI than audio.
To record audio from an external hardware instrument, you'll need to connect your hardware's audio output to your computer interface, set up an audio track in your sequencer software for recording, choose the appropriate audio input from your hardware, and hit the Record button. Even if you're using a FireWire/USB device, you'll need to route audio to a track. Some of these devices include an audio output that's carried on the same USB or FireWire cable that carries MIDI, saving you the trouble of connecting audio cabling, but you'll still need to manually set up audio recording to capture the sound of the synth.
Even if you're using a virtual instrument, you'll need to record its audio output before transferring your song to a system that lacks that instrument or plug-in. This process differs from one sequencer to another, but the basic process is to automatically render audio from plug-ins if you have such an option, or, if not, to manually route the audio output of the virtual instrument to an audio track, just as you would a hardware synth.
Mac OS X and Audio MIDI setup: On Mac OS X, you can test MIDI devices and configure MIDI setups using Apple's Audio MIDI Setup utility, located in the Utilities folder. Click the MIDI Devices tab to create, edit, and switch between saved MIDI configurations. Some MIDI apps will automatically use this setup to recognize which devices are connected to MIDI ports and which channels they use, although others will require you to configure MIDI hardware individually for each application.