» MainLoop (VVVV)
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

MainLoop (VVVV)

Help Configure the mainloop
Author vvvv group

Here you are supposed to see an image (rendered with SVG) describing the pins of this node. However, this does not work with Internet Explorer. You may want to consider using another browser, like FireFox, Chrome, Safari or Opera that do support SVG.

Credits
Warnings
Bugs

related discussions

start a forum thread about this node

about MainLoop (VVVV)

The mainloop defines, how fast vvvv can run. By default it runs as fast as possible with a maximum of 120 in foreground and 30 in background, which means that vvvv is sometimes a little faster and sometimes much slower, even if it tries to run at a constant framerate.

The mainloop does not only affect drawing issues, but the whole application including the GUI.
Try to set the Foreground FPS to a very low value (1 or 2), create some nodes and connect them. Notice how long it takes until things happen.

MainLoop is the way to control the speed of operations and flow.

The time modes are:

  • Raw: vvvv requests the time from the high resolution counter of your mainboard and uses this value directly for all nodes. as it is on the windows scheduling architecture not sure when this will happen, the time intervals from frame to frame can vary a lot. this is not very good, because the graphics card renders in a very precise interval.
  • Filtered (default): same like Raw, but the time values are smoothed by a slow filter to have more constant time intervals for better animation quality. as the filter is really slow, you shouldn't use this mode, if the framerate of your patch has to change often by large amounts.
  • Increment: the time is incremented every frame by a constamt value set on the MainLoop node no matter how fast vvvv runs in reality.

The Increase Timinig Precision config-pin is on by default. While causing a smoother framerate in many cases it also causes higher CPU-needs in all cases. You'll have to find find out for your case if you want to change this setting. Here is a good read on the topic Windows Timer Resolution Megawatts wasted.

This node is a singleton

FAQ

MainLoop - What does MainLoop do? Setting this value to 400, means that that the whole graphics will be calculated 400 times a second?

With the mainloop node you only can slow down vvvv. If the fastest possible speed to do your rendering is lets say 180 fps then there is no possibility to do the same calculations faster. VVVV will happily use 100% of your CPU when trying. With mainloop you can slow it down to allow other programs on your computer to run.

  • foreground fps: maximum fps of vvvv as active application (vvvv has focus)
  • background fps: maximum fps of vvvv when running in background (other applications have focus)

Note that if you have a Renderer (DX9) and the Sync-Mode of the renderer is not "immediate present" then it's not possible to run faster then screen refresh rate of your monitor.

If there is no mainloop node, vvvv defaults to 120fps in foreground mode. if you want to increase that you have to add aMainLoop and set this to a higher value.

For now we had to block setting the mainloop to values 0 because since the gui also depends on the mainloop it would not be possible to reset the value to something else after having it set to 0 once. ahm..this is by design (flaw). You may encounter a gist of that problem when setting the mainloop to some lower values.

What is this AsyncThreadPriority pin for?

It was for experimenting with the process of loading textures or xfiles in background. But probably we will remove that pin again.

anonymous user login

Shoutbox

~15d ago

~18d ago

joreg: The Winter Season of vvvv workshops is now over but all recordings are still available for purchase: https://thenodeinstitute.org/ws23-vvvv-intermediates/

~24d ago

schlonzo: Love the new drag and drop functionality for links in latest previews!

~1mth ago

joreg: Workshop on 29 02: Create Sequencers and Precise Clock Based Tools. Signup here: https://thenodeinstitute.org/courses/ws23-vvvv-08-create-sequencers-and-precise-clock-based-tools-in-vvvv-gamma/

~1mth ago

joreg: Workshop on 22 02: Unlocking Shader Artistry: A Journey through ‘The Book of Shaders’ with FUSE. Signup here: https://thenodeinstitute.org/courses/ws23-vvvv-12-book-of-shaders/

~2mth ago

joreg: Talk and Workshop on February 15 & 16 in Frankfurt: https://visualprogramming.net/blog/vvvv-at-node-code-frankfurt/

~2mth ago

woei: @Joanie_AntiVJ: think so, looks doable