Store Parameters but don't make them automatable?

I’m working on a reverb plugin. I have 4 buttons that change room scaling, but I only want one button to be active at any time. This is easily achievable, however, through doing automation in a daw you can basically set all of the buttons to toggled.

Basically when I load a session, all of my parameters are loaded from the xml and it works great, except if somehow two of the buttons were automated to be on. Then when I load the reverb “small room” and “tiled room” will both be lit up and toggled on for example.

So I’m using the setStateInformation and getStateInformation functions and have the buttons attached to the tree state . createAndAddParameter things. Basically, how can I save the xml data and attach it to these buttons, but not allow the automation of these buttons?

OR, how can I make that if one of these parameters is set to toggle on, (1.0) that the other buttons are toggled off?

Basically if one button is on I want the others to turn off, including in the automation parameters.

Figured it out. I was setting the parameters but not setting the value tree equal to it.

One option is to make the buttons only GUI elements that control one parameter which as 4 values.

That’s what I was thinking too.

The only problem is how do I set the parameter to be saved in the tree state?
I could say if the room scale parameter is 1, small room is toggled on, if its 2, tiled room, if it’s 3, hall, etc. I may have to tinker around with it but I think that’s the best bet.

You are already writing the public state tree of your AudioProcessorValueTreeState in the getStateInformation()? Then you can set this information anywhere you want in that tree.

And maybe these little helper classes I wrote once help you, it is the dependant to the SliderAttachment and ButtonAttachments etc. but without using an AudioProcessorParameter: