MIDI

From CPCWiki - THE Amstrad CPC encyclopedia!
Revision as of 11:06, 25 March 2025 by Phi2x (Talk | contribs) (Software Protocol)

Jump to: navigation, search


Musical Instrument Digital Interface (MIDI)

The original MIDI (Musical Instrument Digital Interface) protocol was developed in 1983 by Dave Smith and Ikutaro Kakehashi to enable communication between electronic instruments.

Software Protocol

Unlike audio protocols that transmit sound waves, MIDI carries event messages—instructions about what to play, how to play it, and when. These messages include:

  • Note On/Off: Triggers a note (e.g., "play middle C") and stops it.
  • Velocity: Indicates how hard a note is struck (volume or intensity, typically 0-127).
  • Pitch Bend: Adjusts a note’s pitch in real-time.
  • Control Change (CC): Modifies parameters like volume, pan, or modulation (e.g., CC#7 for volume).
  • Program Change: Switches instrument sounds (e.g., from piano to violin).

MIDI doesn’t contain audio data; it’s a set of commands that a synthesizer, sampler, or software interprets to generate sound. This makes MIDI files tiny compared to audio files—think kilobytes versus megabytes.

Hardware Protocol

The data is transferred at 31250 bits per second, using 8-N-1 format (one start bit, eight data bits, no parity bit, and one stop bit). So far, the MIDI protocol is much similar to RS232, and many MIDI interfaces do actually use standard "RS232" UART chips. Differences to RS232 are:

  • The signals are transmitted as TTL levels (0V and 5V) (unlike +/-12V on RS232) with 5V reference voltage (unlike 0V on RS232)
  • The receiver should pass the TTL signal through an Opto-Isolator
  • The 31250 Hz baudrate isn't a standard RS232 rate
  • MIDI is one-directional (MIDI OUT implements only TX, no RX, and MIDI IN implements only RX, no TX)
  • There are no control signals like CTS/RTS/DSR/DTR used

The standard in MIDI interface was the MPU-401, first introduced as a standalone hardware by Roland in 1984, and then integrated into PC soundcards.

The MPU-401 had 2 modes:

  • In UART mode, it acted as any other MIDI interface, passing MIDI data between the computer and external MIDI devices
  • In intelligent mode, the PC offloaded the MIDI playback task to the interface, freeing the PC to do other tasks while the music was playing

Schematic

MidiElectricalSpecificationDiagram.gif

MIDI Interfaces for the CPC

MIDI software for the CPC

Presentation in ACU magazine

Presentation in CPCAI magazine

DIY MIDI Interface from CPCAI

General MIDI

General MIDI (GM) is a standardized specification for electronic musical instruments and synthesizers, introduced in 1991 by the MIDI Manufacturers Association and the Japan MIDI Standards Committee.

General MIDI aimed to ensure consistency across devices by defining a uniform set of 128 instrument sounds (called "patches"), such as piano, violin, and drums, organized in a specific program change order, along with standardized channel assignments (e.g., channel 10 for percussion).

This allowed musicians and composers to create music that would sound reasonably similar on any GM-compliant device, solving the patchwork compatibility issues of early MIDI systems.

General MIDI largely superseded the previous Roland MT-32 de-facto standard and quickly became foundational in music production, video game soundtracks, and consumer electronics.

Weblinks