| 1 | |
| 2 | <refentry id="vexp_i"> |
| 3 | <indexterm id="IndexVexp_i"><primary>vexp_i</primary></indexterm> |
| 4 | <refentryinfo><title>Vectorial:Scalar operations</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>vexp_i</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>vexp_i</refname> |
| 11 | <refpurpose> |
| 12 | Performs power-of operations between a vector and a scalar |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Performs power-of operations between a vector and a scalar |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | <refsect1> |
| 23 | <title>Syntax</title> |
| 24 | <synopsis><command>vexp_i</command> ifn, ival, ielements[, idstoffset]</synopsis> |
| 25 | </refsect1> |
| 26 | |
| 27 | <refsect1> |
| 28 | <title>Initialization</title> |
| 29 | <para> |
| 30 | <emphasis>ifn</emphasis> - number of the table hosting the vectorial signal to be processed |
| 31 | </para> |
| 32 | <para> |
| 33 | <emphasis>ival</emphasis> - scalar operand to be processed |
| 34 | </para> |
| 35 | <para> |
| 36 | <emphasis>ielements</emphasis> - number of elements of the vector |
| 37 | </para> |
| 38 | <para> |
| 39 | <emphasis>ival</emphasis> - scalar value to be added |
| 40 | </para> |
| 41 | <para> |
| 42 | <emphasis>idstoffset</emphasis> - index offset for the destination table |
| 43 | </para> |
| 44 | </refsect1> |
| 45 | |
| 46 | <refsect1> |
| 47 | <title>Performance</title> |
| 48 | <para> |
| 49 | <emphasis>vexp_i</emphasis> rises <emphasis>ival</emphasis> to each element contained in a vector from table <emphasis>ifn</emphasis>, starting from table index <emphasis>idstoffset</emphasis>. This enables you to process a specific section of a table by specifying the offset and the number of elements to be processed. Offset is counted starting from 0, so if no offset is specified (or set to 0), the table will be modified from the beginning. |
| 50 | </para> |
| 51 | <para> |
| 52 | Negative values for <emphasis>idstoffset</emphasis> are valid. Elements from the vector that are outside the table, will be discarded, and they will not wrap around the table. |
| 53 | </para> |
| 54 | <para> |
| 55 | This opcode runs only on initialization, there is a k-rate version of this opcode called <link linkend="vexp"><citetitle>vexp</citetitle></link>. |
| 56 | </para> |
| 57 | <para> |
| 58 | In all these opcodes, the resulting vectors are stored in <emphasis>ifn</emphasis>, overriding the initial vectors. If you want to keep initial vector, use <link linkend="vcopy"><citetitle>vcopy</citetitle></link> or <link linkend="vcopy_i"><citetitle>vcopy_i</citetitle></link> to copy it in another table. All these operators are designed to be used together with other opcodes that operate with vectorial signals such as <link linkend="vcella"><citetitle>vcella</citetitle></link>, <link linkend="adsynt"><citetitle>adsynt</citetitle></link>, <link linkend="adsynt2"><citetitle>adsynt2</citetitle></link>, etc. They can also be useful in conjunction with the spectral opcodes <link linkend="pvsftw"><citetitle>pvsftw</citetitle></link> and <link linkend="pvsftr"><citetitle>pvsftr</citetitle></link>. |
| 59 | </para> |
| 60 | </refsect1> |
| 61 | |
| 62 | <refsect1> |
| 63 | <title>Examples</title> |
| 64 | <para> |
| 65 | Here is an example of the vexp_i opcode. It uses the file <ulink url="examples/vexp_i.csd"><citetitle>vexp_i.csd</citetitle></ulink>. |
| 66 | |
| 67 | <example> |
| 68 | <title>Example of the vexp_i opcode.</title> |
| 69 | <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> |
| 70 | <xi:include href="examples-xml/vexp_i.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 71 | </example> |
| 72 | </para> |
| 73 | </refsect1> |
| 74 | |
| 75 | <refsect1> |
| 76 | <title>See also</title> |
| 77 | <para><link linkend="vectorialscalar"><citetitle>Operations Vectorial/Scalar Signal</citetitle></link></para> |
| 78 | </refsect1> |
| 79 | |
| 80 | <refsect1> |
| 81 | <title>Credits</title> |
| 82 | <para>Written by Gabriel Maldonado. Optional arguments added by Andres Cabrera and Istvan Varga.</para> |
| 83 | <para>New in Csound 5 (Previously available only on CsoundAV)</para> |
| 84 | </refsect1> |
| 85 | </refentry> |