With one line of code? I'm tired of typing all this. I just want the value a to increment by one in my multipad object. Can't I specify a range for Pads.x and then tell a to find the position of the button press?
if (Pads.x[0])a=1;
if (Pads.x[1])a=2;
if (Pads.x[2])a=3;
if (Pads.x[3])a=4;
if (Pads.x[4])a=5;
if (Pads.x[5])a=6;
if (Pads.x[6])a=7;
if (Pads.x[7])a=8;
if (Pads.x[8])a=9;
Is there some slick way to do this?
Re: Is there some slick way to do this?
Hi
One way would be -
firstof(Pads.x)!=sizeof(Pads.x)?firstof(Pads.x)+1:0 //returns Pad.x +1 or ) if nothing pressed.
One way would be -
firstof(Pads.x)!=sizeof(Pads.x)?firstof(Pads.x)+1:0 //returns Pad.x +1 or ) if nothing pressed.
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]
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Re: Is there some slick way to do this?
Thank you!