Debian Codegraph @

opcodes/vtabk.xml

raw symbols SCIP
1
2 <refentry id="vtabk">
3 <indexterm id="IndexVtabk"><primary>vtabk</primary></indexterm>
4 <refentryinfo><title>Vectorial:Tables</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>vtabk</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>vtabk</refname>
11 <refpurpose>
12 Read vectors (from tables -or arrays of vectors).
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 This opcode reads vectors from tables at k-rate.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis><command>vtabk</command> kndx, ifn, kout1 [, kout2, kout3, .... , koutN ]</synopsis>
26 </refsect1>
27
28 <refsect1>
29 <title>Initialization</title>
30 <para>
31 <emphasis>ifn</emphasis> - table number
32 </para>
33 </refsect1>
34
35 <refsect1>
36 <title>Performance</title>
37 <para>
38 <emphasis>kndx</emphasis> - Index into f-table, either a positive number range matching the table length
39 </para>
40 <para>
41 <emphasis>kout1...koutN</emphasis> - output vector elements
42 </para>
43 <para>
44 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 (<emphasis>kout1</emphasis>, <emphasis>kout2</emphasis>, <emphasis>kout3</emphasis>, .... <emphasis>koutN</emphasis>).
45 </para>
46 <para>
47 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 <emphasis>vtabk</emphasis>, in order to correct eventual out-of-range values.
48 </para>
49 <para>
50 The <command>vtab</command> family is similar to <command>vtable</command>, but is much faster because interpolation is not available, table number cannot be changed after initialization, and only raw indexing is supported.
51 </para>
52 <note>
53 <para>
54 Notice that <emphasis>vtabk</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>).
55 </para>
56 </note>
57 </refsect1>
58
59 <refsect1>
60 <title>Examples</title>
61 <para>
62 For an example of the vtabk opcode usage, see <link linkend="vtablek"><citetitle>vtablek</citetitle></link>.
63 </para>
64 </refsect1>
65
66 <refsect1>
67 <title>See also</title>
68 <para><link linkend="vectorialtables"><citetitle>Tables of vectors operators</citetitle></link></para>
69 </refsect1>
70
71 <refsect1>
72 <title>Credits</title>
73 <para>Written by Gabriel Maldonado.</para>
74 <para>New in Csound 5 (Previously available only on CsoundAV)</para>
75 </refsect1>
76 </refentry>