I can't get this working. I'm try to set the CC values for a pad array using ctlout
i've tried this, but no luck.
ctlout(1,{16, 17, 18, 19, 20, 21, 22, 23, 24, 25},127,1);
Basically on certain conditions i want the array to send out different values, unfortunately it's stuck sending out the first value.
I could use a custom midi script, but i do not know how to switch between different custom scipts
ctlout syntax for pad array?
-
- Regular
- Posts: 153
- Joined: 31 Dec 2011 17:12
Re: ctlout syntax for pad array?
Is there a more efficient way than this?
if(x[0])
ctlout(1,16,127,1);
if(x[1])
ctlout(1,17,127,1);
if(x[2])
ctlout(1,18,127,1);
if(x[3])
ctlout(1,19,127,1);
if(x[4])
ctlout(1,20,127,1);
if(x[5])
ctlout(1,21,127,1);
if(x[6])
ctlout(1,22,127,1);
if(x[7])
ctlout(1,23,127,1);
if(x[8])
ctlout(1,24,127,1);
if(x[9])
ctlout(1,25,127,1);
if(x[0])
ctlout(1,16,127,1);
if(x[1])
ctlout(1,17,127,1);
if(x[2])
ctlout(1,18,127,1);
if(x[3])
ctlout(1,19,127,1);
if(x[4])
ctlout(1,20,127,1);
if(x[5])
ctlout(1,21,127,1);
if(x[6])
ctlout(1,22,127,1);
if(x[7])
ctlout(1,23,127,1);
if(x[8])
ctlout(1,24,127,1);
if(x[9])
ctlout(1,25,127,1);
Re: ctlout syntax for pad array?
as soon you have a mathematical 'row' (don't know the exact term in English, numbers that follow a simple rule like +1), you can use ++ (increment) and -- (decrement). Should be something like this:
I haven't tested it, tell me if it works.
Code: Select all
decl i;
for (i=0; i<9; i++);
if(x[i])
ctlout(1,i+16,127,1);
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
-
- Regular
- Posts: 153
- Joined: 31 Dec 2011 17:12
Re: ctlout syntax for pad array?
Thanks for the reply Phil.
I gave that solution a try, unfortunately it only outputs on ch 25 across all the switches
I gave that solution a try, unfortunately it only outputs on ch 25 across all the switches
Re: ctlout syntax for pad array?
there was an error, it should be
but maybe you'll need two variables.
I got this from a user library template, I actually never used incremental arithmetic operators myself. Unfortunately I only noted that syntax, not the name of the template. But I think it's close to the solution.
Edit: hmm, thinking about it, there must be a firstof() function in the script, like in the Ambivalent Beats template. The Lemurised L3 template from the AB Bundle could also give a hint, but my editor crashes everytime I try to load it.
Code: Select all
decl i;
for (i=0; i<=9; i++);
if(x[i])
ctlout(1,i+16,127,1);
I got this from a user library template, I actually never used incremental arithmetic operators myself. Unfortunately I only noted that syntax, not the name of the template. But I think it's close to the solution.
Edit: hmm, thinking about it, there must be a firstof() function in the script, like in the Ambivalent Beats template. The Lemurised L3 template from the AB Bundle could also give a hint, but my editor crashes everytime I try to load it.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
-
- Regular
- Posts: 153
- Joined: 31 Dec 2011 17:12
Re: ctlout syntax for pad array?
That ended-up out putting on 26 only.
I've experimented with firstof, but really guess work to be honest. Maybe the ctlout function is limited in that respect?
I thought Ambient Beats was mostly Max 4 Live back-end stuff? I'll have a look anyway, I've been trawling the library for ctlout examples
cheers Phil.
JD
I've experimented with firstof, but really guess work to be honest. Maybe the ctlout function is limited in that respect?
I thought Ambient Beats was mostly Max 4 Live back-end stuff? I'll have a look anyway, I've been trawling the library for ctlout examples
cheers Phil.
JD