Trigger CHOP

From TouchDesigner 088 Wiki


The Trigger CHOP starts an audio-style attack/decay/sustain/release (ADSR) envelope to all trigger pulses in the input channels. A trigger point occurs whenever the first input's channel increases across the trigger threshold value. Most commonly, an ADSR starts when the input goes from 0 to 1.

The envelope consists of six major sections: delay, attack, peak, decay, sustain and release.

From the time the threshold is reached and while the channel's value is above the release threshold, the envelope is in its sustain phase during which it will delay, attack, peak-hold, decay and then maintain its sustain value.

After the inputs drops below the release threshold, the envelope start its release phase and will drop to 0.

The peak and sustain levels can be set independently, but peak value can never be less than sustain.

If you don't connect an input to the Trigger CHOP and you set it to Time Slice off, a single full envelope is generated.

This CHOP works with both time-sliced inputs or with static input channels.

Note: See examples in OP Snippets.

See also: Timer CHOP, Count CHOP, Speed CHOP, Event CHOP

PythonIcon.png triggerCHOP_Class

Parameters - Trigger Page

Release = Trigger Threshold - If on, the trigger and release thresholds are the same value.

Trigger Threshold /threshup - The trigger threshold (see above).

Release Threshold /threshdown - The release threshold (see above).

Re-trigger Delay /retrigger - The amount of time after a trigger point that a new trigger may occur.

Min Trigger Length /mintrigger - The minimum amount of time that the trigger will remain active.

Trigger On - Determines whether a trigger occurs on an increasing slope or decreasing slope when passing the trigger threshold. A release will occur on the opposite slope.

Parameters - Attack Page

Delay Length - The amount of time to delay the envelope after the trigger point.

Attack Length /attack - The amount of rise time from zero to the peak level.

Attack Shape - The shape of the attack ramp.

Peak Level /peak - The peak level it will rise to in the attack phase.

Peak Length /peaklen - The length of time of the peak is held before going into the decay phase.

Parameters - Sustain Page

Decay Length /decay - The amount of decay time from the peak level to the sustain level.

Decay Shape - The shape of the decay ramp.

Sustain Level /sustain - The sustain level. This level is held until a release point is reached (the input goes below the threshold).

Release Length /release - The amount of release time from the sustain level to zero.

Release Shape - The shape of the release ramp.

Parameters - Channel Page

Channel Name - Name of channels output.

Specify Rate - Allows you to specify the sample rate in the Sample Rate parameter below.

Sample Rate /rate - Sets the sample rate of the output. Only used when Specify Rate is turned on.

Complete Envelope - If on, a complete envelope is produced for each trigger point. If off, the envelope may be terminated at any time by a release point.

Remainder - See Remainder Options. What to do with remaining samples at end of the interval:

  • Discard Remainder - Output interval = input interval.
  • Make Output Longer - Output longer if envelope unfinished.
  • Mix Remainder to Beginning - Add remainder to samples at the start.

Standard Options and Local Variables

Local Variables: $C, $NC