This is the approach I took.
[quote=“kraken”]i found very useful the idea of having a parameter split in Policies (if i’ve understood correctly your idea) cause for me a parameter is some value that i use in dsp code, and usually doesn’t mean to be equal to the value the frontend would like to display, and could be different to the value the host will give me.
so in a tipical environment i’ll have to deal with 3 “languages”: normalised language (0…1) spoken with the host, denormalised language (-2pi…2pi) tipically used inside dsp code, and display language (“0.000 %”) used in UI.[/quote]
I think this concept of “languages” is a very good way to think about the problem.
The concept seem obvious, but I have also found it useful to think of a native parameter (there’s probably a better word, but …) – this is the actual parameter itself, and there should only be one of these. All the other representations are translations of it and must follow it, even if copies are also kept somewhere else, as they are in the host and in UI controls.
So the basic task of a parameter system is to keep the copies of the native parameter in sync with the native parameter.
For most situations the native parameter would probably be the one used by DSP code – but not necessarily. But there should definitely be a native parameter somewhere.
In my classes, the native parameter is always the one pointed to by the subclasses. I don’t allow the native parameter to be stored in the parameter classes; these classes are only for manipulating the native parameter.