Tap Tempo

From Derivative
Jump to: navigation, search


Being able to change and adjust your various tempi on the fly is crucial for many live oriented projects. While there is an easily accessible Tap Tempo & Listen button in the Beat Dialog, many performers would rather have a hardware or external option. In TouchDesigner you can quickly create a few Scripts to replicate the Tap Tempo and Listen button, allowing you to adjust your desired Time COMP from any hardware or external software.

Start by creating a DAT (i.e. CHOP Execute DAT, DAT Execute DAT, etc.) and entering the command:

opparm /path/to/time tempo `execute("beat -t")`


1) /path/to/time is the path to the Time COMP you want to change

2) Those are back-ticks around the expression, NOT single quotations (use the tilde key)!

This script functions in the same way as the Tap Tempo button in the Beat Dialog, and can be quickly mapped to hardware and multiple Time COMP's around your project.

Proceed to create another DAT and enter the following command:

beat -b $BPM

The function of this Script is to reset the tempo averaging calculations. For instance, if you tap in a tempo using the first Script, then go to tap in another after a minute, your tempo would drop significantly when you went to tap in the new tempo, as the passing minute of inactivity has been added to the tap tempo averaging calculations. The second Script is similar to activating the Listen button in the Beat Dialog, except that it should be triggered after you're finished tapping in a tempo or before you start tapping in a new tempo (either works).



Start by opening the TapTempoExample.toe (link above) and opening the Beat Dialog.

The Scripts in this project are being run inside of CHOP Execute DATs and are controlling the main Time COMP (found in /local). As you click with your mouse on the Tap Tempo momentary button, you will see the tempo in the Beat Dialog changing.

The TUIK buttons are connected to a Null CHOPs, which are being read by the CHOP Execute DATs and being executed with the "Off to On" setting (i.e. trigger only on button push).

If you wanted to map your specific hardware or software to the Scripts, you would simply add an OSC In CHOP or MIDI In CHOP, and then connect its output to the Null CHOP or the TUIK buttons in the example project file.

In the screenshot below (from another project), there is an OSC In CHOP being read directly from a CHOP Execute DAT with the Tap Tempo script in it (see highlighted DAT, chopexec1).


A set of commands located in a Text DAT that are triggered to run under certain conditions. There are two scripting languages in TouchDesigner: Python and the original Tscript. Scripts and single-line commands can also be run in the Textport.

TOuch Environment file, the file type used by TouchDesigner to save your project.

TouchDesigner User Interface Kit - A collection of User Interface components.