linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / RunningMax.schelp
blob85ad250cb5d7bf1fcc3391f2f0949b59d094526e
1 class:: RunningMax
2 summary:: Track maximum level.
3 related:: Classes/RunningMin, Classes/RunningSum
4 categories::  UGens>Maths
7 Description::
9 Outputs the maximum value received at the input. When a trigger occurs at
10 the reset input, the maximum output value is reset to the current value.
13 classmethods::
15 method::ar, kr
17 argument::trig
19 The input signal.
22 argument::reset
24 Trigger. Resets the output value to the current input value. A
25 trigger happens when the signal changes from non-positive to
26 positive.
29 Examples::
31 code::
35         SinOsc.ar(
36                         RunningMax.ar(Dust.ar(20), Impulse.ar(0.4)) * 500 + 200,
37                         0, 0.2
38         )
40 }.play;
43 // follow a sine lfo, reset rate controlled by mouse x
46         SinOsc.ar(
47                         RunningMax.kr(SinOsc.kr(0.2), Impulse.kr(MouseX.kr(0.01, 2, 1))) * 500 + 200,
48                         0, 0.2
49         )
51 }.play;