[BUG] Juce 5.4.7 AudioPluginHost: MIDI VST3's have incorrectly echoed input notes

Now that JUCE AudioPluginHost has a MIDI Output, it’s worth pointing out that a bug still exists in the VST3 handling code, as discussed here:

When you make a MIDI Processing Plugin, with VST2 the input notes are not automatically added to the output; when you make a VST3, they are (wrong).

In other words, with the ArpeggiatorDemo, you play input notes and it takes them and arpeggiates them to the output. In a VST2, that’s all you get at the output (correct). With a VST3, you get the input notes at the output added on top of the arpeggiated notes.

Putting in the following line and recompiling the AudioPluginHost fixes the issue:

in juce_VST3PluginFormat.cpp:

    template <typename FloatType>
    void processAudio (AudioBuffer<FloatType>& buffer, MidiBuffer& midiMessages,
                       Vst::SymbolicSampleSizes sampleSize, bool isProcessBlockBypassedCall)
    {
// …
    processor->process (data);
// ...
    midiMessages.clear(); // <== **REQUIRED TO ADD THIS**
    MidiEventList::toMidiBuffer (midiMessages, *midiOutputs);
// …
}

JUCE team: if you need an example for this, let me know.

Thanks for the bug report, the issue is fixed on the juce6 branch:

Uh… does that mean there won’t be any bugfixes on the Juce 5 branches anymore? Cherry-picking from the Juce6 branch seems problematic without having a juce6 license.

1 Like

I’ll be cherry-picking this one into JUCE 5. Other bugfixes will happen on a case-by-case basis.

2 Likes

Thank you. I understand it makes no sense for more complex fixes that might not be possible to just merge, but as long as we can’t buy Juce 6 and it is in beta, it would be great to get those small fixes.