| 1 | <refentry id="vaget"> |
| 2 | <indexterm id="IndexAvarGet"><primary>vaget</primary></indexterm> |
| 3 | <refentryinfo><title>Signal Modifiers:Sample Level Operators</title></refentryinfo> |
| 4 | <refmeta> |
| 5 | <refentrytitle>vaget</refentrytitle> |
| 6 | </refmeta> |
| 7 | |
| 8 | |
| 9 | |
| 10 | <refnamediv> |
| 11 | <refname>vaget</refname> |
| 12 | <refpurpose> |
| 13 | Access values of the current buffer of an a-rate variable by indexing. |
| 14 | </refpurpose> |
| 15 | </refnamediv> |
| 16 | |
| 17 | <refsect1> |
| 18 | <title>Description</title> |
| 19 | <para> |
| 20 | Access values of the current buffer of an a-rate variable by indexing. |
| 21 | Useful for doing sample-by-sample manipulation at k-rate without using |
| 22 | setksmps 1. |
| 23 | |
| 24 | <note> |
| 25 | <title>Note</title> |
| 26 | <para>Because this opcode does not do any bounds checking, the user |
| 27 | must be careful not to try to read values past ksmps (the |
| 28 | size of a buffer for an a-rate variable) by using index values greater |
| 29 | than ksmps.</para> |
| 30 | </note> |
| 31 | <note> |
| 32 | <title>Note</title> |
| 33 | <para>In Csound6 this opcode does do bounds checking.</para> |
| 34 | </note> |
| 35 | </para> |
| 36 | </refsect1> |
| 37 | |
| 38 | <refsect1> |
| 39 | <title>Syntax</title> |
| 40 | <synopsis>kval <command>vaget</command> kndx, avar</synopsis> |
| 41 | </refsect1> |
| 42 | |
| 43 | |
| 44 | <refsect1> |
| 45 | <title>Performance</title> |
| 46 | <para> |
| 47 | <emphasis>kval</emphasis> - value read from avar |
| 48 | </para> |
| 49 | <para> |
| 50 | <emphasis>kndx</emphasis> - index of the sample to read from the current |
| 51 | buffer of the given avar variable |
| 52 | </para> |
| 53 | <para> |
| 54 | <emphasis>avar</emphasis> - a-rate variable to read from |
| 55 | </para> |
| 56 | </refsect1> |
| 57 | |
| 58 | <refsect1> |
| 59 | <title>Examples</title> |
| 60 | <para> |
| 61 | Here is an example of the vaget opcode. It uses the file <ulink url="examples/vaget.csd"><citetitle>vaget.csd</citetitle></ulink>. |
| 62 | |
| 63 | <example> |
| 64 | <title>Example of the vaget opcode.</title> |
| 65 | |
| 66 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 67 | <xi:include href="examples-xml/vaget.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 68 | </example> |
| 69 | </para> |
| 70 | </refsect1> |
| 71 | |
| 72 | <refsect1> |
| 73 | <title>See also</title> |
| 74 | <para><link linkend="SigmodSample"><citetitle>Sample Level Operators</citetitle></link></para> |
| 75 | </refsect1> |
| 76 | |
| 77 | <refsect1> |
| 78 | <title>Credits</title> |
| 79 | <para> |
| 80 | <simplelist> |
| 81 | <member>Author: Steven Yi</member> |
| 82 | </simplelist> |
| 83 | </para> |
| 84 | |
| 85 | <para>New in version 5.04</para> |
| 86 | <para>September 2006.</para> |
| 87 | </refsect1> |
| 88 | </refentry> |