Multiple sidechained plugin


#1

Hi :slight_smile:
I am trying to make a plugin where i need to be able to route any audio channel of the host to the plugin and make it a sidechain.

I was wondering if it is possible to make a dynamic collection of sidechain (number of sidechain not static)
What is the best way to do this ?

Thanks


#2

This seems to be a thing that would be implemented on the host’s side. (The plugin would just have additional inputs and the host will allow routing different tracks into that input etc.) If your host of choice doesn’t allow that, you are pretty much out of luck. Plugin formats don’t really have facilities to query and manipulate the host’s tracks and routings between them.


#3

Okay
The host i use (ableton live) allows one input per audio channel (audio is being mixed together if you route several to the same channel). And i believe it is the same for most hosts.

So that’s not a solution :confused:

What i could do is create a “sender” plugin that takes audio of one channel and sends it to my plugin. How does that sound ?
Does anyone have any ressource or links to do this ?


#4

That unfortunately sounds very complicated and error prone. (For example because of multithreading issues.)


#5

The only thing i found is this thread : routing audio to vst with multiple inputs
But it’s 10 years old so maybe i can get fresher advices


#6

Have you looked at the NoiseGate example in JUCE/examples/PluginSamples/NoiseGate?


#7

I think he wants something much more complicated than just a plugin with a single sidechain input…(Trying to workaround issues in the host with its routing/sidechain implementation.)


#8

Sounds like you’re trying to make a mixer plugin, inside your daw’s mixer.


#9

Let’s say that i go for the solution of the link above : I take advantage of the fact that several instances of the same plugin share the same adress space. I use static variables to store the signals buffers, so loading my plugin on a track is how my routing is made.

What are the multithreading issues i can encounter ? What precautions shall i take ?

Thanks


#10

Things have changed over the last 10 years - you can no longer assume that all your plug-ins will share the same address space.


#11

Darn
What do i do then ?
Create a “sender” plugin that sends signals over local network and receive it on the main plugin side ?

Is there a cleaner solution ?


#12

Not what you want to hear but…Develop your own DAW application that allows the kinds of routings you wish to have.


#13

Haha not what i wanted to hear indeed :stuck_out_tongue:

That’s not an option… i want to make a plugin that can run on any DAW


#14

You’re going to have a hard time then. Your two instances could be running in different sandboxes, or even if they’re in the same process, there’s no guarantee that during each process block their callback methods will happen in the same order.

e.g. in many hosts (certainly in Tracktion this is true) there’ll be a thread pool / work queue where parallel CPU cores pull the next item to process. So the order in which two plugins get their process callbacks executed is definitely not something you can rely on to stay constant. So it’s not possible to just pass a block from one instance to the next each time, you’d need to build in fifos and other nastiness to stream the audio, adding latency.


#15

Kontakt uses a “Kontakt Memory Server” app if you don’t want to load the samples into a plugin instance. Maybe have a look at how that whole system works. it’s a separate application entirely from the DAW that loads samples into RAM and holds them there, even if you quit the DAW/remove the plugin. So, somehow they are able to get every instance of Kontakt to talk to this one Memory Server which provides the samples to the Kontakt Plugins that are running in your DAW:

My point is that there is way to pass messages from DAW plugins to applications outside the DAW, and then for those applications to send messages (sample data in this case) to those Plugins.