Forgot a help fix: Drag a dock's title bar, not divider, to reposition
[supercollider.git] / HelpSource / Classes / HenonN.schelp
blobd71abc83c2b2fd7e88814f2b97a128d9b761000c
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
28 argument::mul
29 argument::add
31 examples::
32 code::
33 // default initial params
34 { HenonN.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s);
36 // mouse-control of params
37 { HenonN.ar(SampleRate.ir/4, MouseX.kr(1,1.4), MouseY.kr(0,0.3)) * 0.2 }.play(s);
39 // randomly modulate params
41 { HenonN.ar(
42         SampleRate.ir/8,
43         LFNoise2.kr(1, 0.2, 1.2),
44         LFNoise2.kr(1, 0.15, 0.15)
45 ) * 0.2 }.play(s);
48 // as a frequency control
49 { SinOsc.ar(HenonN.ar(40, MouseX.kr(1,1.4), MouseY.kr(0,0.3))*800+900)*0.4 }.play(s);