Stretch CHOP

From TouchDesigner 099 Wiki


The Stretch CHOP preserves the shape of channels and the sampling rate, but resamples the channels into a new interval. All data in the range is stretched or compressed to the new start and end positions.

A Reverse Interval parameter reverses the order of the samples of each channel.

PythonIcon.png stretchCHOP_Class

Parameters - Stretch Page

Interpolation - The interpolation method to use when resampling.

  • No Interpolation - Use the value of the nearest sample.
  • Linear - Use linear interpolation between samples when the interval is lengthened. Averages all samples near the new sample when the interval is shortened.
  • Cubic - Cubically interpolates between samples, for smoother curves than Linear. This method is not recommended for channels with sharp changes.
  • Pulse Preserve - A linear interpolation that recognizes single sample pulses and preserves their height and one sample width. A pulse is a non-zero value preceded and followed by zero-value samples.

Constant Area - If enabled, keeps the area under the channel constant by scaling the values of the channel.

Unit Values - Determines how Start/End parameters are interpreted:

  • Absolute - The value is the new start/end position.
  • Relative to Start/End - The value is a shift from the old start/end position.

Start / End - The CHOP's new start / end position.

Length Scale - Scales the length of the channel after determining the start/end interval. Good for doubling or halving the length.

Reverse Interval - Reverses the channel so that it plays backwards.

Standard Options and Local Variables

Local Variables: $C, $NC