MIDI 1.0

RPN & NRPN

Spec: MIDI 1.0 Core Specifications All specs

MIDI 1.0 has only 128 controller numbers. Parameter numbers get around that by using a few controllers to pick one of 16,384 parameters and then setting its value with Data Entry. RPNs are parameters defined by the MIDI specification. NRPNs are left to each manufacturer.

The controllers involved

CCHexFunction
1010x65RPN MSB (parameter number, high 7 bits)
1000x64RPN LSB (parameter number, low 7 bits)
990x63NRPN MSB
980x62NRPN LSB
60x06Data Entry MSB (value, high 7 bits)
380x26Data Entry LSB (value, low 7 bits)
960x60Data Increment (+1; value byte ignored)
970x61Data Decrement (−1; value byte ignored)

The message sequence

A parameter change is a short series of Control Change messages on one channel:

  1. Select the parameter. Send the parameter number MSB (CC 101 or 99), then the LSB (CC 100 or 98).
  2. Set the value. Send Data Entry MSB (CC 6), then, if needed, Data Entry LSB (CC 38).
  3. Deselect. Send the null RPN (CC 101 = 127, CC 100 = 127). Later Data Entry messages then change nothing by accident.

Once a parameter is selected it stays selected. Further Data Entry, Increment, or Decrement messages keep changing it until another parameter is chosen. Selecting an RPN deselects any NRPN, and the reverse, because both share Data Entry.

Order matters

Send the parameter number MSB before LSB and the data MSB before LSB. A Data Entry MSB resets the stored LSB on many receivers, so a lone LSB sent first is lost. Never interleave messages for two parameters on the same channel. Running status is fine.

Registered Parameter Numbers

MSB, LSBParameterData Entry meaning
00, 00 Pitch Bend Sensitivity MSB = semitones, LSB = cents. Default 2 semitones, 0 cents.
00, 01 Channel Fine Tuning 14-bit, center 8192 (40 00) = A440. Range −100 cents to just under +100 cents, in steps of 100/8192 cent.
00, 02 Channel Coarse Tuning MSB only, center 64 = 0. Range −64 to +63 semitones. LSB ignored.
00, 03 Tuning Program Change MSB selects a MIDI Tuning Standard program (0–127).
00, 04 Tuning Bank Select MSB selects a MIDI Tuning Standard bank (0–127).
00, 05 Modulation Depth Range MSB = semitones, LSB = 128ths of a semitone (≈ 0.78 cents) of vibrato for full modulation (GM2).
00, 06 MPE Configuration Message Sent on the manager channel (1 or 16). MSB = number of member channels (0 disables the zone). See MPE.
3D, 00–3D, 08 Three-Dimensional Sound Controllers Azimuth, elevation, gain, distance, and related parameters for positioning sound in 3D (RP-049).
7F, 7F Null Function (RPN Null) Deselects the current RPN/NRPN. Data Entry is ignored until a new parameter is chosen.

Every other RPN number is reserved for future definition. NRPN numbers are left entirely to manufacturers. Check the instrument's MIDI implementation documentation.

Example: set pitch bend range to ±12 semitones

On channel 1:

B0 65 00   ; CC 101 RPN MSB = 0
B0 64 00   ; CC 100 RPN LSB = 0   → Pitch Bend Sensitivity selected
B0 06 0C   ; CC 6   Data Entry MSB = 12 semitones
B0 26 00   ; CC 38  Data Entry LSB = 0 cents
B0 65 7F   ; CC 101 = 127
B0 64 7F   ; CC 100 = 127         → Null RPN, deselect

With running status the same change takes 13 bytes:

B0 65 00 64 00 06 0C 26 00 65 7F 64 7F

Example: an NRPN

Suppose a synth's manual says NRPN MSB 0x01, LSB 0x08 is the vibrato rate. To set it to 80 on channel 3:

B2 63 01   ; CC 99 NRPN MSB = 1
B2 62 08   ; CC 98 NRPN LSB = 8
B2 06 50   ; CC 6  Data Entry MSB = 80
B2 65 7F   ; CC 101 = 127
B2 64 7F   ; CC 100 = 127  → Null

Some NRPNs use the full 14-bit value (CC 6 followed by CC 38). Others use only the MSB. The manufacturer's documentation says which.

Data Increment and Decrement

CC 96 and CC 97 step the selected parameter up or down. The specification leaves the step size to the parameter. For Pitch Bend Sensitivity, many devices step by one cent (the LSB) and carry into semitones. Support varies, so prefer absolute Data Entry when you can.

In MIDI 2.0

The MIDI 2.0 protocol drops the CC sequence. It has dedicated Registered Controller and Assignable Controller messages (the new names for RPN and NRPN) that carry the bank, index, and a 32-bit value in one atomic packet, plus per-note versions. See MIDI 2.0 & UMP.