I have a previous post that outlines MIDI information. Jeffrey Hass has a full chapter as part of his online Introduction to Computer Music. (pages 1 – 5, 11 and 12 are the most applicable to what we are doing)
For our purposes (a short intro), it is most useful to understand the following concepts:
- continuous controller
- pitch bend
A MIDI device is anything that can send and receive MIDI commands. From a practical standpoint, a device must include at least one MIDI port. Many current devices, like USB keyboard controllers, have multiple MIDI ports for sending and receiving data.
A MIDI port can be either a physical, 5-pin MIDI connection, or a logical (computer defined) data connection made through a USB or other connector. Each port can communicate data on 16 MIDI channels.
A MIDI channel is a logical data path for communicating information. All 16 channels travel on the same physical cable, but use channel status messages to sort data. A device that is listening to MIDI channel 1 will only respond to data that is sent with that MIDI status address, ignoring messages with other channel addresses. Using MIDI channels allows for routing commands to specific instruments.
A MIDI program/patch/instrument is a definition of how to play specific sounds on a MIDI device. One program could play a piano sound; another program could play a saxophone sound. The three terms can be used interchangeably, but they can also have specific meanings for a particular device or piece of software. For our purposes, Kontakt uses the term instrument to define each sampler device in its rack.
Most MIDI commands have accompanying data ranges from 0 – 127 (7 bits allows for 128 possible values).
Noteon and noteoff commands are the most commonly used MIDI messages. A noteon command consists of the MIDI channel, noteon command, note number, and key velocity (how fast the key was pressed, corresponding to force). The data that you will focus on consists of the note number and key velocity. A middle C struck with full force would give a note number of 60 and a key velocity of 127. Lower key velocities would result from slower key strikes. A MIDI instrument has to be programmed to adjust amplitude in response to key velocities. Almost all synthesizer/samplers bypass the noteoff command in favor of a noteon command with a key velocity of 0. For example, a note number of 60 with a velocity of 0 would turn off a sounding middle C.
Continuous Controllers (CC) send data values that can change any number of instrument parameters. A CC command consists of the MIDI channel, CC command, CC number, and CC value, with our focus on the CC number and value. The Mod Wheel is a commonly used CC, assigned the controller number of 1 almost universally. You have to program an instrument to respond to specific CC numbers. CCs are used to change parameters while a note is sounding.
Pitch Bend can be thought of as a special type of CC, although it has its own MIDI command. It allows for pitch changes to a note while sounding, up or down. You must program an instrument to respond to pitch bend, and by how much (how much is usually specified in semitones, or half steps).