If you Set a parameter value in your plug-in constructor, this value will be ignored in AAX versions of the plug-in. This does not happen with VST or audio units.
Reproduction:
MyPlugin::MyPlugin(...)
{
...
GetParam(0)->InitDouble(...);
GetParam(0)->Set(ValueOtherThanDefault);
}
ValueOtherThanDefault will be ignored. This scenario may sound a bit exotic. In my case, I am setting a user-defined initial value that is loaded from a json file stored on disk. This value is not the parameter default value (if you double-click on the corresponding control you will reset to the default value, not the user-defined init value).
I believe I know the reason for this behaviour and how to fix it. But I wanted to discuss this first before submitting a pull request.
So in IPlugAAX.cpp there is a function EffectInit() where AAX_CParameters are created. I think we need to also call pAAXParam->SetValueWithDouble(pParam->Value()); there.
Thoughts?
If you
Seta parameter value in your plug-in constructor, this value will be ignored in AAX versions of the plug-in. This does not happen with VST or audio units.Reproduction:
ValueOtherThanDefaultwill be ignored. This scenario may sound a bit exotic. In my case, I am setting a user-defined initial value that is loaded from a json file stored on disk. This value is not the parameter default value (if you double-click on the corresponding control you will reset to the default value, not the user-defined init value).I believe I know the reason for this behaviour and how to fix it. But I wanted to discuss this first before submitting a pull request.
So in
IPlugAAX.cppthere is a functionEffectInit()whereAAX_CParameters are created. I think we need to also callpAAXParam->SetValueWithDouble(pParam->Value());there.Thoughts?