Introduction to Computer Music: Volume One

1. How does the MIDI system work? Page 2

As I update this page, the growing prevalence of USB-MIDI, Ethernet and WIFI MIDI, and even Bluetooth MIDI that is supplanting the original classic MIDI cable/interface/network will eventually have me removing the top portion of information below. However, there are still many using this hardware with older instruments and studio setups, so for now, probably good to leave intact. Forgive the mix of tenses, past and present.

Summary of the original MIDI hardware specification

The MIDI specification began with a set of common hardware requirements. Each MIDI-capable instrument was equipped with a MIDI transmitter and receiver, though certain peripheral devices, such as signal processors, may have had only a receiver or a transmitter. This standard interface operates at a 31.25 Kbaud asynchronous (serial) transmission rate (1 baud = 1 bit per second). Each byte consists of a start bit, eight data bits, and a stop bit, for a total duration of 0.32 milliseconds per byte. While this was adequate for the applications originally envisioned, it has proven to be one of the major stumbling blocks for generating more complex data streams in time-dependent situations. Though several manufacturers originally included alternative parallel interfaces on their instruments for linking their own peripheral devices, the overwhelming success of MIDI saw the abandonment of almost all other interconnecting formats until recently (see below).

MIDI cables connect instruments by means of MIDI IN, MIDI OUT, and MIDI THRU jacks. The MIDI IN port receives incoming MIDI messages, the MIDI OUT port transmits actions of the keyboard to other keyboards or a computer. The MIDI THRU jack provides a direct copy of data coming into the MIDI IN jack, providing the ability to "daisy chain" several instruments and devices together. Any action on an instrument that corresponds to a particular MIDI code (such as a key depressed, or a program button changed) will normally transmit that action's code to the MIDI OUT, but not to the MIDI THRU. Many more recent instruments have a switch that changes the function of a MIDI THRU port to a MIDI OUT port.

The major potential of MIDI was realized when a network of instruments and other musical devices was connected to a computer by means of a MIDI interface. The primary function of the standard MIDI interface is/was to match clock speeds between the specified rate from MIDI devices and the computer. An interface's connections may be as simple as one MIDI IN and one MIDI OUT jack with information distributed by means of the daisy chain mentioned above. A simple MIDI network is shown below.

In recent years, interfaces have become more elaborate and now provide more MIDI INs and OUTs for more complex and flexible networks, merging facilities to handle several input devices simultaneously, coded routing of data to specified cables, and generation and/or conversion of timing synchronization codes for use with video and multitrack audio equipment. Some interfaces are also capable of selective filtering and/or remapping of MIDI data.

Pictured below is MOTU's MIDI TImepiece AV which provides 8 MIDI IN's and 8 OUT's, along with timecode and other ports.

Current MIDI hardware additions

Similar to the MMA agreement to standardize MIDI connectivity, during the 1990's several big computer manufacturers organized to standardize USB connectivity and formed the USB Implementers Forum (USB-IF). USB (Universal Serial Bus), with its greatly higher speed than MIDI (compare 31.25 Kbit/s to the USB 3.0 throughput of 5 Gbit/s) and multiple device capability (up to 127 devices on a single bus) made a logical choice to supplant standard MIDI interfaces, many of which were then connecting to computers through USB to begin with. In addition, USB was hot-swappable and could be plug-and-play if a manufacturer played by the rules (called class compliant). So in 1999, the USB-IF and the MMA developed the protocols for adding MIDI to the Audio Class of devices.

Many electronic keyboards, most of them keyboard controllers designed to play virtual instruments on a computer and generating no sounds of their own, now have a single Type B USB MIDI input/output port (same USB jack as a printer port) and plugs into a computer or USB hub just like any other USB device with a USB Type A connector. The host USB device, such as computer or powered USB hub can even supply the external keboard/device with power, if the draw is small enough. Additionally, audio interfaces connected through USB, Firewire or even Ethernet can now supply BOTH audio and MIDI data through one USB connection, since MIDI is considered part of the USB Audio Class Compliance.

Though the Plug-and-Play aspect of USB MIDI is convenient, many older USB MIDI devices, integrated audio/MIDI interfaces and even current applications still require manufacturer-specific drivers. It is important to keep these drivers up to date so they function well with a current computer OS.

Wireless MIDI (WIDI) peripherals that connect the older DIN5 MIDI hardware to boxes that wirelessly communicate with each other have been around for a long time. Recent developments with Bluetooth and mobile devices have inspired the MMA to spec Bluetooth Low Energy (also called Bluetooth Smart) with MIDI (called BLE-MIDI) in 2015. The low energy part was to save battery drain from constant data streaming. This has allowed for an explosion of mobile apps to sequence and communicate MIDI data wirelessly via Bluetooth.

It should be noted that both USB, WIDI and Bluetooth have serious distance limitations. If you would like to control a MIDI device halfway around the world, and you have a Mac, lurking in the MIDI section of the Audio/MIDI Setup utility is the Network node icon. Double-clicking allows you to create a Bonjour session with others and even provides an estimate of the latency of the data traveling back and forth. The protocol is called RTP-MIDI (Real-time Protocol) or AppleMIDI developed to send MIDI messages over Ethernet and WiFi networks. Not a PC person, but I did find an emulator here from Tobias Erichsen.

Despite all these new methods for connectivity and transmission of MIDI data, the core codes that are embedded in the data stream are still, amazingly enough, the same codes discussed in the following pages, developed in 1983.

As this page will inevitably become out-of-date again, current information on MIDI specifications can always be had from the MMA page at

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14

| Jacobs School of Music | Center for Electronic and Computer Music | Contact Us | ©2017-18 Prof. Jeffrey Hass