Debian Codegraph @

opcodes/vtablei.xml

raw symbols SCIP
1
2 <refentry id="vtablei">
3 <indexterm id="IndexVtablei"><primary>vtablei</primary></indexterm>
4 <refentryinfo><title>Vectorial:Tables</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>vtablei</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>vtablei</refname>
11 <refpurpose>
12 Read vectors (from tables -or arrays of vectors).
13
14 </refpurpose>
15 </refnamediv>
16
17 <refsect1>
18 <title>Description</title>
19 <para>
20 This opcode reads vectors from tables.
21 </para>
22 </refsect1>
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis><command>vtablei</command> indx, ifn, interp, ixmode, iout1 [, iout2, iout3, .... , ioutN ]</synopsis>
26 </refsect1>
27
28 <refsect1>
29 <title>Initialization</title>
30 <para>
31 <emphasis>indx</emphasis> - Index into f-table, either a positive number range matching the table length (ixmode = 0) or a 0 to 1 range (ixmode != 0).
32 </para>
33 <para>
34 <emphasis>ifn</emphasis> - table number
35 </para>
36 <para>
37 <emphasis>iout1...ioutN</emphasis> - output vector elements
38 </para>
39 <para>
40 <emphasis>ixmode</emphasis> - index data mode. The default value is 0.</para>
41 <para> == 0 index is treated as a raw table location,</para>
42 <para> == 1 index is normalized (0 to 1).</para>
43 <para>
44 <emphasis>interp</emphasis> - vtable (vector table) family of opcodes allows the user to switch beetween interpolated or non-interpolated output by means of the interp argument.
45 </para>
46 </refsect1>
47
48 <refsect1>
49 <title>Performance</title>
50 <para>
51 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 (iout1 , iout2, iout3, .... ioutN).
52 </para>
53 <para>
54 <emphasis>vtable</emphasis> (vector table) family of opcodes allows the user to switch beetween interpolated or non-interpolated output by means of the interp argument.
55 </para>
56 <para>
57 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 vtable, in order to correct eventual out-of-range values.
58 </para>
59 <note>
60 <para>
61 Notice that <emphasis>vtablei</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>).
62 </para>
63 </note>
64
65 </refsect1>
66
67 <refsect1>
68 <title>Examples</title>
69 <para>
70 Here is an example of the vtablei opcode. It uses the files <ulink url="examples/vtablei.csd"><citetitle>vtablei.csd</citetitle></ulink>
71
72 <example>
73 <title>Example of the vtablei opcode.</title>
74 <xi:include href="examples-xml/vtablei.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
75
76 </example>
77 </para>
78 </refsect1>
79
80 <refsect1>
81 <title>See also</title>
82 <para><link linkend="vectorialtables"><citetitle>Tables of vectors operators</citetitle></link></para>
83 </refsect1>
84
85 <refsect1>
86 <title>Credits</title>
87 <para>Example written by Andres Cabrera.</para>
88 <para>New in Csound 5 (Previously available only on CsoundAV)</para>
89 </refsect1>
90 </refentry>