scide: implement selectionLength for openDocument
[supercollider.git] / HelpSource / Classes / Amplitude.schelp
blobf9a870074230eda5661d472be16852d456f0dfb5
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 argument::mul
23 argument::add
25 examples::
27 code::
29 // use input amplitude to control SinOsc frequency
31     SinOsc.ar(
32             Amplitude.kr(
33                         Blip.ar(3, 20) * LFNoise1.kr(0.1).range(0, 1),
34                         MouseX.kr(0.001, 1, 1),
35                         MouseY.kr(0.001, 1, 1),
36                         1200,
37                         400
38             ),
39             0, 0.3)
40 }.play;
44 code::
45 // use input amplitude to control Pulse amplitude - use headphones to prevent feedback.
46 { Pulse.ar(90, 0.3, Amplitude.kr(SoundIn.ar(0))) }.play;
49 code::
51 // use input amplitude to control SinOsc frequency - use headphones to prevent feedback.
53     SinOsc.ar(
54             Amplitude.kr(
55                         SoundIn.ar(0),
56                         0.01,
57                         0.01,
58                         1200,
59                         400
60             ),
61             0, 0.3)
62 }.play;