• Using RPNs and NRPNs

    What are RPN and NRPN messages?

    MIDI RPN (Registered Parameter Number) and NRPN (Non-Registered Parameter Number) messages are similar in purpose to Controller events, except that both the parameter number and data value can be any number from 0 through 16383 (normal controllers only allow 0 through 127). Each RPN or NRPN message is composed of up to four special controller messages. Together, they are interpreted as an RPN or NRPN change.

    When recording or loading a file, Cakewalk will gather the individual controller messages into a single RPN or NRPN event inside Cakewalk. Using a single event makes it much easier for you to work with RPNs, and makes RPN search-back much more efficient. When playing or saving a file, Cakewalk splits this event back into the four individual controller messages that make up the RPN or NRPN event. This gives you the convenience of single RPN or NRPN events in Cakewalk, plus compatibility with existing files, hardware, and software.

    The following table shows which Controller numbers Cakewalk uses for parameter numbers and data values in each RPN or NRPN event.

    Message Parameter number MSB Controller Parameter number LSB Controller Data value MSB Controller Data value LSB Controller
    RPN 101 100 6 38
    NRPN 99 98 6 38

    Figuring out what numbers to enter for RPN and NRPN events
    Cakewalk lets you see the entire 14 bit value when working with RPNs and NRPNs. This is handy when you draw RPNs and NRPNs in the Piano Roll view or when you use them in a StudioWare panel. In the Event List, each RPN or NRPN event has two values, the parameter number (0..16383) and the parameter value (0..16383.)

    Okay, but how do you translate four controller messages into two numbers representing a parameter number and a data value? There's a simple formula:

    (MSB x 128) + LSB

    Where MSB is the data value of the Most Significant Byte controller message, and LSB is the data value of the Least Significant Byte controller message. Still confused? Here's an example showing how this works. Say your hardware wants to see:

    CC 99 value 127
    CC 98 value 5
    CC 6 value 0
    CC 38 value 0

    You can translate these four messages into a NRPN event, by doing the following:

    1. Calculate the parameter number

    • Multiply the MSB by 128, then add the LSB.
    • Start with the basic equation: (MSB x 128) + LSB
    • Next, substitute these Controller values: (CC 99 value x 128) + CC 98 value
    • Then enter them into the equation: (127 x 128) + 5 = 16261

    2. Calculate the data value

    • Start with the basic equation: (MSB x 128) + LSB
    • Next, substitute these Controller values: (CC 6 value x 128) + CC 38 value
    • Then enter them into the equation: (0 x 128) + 0 = 0

    3. You're done!
    Thus, the parameter number = 16261 and the data value = 0

    Back to index of technical articles.