Elegant way to "Dirty" Plugin State


#1

Hi all,

In my plugin I have many parameters that are added/removed/changed dynamically and are not part of the AudioProcessor's official AudioProcessorParameters list. When a change is made to one of these parameters, I need a way to let the host know that the plugin state is "dirty" and to make sure it will call getStateInformation().

Right now I have a "dummy" parameter that I've added to my processor, & through some finagling (It seems that, at least for AUs, the value of a parameter must be different than the one that was read through getParameter() when the last getStateInformation() was called. Also, only the value up to 2 decimal places is regarded) I've managed to create a custom method that will make sure the host saves the state.

As a side effect, in certain hosts this dummy parameter shows up in the automation list (even though it is set as a non-automatable parameter).

It just feels a bit too hackish. I suppose the best solution may be to just add all these "dynamic" parameters as official AudioProcessorParameters but I'm wondering if there's another way.

Cheers!


#2

void AudioProcessor::updateHostDisplay() ?


#3

I need a way to let the host know that the plugin state is "dirty" and to make sure it will call getStateInformation().
 

Thats not the way it works, the host only decides when it calls getStateInformation() (mostly when it saves the project)

 


#4

I realize I cannot force a call to getStateInformation() & that I'm pretty much at the mercy of the host. I'm just looking for a way to make sure the host knows the internal state of the plugin has been changed. Then hopefully if it's a decent host it'll prompt the user to save unsaved changes. (Perhaps this is getting pretty specific to Logic Pro X).

I tried updateHostDisplay(), but it didn't seem to work (at least with AUs in Logic).

 


#5

Did you find a better method finally?

Is there something that works fine for one of the format (AAX/AU/VST)?