smoothedValue::reset() bad behaviour

Doc says that reset() “Set a new ramp length directly in samples
But it does more than that… it changes the current value by jumping to the target value!!

 void reset (int numSteps) noexcept
 {
    stepsToTarget = numSteps;
    this->setCurrentAndTargetValue (this->target);
 }

So at the moment there no way to change the stepsToTarget without affecting the current value (without a dirty workaround).

Can you mention in the doc of reset() that it will jump to the target value, and add a setNumSteps() method?

Can you please mention in the doc of reset() that it will jump to the target value?

I came across the same problem a while ago, I’m not quite sure if it would be an easy fix, since you would have to figure out how many steps to take etc.

I guess you figured that out aswell, but an easy fix is to set the target value = the current Value just before reset, so there is no jumping.

Thanks! I know there is a workaround yes.

I don’t want the juce team to change the current behaviour (as that would break many users’codes).
I just want the current behaviour to be stated in the documentation.
and optionally a setNumSteps() that doesn’t jump to the target…