|
Post by klay2000 on Oct 20, 2020 13:09:48 GMT
Hi
Is there any way to cycle through several program changes by repeating one cc message on the input?
For example cc33 will cycle through pc 1 to 5
Thanks in advance
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Nov 1, 2020 9:52:15 GMT
Hi klay2000 , Yes, this is possible using code like this: # setup if load # K0/1 is first and last PC ass K0 = 01 05
# L0 is current value, defaulted to 1st ass L0 = K0 # labels set LB0 SPC set LB1 S-- end
# trap CC 33 (NB on or off) if MT == B0 if M1 == $33 # issue PC and set label calc I0 = C0 + MC send I0 L0 set LB1 L0 +D
# cycle PC number calc L0 = L0 + 1 if L0 > K1 ass L0 = K0 end
# block the CC if required block end endRegards, Nic.
|
|
|
Post by klay2000 on Nov 28, 2020 14:49:50 GMT
Hi Nic
What does SPC AND S- - in labels for?
And why is it K0/1 in the first part? What is the /1 representing?
Thanks
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Nov 30, 2020 15:54:43 GMT
set LB0 SPC = set the left hand label with the literal string 'PC'
set LB1 S-- = set the left hand label with the literal string '--'
# K0/1 is first and last PC ass K0 = 01 05
The first line is just a comment (anything after a '#' is not processed as a rule) and it means that K0 is going to contain the first PC on the cycle and K1 is going to contain the last PC in the cycle.
The second rule assigns PC 01 to variable K0 and PC 05 to variable K1 in one go.
Regards, Nic.
|
|