# 12 bit NRPN

**URL:** <https://forum.electra.one/t/12-bit-nrpn/3711>\
**Category:** Developers\
**Created:** [May 23, 2025, 4:05pm UTC](https://forum.electra.one/t/12-bit-nrpn/3711 "2025-05-23T16:05:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SWK82](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@SWK82](https://forum.electra.one/u/SWK82)\
**Post date:** [May 23, 2025, 4:05pm UTC](https://forum.electra.one/t/12-bit-nrpn/3711/1 "2025-05-23T16:05:03Z")

</div>

Hi there,

I’m trying to control my Kiwi Juno-106 with NRPNs but unfortunately I haven’t figured out how to properly configure it…

It supports 12 bit controls (0-4096) and it combines 7 bits of the MSB and 5 of the LSB. See the extract from the manual below.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/electraone/original/2X/e/ef8096685dd196f87a3b249e952c37fb466743da.png)

I tried to modify the code below for hours to try to get it work but with no success unfortunately. I must confess bit shifting/combining is unknown territory for me… I’m also not able to monitor the synth’s output because it sends only 7 bit CCs…  
I got the code from this topic: [https://forum.electra.one/t/nrpns-bits-and-bytes/3319](https://forum.electra.one/t/nrpns-bits-and-bytes/3319). Props to the autors.

```auto
deviceId = 1
device= devices.get(deviceId)
devPort = device:getPort ()
channel = device:getChannel ()

function sendNrpn(ValueObject, value)

    local message = ValueObject:getMessage ()
    local parameterNumber = message:getParameterNumber ()

    local parameterMSB = (parameterNumber >> 7) & 0x7F
    local parameterLSB = parameterNumber & 0x7F
    local valueMSB = (value >> 7) & 0x7F
    local valueLSB = value & 0x7F

    local messages = {
        {channel = channel, type = CONTROL_CHANGE, controllerNumber = 99, value = parameterMSB},
        {channel = channel, type = CONTROL_CHANGE, controllerNumber = 98, value = parameterLSB},
        {channel = channel, type = CONTROL_CHANGE, controllerNumber = 6, value = valueMSB},
        {channel = channel, type = CONTROL_CHANGE, controllerNumber = 38, value = valueLSB}
    }
    
    for i, msg in ipairs(messages) do
        midi.sendMessage(devPort, msg)
    end
end

```

Does anybody know how to solve this problem ?

---

<div class="post-metadata">

**Author:** ![martin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/martin/32/145_2.png) [@martin](https://forum.electra.one/u/martin)\
**Post date:** [May 26, 2025, 8:00am UTC](https://forum.electra.one/t/12-bit-nrpn/3711/2 "2025-05-26T08:00:26Z")

</div>

Can you test this preset:  
[Kiwi 106 NRPN](https://app.electra.one/preset/F0kG3eTVTp6h2ZqGjZic)

I tried setting up a standard NRPN fader to control Overall Volume there (7). I am curious if it changes the volume when you twist the knob. I am not expecting that it will work on 100%, but you should hear some changes of the volume. If not, we need to tweak it a little bit more.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/electraone/original/2X/3/304dbfa898a21c49dbc2cea6c9d2a215c0e032a5.png)
