linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / Slope.schelp
blob378bdd800da54ae1a68a6c47a08a6e4641a423fb
1 class:: Slope
2 summary:: Slope of signal
3 categories:: UGens>Analysis, UGens>Filters>Linear, UGens>Maths
5 description::
6 Measures the rate of change per second of a signal.
7 Formula implemented is:
9 code::
10 out[i] = (in[i] - in[i-1]) * sampling_rate
13 classmethods::
14 method:: ar, kr
15 argument::in
16 Input signal to measure.
18 examples::
19 code::
22     var a, b, c, scale;
23     a = LFNoise2.ar(2000);  // quadratic noise
24     b = Slope.ar(a);        // first derivative produces line segments
25     c = Slope.ar(b);        // second derivative produces constant segments
26     scale = 0.0002; // needed to scale back to +/- 1.0
27     [a, b * scale, c * scale.squared]
28 }.plot
32 For another example of Slope see link::Classes/AbstractFunction#hypot#AbstractFunction:hypot::.