Another method for outputting MIDI CC messages from a VST3 (without LegacyMIDICCOutEvent)

As @stephenk has detailed here, juce_VST3Common.h can be modified to output MIDI CC messages to the plugin’s host as kLegacyMIDICCOutEvents. Unfortunately, not all hosts have added support for this type of event (I know that Juce’s current AudioPluginHost and Reaper as of version 6.04 have added it, but I don’t know if any other hosts have).

I recently came up with another method for outputting CC messages by declaring them as kDataEvents. In juce_Vst3Common.h, inside toEventList() at line 574, I added the following code:

`    // Begin custom code for adding controller events as kDataEvents`
        else if (msg.isController())
            e.type = Steinberg::Vst::Event::kDataEvent;
   = midiEventData;
   = msg.getRawDataSize();
   = Steinberg::Vst::DataEvent::kMidiSysEx;
        //End custom code for adding controller events as kDataEvents

This hands off the 3-byte CC message to the host and I think it will be recognized whether or not support for LegacyMIDICCOutEvent exists. Notice that the event is marked as kMidiSysEx, the only type of DataEvent defined in the VST3 SDK. I’m sure Steinberg would complain that doing this violates their terms of service or something, so I don’t recommend you actually use this code. I simply leave it here for informational purposes :wink:

Juce just announced today that Version 6.0 will include “Better handling of VST3 MIDI CC messages.” I’m betting that just means they’re finally going to add official code for using LegacyMIDICCOutEvent, but maybe it will go beyond that and make this post irrelevant. I hope so! :slightly_smiling_face:

1 Like

Interesting. :face_with_monocle: Looking forward to see what JUCE 6 contains.