Nov 12 2014

Clock CHOP tutorial.

The Clock CHOP. TouchDesigner 088. 2014.
The Clock CHOP helps you control timings in TouchDesigner.

1
00:00:00,433 –> 00:00:03,600
Let’s take a look at the clock
CHOP.

2
00:00:03,600 –> 00:00:13,500
The clock CHOP can help you keep
track of time, and manage time,
and it has a large set of
parameters to help you do this.

3
00:00:13,500 –> 00:00:18,833
In this example I’ve set the
hour format to a 12 hour format.

4
00:00:18,833 –> 00:00:30,300
We’re going to use the clock
data to create a simple clock
display, by using a very complex
looking single line Python
expression.

5
00:00:30,300 –> 00:00:37,800
The 3 channels we are interested
in are “ampm”, “hour”, and
“min”.

6
00:00:37,800 –> 00:00:45,067
I’ve broken the contents of the
Python expression into segments
here in a text DAT.

7
00:00:45,067 –> 00:00:53,233
This is a good way to see the
difference between a multi line
and a single line Python
snippet.

8
00:00:53,233 –> 00:01:05,700
The Python code used in the text
TOP parameter named “text” has
exactly the same purpose and
output as the multi line code.

9
00:01:05,700 –> 00:01:12,267
To see the effect of the multi
line code, let’s start by
opening the textport.

10
00:01:12,267 –> 00:01:17,133
We can press the clear button to
reset the contents the textport.

11
00:01:17,133 –> 00:01:26,767
We middle mouse click over the
text DAT to pull up the context
menu, then select “Run Script”.

12
00:01:26,767 –> 00:01:28,100

13
00:01:28,100 –> 00:01:38,167
The second example network
illustrates a way to use the
clock CHOP to keep track of
Touch Designer specific timings.

14
00:01:38,167 –> 00:01:45,033
I select the “Since Program
Start” option of the Start
Reference parameter.

15
00:01:45,033 –> 00:01:51,333
The select CHOP allows us to use
only the channel we need, in
this case seconds.

16
00:01:51,333 –> 00:01:57,333
We will create an event that
happens every 10 seconds in
Touch Designer.

17
00:01:57,333 –> 00:02:08,500
I use the math CHOP to divide
the incoming seconds value by
10, then turn the resulting
floating point number into an
integer.

18
00:02:08,500 –> 00:02:16,133
We now have a count of every
tenth second that has elapsed
since Touch Designer started.

19
00:02:16,133 –> 00:02:27,733
Now I use a chop execute DAT to
create a customized event that
will run every time the math
CHOP changes.

20
00:02:27,733 –> 00:02:40,533
In this case, every 10th second
that has elapsed will cause the
phrase “Time To DO SOMETHING” to
be printed to the textport.

21
00:02:40,533 –> 00:02:41,767

22
00:02:41,767 –> 00:02:49,167
The clock CHOP is a powerful
tool that can help you manage
timing logic in Touch Designer.

23
00:02:49,167 –> 00:02:51,167

Posted In
Tagged