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

Conditions

French

Patching pages

Switch

Basic usage

In the most simplest scenario you want to switch between two inputs according to the result of some boolean operation (0 and 1).

This is what the  Switch (Value Input) is for.

By default the Switch node has 2 inputs to switch between: in case of 0 Input 1 and in case of 1 Input 2.

More Inputs

The Switch node can accept any number of inputs to switch between by setting the Input Count via the Inspektor. The Switch input then takes an integer value ranging from 0 to Count-1 to switch between the inputs.

See also
  • If you want to apply a LERP (linear interpolation) between the inputs instead of switching between them have a look at  InputMorph (Value).
  • In order to switch Values according to a String, have a look at  Case (Value Input).
Spreads

Alternatively to switching between multiple individual values you can use the GetSlice (Spreads) as shown to switch between the slices of a spread.

Boolean operations

Boolean operations

There is no special Boolean datatype in vvvv. Boolean values are simply represented by 0 (false, off) and 1 (true, on). Use the following nodes for basic boolean operations:

Relational operators

>, <, =,... return 0 or 1.

State conditions

There are some special nodes that return a Boolean according to a change in state.

Examples:

See the helppatches of these nodes for details.

State Automatas

When patching anything that can be separated into a series of states and events that cause transition from one state to another you are likely looking for Automata (Animation). Also the Timerliner has an automata built in.

See also:

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/