ctlout syntax for pad array?

Discuss Lemur and share techniques.
Post Reply
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

ctlout syntax for pad array?

Post by whatisvalis »

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
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

Re: ctlout syntax for pad array?

Post by whatisvalis »

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);
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: ctlout syntax for pad array?

Post by Phil999 »

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:

Code: Select all

decl i;
for (i=0; i<9; i++);

if(x[i])
ctlout(1,i+16,127,1);
I haven't tested it, tell me if it works.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

Re: ctlout syntax for pad array?

Post by whatisvalis »

Thanks for the reply Phil.

I gave that solution a try, unfortunately it only outputs on ch 25 across all the switches
Phil999
Regular
Posts: 919
Joined: 11 Jan 2012 01:53

Re: ctlout syntax for pad array?

Post by Phil999 »

there was an error, it should be

Code: Select all

decl i;
for (i=0; i<=9; i++);

if(x[i])
ctlout(1,i+16,127,1);
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.
Formant+Eurorack, PPG wave 2.2, Korg MS-20, etc., EWI 4000s, QuNeo, etc., Mixbus32c, u-he, MadronaLabs, Samplemodeling, NI, etc., iPad2/4/Pro
whatisvalis
Regular
Posts: 153
Joined: 31 Dec 2011 17:12

Re: ctlout syntax for pad array?

Post by whatisvalis »

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
Post Reply