Multiple VSTs, one engine

Hi together!

I’d like to have multiple instances of a VST plugin (reacting to only note or osc information, no audio), but I’d need one engine to collect their results and do the final calculation (send udp datagrams).

Is there a way to find out if there’s another instance running to get an engine object from, or in the other case, instantiate one engine object and head it to incoming plugin instances?

“anotherInstanceStarted” only gives me the new instances commandline so I can’t really gain information there, do I?

I am new to VST plugin development, so hopefully someone can point me to the right direction if I completely got this VST tech wrong…?

Thanks in advance!

Hello!

Are you trying to pass information between an App & your plugins? In that case they will be in separate processes. Check out the InterProcessConnection & related classes to get ideas of how you can pass data around. You could use shared memory as well.

You can communicate between plugin instances using globally scoped data, although beware of accessing data safely, since there will be lots of different threads in play. This also breaks when plug-ins are run out of process (e.g. when reaper “bridges” a plugin). A nice option is to run a Websocket server in your main “hub” app and your plug-ins are clients. Either run a server in a separate app, or create a singleton server instance from a plug-in. If multiple kinds of plugin need to share the server, create it in a dynamic library which each plug-in loads, although I think that would also break with plug-ins that get run out of process.

1 Like

Hey thanks for your great answers!
I had the fear a socketed client/server structure would be the answer but it seems interprocessconnection is a wrapper for the same approach, with some problems already solved (hopefully) :slight_smile:

Now I have to find out the difference between Pipes and Sockets…
Sounds like a pipe is 1:1, as it is, well, a pipe, and a socket structure supports a higher number of participants, hence the need of a server?

So creating a server if none is found might be a solution!
Will check next week, thanks very much for now!
Have a nice weekend!

1 Like