AN INTRODUCTION TO MIDI

By Andrew Swift

TechnicalApplications
History
Why MIDI?
The MIDI interface
The digital data transmitted
Basic MIDI set-up
MIDI for Performance
MIDI for Composition
References

History

MIDI is the acronym for Musical Instrument Digital Interface. It was defined by the Midi 1.0 specification which was agreed upon in august 1982. It was based upon the idea of a Local Area Network, since it was relatively inexpensive and simple to set up and run. It superseded the non-standard method called "gate/Control Voltage". The main problems with gate/CV is that it lacks sophistication. Analogue keyboards used with this system have complex sound generation techniques.(Attack, decay, sustain, release) It is not possible to send this kind of information when using the gate/CV technique, resulting in "lifeless" sounds.

The development of MIDI has had a considerable impact on the development of electronic music. Modern dance music,Techno, House, Drum and Bass etc, could not have developed in their current state without this technology. The complexity of older systems meant that only a few people had access. With MIDI it is possible to set-up a "home studio" quickly and relatively cheaply. This encourages the development of experimental music, which is how modern dance music started.

Why MIDI?

There are many reasons why MIDI is used by such a large number of people. The most significant being that it is the system that all keyboard manufacturers have used in the design of their digital synthesizers. MIDI has many uses and appeals to a wide range of people, from futuristic music Composers to solo artists. There are now even MIDI products on the market that allow the controlling of light rigs. Considering the capabilities of the system the cost of setting up a MIDI system is relatively low. The price of a budget system is about eighty to a hundred pounds (keyboard 50 pounds MIDI interface with software 30 pounds RE:John's MIDI Center, 160 Deansgate, Manchester)

The MIDI interface

The MIDI interface has three ports. MIDI: IN, OUT and THRU. The IN port allows data to be received by the machine. The OUT port is used for transmitting data. The THRU port creates a replica of the input signal. This is used to connect more than one MIDI device. At first glance it may seem unnecessary to have the THRU port, since you could simply chain devices together using the output from the OUT port. The digital information is sent serially at a rate of 3000 bytes per second, by switching a current of approximately 5mA on and off. If the OUT port was used this current may be too small to drive any of the devices.

The Digital Data Transmitted

Every MIDI message transmitted starts with a "Start Bit", this is when the signal current drops to 0mA, and is followed by a byte of data (Most Significant Bit (MSB) is transmitted first) and finishes with a "Stop Bit", which is when the current returns to 5mA.The RS232 system works in a similar way.
There are two main types of message. A status byte, which always has it's MSB set to 1, and a data byte, which always has it's MSB set to 0. The status byte is divided up into two nibbles. The first nibble describes what event has happened and the second is used for the channel number. E.g. 1001 0001 means "note On" on channel 1 (N.B. the Start bit and Stop Bit have been Omitted). Each status byte is followed by a number of data bytes. The "Note On" status byte is followed by 2 data bytes describing the note value and how loud the note was played. E.g. 0011 1100 means note value 60 (middle C) and 0000 0001 means with a velocity of 1. (For more information of status codes and the associated data bytes look at "Practical MIDI Handbook " by R.A.Penfold page 57)

Basic MIDI set-up


One of the most common ways of entering the world of MIDI is using two keyboards. This enables two different sounds to be played at the same time, generating a richer sound. The first step is to connect the keyboards together. This is done using MIDI cable which is a standard 5 pin DIN type connector. The user can now play on the master keyboard as normal. Every key pressed will make the slave keyboard sound. This system is very limited and doesn't exploit the full potential of MIDI. To exploit this potential a
sequencer is a crucial part, be it on a computer or as a separate dedicated hardware unit. The basic purpose of a MIDI sequencer is to store tracks, which can then be played through a MIDI system.

Using MIDI for performance

MIDI as a backing track

One of the most popular uses of MIDI is as an accompaniment for a Solo Artist. The cost of a drum kit and it's size means that it is sometimes impractical to use. With the MIDI system above a full drum kit and accompaniment can be created. The artist can then add their own lyrics over the top of the accompaniment.
The sequencer is pre-programmed with MIDI information for the song. There are several tracks, one for the bass drum, cymbal, bass line etc, each of which are assigned a channel. The sequencer then sends the data serially at a rate of 3000 bytes per second. The sampler is programmed so that it uses data from only the channels which it has been assigned to. If for example channel 1 has the information for the bass line and channel 2 is used for the bass drum the sampler should only respond when it receives channel 1 data and ignore channel 2 data. The complete input to the sampler is passed on almost instantaneously using the THRU port to the drum machine, which will pick out only the channels meant for drum sounds.
This set up is fine for small systems. With larger systems, the chaining of data using the THRU port causes small but significant delays.

An example of a large MIDI system


In this example system instead of chaining together MIDI devices I have used a MIDI THRU Box, which takes the input from the sequencer and sends the data in parallel to each of the devices, this removes delays associated with chaining.
The Wind controller is a device that allows a wind instrument muscian the use of MIDI. The wind controller and guitar send data in the same way as a MIDI keyboard. They are just played in a different manner.

Composing music using MIDI


Composing music using MIDI is very simple. What you play on the keyboard is recorded by the sequencer. For a single keyboard up to two tracks can be recorded simultaneously. When a key is pressed the data corresponding to the key being pressed is sent to the sequencer via the OUT port on the keyboard. Once the sequencer has this information it can be converted into musical score. The musical score can then be altered to correct any minor mistakes. Extra tracks can be added, but a maximum of sixteen can be played at once (limitations of a nibble being assigned for a channel number).
If an extra connection from the OUT port on the sequencer is used, the sequencer can send a clock signal to the keyboard, which is used to generate the beat, or tempo of the song. The clock signal isn't a periodic pulse which is normal for digital systems, it is a status byte (11111000) which is transmitted at a rate of twenty four per crotchet (quarter beat). To avoid confusion only one instrument in a MIDI system should transmit this signal. Other MIDI devices should be set to external clock. This provides a way of synchronising the whole system. It also describes the maximum resolution for recording data. The resolution is good, but small timing errors do occur.

References