MIDI Protocol - Protocol specification

Leggi questa pagina in Italiano Lire cette page en Franšais
CDROM Multimedia Audio Course Enjoying this Course?
Download the full version!

As we have already mentioned, a protocol defines all aspects of communication between two MIDI systems, both in terms of hardware (sockets, cables, connectors, transmission modes) and software (MIDI commands). Communication takes place through a serial interface in binary mode, which allows the production of very cheap MIDI interfaces. Serial communication isn't really much of a problem, in that the amount of data that is sent by MIDI systems is pretty reduced. The data-transfer rate isn't exceedingly high, but it is high enough for its purposes:

Bit Rate: 31250 baud (bit/sec) in other words 3906.25 bytes/s in other words 3.8 Kb/s

As a quantity reference just think that a cheap computer's old modem (for the Internet connection) has a transmission rate of 56 Kb/s.

MIDI sockets, which are also called ports and are always of the female kind, come in sets of three: MIDI IN (the MIDI data entering the device), MIDI OUT (the MIDI data coming out of the device). MIDI THRU[46 ] (a copy of the data that has entered through the MIDI IN port is readdressed to this port). The transmission of data always occurs in one direction only: from the MIDI OUT socket to the MIDI IN. MIDI cables feature only male connectors and are never more than 15 metres long (more than this could cause losses which would degrade the signal). Communication is asynchronous which means that timing signals are not used (this would weigh down the data bulk to be transferred): instead, a start bit is used, identified by a 5 Volt voltage (which puts the receiving device in "waiting mode"), and a stop bit identified by a 0 Volt voltage (which notifies the end of data-transmission).

The kind of connectors set up on cables are of the DIN type:

The Midi Protocol - DIN connectors

DIN connectors

Only pins 2, 4 and 5 are used. Pin 2 is the screening, whereas pins 4 and 5 carry the MIDI signal in balanced mode [Electric connections ] . MIDI sockets are set up on the devices and transfer the data to/from the cable to/from the device. This takes place as illustrated in the following diagram:

The Midi Protocol - Logical scheme of a MIDI interface

Logical scheme of a MIDI interface

To get a better idea, let's imagine we're in data-receiving mode. The data reaches the socket from the cable and is sent to an optoisolating stage. The latter has two functions. The first is to electrically isolate the device, converting the electric impulses into optical impulses: this is brought about by means of a photo-diode which lights up when current flows through it, and a photoelectric cell which reconverts the optical impulses into a new electric impulse for the device. This way there is never a physical electric connection between the MIDI devices. Its second function is to correct any possible deterioration of the input signal; all the voltage values are converted into two states only: light on, light off. The electric impulse that exits the optoisolating module is separated into two: one copy, as we have said, is sent to the MIDI THRU socket (which not all devices have) whereas the other copy is sent to a module called UART (acronym for Universal Asynchronous Receiver Transmitter). This module converts the serial data into parallel data and sends it to the device itself (i.e the circuit which generates sounds in a keyboard-synthesizer). Moreover, the module manages the transfer rate according to the data-content it receives. As we'll better understand shortly, the MIDI protocol entails the use of 16 channels. Each channel corresponds to one of the functions of a MIDI device, for example on a keyboard-synthesizer it may correspond to a certain sound. This means that if a sequencer were to control only one keyboard-synthesizer, we'd be able to play up to 16 different sounds at once, one for each channel (1 for the drum-kit, 1 for the bass, 1 for the violin, and so on). Bear in mind that this applies to different sounds and that for each of them we can play many notes at the same time (we'll find out exactly how many in just a minute). So, a very complicated two-handed piano piece can be reproduced by using one MIDI channel only. Usually MIDI instruments are combined with live instruments, which however still remain the most prominent part of the music recording (apart from musical genres that are typically electronic, as for instance techno music). This is why 16 channels, which at first may seem too few, are usually more than enough to manage most situations.

[46 ] From the word "through".


Read alla about Audiosonica-Wikipedia integration Related topics on Wikipedia


Latest Comments


Latest Posts


Most visited