Docs CHOPs & sensing
ChopBank
A bank of channel processors: one block per channel, each with its own range, exponent curve, zero-below, lag and speed mode, built from the input with one Snap Input, with gain before and after and every block promoted as a property. An alternative for the Math CHOP and the Constant CHOP.
∿ CHOPs & sensing ◆ Patreon · Base OP Create menu entry
Why use it
The faders on a controller rarely want the same treatment. The master fader wants a gentle curve, a rotation fader wants a wide range and some lag, a speed knob should keep a value moving. With stock CHOPs, or one ChopProcess for the whole controller, that means splitting the channels apart and building a chain for each one.
ChopBank shapes a whole controller in one node. Every block in the bank is one channel with its own processing: the ChopProcess chain, set per channel. A bank of eight faders, each with its own range and feel, is one node.
Features
- Shape each channel with its own blockEach block shapes one channel with its own range remap, exponent curve, Zero Below, lag, and a speed mode that turns it into a running total.
- Build the bank with Snap InputOne press makes a block for every incoming channel, named after it and holding its value; a new block copies the previous block's settings.
- Add channels the input lacksA block with no matching input channel outputs its own Value, so the bank can add channels.
- Gain before and afterMaster gain on every channel before the blocks and after them.
- Replace a Math or Constant CHOPCreate a Math CHOP or Constant CHOP with the alternatives shortcut held and ChopBank is offered in its place, wired into the same spot.
- Blocks as propertiesEach block is a property on the node, so Python reads and sets its Value by name.
How to use it
- Create it from the FNS tab of the OP Create dialog. Or create a Math CHOP or a Constant CHOP with the alternatives shortcut held, pick ChopBank, and it lands in that spot with the wiring kept.
- Wire your controller into it and press Snap Input. ChopBank makes one block per incoming channel, named after it and holding its current value.
- Tune each block on the Bank page: From Range and To Range to remap, Type to clamp, loop or zigzag outside the range, Exponent Value for the curve, Lag to smooth. Is Speed turns a block into a running total, for a knob that should keep a value moving.
A new block starts with the settings of the block before it, so a row of similar faders is quick: tune one, then add blocks after it.
How blocks find their channels:
- A block takes the input channel its Name matches. With Name empty, it takes the channel at its own position.
- When no input channel matches, the block outputs its own Value. That way a bank can also add channels that are not in the input, or work with no input at all, like a Constant CHOP.
Gain Pre and Gain Post scale every channel before and after the blocks, a master level for the whole bank.
Blocks as properties
With Promote to Property on, each block is also a property on the node,
named after the block with its first letter capitalised: the block fader1
is op('chopBank1').Fader1, and Fader1_out reads that block's output.
bank = op('chopBank1')
bank.Fader1 = 0.5 # set the Value of the block named fader1
level = bank.Fader1.eval() # the property is the Value parameter itself
out = bank.Fader1_out # the block's output channel
- Setting the property sets the block's Value, which is what the block outputs while no input channel matches it.
- Setting it does nothing while that Value is driven by an expression or an export.
- Property Prefix ships empty. If a block's name clashes with something
already on the COMP, the node shows a script error naming it; a prefix such
as
C_turnsFader1intoC_Fader1and clears the clash.
Input and output
- in1 (CHOP): the channels to process.
- out1 (CHOP): one processed channel per block.
Get it
This tool unlocks with Patreon. It installs through the same picker as everything else and unlocks with the Patreon Base tier or higher, connected from inside TouchDesigner. Everything else in the toolkit stays free and MIT, and the membership is what keeps that work moving.
Where it appears
- OP Create menu entryposition 0
Parameters
Bank
| Control | Type / default | What it does |
|---|---|---|
In ScopeScoperead-only |
text* | Which input channels the bank takes, as a pattern like fader* . Only asked when the input has more than one channel. |
Gain PreMastergainpre |
number1 | Gain on every input channel before the bank processes it. |
Gain PostMastergainpost |
number1 | Gain on every output channel after the bank. |
Snap InputSnapinput |
button | Rebuild the bank from the input: one block per channel, named after it and holding its current value. |
BankBank |
sequence0 | One block per channel. Add a block to process one more channel. |
NameBank0name |
textempty | The input channel this block processes, and its output name. Empty takes the channel at this block's position. A name the input does not have makes a new channel from Value. |
ValueBank0value |
number0 | The value this block outputs while no input channel matches it. |
| Math | ||
TypeBank0type |
menuOff | What happens outside the From Range: off lets values through, clamp holds them at the ends, loop wraps them round, zigzag bounces them back. |
From RangeBank0fromrange |
number0 | The input range. With Type set to clamp, loop or zigzag this is also the limit. |
To RangeBank0torange |
number0 | The output range the From Range maps onto. |
Zero BelowBank0zerobelow |
on / offoff | Output 0 while the input sits at the bottom of the From Range, instead of the bottom of the To Range. Only with Type set to clamp. |
Exponent ValueBank0expval |
number1 | Exponent for the curve between the ranges: 1 is linear, above 1 eases in, below 1 eases out. |
LagBank0lag |
number0 | Seconds to glide up and down toward a new value. |
| Speed | ||
Is SpeedBank0isspeed |
on / offoff | Treat the processed value as a speed and output its running total instead, so a held input keeps moving. |
Limit TypeBank0limittype |
menuOff | What happens when the running total leaves Minimum and Maximum. |
MinimumBank0min |
number0 | Lower limit for the running total. |
MaximumBank0max |
number1 | Upper limit for the running total. |
Reset ValueBank0resetvalue |
number0 | The value the running total returns to on reset. |
ResetBank0reset |
on / offoff | Hold the running total at the Reset Value while on. |
Reset PulseBank0resetpulse |
button | Return the running total to the Reset Value once. |
Common
| Control | Type / default | What it does |
|---|---|---|
Promote to PropertyPromote |
on / offon | Expose each block as a property on this COMP, named after the block, that reads and sets its Value. |
| To get/set values as .{prefix}{name} | ||
Property PrefixPrefix |
textC_ | Put in front of every property name, to keep them clear of other names on the COMP. |
| Author: Function Store (@function.str) | ||