Working on a new interactive project that uses a website (where guests can submit messages). However, the website needs to automatically reload after 5mins to stop everything filling up.
Have used the lots of other features of Touch Designer before but this is the first time using Web Render.
Any help or thoughts would be great.
I have the same question and I don’t seem to figure out a way.
The reload button has a state 0 while the performance is running and 1 when it’s been pressed.
So I tried to write a python line that should feed a 1 to the button field every certain amount of time.
The code is this :
1 if absTime.frame == 50 else 0
This is meant to set the value to 1 at frame 50 and then 0 at any other frame.
Although this does not trigger any error it does not seem to work.
Did you find a way of doing it eventually?
Very new to TouchDesigner…
absTime.frame member is a frame counter since TouchDesigner was started. So the condition
absTime.frame == 50 will only ones be true: 50 frames after TouchDesigner started.
You could use a modulo operator to make this work:
0 if absTime.frame%50 else 1
For a bit more control, check out the Timer CHOP (there are good examples in the OPSnippets)
Hey there again!
Agree that if you need it to be a recurrent event then the modulo operator is the way to go. And I admit I didn’t try that.
What you are saying is actually casting some light, for me, on how the “Perform Mode” works.
In my head I was assuming that the “program” would start from scratch every time you run “Perform Mode” but actually this cannot be the case. Since it’s just putting the “out1” in a separate window.
Also in my head, I thought the absTime.frame somehow would refer to the timeline frame. But instead is probably referring to absolute frame count from the beginning of the program. Am I right?
Either way, in my case I want to be able to reload the webRender after/when I run “Perform Mode” so that perform mode always starts with the loading of the page.
I need to try the modulo method you are proposing and see if that works. That would indeed make a lot of sense. Can’t believe I didn’t think about it before…
It wouldn’t necessarily solve my issue but I would sort of work. I will give it a go.
Thanks for now!
have a look at these two links to differentiate between absolute time (
absTime) and component time (
For triggering a regular refresh when entering perform mode I would again point to the Timer CHOP now in connection with the Perform CHOP which has a channel indicating if a project is in Perform Mode. This channel you can use as trigger for the Timer CHOP to go into a initialize state when not in perform mode and a play state when in perform mode. As the Timer can be looping you get simple control over when to reload the Web Render TOP.
Lastly regarding perform mode - simply put this does open up the specified output in a new window but also closes down the network editor for a large performance boost. Have a more detailed look at Perform Mode here:
Hope this helps
Thank you so much!
This works perfectly. I also tried the modulo method and it worked.