linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / QuadC.schelp
blob254b66e86ac0c66a0e4cb25b6c2fbf3b3f362a70
1 class:: QuadC
2 summary:: General quadratic map chaotic generator
3 categories:: UGens>Generators>Chaotic
4 related:: Classes/QuadN, Classes/QuadL
6 description::
7 A cubic-interpolating sound generator based on the difference equation:
9 code::
10         x[n+1] = a * pow(x[n], 2) + b * x[n] + c
12 warning:: revise formulae conversion to c like code ::
14 classmethods::
15 method:: ar
16 argument:: freq
17 Iteration frequency in Hertz
18 argument:: a
19 Equation variable
20 argument:: b
21 Equation variable
22 argument:: c
23 Equation variable
24 argument:: xi
25 Initial value of x
27 examples::
28 code::
29 // default params
30 { QuadC.ar(SampleRate.ir/4) * 0.2 }.play(s);
33 code::
34 // logistic map
35 // equation: x1 = -r*x0^2 + r*x0
37 { var r;
38         r = MouseX.kr(3.5441, 4);       // stable range
39         QuadC.ar(SampleRate.ir/4, r.neg, r, 0, 0.1) * 0.4;
40 }.play(s);
44 code::
45 // logistic map as frequency control
47 { var r;
48         r = MouseX.kr(3.5441, 4);       // stable range
49         SinOsc.ar(QuadC.ar(40, r.neg, r, 0, 0.1, 800, 900)) * 0.4;
50 }.play(s);