class library: SynthDef - lazy implementation of removeUGen
[supercollider.git] / HelpSource / Classes / CuspL.schelp
blob0f92292492f4d1c22e99bba60016af63bc589812
1 class:: CuspL
2 summary:: Cusp map chaotic generator
3 categories:: UGens>Generators>Chaotic
4 related:: Classes/CuspN
6 description::
7 A linear-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 { CuspL.ar(MouseX.kr(20, SampleRate.ir), 1.0, 1.99) * 0.3 }.play(s);
31 // mouse-controlled params
32 { CuspL.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(CuspL.ar(40, MouseX.kr(0.9,1.1,1), MouseY.kr(1.8,2,1))*800+900)*0.4 }.play(s);