linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / HenonC.schelp
blobf0e947bb57d38b8f21d20556d2bd45bcd96fce3c
1 class:: HenonC
2 summary:: Henon map chaotic generator
3 categories:: UGens>Generators>Chaotic
4 related:: Classes/HenonN, Classes/HenonL
6 description::
7 A cubic-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 { HenonC.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s);
34 // mouse-control of params
35 { HenonC.ar(SampleRate.ir/4, MouseX.kr(1,1.4), MouseY.kr(0,0.3)) * 0.2 }.play(s);
37 // randomly modulate params
39 { HenonC.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(HenonC.ar(40, MouseX.kr(1,1.4), MouseY.kr(0,0.3))*800+900)*0.4 }.play(s);