This is Erez from Waves Audio, a SW plugins engineer.
We would like to consult about an issue we couldn’t find enough documentation in the SDK.
We see very different behaviors under different hosts.
We have a plugin with a special feature that need to make change in almost all of its controls/parameters (ex, flags, value, title …)
When the user triggers specific action, we do the following:
- Change all parameters value, title and flags in the plugin.
- Calling on each parameter that changed to EditController::beginEdit, EditController::setParamNormalized, EditController::performEdit; and EditController::endEdit;
- Calling to restartComponent(Steinberg::Vst::kParamTitlesChanged | Steinberg::Vst::kParamValuesChanged);
Important Note! This flow shouldn’t affect on the number of the parameters, meaning the number of parameters we declared in the instantiate, remain the same.
While doing this we came across issue in a good and popular host. In this host after this flow we received from the host different values to parameters than we declared and changed in the previous steps .
After a session and debugging on their side, they asked us to do the follow steps, since our flow is not correct and in this stage he doesn’t recognize our parameters.
They suggested flow:
Call restartComponent(Steinberg::Vst:: kReloadComponent); and when the host calling to setActive() with false only then we need to load our preset and change all our parameters.
This suggested flow causes each host react differently (Some will crash, some will do nothing and obviously the host that suggested this works…).
After this little prolog, I guess my questions are:
- What is the right way to support our feature, how to notify the host about many parameters that changed, title, flag(automated), value etc’.
- When and what are the right flags to use in restartComponent. Is this function can be called any time from any thread or there are rules for that? And is it enough to call with Steinberg::Vst::kParamTitlesChanged | Steinberg::Vst::kParamValuesChanged or we need the Steinberg::Vst:: kReloadComponent flag