Forum

S+H with Time

How can I do a Sample and Hold that keeps the value for a desired time much like the MonoFlop does?

What should happen when the time runs out?
You might just use a switch and a monoflop to switch a certain time between S+H and a default value.

Or do you mean something like the queue node? Not exactly clear what you want to do here.

When the time runs out the value should return to 0 or a default value. It is like the Delay node but instead of waiting x time before triggering a value, it should output the incoming value for x time and then go back to the reset value.
Sorry I don’t have the patch here, will post it tomorrow.

as westbam suggested: this should do it

combine a s+h (Value) with a monoflop (Animation) and a switch (Value)?

Hi,

if i understand you correctly, this would help:

TimeHold.v4p (8.4 kB)
SimpleHold.v4p (6.7 kB)

MonoFlop with Switch works well but there is still one thing missing so that it works exactly like MonoFlop node with a reset value. The bang. It is not continuous like MonoFlop node, even changing the bang for a toggle.

Lintu’s answer works well however I haven’t figured out whats the difference with that S+H.

I hope this patch explains better what I’m trying to do.

monoflop_switch_more.v4p (20.6 kB)