What is the correct call sequence between plugin and host when parameters have changed while it is processing audio


I’ve updated Bitwig Studio to be able to support dynamic parameter count of a VST3 plug-in while the plugin is running and processing audio. I just want to confirm that I have fully understood the call sequence that would happen in this case.

Here is how I understand it:

  • Plugin notifies the host that the list of parameters has changed by calling IComponentHandler::restartComponent with the flag kReloadComponent set. this could happen on any thread that the plugin has (it’s main event thread or the audio processing thread etc)

  • We stop processing audio on the plugin gracefully (we do this with a short audio fade out)

  • We tell the plugin it is no longer active by calling IComponent::setActive(false)

  • We tell the plugin it is active again by calling IComponent::setActive(true). This allows the plugin to build the algorithm used for processing audio.

  • We query the new state of the plugin (what parameters it has etc).

  • We start processing audio on the plugin again

Note that stopping audio may take a short period of time so the plugin will continue producing sound with the old parameter list until we have called setActive(false).

Is my understanding here correct?

Kind regards,

Nicholas Allen

you forgot two calls:

before calling IComponent::setActive(false) you need to call IAudioProcessor::setProcessing (false).
and after calling IComponent::setActive (true) you need to call IAudioProcessor::setProcessing (true).

And normally a plug-in is only allowed to call IComponentHandler::restartComponent from the UI thread. But we already saw plug-ins doing it whenever they want.


Thanks yes I forgot to mention those calls but we are doing that.