The trigger signal which increments the counter. A
trigger happens when the signal changes from
non-positive to positive. Note that if the UGen is
created with the trigger initially high, the counter
will also be incremented immediately. Thus a
Stepper.kr(Impulse.kr(1))
will begin by outputting 1
. If you want to avoid this, you could their subtract
Impulse.kr(0)
from the trigger input, or set
resetVal
to hi
. E.g.
Stepper.kr(Impulse.kr(1), lo = 0, hi = 4, resetVal = 4)
will produce the sequence 0, 1, 2, 4, 0, ...
A trigger which resets the counter to resetVal
immediately.
The minimum value output. For a decremental step
value, the counter jumps to hi
if it were to fall
below lo
.
The maximum value output. For an incremental step
value, the counter jumps to lo
if it were to rise
beyond hi
. Note that values greater than 0x7FFFFFBF
(the default) cause numeric overflow and the UGen to
malfunction.
The amount by which the counter increases or decreases
upon receiving triggers. Note that if you use a
decremental counter, still lo
must be the minimum and
hi
must be the maximum value output. If lo
> hi
,
the UGen behaves wrongly. In the case of decremental
counter, set resetVal
to hi
. E.g. to count from 4
down to 0, use
Stepper.kr(trig, lo = 0, hi = 4, step = -1, resetVal = 4)
, or, if you want to ignore an initial high trigger, you
could do
Stepper.kr(Impulse.kr(1), lo = 0, hi = 4, step = -1, resetVal = 0)
-- so resetVal
is lo
but due to the initial trigger
from Impulse
the Stepper
will in fact start
outputting from 4
.
The trigger signal which increments the counter. A
trigger happens when the signal changes from
non-positive to positive. Note that if the UGen is
created with the trigger initially high, the counter
will also be incremented immediately. Thus a
Stepper.kr(Impulse.kr(1))
will begin by outputting 1
. If you want to avoid this, you could their subtract
Impulse.kr(0)
from the trigger input, or set
resetVal
to hi
. E.g.
Stepper.kr(Impulse.kr(1), lo = 0, hi = 4, resetVal = 4)
will produce the sequence 0, 1, 2, 4, 0, ...
A trigger which resets the counter to resetVal
immediately.
The minimum value output. For a decremental step
value, the counter jumps to hi
if it were to fall
below lo
.
The maximum value output. For an incremental step
value, the counter jumps to lo
if it were to rise
beyond hi
. Note that values greater than 0x7FFFFFBF
(the default) cause numeric overflow and the UGen to
malfunction.
The amount by which the counter increases or decreases
upon receiving triggers. Note that if you use a
decremental counter, still lo
must be the minimum and
hi
must be the maximum value output. If lo
> hi
,
the UGen behaves wrongly. In the case of decremental
counter, set resetVal
to hi
. E.g. to count from 4
down to 0, use
Stepper.kr(trig, lo = 0, hi = 4, step = -1, resetVal = 4)
, or, if you want to ignore an initial high trigger, you
could do
Stepper.kr(Impulse.kr(1), lo = 0, hi = 4, step = -1, resetVal = 0)
-- so resetVal
is lo
but due to the initial trigger
from Impulse
the Stepper
will in fact start
outputting from 4
.
A pulse counting UGen. Each trigger increments a counter which is output as a signal. The counter wraps inside the interval from
lo
tohi
(inclusive). That if you use alo
other than zero, you might want to adjustresetVal
as well.Stepper
always starts with the value inresetVal
, no matter whatlo
is or whether thereset
trigger is high or not.Examples
PulseCount