Filtering CC messages
I’m sure this is a pretty trivial problem but I can’t figure out how to filter for certain CC messages. So MIDI comes in and midiparse gives me just the CC’s like:
– now I need to make a filter to allow e.g. only CC 20 through – and then give me the value for CC 20.
I’ll bet this is dead simple but I’m just going in circles with ‘sel’ and ‘gate’ right now! Any tips appreciated!
with [select] you are on the right path. but you can also use [route].
[route 20] will filter lists according to their indexes correctly but it cuts the first value in incoming lists off, so that you had to regenerate it.
you basically only need to do
and you have a working filter.
note that both, [route] and [prepend] can be "set" dynamically when they only have 1 argument.
if you want the same for general purpose you have to make sure that "20" can also pass when it comes as single number and not as list. this can be done like in the picture. (which here only takes arguments and is not dynamic.)
Brilliant, thanks so much guys!
You could use routepass and you wouldn’t have to muck around with prepend.
Thanks Evan – I think in this case Route suits the purpose best as once I’ve filtered for controller, all I need is the value :D
Oh for sure, I was just pointing out the alternate routing object, I just found that one recently and it helped eliminate a ton of extraneous prepending :)
one could also do 5*4 and use zl join to prepend it. :)
Thanks again, all!