The controller number N in a name such as amplitude_oncc7, locc64 or set_cc1 is a MIDI Control Change number, 0 to 127, and SFZ 2 and ARIA add numbers above that for other sources. These notes are in our words, from docs/extensions/midi_ccs.md (sfzformat.com), saved in the research folder from https://sfzformat.com/extensions/midi_ccs/, and the Cakewalk regression suite’s test 07 - syntax special controls (random).sfz, which lists 128 to 137 as well.
SFZ 2: 128 to 137
| Number | Source |
|---|---|
| 128 | pitch bend |
| 129 | channel aftertouch |
| 130 | polyphonic aftertouch |
| 131 | note-on velocity |
| 132 | note-off velocity |
| 133 | keyboard note number |
| 134 | keyboard note gate |
| 135 | unipolar random |
| 136 | bipolar random |
| 137 | alternate |
Note gate is 0 when no key is down and 1 when at least one is. Unipolar random runs from 0 to 1, bipolar random from -1 to 1, and alternate switches between 0 and 1 at every note-on. The Cakewalk test gives the keyboard value as note 0 = 0 and note 127 = 1. Because a controller is shared by the whole instrument, the velocity and note-number controllers (131 to 133) change with every note-on or note-off, which “can give unexpected results” in polyphonic instruments with long sounds, unlike the velocity and note number of the note itself. Aftertouch and note-off velocity are rarely sent by hardware; many keyboards send a fixed note-off velocity such as 64.
ARIA: 140 to 155
“Anything above 137 is not specified in the SFZ 2 standard and strictly engine-dependent. ARIA adds more.”
| Number | Source |
|---|---|
| 140 | keydelta |
| 141 | keydelta absolute |
| 142 | host tempo (bpm) |
| 143 | host transport status: 0 is off, 1 is on in non-loop mode, 2 is playing in loop mode |
| 144 | host sample rate |
| 145 | time since the engine has been up |
| 146 | current time signature numerator |
| 147 | current time signature denominator |
| 148 | position since song start in PPQ (pulses per quarter note) |
| 149 | position since bar start in PPQ |
| 150 | time since the instrument has been up |
| 151 | time since last key on, in seconds |
| 152 | time since last key off, in seconds |
| 153 | number of keys currently down |
| 154 | number of currently active voices |
| 155 | last playahead (offset) of any sample in the instrument |
Numbers 138 and 139 are not listed. In Cakewalk Dimension Pro, 140 is bit reduction and 141 is decimation. Some of these are shared by every running instance of the ARIA engine (the host tempo, for example), others differ for each instance or instrument (keydelta). Controllers 140 and 141 are measured in half-steps, so eg07_pitch_oncc140=100 gives 100 cents per half-step, which is what a portamento glide needs. For 140, 141 and 151 the conditions lohdcc and hihdcc (decimal values) have to be used instead of locc and hicc: lohdcc140=12 hihdcc140=12.1 restricts a region to an interval of an octave upwards. Controller 151 is reset as soon as a new note is hit, so it cannot time the gap between notes, but it can control release triggers.
The viewer reads a controller number in a name and says, for a number above 512, that sfizz ignores it (sfizz keeps 512 controllers, MIDI_CC_COUNT in its build settings, and skips an opcode with a higher number) and that the sources we read document the controllers only up to 155. Numbers from 156 to 512 are accepted without a remark, since real instruments use them (for example label_cc400).
Using a controller
A controller can be used as a condition (locc64=64 hicc64=127), as a modulation source (amplitude_oncc7=100), as a start value (set_cc7=100 under <control>) and as a label (label_cc1=Vibrato). set_hdccN is the form with a floating-point value from 0 to 1. See Modulation and the tables on Region logic and Instrument settings.