NPRN Midi for dummies

  • I have looked over the MIDI documentation and NRPN stuff many times over the years yet I still only rely on PC/CC for midi automation.
    Several versions ago; while trying to control my KPA with NRPN (that I had captured via midiox and adjusting parameters on the panel) - I managed to figure out a few NRPN messages - but when sending those NRPN changes from my DAW to control the KPA; the results were somewhat erratic or not totally reliable.
    PC/CC always works great for me and I've done hundreds of shows with it - but I've never been able to fully trust NRPN.

    With that being said; I'm perfectly fine with assuming it's that I'm doing something wrong because NPRN is just not really clicking for me in terms of figuring out exactly what parameters I need other than trial and error and guessing about midiox messages received.

    1) Does anyone have a spreadsheet of all of the exact parameters already compiled?
    2) Are there any videos where working with NPRN is explained differently that maybe my brain can grasp a little better?
    3) If anyone is using Reaper to send NPRN; can you show me an example to make sure I'm doing it the right way?

    • Official Post

    A MIDI controller is defined by an index and a value. Index and value have a range of 0 to 127 (7 bit, 2 to the power of 7).

    Example: Set controller 7 to 127 will set the "Volume" to maximum (because 7 is assigned to Volume by the MIDI standard).


    Sometimes you wish to have more controllers and a finer control of the value. In this case you use NRPN:

    instead of 7 bits you now use 14 bits with a range of 0 to 16383 (2 to the power of 14).


    To be able to communicate this to the device you can use "NRPN" (Non Registered Parameter Number).


    Since a controller can usually transport 7bits, you just use 2 controllers to communicate 2x7=14 bits. Just split the 14 bit into 2x7 bit and use the 7 bit controllers to send them to the device:


    To address the 14 bit index controller number, you send Controller 99 with value of the "higher" 7 bits of the index and Controller 98 with value "lower"
    To address the 14 bit value, you send Controller 6 with value of the "higher" 7 bits of the value and Controller 38 with the "lower" 7 bits.


    The Profiler accepts the value change when Controller 38 arrives, so make sure you've send Controller 6 before.

  • Same here, mate. I had trouble with ancient Greek as well, but I made the looper work with a classical midi foot-controller. I used a midi translator. I hope the picture helps. (I still couldn't program the STOP footswitch, but I am working on it)

  • Same here, mate. I had trouble with ancient Greek as well, but I made the looper work with a classical midi foot-controller. I used a midi translator. I hope the picture helps. (I still couldn't program the STOP footswitch, but I am working on it)

    What App do you use ?
    I 'm using Pocket MIDI for testing.
    But for NRPM i didn't find any userfrienly app which converts a Decimal value into two 7Bit MSB/LSB
    like dec value 567 to MIDI MSB/LSB 0x04 0x37 instead of 0x0237 wich you get as normal Hex value.

    I'm using for this calculation an external website MIDI BYTE Calculator.

    I hate MIDI, it's so lowlevel 80's style. Reminds my when I starteted with Comodore and Atari Computers with peek and poke.
    No protocol security, no data verification or checksum and no packet acknowledgment, not even ACK/NACK

    Be the force with you ;)

  • BOME midi translator. You do not have to calculate anything. Set the imput and output hardware, draw a line between them. Push the footswitch for it to learn the comand and tell it which output NRPN message to send to KPA.

  • BOME midi translator. You do not have to calculate anything. Set the imput and output hardware, draw a line between them. Push the footswitch for it to learn the comand and tell it which output NRPN message to send to KPA.

    Thx a lot,

    With that you can record the current value.
    But I like set a value between 0 to 100% on a ramp function. or expression pedal

    From the Kemper MIDI example:
    “Reverb/Mix” is at NRPN #9603, so MSB (“address page”) is 75 ($4B) and LSB (“address number”) is

    3 ($03).
    To send a 14-bit high resolution value to 8192:
    $B0 $63 $4B <- Addresspage
    $B0 $62 $03 <- address number
    $B0 $06 $40 <- MSB
    $B0 $26 $00 <- LSB

    By the way this example is outdated because Adresspage 75 no longer exists since KAOS Version 6 but Kemper still publish examples that can't work
    So this calculation for MSB/LSB (SHR means Bitshift Right C++ >> operator , or BITRSHIFT(number, shift_amount) in Excel


    So, why $40 and $00? Because 8192 is $2000 and:
    a) ($2000 SHR 7) AND $7F = $40 The upper 7 of 14 bits.
    b) ($2000 AND $7F) = $00; The lower 7 of 14 bits.

    Be the force with you ;)

  • OK, trying to convert this to plain English:


    When sending data to control the sound of a device like the Kemper via MIDI, you would typically send it via so-called "Control Change" commands. Such a command is made up of two pieces of information (ignoring some of the finer detail like MIDI channel...):

    • a "controller number" - this identifies what parameter you want to change, e.g. the number 7 stands for volume
    • a "controller value" - this is the value you want to set the parameter to

    Both of these allow values from 0 to 127.


    Simple enough: set controller #7 to 64 - means that you set your volume to roughly 50% - OK so far?


    Two problems with this:

    1. there are only 128 controller numbers available - if you have more parameters you want to control, you're SOOL...
    2. with only 128 values per parameter, you can't be very fine-grained in setting your parameters. Setting EQ frequencies with only 128 values is a bit rough...

    The answer to this are so-called NRPNs "non-registered parameter numbers". Non-registered means that every manufacturer can use their own number scheme to allocate numbers to parameters of their device.


    With NRPNs, you have 16384 different controller numbers instead of just 128 - should give us enough to play with. Also, you have values from 0 to 16383 for your parameter values as well - better for setting higher resolution parameters.


    So far, so good - now Kemper can define all their 16000+ parameters and allow us to set them in high resolution. But how to communicate this to the device? The problem is that due to technical restrictions, MIDI can generally only transmit values from 0 to 127 - that's 7 bits (digits of 0 or 1) in digital-speak. To express numbers up to 16383, you need 14 bits - coincidentally, that's exactly two chunks of 7 bits.


    So the funky thing the engineers have come up with is to break up the information into chunks of 7 bits and send them via "classic" control change commands . This means that in order to send a single parameter change via NRPN, you will need to send four control change commands:

    • two to tell the Kemper which parameter you want to change
    • two to tell it what value you want to change it to

    There are specific MIDI commands to do that:

    • First, send two commands to define the parameter number - CC 99 and CC 98
    • Next, use two commands to send the actual value - CC6 and CC38

    Each of these four commands sends part of the overall message; once the last message has been sent, the Kemper will execute the change.


    Now - how to get to the values that you need to send?

    Each of these large numbers from 0 to 16383 needs to be broken up into two parts, the "most significant bits" (MSB - the left half) and the "least significant bits" (LSB - the right half) - a binary number like 00100101001001 is broken up into MSB 0010010 and LSB 1001001. In the decimal world , this would be the number 2377 broken down into MSB 18 and LSB 73. There are tools and websites that help you make that calculation, e.g. the MIDI byte calculator. But you can also calculate the values yourself:

    • MSB: divide the value by 128, keep only the result before the decimal point
    • LSB: subtract MSB*128 from the original value

    Typically, these values need to be sent in the sequence "MSB first, then LSB".


    So, for a specific example, let's try to set the NRPN with the number 1111 to the value 2222. Using the calculator, 1111 breaks down to 8 / 87 and 2222 results in 17 / 46. So the commands to send are (in this sequence)

    • CC99, value 8 (NRPN MSB)
    • CC98, value 87 (NRPN LSB)
    • CC6, value 17 (Data Entry MSB)
    • CC38, value 46 (Data Entry LSB)

    Now your parameter 1111 should be set to 2222 - all done!


    Hope this helps!


    Cheers,


    Torsten

    Edited 3 times, last by ToH2002 ().

  • That is one pf the best descriptions I have seen. My head hurts after reading it but it was still one of the best. I used to think the sec0nd button on my Mesa footswitch was complicated so this stuff is astronaut level to me 🤣