Debian Codegraph @

opcodes/tableshuffle.xml

raw symbols SCIP
1
2 <refentry id="tableshuffle">
3 <indexterm id="IndexTableshuffle"><primary>tableshuffle</primary></indexterm>
4 <refentryinfo><title>Miscellaneous</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>tableshuffle</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>tableshuffle</refname>
11 <refpurpose>
12 shuffles the content of a function table so that each element of the source
13 table is put into a different random position.
14 </refpurpose>
15 </refnamediv>
16
17 <refsect1>
18 <title>Description</title>
19 <para>
20 This opcode can be used in order to shuffle the content of
21 function tables into a random order but without loosing any of
22 the elements. Imagine shuffling a deck of cards. Each element of
23 the table is copied to a different random position. If that
24 position was already chosen before then the next free position
25 is chosen. The length of the table remains the same.
26 </para>
27 </refsect1>
28
29 <refsect1>
30 <title>Syntax</title>
31 <synopsis><command>tableshuffle</command> ktablenum</synopsis>
32 <synopsis><command>tableshufflei</command> itablenum</synopsis>
33 </refsect1>
34
35 <refsect1>
36 <title>Performance</title>
37 <para>
38 <emphasis>ktablenum</emphasis> or <emphasis>itablenum</emphasis>
39 -- the number of the table to shuffle.
40 </para>
41 </refsect1>
42
43 <refsect1>
44 <title>Examples</title>
45 <para>
46 Here is an example of the tableshuffle opcode. It uses the file <ulink url="examples/tableshuffle.csd"><citetitle>tableshuffle.csd</citetitle></ulink>.
47
48 <example>
49 <title>Example of the tableshuffle opcode.</title>
50
51 <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>
52 <xi:include href="examples-xml/tableshuffle.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
53 </example>
54 </para>
55 </refsect1>
56
57 <refsect1>
58 <title>See also</title>
59 <para><link linkend="TableReadwrit"><citetitle>Read/Write Operations</citetitle></link></para>
60 </refsect1>
61
62 <refsect1>
63 <title>Credits</title>
64 <para>
65 <simplelist>
66 <member>Author: Georg Boenn </member>
67 <member>University of Glamorgan, UK</member>
68 </simplelist>
69 </para>
70
71 <para>New in Csound version 5.13</para>
72 </refsect1>
73 </refentry>