class library: SynthDef - lazy implementation of removeUGen
[supercollider.git] / HelpSource / Classes / CuspN.schelp
blob8a5c914f20e3f8f6137a001054b9007bdac5d2a7
1 class:: CuspN
2 summary:: Cusp map chaotic generator
3 categories:: UGens>Generators>Chaotic
4 related:: Classes/CuspL
6 description::
7 A non-interpolating sound generator based on the difference equation:
9 code::
10         x[n+1] = a - b * sqrt(abs(x[n]))
12 warning:: revise formulae converted to c like code ::
14 classmethods::
16 method:: ar
17 argument::freq
18 Iteration frequency in Hertz
19 argument::a
20 Equation variable
21 argument::b
22 Equation variable
23 argument::xi
24 Initial value of x
26 examples::
27 code::
28 // vary frequency
29 { CuspN.ar(MouseX.kr(20, SampleRate.ir), 1.0, 1.99) * 0.3 }.play(s);
31 // mouse-controlled params
32 { CuspN.ar(SampleRate.ir/4, MouseX.kr(0.9,1.1,1), MouseY.kr(1.8,2,1)) * 0.3 }.play(s);
34 // as a frequency control
35 { SinOsc.ar(CuspN.ar(40, MouseX.kr(0.9,1.1,1), MouseY.kr(1.8,2,1))*800+900)*0.4 }.play(s);