Ah, okay. For simplicity's sake, the original post is
located here.
So the code Florian provided in the initial post was
Code: Select all
Translator 0: digit 0
Options: stop=false
Incoming: Keystroke: Num 0
Rules:
g2=g1
g1=g0
g0=0
gc=gc+1
Outgoing: (none)
Translator 1: digit 1
Options: stop=false
Incoming: Keystroke: Num 1
Rules:
g2=g1
g1=g0
g0=1
gc=gc+1
Outgoing: (none)
[.......]
Translator 9: digit 9
Options: stop=false
Incoming: Keystroke: Num 9
Rules:
g2=g1
g1=g0
g0=9
gc=gc+1
Outgoing: (none)
Translator 10: ENTER
Options: stop=false
Incoming: Keystroke: Num Enter
Rules:
pp=g0
qq=gc
gc=0
if qq==0 then exit rules, skip Outgoing Action
g1=g1*10
g2=g2*100
if qq>1 then pp=pp+g1
if qq>2 then pp=pp+g2
Label "number too large, assume 2-digit number"
if pp>127 then pp=pp-g2
Outgoing: MIDI C0 pp
And what we want to do is have it raise from C0 to C1 and then continue up. We can need to augment the code slightly to add in a variable for C0. Everything Florian provided should work but we need to alter the Enter command. We are only going to focus on the rules for now. We need to change the C0 to a local variable that can be updated. We'll use rr for it. The decimal command for C0 is 192, so by default that's what C0 will equal. After the Label, though, we are going to start changing the code.
Code: Select all
pp=g0
qq=gc
gc=0
if qq==0 then exit rules, skip Outgoing Action
g1=g1*10
g2=g2*100
if qq>1 then pp=pp+g1
if qq>2 then pp=pp+g2
if pp<=127 then Goto "Bank 1"
if pp>127 then Goto "Bank 2"
Label "Bank 1"
rr=192
Exit rules, execute outgoing action
Label "Bank 2"
rr=193
pp=pp-127
Exit rules, execute outgoing action
Outgoing: MIDI rr pp
Let me know if that works.