Pushing VST to the limits


#1

Any VST experts, let me know what you think about this. I’m new to VST plugins so if this sounds retarded let me know:

I want to apply a VST filter effect to several stereo audio streams (lets say 6 or 7 unrelated stereo pairs). Most of these filters are 2 input / 2 output. So if I want to filter 5 streams I have to create 5 instances of the plugin and run a stream through each one.

But how to handle the parameters? I want them to be the same. So the user will be presented either with a generic parameter panel, created by calling routines like AudioProcessor::getNumParameters(), or I will allow the VST plugin to pop its user interface via AudioProcessor::createEditorIfNeeded().

However, this presents a problem. Which of the 5 instances do I pop the interface for? And after the parameters are changed how do I set them on the other instances? How will this work if the plugin pops its own interface? Can I just loop over all the parameters and call pluginCopy->setParameter( index, originalPlugin->getParameter (index)) ?


#2

Best plan is to pop the interface for any of them, and then use get/setStateInformation() to copy its new settings to the others. Lots of plugins contain state that isn’t contained in the parameters.


#3

There would be a delay between the user changing one of the filter parameter sets directly via the interface, and the point where I copy the settings over. So for a few audio processing blocks, a few filters might be behind on the settings.

What about creating an extra filter that is not doing any audio processing and using that just for the UI? Although if the UI shows the waveform of course it wouldn’t be there.

What do you think about registering an AudioProcessorListener on the first filter and then every time I get audioProcessorParameterChanged(), propagate the state?

Do all those methods in AudioProcessorListener work all the time? Or do some VST plugins screw it up? Or is it something that always works because of the Juce/VST framework?


#4

[quote]So if I want to filter 5 streams I have to create 5 instances of the plugin and run a stream through each one.
[/quote]

Are you sure about that ? I suppose you have an audio processor graph, so can’t you plugin your 5 sources to the same audio processor ?


#5

[quote=“dinaiz”][quote]So if I want to filter 5 streams I have to create 5 instances of the plugin and run a stream through each one.
[/quote]

Are you sure about that ? I suppose you have an audio processor graph, so can’t you plugin your 5 sources to the same audio processor ?[/quote]

I’m not using the AudioProcessorGraph, but if I did there would be 5 graphs. How can one filter instance be used on more than one separate stream? It can’t…because filters have state memory (for example the history in an infinite impulse response filter, or a delay line).


#6

[quote]How can one filter instance be used on more than one separate stream? It can’t…because filters have state memory (for example the history in an infinite impulse response filter, or a delay line).
[/quote]

What I understood is that you want to apply the exact same filter to 5 streams. What I suggest is “mixing” (inside an audio processor graph) the 5 streams then apply the filter. Maybe that’s not what you want though …
Maybe you want to have 5 diffrent streams in output, and then, yes, I guess that’s not possible with only one filter instance.