» Creating Feedback Loops
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

Creating Feedback Loops

Russian | Italian | French

If vvvv does not allow you to create a connection between two pins that would normally be connectable because they have the same datatype, this is most likely because the link would create a loop in the graph.

Creating a loop is not a valid connection!

Solution

Use a FrameDelay (Animation) (or another suitable for your datatype) in the loop to be able to close it. The framedelay is essentially breaking the loop in that its output is not depending on its input of the same frame but simply returns the value the input had in the last frame.

Understanding

Here we provide two different ways to think about loops in a graph:

Local Varibales
In order to save the result of a computation in one frame to use it for further calculation in the next you have to use a node called FrameDelay. Essentially by setting its input you write a local variable which you can read from in the next frame by connecting to its output.

Order of Execution
vvvv does not have an execution order. All things in the graph happen at the same time, once every frame. So every frame of evaluation starts at sinks (Renderers, Writers,..) which first require their inputs to be updated before they can and return their own result. Like this vvvv walks up the graph from each sink until it finds a node that does not have any of its inputs connected. This node can return a result immediately which it "hands over" to nodes connected on its own outputs. Now those nodes can compute their output and so on...without you having to worry about this much.

While this makes things very easy most of the time, there is one point, where you need to look closer: If you'd patch a loop there would not be a node that can start computing its result since all of the nodes in a loop depend on the result of an upstream node.

While this sounds like a classical paradox which should lead to crashed computers and blue screens, a solution is quite simple: At one point in the loop we need to resort to the value of the last frame.

Therefore vvvv prevents you from creating such loops by simply not allowing you to make such connections.

anonymous user login

Shoutbox

~4h ago

joreg: vvvvTv S02E01 is out: Buttons & Sliders with Dear ImGui: https://www.youtube.com/live/PuuTilbqd9w

~7d ago

joreg: vvvvTv S02E00 is out: Sensors & Servos with Arduino: https://visualprogramming.net/blog/2024/vvvvtv-is-back-with-season-2/

~7d ago

fleg: hey there! What's the best tool for remote work? Teamviewer feels terrible. Thanks!

~21d ago

joreg: Last call: 6-session vvvv beginner course starting November 4: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-i/

~1mth ago

joreg: Missed the last meetup? You can rewatch it here: https://www.youtube.com/live/MdvTa58uxB0?si=Fwi-9hHoCmo794Ag

~1mth ago

theurbankind: When is the next big event, like node festival ?

~1mth ago

~1mth ago

joreg: Join us for the next vvvv meetup on Oktober 17th: https://visualprogramming.net/blog/2024/25.-vvvv-worldwide-meetup/

~1mth ago

joreg: 6 session beginner course part 2 "Deep Dive" starts January 13th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-ii/