sclang: ServerShmInterface - try to avoid multiple destructor calls
[supercollider.git] / HelpSource / Classes / QuadN.schelp
blobeb6be8d5ac5df085aceaa51d0a8a098c2b386ce3
1 class:: QuadN
2 summary:: General quadratic map chaotic generator
3 categories:: UGens>Generators>Chaotic
4 related:: Classes/QuadL, Classes/QuadC
6 description::
7 A non-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 { QuadN.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         QuadN.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(QuadN.ar(40, r.neg, r, 0, 0.1, 800, 900)) * 0.4;
50 }.play(s);