Classes | UGens > Triggers

PulseCount : UGen : AbstractFunction : Object

Pulse counter.
Source: Trig.sc
Subclasses: SetResetFF

Description

Each trigger increments a counter which is output as a signal.

Class Methods

PulseCount.ar(trig: 0, reset: 0)

PulseCount.kr(trig: 0, reset: 0)

Arguments:

trig

Trigger. Trigger can be any signal. A trigger happens when the signal changes from non-positive to positive.

reset

Resets the counter to zero when triggered.

Inherited class methods

Instance Methods

Inherited instance methods

Examples

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;