I want to count to 10 every 60 seconds, how do I fix it?
NewProject.2.toe (3.8 KB)
I want to count to 10 every 60 seconds, how do I fix it?
NewProject.2.toe (3.8 KB)
Hi @kijhome,
in your file you are using python’s time.sleep()
function. Doing so will freeze TouchDesigner as it waits for the script to finish executing before going to the next frame - most likely not what you want.
Instead a simple setup could be to use the Timer CHOP, set its Length
to 60
seconds, toggle on the Cycle
parameter and toggle off the Cycle Limit
parameter.
Now the Timer CHOP will continuously run in a 60 second cycle.
On the “Outputs” page of the Timer CHOP, toggle on the Cycles
parameter which will give you a channel that counts how many cycles have been run. Select this channel and multiply it via a Math CHOP by 10
and you get a value that increases by 10 every 60 seconds.
Hope this helps
cheers
Markus
Do you know how to specify the starting point of a cycle received from the data?
Hi @kijhome,
if you need access to the cycles channel’s value as a DAT, use a Select CHOP to select the cycles channel and then convert this to a DAT using the CHOP To DAT.
Regarding your second question, i’m not sure I understand. Could you explain a bit more?
cheers
Markus
So what should I do if I want to transfer the DAT value from outside to Cycles in CHOP? This was my question
Hi @kijhome,
sorry, I misunderstood that question. For this I would reset the timer and use a Math CHOP to add the start value to the cycles channel.
cheers
Markus