Vector Issue

Discuss problems and solutions.
Post Reply
MrCorba
Regular
Posts: 142
Joined: 02 Sep 2013 20:17
Location: Netherlands

Vector Issue

Post by MrCorba »

Hello Wise Masters of the Liine Forum,

I've got a small problem and I can't discover why this isn't working. I've got 16 faders called Vel1, Vel2 etc. I want one button that sets all these faders to zero. I tried to use the code below but for some reason it won't work.
I've tried the set expression on just 1 fader, as in setexpression(Vel1,'x',0), then it seems to work. Does anyone see the error in my code? Cheers

Code: Select all

decl vel={Vel1,Vel2,Vel3,Vel4,Vel5,Vel6,Vel7,Vel8,Vel9,Vel10,Vel11,Vel12,Vel13,Vel14,Vel15,Vel16};
decl i;
for(i=0; i<16; i++);
{
setexpression(vel[i],'x',0);
}
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Vector Issue

Post by Macciza »

Hi
With string functions you can now do something like this

Code: Select all

decl i;
for (i=1; i <= 16; i++) {
decl obj = findobject('Vel' + i); 
setexpression(obj, 'x', 0);
}
No vectors needed, just use 'objName'+ i ...
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
MrCorba
Regular
Posts: 142
Joined: 02 Sep 2013 20:17
Location: Netherlands

Re: Vector Issue

Post by MrCorba »

Nice! Thanks man!
"Having no silence in music is like having no black or white in a painting" - Brian Eno
https://soundcloud.com/mrcorba
Post Reply