1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
7 <meta name=
"Generator" content=
"Cocoa HTML Writer">
8 <meta name=
"CocoaVersion" content=
"949.43">
9 <style type=
"text/css">
10 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
}
11 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica
; min-height: 22.0px}
12 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; min-height: 14.0px}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #001bb9}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #2c7014}
17 span
.s1
{font: 18.0px Helvetica
}
18 span
.s2
{color: #0024f8}
19 span
.s3
{color: #000000}
20 span
.s4
{color: #2c7014}
21 span
.s5
{color: #001bb9}
22 span
.Apple-tab-span
{white-space:pre
}
26 <p class=
"p1"><span class=
"s1"><b>ExpRand
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>exponential distribution single random float value ugen
</b></p>
27 <p class=
"p2"><br></p>
28 <p class=
"p1"><b>ExpRand(lo, hi)
</b></p>
29 <p class=
"p3"><br></p>
30 <p class=
"p1">Generates a single random float value in an exponential distributions from lo to hi.
</p>
31 <p class=
"p3"><br></p>
32 <p class=
"p1">See also:
<a href=
"LinRand.html"><span class=
"s2">LinRand
</span></a>,
<a href=
"Rand.html"><span class=
"s2">Rand
</span></a></p>
33 <p class=
"p3"><br></p>
35 <p class=
"p5">SynthDef
<span class=
"s3">(
</span><span class=
"s4">\help_ExpRand
</span><span class=
"s3">, {
</span>| out =
0, n =
0 |
</p>
36 <p class=
"p4"><span class=
"Apple-tab-span"> </span><span class=
"s5">Out
</span>.ar(out,
<span class=
"Apple-converted-space"> </span></p>
37 <p class=
"p5"><span class=
"s3"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>FSinOsc
<span class=
"s3">.ar(
</span></p>
38 <p class=
"p4"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">ExpRand
</span>(
100.0,
8000.0, n),
<span class=
"Apple-converted-space"> </span></p>
39 <p class=
"p4"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>0,
<span class=
"s5">Line
</span>.kr(
0.2,
0,
0.01, doneAction:
2))
</p>
40 <p class=
"p4"><span class=
"Apple-tab-span"> </span>)
</p>
41 <p class=
"p4">}).send(s);
</p>
43 <p class=
"p6"><br></p>
45 <p class=
"p5">Routine
<span class=
"s3">({
</span></p>
46 <p class=
"p4"><span class=
"Apple-tab-span"> </span><span class=
"s5">inf
</span>.do({
<span class=
"s5">arg
</span> i;
</p>
47 <p class=
"p7"><span class=
"s3"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span><span class=
"s5">Synth
</span><span class=
"s3">.new(
</span>\help_ExpRand
<span class=
"s3">);
<span class=
"Apple-converted-space"> </span></span></p>
48 <p class=
"p4"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>0.05.wait;
</p>
49 <p class=
"p4"><span class=
"Apple-tab-span"> </span>})
</p>
50 <p class=
"p4">}).play;
</p>