Like the title says, every time I open the editor, all active voices get shut down with a noteoff.
Is this done by the host / JUCE? and… why…?
Like the title says, every time I open the editor, all active voices get shut down with a noteoff.
Is this done by the host / JUCE? and… why…?
This is not a normal behavior. The best place to start looking is your own code.
Ok thanks! I was figuring it came from the host, since the noteoff message is in the MIDI queue, which I never write to.
Anyway, I’ll investigate!
My answer isn’t definitive. Because, while anything is possible, the operation of a DAW sending a midi event in response to the editor being opened makes no sense. Which is why I suggested your code.
Put a breakpoint in MidiBuffer::addEvent/addEvents functions. You should then see if the MIDI events are really being sent from your code.
Good advice!
Ok thanks to both of you, I got it sorted!
Basically, opening the editor was only causing the “On-Screen piano keys” to lose focus and hence the NoteOff.