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: 12.0px Helvetica
; color: #0000ff}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Monaco
; min-height: 16.0px}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #0000bf}
17 p
.p8
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #001bb9}
18 p
.p9
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
19 span
.s1
{font: 18.0px Helvetica
}
20 span
.s2
{color: #0000ff}
21 span
.s3
{color: #000000}
22 span
.s4
{color: #001bb9}
23 span
.s5
{color: #2c7014}
24 span
.Apple-tab-span
{white-space:pre
}
28 <p class=
"p1"><span class=
"s1"><b>Rand
<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>uniform distribution single random float value ugen
</b></p>
29 <p class=
"p2"><br></p>
30 <p class=
"p1"><b>Rand(lo, hi)
</b></p>
31 <p class=
"p3"><br></p>
32 <p class=
"p1">Generates a single random float value in uniform distribution from lo to hi.
</p>
33 <p class=
"p1">It generates this when the
<a href=
"../../ServerArchitecture/SynthDef.html"><span class=
"s2">SynthDef
</span></a> first starts playing, and remains fixed for the duration of the synth's existence.
</p>
34 <p class=
"p3"><br></p>
35 <p class=
"p4"><span class=
"s3">See also:
<a href=
"LinRand.html">LinRand
</a>,
<a href=
"ExpRand.html">ExpRand
</a></span></p>
36 <p class=
"p5"><br></p>
37 <p class=
"p5"><br></p>
39 <p class=
"p7"><span class=
"s4">SynthDef
</span><span class=
"s3">(
</span><span class=
"s5">\help_Rand
</span><span class=
"s3">, {
</span>| out =
0, minmax =
1 |
</p>
40 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"s4">Out
</span>.ar(out,
</p>
41 <p class=
"p8"><span class=
"s3"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>FSinOsc
<span class=
"s3">.ar(
</span></p>
42 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s4">LinRand
</span>(
200.0,
10000.0, minmax),
<span class=
"Apple-converted-space"> </span></p>
43 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>0,
<span class=
"s4">Line
</span>.kr(
0.2,
0,
0.01, doneAction:
2))
</p>
44 <p class=
"p6"><span class=
"Apple-tab-span"> </span>)
</p>
45 <p class=
"p6">}).send(s);
</p>
47 <p class=
"p9"><br></p>
49 <p class=
"p8">Routine
<span class=
"s3">({
</span></p>
50 <p class=
"p6"><span class=
"Apple-tab-span"> </span>loop({
</p>
51 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s4">Synth
</span>.new(
<span class=
"s5">\help_Rand
</span>);
<span class=
"Apple-converted-space"> </span></p>
52 <p class=
"p6"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>0.04.wait;
</p>
53 <p class=
"p6"><span class=
"Apple-tab-span"> </span>})
</p>
54 <p class=
"p6">}).play;
</p>