[SOLVED] One way smoothing
-
Hi all,
Can anyone suggest a way of smoothing a variable only when it is counting down, not up? ie I want the output to follow the input variable in real time only if the last value is less than the current value; however, if the last value is less than the current I want the output to fall back down slowly and smoothly. You could view this another way as being reactive to impulses but with a long decay.
thanks,
Nic
-
Best regards, Jean-François
-
@jfg said:
Hi Jean-François, thanks for this, I had something very similar in mind but it's not quite working. Try setting the smoothing to about 0.95 and moving the input manually & you'll see why: the smoother continues to spit out values for some time, clashing with the values coming from the router's Out1. Also, if the input has suddenly shot up the smoother hasn't had time to catch up with it's value, so when the input starts to then decrease the output jumps.
If the smoother had some sort of 'direct injection value' it would help.
Any other ideas?
thanks,
Nic
-
Have you looked at the Decay Generator actor?
-
@dusx Yes, this almost works, but sadly it takes a trigger input rather than following a numerical input. Not quite there.
-
I'm not sure this addresses your need, but its something I made a while back to extend the functionality of Decay Generator.
-
Finally figured out a workable solution. Here it is if anyone else is interested in creating this particular functionality:
-
@nic said:
Finally figured out a workable solution. Here it is if anyone else is interested in creating this particular functionality:
A few months ago @mark showed me something similar that he does with the Pulse Generator actor feeding a Float Counter or Counter actor to get smooth values going up or down. Super clever!