Maybe it's just me, but couldn't find any information if there is a way to determine in script which Switch was changed on a Switches object's OnExpression callback?
I have 16 Switches in a matrix and I can make a separate OnExpression callback for each like:
OnExpression (x is changing) >> noteout(0,x*16 + 0,127,1);
OnExpression (x is changing) >> noteout(0,x*16 + 1,127,1);
OnExpression (x is changing) >> noteout(0,x*16 + 15,127,1);
But all the scripts are doing the same calculation based on the number which switch was changed. So basically this should be one script if I would be able to have a callback where I get a variable that tells me what Switch was changed.
Just for the simplicity I would like to send out different midi noteOn messages for every switch's both states as you can see on the example above.
Thanks for all your suggestions in advance,
This question has received the maximum number of answers.