MIDI

MIDI stands for Musical Instrument Digital Interface and refers to the protocols, interfaces, and physical connectors used for audio devices to communicate musically relevant information. MIDI does not transmit audio signals but information used to create them.

Contents

Structure of MIDI Information

MIDI transmits data as digital electronic pulses in serial. Although MIDI cables commonly connect via a 5-pin jack, often only 3 are used - two for power, and one for data.

Channels

Every MIDI link can carry up to 16 different channels of data. Each device typically "listens" and "speaks" on only one of these channels. This allows MIDI data to be sent along a common cable chain through many devices while targeting different messages for different devices, avoiding the use of patch bays and manually managing loops/sends between devices.

Messages

MIDI sends all its information as messages, which are composed of multiple MIDI bytes. A normal byte is 8-bits, but a MIDI byte is 10-bits, comprised of a start/stop bit, a type bit, and a 7 bit value. The type bit indicates whether the byte is a status byte or data byte. A typical MIDI message is composed of a status byte to indicate what type of message it is followed by 1-2 data bytes. MIDI messages can be one of the 5 types below, which are further broken down.

Channel Voice

This is the most common type of data you'd be expecting MIDI to transmit:

  • Note-On w/ velocity and pitch (note number) values
  • Note-Off
  • Program Changes (PC's)
  • Control Changes (CC's) (includes Bank Select and NRPN messages)

Notes are typically associated with MIDI controllers/keyboards or drum machines (or e-kits). For guitar, MIDI is useful to control devices, switching patches, switching effects on/off, or controlling effect parameters. PC's are used for changing patches, while CC's toggle and manipulate parameters. However, keyboards often come equipped with controllers that are designed to send CC messages - pitch and mod wheels, rotary dials, and sliders. As well as non-piano format notes: tap pads, and buttons.

NRPN (Non-Registered Parameter Numbers)

NRPN messages are special sequences of CC messages designed to access parameters on devices that have more than 128 parameters (max address size of a standard 7-bit CC message) or has parameters that do not correspond to the standard usage of the 128 available CC addresses.

Channel Mode

Channel Mode messages are designed to change the way devices respond to processing channel data. It can switch devices from listening to a single channel (Omni Off) vs. all channels (Omni On). It can also send note-off or reset to default messages to all controllers.

System Common

System Common messages are used to send system data that has no channel number and is sent to all devices.

System Real-Time

System Real-Time messages carry real-time system information like the MIDI clock, and active sensing which is used to ensure devices are still online.

System Exclusive

System Exclusive or SysEx messages are proprietary formats that manufacturers develop to communicate with their hardware in a way that other MIDI defined messages cannot provide. For example, standard MIDI CC messages only provide a range of 128 different parameters to target. Some devices feature thousand of parameters. SysEx allows messages to have larger data sizes, increasing the number of parameters and/or the resolution of the values. Or it could specify other formats, such as transmitting text or even more advanced data structures.

The SysEx format includes a unique ID to ensure the messages only communicate with compatible devices.

MIDI Devices

MIDI Controllers

The most common MIDI controller takes a format of a small to medium-sized keyboard of between 2 and 5 octaves with velocity sensitive keys, and a variety of additional controls. These may be dials, buttons, sliders, XY pads, ribbon controllers, pitch/mod wheels, and velocity-sensitive touch pads.

While that's the most common format, there are many other devices, such as electronic drum kits, drum machines, virtual turntables, motion/space controllers, and virtual woodwind and brass instruments.

Connecting to a DAW or other devices

Setup

Assigning CC's

MIDI Foot Controllers

Working with MIDI

MIDI Tracks and Automation

DAW software typically features MIDI tracks that can contain MIDI note information, useful for playing or programming virtual instruments. It can be recorded live or more easily programmed using a MIDI controller, as well as exported to other devices in the MIDI chain, synthesizing audio, playing samples, or otherwise controlling them. Tracks typically offer note number (pitch/name), velocity, and duration.

DAW audio tracks as well as MIDI tracks often provide a host of additional automation tracks for parameters you can control via MIDI CC messages, such as pitch, volume, or pan, as well as parameters for plugins on the track. These parameters can be assigned to a particular control on a MIDI controller and recorded live, or programmed via the DAW software.

MIDI tracks are often used exclusively to control other devices, such as modelers or MIDI enabled amps or effects units during live performances. This frees up the performer's feet from "tap dancing" on a foot controller and ensures all patch changes are accurate and perfectly in time with the beat. It can additionally allow control that would be physically impossible such as using multiple expression pedals simultaneously or stuttering a value up/down or on/off extremely fast.

MIDI Software

Monitor/Analyzer

MIDI monitor/analyzer software, like MIDI-Ox are very helpful for debugging what MIDI devices or automation tracks are actually sending to the DAW or other devices. If you are using a MIDI floorboard designed to send multiple CC messages at the press of a single switch, this can be helpful to make sure they are firing in the correct order or the correct number of times. You can verify expression pedals are sending the correct CC number and values.

Editor

Most DAW's provide a built-in MIDI editor; however, a wide-range of software exists for this purpose, that can make programming or viewing MIDI information more efficient or simple.

Player

Most audio player software will play MIDI (.mid) files. They will typically rely the operating system to convert the MIDI information into sound. The operating system in turn relies on a sound driver, which may use the CPU or dedicated hardware. While the MIDI file itself will specify the instrument number according to a General MIDI standard, the sound driver can interpret this how it chooses. Early drivers used FM Synthesis - combining a finite number of sine waves (or noise) to approximate the sound of real-world instruments. This was eventually replaced with Wavetable Synthesis which used audio (.wav) samples of real instruments for each MIDI instrument.

MIDI Standards

In addition to the protocol and hardware, MIDI has also been extended by having standards that compliant devices must conform to.

General MIDI

General MIDI or GM is a standard, that consists of multiple parts.

  • Common program numbers for specific instrument sounds
  • 24-note minimum polyphony
  • Requires and supports note velocity
  • Channel 10 is reserved for percussion instruments
  • Specifies a standard set of Control Change message interpretations
  • Supports RPN and standardizes pitch bend range and channel fine/coarse tuning
  • SysEx support for volume and GM compatibility

Roland GS

Roland implemented their own extension to GM in GS. It includes:

  • Includes bank select support allowing simultaneous banks of programs
  • More drum kits
  • Simultaneous percussion kits over channels 10 and 11
  • Increased Control Change support
  • portamento, sostenuto, and soft pedal support over CC
  • SysEx support to alter synth engine

General MIDI 2

General MIDI Level 2 or GM2 reconciled competing proprietary extensions to GM. It also included a number of additional standards to extend even further.

  • Includes bank select support allowing simultaneous banks of programs
  • 32-note minimum polyphony
  • Attack, Decay, Release support over CC
  • Filter resonance and cutoff over CC
  • Vibrato support over CC
  • 9 drum kits
  • 2 simultaneous percussion kits over channel 10 and 11
  • RPN for vibrato/modulation range
  • SysEx for reverb, chorus, controller destination, and scale/octave tuning adjustments

MIDI Files