Debian Codegraph @

opcodes/tableimix.xml

raw symbols SCIP
1
2 <refentry id="tableimix">
3 <indexterm id="IndexTableimix"><primary>tableimix</primary></indexterm>
4 <refentryinfo><title>Table Control:Read/Write Operations</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>tableimix</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>tableimix</refname>
11 <refpurpose>
12 Mixes two tables.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 Mixes two tables.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis><command>tableimix</command> idft, idoff, ilen, is1ft, is1off, is1g, is2ft, is2off, is2g</synopsis>
26 </refsect1>
27
28 <refsect1>
29 <title>Initialization</title>
30 <para>
31 <emphasis>idft</emphasis> -- Destination function table.
32 </para>
33
34 <para>
35 <emphasis>idoff</emphasis> -- Offset to start writing from. Can be negative.
36 </para>
37
38 <para>
39 <emphasis>ilen</emphasis> -- Number of write operations to perform. Negative means work backwards.
40 </para>
41
42 <para>
43 <emphasis>is1ft</emphasis>, <emphasis>is2ft</emphasis> -- Source function tables. These can be the same as the destination table, if care is exercised about direction of copying data.
44 </para>
45
46 <para>
47 <emphasis>is1off</emphasis>, <emphasis>is2off</emphasis> -- Offsets to start reading from in source tables.
48 </para>
49
50 <para>
51 <emphasis>is1g</emphasis>, <emphasis>is2g</emphasis> -- Gains to apply when reading from the source tables. The results are added and the sum is written to the destination table.
52 </para>
53 </refsect1>
54
55 <refsect1>
56 <title>Performance</title>
57 <para>
58 <emphasis>tableimix</emphasis> -- This opcode mixes from two tables, with separate gains into the destination table. Writing is done for <emphasis>ilen</emphasis> locations, usually stepping forward through the table - if <emphasis>ilen</emphasis> is positive. If it is negative, then the writing and reading order is backwards - towards lower indexes in the tables. This bi-directional option makes it easy to shift the contents of a table sideways by reading from it and writing back to it with a different offset.
59 </para>
60
61 <para>
62 If <emphasis>ilen</emphasis> is 0, no writing occurs. Note that the internal integer value of <emphasis>ilen</emphasis> is derived from the ANSI C floor() function - which returns the next most negative integer. Hence a fractional negative <emphasis>ilen</emphasis> value of -2.3 would create an internal length of 3, and cause the copying to start from the offset locations and proceed for two locations to the left.
63 </para>
64
65 <para>
66 The total index for table reading and writing is calculated from the starting offset for each table, plus the index value, which starts at 0 and then increments (or decrements) by 1 as mixing proceeds.
67 </para>
68
69 <para>
70 These total indexes can potentially be very large, since there is no restriction on the offset or the <emphasis>ilen</emphasis>. However each total index for each table is ANDed with a length mask (such as 0000 0111 for a table of length 8) to form a final index which is actually used for reading or writing. So no reading or writing can occur outside the tables. This is the same as <quote>wrap</quote> mode in table read and write. These opcodes do not read or write the guardpoint. If a table has been rewritten with one of these, then if it has a guardpoint which is supposed to contain the same value as the location 0, then call <link linkend="tableigpw"><citetitle>tableigpw</citetitle></link> afterwards.
71 </para>
72
73 <para>
74 The indexes and offsets are all in table steps - they are not normalized to 0 - 1. So for a table of length 256, <emphasis>ilen</emphasis> should be set to 256 if all the table was to be read or written.
75 </para>
76
77 <para>
78 The tables do not need to be the same length - wrapping occurs individually for each table.
79 </para>
80 </refsect1>
81
82 <refsect1>
83 <title>Examples</title>
84 <para>
85 Here is an example of the tableimix opcode. It uses the file <ulink url="examples/tableimix.csd"><citetitle>tableimix.csd</citetitle></ulink>.
86 <example>
87 <title>Example of the tableimix opcode.</title>
88 <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>
89 <xi:include href="examples-xml/tableimix.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
90 </example>
91 </para>
92 </refsect1>
93
94 <refsect1>
95 <title>See also</title>
96 <para><link linkend="TableReadwrit"><citetitle>Read/Write Operations</citetitle></link></para>
97 </refsect1>
98
99 <refsect1>
100 <title>Credits</title>
101 <para>
102 <simplelist>
103 <member>Author: Robin Whittle</member>
104 <member>Australia</member>
105 <member>May 1997</member>
106 </simplelist>
107 </para>
108 <para>New in version 3.47</para>
109 </refsect1>
110 </refentry>