rsc3/doc-schelp/HelpSource/Classes/PulseCount.schelp

42 lines
577 B
Text
Raw Normal View History

2022-08-24 13:53:18 +00:00
class:: PulseCount
summary:: Pulse counter.
related:: Classes/Stepper
categories:: UGens>Triggers
Description::
Each trigger increments a counter which is output as a signal.
classmethods::
method::ar, kr
argument::trig
Trigger. Trigger can be any signal. A trigger happens when the
signal changes from non-positive to positive.
argument::reset
Resets the counter to zero when triggered.
Examples::
code::
SynthDef("help-PulseCount",{ arg out=0;
Out.ar(out,
SinOsc.ar(
PulseCount.ar(Impulse.ar(10), Impulse.ar(0.4)) * 200,
0, 0.05
)
)
}).play;
::