Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / HelpSource / Classes / PulseCount.schelp
blob00cc48c5a1ceb39bbe67f2e6a89046d0afc45d00
1 class:: PulseCount
2 summary:: Pulse counter.
3 related:: Classes/Stepper
4 categories::  UGens>Triggers
7 Description::
9 Each trigger increments a counter which is output as a signal.
12 classmethods::
14 method::ar, kr
16 argument::trig
18 Trigger. Trigger can be any signal. A trigger happens when the
19 signal changes from non-positive to positive.
22 argument::reset
24 Resets the counter to zero when triggered.
27 Examples::
29 code::
31 SynthDef("help-PulseCount",{ arg out=0;
32         Out.ar(out,
33                 SinOsc.ar(
34                         PulseCount.ar(Impulse.ar(10), Impulse.ar(0.4)) * 200,
35                         0, 0.05
36                 )
37         )
38 }).play;