Latest AAX wrapper overwrites startup settings

I updated to the latest version of the AAX wrapper today and run into the issue that it is not possible to load a simple default preset from the AudioProcessor constructor anymore. ProTools sends 0 values to all parameters after the plugin loaded the startup preset.

Changing the wrapper back to an older version fixes the issue. I see in the code that a lot of things changed (Normalized parameters and other changes). 

Any help is welcome.

Ok, i found the problem. There is a default parameter value. It seems that pro tools always takes this one if you instantiate a new plugin. 

AAX_Result GetParameterDefaultNormalizedValue (AAX_CParamID paramID, double* result) const override

I'm sure a lot of plugins implemented something like a default preset already... removing this method leads to the common behavior.

Wouldn't it make more sense to implement AudioProcessor::getParameterDefaultValue in your plugin so that the behaviour works correctly?

Sure, i will do this as soon as i have some time. Is this feature only supported by AAX or does it also affects the other wrappers?

I think AU supports it too IIRC.

Odd.  When my plugin is opened in Protools I get called twice, once with the default value provided by the getParameterDefaultValue() method and then a second time with a 0.  Anyone seen this before? 

cheers, J. 

The call stack is different though.  The second time, with the wrong value, it's coming via AAX:Classes::JuceAAX_Processor::setChunk() and SendRampUpdates() .. mmm off to read the manual.

Update: presume it's something to do with this: 

"When a plug-in is first instantiated, CProcess::GetChunk() is called to retrieve the plug-in’s default chunk. Pro Tools caches this chunk in the session and associates it with the plug-in, andCProcess::SetChunk() is called with this default chunk on any future instantiations of the plug-in in the session."

Right - turns out you need to clear the cache - see my post on the digi developer forum.  This problem has some implications for default preset handling which I'll pick up with Avid...

Hi Jules


i've had to revert back to old AAX wrapper because of this above code implementation.

i had a read about in the AVID dev forums and came across an article regarding the CompareActiveChunk, SetChunk and GetChunk order.


The problem im having is that our internal preset system is totally wonky with the latest wrapper code and doesn't recall preset names. 

im sure its something in my code that probably needs attention to fix this, but the old wrapper code works fine with the preset system.



Hi all,

I'm in the process of creating an AAX version of our synth plug-in, and have run into the problem where Pro Tools sets all the parameters to 0.0f...

Now, I could, as Jules suggests, override AudioProcessor::getParameterDefaultValue and assign the correct default parameter values.

However, I have read many posts on here and the Digi DevCon forums about SetChunk and GetChunk etc - is implementing my own chunk handler the way forward?


Please don't use the old (and soon to be deprecated) getParameterDefaultValue method - there are now methods in the AudioProcessorParameter class that you should override to do that kind of thing, and we've added some functionality to that class that doesn't exist in the processor base class.

Hi MCSoftware, as Jules said you should be using the AudioProcessorParameter class. This class will force you to override getDefaultValue which should return the value the parameters should have if the user opens your plug-in on a new track for the first time. The setChunk/getChunk calls are used to save/load your plug-in's state (including the values of your parameters) from a project file. These AAX calls simply get redirected to your AudioProcessor's setStateInformation/getStateInformation. You must restore your Plug-in's parameter values with the data supplied in the  setStateInformation call. Here is some minimal code to save/restore your parameters using JUCE's ValueTree (note: this will only work if you are using the new AudioProcessorParameter class):

void PlugInProcessor::getStateInformation (MemoryBlock& destData)
    ValueTree parameterValues ("Parameters");
        const OwnedArray<AudioProcessorParameter>& myParams = getParameters();
        for (int i = 0; i < myParams.size(); ++i)
            parameterValues.setProperty (myParams[i]->getName (256), myParams[i]->getValue(), nullptr);
    MemoryOutputStream outStream (destData, true);
    parameterValues.writeToStream (outStream);
void PlugInProcessor::setStateInformation (const void* data, int sizeInBytes)
    ValueTree parameterValues = ValueTree::readFromData (data, (size_t) sizeInBytes);
        const OwnedArray<AudioProcessorParameter>& myParams = getParameters();
        for (int i = 0; i < myParams.size(); ++i)
            double value = (double)parameterValues.getProperty (myParams[i]->getName (256),
                                                                static_cast<double> (myParams[i]->getDefaultValue()));
            myParams[i]->setValue (static_cast<float> (value));

Did you ever find a workable solution for custom default presets with JUCE in AAX?

This seems to only be true before Pro Tools has cached the default chunk. I think the code you’ve posted will only work in cases where the default parameter values never change.