MIDI Controllers [Topic]

There are 128 possible controller numbers, assigned numbers from 0 to 127. Some numbers are defined for specific purposes. Others are undefined, and reserved for future use.

In a MIDI Control Change message, the first data byte holds the controller number and the second data byte its value. Each controller has thus a 7-bit resolution, corresponding to a possible value range of 0-127. Controls requiring a higher resolution must therefore be specified via two different controller numbers, one representing the coarse setting (i.e., the seven most-significant bits of an overall 14-bit value), the other the fine setting (the seven least-significant bits). Controller numbers that implement switches, such as a sustain pedal, simply interpret any value from 0 to 63 as 0 ("Off") and any value 64-127 as 1 ("On").

The following standard controller numbers and Registered Parameter Numbers (RPNs) are defined:

High-Resolution Performance Controllers

These controllers come in both, coarse and fine, versions with a combined value range of 14 bits (0-16383).

Note that some devices do not implement the "Fine" controllers. However, devices that implement 14-bit resolution are required to deal with either the coarse or fine controller message being sent without its counterpart following.

+Bank-Select+[Constant]
+Bank-Select-Fine+[Constant]

Selecting a different bank of patches usually has no effect unless it is followed by a program change.

+Modulation-Wheel+[Constant]
+Modulation-Wheel-Fine+[Constant]

0 is no modulation effect.

+Breath-Control+[Constant]
+Breath-Control-Fine+[Constant]

0 is minimum breath pressure.

+Foot-Controller+[Constant]
+Foot-Controller-Fine+[Constant]

0 is minimum effect.

+Portamento-Time+[Constant]
+Portamento-Time-Fine+[Constant]

0 is slowest rate.

+Data-Entry+[Constant]
+Data-Entry-Fine+[Constant]

This sets the value of a previously set registered or non-registered parameter. See the example below. 0 is minimum effect.

+Channel-Volume+, +Volume+[Constants]
+Channel-Volume-Fine+, +Volume-Fine+[Constants]

This was formerly known as "Main Volume". However, it affects only the volume of the channel the controller is written out to. "Volume" is an alternative name.

Note that the real sounding volume is also affected by the Expression Controller.

+Balance+[Constant]
+Balance-Fine+[Constant]

Sets the balance (of a stereo sample). This is not panning but carried out before pan. 0 is leftmost.

+Pan+[Constant]
+Pan-Fine+[Constant]

0 is leftmost.

+Expression-Controller+[Constant]
+Expression-Controller-Fine+[Constant]

This allows for dynamic volume control, expressed as a percentage of the main channel volume. 0 is off.

+Effect-Control-1+[Constant]
+Effect-Control-1-Fine+[Constant]
+Effect-Control-2+[Constant]
+Effect-Control-2-Fine+[Constant]

0 is minimum effect.

+General-Purpose-Controller-1+[Constant]
+General-Purpose-Controller-1-Fine+[Constant]
+General-Purpose-Controller-2+[Constant]
+General-Purpose-Controller-2-Fine+[Constant]
+General-Purpose-Controller-3+[Constant]
+General-Purpose-Controller-3-Fine+[Constant]
+General-Purpose-Controller-4+[Constant]
+General-Purpose-Controller-4-Fine+[Constant]

Unassigned general-purpose controllers.

Additional Low-Resolution Performance Controllers

+Portamento-Control+[Constant]

Allows control of the portamento depth (amount of slurring, see +Portamento+, below).

+General-Purpose-Controller-5+[Constant]
+General-Purpose-Controller-6+[Constant]
+General-Purpose-Controller-7+[Constant]
+General-Purpose-Controller-8+[Constant]

Additional coarse-only General-Purpose Controllers.

Performance Switches

The switches interpret values below 64 as 0 (or "Off") and values from 64 on as 1 (or "On").

+Damper-Pedal+, Sustain[Constants]

When set to on, this controller also postpones any All-Notes-Off controller message on the same channel. Sustain is an alternative name.

+Portamento+[Constant]

Allows notes to be slurred together.

+Sostenuto+[Constant]

Sustains only already sounding notes. Sostenuto also postpones any All-Notes-Off controller message on the same channel.

+Soft-Pedal+[Constant]

Damper pedal.

+Legato-Footswitch+[Constant]

Legato pedal.

+Hold-2+[Constant]

In contrast to Hold 1, Hold 2 merely lengthens release times.

Patch Sound Controllers

+Sound-Control-1+, +Sound-Variation+[Constants]
+Sound-Control-2+, +Sound-Timbre+[Constants]
+Sound-Control-3+, +Sound-Release-Time+[Constants]
+Sound-Control-4+, +Sound-Attack-Time+[Constants]
+Sound-Control-5+, +Sound-Brightness+[Constants]
+Sound-Control-6+[Constant]
+Sound-Control-7+[Constant]
+Sound-Control-8+[Constant]
+Sound-Control-9+[Constant]
+Sound-Control-10+[Constant]

Low-resolution controllers with a value range from 0 to 127. Initially, the first five sound controllers were intended to provide some abstract control over the sound quality and hence bore specialized names. Since this often proved to be futile they have since been reassigned generic names.

Patch Effect Controllers

+Effects-1-Depth+, +Effects-Level+[Constants]
+Effects-2-Depth+, +Tremolo-Level+[Constants]
+Effects-3-Depth+, +Chorus-Level+[Constants]
+Effects-4-Depth+, +Detune-Level+[Constants]
+Effects-5-Depth+, +Phasor-Level+[Constants]

Five low-resolution Effects Depth controllers with values ranging from 0 to 127 are defined. Like the Sound Controllers, these are today viewed as generic controllers, despite their former more descriptive names.

Data Increment

+Data-Entry-Increment+, +Data-Entry-+1+[Constants]
+Data-Entry-Decrement+, +Data-Entry--1+[Constants]

Counterparts to the +Data-Entry+ and +Data-Entry-Fine+ performance controllers that implement step-wise (relative) increments or decrements.

Note: These controllers do not use their value byte, which should be set to zero.

RPN/NRPN Selection

+Non-Registered-Parameter-Number-Fine+[Constant]
+Non-Registered-Parameter-Number+[Constant]
+Registered-Parameter-Number-Fine+[Constant]
+Registered-Parameter-Number+[Constant]

Select a registered or non-registered parameter number for subsequent setting (+Data-Entry+, +Data-Entry-Fine+) or incrementing/decrementing (+Data-Entry-Increment+, +Data-Entry-+1+, +Data-Entry-Decrement+, +Data-Entry--1+).

The following Registered Parameter Numbers are defined.

+RPN-Pitch-Bend-Sensitivity+[Constant]
+RPN-Fine-Tuning+[Constant]
+RPN-Coarse-Tuning+[Constant]

Note: RPNs and NRPNs are high-resolution (i.e., two-byte) control values. This implies that two control messages must be written using both the coarse and fine versions of the Non-Registered Parameter Number or Registered-Parameter-Number controllers. See the Examples section below.

+RPN-Reset+[Constant]

+RPN-Reset+ clears the currently set RPN in order to protect the parameter from accidental change via following Data Entry messages.

Channel Mode Controllers

+All-Sound-Off+[Constant]

Signals a device to abort all sound output on the specified channel. The value byte is ignored.

+Reset-All-Controllers+[Constant]

Signals a device to reset all controllers for the specified channel to their power-up defaults. The value byte is ignored.

+All-Notes-Off+[Constant]

Signals a device to generate a Note Off event for each sounding note on the specified channel. Note that this is different from +All-Sounds-Off+ as some patches may have very long release times or since the Hold 1 pedal may be depressed. The value byte is ignored.

+Local-Control+[Constant]

This switch instructs a device to allow local (typically keyboard) input (On) or to only accept data through its MIDI input (Off).

+Omni-Mode-On+[Constant]
+Omni-Mode-Off+[Constant]

Omni can be switched on or off with the Omni On and Omni Off controller messages. The value byte is ignored.

Note: These controllers must be received on the device's Base Channel in order for the device to respond to them. What this implies is that even when a device is in Omni On state (ie, capable of responding to all 16 channels), it still has a Base Channel for the purpose of turning Omni On or Off.

+Poly-Mode-On+[Constant]
+Poly-Mode-On/Off+[Constant]

These controllers switch a channel in and out of polyphonic mode. +Poly-Mode-On+ simply enables unconditional polyphonic mode and thus ignores its value byte, whereas +Poly-Mode-On/Off+ allows finer control over the actual number of additional voice allocations allowed on the channel.

Note: These controllers must be received on the device's Base Channel in order for the device to respond to them.

Utility Functions

midi-controller-name controller [Function]

Returns controllers name string.

midi-set-main-tuning channel &optional semitones cents (time 0) [Function]

Set a channel's main tuning (as opposed to the device's main tuning), expressed a semitone and cents difference from the standard tuning. cents may be either a float between -1.0 (inclusive) and 1.0 (exclusive), denoting a whole tone or 100 cents, or an integer between -64 and 63 representing the range from -100 cents to 100 cents in MIDI-typical resolution.

midi-set-pitch-bend-sensitivity channel &optional (semitones 2) (time 0) [Function]

Set the pitch wheel range for <channel> to +/-semitones. The MIDI Standard recommends a default of 2 semitones.

Examples:

midi-set-pitch-bend-sensitivity gives an example of how RPNs are used:

;;; Select RPN corresponding to +RPN-Pitch-Bend-Sensitivity+.
;;; RPNs consist of two bytes, so we have to use both, the 
;;; coarse and fine controllers.
(midi-write-message
 (make-control-change channel +Registered-Parameter-Number+
                      (first +RPN-Pitch-Bend-Sensitivity+))
 time)
(midi-write-message
 (make-control-change channel +Registered-Parameter-Number-Fine+
                      (second +RPN-Pitch-Bend-Sensitivity+))
 time)

;;; Now that a parameter number is selected for channel, we 
;;; can set it to whatever semitones we want it to be.
(midi-write-message
 (make-control-change channel +Data-Entry+ semitones)
 time)

See Also:

MIDI Messages, MIDI Sysex Messages

Last Modified: 17-Aug-1998