MIDI 1.0
Encyclopedia
There are two sides to MIDI
Musical Instrument Digital Interface
MIDI is an industry-standard protocol, first defined in 1982 by Gordon Hall, that enables electronic musical instruments , computers and other electronic equipment to communicate and synchronize with each other...

 1.0: the hardware transport specification describing the electrical and mechanical connection, and the message format specification.

Hardware transport (electrical and mechanical connections)

The MIDI standard consists of a communication
Communication
Communication is the activity of conveying meaningful information. Communication requires a sender, a message, and an intended recipient, although the receiver need not be present or aware of the sender's intent to communicate at the time of communication; thus communication can occur across vast...

s messaging
Message
A message in its most general meaning is an object of communication. It is a vessel which provides information. Yet, it can also be this information. Therefore, its meaning is dependent upon the context in which it is used; the term may apply to both the information and its form...

 protocol designed for use with musical instruments, as well as a physical interface
Electrical connector
An electrical connector is an electro-mechanical device for joining electrical circuits as an interface using a mechanical assembly. The connection may be temporary, as for portable equipment, require a tool for assembly and removal, or serve as a permanent electrical joint between two wires or...

 standard. It consists physically of a one-way (simplex) digital
Digital
A digital system is a data technology that uses discrete values. By contrast, non-digital systems use a continuous range of values to represent information...

 current loop
Current loop
A current loop describes two different electrical signalling schemes.- Digital :For digital serial communications, a current loop is a communication interface that uses current instead of voltage for signaling...

 electrical connection sending asynchronous serial communication data at 31,250 bits per second. 8-N-1
8-N-1
8-N-1 is a common shorthand notation for a serial port parameter setting or configuration in asynchronous mode, in which there are eight data bits, no parity bit, and one stop bit....

 format, i.e. one start bit (must be 0), eight data bits, no parity bit and one stop bit (must be 1), is used, so up to 3,125 bytes per second can be sent.

Only one end of the loop is referenced to ground, with the other end "floating", to prevent ground loops
Ground loop (electricity)
In an electrical system, a ground loop usually refers to a current, almost always unwanted, in a conductor connecting two points that are supposed to be at the same potential, often ground, but are actually at different potentials. Ground loops created by improperly designed or improperly installed...

 which may otherwise cause interference and hum in analog audio signals. The current loop on the transmitter side drives the LED of an opto-isolator
Opto-isolator
In electronics, an opto-isolator, also called an optocoupler, photocoupler, or optical isolator, is "an electronic device designed to transfer electrical signals by utilizing light waves to provide coupling with electrical isolation between its input and output"...

 on the receiver side. The current loop is specified as 5 mA. The opto-isolator must be a high-speed type, with less than 2 μs risetime. As most opto-isolators have asymmetrical positive-going and negative-going slew rate
Slew rate
In electronics, the slew rate represents the maximum rate of change of a signal at any point in a circuit.Limitations in slew rate capability can give rise to non linear effects in electronic amplifiers...

s, they slightly alter the signal's duty cycle
Duty cycle
In engineering, the duty cycle of a machine or system is the time that it spends in an active state as a fraction of the total time under consideration....

. If several MIDI devices are connected in series by daisy-chaining the MIDI THRU to the next device's MIDI-IN, the signal gets more and more distorted
Distortion
A distortion is the alteration of the original shape of an object, image, sound, waveform or other form of information or representation. Distortion is usually unwanted, and often many methods are employed to minimize it in practice...

, until receive errors occur due to pulse narrowing.
se
At the physical layer (MIDI cable), a pair of wires carry the MIDI signal. The voltage difference is normally 0 volts (both at positive potential referenced to ground) in the idle state, which is seen as a '1' at the MIDI receiver due to logic inversion by the Opto-isolator
Opto-isolator
In electronics, an opto-isolator, also called an optocoupler, photocoupler, or optical isolator, is "an electronic device designed to transfer electrical signals by utilizing light waves to provide coupling with electrical isolation between its input and output"...

. A MIDI message start bit (0) causes a voltage differential on the wire pair (current loop) which is seen at the MIDI receiver as a '0'. The 8 data bits can be either '0' (low) or '1' (high) with the stop bit (1) seen at the MIDI receiver as a '1'. To summarize:
  • Logic 1 → High → no current flow → Opto-isolator LED off → MIDI receiver sees High, logic '1' (data bits, stop bit or idle)
  • Logic 0 → Low → current loop flow → Opto-isolator LED on → MIDI receiver sees Low, logic '0' (data bits, start bit)


MIDI connectors are standard 5-pin 180° DIN connector
DIN connector
A DIN connector is a connector that was originally standardized by the , the German national standards organization. There are DIN standards for a large number of different connectors, therefore the term "DIN connector" alone does not unambiguously identify any particular type of connector unless...

s which at one time were a de facto
De facto
De facto is a Latin expression that means "concerning fact." In law, it often means "in practice but not necessarily ordained by law" or "in practice or actuality, but not officially established." It is commonly used in contrast to de jure when referring to matters of law, governance, or...

 European standard for audio interconnection. Over time the simpler American RCA phono jack
RCA connector
An RCA connector, sometimes called a phono connector or cinch connector, is a type of electrical connector commonly used to carry audio and video signals...

 has left MIDI as the only place where DIN is commonly encountered in modern equipment. Only two of the five pins (pins 4 and 5) are used for MIDI signal transmission.

Some computers or their sound cards have 15-pin D-subminiature connectors
D-subminiature
The D-subminiature or D-sub is a common type of electrical connector. They are named for their characteristic D-shaped metal shield. When they were introduced, D-subs were among the smaller connectors used on computer systems....

, called game port
Game port
The game port is a device port found on IBM PC compatible systems throughout the 1980s and 1990s. It was the traditional connector for joystick input devices until superseded by USB in the 21st century....

s, that can be used for MIDI IN/MIDI OUT. The connector supports both MIDI and analog joystick
Joystick
A joystick is an input device consisting of a stick that pivots on a base and reports its angle or direction to the device it is controlling. Joysticks, also known as 'control columns', are the principal control in the cockpit of many civilian and military aircraft, either as a center stick or...

 functions. Access to the MIDI signals is provided by a short adapter cable that converts the D-subminiature pinout into DIN connectors. The recommended method of connecting two 5-pin DIN cables to a 15-pin D-subminiature computer port can be found at the MIDI.org web site. The MIDI specification very conservatively states that the maximum distance MIDI can be transmitted is 15 meters (50 feet), but it can normally go much farther.

There exists a USB connection standard and a standard for MIDI over Ethernet
Ethernet
Ethernet is a family of computer networking technologies for local area networks commercially introduced in 1980. Standardized in IEEE 802.3, Ethernet has largely replaced competing wired LAN technologies....

 and Internet
Internet
The Internet is a global system of interconnected computer networks that use the standard Internet protocol suite to serve billions of users worldwide...

 called RTP MIDI being developed by the IETF, available from standard RFC sites.

Most MIDI capable instruments feature a MIDI IN, MIDI OUT, and occasionally a MIDI THRU connection in the form of five-pin DIN connectors. In order to build a two-way physical connection between two devices, a pair of cables must be used. The MIDI THRU jack simply echoes the signal entering the device at MIDI-IN. This makes it possible to control several devices from a single source.

The 1985 Atari ST
Atari ST
The Atari ST is a home/personal computer that was released by Atari Corporation in 1985 and commercially available from that summer into the early 1990s. The "ST" officially stands for "Sixteen/Thirty-two", which referred to the Motorola 68000's 16-bit external bus and 32-bit internals...

 was the first home computer
Home computer
Home computers were a class of microcomputers entering the market in 1977, and becoming increasingly common during the 1980s. They were marketed to consumers as affordable and accessible computers that, for the first time, were intended for the use of a single nontechnical user...

 to sport the original five-pin DIN format, making it a very popular platform for running MIDI sequencer
Music sequencer
The music sequencer is a device or computer software to record, edit, play back the music, by handling note and performance information in several forms, typically :...

 software. Most PC soundcards from the late 1990s had the ability to terminate a MIDI connection, usually through a MIDI IN/MIDI OUT converter on the game port. The game port has been supplanted in the modern PC by USB devices, and so typically a PC owner will need to purchase a MIDI interface that attaches to the USB or FireWire port of their machine to use MIDI. Most current digital audio interfaces are equipped with MIDI ports.

Message format

Every MIDI connection is a one-way connection from the MIDI Out connector of the sending device to the MIDI In connector of the receiving device. Each such connection can carry a stream of MIDI messages, with most messages representing a common musical performance event or gesture such as note-on, note-off, controller value change (including volume
Loudness
Loudness is the quality of a sound that is primarily a psychological correlate of physical strength . More formally, it is defined as "that attribute of auditory sensation in terms of which sounds can be ordered on a scale extending from quiet to loud."Loudness, a subjective measure, is often...

, pedal, modulation signals, etc.), pitch bend, program change, aftertouch, channel pressure. All of those messages include channel number. There are 16 possible channels in the protocol. The channels are used to separate "voices" or "instruments", somewhat like tracks in a multi-track mixer.

The ability to multiplex 16 "channels" onto a single wire makes it possible to control several instruments at once using a single MIDI connection. When a MIDI instrument is capable of producing several independent sounds or "voices" simultaneously (a multitimbral
Multitimbral
Monotimbral is usually used in reference to electronic synthesisers which can produce a single timbre at a given pitch upon pressing a single or multiple keys .An electronic musical instrument may be...

 instrument), MIDI channels are used to address these sections independently. (This should not be confused with "polyphonic"; the ability to play several notes simultaneously in the same "voice".)

In more detail, MIDI 1.0 defines several basic message types of channel messages:
  • Note messages can represent any note from C (i.e. five octave
    Octave
    In music, an octave is the interval between one musical pitch and another with half or double its frequency. The octave relationship is a natural phenomenon that has been referred to as the "basic miracle of music", the use of which is "common in most musical systems"...

    s below middle C or 8.176 Hz
    Hertz
    The hertz is the SI unit of frequency defined as the number of cycles per second of a periodic phenomenon. One of its most common uses is the description of the sine wave, particularly those used in radio and audio applications....

     in common Western musical tuning
    Musical tuning
    In music, there are two common meanings for tuning:* Tuning practice, the act of tuning an instrument or voice.* Tuning systems, the various systems of pitches used to tune an instrument, and their theoretical bases.-Tuning practice:...

    ; designated as MIDI note 0) to g (i.e. five octaves above the G above middle C or 12,544 Hz; designated as MIDI note 127) with precision down to the semitone
    Semitone
    A semitone, also called a half step or a half tone, is the smallest musical interval commonly used in Western tonal music, and it is considered the most dissonant when sounded harmonically....

    . A note-on message starts a note, and a separate note-off message is needed to end it. If running status is 'active', a note-on message with the velocity byte set to zero is used in place of a note-off message.

  • Pitch-bend messages range in ±2 semitones (sometimes adjustable with Registered Parameter Numbers), with precision of 1/8192 semitone (The human ear cannot hear the difference between adjacent pure tones that differ by less than 1/20 semitone). Most synthesizers allow you to adjust the pitch bend range over several octaves.

  • "Control Change" messages (frequently wrongly called Continuous Controller) are quite versatile; they are usually generated by a musician using knobs, sliders, footswitches, or pressure on a physical MIDI controller (or MIDI-equipped instrument). While the response to these messages is generally totally up to the receiving device, they are typically used to change the tone, timbre
    Timbre
    In music, timbre is the quality of a musical note or sound or tone that distinguishes different types of sound production, such as voices and musical instruments, such as string instruments, wind instruments, and percussion instruments. The physical characteristics of sound that determine the...

    , or volume of an instrument's sound. In non-musical applications of MIDI, Control Change messages can be used to move motorized faders, to dim lights, or even to move a motorized joint in an animatronic figure.

  • Program change messages are sent to an instrument on a particular channel to instruct it to recall another patch, or program. The MIDI protocol uses 7 bits for this message, supporting only 128 programs to change to. Many devices which are more modern than the MIDI specification store far more than 128 programs. To overcome the limitation, a bank-switching method has been added to the spec (Each bank of 127 programs can be selected using a controller message, enabling access to 127² = 16129 programs).

  • Aftertouch messages (also known as Poly Pressure messages) are sent in some instruments to indicate pressure changes on the note while it is being played. Similarly, channel pressure changes the pressure for the entire instrument, not just one note. The channel pressure messages are more commonly implemented in most synthesizers, while the individual pressure sensors that aftertouch messages require are reserved mainly for expensive, high-end synthesizers.


In addition to the channel-based messages, there are system-related messages not addressed to any particular channel. These include:
  • Manufacturer's System Exclusive messages (also known as Manufacturer SysEx, Manuf Sysx, etc.) are defined by the manufacturer of the sequencer/synthesizer and can be any length. These messages are commonly used to send non-MIDI data over a MIDI connection, such as patch settings, a sound sample, or a sequencer's memory dump. Because they are defined by the device's manufacturer, they are mainly used for backup purposes and rarely (if ever) useful in another MIDI device.

  • Real Time System Exclusive messages include the significant MIDI Show Control
    MIDI Show Control
    MIDI Show Control, or MSC, is a significant Real Time System Exclusive extension of the international Musical Instrument Digital Interface standard...

      extension which enables all types of entertainment equipment to easily communicate with each other through the process of show control
    Show control
    Show control is the use of automation technology to link together and operate multiple entertainment control systems in a coordinated manner. It is distinguished from entertainment control , which coordinates elements within a single entertainment discipline such as lighting, sound, video, rigging...

    .

  • System messages contain meta-data about other MIDI messages. A sequencer, for example, often sends MIDI clock messages during playback that correspond to the MIDI timecode, so the device receiving the messages (usually a synthesizer) will be able to keep time. Also, some devices will send Active Sense messages, used only to keep the connection between the sender and the receiver alive after all MIDI communication has ceased.


MIDI can be used to provide facilities for playing in musical tuning
Musical tuning
In music, there are two common meanings for tuning:* Tuning practice, the act of tuning an instrument or voice.* Tuning systems, the various systems of pitches used to tune an instrument, and their theoretical bases.-Tuning practice:...

s different from the 12 tone per octave, equal-tempered tuning used in most western musical traditions. However, apart from using pitch-bend to control each note, these features have not been implemented by all instrument manufacturers.

Low bandwidth

MIDI messages are extremely compact, due to the low bandwidth of the connection, and the need for real-time
Real-time computing
In computer science, real-time computing , or reactive computing, is the study of hardware and software systems that are subject to a "real-time constraint"— e.g. operational deadlines from event to system response. Real-time programs must guarantee response within strict time constraints...

 accuracy.
Most messages consist of a status byte
Byte
The byte is a unit of digital information in computing and telecommunications that most commonly consists of eight bits. Historically, a byte was the number of bits used to encode a single character of text in a computer and for this reason it is the basic addressable element in many computer...

 (channel number in the low 4 bits, and an opcode
Opcode
In computer science engineering, an opcode is the portion of a machine language instruction that specifies the operation to be performed. Their specification and format are laid out in the instruction set architecture of the processor in question...

 in the high 4 bits), followed by one or two data bytes. However, the serial
Serial communications
In telecommunication and computer science, serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are sent as a whole, on a link with several parallel channels...

 nature of MIDI messages means that long strings of MIDI messages take an appreciable time to send, at times even causing audible delays, especially when dealing with dense musical information or when many channels are particularly active.

To further optimize the data stream, "Running status", a convention that allows the status byte to be omitted if it would be the same as that of the previous message, helps to mitigate bandwidth issues somewhat.

See also

  • MIDI Machine Control
    MIDI Machine Control
    MIDI Machine Control, or MMC, a subset of the MIDI specification, provides specific commands for controlling recording equipment such as multi-track recorders....

  • MIDI Show Control
    MIDI Show Control
    MIDI Show Control, or MSC, is a significant Real Time System Exclusive extension of the international Musical Instrument Digital Interface standard...

  • MIDI timecode
    MIDI timecode
    MIDI time code , or MIDI time division, embeds the same timing information as standard SMPTE timecode as a series of small 'quarter-frame' MIDI messages. There is no provision for the user bits in the standard MIDI time code messages, and SysEx messages are used to carry this information instead...

  • MIDI controller
    MIDI controller
    MIDI controller is used in two senses.*In one sense, a controller is hardware or software which generates and transmits MIDI data to MIDI-enabled devices....

  • MIDI mockup
    Midi mockup
    A MIDI mockup is an extensive demo of a recording project built using samplers to stand in for acoustic instruments.These extensive demos are frequently used in projects requiring large budgets to record, such as film scores...

  • MIDI usage and applications
    MIDI usage and applications
    Many extensions of the original official MIDI 1.0 specification have been jointly standardized by the MIDI Manufacturers Association in the US and the Association of Musical Electronics Industry in Japan...

  • MIDI Tuning Standard
    MIDI Tuning Standard
    MIDI Tuning Standard is a specification of precise musical pitch agreed to by the MIDI Manufacturers Association in the MIDI protocol. MTS allows for both a bulk tuning dump message, giving a tuning for each of 128 notes, and a tuning message for individual notes as they are played.-Frequency...

  • MIDI beat clock
    MIDI beat clock
    MIDI beat clock is a clock signal that is broadcast via MIDI to ensure that several MIDI-enabled devices such as a synthesizer or music sequencer stay in synchronization. It is not MIDI timecode....

  • Midiboard
    Midiboard
    Midiboard was broadly understood to be a contraction of Midi and Piano keyboard, and, to some extent, the term became synonymous with keyboards sold without sound synthesis during the later part of the 1980s to address the needs of performance artists who needed a master keyboard to control racks...

  • General MIDI
    General MIDI
    General MIDI or GM is a standardized specification for music synthesizers that respond to MIDI messages. GM was developed by the MIDI Manufacturers Association and the Japan MIDI Standards Committee and first published in 1991...

  • Comparison of MIDI standards
    Comparison of MIDI standards
    This table provides summary of comparison of various MIDI enhancement standards by various parameters.- References :* , an extensive guide to various models and their capabilities* , a comparison article...

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK