Delay for Bang?

how do I delay a bang?. I want to bang a node then it will wait 5 seconds and bang another node.

This seems like it should be simple but I just can’t figure it out!!

thanks

bang_delay_01.v4p (3.7 kB)

hi,

i hope, the delay-node is not in a special pack ;)

greetz

bang_solved.v4p (5.7 kB)

also try the MonoFlop (Animation) -> TogEdge (Animation) combination!

Yep. Delay (Animation) is the obvious node of choice. the subtle problem with this approach appears as soon as your framerate is heavily changing.

Delay internally strictly works time-based, not frame based. So imagine sending a bang while the framerate is 50fps - so the bang stored in the delay 20ms long. now imagine your frame rate dropping to 10fps after the bang. now each frame is 100ms long, so there is a certain chance that both the rising and the falling edge of the bang occur in the same frame. You will only get the information every 100ms so the bang may be lost.

A classic solution would be putting a Counter (Animation) or Toggle (Animation) upstream and a Change (Animation) downstream of the Delay.

Generally with vvvv its always worth thinking about the question whether its possible to work with explicit states and not with events leading to states.

Thanks everyone, Its funny how I can feel confidant creating very complex patches and then get stuck on simple things like this :)

@grobkorn

Thats funny Delay is the first node I tried. But I didn’t see the bang so I thought it didn’t work with bangs.

@joreg

Great! I think I’ll use this solution. I’m learning now about how important TogEdge is.

@oschatz
hmm, thanks for the tip, I’ll have to think about that for a while. Does the MonoFlop solution also have this problem if the framerate is changing?

no.

but the monoflop suggestion has the problem that you can not delay multiple bangs.
if you get a bang while one bang is being processed, one bang gets lost (either the first or the second, depending whether you set retriggerable on the Monoflop).

Ok, Thats very helpful.

thanks

Thats funny Delay is the first node I tried. But I didn’t see
the bang so I thought it didn’t work with bangs.

When ‘testing’ to see if something that is using a ‘bang’ actually works, I always connect a simple counter node. So if I get a bang, the counter will increase. (just a hint)

This whole post made me want a ‘frame delay’ where you can set how many frames to delay again… so you can always delay 10 frames, disregarding the frame-rate that vvvv is running with…

…where you can set how many frames to delay

even spreadable.

FrameDelay (Animation Advanced).zip (4.0 kB)