1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
<refentry id="unirand">
<indexterm id="IndexUnirandXClass"><primary>x-class noise generators</primary></indexterm>
<indexterm id="IndexUnirand"><primary>unirand</primary></indexterm>
<refentryinfo><title>Signal Generators:Random (Noise) Generators</title></refentryinfo>
<refmeta>
<refentrytitle>unirand</refentrytitle>
</refmeta>
<refnamediv>
<refname>unirand</refname>
<refpurpose>
Uniform distribution random number generator (positive values only).
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
Uniform distribution random number generator (positive values only). This is an x-class noise generator.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis>ares <command>unirand</command> krange</synopsis>
<synopsis>ires <command>unirand</command> krange</synopsis>
<synopsis>kres <command>unirand</command> krange</synopsis>
</refsect1>
<refsect1>
<title>Performance</title>
<para>
<emphasis>krange</emphasis> -- the range of the random numbers (0 - <emphasis>krange</emphasis>).
</para>
<para>
For more detailed explanation of these distributions, see:
<orderedlist>
<listitem>
<para>C. Dodge - T.A. Jerse 1985. Computer music. Schirmer books. pp.265 - 286</para>
</listitem>
<listitem>
<para>D. Lorrain. A panoply of stochastic cannons. In C. Roads, ed. 1989. Music machine . Cambridge, Massachusetts: MIT press, pp. 351 - 379.</para>
</listitem>
</orderedlist>
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<para>
Here is an example of the unirand opcode. It uses the file <ulink url="examples/unirand.csd"><citetitle>unirand.csd</citetitle></ulink>.
<example>
<title>Example of the unirand opcode.</title>
<para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
<xi:include href="examples-xml/unirand.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
Its output should include lines like these:
<screen>
i 1 time 0.00067: 81.47237
i 1 time 0.20067: 41.72671
i 1 time 0.40067: 5.96189
i 1 time 0.60067: 91.59912
i 1 time 0.80067: 85.07127
i 1 time 1.00000: 92.50948
i 1 time 1.20067: 98.79347
i 1 time 1.40067: 98.91449
i 1 time 1.60067: 50.37808
i 1 time 1.80000: 72.02497
i 1 time 2.00000: 52.94362
WARNING: Seeding from current time 4007444022
i 2 time 3.00067: 91.86294
i 2 time 3.20067: 94.68759
i 2 time 3.40067: 1.05825
i 2 time 3.60000: 78.57628
i 2 time 3.80067: 27.67408
i 2 time 4.00000: 76.46347
i 2 time 4.20000: 77.10071
i 2 time 4.40067: 34.28921
i 2 time 4.60067: 37.72286
i 2 time 4.80067: 54.96646
i 2 time 5.00000: 11.67566
B 3.000 .. 5.000 T 5.000 TT 5.000 M: 0.80000 0.80000
Score finished in csoundPerform().
</screen>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<link linkend="seed"><citetitle>seed</citetitle></link>,
<link linkend="betarand"><citetitle>betarand</citetitle></link>,
<link linkend="bexprnd"><citetitle>bexprnd</citetitle></link>,
<link linkend="cauchy"><citetitle>cauchy</citetitle></link>,
<link linkend="exprand"><citetitle>exprand</citetitle></link>,
<link linkend="gauss"><citetitle>gauss</citetitle></link>,
<link linkend="linrand"><citetitle>linrand</citetitle></link>,
<link linkend="pcauchy"><citetitle>pcauchy</citetitle></link>,
<link linkend="poisson"><citetitle>poisson</citetitle></link>,
<link linkend="trirand"><citetitle>trirand</citetitle></link>,
<link linkend="weibull"><citetitle>weibull</citetitle></link>
</para>
</refsect1>
<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: &nameparis;</member>
<member>MIT, Cambridge</member>
<member>1995</member>
</simplelist>
</para>
</refsect1>
</refentry>
|