summaryrefslogtreecommitdiff
path: root/opcodes/tableng.xml
blob: 127d140cfa43a8209591def58ffd45a7ef478ed0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<refentry id="tableng">
<indexterm id="IndexTableng"><primary>tableng</primary></indexterm>
  <refentryinfo><title>Table Control:Table Queries</title></refentryinfo>
  <refmeta>
    <refentrytitle>tableng</refentrytitle>
  </refmeta>


 
  <refnamediv>
    <refname>tableng</refname>
    <refpurpose>
      Interrogates a function table for length.
          </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Interrogates a function table for length.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ires <command>tableng</command> ifn</synopsis>

    <synopsis>kres <command>tableng</command> kfn</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ifn</emphasis> -- Table number to be interrogated
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>kfn</emphasis> -- Table number to be interrogated
    </para>

    <para>
      <emphasis>tableng</emphasis> returns the length of the specified table. This will be a power of two number in most circumstances. It will not show whether a table has a guardpoint or not. It seems this information is not available in the table's data structure. If the specified table is not found, then 0 will be returned.
    </para>

    <para>
      Likely to be useful for setting up code for table manipulation operations, such as <link linkend="tablemix"><citetitle>tablemix</citetitle></link> and <link linkend="tablecopy"><citetitle>tablecopy</citetitle></link>.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the tableng opcode. It uses the file <ulink url="examples/tableng.csd"><citetitle>tableng.csd</citetitle></ulink>.

      <example>
        <title>Example of the tableng opcode.</title>

        

        <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>
          <xi:include href="examples-xml/tableng.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
      </example>

      The table is 16,384 samples long. So its output should include a line like this:
      <screen>
instr 1:  ilen = 16384.000
      </screen>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: Robin Whittle</member>
        <member>Australia</member>
        <member>May 1997</member>
      </simplelist>
    </para>
    <para>Example written by &namekevin;.</para>
  </refsect1>
</refentry>