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

SDK for VST 3 audio plug-in and host development.
nickallen
Posts: 3
Joined: Mon Feb 04, 2019 11:08 am

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

Postby nickallen » Tue Feb 05, 2019 9:10 am

Hi,

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

Arne Scheffler
Posts: 231
Joined: Mon Jun 20, 2016 7:53 am

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

Postby Arne Scheffler » Fri Feb 08, 2019 12:34 pm

Hi,
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.

Cheers,
Arne


Return to “VST 3 SDK”

Who is online

Users browsing this forum: No registered users and 4 guests