Delay CHOP receives a Pulse, Delay is set to 16 seconds.
I want to be able to stop and restart the project and have the 16 second count start over from when it receives a pulse. I expect the output to ALWAYS occur 16 seconds after receiving a pulse.
Delay CHOP receives a Pulse signal, 16 seconds later it spits out a Pulse.
If I stop/restart project playback at any moment, the Delay CHOP should still only output a Pulse 16 seconds after receiving a Pulse.
Delay Chop receives a pulse, 4 seconds later i stop and restart project playback, then 12 seconds after restarting the project, Delay spits out a Pulse.
Its as if its retaining the first 4 seconds it already counted down during the first playback.
You can setup a simple test network to see this happening by creating a LFO CHOP set to ramp, give it a slow frequency like 0.0625 (should take 16 seconds to ramp from 0 to 1) feed it to a Count CHOP and to a delay CHOP, and then feed that Delay CHOP into another Count CHOP. Set the delay to a long value like 10 seconds.
The expected behaviour is the the Delay Count should increment 10 seconds after the LFO count increments. But try stopping/restarting the project at intervals below the 10 seconds and you will see that the delay unit is firing at intervals other than 10 seconds after receiving input. Somettimes it will even fire before receiving an input!
Either this is a bug in the Delay CHOP - or i am totally missing something about how to reset the countdown within the Delay CHOP.
Here are the settings:
LFO: Ramp, frequency = 0.5, amplitude 1.1
COUNT: trigger threshold 0.999 (for both count modules)
TRIGGER: trigger threshold 0.999
DELAY: delay = 10 seconds
Timer script has reset pulses on start as shown in pic.
Do you stop the project using the timeline, at the bottom of the TouchDesigner window, or do you use the timer CHOP pictured in your post and use the initialize par or the start par ? or the Active toggle ?
the most important point might be that pausing the timeline will pause everything - hence the delay still “knows” about the previous trigger and will pass that on x-time after you hit play again. Not a bug. What’s definitely missing from the Delay CHOP as well as the Trigger CHOP is a Reset Parameter to help them forget.
Not 100% sure what the overarching goal is, but your network might be build with utilizing the Timer CHOP a bit more. With it being tied to the Timeline, instead of setting the “Length Type” parameter to Infinite, switch it to Fixed and set the “Length” parameter to 2 (I picked that value to mimick your LFO settings). Additionally turn on the “Cycle” parameter and turn off the “Cycle Limit” parameter.
Your Timer will still reset when rewinding the timeline but also keep looping over the specified length.
Now on the Output parameter page, enable “Timer Pulse”, “Cycles” and “Cycle Pulse”.
The resulting “timer_pulse” channel can be used to reset the Count CHOPs you are using. The “cycles” channel can be used as your cycle count and the “cycles_pulse” channel can be used for counting the delayed count.
Now the delayed count is a bit tricky but feeding the “cycles_pulse” channel into a Trail CHOP with the “Window Length” parameter set to 10 (your previous delay time) and then trimming to the first sample with a Trim CHOP, this will give you a 10s delayed trigger for the delayed Count CHOP. The Trail CHOP itself is also reset with the “timer_pulse” channel.
Another benefit is that there is no scripting required.
Hello @snaut , Thank you so much for your post. It was the solution i needed. I was already suspecting there was a better way to directly interact with the clock of the project and using those extra outputs from the timer module was exactly what i needed.