<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>vtabk</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" /> <link rel="prev" href="vtabi.html" title="vtabi" /> <link rel="next" href="vtaba.html" title="vtaba" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">vtabk</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="vtabi.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="vtaba.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="vtabk"> <a id="vtabk"></a> <div class="titlepage"></div> <a id="IndexVtabk" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">vtabk</span> </h2> <p>vtabk — Read vectors (from tables -or arrays of vectors). </p> </div> <div class="refsect1" title="Description"> <a id="idp53471752"></a> <h2>Description</h2> <p> This opcode reads vectors from tables at k-rate. </p> </div> <div class="refsect1" title="Syntax"> <a id="idp53472416"></a> <h2>Syntax</h2> <pre class="synopsis"><span class="command"><strong>vtabk</strong></span> kndx, ifn, kout1 [, kout2, kout3, .... , koutN ]</pre> </div> <div class="refsect1" title="Initialization"> <a id="idp53482800"></a> <h2>Initialization</h2> <p> <span class="emphasis"><em>ifn</em></span> - table number </p> </div> <div class="refsect1" title="Performance"> <a id="idp53483624"></a> <h2>Performance</h2> <p> <span class="emphasis"><em>kndx</em></span> - Index into f-table, either a positive number range matching the table length </p> <p> <span class="emphasis"><em>kout1...koutN</em></span> - output vector elements </p> <p> 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 (<span class="emphasis"><em>kout1</em></span>, <span class="emphasis"><em>kout2</em></span>, <span class="emphasis"><em>kout3</em></span>, .... <span class="emphasis"><em>koutN</em></span>). </p> <p> 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 <span class="emphasis"><em>vtabk</em></span>, in order to correct eventual out-of-range values. </p> <p> The <span class="command"><strong>vtab</strong></span> family is similar to <span class="command"><strong>vtable</strong></span>, but is much faster because interpolation is not available, table number cannot be changed after initialization, and only raw indexing is supported. </p> <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> <table border="0" summary="Note"> <tr> <td rowspan="2" align="center" valign="top" width="25"> <img alt="[Note]" src="images/note.png" /> </td> <th align="left">Note</th> </tr> <tr> <td align="left" valign="top"> <p> Notice that <span class="emphasis"><em>vtabk</em></span>'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 <a class="link" href="fin.html" title="fin"><em class="citetitle">fin</em></a> or <a class="link" href="trigseq.html" title="trigseq"><em class="citetitle">trigseq</em></a>). </p> </td> </tr> </table> </div> </div> <div class="refsect1" title="Examples"> <a id="idp53548040"></a> <h2>Examples</h2> <p> For an example of the vtabk opcode usage, see <a class="link" href="vtablek.html" title="vtablek"><em class="citetitle">vtablek</em></a>. </p> </div> <div class="refsect1" title="See also"> <a id="idp53549176"></a> <h2>See also</h2> <p> <a class="link" href="vtabi.html" title="vtabi"><em class="citetitle">vtabi</em></a>, <a class="link" href="vtaba.html" title="vtaba"><em class="citetitle">vtaba</em></a>, <a class="link" href="vtablek.html" title="vtablek"><em class="citetitle">vtablek</em></a>, <a class="link" href="vtablewk.html" title="vtablewk"><em class="citetitle">vtablewk</em></a>, <a class="link" href="vtabwk.html" title="vtabwk"><em class="citetitle">vtabwk</em></a>, </p> </div> <div class="refsect1" title="Credits"> <a id="idp53552168"></a> <h2>Credits</h2> <p>Written by Gabriel Maldonado.</p> <p>New in Csound 5 (Previously available only on CsoundAV)</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="vtabi.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="OpcodesTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="vtaba.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">vtabi </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> vtaba</td> </tr> </table> </div> </body> </html>