Count CHOP

From Derivative
Revision as of 04:23, 17 May 2021 by Ben (talk | contribs)
Jump to navigation Jump to search

Summary
[edit]

The Count CHOP counts the number of times a channel crosses a trigger or release threshold. It operates in either static or realtime ("Cook to Current Frame") mode.

The trigger value by default is 0, so the count occurs when the input goes from below (or equal to) 0 to a value that is greater than zero.

Crossing the trigger threshold (increasing past the trigger level) creates a trigger event. Similarly, crossing the release threshold (decreasing past the release level) creates a release event. Operations may also be performed while the input remain above or below the trigger or release levels. On each event, the count may be increased or decreased by 1 or the time, or reset to zero. The time per sample varies with the sample rate (i.e. for 100 samples/second, the time for each sample would be 1/100th of a second).

The optional second input is a reset input. The first channel is interpreted as a channel containing reset pulses. Whenever this channel is non-zero, the count for all channels is reset.

The third input is labeled "Increment Value". It allows you to specify a value other than the default +-1 to count. If you want to count by Fives, then put a channel with a value of 5 in this input. It will increment by 5 each count, or by 5 per second depending on the On / Off menus on the second page.

PythonIcon.pngcountCHOP_Class


Parameters - Trigger Page

Release = Trigger Threshold threshold - If on, the trigger threshold is also used as the release threshold.

Trigger Threshold threshup - The channel level that must be exceeded in order to trigger a count.

Release Threshold threshdown - A release count is triggered when the channel level drops below this threshold.

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

Re-Trigger Delay Unit retriggerunit -

Trigger On triggeron - - 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.

  • Increasing Values increase -
  • Decreasing Values decrease -


Parameters - Count Page

Limit output - -

  • Off off -
  • Loop Min/Max loop - Will cycle in a loop between the values given by Limit Minimum / Maximum.
  • Clamp Min/Max min - Clamp will hold the count value at the maximum/minimum value if it goes above or below the limits.
  • Loop Min, Clamp Max lc - Will loop the count back between the limits by shifting the count to the maximum limit.
  • Clamp Min, Loop Max cl - Will loop the count back between the limits by shifting the count to the minimum limit.

Limit Minimum limitmin - The minimum allowed count number.

Limit Maximum limitmax - The maximum allowed count number.

Off to On offtoon - - The operation to perform when a trigger event (off to on) occurs.

  • None none -
  • Increase Count inc -
  • Decrease Count dec -
  • Increase Count by Time inctime -
  • Decrease Count by Time dectime -
  • Reset Count to Zero reset -

While On on - - The operation to perform while the input remains triggered (on).

  • None none -
  • Increase Count inc -
  • Decrease Count dec -
  • Increase Count by Time inctime -
  • Decrease Count by Time dectime -
  • Reset Count to Zero reset -

On to Off ontooff - - The operation to perform when a release event (on to off) occurs.

  • None none -
  • Increase Count inc -
  • Decrease Count dec -
  • Increase Count by Time inctime -
  • Decrease Count by Time dectime -
  • Reset Count to Zero reset -

While Off off - - The operation to perform while the input is not triggered (off).

Note: The scripts are run relative to the parent node of this CHOP, as if the script is in the node above this CHOP.

  • None none -
  • Increase Count inc -
  • Decrease Count dec -
  • Increase Count by Time inctime -
  • Decrease Count by Time dectime -
  • Reset Count to Zero reset -

Reset Condition resetcondition - - This menu determines how the Reset input triggers a reset of the channel(s).

  • Off to On offtoon - Channels are reset when the Reset input goes off to on.
  • While On on - Channels are reset when the Reset input goes on. The channel will hold the reset value until the input turns off.
  • On to Off ontooff - Channels are reset when the Reset input goes on to off.
  • While Off off - Channels are reset when the Reset input goes off. The channel will hold the reset value until the input turns on.

Reset Value resetvalue - The channel(s) is set to this value when reset.

Reset reset - When On resets the channel(s) to the Reset Value. The Count CHOP will only begin counting again when Reset is Off.

Reset Pulse resetpulse - Instantly resets the channel(s) to the Reset Value.


Parameters - Common Page

Time Slice timeslice - Turning this on forces the channels to be "Time Sliced". A Time Slice is the time between the last cook frame and the current cook frame.

Scope scope - To determine which channels get affected, some CHOPs use a Scope string on the Common page.

Sample Rate Match srselect - - Handle cases where multiple input CHOPs' sample rates are different. When Resampling occurs, the curves are interpolated according to the Interpolation Method Option, or "Linear" if the Interpolate Options are not available.

  • Resample At First Input's Rate first - Use rate of first input to resample others.
  • Resample At Maximum Rate max - Resample to the highest sample rate.
  • Resample At Minimum Rate min - Resample to the lowest sample rate.
  • Error If Rates Differ err - Doesn't accept conflicting sample rates.

Export Method exportmethod - - This will determine how to connect the CHOP channel to the parameter. Refer to the Export article for more information.

  • DAT Table by Index datindex - Uses the docked DAT table and references the channel via the index of the channel in the CHOP.
  • DAT Table by Name datname - Uses the docked DAT table and references the channel via the name of the channel in the CHOP.
  • Channel Name is Path:Parameter autoname - The channel is the full destination of where to export to, such has geo1/transform1:tx.

Export Root autoexportroot - This path points to the root node where all of the paths that exporting by Channel Name is Path:Parameter are relative to.

Export Table exporttable - The DAT used to hold the export information when using the DAT Table Export Methods (See above).


Operator Inputs

  • Input 0 -
  • Input 1 -
  • Input 2 -

TouchDesigner Build:

CHOPs
Ableton Link • Analyze • Angle • Attribute • Audio Band EQ • Audio Device In • Audio Device Out • Audio Dynamics • Audio File In • Audio File Out • Audio Filter • Audio Movie • Audio NDI • Audio Oscillator • Audio Para EQ • Audio Play • Audio Render • Audio Spectrum • Audio Stream In • Audio Stream Out • Beat • Bind • BlackTrax • Blend • Blob Track • Bullet Solver • Clip Blender • Clip • Clock • Composite • Constant • Copy • Count • CPlusPlus • Cross • Cycle • DAT to • Delay • Delete • DMX In • DMX Out • Envelope • EtherDream • Event • Expression • Extend • Face Track • Fan • Feedback • File In • File Out • Filter • FreeD • Function • Gesture • Handle • Helios DAC • Hog • Hokuyo • Hold • Import Select • In • Info • Interpolate • Introduction To s Vid • Inverse Curve • Inverse Kin • Join • Joystick • Keyboard In • Keyframe • Kinect Azure • Kinect • Lag • Laser • Leap Motion • Leuze ROD4 • LFO • Limit • Logic • Lookup • LTC In • LTC Out • Math • Merge • MIDI In • MIDI In Map • MIDI Out • Mouse In • Mouse Out • NatNet In • Ncam • Noise • Null • Object • Oculus Audio • Oculus Rift • OpenVR • OSC In • OSC Out • Out • Override • Panel • Pangolin • Parameter • Pattern • Perform • Phaser • Pipe In • Pipe Out • PosiStageNet • Pulse • RealSense • Record • Rename • Render Pick • Reorder • Replace • Resample • S Curve • Scan • Script • Select • Sequencer • Serial • Shared Mem In • Shared Mem Out • Shift • Shuffle • Slope • SOP to • Sort • Speed • Splice • Spring • Stretch • Stype • Switch • Sync In • Sync Out • Tablet • Time Slice • Timeline • Timer • TOP to • Touch In • Touch Out • Trail • Transform • Transform XYZ • Trigger • Trim • Warp • Wave • WrnchAI • ZED