Debian Codegraph @

opcodes/vpow_i.xml

raw symbols SCIP
1
2 <refentry id="vpow_i">
3 <indexterm id="IndexVpow_i"><primary>vpow_i</primary></indexterm>
4 <refentryinfo><title>Vectorial:Scalar operations</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>vpow_i</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>vpow_i</refname>
11 <refpurpose>
12 Raises each element of a vector to a scalar power
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 Raises each element of a vector to a scalar power
20 </para>
21 </refsect1>
22 <refsect1>
23 <title>Syntax</title>
24 <synopsis><command>vpow_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>ielements</emphasis> - number of elements of the vector
34 </para>
35 <para>
36 <emphasis>ival</emphasis> - scalar value to which the elements of ifn will be raised
37 </para>
38 <para>
39 <emphasis>idstoffset</emphasis> - index offset for the destination table
40 </para>
41 </refsect1>
42
43 <refsect1>
44 <title>Performance</title>
45 <para>
46 <emphasis>vpow_i</emphasis> elevates each element of the vector contained in the table <emphasis>ifn</emphasis> to the power of <emphasis>ival</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.
47 </para>
48 <para>
49 This opcode runs only on initialization, there is a k-rate version of this opcode called <link linkend="vpow"><citetitle>vpow</citetitle></link>.
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 In all these opcodes, the resulting vectors are stored in <emphasis>ifn</emphasis>, overriding the intial 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>.
56 </para>
57 </refsect1>
58
59 <refsect1>
60 <title>Examples</title>
61 <para>
62 Here is an example of the vpow_i opcode. It uses the file <ulink url="examples/vpow_i.csd"><citetitle>vpow_i.csd</citetitle></ulink>.
63 <example>
64 <title>Examples of the vpow_i opcode.</title>
65 <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>
66 <xi:include href="examples-xml/vpow_i.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
67 </example>
68 </para>
69 <para>
70 Here is another example of the vpow_i opcode. It uses the file <ulink url="examples/vpow_i-2.csd"><citetitle>vpow_i-2.csd</citetitle></ulink>.
71 <example>
72 <xi:include href="examples-xml/vpow_i-2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
73 </example>
74 </para>
75 </refsect1>
76
77 <refsect1>
78 <title>See also</title>
79 <para><link linkend="vectorialscalar"><citetitle>Operations Vectorial/Scalar Signal</citetitle></link></para>
80 </refsect1>
81
82 <refsect1>
83 <title>Credits</title>
84 <para>Written by Gabriel Maldonado. Optional arguments added by Andres Cabrera and Istvan Varga.</para>
85 <para>New in Csound 5 (Previously available only on CsoundAV)</para>
86 </refsect1>
87 </refentry>