How to use restartComponent and which flags are the right one, when changing all characteristics parameters except size

SDK for VST 3 audio plug-in and host development.
Arne Scheffler
Posts: 375
Joined: Mon Jun 20, 2016 7:53 am

Re: How to use restartComponent and which flags are the right one, when changing all characteristics parameters except

Post by Arne Scheffler »

Hi Erez,
you don't need to call for every parameter beginEdit, performEdit, endEdit. If you do this, then the parameter values are already known in the host and you don't need to call restartComponent with kParamValuesChanged. If you do this only to tell your processor to use these new values, you can also send your processor a custom message with all the new values and set them yourself in the processor.
You just have to make sure that before you make a call to restartComponent with kParamTitlesChanged|kParamValuesChanged, that your controller will return the correct information afterwards.

ErezEitan007
Posts: 9
Joined: Tue Jun 27, 2017 7:30 am

Re: How to use restartComponent and which flags are the right one, when changing all characteristics parameters except

Post by ErezEitan007 »

Hi Arne,
By saying "custom message" what do you mean ?

Here is a partial code that we do before calling restartComponent with kParamTitlesChanged|kParamValuesChanged
Without this code the automation list remain the same and also the value in the host doesn't change
Is that your meaning (only without the calling of beginEdit, performEdit, endEdit)?

EditController::setParamNormalized(hostIndex, NEW_VALUE);

Steinberg::Vst::Parameter* param = getParameterObject(hostIndex);
Steinberg::Vst::ParameterInfo& info = param->getInfo();

Steinberg::UString(info.title, tStrBufferSize(Steinberg::Vst::String128)).assign(USTRING("NEW_NAME"));
info.stepCount = NEW_NUM_STEP;
info.defaultNormalizedValue = NEW_VALUE;
info.flags = NEW_AUTOMATION_FLAG;

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

Re: How to use restartComponent and which flags are the right one, when changing all characteristics parameters except

Post by Arne Scheffler »

If you now call restartComponent with kParamTitlesChanged|kParamValuesChanged, the host should have the new parameter names, flags and values. The host will not send the values to your processor in the process call this way.
So if you need them there, but without going thru the beginEdit, performEdit, endEdit methods, you could allocate an IMessage with IHostApplication::createInstance() fill it with the necessary information and send it via IConnectionPoint::notify to your processor.

Post Reply