Stream audio data between different plugins


#1

There are a few older threads about this topic and i hope juce now has helpful classes to solve the problem. I want to stream some audio data between two different plugins. I don't really know how to do this the right way. 

Is this possible with the existing JUCE API? I see the SharedRessourcePointer, but i guess this works only for plugins with the same underlying dll. Is that right or is this a real shared memory pointer? I also see the InterprocessConnection classes, but i think they should not transpose much data. 

Would be great if someone can give me some infos about this.

 


#2

If you mean two instances of a plugin then anything that is static is seen by all instances so you could write into an static array of buffers that each could read from.

If you mean between different plugins it gets more complex, the only shared data would be on disk, meaning writing and reading to / from disk, which I suspect is going to be too slow.

You could use the sidechain input (not offically supported by JUCE yet, my understanding is it will be in JUCE 4), it would require some setup from users and you could only have each plugin listen to one other plugin.

The only other alternative I can think of is to make another plugin that acts as a host for all the other plugins it would then have shared static space that through some clever trickery I'm sure you could pass back to the plugins via some expossed interface.


#3

Thanks for the information. Yes, i mean different plugins with different dll's. I'm having a sampler instrument plugin and want to record audio from another channel with another fx plugin. Sounds like there isn't an easy solution for streaming from another plugin.

Think i take the easy way and use the disk for this. The sampler tells the fx plugin with the interprocess classes the filename and when recording starts / stops, the fx plugin writes the file and tells the sampler when it's ready for loading. Hope this will work...


#4

Yep I think that would work just be careful to not try and write directly to disk from the Audio Thread.


#5

Good input. Thanks!