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.
Parameters - Trigger Page
Release = Trigger Threshold - If on, the trigger threshold is also used as the release threshold.
/threshup - The channel level that must be exceeded in order to trigger a count.
/threshdown - A release count is triggered when the channel level drops below this threshold.
/retrigger - The amount of time after a trigger point that a new trigger may occur.
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 - Count Page
- Loop Min/Max - Will cycle in a loop between the values given by Limit Minimum / Maximum.
- Clamp Min/Max - Clamp will hold the count value at the maximum/minimum value if it goes above or below the limits.
- Loop Min, Clamp Max - Will loop the count back between the limits by shifting the count to the maximum limit.
- Clamp Min, Loop Max - Will loop the count back between the limits by shifting the count to the minimum limit.
Limit Minimum / Limit Maximum
/limitmin /limitmax >- The minimum and maximum allowed count number.
Off to On - The operation to perform when a trigger event (off to on) occurs.
While On - The operation to perform while the input remains triggered (on).
On to Off - The operation to perform when a release event (on to off) occurs.
While 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.
Reset Count - This button resets the channel(s) to the Reset Value.
Reset Condition - This menu determines how the Reset input triggers a reset of the channel(s).
- Off to On - channels are reset when the Reset input goes off to on.
- While 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 - channels are reset when the Reset input goes on to off.
- While Off - channels are reset when the Reset input goes off. The channel will hold the reset value until the input turns on.
Reset Value - The channel(s) is set to this value when reset.
Standard Options and Local Variables
$C - In scripts, the channel whose value has changed, starting from 0, and $V - the value of that channel.