My pitch bend range goes from -8000 up to +16000.
I can translate it to CC quite easily (using pp=pp>>7)
However is there a simple rule so the highest CC value (127) stands at the 0 point (when the pitch bend is centered) and then decrease when the pitch bend goes to the extremities ?
In some way reversing the behavior and getting the CC highest values when the pitch-bend is centered ?
Hi, usually pitch bend is -8192 to +8191 if measure as bipolar and 0 to 16383 if measured as absolute. Are you saying that you want an incoming pitch bend to be at CC value of 127 at the mid point and going towards 0 as it goes in either direction from there?
This would be a basic math exercise but before I go through the calculations I want to confirm that this is what you are looking for. In this case, how would the target device determine whether the value is going up or down?
min = 0
mid = 127
max = 0
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz
Incoming - Pitch bend on MIDI CH1 any value set to qq
Rules:
Log "Incoming value=%qq%"
qq=qq>>6
if qq>127 then tt=256-qq
else tt=qq
// Make sure it doesn't go out of bounds
if tt<0 then tt=0
if tt>127 then tt=127
Log "Outgoing value=%tt%"
Outgoing - CC7 on MIDI CH1 value tt
I currently have no way to test this because I’m working on my Chromebook.
Hopefully I got it right
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz
Just wondering if you find some time to sleep every now and then
Checked it.
It doesn’t really work : values in the down position are null, values only start to increment from the center point (value :0) up to the end of the fader upwards (value :127)
Tried to modify it with my limited knowledge, the only snippet that come close would be that one :
Log ‘Incoming value=%qq%’
qq=qq>>-127
if qq>127 then tt=256-qq
else tt=qq
// Make sure it doesn’t go out of bounds
if tt<0 then tt=0
if tt>127 then tt=127
Log ‘Outgoing value=%tt%’
Of course I did certainly wrong, and it might well be pure casualty playing with values, as the curve is pretty steep, starting very close to the center point (on my 100mm fader, it starts to increment 5mm before the center point, and completely fades out 5mm after the center point). Can I improve it ?
For the most part the rules were right. Please find the attached.
I also created a timer so that you can push a button and the timer would iteration across the entire range Pitchbend timer (translators 1.2) is triggered y by translator 1.1 and goes through the entire range.
If you filter your log window by ‘IN=’, then you can see the incoming and outgoing values.
Hi Steve, it seems to work quite well, thanks again .
However how can we reverse the behavior ?
How can we get the 127 values at both extremities, null at center ?
Kind regards