Difference between revisions of "Tap Tempo"

From TouchDesigner Documentation
Jump to: navigation, search
(Tag: 2018.28070)
(Blanked the page)
(Tag: Blanking)
 
Line 1: Line 1:
  
== Explanation ==
 
 
 
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:
 
 
 
<code>opparm /path/to/time tempo `execute("beat -t")`</code>
 
 
 
Notes:
 
 
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:
 
 
 
<code>beat -b $BPM</code>
 
 
 
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).
 
 
== Examples ==
 
 
[[Media:TapTempoExample.toe]]
 
 
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 DAT]]s 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 CHOP]]s, which are being read by the [[CHOP Execute DAT]]s 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).
 
 
[[File:TapTempoTutorialPic.PNG|thumb|center|upright=4]]
 
 
 
[[Category:TouchDesigner Tips]]
 
[[Category:TDPages]]
 

Latest revision as of 22:26, 22 July 2019