Suggestion: Host using range.interval in AudioProcessorValueTreeState Parameter::getNumSteps()


#1

Hi there,

we wondered, why the automation values in the host didn’t snap to the interval value of the NormalisableRange of the Parameter. This seems like an easy fix in AudioProcessorValueTreeState.cpp in Line 66 getNumSteps().

int getNumSteps () const override { if (range.interval > 0) return (((range.end - range.start) / range.interval) + 1); else return AudioProcessor::getDefaultNumParameterSteps (); }

Maybe we’re missing something…
Johannes


#2

Sounds like a reasonable change. I’ve added this to the develop tip. Thanks for the suggestion.


#3

thanks! and thanks for spotting the missing cast :wink: