trying to get attribute from switch labels....
Posted: 27 Feb 2016 20:18
Hopefully someone can help me here. I'm trying to use a fader to send midi CC values. Got that working. I've got some switches with labels corresponding to the CC I want to send. I've got things working with sending my cc value to a .cc variable on my fader and then using that for the ctlout. But I'd like to simplify things. Right now my script from the switches uses if and else if lines for each switch (there are 12 of them). Is there a way to just set my fader variable by using a getattribute call to the 'labels' in the switches? something like this:
decl s;
s=firstof(x);
Fader2.cc=getattribute(Switches2,'labels',[s]);
I have a feeling I'm in the ballpark but something is wrong. Maybe it can't be done?
Thanks so much!!!!
Steve
decl s;
s=firstof(x);
Fader2.cc=getattribute(Switches2,'labels',[s]);
I have a feeling I'm in the ballpark but something is wrong. Maybe it can't be done?
Thanks so much!!!!
Steve