summaryrefslogtreecommitdiff
path: root/opcodes/vtaba.xml
blob: dfc14c994d538d53beee4384c2bb003639053f0f (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
<refentry id="vtaba">
<indexterm id="IndexVtaba"><primary>vtaba</primary></indexterm>
  <refentryinfo><title>Vectorial:Tables</title></refentryinfo>
  <refmeta>
    <refentrytitle>vtaba</refentrytitle>
  </refmeta>

  <refnamediv>
    <refname>vtaba</refname>
    <refpurpose>
     Read vectors (from tables -or arrays of vectors).

    </refpurpose>
  </refnamediv>

  <refsect1>
    <title>Description</title>
    <para>
	This opcode reads vectors from tables at a-rate.
    </para>
  </refsect1>
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>vtaba</command>  andx, ifn, aout1 [, aout2, aout3, .... , aoutN ]</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ifn</emphasis> - table number
    </para>
  </refsect1>

  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>andx</emphasis> - Index into f-table, either a positive number range matching the table length
      </para>
      <para>
      <emphasis>aout1...aoutN</emphasis> - output vector elements
      </para>
      <para>
      This opcode is useful in all cases in which one needs to access sets of values associated to unique indexes (for example, multi-channel samples, STFT bin frames, spectral formants, p-field based scores etc.). The number of elements of each vector (length of the vector) is determined by the number of optional arguments on the right (aout1 , aout2, aout3, ....  aoutN).
    </para>
    <para>
      Notice that no wrap nor limit mode is implemented.  So, if  an index attempt to access to a zone not allocated by the table, Csound will probably crash. However this drawback can be easily avoided by using wrap or limit opcodes applied to indexes before using vtaba, in order to correct eventual out-of-range values.
    </para>
    <para>
       Notice that <command>vtaba</command> output arguments are placed at the left of the opcode name, differently from usual (this style is already used in other opcodes using undefined lists of output arguments such as fin or trigseq). 
    </para>
    <para>
	The <command>vtab</command> family is similar to the <command>vtable</command> family, but is much faster because interpolation is not available, table number cannot be changed after initialization, and only raw indexing is supported.
    </para>
    <note>
      <para>
        Notice that <emphasis>vtaba</emphasis>'s output arguments are placed at the right of the opcode name, differently from usual (this style is already used in other opcodes using undefined lists of output arguments such as <link linkend="fin"><citetitle>fin</citetitle></link> or <link linkend="trigseq"><citetitle>trigseq</citetitle></link>).
      </para>
    </note>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
       The usage of <emphasis>vtaba</emphasis> is similar to <link linkend="vtablek"><citetitle>vtablek</citetitle></link>.
    </para>
  </refsect1>

  <refsect1>
    <title>See also</title>
    <para>
      <link linkend="vtabk"><citetitle>vtabk</citetitle></link>,
      <link linkend="vtabi"><citetitle>vtabi</citetitle></link>,
      <link linkend="vtablea"><citetitle>vtablea</citetitle></link>,
      <link linkend="vtablewa"><citetitle>vtablewa</citetitle></link>,
      <link linkend="vtabwa"><citetitle>vtabwa</citetitle></link>,
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>Written by Gabriel Maldonado.</para>
    <para>New in Csound 5 (Previously available only on CsoundAV)</para>
  </refsect1>
</refentry>