<<

Technology I

TEDT1245

Semester 1

What is MIDI?

MIDI stands for Musical Instrument Digital Interface and it a common language communications protocol that allows any MIDI-equipped electronic musical instruments to interact with each other. MIDI is a means of transmitting instructions or messages NOT a means of transmitting audio.

MIDI allows , , MIDI controllers, sound cards, samplers and drum to control one another, and to exchange system data.

How does MIDI work?

MIDI does not transmit an or media — it transmits "event messages" such as the pitch and intensity of musical notes to play, control signals for parameters such as volume, vibrato and panning, cues, and clock signals to set the . As an electronic protocol, it is notable for its widespread adoption throughout the industry.

All MIDI compatible controllers, musical instruments, and MIDI-compatible follow the same MIDI 1.0 specification, and thus interpret any given MIDI message the same way, and so can communicate with and understand each other. MIDI composition and arrangement takes advantage of MIDI 1.0 and General MIDI (GM) technology to allow musical data files to be shared among many different files due to some incompatibility with various electronic instruments by using a standard, portable set of commands and parameters. Because the music is simply data rather than recorded audio waveforms, the data size of the files is quite small by comparison.

The MIDI interface:

MIDI compatible instruments and other MIDI devices are connected together using standard MIDI cables, which have a male 5-pin DIN connector at each end.

Pin 1 & 3 - are not used Pin 3 - used as shielding. The cable screen is connected to this pin. Pin 4 - is a 5-volt current loop to ensure that electricity flows in the correct direction. Pin 5 - used to transmit the MIDI data. A drawing of a MIDI connector from the cable end:

The MIDI data is sent down the cable one bit at a time as a stream of information, which is called a serial interface. A parallel interface allows information to be sent down separate wires so that the message reaches the device at the same time, making it faster than a serial interface.

The speed of a MIDI serial interface is 31,250 bits per second. There are 8 bits needed for every MIDI word plus 2 bits to mark the gaps between words, therefore there can be up to 3,125 messages per second.

The MIDI Language

The MIDI language is represented with binary code. Each 0 or 1 is called a bit. Four bits equal a nibble and eight bits equal a byte. With MIDI, each digital word consists of a total of 8 bits (or 1 byte). An 8 bit number system can only count from 0 to 255. Therefore MIDI bytes are divided into 2 distinct types: Status Byte – describes the type of information being sent. They tell the receiving device weather the message is a not on, note off, pitch wheel or any other action. Data Byte – follow status bytes and indicate actual values of the Status Bytes. If a Status Byte is sent indicating a note on action, the following Data Bytes will represent the note number and the note velocity.

The difference between Status Bytes and Data Bytes is indicated by the value of the Most Significant Bit (MSB), which is the bit on the furthest left of the message.

A byte is a Status Byte if the most significant bit is set. This means that the left most bit of the byte (eight zeros or ones) is a 1.

1bbb bbbb (b = 0 or 1) eg 1 0 1 1 0 1 1 0

A byte is a Data Byte if the most significant bit is not set. This means that the left most bit of the byte (eight zeros or ones) is a 0.

0bbb bbbb (b = 0 or 1) eg 0 1 1 0 0 0 1 1

MIDI Channels

The lower 4 bits of a Status Byte are used to specify the MIDI Channel. 4 bits have 16 possible values (0 to 15) and so MIDI has 16 channels.

Binary MIDI CHANNEL Binary MIDI CHANNEL 0000 Channel 1 1000 Channel 9 0001 Channel 2 1001 Channel 10 0010 Channel 3 1010 Channel 11 0011 Channel 4 1011 Channel 12 0100 Channel 5 1100 Channel 13 0101 Channel 6 1101 Channel 14 0110 Channel 7 1110 Channel 15 0111 Channel 8 1111 Channel 16

Therefore a Status Byte 1xxx 0010 is on MIDI Channel 3

Status Bit MIDI Channel

The xxx are used to indicate what the status of the message is going to be. Eg: a note on A note off change

Visit this website to view a complete list of MIDI messages explained including their Binary code, Hexadecimal and Decimal values. This will give a clear understanding of MIDI messages and what they look like: http://www.midi.org/techspecs/midimessages.php

Data Bytes

The 7 numbers that follow the Most Significant Bit of a Data Byte are what are used to carry the data value. These represent a series of values or steps that count from 0 to 127.

Remember: a MSB value of 0 indicates a Data byte. The smallest number possible is 00000000 = 0 The biggest number possible is 01111111 = 127

Thus the possible range of values a Data byte can be is 0-127. This explains why many MIDI controllers, such as volume or velocity, have a maximum value of 127.

A breakdown of the Data Byte message is as follows:

MSB 64 32 16 8 4 2 1 (value of each bit)

0 1 1 1 1 1 1 1 (0111 1111 – Data Byte)

(128) 64 + 32 + 16 + 8 + 4 + 2 + 1 = 127 (total value)

MIDI message example Here is an example of a simple 3-byte MIDI message comprising a Status Byte and 2 Data Bytes. This message is telling a set to respond on MIDI channel 1 to start playing a note (C3) at a velocity of 101.

What makes up the MIDI Language?

Electronic keyboard instruments are, by definition electronic, which means the sound is created by electronic circuitry – not the instrument itself. When a key on an electronic MIDI instrument is pressed down, a digital signal – a note on is transmitted. When that note is released, a note off message is sent. The actual note or key number depends on the note or key that is pressed. How hard the key is pressed generates the loudness or velocity of the note.

MIDI is not a means of transmitting audio, but a means of transmitting instructions.

MIDI MESSAGE EXERCISE

Define the following Binary Codes:

Eg 1001 0001 = Status Byte / Decimal = 145 1001 0011 = Status Byte / Decimal = 147 0110 0101 = Data Byte / Decimal = 101

Now try these:

0101 0101 = ______Byte / Decimal = ______

1011 1101 = ______Byte / Decimal = ______

0110 1001 = ______Byte / Decimal = ______

0001 0010 = ______Byte / Decimal = ______

0111 1110 = ______Byte / Decimal = ______

1111 0001 = ______Byte / Decimal = ______

MIDI Connections

There are many types of MIDI connections. The MIDI Out sends digital messages out. The MIDI In receives MIDI information from another MIDI device. The MIDI Thru passes on a copy of MIDI messages from the MIDI In.

The MIDI Thru port allows MIDI information to be passed on through to a series of sound modules all connected using the MIDI In and MIDI Thru ports.

This provides the advantage of being very simple to set up, only requiring MIDI cables and nothing else. However, if any one cable is damaged or disconnected any sound module further down the line will not receive the information.

It is possible to use MIDI Thru box to make copies of the signal. MIDI Echo

Most MIDI sequencers and MIDI control software will have a MIDI Echo option. This allows MIDI In information and MIDI Out information to be merged together and be presented at the MIDI Out. Normally MIDI data arriving at the "MIDI in" port of some device is passed on to a through (thru) port of that device if one is available. This allows many devices to share a common MIDI bus. Only MIDI data created within that device is sent out of its MIDI out port. However, when MIDI Echo is enabled data arriving at the MIDI input is "echoed" back out of the MIDI output in addition to the thru port. This data may or may not be merged with other data generated by the device.

MIDI Connections

Example A

Both keyboards have MIDI connections. Synthesiser A is the Master Keyboard and Synthesiser B is the MID slave device. Which connections would you use so that Synthesiser A is sending MIDI data to Synthesiser B?

Example B

All three keyboards have MIDI connections. Synth A is the Master and Synths B and C are the MIDI Slave devices. Which connections would you use so that Synth A is sending MIDI data to Synths B and C?

Example C

In this example we have added a and MIDI interface. The requirement is to connect the master keyboard to the computer so they can communicate with each other.

Example D

A multi-port interface receives MIDI data at the MIDI In ports and then copies the information and sends it out two or more Thru ports. Each MIDI port may be assigned to specific Thru ports. Again, try connecting the keyboard controller so that it sends information to the MIDI interface.

Connectors:

Keep in mind MIDI serial data is only via MIDI cables - Modern day MIDI devices now come with USB connectors, which allow parallel data transfer. This allows one cable to perform bi-directional communication. Even though there are USB devices available there are still many devices that require MIDI 5-pin cables for MIDI In and MIDI Out. Keyboards and Controllers

The term controller is used in different contexts with regard to MIDI. The controller can be the entire MIDI keyboard. The various faders on knobs on a keyboard can also be referred to as controllers. It is important to note the context in which the term is being used. MIDI data can also carry control change information. The control knobs and sliders on a MIDI keyboard transmit this control change information. This is one context in which these input devices are referred to as controllers. These controllers are used to adjust a particular parameter of an instrument. They are merely a different means of inputting MIDI data. Just as there are a total of 128 MIDI note numbers, there are also 128 basic MIDI controllers. Some of these controllers are predefined if the device is designated to receive such information. For example, controller #1 is the modulation wheel, which is found on most standard MIDI devices. The modulation wheel sends a 0–127 message when the wheel is moved up or down. It can then be designated in the target MIDI device to adjust a specified parameter, such as filter cutoff frequency or volume. It is important to note that the majority of control change data is sent only when the controller is moved. It does not continuously transmit data. For example, if the controller is set in the middle, when the user loads a patch, whatever parameter is being adjusted by the controller is set to its default position according to the patch. However, if the controller is moved slightly up or down, the parameter immediately jumps to the data that the controller is transmitting. This can create an abrupt jump in whatever parameter is being controlled. MIDI keyboard controllers, which have various sliders and knobs, have a default number assignment, which transmits on that previously assigned controller number assignment. This controller number is often adjustable by navigating menus on the controller itself or via editing software on the more advanced MIDI controllers.

Since MIDI sequencers record MIDI data, such as note on, velocity, and note off data, they can also record controller data. It is generally helpful to record the controller data on a different track of the MIDI sequencer, so that the controller’s data can be muted or edited easily. Sequencers allow the user to quantize and edit the MIDI data, and controller messages can be edited in the same way. Most sequencers allow controller data to be drawn in with various tools, or even automated as a virtual fader on the sequencer itself.

Sound Modules

A sound module (sometimes referred to as tone generator) is an electronic musical instrument without a human-playable interface such as a keyboard, for example. Sound modules have to be “played” using an externally connected device. The external device may be a controller, which is a device that provides the human- playable interface and may or may not produce sounds of its own, or a sequencer, which is computer hardware or software designed to play electronic musical instruments. Connections between sound modules, controllers, and sequencers are generally made with MIDI (Musical Instrument Digital Interface), which is a standardized protocol designed for this purpose. Sound modules may use any number of technologies to produce their sounds. A sound module may be a , a sampler or a digital . Drum modules are sound modules, which specialize in percussion sounds. Drum modules may be triggered by external trigger pads (like an MPC) or pickups as well as through MIDI. Drum modules are distinguished from drum machines through their lack of dedicated on-board triggers and lack of an integrated sequencer.

Sound modules are often rack-mountable, but might also have a tabletop form factor.

Sequencers

A (also MIDI sequencer or just sequencer) is software or hardware designed to create and manage computer-generated music. Originally, music sequencers did not include the ability to record audio. Instead, they managed control information (such as control voltage or note on/off commands) to be sent to electronic musical instruments to produce audio output. Most modern sequencers now feature audio editing and processing capabilities as well. Consequently, the terms "music sequencer" and " workstation" are often used interchangeably. Although the term "sequencer" is today used primarily for software, some hardware synthesizers and almost all music workstations include a built-in MIDI sequencer. Drum machines generally have a step sequencer built in. There are still also standalone hardware MIDI sequencers, though the market demand for those has diminished greatly in the last ten years. Many sequencers have features for limited music notation, and most are able to show music in a notation style.

Comparison of DAW and old piano roll….

MIDI has many more capabilities than the basic operations mentioned here, including transmitting time code for synchronization and system exclusive messages for storing patches with an editor/librarian. The MIDI standard changes occasionally to incorporate new features as recommended by the MIDI manufacturers, but the basics of transmitting note and controller information have remained the same. It is an open system with room to grow, which is why the format has survived for decades. It can be as simple or as complicated as the user requires.