AudioParameterFloat default interval

I have been surprised to discover that the following AudioParameterFloat constructor initializes the range interval to 0.01 instead of a ‘continuous’ one. It could be mentioned it in the constructor’s documentation imo.

What’s your idea of “continuous”?

Continuous means that you can always find a value between two neighbouring values.
Obviously in digital, where we have discrete number of values, even in floating point.

However, if we are not nit picking, if you take the inverse of the definition, it would be understood as, the neighbouring values are as close so that within numerical limits no value in between can be found.

Is that an acceptable answer?

Sure, and I imagine on a digital screen you can’t have a “continuous” parameter GUI anyways. But the point on the default value would make sense in certain sensitive parameter contexts.

What’s your take on OP’s request?

It’s a default meant to be specified.
I think 1/100 is a sensible default, no reason to change it.
But adding to the docs does no harm.

1 Like

Yes, I’m just asking for it to be mentionned in the doc, as changing it would be a breaking change.
However I’m not sure why 0.01 would be a good choice really, and it would probably have made more sense to just use the default NormalisableRange interval, or to force the user to define it.

Btw note that I used some quotes around ‘continuous’, and that is the wording in the documentation of NormalisableRange :slight_smile:

1 Like