How to enable a VST3 plug-in only for a specific host

Is there any way for a VST3 plug-in to be loaded into only a specific DAW/host?

I tried the following solution but the plug-in crashes. A null AudioProcessor is not handled by the wrappers:
PluginProcessor.cpp

// This creates new instances of the plugin..
AudioProcessor* JUCE_CALLTYPE createPluginFilter()
{
    PluginHostType hostType;
    
    if ( hostType.is[myHostOfChoice]() )
        return new MyPluginProcessor();
    else
        return nullptr;
}
1 Like

No. There’s currently no API from Steinberg or an extension like that but that’s a good idea.

1 Like

Instead of returning a nullptr, could you simply return a dummy processor. The dummy processor’s editor could show a message saying “not supported in this DAW”?

2 Likes

Or allow constructing the original audio processor, but just skip initializing the parameters and the GUI, as well as bypass the audio processing.

Another idea, return a version of your processor, that returns false for any channel layout. A clever host would never offer that processor for selection, since it doesn’t fit on any track.

bool isBusesLayoutSupported (const BusesLayout& layouts)
{
    if ( hostType.is[myHostOfChoice]() == false)
        return false;

    // ...
3 Likes

that returns false for any channel layout

that’s an interesting approach. I’ll try that and report back.

I tried that but unfortunately it doesn’t block the plug-in to be loaded in any host. I doesn’t even block the processing.

Thanks for sharing your idea though!

1 Like

Thanks for trying. Well, I didn’t expect it to block from loading, since it needs to load to do the negotiation, and eventually realising, that no channel format will fit.

I know from ProTools, that on a stereo track it only shows plugins for selection, that would allow a stereo in. So I was hoping you could generalise that behaviour, knowing, that there will always at least one host, that doesn’t play along that idea…

RISK ALERT, but, what if you make the plug-in deliberately crash on the unsupported hosts? The majority of DAWs nowadays does the scanning in a separate process to prevent a crashing plug-in from crashing the entire host, so… if the plug-in crashes in all the hosts apart from the one where you want it, it will only be successfully scanned and shown in those you desire.