Reference Series Table of Contents For This Issue

How Computers Work, Part I
August 2001• Vol.5 Issue 3
Page(s) 116-119 in print issue

Play MIDI For Me
The Musical Instrument Digital Interface Gives Musicians More Control Over Their Tunes

To record and store high-quality stereo files on your computer, you need roughly 10MB of space for every minute of sound. If you use MIDI instructions to create sound, you only need 10KB for every minute.
In the simplest terms, the act of making music comes down to creating individual sounds. On a piano, you press down on a key, then lift up. On a guitar, you pluck a string, then either silence it or play another note on that string. Essentially, this is a process of telling your fingers to turn a sound on or off. As you make these sounds, you can produce them loudly or quietly, bend them to alter the pitch, or do many other things that affect exactly how a sound is voiced.

If you have a computer and the right equipment, you can have a whole new level of control over your music using MIDI (Musical Instrument Digital Interface). It is important to note that MIDI is not a way to transmit audio, nor is it a medium that stores sound. MIDI is a protocol, or language, that lets MIDI-enabled instruments and computers “talk” to each other. MIDI transmits the instructions an instrument needs to play individual sounds. MIDI is extremely useful because it lets you edit music or create difficult chords or note sequences that no person could ever create. MIDI controls every one of these actions with command codes, or messages. For example, just like you told your fingers to strike the piano key when you wanted it to make a sound, MIDI sends a Note On message. When you don’t want a sound from an instrument, MIDI sends a Note Off message.

MIDI is a terrific space saver because it only records messages, not sounds. The few bytes needed to say Note On here and Note Off 20 minutes later are paltry compared to the 200MB or so required to record 20 minutes of a single note in full stereo digital audio. On the other hand, one of MIDI’s greatest limitations is its inability to cope with elements such as singing, which are typically stored as WAV files. Fortunately, most sequencers, which are devices integral to the music editing process (see below), can handle WAV and MIDI files simultaneously, blending them into a seamless whole.

 Musical Flexibility. You may know how to play a keyboard but not a guitar. In the old days, this meant your band was out of luck unless you could recruit a guitarist. However, it makes sense that if you can control a keyboard with a set of messages, the same messages should be able to manipulate the sounds (but not necessarily the strings) of a guitar or any other instrument. The message, “play a middle C” should be understood by any musical device.

So, you have a command set capable of controlling a host of instruments. You still have to play each instrument, and if you only know how to operate a keyboard, it follows that every instrument requires its own keyboard to help you translate your musical commands into sound. But this raises two problems. First, if you want to assemble a decent-sized band to create interesting music, you’re going to need to purchase a lot of instruments and a big studio to house them. Second, you’ll probably want to play several instruments at once during your song, and you only have two hands.

Using the IN, OUT, and THRU ports on a MIDI-enabled instrument, you can connect as many as 16 musical devices.
MIDI Vendors. This is where MIDI saves the day. There are three kinds of MIDI hardware ports, IN, OUT, and THRU. As you send a series of messages on a keyboard, they exit via the MIDI OUT port. They are then received by the target instrument through its MIDI IN port and, if appropriate, played.

Imagine you have two instruments, in the order of guitar then piano. You send a set of messages from your keyboard’s MIDI OUT port to the guitar’s MIDI IN port. In reading the messages, however, the guitar knows these instructions do not apply to it, so it passes the message out via the MIDI THRU port. (MIDI THRU is virtually identical to MIDI OUT, except OUT signals carry instructions generated from that particular device.) The messages then arrive at the piano’s MIDI IN port and are subsequently voiced.

Instruments determine whether to execute messages based on which channel they have been assigned. Say the piano is designated as channel 1 and the guitar channel 2. If the instructing keyboard is sending messages designated for channel 1, the guitar will know these messages are not meant for it and pass them quietly through to the piano. Each MIDI chain is capable of supporting 16 simultaneous channels. Essentially, this means that from one keyboard, you can control 16 separate instruments at once, each of them playing together, which makes MIDI multitimbral.

If you were at your keyboard serving as a conductor, you could be directing a 16-member orchestra. One of MIDI’s outstanding benefits is that, in the middle of a piece, you can instruct one of these musicians to set down an instrument and pick up another. As a result, you can issue a change in messages, making the saxophone patch, or specific instrument voice, on channel 8 suddenly turn into a harpsichord patch.

The biggest problem with MIDI early on was that, while instrument vendors would assign a number to each patch, No. 27 in one vendor’s sound module (a collection of electronic voices) may be entirely different from another vendor’s No. 27. Handing someone a MIDI file designed for a string quartet might be mutilated by a foreign sound module into a dissonant brass band. To give some industry-wide consistency to MIDI patches, the MIDI Manufacturers Association formed GM (General MIDI) in 1991.

 General MIDI. In addition to several new technical specifications, GM designated 16 families of instruments (piano, organ, bass, chromatic percussion, and so on), each containing eight instruments, for a total of 128 instrument voices. The solo strings family, for instance, contains violin (41), viola (42), cello (43), contrabass (44), tremolo strings (45), pizzicato strings (46), orchestral strings (47), and timpani (48). Thus, GM-compliant sound modules, regardless of vendor, will all play a cello voice when messages for patch No. 43 are issued.

However, just as two real cellos often sound slightly different, so can two vendors’ sound modules. Even though both carry identical instrument codes, a cello from a Roland synthesizer may sound significantly different from the cello in a SoundBlaster Live! sound card.

In addition to the standard 128 instrument voices, most GM modules offer a secondary drum submodule composed of 47 patches ranging from acoustic bass drum (35) to open triangle (81). The majority of MIDI systems are preset to receive percussion information on channel 10.

It’s interesting to note the last family of GM voices are not instruments but sound effects, such as breath noise (122) and gunshot (128). In fact, users can customize patches to be any sound. GM is not bound by the MIDI specifications and is only one established collection of patches. For example, you could make a digital recording of a door slamming and ultimately convert it into a patch to replace the glockenspiel patch normally found at program No. 10. Most decent sound cards now come with sound modules that cover hundreds of patches, and by layering these one over another, you can create new sound combinations.

GM is merely one such sound module, a way for musicians to convey the close approximation of a basic composition. Most newer sound cards now use RAM so other sound models can be loaded to ensure compatibility when you move from one set of MIDI instruments to another. Typically, the finesse and detail of a piece picks up where GM leaves off.

 Sequencers. Making sound is only the first part of MIDI composition. A composer needs to record the chain of MIDI messages and be able to play them back. A device called a sequencer performs both these tasks with some extraordinary side benefits. In the past, a sequencer was an external box, but today computer software is replacing those.

The recording aspect of sequencers keeps faithful track of every nuance in the original performance. In fact, to aid the musician and assist in synchronizing multiple tracks, many sequencers play a steady metronome beat during recording. Nearly all sequencers now save MIDI messages in MIDI File Format.

As a player, sequencers repeat the role of the original performer, reissuing the MIDI messages to their proper instruments exactly as they were encoded. This includes not only patches and notes but also pitches, effects, and any other instructions the MIDI protocol encompasses. In a sense, you can think of a MIDI player as the song roll on a player piano, playing the instrument without any human intervention.

Editing is where sequencers really shine. In analog recording, slowing down the playback tempo of one track to synch with another typically results in the lowering of that track’s pitch. With MIDI, there is no such impairment. Sequencers can manipulate tempo independent of pitch. Moreover, musical parts can be shifted into different keys and patch instruments and be subjected to the full gamut of musical effects.

Sequencers can accept information at a snail’s pace and translate this into a fluid, regular-speed piece. If a first-year rock guitarist can play the notes correctly, regardless of timing accuracy, software can help regulate timing (a process called quantising), and a sequencer can accelerate the halting performance into a full-blast rock-and-roll rendition. Sequencers further aid this process by letting you alter individual notes and note characteristics (musically known as voicings). Such hunt-and-peck entry is called step-entering.

Although the case for step-entering is persuasive, it can take a long time to edit, and the end result often lacks the subtle delays and musical emotion that characterize a live performance. Real-time recording, for those capable of it, can yield a more human-sounding composition, but problems arise when the performance is scored through notation software. Because the computer maintains a beat while recording, deviance from this beat (intentional or not) can wreak havoc on musical transcription. Again, quantising can assist with this, but the more closely you want to reproduce the original performance, the more editing you have to do.

Fortunately, sequencers are not restricted to dealing only with MIDI files. The mixing and synchronizing of alternative formats, such as digital voice recordings, along with MIDI compositions is what makes sequencers an indispensable part of the recording process.

 Sound Cards. When equipped with the right software and sound card, a PC can accommodate every aspect of MIDI composition from laying down the first note to exporting a polished symphony. However, using a mouse and keyboard for composition can be exhausting and self-defeating. A faster process is to connect a MIDI instrument (such as a synthesizer or guitar) to the PC via the 5-pin DIN connector MIDI ports.

Dedicated ISA (Industry Standard Architecture) MIDI expansion cards and external MIDI interface modules that plug into a PC’s serial or parallel port are not uncommon. In fact, for notebook computers, the serial/parallel method is often the only option for taking MIDI on the road. However, most desktop machines now use MIDI via the sound card’s joystick adapter, which connects to a special MIDI interface adapter that offers IN and OUT ports.

Sound cards generate sound through two methods, FM synthesis and wavetable synthesis. FM synthesis, which was created in 1976, is still the dominant method used in consumer-level sound cards. With FM, sound waves are manipulated to approximate a given sound, such as a piano. Typically, it may bear some resemblance to a piano, but this method often results in flat and tinny sounds. FM synthesis will continue to recede as the technology to implement wavetable synthesis becomes more affordable.

FM synthesizer chips are capable of emulating the chips found in conventional MIDI synthesizers, including the ability to produce the full range of GM patches. However, the performance standards for sound cards is less than optimal. The MPC (Multimedia PC) specifications laid out in the early 1990s for sound cards only call for FM chips to be able to produce six melodic and two percussive notes simultaneously. This is a far cry from the GM standard minimum of 16 melodic and eight percussive simultaneous voices.

Wavetable synthesis, which was pioneered by Ensonique in 1984, takes actual digital sound samplings and modulates them to achieve any note on the musical scale. So when you order up the sound of a grand piano from a wavetable card, you’re actually getting an altered playback of a true piano. The result is far more vibrant and makes a vast difference in music and gaming software.

Some cards, such as older SoundBlasters, require a wavetable daughterboard, such as the Wave Blaster. However, most professional-quality adapters now incorporate several megabytes of wave samples into an onboard ROM bank. In addition, some cards sport a programmable ROM area where users can insert their own wave samples.

Another factor to look for in choosing a MIDI-enabled sound card is the number of voices it can produce simultaneously, also known as polyphony. Some cards, notably those by Creative Labs, end their models with a 16, 32, or 64. It’s a common mistake to think this refers to the number of bits traveling across the data bus, as in a 32-bit PCI (Peripheral Component Interconnect) card. In reality, it describes the number of polyphonic voices the card can handle.

Most MIDI synthesizers are 32-voice capable, meaning they can voice 32 notes at once. If another note is added, the first note will be discarded to maintain a total of 32. This is significant because despite there being 16 channels, if several of those instruments are voicing multinote chords, the odds are good that the 32-note total will be exceeded and some of it lost.

As you shop for sound cards, look for a product with at least 64 hardware-based voice polyphony. The SoundBlaster Live! offers this number but also provides for multiple MIDI ports and the use of software enhancements to exceed 1,000 voices. In reality, 64 voices is plenty for nearly all musical compositions.

 MIDI Tomorrow. In 1995, a small furor was incited when Digital Design and Development, a single member of the MMA (MIDI Manufacturer’s Association), put forth a revised audio format called XMIDI aimed at becoming the new standard in professional music. The MMA shot down XMIDI on four counts.

“MIDI is inexpensive and royalty free,” the MMA said in its refusal statement ( “These characteristics are considered vital to our membership and a prime reason for its acceptance and proliferation.” XMIDI, as a proprietary format, contradicted this open-format philosophy.

The structure of the XMIDI interface was more complex than standard MIDI. Despite any sort of XMIDI feature enhancements, MIDI’s simplicity was considered more important from a propagation standpoint.

Each XMIDI manufacturer would have been required to sign a secrecy agreement, thereby limiting the spirit of cooperation that allows MIDI to thrive.

XMIDI would have necessitated expanding the 31.25Kbaud traffic speed across serial data lines, possibly creating vast backward-compatibility conflicts.

These four points illustrate some of the essential requirements for any technology that would hope to supplant MIDI. Today, there appear to be no viable contenders. With a strong history, extensible feature additions (such as GM), and complete market dominance, it will likely be years before MIDI’s reign will recede.  

by William Van Winkle

View the graphics that accompany this article.
(NOTE: These pages are PDF (Portable Document Format) files. You will need Adobe Acrobat Reader to view these pages. Download Adobe Acrobat Reader)

MIDI Vendors

Cakewalk claims to offer the world’s leading MIDI music software on the market, and the site offers some phenomenal tools for all skill levels. Be sure to check out the extensive links list in its Products section for more MIDI information.

Coda Music Technology
Although this company is known for its music-tutorial software, Coda also offers several sheet music and notation titles.

Creative Labs
Whether you visit to learn more about the sound cards, read the frequently asked questions, or you want to check out Creative’s intriguing SoundFonts, the home of SoundBlaster has something for every sound enthusiast.

A prominent MIDI hardware and software vendor, Opcode has launched a successful line of Universal Serial Bus-based MIDI port products.

Peavey Electronics
When you want industrial-strength MIDI equipment, including instruments and mixers, take a spin through Peavey’s revered product lines.

With more product categories than you can shake a drumstick at, Yamaha manufactures everything from PC sound cards to sequence remixers. In addition, look for information about Yamaha’s extended XG MIDI and XF formats, essentially a large improvement on GM, at

Want more information about a topic you found of interest while reading this article? Type a word or phrase that identifies the topic and click "Search" to find relevant articles from within our editorial database.

© Copyright by Sandhills Publishing Company 2001. All rights reserved.