Events in TouchDesigner are single-moment occurrences that are generated from a variety of conditions - from input actions that a user causes, from external devices and software, and from internal TouchDesigner states caused by things like timers and values crossing thresholds.
A variety of operators (mostly DATs) respond to events. Each one has python callback functions in a DAT that enable a user to write code to react to events.
TouchDesigner is a Procedural pull-based system (outputs to displays, audio devices and other destinations cook the nodes it needs to generate the outputs). But it is also a push system based on operators that respond to events.
The event operators respond to events they receive via their python callback functions. The callbacks can cause other operators to change and cook via their parameters, table cells, extension properties, storage.
Operators that Respond to Events
The operators that respond to events are:
The groups of "Execute" DATs that respond to changes within TouchDesigner:
The DATs that respond to user interface interactions:
Operators that react to external events:
- MIDI In DAT, MIDI Event DAT
- OSC In DAT
- Serial DAT
- TCP/IP DAT
- WebSocket DAT
- Web Client DAT
- Web Server DAT
- UDP In DAT
- Art-Net DAT
- Folder DAT
- Monitors DAT
- MQTT Client DAT
Operators that run scripts when some of their their parameters are pulsed:
And operators that react to event pulses:
- Trigger CHOP
- Speed CHOP
- Count CHOP
- the numerous operators that react to Initialize and Start pulses.
Operators like OP Find DAT and Folder DAT, have callbacks that are called when conditions change. The callbacks can then change parameters and subsequently cause nodes to cook.
Pulse type parameters of operators can be pulsed using
OP.par.parname.pulse(). Custom Pulse type parameters can cause the pulse callback in a Parameter Execute DAT.
Other Causes of Scripts Running
The Script operators (Script CHOP, Script DAT, Script TOP, Script SOP) are not event nodes - they are part of the pull system and will cook when TouchDesigner determines it depends on some other data in TouchDesigner - channels, parameters, table cells, extension properties, storage.
When the event operators change parameters or other data, the target nodes will then cook according to the pull-system cooking rules.
Note: You can force a node to cook by calling
OP.cook(). Its data is passed downstream according to the cooking rules.
See also: Cook, Event CHOP, Procedural