class library: SynthDef - lazy implementation of removeUGen
[supercollider.git] / HelpSource / Classes / Latch.schelp
blobfa510a750207d0725a2f7bec6f99605b2af86fe1
1 class:: Latch
2 summary:: Sample and hold
3 related:: Classes/Gate
4 categories::  UGens>Triggers
6 Description::
7 Holds input signal value when triggered.
10 classmethods::
12 method::ar, kr
14 argument::in
15 The input signal.
17 argument::trig
19 Trigger. Trigger can be any signal. A trigger happens when the
20 signal changes from non-positive to positive.
23 Examples::
25 code::
26 { Blip.ar(Latch.ar(WhiteNoise.ar, Impulse.ar(9)) * 400 + 500, 4, 0.2) }.play;
29 The above is just meant as example. LFNoise0 is a faster way to generate random steps:
30 code::
31 { Blip.ar(LFNoise0.kr(9, 400 ,500), 4, 0.2) }.play;