linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / MostChange.schelp
blob7c276b683acbc7568d21a9800f4786d2792dabd0
1 class:: MostChange
2 summary:: Output most changed.
3 related:: Classes/LeastChange, Classes/LastValue
4 categories::  UGens>Maths
7 Description::
9 Output the input that changed most.
12 classmethods::
14 method::ar, kr
16 argument::a
18 Input signal A.
21 argument::b
23 Input signal B.
26 Examples::
28 code::
30 //doesn't work yet.
32 d = SynthDef("help-MostChange", { arg amp=1.0;
33         var out, in1, in2;
34         in1 = LFNoise1.ar(800, amp);
35         in2 = SinOsc.ar(800);
36         out = MostChange.ar(in1, in2) * 0.1;
37         Out.ar(0, out)
38 }).play;
40 d.set(\amp, 0.1);
41 d.set(\amp, 0);
42 d.set(\amp, 3);
43 d.free;
45 the control that changed most is used for output:
47 d = SynthDef("help-MostChange", { arg freq=440;
48         var out, internalFreq;
49         internalFreq = LFNoise0.ar(0.3, 300, 800);
50         out = SinOsc.ar(
51                         MostChange.kr(freq, internalFreq)
52         );
53         Out.ar(0, out * 0.1)
54 }).play;
56 d.set(\freq, 800);
57 d.set(\freq, 800); //nothing changed
58 d.set(\freq, 900);
59 d.free;