InputSelector: passing existing input # into an expression
Posted: Sun Jul 23, 2017 9:26 pm
I'm using an expression to take MIDI notes and use them to change the channel on my InputSelector, like so:
It all works, however where I've got else 0; I'd really like this to return whatever the current channel is before the expression runs. Is there a variable for the current channel with magic that I can pass through, and return instead? e.g....
or something to that effect?
The problem I have is that pressing any other MIDI button on my controller (ones that serve different functions elsewhere) they will be picked up by this selector and return zero every time; affecting the selector when i'd rather they didn't interfere. So if anyone knows of another way, that would be great!
D.
Code: Select all
if (roundn(x,3) == 0.236) 1; else if (roundn(x,3) == 0.252) 2; else if (roundn(x,3) == 0.268) 3; else if (roundn(x,3) == 0.283) 4; else if (roundn(x,3) == 0.299) 5; else if (roundn(x,3) == 0.315) 6; else if (roundn(x,3) == 0.331) 7; else if (roundn(x,3) == 0.346) 8; else if (roundn(x,3) == 0.362) 9; else 0;
Code: Select all
... else if (roundn(x,3) == 0.362) 9; else current_channel_value;
The problem I have is that pressing any other MIDI button on my controller (ones that serve different functions elsewhere) they will be picked up by this selector and return zero every time; affecting the selector when i'd rather they didn't interfere. So if anyone knows of another way, that would be great!
D.