Skip to Content
Skip to Table of Contents

← Previous Article Next Article →

ATPM 5.10
October 1999

Columns

Segments

HowTo

Extras

Reviews

Download ATPM 5.10

Choose a format:

MIDI and the Mac

by David Ozab, dozab@atpm.com

Part 1—Introduction

MIDI stands for Musical Instrument Digital Interface. It is a standard protocol that allows synthesizers, samplers, sequencers, and other electronic music devices to communicate with each other. In the dark days before The MIDI Era (BME), musicians needed special translators custom built for any pair of devices. A box that connected a Roland Synth with an Oberheim wouldn’t connect that Roland synth to a Moog or a Prophet. Since 1983, though, all one needs is a simple cable to connect any two instruments.

Misconception # 1: MIDI is NOT Audio

MIDI transmits information about performance—such as notes, dynamics, pedal changes—independent of the resulting sound. Because of this distinction, any controller (what you play) can be matched with any module (what you hear). A keyboardist can play a string ensemble, a guitarist can play a saxophone, a sax player can play a drum kit, or a drummer can play a piano.

Types of MIDI Devices

Take a quick flip though any electronic music magazine. The pages are packed with synthesizers, samplers, effects boxes, mixers, guitar controllers, wind controllers, electronic drum pads, and many other fun toys —all MIDI compatible. In general, though, they all fall into one of three basic categories:

  1. Controllers are the instruments you play—like keyboards or drum pads. They transmit MIDI, telling any devices on the other end of the connection what notes to play, how long to play them, and how loud to play them.
  2. Tone Modules are the devices that produce sound—like synthesizers and samplers. These might have their own keyboards, but many are rack mount modules.
  3. Sequencers are the “tape deck” of MIDI. They receive MIDI from controllers and send MIDI to modules. The earliest sequencers were hardware devices, but by the late ’80s software programs began replacing them. Now professional quality sequencing software installed on a computer forms a powerful command center for both home and pro studios.

MIDI Cables and Connections

MIDI is transmitted through five-pin DIN cables (known to most today as MIDI cables—they are inexpensive audio cables adopted in the original MIDI specification). The rate of transmission is 31,250 bits per second, close to the speed of a 33.6 Kbps modem. The three types of MIDI connections are IN, OUT, and THRU. IN accepts information from another device, and OUT sends information to other devices. THRU is a special case—the instrument takes the signal from the In port, duplicates it, and sends it through to the next device in the chain. This “daisy chain” loses information at each stop, though, and MIDI hubs of various types are common.

The Structure of MIDI Messages—Here Comes the Binary

Ok, it’s not that bad. The average length of a MIDI message is only three bytes long. My Mac could process that in a nanosecond, but MIDI is in many ways an antiquated technology. This raises the issue of MIDI’s future, but that’s another article. For now, considering the way MIDI is structured will help explain the types of MIDI messages and their inherent limitations. Again, the average MIDI message is three bytes long. It consists of a Status byte, which tells the receiving device what kind of message it is looking at, and a data byte, which tells the receiving device “how much” of that type of message there is. The most common “word” (that is, collection of bytes) in a MIDI stream is the Note On message. Within this word is a Status Byte identifying the message type (Note On) and specifying the MIDI channel, a Data Byte identifying the note (note number) and another Data Byte identifying how loud the note is (velocity—loudness is measured, either literally or conceptually, by how fast a key on a piano-like keyboard is depressed). The MIDI Note On message contains all this information. The way it’s organized is quite clever:

 

Status

Data 1

Data 2

10010001

00111100

01100100

The first thing that jumps out is the difference between a Status Byte, which always begins with one, and a Data Byte, which always begins with zero. This is how the receiving device can tell which is which, and organize the bytes into understandable groups. Once it recognizes a Status Byte, it needs to tell what kind it is. The next three digits, 001 (I made this example easy), identify a Note On message. The last four digits, 0001, place this message on MIDI channel one. Now that the device knows it’s seeing a Note On set to MIDI channel one, it also knows that the Data Bytes are a note number and a velocity value respectively. So the seven remaining express the value of each. In this case, note number 60 (middle C) and velocity 100 (a solid forte).All MIDI messages are organized this way.

 

Status

Data 1

Data 2

Note Off

Note Number

Release Velocity

Note On

Note Number

Velocity

Poly Pressure

Note Number

Amount of Pressure

Control Change

Controller Number

Controller Value

Program Change

Program Number

 

Aftertouch

Aftertouch Value

 

Pitch Bend

Least Significant Byte

Most Significant Byte

Note Off is rarely used. Most MIDI Note On messages end when the module playing the note receives a matching Note On with velocity zero. (Note that duration is never directly transmitted, it depends on the time elapsed between events.) Control Change covers the wheels (except Pitch Bend), pedals, buttons, sliders—all the accessories. The controller number identifies each one (i.e. Mod Wheel = 1, Volume Pedal = 7, Sustain Pedal = 64, etc.). Program Change is simply a command that changes the sound loaded in the module. Pitch Bend is like a controller (it is a wheel, after all), but uses two bytes to express an exponentially larger range of values (16,384 instead of only 128). Aftertouch and Poly Pressure are similar. Both record pressure applied to a key after it’s depressed. Aftertouch applies the result to all the notes in a chord no matter which key is pushed, while Poly Pressure only affects the note in question.

MIDI Modes

Once the message is sent, the receiving module needs to know what to do with it. This is where MIDI modes come in. The modes as specified in the MIDI specification version 1.0 are as follows.

Omni Mode is the no-brainer setting. Plug it in and get sound. Poly Mode is the most important setting for polyphonic synths and samplers. Play chords up to the polyphony limit (number of notes possible at once), but only one patch (timbre—tone quality) at a time. The advent of multi-timbral synthesizers—inconceivable before MIDI sequencing—led the IMA (International MIDI Association) to replace Mono Mode with Multi Mode. In Multi Mode, the module can receive multiple MIDI channels, and divides its available polyphony between them. So chords are possible on every channel as long as notes are still available.

Who is this General MIDI?

General MIDI is a standard that associates particular channels and program numbers with specific types of patches. For example, Program Number 13 is always a marimba, and MIDI channel ten is always used for drums. The advantage of General MIDI is the portability of MIDI files. If I sequence a song with a particular instrumentation, I know that you will hear roughly the same thing that I do. The guitar solo won’t inexplicably become a pan flute. The disadvantage is that General MIDI is generic by definition. I know the guitar solo will always sound like a guitar, but it could be a really cheesy guitar.

Next Month: MIDI and the Mac—Part Two: A look at available hardware and software for the Mac.

Copyright © 1999 David Ozab. David Ozab is a Ph.D student at the University of Oregon, where he teaches electronic music courses and assists in the day to day operation of The Future Music Oregon Studiosapple.

Also in This Series

Reader Comments (0)

Add A Comment





 E-mail me new comments on this article