Select Bank Messages over 127

Wurlitzer

2013-11-11 15:52:26

Hi,
thank you for this solution.
It is possibe to setting up bank-select messages for values over 127 (128)?
128=128
129=Bank-Select (Bank 1) + #001
130=Bank-Select (Bank 1) + #002
131=Bank-Select (Bank 1) + #003
132=Bank-Select (Bank 1) + #004
....

DvlsAdvct

2013-11-11 17:00:22

Hi Wurlitzer

It is totally doable. You can enter in the message C0 80 for 128, and add up from there.

Wurlitzer

2013-11-12 10:10:12

Hi Thank you,
but, how it works, what i've todo?
Sorry, but i did not make any preset by myself before... :(

DvlsAdvct

2013-11-12 18:27:25

I'm going to split this off into a new topic just for the forum's sake.

What are you using as input messages? And how do you want the program select to work? Are you using one button and just want to cycle up, or are you using one button for each program select?

Wurlitzer

2013-11-12 20:17:28

Hi,
I'm using an external Logitech N305 Numpad....
for 1-128 = Bank0 + Midi Program Number 0-127
for 129-xxxx = Bank1 + Midi Program number 1
for 130-xxxx = Bank1 + Midi Program number 2
and so on....

DvlsAdvct

2013-11-12 21:38:45

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.

Wurlitzer

2013-11-12 22:00:27

THX :-)
I'll try in next day and post my results it here.
:D