Hi and welcome to the Bome community!
It looks pretty well organized. Good job!
By acceleration I assume you mean encoders only. Right now the translators send only notes with velocity of 127? Do you want other values depending on the current input velocity? Would different velocities for the notes be what you want?
In the below example I modified translation 1.30 with rules as follows. Velocities will range with a mid point on 64 (0x40). Right turn will give 0x40 0x42 0x43 etc and left turn 0x3f 0x3e 0x3c etc.
The rules are fairly simple:
if pp>0x40 then qq=0x80-pp
if pp<0x40 then qq=pp+0x40
Log "Log qq=%qq%"
As far as streamlining, there may be opportunity but I don’t see anything off hand since you have so many combinations of modifiers for each. You could probably reduce the number of translators by adding rules so that a single translator can handle various modifier combinations. This might reduce readability, however but if you make changes, there would be less translators to change.
You could also bit map the modifiers into a single global variable and use the lowest bits of the variables to determine which modifiers are in use. For instance if bit 0 is shift, bit 1 is option, bit 2 is command and bit 3 is alt. Lets put into g0
if g0==0 then goto "none"
if g0==1 then goto "shift"
if g0==2 then goto "option"
if g0==3 then goto "shift+option"
if g0==4 then goto "command"
if g0==5 then goto "shift+command'
// and so forth
And then use labels to handle the outgoing note number
Label "none"
// set outgoing note in tt
tt=24
goto done
Label "shift"
tt=25
goto "done"
// and so forth
Label "done"
if pp>0x40 then qq=0x80-pp
if pp<0x40 then qq=pp+0x40
Log "Log qq=%qq%"
Then on output, send the desired note (tt) at the current velocity (qq)
Or instead of labels, since it is a simple one rule assignment you could
if g0 == 0 then tt=24
if g0 ==1 then tt=25
// and so forth
Then use tt for your outgoing note
For bit mapping you would do something like this for shift
For shift down
pp=1<<0
g0=g0|pp
For shift up
For shift up
pp=1<<0
// Ones compliment
pp=pp^-1
g0=g0&pp
For Option down
pp=1<<1
g0=g0|pp
For Option up
pp=1<<1
pp=pp^-1
g0=g0&pp
etc
xtm no csi 12.11.22-kbd buttons-sjc.bmtp (205.2 KB)
Steve Caldwell
Bome Customer Care
Also available for paid consulting services: bome@sniz.biz