Debian Codegraph @

opcodes/vtablek.xml

raw symbols SCIP
1
2 <refentry id="vtablek">
3 <indexterm id="IndexVtablek"><primary>vtablek</primary></indexterm>
4 <refentryinfo><title>Vectorial:Tables</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>vtablek</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>vtablek</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 at k-rate.
21 </para>
22 </refsect1>
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis><command>vtablek</command> kndx, kfn, kinterp, ixmode, kout1 [, kout2, kout3, .... , koutN ]</synopsis>
26 </refsect1>
27
28 <refsect1>
29 <title>Initialization</title>
30 <para> <emphasis>ixmode</emphasis> - index data mode. The default value is 0.
31 </para>
32 <para> == 0 index is treated as a raw table location,
33 </para>
34 <para> == 1 index is normalized (0 to 1).
35 </para>
36 <para>
37 <emphasis>kinterp</emphasis> - switch beetween interpolated or non-interpolated output. 0 -&gt; non-interpolation , non-zero -&gt; interpolation activated
38 </para>
39 </refsect1>
40
41 <refsect1>
42 <title>Performance</title>
43 <para>
44 <emphasis>kndx</emphasis> - Index into f-table, either a positive number range matching the table length (ixmode = 0) or a 0 to 1 range (ixmode != 0).
45 </para>
46 <para>
47 <emphasis>kfn</emphasis> - table number
48 </para>
49 <para>
50 <emphasis>kout1...koutN</emphasis> - output vector elements
51 </para>
52 <para>
53 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 (kout1 , kout2, kout3, .... koutN).
54 </para>
55 <para>
56 <emphasis>vtablek</emphasis> allows the user to switch beetween interpolated or non-interpolated output at k-rate by means of kinterp argument.
57 </para>
58 <para>
59 <emphasis>vtablek</emphasis> allows also to switch the table number at k-rate (but this is possible only when vector frames of each used table have the same number of elements, otherwise unpredictable results could occurr), as well as to choose indexing style (raw or normalized, see also ixmode argument of table opcode ).
60 </para>
61 <para>
62 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.
63 </para>
64 <note>
65 <para>
66 Notice that <emphasis>vtablek</emphasis>'s 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 <link linkend="fin"><citetitle>fin</citetitle></link> or <link linkend="trigseq"><citetitle>trigseq</citetitle></link>).
67 </para>
68 </note>
69
70 </refsect1>
71
72 <refsect1>
73 <title>Examples</title>
74 <para>
75 Here is an example of the vtablek opcode. It uses the files <ulink url="examples/vtablek.csd"><citetitle>vtablek.csd</citetitle></ulink>.
76
77 <example>
78 <title>Example of the vtablek opcode.</title>
79 <xi:include href="examples-xml/vtablek.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
80
81 </example>
82 </para>
83 </refsect1>
84
85 <refsect1>
86 <title>See also</title>
87 <para><link linkend="vectorialtables"><citetitle>Tables of vectors operators</citetitle></link></para>
88 </refsect1>
89
90 <refsect1>
91 <title>Credits</title>
92 <para>Written by Gabriel Maldonado.</para>
93 <para>Example written by Andres Cabrera.</para>
94 <para>New in Csound 5 (Previously available only on CsoundAV)</para>
95 </refsect1>
96 </refentry>