Resample CHOP

From TouchDesigner 099 Wiki


The Resample CHOP resamples an input's channels to a new sample rate and/or start/end interval. In all cases, the entire input interval is resampled to match the output interval.

Resample does a simple linear interpolation of the Time Slice in Time Slicing mode. Only the sample rate can be changed.

PythonIcon.png resampleCHOP_Class

Parameters - Resample Page

Method - The resample method to apply to the channels:

  • Same Rate, New Interval - Stretches or compresses the channels like the Stretch CHOP.
  • New Rate, Same Time Range - Changes the sample rate without changing the time-length of the CHOP.
  • New Rate, Same Index Range - Changes the sample rate without changing the number of samples in the CHOP.
  • New Rate, New Interval - Changes both the sample rate and stretches/compresses the CHOP.

Sample Rate - The new sample rate.

Unit Values - Determines how the 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 and end positions.

Quaternion Blend - Uses quaternions to blend between samples.

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 output has more samples. Averages all samples near the new sample when the output has fewer samples.
  • 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 proceeded and followed by zero-value samples.

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

Correct For Cycles - If enabled, compensates for cyclic channels (such as angles) by always choosing the shortest step between samples, like 360 to 0 for angles.

Cycle Length - The length of the cycle. 360 is typical for angles.

Standard Options and Local Variables

There are no local variables.