RPN and NRPN
By the end of the 1980s a synthesizer could easily have two or three hundred parameters, and a Control Change message can only name 128 of them, half of which were already spoken for. Manufacturers needed a way to reach any parameter at all, and they needed it without inventing a new kind of MIDI message that older gear would choke on. The solution was to say, in two steps, which parameter, and then what value. Those two steps are what RPN and NRPN are about.
Choose a knob, then turn it
Picture a synthesizer with a single data entry knob and a parameter selector next to it. You turn the selector until it shows the parameter you want, and then you turn the data knob. That is the whole model, and MIDI implements it with four ordinary Control Change messages.
Two of them select the parameter. Because a parameter number may be larger than 127, it is sent as an MSB and an LSB, exactly as a 14-bit value was in the previous chapter:
| CC | Carries |
|---|---|
| 99 | NRPN parameter number, MSB |
| 98 | NRPN parameter number, LSB |
| 101 | RPN parameter number, MSB |
| 100 | RPN parameter number, LSB |
Two more send the value. They are the Data Entry controllers, and once more the fine half is optional:
| CC | Carries |
|---|---|
| 6 | Data Entry, MSB |
| 38 | Data Entry, LSB |
A complete NRPN message for parameter 300 with the value 1000 on channel 1 is therefore four Control Change messages in a row:
0xB0 0x63 0x02 CC 99 = 2 parameter MSB (300 = 2 × 128 + 44)
0xB0 0x62 0x2C CC 98 = 44 parameter LSB
0xB0 0x06 0x07 CC 6 = 7 value MSB (1000 = 7 × 128 + 104)
0xB0 0x26 0x68 CC 38 = 104 value LSBNothing new was added to MIDI. An old instrument sees four controller movements it does not understand and ignores them. A new one sees a parameter number of 300 followed by a value of 1000. Every parameter of every synthesizer can be reached this way: 16,384 parameters, each with 16,384 values, all with messages that existed in 1983.
Registered and non-registered
The two names describe who decides what the parameter numbers mean.
RPN stands for Registered Parameter Number. These numbers are registered with the MIDI standard and mean the same thing on every instrument. There are only a handful of them, and the one you will meet most often is RPN 0, the Pitch Bend Sensitivity we mentioned in the Introduction. Setting it to two semitones is:
0xB0 0x65 0x00 CC 101 = 0 RPN 0, MSB
0xB0 0x64 0x00 CC 100 = 0 RPN 0, LSB
0xB0 0x06 0x02 CC 6 = 2 two semitonesThe other registered numbers are fine and coarse tuning, and a few from the later MPE extension. That is the whole list, which is why RPNs are useful but rarely exciting.
NRPN stands for Non-Registered Parameter Number, and this is where the action is. The numbers mean whatever the manufacturer says they mean, which is why a synthesizer's MIDI implementation chart has pages of them: parameter 300 is a filter cutoff on one instrument and an LFO rate on another. For an Electra One preset, NRPNs are what you reach for whenever an instrument's manual lists its parameters as pairs of numbers.
The parameter stays selected
There is one consequence of the two-step design that catches people out. The selected parameter stays selected. After the four messages above, the instrument still has parameter 300 chosen, and if a Data Entry message arrives from somewhere else, a mod wheel mapped to CC 6 for instance, the instrument dutifully applies it to parameter 300. The symptom is a parameter that changes by itself long after you touched it, which is a frustrating thing to track down.
The cure is to deselect the parameter when you are finished with it. The MIDI specification reserves the RPN number 16,383, with both bytes at 127, as the null parameter: selecting it means nothing is selected, and it cancels an NRPN selection as well as an RPN one.
0xB0 0x65 0x7F CC 101 = 127
0xB0 0x64 0x7F CC 100 = 127Well-behaved senders follow every parameter change with these two messages. That makes six Control Change messages for a single knob movement, which is the price of reaching a parameter by this route, and on a five-pin cable it is one of the places running status earns its keep.
Seeing it on the controller
Drag a Fader into the layout, name it Cutoff, and in its settings set the Message Type to NRPN with the Parameter 300, and its Max to 16383 so that the screen shows the whole value. Send the preset to the controller and open the Console tab.
Turn the knob. For every step of the fader the console shows the four messages, controllers 99, 98, 6 and 38, followed by the two reset messages on 101 and 100. Expand one of the lines and read the bytes against the example above; they match, with the value changing as you turn.
Now go the other way and type the four selecting and setting messages into the console's command line on one line:
cc 99 2 cc 98 44 cc 6 7 cc 38 104The fader moves to 1000. The Electra One recognised the four Control Change messages as one NRPN, picked the parameter number out of the first two, and assembled the value from the second two, exactly as a synthesizer would.
Settings for awkward instruments
Manuals do not agree on how to write these numbers. Some give an NRPN as one number, some as an MSB and LSB pair, some in hexadecimal; the Electra One accepts all three. Some instruments send the LSB before the MSB, and some do not want the reset messages at all. Byte Order and Reset NRPN Parameter in the control's settings cover those cases, and the instrument's manual is the place to find out which you need.
What comes next
With 14-bit values and NRPNs, we have stretched the channel messages about as far as they go. The next chapter leaves them behind. System Exclusive messages are how an instrument sends its entire patch down the wire, and they are the messages the Electra One was built around.