Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / HelpSource / Classes / RunningMin.schelp
blobd6ab0cca65eaf8988801c3468ce49ba2528d2bf9
1 class:: RunningMin
2 summary:: Track minimum level.
3 related:: Classes/RunningMax, Classes/RunningSum
4 categories::  UGens>Maths
7 Description::
9 Outputs the minimum value received at the input. When a trigger occurs at
10 the reset input, the minimum output value is reset to the current value.
13 classmethods::
15 method::ar, kr
17 argument::in
19 The input signal.
22 argument::trig
24 Resets the output value to the current input value. A trigger happens when the signal changes from non-positive to positive.
27 Examples::
29 code::
33         SinOsc.ar(
34                         RunningMin.ar(Dust.ar(20), Impulse.ar(0.4)) * 500 + 200,
35                         0, 0.2
36         )
38 }.play;
41 // follow a sine lfo, reset rate controlled by mouse x
44         SinOsc.ar(
45                         RunningMin.kr(SinOsc.kr(0.2), Impulse.kr(MouseX.kr(0.01, 2, 1))) * 500 + 200,
46                         0, 0.2
47         )
49 }.play;