Save a number after a certain time

Hello
How can it be possible in touchdesigner if we have only one number input, this first number is saved at the moment of program execution and then every 0.277777778 seconds and the first number is merged to the first channel and then to the second channel and so on until it reaches channel 18
Now 18 to 0.277777778 rejected actually 5 seconds
Now the same thing should be repeated and the stored number will be transferred to the first channel, then to the second channel, and so on
And we want the value of none of the channels to be changed until the time comes, and it should be changed at its own time, and the number should remain stored before that time.

In fact, that number should replace 0.7, but exactly at its own time Because it is not possible to store numbers in the shader

Hi @Sina_dallal_gadim,

You could use a Hold CHOP which allows to Sample values with an input trigger. The input trigger can com from multiple channels so the question would be how to create that.

A good way to generate a regular pulse can be the LFO CHOP. Set the Type parameter to “Pulse” and now see that it will pulse ones every 1 second. You want it to pulse though 3.6 times per second (18/5) hence increase the Frequency parameter from 1 to 3.6. Now append a Count CHOP and set the Limit parameter to “Loop Min/Max” while increasing the Limit Maximum to 17. The result is a channel that loops between 0 and 17 every 5 seconds. To create it’s own trigger per channel, now append a Fan CHOP and set the Channel Names parameter to “chan[1-18]”.
The Fan CHOP in the default “Fan Out” mode, takes the input channel value as an index and set’s the output channel of the same index as the input value to 1. Pass this as the trigger input into the Fan CHOP and you should see the result you were looking for.

Hope this helps
Markus
base_rotatingValueBuffer.tox (1.2 KB)