Count CHOP

From Derivative
Jump to: navigation, 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 - This button resets the channel(s) to the Reset Value.

Reset Pulse resetpulse -


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).


CHOPs
Ableton Link • Analyze • Angle • Attribute • Audio Band EQ • Audio Device In • Audio Device Out • Audio Dynamics • Audio File In • Audio Filter • Audio Movie • Experimental:Audio NDI • Audio Oscillator • Audio Para EQ • Audio Play • Audio Render • Audio Spectrum • Audio Stream In • Audio Stream Out • Beat • BlackTrax • Blend • Experimental: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 • Fan • Feedback • File In • File Out • Filter • Function • Gesture • Handle • Helios DAC • Hog • Hokuyo • Hold • Experimental:Import Select • In • Info • Interpolate • Introduction To CHOPs id• Inverse Curve • Inverse Kin • Join • Joystick • Keyboard In • Keyframe • Kinect • Lag • 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 • Noise • Null • Object • Oculus Audio • Oculus Rift • OpenVR • OSC In • OSC Out • Out • Override • Panel • Parameter • Pattern • Perform • 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 • Switch • Sync In • Sync Out • Tablet • Time Slice • Timeline • Timer • TOP to • Touch In • Touch Out • Trail • Transform • Trigger • Trim • Warp • Wave • ZED

An Operator Family which operate on Channels (a series of numbers) which are used for animation, audio, mathematics, simulation, logic, UI construction, and many other applications.

To re-compute the output data of the Operators. An operator cooks when (1) its inputs change, (2) its Parameters change, (3) when the timeline moves forward in some cases, or (4) Scripting commands are run on the node. When the operator is a Gadget, it also cooks when a user interacts with it. When an operator cooks, it usually causes operators connected to its output to re-cook. When TouchDesigner draws the screen, it re-cooks all the necessary operators in all Networks, contributing to a frame's total "cook time".

The term "Frame" is used (1) in the Timeline, (2) as a time-unit in CHOPs, (3) as a time-unit in TOPs, and (4) with movies images which are read and created with TOPs.

To pulse a parameter is to send it a signal from a CHOP or python or a mouse click that causes a new action to occur immediately. A pulse from a CHOP is typically a 0 to 1 to 0 signal in a channel, and a pulse via python is via a .pulse() call on a pulse-type parameter, such as Reset in a Speed CHOP.

A Time Slice is the time from the last cook frame to the current cook frame. In CHOPs it is the set of short channels that only contain the CHOP channels' samples between the last and the current cook frame.

A parameter in most CHOPs that restricts which channels of that CHOP will be affected. Normally all channels of a CHOP are affected by the operator.

samples-per-second of a CHOP. Each CHOP in your network has a sample rate, whether it is used or not. The overall timeline has a "frame rate", which is the number of animation frames per second, generally your monitor display frequency.

Exporting is the connection of CHOP channels to parameters of operators. The output of each exporting CHOP is one or more channels, active only while the CHOP Viewer is on. The current value of a channel can be exported to a parameter of any operator, overriding that parameter's value. See Parameter.

An Operator Family that manipulates text strings: multi-line text or tables. Multi-line text is often a command Script, but can be any multi-line text. Tables are rows and columns of cells, each containing a text string.

The location of an operator within the TouchDesigner environment, for example, /geo1/torus1, a node called torus1 in a component called geo1. The path / is called Root. To refer instead to a filesystem folder, directory, disk file or http: address, see Folder.

Parameters in TouchDesigner are an operator's settings (numbers, menus, flags, strings, paths) which the user can alter. Parameters for any operator can be opened by right-clicking on the operator and selecting "Parameters..." A currently selected operator's parameters can be viewed in a Network Editor by pressing the keyboard shortcut 'p'.

TouchDesigner is a hierarchy of components. "root" is the top-most network in the hierarchy. The Path is simply /. A typical path is /project1/moviein1.