MIDI (Musical Instrument Digital Interface) is a widely used protocol that allows electronic musical instruments and digital devices to communicate musical instructions efficiently. It represents how music is structured and played using digital signals.
What is MIDI?
MIDI is a standard communication protocol designed in the early 1980s for connecting and synchronising digital musical instruments, computers, synthesisers, and other digital devices. It enables devices to exchange performance data such as pitch, velocity, tempo, and instrument information.
Rather than transmitting sound directly, MIDI transmits control messages that describe a musical performance. These messages can be interpreted by software or hardware to generate sound. This makes MIDI a flexible, compact, and efficient method for working with music.
For example, when a musician presses a key on a MIDI keyboard, the keyboard does not send audio. Instead, it sends a digital message saying something like:
“Play note C4 at velocity 80 on channel 1”.
The synthesiser or software receiving the message interprets it and generates the corresponding sound.
How midi messages work
MIDI works by sending digital messages that describe musical actions. These messages are transmitted in the form of binary data and consist of a series of bytes. The most common MIDI messages are made up of:
Practice Questions
FAQ
Yes, MIDI is capable of transmitting data in real time, which makes it suitable for live performances and synchronisation between instruments and devices. MIDI messages are sent serially over a connection, with each bit transmitted one after the other at a standard rate of 31,250 bits per second. This speed ensures that messages are processed and acted upon almost instantly, maintaining the responsiveness required during live play. To maintain timing accuracy across multiple MIDI devices, MIDI includes a set of timing messages such as MIDI Clock, Start, Stop, and Continue. These allow one device to act as a master clock, synchronising the tempo and playback across connected slave devices. For example, a drum machine might send clock signals to a synthesiser to ensure both stay perfectly in time. MIDI also supports Time Code messages (MTC) for aligning with video or complex sequencing, ensuring tight integration in multimedia setups and professional environments.
General MIDI (GM) is a defined standard within the broader MIDI protocol that ensures a level of consistency in how MIDI files sound when played on different devices. Introduced in the early 1990s, GM assigns specific instrument sounds to each of the 128 program numbers. For instance, Program Change 1 is always an acoustic grand piano, Program Change 41 is a violin, and Program Change 57 is a trumpet. This means that a MIDI file composed using GM-compatible sounds will produce the intended instruments regardless of the hardware or software used for playback, provided that the device supports the GM standard. GM also specifies that MIDI channel 10 is reserved exclusively for percussion instruments, with each note corresponding to a specific drum or sound effect. By standardising these elements, General MIDI removes ambiguity and provides predictable playback. This makes GM essential for file sharing, educational tools, and consumer devices where consistent sound is crucial.
Velocity sensitivity allows for dynamic variation in MIDI performances by measuring how forcefully a key or control was pressed and translating that into musical expression. In MIDI messages, velocity is encoded as a 7-bit value (0–127) in both Note On and Note Off messages. A higher velocity value typically results in a louder and more intense note, while a lower value produces a softer sound. Synthesiser engines and virtual instruments can map velocity to more than just volume—for example, timbre, attack time, or brightness—further enhancing expressiveness. Some keyboards are velocity-sensitive and can detect the force used by the performer, while others may send a fixed velocity value for all notes. Advanced MIDI controllers may also support aftertouch, which measures pressure applied after the initial key press, providing an additional dimension of control. Overall, velocity sensitivity is a critical component for conveying emotion and dynamics in MIDI-based music.
System Exclusive (SysEx) messages are a special category of MIDI messages that allow manufacturers to send device-specific data that falls outside the scope of the General MIDI standard. Unlike standard messages that are universally recognised, SysEx messages can include custom instructions for adjusting advanced settings, updating firmware, storing patches, or controlling unique hardware features. A SysEx message begins with a special status byte (F0 in hexadecimal) and ends with an End of Exclusive byte (F7). Everything in between can be proprietary. For example, a synthesiser manufacturer may use SysEx to change internal modulation routing, recall custom presets, or configure hardware settings that are inaccessible through standard MIDI controls. These messages are essential for deep integration in professional setups, allowing total control over complex instruments and effects units. However, because SysEx data is unique to each device, it is not typically used for standard musical data and is not understood by generic MIDI software unless explicitly programmed to interpret it.
MIDI supports polyphony, which is the ability to play multiple notes simultaneously, by sending multiple Note On messages on the same or different channels. There is no hard limit in the MIDI protocol itself on the number of notes that can be played at once; however, the actual polyphony capability is limited by the synthesiser or sound module being used. For instance, some basic hardware synthesisers may support 32-voice polyphony, meaning they can play up to 32 notes at once, while high-end software instruments may handle hundreds. When polyphonic limits are exceeded, the device must implement voice stealing, where older notes are cut off to make room for new ones. MIDI handles multiple notes by queuing and processing Note On and Note Off messages in sequence. Channels can also be used to assign different instruments polyphonically, such as playing piano chords on one channel and a melody on another. True polyphony depends on the sound engine’s capability, not MIDI itself.
