Events in TouchDesigner are generated from a variety of conditions - from actions that a user causes, from external devices and software, and from internal TouchDesigner states.
A variety of operator types respond to events. Each 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 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.
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
- Monitors DAT
- MQTT Client DAT
And operators that run scripts when some of their their parameters are pulsed:
When the event operators change parameters or other data, the target nodes will then cook according to the pull-system cooking rules.
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.
Note: You can force a node to cook by calling
OP.cook(). Its data is passed downstream according to the cooking rules.