|
Post by lukesleepwalker on Jun 25, 2020 16:35:13 GMT
I want to do a conditional statement for two inputs:
The first input is simply playing note C1.
The second input is CC16 and there are three ranges of values: 0-50, 50-90, 90-127
If CC16 is in the first range, the C1 note passes through. If CC16 is in the second range, note C1 is mapped to C2. If CC16 is in the third range, note C1 is mapped to C3.
Thanks for taking a look!
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jun 25, 2020 17:26:52 GMT
Hi lukesleepwalker , Something like this: if load assign K0 = B0 $16 # CC to look for assign L0 = 0 # CC 16 state end # handle C1 note on if MT == 90 if M1 == ^C1 if L0 > $50 assign M1 = ^C2 end if L0 > $90 assign M1 = ^C3 end # remember the mapping ass L1 = M1 end end if MT == 80 if M1 == ^C1 # note off to match what was mapped ass M1 = L1 end end # handle CC, set state according to range if MT == K0 K1 assign L0 = M2 end
Not tested - may not compile or work! Regards, Nic.
|
|
|
Post by lukesleepwalker on Jun 25, 2020 18:40:20 GMT
Didn't quite work, but I was able to diagnose, tweak, and it works great now. Thanks, as always, for the swift assistance, Nic!
|
|
nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jun 25, 2020 18:51:30 GMT
Don’t leave us in suspense - post up the correct version!
|
|