class library: SynthDef - lazy implementation of removeUGen
[supercollider.git] / HelpSource / Classes / Amplitude.schelp
blob33641bc025df56c54c6bdb245ba7ecebd5a91404
1 class:: Amplitude
2 summary:: Amplitude follower
3 categories:: UGens>Analysis>Amplitude
5 description::
6 Tracks the peak amplitude of a signal.
8 classmethods::
10 method:: ar, kr
12 argument::in
13 Input signal
15 argument::attackTime
16 60dB convergence time for following attacks.
18 argument::releaseTime
19 60dB convergence time for following decays.
21 examples::
23 code::
25 // use input amplitude to control SinOsc frequency
27     SinOsc.ar(
28             Amplitude.kr(
29                         Blip.ar(3, 20) * LFNoise1.kr(0.1).range(0, 1),
30                         MouseX.kr(0.001, 1, 1),
31                         MouseY.kr(0.001, 1, 1),
32                         1200,
33                         400
34             ),
35             0, 0.3)
36 }.play;
40 code::
41 // use input amplitude to control Pulse amplitude - use headphones to prevent feedback.
42 { Pulse.ar(90, 0.3, Amplitude.kr(SoundIn.ar(0))) }.play;
45 code::
47 // use input amplitude to control SinOsc frequency - use headphones to prevent feedback.
49     SinOsc.ar(
50             Amplitude.kr(
51                         SoundIn.ar(0),
52                         0.01,
53                         0.01,
54                         1200,
55                         400
56             ),
57             0, 0.3)
58 }.play;