Forum

Change text position on timer

Hey everyone, hope all is well.
I’m trying to build a patch that changes the text position every second (every second that passes the y value of the text should increase). Unfortunately, I’m still trying to wrap my head around vvvv gamma and despite this probably being a very simple issue I can’t seem to understand how to make it work. :/
If anyone has any advice on how I could continue this patch it’d be greatly appreciated!

timer_text.vl (13.4 KB)

I’m sure there are plenty more elegant solutions, but here’s an example of a possible way to do this. Attach your lfo trigger (can also use a stopwatch node if you simply want to count seconds) to a counter node, so that every time it triggers the value counts up. Then, if you want the value to be decimals instead of integer, you’ll have to convert it to Float32 with the ToFloat32 node, after that you can use the “map” node to set the increments you’d like the value to go up every second.

After this. you want to attach the output to your position pin, however, since that pin takes two values (Vector 2D), you need to choose which value your output goes to with the “setslice” node. Since you want it to go to the Y value, you set the index to 1 (VL always starts counting the first value of a spread from 0).

Here’s a quick edit of how this might look
timer_text_edit.vl (19.1 KB)

1 Like

the LFO has a “Cycles” output, which is a counter for every elapsed period, you can use that directly. Also th Map input range is quite big when you use integers. so i would set that to a very high value, like 500 or so. otherwise, it looks fine!

2 Likes

I knew there was a simpler way in there somewhere, there always is…thank you for the never ending lessons! =)