How to limit plugin to only one instance

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hi Guys

Anyone know if it's possible to inform a host DAW not to instantiate more than one instance of my plugin.
I can't find a way to have my plugin close it's self without leaving the host window still open.
I'm using VstSdk 2.4

Ta Kirsty

Post

kirsty roland wrote: Sat Nov 30, 2019 3:47 pm Anyone know if it's possible to inform a host DAW not to instantiate more than one instance of my plugin.
I can't find a way to have my plugin close it's self without leaving the host window still open.
I'm using VstSdk 2.4
Not really possible. The best you can do is detect that one instance is already open (eg. by using a global variable) and then instantiate dummy placeholder plugins instead (eg. simple pass-thru audio and a simple GUI that says only one instance is allowed, or something). Note that you pretty much have to return some sort of valid plugin, because some hosts will crash otherwise (eg. if you try to return null-pointer in order to indicate a failure; I think the spec might allow this, but it doesn't work in practice). If you want to play it safe, also give the dummy placeholder plugin at least one dummy parameter, because if I recall correctly, some hosts really don't like it when a plugin has none.

Post

VST3 has this feature by the way.

Post

Thanks
I'll see if I can come up with a work around to avoid the situation altogether.

Post Reply

Return to “DSP and Plugin Development”