I don’t know the complete context of what this is about, but on the surface it looks like you are trying to handle possible formulas used by a parameter. You could consider letting the module implement the formula. And allow for custom text.
To be more concrete about it, here are some potential features.
- Number precision. Something like a printf string would be the most flexible.
- For the formula, in VST anything is allowed. Functions could be allowed. This could be function pointers for to and from display land. (Other hosts have a 0 to 1 internal representation, e.g. VST). I believe that only AU has restricted formulas.
- Custom text is frequently used for stepped values. Some platforms have the concept of stepped values and allow strings for the values. (e.g. AUParameter valueStrings)