So I found a problem if you host VST3 plug-ins and the MIDI includes an AllNotesOff event… some Waves plug-ins are moving their knobs to infinity (but audio isn’t affected).
in the VST3 wrapper in toEventList() I add at line 525:
if (msg.isAllNotesOff())
continue;
Then this is fine… but if I remove it and step through the code to
midiMapping->getMidiControllerAssignment()
in:
MidiMessage msg (midiEventData, midiEventSize);
if (midiMapping != nullptr && parameterChanges != nullptr)
{
Vst3MidiControlEvent controlEvent;
if (toVst3ControlEvent (msg, controlEvent))
{
Steinberg::Vst::ParamID controlParamID;
// if (msg.isAllNotesOff())
// continue; <<---- This works if uncommented
if (midiMapping->getMidiControllerAssignment (0, createSafeChannel (msg.getChannel()),
controlEvent.controllerNumber,
controlParamID) == Steinberg::kResultOk)
{
// This never gets stepped into
Steinberg::int32 ignore;
if (auto* queue = parameterChanges->addParameterData (controlParamID, ignore))
queue->addPoint (midiEventPosition, controlEvent.paramValue, ignore);
}
continue;
}
}
getMidiControllerAssignment() can’t be stepped into and seems to be messing up… 'cause it should call:
tresult PLUGIN_API getMidiControllerAssignment (Steinberg::int32 /*busIndex*/, Steinberg::int16 channel,
Vst::CtrlNumber midiControllerNumber, Vst::ParamID& resultID) override
{
resultID = midiControllerToParameter[channel][midiControllerNumber];
return kResultTrue; // Returning false makes some hosts stop asking for further MIDI Controller Assignments
}
but if I put a breakpoint in there it’s never hit… and when the msg is AllNotesOff it doesn’t return Steinberg::kResultOk and hits the continue!! Which should behave the same as my commented out code.
Thoughts?
I chatted with a Waves developer on the JUCE discord channel and he thinks that in the AudioProcessorGraph if the node’s processor doesn’t accept MIDI it shouldn’t be passed the MidiBuffer… but I’m not sure if that’s the cause of this issue.
To duplicate the issue… use the JuceDemoPlugin and feed the stereo audio out into a Waves CLA-76… and feed the JuceDemoPlugin with some MIDI which includes an AllNotesOffEvent.
EDIT: You can actually duplicate the issue without making any audio connections.
Thanks,
Rail