NRPN 7bit to NRPN 14bit with negative values.

  • Forum
  • [RESOLVED] NRPN 7bit to NRPN 14bit with negative values.
0
0

Hello,

I’m using a Novation 61 SLMKIII with Novation Components to control ACCELERATOR from Radikal Tech.

Thanks to Steve Caldwell I successfully did a translate NRPN7 or CC to NRPN 14bits.

Work great when value are between 0..127.  However when I want to translate negative values,

-63..64 to -255..255 (NRPN-7bit to NRPN-14bit).

Alternatively it’s possible to setup SLMKIII with -127..127 (NRPN-8bit)

In attach capture and mtp project.

Thank you

RESOLVED
Marked as spam
Posted by (Forum: 1, Answers: 3)
August 11, 2019 4:01 pm
31 views
0
Private answer

Hello Steve,

Thank you for your help.

I did some change on your file:

Rules NRPN MSB 18 instead of 17

// NRPN MSB
tt=18
// NRPN LSB
uu=0


for the Outgoing

I deleted “b0 26 7f b0 64 7F”

Thank you very much for your big help!

I will order a MT Pro to work with my BomeBox and continue to work on this CC to NRPN 14Bit

Marked as spam
Posted by (Forum: 1, Answers: 3)
August 12, 2019 10:36 am

If memory serves me, B0 26 7F and B0 64 7F I think are there as part of the MIDI spec to signal that you are done with the NRPN message. I didn’t look it up thought but those values are always sent at the end if you select 14 Bit NRPN as an output type so that is why I put them in.

I’m sure you could look that up at MIDI.org.

( at August 12, 2019 10:56 am)

My memory must be slipping. Not sure why those are there 26 (38) is for Data Entry LSB and 64 (100) is for RPN LSB. Setting 38 to 7F is to lock the NRPN LSB value. Maybe I did a typo on the other one.

Here is the text about locking NRPN values from MIDI.org from the spec. I will need to research this a bit further. Sorry if it broke things.

RPNs (and NRPNs) are designed so that when a parameter is selected and then
followed by a corresponding Data Entry (CC # 6/38) or Data Increment/Decrement (CC
# 96/97) value, all subsequent data values will continue to address that parameter
until another RPN or NRPN is selected. The “Null function” value (7F for both the
MSB and LSB) is used to lock in the value of the RPN or NRPN so that subsequent
Data Entry and Data Increment/Decrement commands are ignored. Some
manufacturers, however, implement the Null function, or variations thereof, in
response to other events or commands.

( at August 12, 2019 11:17 am)

Ah, CC 100 (64H) and 101 (65H) are set to 127 (7F H) to ensure that sending subsequent data increment values to CC6 and CC 38 are locked. until new CC 98 and CC 99 (NRPN) are gain sent. Otherwise a subsequent value change could gum up the works. I guess it was designed so that without sending the null values, all subsequent NRPN values could change the existing value without having to send the NRPN (or RPN) CC’s again.

Below is what is put out by standard NRPN 14 bit in MT Pro if you give it a value of 255

B0 63 12 B0 62 00 B0 06 01 B0 26 7F B0 65 7F B0 64 7F

So I got you close. Thanks for taking it over the finish line!

Steve

( at August 12, 2019 11:34 am)
0
Private answer

Hi, try the attached.

It looks like they use LSB for 0-127 in MOD 128 configuration

-255 to -129 = LSB 1 to 127 – With MSB 62

-128 to -1 =  LSB 1 to 127  –  With MSB 63

0 to 127 = LSB  0 to 127 – with MSB 64

128 to 255 = LSB  0 to 127 – with MSB 65

I hope this helps!

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

Marked as spam
Posted by (Forum: 42, Answers: 3461)
August 12, 2019 5:39 am
0
Private answer

I did a capture from my Accelerator, values -255 to 255

-255 = CC99 Value 18, CC98 Value 0, CC6 Value 62 , CC38 Value 1

-254=CC99 Value 18, CC98 Value 0, CC6 Value 62 , CC38 Value 2

etc.

-128=CC99 Value 18, CC98 Value 0, CC6 Value 63 , CC38 Value 0

-127=CC99 Value 18, CC98 Value 0, CC6 Value 63 , CC38 Value 1

etc.

0=CC99 Value 18, CC98 Value 0, CC6 Value 64 , CC38 Value 0

1=CC99 Value 18, CC98 Value 0, CC6 Value 64 , CC38 Value 1

etc.

128=CC99 Value 18, CC98 Value 0, CC6 Value 65 , CC38 Value 0

129=CC99 Value 18, CC98 Value 0, CC6 Value 65 , CC38 Value 1

etc.

255=CC99 Value 18, CC98 Value 0, CC6 Value 65 , CC38 Value 127

Marked as spam
Posted by (Forum: 1, Answers: 3)
August 11, 2019 8:44 pm
0
Private answer

Hi Steve,

 

Thank you very much for your quick response.

MT most convert to 14bits (-255 to 255)

 

Best regards,

Cordaliss

Marked as spam
Posted by (Forum: 1, Answers: 3)
August 11, 2019 7:59 pm

The logic is the same except since is 14 bits the values are different.

If pp> 8191 then qq=pp-16382

It will show between -8192 and 8191

( at August 11, 2019 8:06 pm)
0
Private answer

Hi, the highest bit of the number is sometimes interpreted as the sign bit (a 1 indicating a negative number).  For 7 bits this could either be interpreted as 0-128 (unsigned) or -64 to +63 (for signed bit).   It is really up to the receiver of the MIDI message to determine the meaning of the value.

Many MIDI applications will recognize the value of 127 as a -1 and 126 as -2 and so forth.

So if you add the following rules, to your project, you can give it a try and see if it works with your application:

 

// Save a copy
qq=pp
// Alter it if considered negative
if pp>63 then qq=pp-128
// put it back
pp=qq

Again, it will really come down to how your application interprets negative numbers, but this is the most common way.

 

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz

 

Marked as spam
Posted by (Forum: 42, Answers: 3461)
August 11, 2019 6:51 pm