|
Post by hansson0728 on May 15, 2019 8:23:49 GMT
I am trying to control 2 filters with one knob making a dual filter
Something like
CC 1, 0-64 = CC 2, 0-127 CC 1,64-127 = CC 3, 0-127
Ive got this but i wont work as expected Also i want to do it with 10 knobs so iam thinking input would be be Cc 1-10 and outputs in the range 20-40 or something
IF M0 == B0 1 IF M2 >= 0 IF M2 <= 41 MAT M2 = M2 * 2 Snd M0 M1 M2 END END END
IF M0 == B0 1 IF M2 >= 41 IF M2 <= 7F Mat M2 = M2 - 41 MAT M2 = M2 * 2 Mat M1 = M1 + 1 Snd M0 M1 M2 END END END
XX = XX +B
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on May 15, 2019 12:52:27 GMT
Hi hansson0728 , So this might work (dual converts CC's 0 to 9 to 10/20, 11/21, 12/22 ... 19/29) : IF M0 == B0 IF M1 < 0A # CC 0 to 9 IF M2 <= 40 MAT I1 = M1 + 0A # add 10 to CC num MAT I2 = M2 * 2 SND M0 I1 I2 END
IF M2 > 40 MAT I1 = M1 + 14 # add 20 to CC num MAT I2 = M2 - 41 MAT I2 = M2 * 2 SND M0 I1 I2 END XX = XX +B END END
The main thing I did was not to alter the M array since it is used in subsequent conditionals. I re-arranged the code a little too. NB - untested - may not even compile. It's the method that counts. :-) Regards, Nic.
|
|
|
Post by hansson0728 on May 15, 2019 18:32:55 GMT
Works almost like a charm had to change two lines though
IF M0 == B0 IF M1 < 0A # CC 0 to 9 IF M2 <= 40 MAT I1 = M1 + 0A MAT I2 = M2 * 2 SND M0 I1 I2 END IF M2 > 40 MAT I1 = M1 + 14 MAT I2 = M2 - 40 MAT I2 = I2 * 2 SND M0 I1 I2 END XX = XX +B END END
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on May 16, 2019 6:16:38 GMT
Uggh, I do that *all the time* (use ASS instead of MAT or vice versa) :-) (corrected my code above)
|
|