midiflush and vst~

ASW's icon

As the title stated I’m having trouble using a midiflush object with vst~. The included example is what I’ve cobbled together from the vst object help patch, but I don’t know where midifush would go here. Am i going about this wrong? Should I be using noteout to control a vst instrument and if so, how?

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

Thanks for the help..

ASW's icon

I meant makenote, not noteout...sorry.

broc's icon

I think [zl group 4] in your example is wrong and should be replaced by [zl group 3].

Btw, makenote ensures sending note-off messages, so why using midiflush?

roger.carruthers's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here's how I would do it.
If you want to send notes to different channels on your vst, a midievent starting with 144 is a note on on channel 1, 145 is a note on on channel 2 etc.
You can send an 'All notes off' message to VST itself to clear stuck notes (I'm pretty sure you can still get them using makenote!),
Cheers
Roger

ASW's icon

Thanks to both of you! Looks like Rogers solution will work.