How can I use midiflush after midiformat?

mbira's icon

I am getting some stuck midi notes because I am using a 'incdec' to advance to the next MIDI note. The problem is that it advances before the note off message can get through. Can anyone recommend how I can get the midi note off message to come through in this patch? Other than the stuck midi notes, the behavior is doing exactly what I want. Thanks so much!

I tried putting a midiflush after the midiformat, but I don't think I'm doing it right because then it kills the midi stream.

Source Audio's icon

What do you mean with "advance" ?
Sending or receiving midi notes ?

Bill 2's icon

Mbira - like Source Audio, I can't tell exactly what you're asking. If you were to post at least the relevant part of your patch it'd help.

A couple of things, though... AFAIK [midiflush] does stop all notes; that's exactly what it's for. And if you're altering the pitch of a note, e.g. with [incdec]? before the note-off has arrived, you need to keep track of what the pitch was and what it was changed to. To my way of thinking [offer] is the perfect object for that. But unlike [midiflush] which is used for raw MIDI messages, [offer] would just be used for the pitch. So you'd have to pull out the pitch, use [offer] to make sure the note-off pitch is correct, then put it back in.

mbira's icon

Sorry guys-I posted a picture, and then I figured out the issue and deleted the picture and then tried to delete the post. It let me delete the picture/patch, but didn't let me delete the post.

I ended up fixing the issue by using makenote...

Bill 2's icon

All's well that ends well!