Binding

From TouchDesigner Documentation
Revision as of 17:33, 19 February 2020 by Markus Heckmann (talk | contribs) (officializing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Binding is a Parameter Mode that ties two or more values together, where changing the value of any one of the bound values changes all of them. The actual value is stored in one place, whichever value is at the top of the bind chain, called the bind master. Parameters can be bind references, bind masters, or both. Table cells and bindCHOP channels can be bind masters only.

A bind chain is a tree of interconnected values that are linked by binding. A bind master can have multiple bind references, each of which can also be the bind master for other parameters. In other words, you can have one or more bind references bound to one bind master, and you can also set up a chain where parameter C is the bind reference of parameter B, which is the bind reference of parameter A.

A bind reference is a parameter in a fourth "Bind" Parameter Mode, and will show up as purple text in parameter dialogs. A bind reference's bind expression will resolve to it's master. It can only be changed via its its UI, it's val property, or its bind master. A bind reference does not use its constant, expression or export parameter modes.

The bind master is at the top of the bind chain and holds the current value. A Bind master parameter can have exports and expressions and generally works like any other parameter, but its value can also be changed indirectly by the bind references. Note: If a bind master parameter is changed by its references, it will enter constant mode.

Bind master table cells can be changed by changing the cell value or bind reference parameter values. Bind master channels, only available on the bindCHOP, can be changed by changing the CHOP's channel inputs or by changing the bind reference parameter values.


Setting Up by Using Bind Expressions[edit]

To set up bind references, set a parameter's Mode to Bind, then add a bind expression that points to the bind master, like op('lfo1').par.phase. The bind expression is accessed by expanding the parameter and typing into the lower entry field. The upper text entry area (available in some parameters) is used for changing the parameter's actual value, similar to constant mode. Setting up binding to table cells or bindCHOP channels is similar. Enter an expression to the object in the bind expression, e.g. op('table1')[0,0] or op('bind1')['chan1'].

The Period parameter is a bind target.

You can also set the bind expression using python: Par.bindExpr = string

Setting Up by Dragging[edit]

You can also set up binding between parameters by dragging. To bind parameters using the mouse, always drag the bind master to the bind reference. Drag the parameter name from the bind master's parameter dialog into the parameter name or entry field of the bind reference parameter. In the case of multi-value parameters, drag the name of the bind master onto the name of the bind reference. Once you have done this, select Bind from the popup menu that appears.

Binding is a Parameter Mode that ties two or more values together, where changing the value of any one of the bound values changes all of them. The actual value is stored in one place, whichever value is at the top of the bind chain, called the bind master. Parameters can be bind references, bind masters, or both. Table cells and bindCHOP channels can be bind masters only.

An Operator Family which operate on Channels (a series of numbers) which are used for animation, audio, mathematics, simulation, logic, UI construction, and many other applications.