linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / HenonN.schelp
blobf6cf1dd7f4204752df31885dc3ef34551135f25a
1 class:: HenonN
2 summary:: Henon map chaotic generator
3 categories:: UGens>Generators>Chaotic
4 related:: Classes/HenonL, Classes/HenonC
6 description::
7 A non-interpolating sound generator based on the difference equation:
9 code::
10         x[n+2] = 1 - a * pow(x[n+1], 2) + b * x[n]
12 warning:: revise formulae converted to c like code. ::
14 This equation was discovered by French astronomer Michel Hénon while studying the orbits of stars in globular clusters.
16 classmethods::
17 method:: ar
18 argument:: freq
19 Iteration frequency in Hertz
20 argument:: a
21 Equation variable
22 argument:: b
23 Equation variable
24 argument:: x0
25 Initial value of x
26 argument:: x1
27 Second value of x
29 examples::
30 code::
31 // default initial params
32 { HenonN.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s);
34 // mouse-control of params
35 { HenonN.ar(SampleRate.ir/4, MouseX.kr(1,1.4), MouseY.kr(0,0.3)) * 0.2 }.play(s);
37 // randomly modulate params
39 { HenonN.ar(
40         SampleRate.ir/8,
41         LFNoise2.kr(1, 0.2, 1.2),
42         LFNoise2.kr(1, 0.15, 0.15)
43 ) * 0.2 }.play(s);
46 // as a frequency control
47 { SinOsc.ar(HenonN.ar(40, MouseX.kr(1,1.4), MouseY.kr(0,0.3))*800+900)*0.4 }.play(s);