TWID #16: Parametric Visuals in TouchDesigner
Using tempo to control parameters of a visual system in TouchDesigner.
This week I did some tweaking to my VJ System and prepared for a performance.
The core of the system I used are a bunch of smaller systems that all have the same input parameters which can be controlled by tempo related modulators. While doing this I noticed one thing that I think is worth sharing.
Modulate Parameters
When building parametric systems to produce visuals, I like it when they have some life on their own, even when no parameter is changed. A good way to do this, is to use a constantly increasing number and hook it up to parameters like:
Rotation
Noise Position
Ramps for a Lookup
Approach 1 - Using Time
To get a constant increasing number is one of the first lines of python every TouchDesigner student will encounter.
The expression absTime.seconds gives you the time passed since the program started. While this is a very nice technique to do many things, it lacks off one crucial thing. The ability to adapt to different tempos played.
Approach 2 - Using Tempo
A similar way to do this, is the Beat CHOP, which can produce all kind of values:
Ramps
Pulses
Count Ramp (A constantly increasing number)
This is exactly what we need, because all those values are related to the main tempo.
Meaning that if you, for example connect the count ramp output from the Beat CHOP to the rotation of some geometry, it will spin faster if the tempo is higher.
Changing Tempo with a Script
There is a simple script that can change the global tempo.
op('/local/time').par.tempo = 120You can simply use a Constant CHOP and attach at CHOP Execute Dat to it.
Using global Resets
While a Beat CHOP takes its tempo from the global bpm, if you have many of them, they will all run in their own little cycle. Meaning that each ramp that is set at the same multiplier will increase at the same rate, but they might be shifted in their cycle.
Reset Tempo
To solve this I use a global reset which I connect all Beat CHOPS to. Meaning that when I press this button they will all reset and start from the same cycle.
Reset Counts
This technique is also quite helpful for things like counts based on a trigger or other event. I often use this with a looping value and a math chop to make things move in a repeated style.
Reset Feedbacks
A global reset can also be used for feedback loops, this way you always start fresh from the same thing when you do that.
Conclusion
This doesn’t look like much, but when applied properly it is a really efficient way to build visuals that are related to tempo. Which in turn gives you the ability to map to all kind of musically related events by modulating parameters based on them.
Other things I did this week
Animations
Drawing
That’s it for this week. Hope you liked it.







