| 1 | |
| 2 | <refentry id="tablecopy"> |
| 3 | <indexterm id="IndexTablecopy"><primary>tablecopy</primary></indexterm> |
| 4 | <refentryinfo><title>Table Control:Read/Write Operations</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>tablecopy</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>tablecopy</refname> |
| 13 | <refpurpose> |
| 14 | Simple, fast table copy opcode. |
| 15 | </refpurpose> |
| 16 | </refnamediv> |
| 17 | |
| 18 | <refsect1> |
| 19 | <title>Description</title> |
| 20 | <para> |
| 21 | Simple, fast table copy opcode. |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis><command>tablecopy</command> kdft, ksft</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Performance</title> |
| 32 | <para> |
| 33 | <emphasis>kdft</emphasis> -- Destination function table. |
| 34 | </para> |
| 35 | |
| 36 | <para> |
| 37 | <emphasis>ksft</emphasis> -- Number of source function table. |
| 38 | </para> |
| 39 | |
| 40 | <para> |
| 41 | <emphasis>tablecopy</emphasis> -- Simple, fast table copy opcode. Takes the table length from the destination table, and reads from the start of the source table. For speed reasons, does not check the source length - just copies regardless - in <quote>wrap</quote> mode. This may read through the source table several times. A source table with length 1 will cause all values in the destination table to be written to its value. |
| 42 | </para> |
| 43 | |
| 44 | <para> |
| 45 | <emphasis>tablecopy</emphasis> cannot read or write the guardpoint. To read it use <link linkend="table"><citetitle>table</citetitle></link>, with <emphasis>ndx</emphasis> = the table length. Likewise use table write to write it. |
| 46 | </para> |
| 47 | |
| 48 | <para> |
| 49 | To write the guardpoint to the value in location 0, use <link linkend="tablegpw"><citetitle>tablegpw</citetitle></link>. |
| 50 | </para> |
| 51 | |
| 52 | <para> |
| 53 | This is primarily to change function tables quickly in a real-time situation. |
| 54 | </para> |
| 55 | </refsect1> |
| 56 | |
| 57 | <refsect1> |
| 58 | <title>Examples</title> |
| 59 | <para> |
| 60 | Here is an example of the tablecopy opcode. It uses the file <ulink url="examples/tablecopy.csd"><citetitle>tablecopy.csd</citetitle></ulink>. |
| 61 | <example> |
| 62 | <title>Example of the tablecopy 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/tablecopy.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 65 | </example> |
| 66 | Its output should include a lines like these: |
| 67 | <screen> |
| 68 | i1 5.00000 |
| 69 | i1 3.00000 |
| 70 | i1 2.00000 |
| 71 | i1 4.00000 |
| 72 | i1 7.00000 |
| 73 | i1 6.00000 |
| 74 | i1 7.00000</screen> |
| 75 | </para> |
| 76 | </refsect1> |
| 77 | |
| 78 | <refsect1> |
| 79 | <title>See also</title> |
| 80 | <para><link linkend="TableReadwrit"><citetitle>Read/Write Operations</citetitle></link></para> |
| 81 | </refsect1> |
| 82 | |
| 83 | <refsect1> |
| 84 | <title>Credits</title> |
| 85 | <para> |
| 86 | <simplelist> |
| 87 | <member>Author: Robin Whittle</member> |
| 88 | <member>Australia</member> |
| 89 | <member>May 1997</member> |
| 90 | </simplelist> |
| 91 | </para> |
| 92 | <para>New in version 3.47</para> |
| 93 | </refsect1> |
| 94 | </refentry> |