autocount

Created by Panaiotis
© 2001 by Panaiotis. All rights reserved.

General

Similar to counter object but with internal metro. Has a few additional features and slightly different behavior. autocount does not repeat the extremes when it reaches min or max in the updown or downup patterns. Changing min does not reset the current counter value. It has three additional patterns: oscillate, random, and follow. Its metro function has two modes, max, and accurate.

Input

  bang in leftmost inlet: trigger next output (same as counter). Does not affect the internal metro when auto trigger is on. It will force an immediate output.
  int in leftmost inlet: assigns value for next output without triggering the output.
  start starts the automatic trigger (internal metro). Does nothing if it is already on.
  stop stops the automatic trigger. Does nothing if it is already off.
  sync If autocount is running, sync will force output and reset the internal metro, otherwise same as start.
  repeat N When repeat 0 (default) the counter will be incremented with each bang. If repeat is non-zero autocount will output each value N+1 times before updating the next value.
reset next value will be the reset or initial value
reset N change the reset (initial) value to N. Does not change the count and only has an effect on the 'reset' message.

autocount patterns

  none no motion
  up ramp up from initial, min, or current value to max. Repeat ramp from min to max.
  down ramp down from initial, max, or current value to min. Repeat ramp from max to min.
  updown count from initial, min, or current value to max, then down. Repeats the triangle count. Does not repeat the extreme values during each cycle.
  downup count from initial, max, or current value to min, then up. Repeats the triangle count. Does not repeat the extreme values during each cycle.
  oscillate oscillate between min and max.
  random generate random values between min and max, inclusive.
  follow follow minimum. autocount seeks the most recently input min val. (See RCer for a more sophisticated version of this function.)
  wave N N represents one of the 8 count patterns listed in order above (including "none"). Values are 0-7.

 

Inlets other than the leftmost inlet. All integer values.

  in1 set minimum or lowest output value of autocount. Does not affect the immediate count.
  in2 set maximum or highest output value of autocount. Does not affect the immediate count. Maximum is ignored in follow pattern.
  in3 set step value: distance between output values. Step is ignored in oscillate and random patterns.
  in4 int or float sets time in ms between iterations. min value is 1. Values less than 1 are changed to 1.

Arguments

(optional)

   The first argument may be a pattern symbol (see the patterns above) or an integer that indicates the pattern.
  The remaining arguments are integers:
initial value, min, max, step, and rate.

Output

From right to left:
   bang

hit max

  bang

between min and max

  bang

hit min

  int

value of autocount

Examples

See also

counter, RCer, fluctuate