Explicitly include a boost "windows" folder even on linux
[supercollider.git] / HelpSource / Classes / LinCongN.schelp
blobd4d29e8d4f8464c2884ac3278fd02d97eb7aa8ea
1 class:: LinCongN
2 summary:: Linear congruential chaotic generator
3 categories:: UGens>Generators>Chaotic
4 related:: Classes/LinCongL, Classes/LinCongC
6 description::
7 A non-interpolating sound generator based on the difference equation:
9 code::
10         x[n+1] = (a * x[n] + c) % m
12 warning:: revise formulae converted to c like code ::
14 The output signal is automatically scaled to a range of [-1, 1].
16 classmethods::
17 method:: ar
18 argument:: freq
19 Iteration frequency in Hertz
20 argument:: a
21 Multiplier amount
22 argument:: c
23 Increment amount
24 argument:: m
25 Modulus amount
26 argument:: xi
27 Initial value of x
29 examples::
30 code::
31 // default initial params
32 { LinCongN.ar(MouseX.kr(20, SampleRate.ir)) * 0.2 }.play(s);
35 code::
36 // randomly modulate params
38 { LinCongN.ar(
39         LFNoise2.kr(1, 1e4, 1e4),
40         LFNoise2.kr(0.1, 0.5, 1.4),
41         LFNoise2.kr(0.1, 0.1, 0.1),
42         LFNoise2.kr(0.1)
43 ) * 0.2 }.play(s);
47 code::
48 // as frequency control...
51 SinOsc.ar(
52         LinCongN.ar(
53                 40,
54                 LFNoise2.kr(0.1, 0.1, 1),
55                 LFNoise2.kr(0.1, 0.1, 0.1),
56                 LFNoise2.kr(0.1),
57                 0, 500, 600
58         )
59 ) * 0.4 }.play(s);