CHOP - Channel Operators (Data)
CHOPs are used for control signals, audio, and numeric data.
Key CHOPs
- Constant: Create numeric values.
- LFO: Generate oscillating signals (Sine, Square, etc.).
- Math: Scale, offset, or combine signals.
- Analyze: Find the average, peak, or sum of a channel.
- Select: Isolate specific channels from another CHOP.
- Trail: View the history of a signal over time.
Data Structure
CHOPs contain Channels (names like chan1 or tx) and Samples (values changing over time).
How to Use CHOPs
CHOPs are the nervous system of your TouchDesigner network, moving numbers from one place to another.
- Adding a CHOP: Open the OP Create Dialog (Tab) and select the CHOP family (green color).
- Generating Signals: Create a generator like an
LFOorConstantto produce channels. - Math and Processing: Use nodes like
Mathto scale/shift ranges (e.g., mapping -1 to 1 from an LFO to 0 to 255 for color), andFilterorLagto smooth abrupt changes in data. - Driving Parameters (Exporting vs. Referencing):
To use a CHOP changing value to drive a parameter on another node (e.g., rotating a geometry), you have two main methods:
- CHOP Reference (Python):
- Make the target node’s parameter active. Drag the CHOP channel onto the target parameter and select “CHOP Reference”.
- This writes a Python expression like
op('math1')['chan1']. - Pros: Extremely flexible. Cons: Slightly slower performance.
- Exporting (CHOP Export):
- Turn on the “Viewer Active” flag on the CHOP (bottom right corner). Click and drag the channel name directly onto the target parameter, and choose “Export CHOP”.
- A green highlight appears on the parameter.
- Pros: Significantly faster execution because it bypasses the Python interpreter. Preferred for high-frequency or numerous parameter updates.
- Binding (Bind CHOP/Python):
- Binding creates a two-way connection. If you bind a CHOP channel to a parameter, changing the parameter updates the CHOP, and changing the CHOP updates the parameter.
- You can bind by dragging a parameter to another parameter and selecting “Bind”, or by writing a Python expression starting with
op('someNode').par.someParam.bindMaster. - Pros: Essential for building interactive UIs where sliders need to both control logic and reflect external changes.
- Cons: Can sometimes lead to evaluation loops if not careful.
- CHOP Reference (Python):
(y) Return to CHOPs | (y) Return to The Operators | (y) Return to TouchDesigner | (y) Return to Home