The Interactive & Immersive HQ

Timecode CHOP in TouchDesigner

Projects in TouchDesigner are often based on timelines. Whether it is having particles relate to a soundtrack or having a moment in a video triggering an action, it is essential to have a way to sync your actions to a timeline. With the latest 2023 update, a new Timecode CHOP makes the process more streamlined. This blog will cover the basics of what you need to know for the Timecode CHOP.

Timer CHOP vs Timecode CHOP

So what’s the difference between a Timer CHOP and a Timecode CHOP?
The Timecode CHOP generates timecode data (SMPTE or non-standard), whereas the Timer CHOP is more like a fancy stopwatch that you can program the output of based on your needs. The Timer CHOP can be great for timed events in a TouchDesigner app while the Timecode CHOP is more centered around working with timings that are related to other elements in the project that are likely to be repeated/scrubbed/jumped through (think broadcast or live events running on timecode).

Timecode CHOP in TouchDesigner

How does Timecode CHOP work?

The Timecode CHOP can be based on the network’s timeline; it can run sequentially, or you can have it reference an object, such as a Movie File In TOP. Previously, the quickest way to know where in a movie file you were was to use an Info CHOP and see where the video was in its index, which is essentially just a frame count. This process could be more intuitive especially when it comes to working with other apps and pipelines that would already be using something like SMTPE timecode. Now, when you change the Timecode CHOP’s Mode parameter to “Timecode Object,” you can reference the Movie File In TOP’s timecode object with Python and get the playhead of the movie file in native timecode format. This new .timecode object is also a great addition and exists behind the scenes for a lot of operators. You can see more about it at the reference link below:

https://docs.derivative.ca/Timecode

Timecode CHOP in TouchDesigner

Timecode with CHOP channel

Other than referencing a TOP, it can also use a CHOP with a frame counter. If you want to know the minutes, seconds, and frames (or generally have a timecode formatted counter based on a single frame counter), this lets you easily convert between the two.

In the image example below, I’m at frame 800 on a 24 FPS timeline. I can make a Constant CHOP with a value of 800 and a channel named “frame.” Then I can use a Timecode CHOP, set the Mode as “CHOP channel,” rate it to 24, and reference the Constant CHOP. The output you get is the exact timecode representation of that frame count. Note that the Constant CHOP must have a “frame” channel or the Timecode CHOP won’t know what it references.

Timecode CHOP in TouchDesigner

Get Our 7 Core TouchDesigner Templates, FREE

We’re making our 7 core project file templates available – for free.

These templates shed light into the most useful and sometimes obtuse features of TouchDesigner.

They’re designed to be immediately applicable for the complete TouchDesigner beginner, while also providing inspiration for the advanced user.

Timecode CHOP with Timer CHOP

The Timecode CHOP can also be based on a Timer CHOP. When you set the Mode as “Timecode Object,” you can see the elapsed Time based on the Timer CHOP. This one doesn’t need the “frame” channel as above because the Timer CHOP has the .timecode object behind the scenes.

Timecode CHOP in TouchDesigner

What if we reverse the two? Yes, you can also have the Timecode CHOP to drive a Timer CHOP. In the latest update, the Timer CHOP has an “External Timecode Object” parameter on the External page. There, you can reference your Timecode CHOP and have that drive your Timer CHOP. This can be great for when you’re working with Timer CHOPs internally in your project but you also need to generate and supply a bigger picture Timecode signal that you can feed to other platforms or apps.

Timecode CHOP in TouchDesigner

Wrap Up

The new Timecode CHOP has many practical uses that will make projects run more smoothly. Especially when you’re working in broadcast environments or on live events like concerts that will already have their whole infrastructure setup to run on timecode, this new operator and behind-the-scenes infrastructure for timecode support really helps a ton. Tracking time has just got a whole lot easier! This blog just covered the basics of this new handy CHOP; if you want to dive in deeper, you can look into the sample files in the Operator Snippets under the “Help” tab.