(compMus1) Intro to MIDI

To start things off, here are some useful readings:

Since it is getting close to “the end,” I’ll post an outline of the lecture. It would be good for you to know these things before the last quiz.

MIDI

  • MIDI stands for Musical Instrument Digital Interface.
  • It is a specification for physically connecting devices, and for communicating between them.
  • It was designed for real-time keyboard performance.
  • It is a control language – it transmits performance instructions rather than audio.

History (the dark ages)

  • No synthesizer could communicate with another synthesizer.
  • Each synth would have its own keyboard, controlling its own synthesis system, with its own sequencer. (‘70s Rock – wall of keyboards)

Birth of MIDI

  • Several synth makers came together to agree on MIDI standard in 1981 (after development of inexpensive microcontrollers).
  • Designed to be relatively inexpensive.
  • First MIDI instruments available in 1983.
  • MIDI is still the main way musical hardware and software communicates today.

MIDI Transmission

  • Binary (like all digital)
  • Serial – one bit at a time.
  • Asynchronous – devices can send messages whenever the device decides.
  • One way – MIDI cables only carry messages in one direction.
  • 16 logical channels.
  • Transmission speed (original standard) – 31,250 bits per second (31.25 kbits).

MIDI Hardware

  • Computer interfaces (with USB and Firewire, can be built into keyboards and other devices).
  • Ports
  • Cables

Ports

  • Ports send and receive MIDI messages.
  • Basic hardware ports include IN, OUT, THRU.

Computer Interfaces

  • Usually serial, originally connected to modem ports of a computer.
  • Modern way is usually USB (Universal Serial Bus); sometimes Firewire (IEEE 1394).
  • Communication between computer and interface can be at whatever speed devices support.
  • Common to build interface into keyboard or other device. Doesn’t do away with computer interface – integrates it into keyboard.

Cables

  •  5-pin cable was a type of audio cable used in Europe.
  • 2 of the pins are never used.
  • Designed to run to at least 15 meters.

Common MIDI Messages

  • Note-on/Note-off (note number, key velocity)
  • Polyphonic and Channel Key Pressure (aftertouch)
  • (Continuous) Control change. CC.
  • Pitch Bend
  • Program Change
  • System Exclusive (escape hatch)

Representation of Data

  • Numbers
  • Most values use a range of 0 – 127 (7 bits = 128 possible values)
  • Pitch: Middle C = 60

Structure of a MIDI Message

  • Messages are sent as 10-bit words
  • First and last bit are stripped by UART chip. 8 bits (1 byte) remain.
  • Status byte/Data byte determined by first bit of byte. (1 for status, 0 for data)
  • Status byte indicates a function (note on, note off, cc change, etc.)
  • Data bytes contain values associated with function in status byte.

The Good

  • One-to-many control
  • Control is independent of synthesis.
  • Digital representation of data allows for computer generation, control, and editing.
  • MIDI data is “portable.”
  • Data can control anything that understands MIDI.

The Bad

  • Lowest common denominator approach.
  • Keyboard bias/event oriented.
  • Slow communication speeds.
  • Poor data resolution.

The Ugly

  • Not all devices support the same feature sets (you need to look at MIDI implementation charts).
  • Serial communication means that it is impossible to accurately represent simultaneous events.
  • No requirements for how fast a device responds to a message.

Comments

Leave a Reply