TouchDesigner Starter Article 7

Parameters & Expressions

How to control operator parameters in TouchDesigner — typing values, writing Python expressions, referencing other operators, and using CHOP exports.

⏱ 12 min touchdesigner parameters expressions python CHOP-reference

Parameters: The Controls for Every Operator

Every operator in TouchDesigner has a set of parameters — the knobs, sliders, toggles, menus, and text fields that determine what it does and how it behaves. When you click an operator, its parameters appear in the Parameter Dialog on the right side of the screen. Tabs at the top of the dialog separate the parameters into logical groups.

Understanding parameters is understanding half of TouchDesigner. You can build the most sophisticated network imaginable, but if you do not know how to drive the parameters of each node, the network cannot do anything interesting.

Parameter Types

Float / Integer fields: The most common type. A slider and a number box side by side. Drag the slider, or click the number and type a value. Hold Ctrl while dragging to fine-tune. The Level TOP’s Brightness and Contrast parameters are floats. The Noise TOP’s Seed is an integer.

Toggle: An on/off checkbox. Examples: Level TOP > Invert, Blur TOP > Extend Right.

Menu (dropdown): Selects from a fixed list of options. Examples: Noise TOP > Type (Sparse, Alligator, Hermite, etc.), Composite TOP > Operation (Over, Add, Multiply, Screen, etc.).

String / File Path: A text field. Examples: Movie File In TOP > File, Text DAT > the body of the DAT. Click the field and type or paste. A folder icon beside a file path opens a system file browser.

XY / XYZ / UV: Two or three linked float fields for positional or vector values. Examples: Transform TOP > Translate, Camera COMP > Look At.

RGBA: Four float fields (red, green, blue, alpha), often accompanied by a colour swatch. Click the swatch to open a colour picker.

Typing Values and Using Sliders

The simplest way to set a parameter is to type into it. Click on a float field to select it, type a number, press Enter. For sliders, the left side of the slider corresponds to the minimum value and the right side to the maximum. Drag right to increase, left to decrease.

Precision dragging: Hold Ctrl while dragging a slider to slow the movement to fine-tuning speed. This is essential for parameters where you need exact control, like colour channel values.

Resetting to default: Right-click a parameter label and choose Set to Default, or press D while hovering over the parameter. Right-clicking also reveals Set to Minimum, Set to Maximum, and a field showing the parameter’s internal name — useful for scripting.

Expression Mode

Every parameter can be switched from a static value to a Python expression that evaluates every frame. Right-click a parameter label and choose Expression, or click the small circle at the far right of a parameter row (the circle turns into a small = icon in expression mode).

When a parameter is in expression mode, the field turns into a Python expression input. Whatever Python expression you type is evaluated every frame, and the result becomes the parameter value.

Useful Expressions

Time-based animation:

absTime.seconds

Returns the number of seconds since TouchDesigner launched. Use it to drive any parameter you want to animate over time.

absTime.seconds * 0.5

Half speed.

math.sin(absTime.seconds * 2) * 0.5 + 0.5

A sine wave oscillating between 0 and 1 at 2 cycles per second. math.sin is available in the expression context — the standard Python math module is imported automatically.

Self-referencing:

me.par.tx + 1

The me keyword refers to the operator the expression is inside. me.par.tx reads the operator’s own tx (Translate X) parameter. This particular expression creates an infinite growth loop — be careful.

Frame-based:

absTime.frame / 100

Increases by 0.01 per frame. At 60 FPS this completes a 0-to-1 ramp in about 1.67 seconds.

The op() function:

op('noise1').par.roughness

Reads the Roughness parameter from the operator named noise1. This is how you propagate a single control value across multiple operators — set it on one node, reference it on many.

Parameter Indicators

After setting an expression, look at the parameter label. It now shows a small indicator to its left:

  • Green = : the parameter has an active Python expression.
  • Yellow = : the parameter has an active CHOP export (see below).
  • Grey = : no expression or export; the parameter holds a static value.

Clicking the green indicator toggles the expression on and off, letting you compare the animated and static states.

Referencing Other Operators with op()

The op() function is the primary way to access other operators in TouchDesigner scripting. Its argument is a string: the operator’s name, or a path relative to the current operator.

op('math1')['chan1']

Reads the current value of channel chan1 from the Math CHOP named math1. This is equivalent to a CHOP reference (below) but written as an explicit expression.

op('../lfo1')['sine']

The .. prefix moves up one level in the COMP hierarchy before looking for lfo1. Use this when the operator you are referencing is in the parent COMP rather than the current one.

op('/project1/base1/noise1').par.roughness

An absolute path starting from /project1. Absolute paths work anywhere but break if you rename parent COMPs.

Best practice: Use relative paths inside reusable components (COMPs you plan to save as .tox files and share). Use absolute paths for top-level connections in non-reusable project files where stability is more important than portability.

CHOP Exports: Live Parameter Driving

The most direct way to connect a CHOP to a parameter is a CHOP Export. This is not an expression — it is a direct binding that the engine evaluates more efficiently than a Python expression.

Method 1: Drag-and-drop. Hold Ctrl and drag from the output dot of a CHOP onto a parameter field in the Parameter Dialog. A dialog asks you to select which channel to bind. After confirming, the parameter turns yellow, indicating a live CHOP export.

Method 2: Right-click. Right-click a parameter label and choose Add Reference. A picker appears that lets you navigate to a CHOP and select a channel.

Method 3: The Export Table. Inside a CHOP, look at the Chan tab in its parameters. You can also set up exports through the Export CHOP, which uses a Table DAT to map CHOP channels to operator parameters anywhere in the project.

With a CHOP export active, the parameter value is overridden every frame by the CHOP channel value. You cannot manually type a value while the export is active. To disconnect it, right-click the parameter and choose Remove Export.

Practical Example: LFO Driving Brightness

  1. Press Tab, add an LFO CHOP.
  2. In the LFO CHOP’s parameters: set Frequency to 0.5 (half a cycle per second), Amplitude to 0.5, Offset to 0.5. This creates a channel that oscillates between 0 and 1.
  3. Ctrl+drag from the LFO CHOP’s output onto the Brightness parameter of your Level TOP.
  4. The Level TOP’s brightness now pulses smoothly at half a cycle per second.

The Export Flag

When you Ctrl+drag a CHOP channel onto a parameter, TouchDesigner sets an Export flag on the receiving CHOP. Look at the CHOP’s tile — you will see a small E badge. This flag tells the engine to push that channel’s value to all exported parameters every frame. If you rename the CHOP, the exports break (the exported parameters look for the old name). After renaming, recreate the exports.

Constant Values vs. Expressions vs. Exports: When to Use Which

Approach Best for
Static value Fixed settings that will not change during a performance.
Python expression Time-based animation, mathematical functions, self-referencing, anything that involves a formula.
CHOP export Live data from audio, sensors, MIDI, OSC, or any continuously updating signal.

You can combine approaches. A Level TOP might have its Brightness driven by an LFO export (live, rhythmic), its Gamma driven by math.sin(absTime.seconds) (smooth, mathematical), and its Invert set to a static 0 (never changes).

The Python Context in Parameters

TouchDesigner parameter expressions run in a trimmed-down Python context. The following are automatically available:

  • me — the operator the expression is on.
  • op() — access any other operator by name or path.
  • absTime — global time object (absTime.seconds, absTime.frame, absTime.rate).
  • math — the Python math module (sin, cos, pi, sqrt, etc.).
  • tdu — TouchDesigner utilities (linear interpolation, colour conversion, etc.).
  • project — the project object (fps, resolution).
  • ui — the UI state (mouse position, window size).

You do not need to import these — they are pre-imported in the expression context. Full Python scripts (in Script DATs) have access to the entire Python standard library in addition to these TD-specific globals.

The next tutorial covers time in depth — both absolute time and local component time, and how to build rhythmic animations using CHOPs.