| 1 | |
| 2 | <refentry id="linrand"> |
| 3 | <indexterm id="IndexLinrandXClass"><primary>x-class noise generators</primary></indexterm> |
| 4 | |
| 5 | <indexterm id="IndexLinrand"><primary>linrand</primary></indexterm> |
| 6 | <refentryinfo><title>Signal Generators:Random (Noise) Generators</title></refentryinfo> |
| 7 | <refmeta> |
| 8 | <refentrytitle>linrand</refentrytitle> |
| 9 | </refmeta> |
| 10 | |
| 11 | |
| 12 | |
| 13 | <refnamediv> |
| 14 | <refname>linrand</refname> |
| 15 | <refpurpose> |
| 16 | Linear distribution random number generator (positive values only). |
| 17 | </refpurpose> |
| 18 | </refnamediv> |
| 19 | |
| 20 | <refsect1> |
| 21 | <title>Description</title> |
| 22 | <para> |
| 23 | Linear distribution random number generator (positive values only). This is an x-class noise generator. |
| 24 | </para> |
| 25 | </refsect1> |
| 26 | |
| 27 | <refsect1> |
| 28 | <title>Syntax</title> |
| 29 | <synopsis>ares <command>linrand</command> krange</synopsis> |
| 30 | |
| 31 | <synopsis>ires <command>linrand</command> krange</synopsis> |
| 32 | |
| 33 | <synopsis>kres <command>linrand</command> krange</synopsis> |
| 34 | </refsect1> |
| 35 | |
| 36 | <refsect1> |
| 37 | <title>Performance</title> |
| 38 | <para> |
| 39 | <emphasis>krange</emphasis> -- the range of the random numbers (0 - <emphasis>krange</emphasis>). Outputs only positive numbers. |
| 40 | </para> |
| 41 | |
| 42 | <para> |
| 43 | For more detailed explanation of these distributions, see: |
| 44 | <orderedlist> |
| 45 | <listitem> |
| 46 | <para>C. Dodge - T.A. Jerse 1985. Computer music. Schirmer books. pp.265 - 286</para> |
| 47 | </listitem> |
| 48 | |
| 49 | <listitem> |
| 50 | <para>D. Lorrain. A panoply of stochastic cannons. In C. Roads, ed. 1989. Music machine . Cambridge, Massachusetts: MIT press, pp. 351 - 379.</para> |
| 51 | </listitem> |
| 52 | </orderedlist> |
| 53 | </para> |
| 54 | </refsect1> |
| 55 | |
| 56 | <refsect1> |
| 57 | <title>Examples</title> |
| 58 | <para> |
| 59 | Here is an example of the linrand opcode. It uses the file <ulink url="examples/linrand.csd"><citetitle>linrand.csd</citetitle></ulink>. |
| 60 | |
| 61 | <example> |
| 62 | <title>Example of the linrand opcode.</title> |
| 63 | <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> |
| 64 | <xi:include href="examples-xml/linrand.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 65 | </example> |
| 66 | |
| 67 | Its output should include a line like this: |
| 68 | <screen> |
| 69 | i 1 time 0.00033: 13.54770 |
| 70 | i 1 time 0.20033: 32.38746 |
| 71 | i 1 time 0.40033: 47.69304 |
| 72 | i 1 time 0.60033: 19.82218 |
| 73 | i 1 time 0.80033: 42.98293 |
| 74 | i 1 time 1.00000: 81.13174 |
| 75 | i 1 time 1.20033: 47.39585 |
| 76 | i 1 time 1.40033: 12.53248 |
| 77 | i 1 time 1.60033: 35.70722 |
| 78 | i 1 time 1.80000: 65.25774 |
| 79 | i 1 time 2.00000: 23.24811 |
| 80 | Seeding from current time 392575384 |
| 81 | i 2 time 3.00033: 23.05609 |
| 82 | i 2 time 3.20033: 76.15114 |
| 83 | i 2 time 3.40033: 22.78861 |
| 84 | i 2 time 3.60000: 0.79064 |
| 85 | i 2 time 3.80033: 43.49438 |
| 86 | i 2 time 4.00000: 34.10963 |
| 87 | i 2 time 4.20000: 31.88702 |
| 88 | i 2 time 4.40033: 59.78054 |
| 89 | i 2 time 4.60033: 4.96821 |
| 90 | i 2 time 4.80033: 24.69674 |
| 91 | i 2 time 5.00000: 21.88815 |
| 92 | </screen> |
| 93 | </para> |
| 94 | </refsect1> |
| 95 | |
| 96 | <refsect1> |
| 97 | <title>See also</title> |
| 98 | <para><link linkend="SiggenNoise"><citetitle>Random (Noise) Generators</citetitle></link></para> |
| 99 | </refsect1> |
| 100 | |
| 101 | <refsect1> |
| 102 | <title>Credits</title> |
| 103 | <para> |
| 104 | <simplelist> |
| 105 | <member>Author: &nameparis;</member> |
| 106 | <member>MIT, Cambridge</member> |
| 107 | <member>1995</member> |
| 108 | </simplelist> |
| 109 | </para> |
| 110 | </refsect1> |
| 111 | </refentry> |