Newbie MIDI conditional routing question

mbira's icon

Hi folks,
I have a midievent Message coming out of a midiparse. I would like to set up an 'if' statement that if the midi note number is >63 then it will go into a ~vst synth. i have tried to use an 'if' object: if $i1> 63 then out2 and then I used a gate to try and turn on an off the passing of the message, but the midi message is not coming out of the 'if' statement.

How can I set up a conditional to pass a midi message? I'm attaching a picture of what I have tried. Any help is appreciated. Thanks!

Screen-Shot-2017-02-21-at-9.16.20-PM.png
png
Christopher Dobrian's icon

In the if object, you need to say what you want to come out of the "out2" outlet, as in [if $i1 > 63 then out2 $i1], or, since you're not using the left outlet for anything, you could simply say [if $i1 > 63 then $i1]. However, since all you're doing in your patch is using the true/false result of a comparison to open or close a gate, you could simply use [> 63]. Another option is to use the split object, as in [split 64 127].

Max Patch
Copy patch and select New From Clipboard in Max.

mbira's icon

Thanks so much! That worked great (and thanks for teaching me about 'split'-that works better for my eventual needs anyway).