Where to put initial startup parameter values for AAX?

Could all this be caused by some race condition considering that get/setState may happen on non-message threads?

There is a flag to tell Pro Tools to operate on the message thread, see here: [AAX][PULL REQUEST] Force Protools to do chunk calls in message thread option

Thanks for the heads up - I’ve inserted that code, but it doesn’t help this situation, unfortunately.

OK, I’ve found a way of hacking setState to use my initial setting, if it’s the first time the plug-in is loaded. It’s pretty ugly, but at least it’s out of the Editor now.

Why? If you make a distinction between “initial” and “default” then the user has no way to get back to the “initial” state other than de-instanciating and re-instanciating the plug-in.

I’m curious what your use case is.

I’d like to use ‘default’ as a neutral, or null position, so basically 0 for a knob as an example. When the plug-in first loads up it would be nice to set an example of what the plug is capable of. I would normally have presets but the plug-in is so basic that I don’t have any. You could always set default and starting value to be the same.
But never mind, I’ll work around it… :grinning:

edit: It also appears that get & ‘setCurrentProgram’ are not called at all when the number of programs is 1, which would help a little I think.

Setting that to 1 basically means there is only the “default” program, not that there is a set of programs which happens to only have 1 member. So there should be no need to load a program in that case. (And I believe that this is controlled by the host, so JUCE couldn’t enforce such a change, anyway.)

So I can’t set a preset on single program plug-ins, and I can’t set values in the constructor of the AAX processor. Never mind, I’ve worked around it now.