Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / HelpSource / Classes / Lag.schelp
blobc5b9bee8bbd82db1586c50b3df5d1d3c158c872b
1 class:: Lag
2 summary:: Exponential lag
3 related:: Classes/Lag2, Classes/Lag3, Classes/VarLag, Classes/LagUD
4 categories::  UGens>Filters>Linear
7 Description::
8 This is essentially the same as  link::Classes/OnePole::  except that
9 instead of supplying the coefficient directly, it is calculated from a 60
10 dB lag time. This is the time required for the filter to converge to
11 within 0.01% of a value. This is useful for smoothing out control
12 signals.
14 For linear and other alternatives, see link::Classes/VarLag::.
16 classmethods::
18 method::ar, kr
20 argument::in
22 The input signal.
25 argument::lagTime
27 60 dB lag time in seconds.
30 argument::mul
32 Output will be multiplied by this value.
35 argument::add
37 This value will be added to the output.
40 Examples::
42 code::
44 // used to lag pitch
46     SinOsc.ar(                              // sine wave
47         Lag.kr(                             // lag the modulator
48             LFPulse.kr(4, 0, 0.5, 50, 400), // frequency modulator
49             Line.kr(0, 1, 15)               // modulate lag time
50         ),
51         0,                                  // phase
52         0.3                                 // sine amplitude
53     )
54 }.play