How to get VST3 Class-ID (aka CID, aka Component-ID)

I am working on an app that hosts and configures VSTs, and I’m looking into exporting session from my software to other DAW formats.

I need to access the VST3 ClassID (The GUID that uniquely identifies a VST type)

If my understanding is correct, Class IDs are 128 bits or 16 bytes long.
juce::PluginDescription::uid is an int, so it cannot (and does not) store the full ClassID for VST3 plugins.

Is there a way to get extract the VST3 ClassID from either a juce::PluginDescription or a Steinberg::Vst::IComponent?

Many thanks for any pointers!

Edit: It looks like in order to do this for kDistributed (aka “Split”) VST3 plugins I need to get a pointer to the Vst::IEditController for a given plugin. ExternalPlugin::getPlatformSpecificData only grants access to the Vst::IComponent. Is it not possible to access the Vst::IEditController?

It’s certainly possible although I suspect you’re going to go through a lot of hair pulling working out the VST3 SDK includes into your project!

Assuming that’s no barrier, you can use the COM functions to get the IEditController. The VST3 hosting code does this in VST3ComponentHolder::fetchController() if you need an example.

From what I understand - if you’re after the FUID, I’m pretty sure you need to get the PClassInfo from the IPluginFactory. I don’t see a way of fetching the factory from the IComponent itself…

I don’t mind using the VST3 SDK, but AFAICT, JUCE’s interface hides all access to the underlying VST3 components, and it’s not possible to access anything other than the Vst::IComponent, which can be retrieved with getPlatformSpecificData(). On some plugins, the IComponent is the IEditController, but Steinberg discourages plugin developers from writing their plugins this way.

I would love to be wrong about this, but it looks to me like there is no way to access a VST3 plugin’s ClassID OR IEditController without modifying the underlying JUCE code. Please let me know if this is incorrect!

The VST3PluginInstance class is declared in a .cpp file and has no .h file, so none of its methods are available. This is also the case for VST3ComponentHolder.

JUCE hashes the 128 bit VST3 ClassIDs, and only stores the 32 bit hash in the PluginDescription.

For my purposes, I could probably extract what I need from a .vstpreset file, however it doesn’t look like it is possible to save a .vstpreset with JUCE. VST3PluginFormat has a the setStateFromVSTPresetFile helper for reading .vstpreset data, but no helper for writing .vstpreset data.

.vstpreset files include the Vst::IEditController state, so its also not possible to actually create a .vstpreset without access to the plugin’s VST::IEditController.