There apparently is an automation issue which happens after selecting presets using the aaxwrapper in SDK v3.6.9. It can easily be reproduced using again_aax:
1. In Pro Tools instanciate again_aax.
2. Create and save 2 or more presets with different gain settings using Pro Tools' preset browser.
3. Add gain parameter to automation list.
4. Switch to e.g. write automation mode.
5. Start playback and switch between the presets created in 2.
6. Stop playback and reset to initial timeline cursor.
7. Switch to read mode.
8. Restart playback.
Expected result: Automation follows the gain parameter settings according to presets selected while writing the automation.
Actual result: Gain parameter doesn't change. It seems as if the automation values aren't reported to the host properly.
Switching presets per se works fine, it's just that the according parameter changes aren't transferred back to the host. It may have to do something with the fact that Vst2Wrapper::setChunk() is scheduled for a later call in onTimer(), which happens if AAXWrapper_Parameters::SetChunk() isn't called from the main thread.'
My assumption is that either the automation value reported back to ProTools reflects the parameter's old state or there isn't any reporting going on at all. I'd need to investigate further in order to confirm that. I also assume there weren't any changes regarding that in 3.6.10 given that the wrapper has been refactored? At least it doesn't have to do with the fixes suggested in my recent PRs.
Best,
Ray
Automation issues after switching presets in aaxwrapper
Automation issues after switching presets in aaxwrapper
Last edited by ray on Fri Jun 22, 2018 2:01 pm, edited 1 time in total.
Re: Automation issues after switching presets in aaxwrapper
Here's one potential fix outlined in the v3.6.9 SDK codebase. I'm sure there's corresponding code in v3.6.10
1. Add a bool called "presetChanged" to AAXWrapper
2. Intercerpt and signal the AAX_eNotificationEvent_PresetOpened message in AAXWrapper_Parameters::NotificationReceived, like so
3. React to preset changes in AAXWrapper::onTimer() and push the new parameter values to the host after the underlying component has updated its state
Below the following section
add
I'm sure there are more elegant ways to iterate and set all aaxParams, but I think you get the point. This mechanism allows to distinguish between normal chunk updates that the host is aware of e.g. when restoring a session and internal changes imposed by preset switches currently not transferred back to Pro Tools.
1. Add a bool called "presetChanged" to AAXWrapper
2. Intercerpt and signal the AAX_eNotificationEvent_PresetOpened message in AAXWrapper_Parameters::NotificationReceived, like so
Code: Select all
...
switch (iNotificationType)
{
case AAX_eNotificationEvent_PresetOpened:
mWrapper->presetChanged = true;
break;
...
}
3. React to preset changes in AAXWrapper::onTimer() and push the new parameter values to the host after the underlying component has updated its state
Below the following section
Code: Select all
FGuard guard (msgQueueLock);
Vst2Wrapper::setChunk (mChunk.getData (), mChunk.getSize (), false);
wantsSetChunk = false;
add
Code: Select all
if (presetChanged)
{
int32_t numParams;
if (aaxParams->GetNumberOfParameters (&numParams) == AAX_SUCCESS)
{
for(auto i=0; i<numParams; i++)
{
double value;
AAX_CString id;
if (aaxParams->GetParameterIDFromIndex (i, &id) == AAX_SUCCESS)
{
if (aaxParams->GetParameterNormalizedValue (id.CString(), &value) == AAX_SUCCESS)
{
aaxParams->SetParameterNormalizedValue (id.CString(), value);
}
}
}
}
presetChanged = false;
}
I'm sure there are more elegant ways to iterate and set all aaxParams, but I think you get the point. This mechanism allows to distinguish between normal chunk updates that the host is aware of e.g. when restoring a session and internal changes imposed by preset switches currently not transferred back to Pro Tools.
Re: Automation issues after switching presets in aaxwrapper
Any feedback on this one? Do you want me to create a PR?
Thanks!
Thanks!
Re: Automation issues after switching presets in aaxwrapper
Hi
Did you check the last SDK 3.6.11? maybe this issue is already fixed...
Cheers
Did you check the last SDK 3.6.11? maybe this issue is already fixed...
Cheers
YVan Grabit
Re: Automation issues after switching presets in aaxwrapper
ygrabit wrote:Hi
Did you check the last SDK 3.6.11? maybe this issue is already fixed...
Cheers
Hi Yvan,
I did and unfortunately, no this one is not fixed in the latest SDK.
Best,
Ray
Re: Automation issues after switching presets in aaxwrapper
ok... did you try your proposed fix ?
if it works i will commit it for the next update..
if it works i will commit it for the next update..
YVan Grabit
Re: Automation issues after switching presets in aaxwrapper
ygrabit wrote:ok... did you try your proposed fix ?
if it works i will commit it for the next update..
Yes I did, and it works well, although it will obviously need some adaptations now that the AAXWrapper isn't based on the VST2Wrapper anymore.
Best,
Ray
Who is online
Users browsing this forum: No registered users and 3 guests