How can I implement a hidden parameter that controls can change, and this change called the OnParamChange
method, but these changes would not be transmitted to the host?
The host does not need to know this parameter at all.
Can use a negative parameter value when declaring, for example, -2?
I don’t know the correct or best way to do this but I have used the following approach:
Declare the parameter using the “kFlagCannotAutomate” flag which prevents it from showing up in the DAW’s automate-able parameter list and do not create a control for it in mLayout (or hide it using HideControl()) .
These two steps will “hide” the parameter everywhere except the DAW’s generic plugin editor. I don’t know how to prevent it from showing up there.
You will probably have to make changes to the framework itself. Namely, add the kFlagHidden flag to EFlags. Then check for the presence of this flag before calling the InformHostOfParamChange method. I’ll check now, it’s really true.
May i ask why you need to call OnParamChange? Usually the idea of changing the framework for these kind of things is not the best approach. If you just need a control with no IParam set the kNoParam flag and maybe do what you want it to do in an IActionFunction.
I think he’s asking for the opposite - a parameter with no control - that is hidden from the DAW.
Not sure why one would need this though vs. a global variable of some sort. @vasyan can you give some more info on what you are trying to do? It’s likely there is a better way.
The IActionFunction is not suitable for this purpose, because when using a parameter, an excellent dispatch of all related controls is used when changing the parameter. However, the host does not need to be aware of this, nor was it able to set this hidden parameter in any way.
P.S. The topic is no longer relevant, as I wrote earlier, I made changes to the source code of the framework, adding everything necessary for the functioning of hidden parameters.