How does Juce handle plugin state / preset handling for AAX plugins?


#1

I could use a bit of clarification as to how Juce handles plugin state calls for AAX plugins.

While testing the AAX version of my plugin, I noticed that whenever I save a preset in Pro Tools, the entire plugin state gets saved, and not just the “current program”. The plugin also never gets a get/setCurrentProgam call. When I looked into the AAX wrapper code, I noticed that there are only calls to get/setStateInformation and never to get/setCurrentProgamStateInformation.

So, am I right that AAX plugins built with Juce (or in general then probably?) don’t have the concept of a “program” and a “bank of programs”?

My plugin internally has a 2D array of N x M float values (where N is the number of programs, and M is the number of parameters). When a user selects another program and setCurrentProgram gets called, I just set an index in my code so the right 1D array of parameters is selected, and parameter changes in the GUI then operate on that set of parameters, for that program.
When the AudioProcessor receives a getCurrentProgramStateInformation call, I only return the single 1D array of parameters for the current program. And when getStateInformation gets called I return the full 2D array with parameter sets for all programs in the plugin.

In the case of AAX, should I only keep a single set of parameters for my plugin then?


#2

Any takers? How are you handling plugin state / preset( bank)s in Juce based AAX plugins?


#3

Don’t use Bank/Program. Use our own preset management system.
For me it’s really a thing of the past.


#4

I already have my own Preset and PresetBank (set of Presets + a few settings for the whole bank) classes internally. They serialize to a byte stream, which is handed over to Juce. But my GUI doesn’t have any preset management exposed (I think it’s the host’s job to do that, in a consistent way for all plugins).

I suppose it comes down to whether the plugin format supports the concept of a “preset/program” and a container thereof (preset bank/program list):

VST2 supports programs (get/setCurrentProgram and get/setCurrentProgramStateInformation are being called), so there I guess getCurrentProgramStateInformation should only return the current program settings, whereas getStateInformation should return the whole plugin state (including the settings of all programs).

AAX doesn’t seem to have that concept, and you need to ship a set of preset files along with the plugin (which Pro Tools will then pickup and present in the window around your plugin GUI).
So, I guess here, there is basically only 1 program in the plugin, and getStateInformation should just return settings for 1 single program.

VST3 seems to have the concept of program lists, but I’m not (yet) familiar with how that compares to programs/bank of programs.

IIRC AU is similar to VST2 (preset + set of presets, and both getStateInformation and getCurrentProgramStateInformation being called).

So, I guess I’ll need to check in my code under which plugin format I’m operating, and return different things in getStateInformation etc… depending on that plugin format (set of multiple preset settings for VST2 vs. single preset settings for AAX).
Sounds alright like that?