Debian Codegraph @

opcodes/random.xml

raw symbols SCIP
1
2 <refentry id="random">
3 <indexterm id="IndexRandom"><primary>random</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Random (Noise) Generators</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>random</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>random</refname>
13 <refpurpose>
14 Generates a controlled pseudo-random number series between min and max values.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 Generates is a controlled pseudo-random number series between min and max values.
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis>ares <command>random</command> kmin, kmax</synopsis>
28
29 <synopsis>ires <command>random</command> imin, imax</synopsis>
30
31 <synopsis>kres <command>random</command> kmin, kmax</synopsis>
32 </refsect1>
33
34 <refsect1>
35 <title>Initialization</title>
36 <para>
37 <emphasis>imin</emphasis> -- minimum range limit
38 </para>
39
40 <para>
41 <emphasis>imax</emphasis> -- maximum range limit
42 </para>
43 </refsect1>
44
45 <refsect1>
46 <title>Performance</title>
47 <para>
48 <emphasis>kmin</emphasis> -- minimum range limit
49 </para>
50
51 <para>
52 <emphasis>kmax</emphasis> -- maximum range limit
53 </para>
54
55 <para>
56 The <emphasis>random</emphasis> opcode is similar to <link linkend="linrand"><citetitle>linrand</citetitle></link> and <link linkend="trirand"><citetitle>trirand</citetitle></link> but sometimes I [&namegabriel;] find it more convenient because allows the user to set arbitrary minimum and maximum values.
57 </para>
58 </refsect1>
59
60 <refsect1>
61 <title>Examples</title>
62 <para>
63 Here is an example of the random opcode. It uses the file <ulink url="examples/random.csd"><citetitle>random.csd</citetitle></ulink>.
64
65 <example>
66 <title>Example of the random opcode.</title>
67
68
69
70 <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>
71 <xi:include href="examples-xml/random.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
72 </example>
73
74 Its output should include lines like:
75 <screen>
76 i 1 time 0.00067: 894.58566
77 i 1 time 0.50000: 748.44281
78 i 1 time 1.00000: 328.29916
79
80 WARNING: Seeding from current time 1656666052
81
82 i 2 time 2.00067: 690.71466
83 i 2 time 2.50000: 459.42445
84 i 2 time 3.00000: 100.85594
85 </screen>
86 </para>
87 </refsect1>
88
89 <refsect1>
90 <title>See also</title>
91 <para><link linkend="SiggenNoise"><citetitle>Random (Noise) Generators</citetitle></link>
92 </para>
93 </refsect1>
94
95 <refsect1>
96 <title>Credits</title>
97 <para>Author: &namegabriel;</para>
98 </refsect1>
99 </refentry>