| 1 |
|
| 2 |
<refentry id="trandom"> |
| 3 |
<indexterm id="IndexTrandom"><primary>trandom</primary></indexterm> |
| 4 |
<refentryinfo><title>Signal Generators:Random (Noise) Generators</title></refentryinfo> |
| 5 |
<refmeta> |
| 6 |
<refentrytitle>trandom</refentrytitle> |
| 7 |
</refmeta> |
| 8 |
|
| 9 |
<refnamediv> |
| 10 |
<refname>trandom</refname> |
| 11 |
<refpurpose> |
| 12 |
Generates a controlled pseudo-random number series between min and max values according to a trigger. |
| 13 |
</refpurpose> |
| 14 |
</refnamediv> |
| 15 |
|
| 16 |
<refsect1> |
| 17 |
<title>Description</title> |
| 18 |
<para> |
| 19 |
Generates a controlled pseudo-random number series between min and max values at k-rate whenever the trigger parameter is different to 0. |
| 20 |
</para> |
| 21 |
</refsect1> |
| 22 |
<refsect1> |
| 23 |
<title>Syntax</title> |
| 24 |
<synopsis>kout <command>trandom</command> ktrig, kmin, kmax</synopsis> |
| 25 |
</refsect1> |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
<refsect1> |
| 41 |
<title>Performance</title> |
| 42 |
<para> |
| 43 |
<emphasis>ktrig</emphasis> -- trigger (opcode produces a new random number whenever this value is not 0. |
| 44 |
</para> |
| 45 |
<para> |
| 46 |
<emphasis>kmin</emphasis> -- minimum range limit |
| 47 |
</para> |
| 48 |
<para> |
| 49 |
<emphasis>kmax</emphasis> -- maximum range limit |
| 50 |
</para> |
| 51 |
<para> |
| 52 |
<emphasis>trandom</emphasis> is almost identical to <link linkend="random"><citetitle>random</citetitle></link> opcode, except <emphasis>trandom</emphasis> updates its output with a new random value only when the <emphasis>ktrig</emphasis> argument is triggered (i.e. whenever it is not zero). |
| 53 |
</para> |
| 54 |
</refsect1> |
| 55 |
|
| 56 |
<refsect1> |
| 57 |
<title>Examples</title> |
| 58 |
<para> |
| 59 |
Here is an example of the trandom opcode. It uses the file <ulink url="examples/trandom.csd"><citetitle>trandom.csd</citetitle></ulink>. |
| 60 |
<example> |
| 61 |
<title>Example of the trandom opcode.</title> |
| 62 |
<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> |
| 63 |
<xi:include href="examples-xml/trandom.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 64 |
</example> |
| 65 |
</para> |
| 66 |
</refsect1> |
| 67 |
|
| 68 |
<refsect1> |
| 69 |
<title>See also</title> |
| 70 |
<para><link linkend="SiggenNoise"><citetitle>Random (Noise) Generators</citetitle></link> |
| 71 |
</para> |
| 72 |
</refsect1> |
| 73 |
|
| 74 |
<refsect1> |
| 75 |
<title>Credits</title> |
| 76 |
<para>Written by Gabriel Maldonado.</para> |
| 77 |
|
| 78 |
<para>New in Csound 5.06</para> |
| 79 |
</refsect1> |
| 80 |
</refentry> |