AAX / ProTools - plugin states persistent over multiple sessions?

Hey, thanks for the ideas - I actually wound up getting deeper into Pro Tools parameter saving/loading in this thread:

Short answer - yes, when Pro Tools loads a session, it does its own recall (like automation, but not dependent on the parameters being armed for automation) of parameter values.

It does this first, and then calls the setStateInformation method (passing it back whatever chunk of data, presumably some XML, that you might have given it from getStateInformation). So you have the option then to overwrite your choice of parameter values.

For setting a “new default” state (like @jcomusic and @parkellipsen are talking about above) you could set that explicity from within setStateInformation, if you detect (by parsing the XML for some telltale values) that it was passed the “old default” XML.

To help with that: In the other thread I linked to here, there’s a helper method I wrote called getDefaultStateXml that pulls the default values from the AudioProcessorValueTreeState into an XML object. So then with that method you can force the current state of the parameters back to defaults with:

parameters.replaceState (ValueTree::fromXml (getDefaultStateXml()));

(here, parameters is the name of the APVTS)

Hope that helps…