Custom interface between VST Host and VST Plugin

Dear Forum,

I’d like to hear a suggestion from you.

I have custom VST Host running a custom VST Plugin inside. And I want to have custom interface between them, but after certain amount of experiments can’t see anything better than named pipes, that is an overkill, I don’t believe it’s the best way. Since I can do anything both with host and plugin.

Plugin is separate DLL/Bundle that I load dynamically:

AudioPluginFormatManager format_manager;
PluginDescription pd;
pd.pluginFormatName = "VST";
pd.fileOrIdentifier = "MyPlugin.dll"; // or .vst
AudioPluginInstance *pPlugin = format_manager.createPluginInstance(pd, 0., 0, sError);

I need Win/Mac solution. With VSTSDK I’d probably utilize AEffect::user aka VstEffectInterface::userPointer.

Any suggestions welcome.

Thank you very much in advance,
Victor

What do you want to achieve with your custom interface?

If you control both the host and plug-in, use the VST vendorspecific mechanism.

Tom,

By request plugin has Save/Load buttons to save it’s state. I’d like host to know if state of the plugin was saved before exiting.

Could you always save the state on exit, compare it to the previously saved state, and if different then ask the user if they want to save?

So far I have found a better solution than named pipes. I export another function from dll/bundle and use it to get last plugin created. Call it after I instantiate plugin. Still not brilliant…

ujam: thank you, I’m looking if we have that in Juce…

Tom,

Thank you, it was one of the ideas I didn’t like much, but it will work good for small plugins.

If you’re in control of both the host and plugin, why use a host/plugin architecture at all? If you can just build one app with everything integrated and avoid VST altogether, you’ll save yourself an awful lot of hassle with APIs and DLLs.

…for example in ROLI’s NOISE app, the engine is Tracktion and the synths are Equator and FXpansion’s multi-synth. We could have made it run with all these things as VSTs in separate DLLs, but it was way cleaner for us to just link them both as static libs in one big executable and talk to them directly as AudioProcessor objects.

Jules,

Because there is hardware DSP, application to control hardware, VST version of effect, and Standalone application for that VST plugin. And everything is almost identical, so shares the same code.

Static link to DLL is one of the solutions, but I’d like to load it dynamically, why not? Since we have DLL already, and I have time to investigate.

Thank you everybody,
More ideas are still welcome, if you have time and will )

Well, because of problems like the one that made you come and post this question!

It’s very similar to our situation with NOISE - obviously for something like Equator it needs to be a plugin and standalone too, but statically linking just the core functionality into a DAW makes it easy to do custom integration, improves the performance, means we don’t have to deploy a DLL, avoids having to scan to find it, etc.

1 Like

Jules,

I wish those were biggest problems in my life )) And I don’t mind talking with smart gentlemen in this forum, moreover I like it )

Of course you are right that static linking is simpler and good for small plugins.

So far I acquire object pointer from dll/bundle, it’s not hard at all and works fine. Everybody who wants to do the same (at least for huge plugins it’s better) - mind that dll functions you call should be virtual and don’t delete dll side allocated stuff in host. But these are general dll related considerations…

Jules, thank you for Juce. Just using opportunity to say so )

Cheers,
Victor

1 Like