Forum

Question: how to do ++1 per second for individual slices?

Hi all,

i have 128 quads in a spread and want to check their time under certain states. for example, 0 for don’t count and 1 for count up 1 per second. i want to count each slice individually. it’s very easy to write in code but i have a hard time patching it in vvvv.

i’ve tried counter, stopwatch and Expr + Patch alias but still couldn’t do it. below is what i have so far. i made two tables: one “state” and another “time”. i used state table as a filter on set slice. however, i don’t know how to start counting for individual slice in different time.

any ideas? thx!

use LFO with change node connected to its Counted output ( far right ).
This will be your increment ;-)

integrate counts 1 per second if it’s input 1

thanks for the reply.

i found out a store(spread) node that solve my problem.

but for learning sake, can anyone point out how can i finish the feedback loop in the pic? i can’t connect it back to select (where i create the spread), or the patch will crash. how can it be done?

thx all!

framedelay

Your not working loop doesn’t work because for each frame, select will create more slices in the spread. So at some point you will fill your CPU memory and vvvv will crash.

Note that one of the consequences of using spreads is that you very rarely need to do loops or feedback.

-sunep

now i know i must stay away of loops with spread…

but it’s hard for me not to… i wish there are more tutorial and example of using spread to avoid looping. any idea where to look for?

thx.

PS: i learned Quest 3D and MAX before, and i must say the community here is the best!