» 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

Why cant i connect two pins of the same data type?

This is most likely because it would create a loop in the graph.

Loops (as the root of all cybernetics) are a powerful concept, but you need to take care when patching them: The basic rule to remember is: vvvv evaluates all nodes in the graph each frame only once

This simplifies planning and debugging your patches a lot as all things in the graph happen at the same time. There is no execution order (as in other graphical programming languages like Max or PD). All things get automatically calculated in the necessary order, so you do not need to think about it. Also nodes typically do not delay their data (like in digital electronics). You do not need to fear signals not arriving at the same time.

While this is a quite helpful abstraction, there is one point, where you need to think deeper about it: If you patch a loop, the output can not be calculated as long the input is not known. The input can not be calculated, as long as your output is not known.

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. So we can avoid infinite recursions. Note that the point where we resort to the last frame is important, and changing it leads to subtle changes in the behaviour of the loop.

Therefore, each time you do a connection, the interface of vvvv checks whether there would result a situation where the input of a node is dependent of the output of the same node in exactly that same frame. If so, vvvv is programmed not to do connection. VVVV would not know where to take that value from the last frame.

But how to form a loop then?

Simple solution: Nodes like FrameDelay (Animation) have the output not dependent of the input in this frame but of the input in the last frame - this is perfectly allowed. So as soon as you have at least one of these nodes in your loop (other nodes have this property as well), you can close the loop.

It is difficult to say generally where this node should be put - this depends very much on the logic of your patch. but think about it - it should be easy to find out.

Actually loops are a a very powerful concept as they allow you to store and modify values from one frame to the next: counters or iterative calculations are easy to implement as loops - so make friends with them.

When creating feedback loops using the framedelay node it is important to avoid the possibility of Empty Spreads...
So if u encounter problems saving or reopening ur patch,e.g. u find that one or more modules show a crossed 0 on their output pin, then u should place a replacempty module after the framedelay module.

anonymous user login

Shoutbox

~3min ago

~28min ago

matka: @lecloneur nice!!

~11h ago

unti: does the selectjoint node cause an error on your systems too? it seems to occur when you hover over the window where you select joints

~18h ago

Jackal: works with the Xbox one also.

~19h ago

Urbankind: is Kinect V 1.5 is exclusive for Kinect PC or all the new features works with old kinect?

~20h ago

sapo: kinect 1.5 works with 27.2 vux nodes!

~23h ago

microdee: vvvv_45alpha28-develop-697babe... horny version number is horny:D

~23h ago

newsheng: @milo:thank you!