Bipolar knob or multislider sending MSB/LSB
Posted: 12 Nov 2013 14:13
Hi Folks,
I have been searching around for a while and can't seem to find an answer to this.... I want to create a knob or slider that will send NRPN values from -63 to 64. I have tried everything I can think of and so far can only make it work from -63 to 0 or from 0 to 64. The messages I am sending to address the parameter are
ctlout(0,99,0,1)
ctlout(0,98,34,1)
ctlout(0,6,128,1)
ctlout(0,38,x*128,1)
I know that the parts marked in red are where the issue is but I don't know how to make it work. Can anyone please help? I am trying to make a new template for the Shruthi and want to include the modulation matrix (hence the need for NRPN).
This is what the manual says about negative numbers in NRPN
When the maximum value of the parameter exceeds 127, or when it accepts negative values, a data entry MSB will have to be sent. Negative values are represented using 2’s complement. For example, the MIDI messages to send to set the Oscillator 1 range to -12:
176 99 0 (NRPN MSB set to 0)
176 98 2 (NRPN LSB set to 2, from the table below: Oscillator 1 range)
176 6 1 (Data Entry MSB set to 1 -- value above 127 or negative)
176 38 116 (Data Entry LSB set to 116, because 116 - 128 = -12)
Thanks,
John
I have been searching around for a while and can't seem to find an answer to this.... I want to create a knob or slider that will send NRPN values from -63 to 64. I have tried everything I can think of and so far can only make it work from -63 to 0 or from 0 to 64. The messages I am sending to address the parameter are
ctlout(0,99,0,1)
ctlout(0,98,34,1)
ctlout(0,6,128,1)
ctlout(0,38,x*128,1)
I know that the parts marked in red are where the issue is but I don't know how to make it work. Can anyone please help? I am trying to make a new template for the Shruthi and want to include the modulation matrix (hence the need for NRPN).
This is what the manual says about negative numbers in NRPN
When the maximum value of the parameter exceeds 127, or when it accepts negative values, a data entry MSB will have to be sent. Negative values are represented using 2’s complement. For example, the MIDI messages to send to set the Oscillator 1 range to -12:
176 99 0 (NRPN MSB set to 0)
176 98 2 (NRPN LSB set to 2, from the table below: Oscillator 1 range)
176 6 1 (Data Entry MSB set to 1 -- value above 127 or negative)
176 38 116 (Data Entry LSB set to 116, because 116 - 128 = -12)
Thanks,
John