Counter(input, min=0, max=100, dir=0, mul=1, add=0)
Integer count generator.
Counter keeps track of all triggers received, outputs the current count constrained within `min` and `max` range, and can be set to count up, down, or up-and-down.
Parent class : PyoObject
Parameters:
input : PyoObject Audio signal sending triggers. min : int, optional Minimum value of the count, included in the count. Defaults to 0. max : int, optional Maximum value of the count. excluded of the count. The counter will count up to max - 1. Defaults to 100. dir : int {0, 1, 2}, optional Direction of the count. Three possible values: 0 : up 1 : down 2 : up-and-down Defaults to 0.
Methods:
setInput(x, fadetime) : Replace the `input` attribute. setMin(x) : Replace the `min` attribute. setMax(x) : Replace the `max` attribute. setDir(x) : Replace the `dir` attribute.
Attributes:
input : PyoObject. Audio trigger signal. min : int. Minimum value. max : int. Maximum value. dir : int. Direction of the count.
Notes:
The out() method is bypassed. Counter's signal can not be sent to audio outs.
See also : Select
Examples:
>>> s = Server().boot() >>> s.start() >>> m = Metro(.125).play() >>> c = Counter(m, min=3, max=8, dir=2, mul=100) >>> a = Sine(freq=c, mul=.5).out()
Methods details:
Counter.setInput(x, fadetime=0.05): Replace the `input` attribute. Parameters: x : PyoObject New signal to process. fadetime : float, optional Crossfade time between old and new input. Defaults to 0.05. Counter.setMin(x): Replace the `min` attribute. Parameters: x : int new `min` attribute. Counter.setMax(x): Replace the `max` attribute. Parameters: x : int new `max` attribute. Counter.setDir(x): Replace the `dir` attribute. Parameters: x : int {0, 1, 2} new `dir` attribute.