| 1 |
|
| 2 |
<refentry id="vcopy_i"> |
| 3 |
<indexterm id="IndexVcopy_i"><primary>vcopy</primary></indexterm> |
| 4 |
<refentryinfo><title>Vectorial:Vectorial operations</title></refentryinfo> |
| 5 |
<refmeta> |
| 6 |
<refentrytitle>vcopy_i</refentrytitle> |
| 7 |
</refmeta> |
| 8 |
|
| 9 |
<refnamediv> |
| 10 |
<refname>vcopy_i</refname> |
| 11 |
<refpurpose> |
| 12 |
Copies a vector from one table to another. |
| 13 |
</refpurpose> |
| 14 |
</refnamediv> |
| 15 |
|
| 16 |
<refsect1> |
| 17 |
<title>Description</title> |
| 18 |
<para> |
| 19 |
Copies a vector from one table to another. |
| 20 |
</para> |
| 21 |
</refsect1> |
| 22 |
<refsect1> |
| 23 |
<title>Syntax</title> |
| 24 |
<synopsis><command>vcopy_i</command> ifn1, ifn2, ielements [,idstoffset, isrcoffset]</synopsis> |
| 25 |
</refsect1> |
| 26 |
|
| 27 |
<refsect1> |
| 28 |
<title>Initialization</title> |
| 29 |
<para> |
| 30 |
<emphasis>ifn1</emphasis> - number of the table where the vectorial signal will be copied |
| 31 |
</para> |
| 32 |
<para> |
| 33 |
<emphasis>ifn2</emphasis> - number of the table hosting the vectorial signal to be copied |
| 34 |
</para> |
| 35 |
<para> |
| 36 |
<emphasis>ielements</emphasis> - number of elements of the vector |
| 37 |
</para> |
| 38 |
<para> |
| 39 |
<emphasis>idstoffset</emphasis> - index offset for destination table |
| 40 |
</para> |
| 41 |
<para> |
| 42 |
<emphasis>isrcoffset</emphasis> - index offset for source table |
| 43 |
</para> |
| 44 |
</refsect1> |
| 45 |
|
| 46 |
<refsect1> |
| 47 |
<title>Performance</title> |
| 48 |
<para> |
| 49 |
<emphasis>vcopy_i</emphasis> copies <emphasis>ielements</emphasis> elements from <emphasis>ifn2</emphasis> (starting from position <emphasis>isrcoffset</emphasis>) to <emphasis>ifn1</emphasis> (starting from position <emphasis>idstoffset</emphasis>). Useful to keep old vector values, by storing them in another table. This opcode is exactly the same as <link linkend="vcopy"><citetitle>vcopy</citetitle></link> but performs all the copying on the intialization pass only. |
| 50 |
</para> |
| 51 |
<para> |
| 52 |
Negative values for <emphasis>idstoffset</emphasis> and <emphasis>isrcoffset</emphasis> are acceptable. If <emphasis>idstoffset</emphasis> is negative, the out of range section of the vector will be discarded. If <emphasis>isrcoffset</emphasis> is negative, the out of range elements will be assumed to be 0 (i.e. the destination elements will be set to 0). If elements for the destination vector are beyond the size of the table (including guard point), these elements are discarded (i.e. elements do not wrap around the tables). If elements for the source vector are beyond the table length, these elements are taken as 0 (i.e. the destination vector elements will be 0). |
| 53 |
</para> |
| 54 |
<warning> |
| 55 |
<para> |
| 56 |
Using the same table as source and destination table in versions earlier than 5.04, might produce unexpected behavior, so use with care. |
| 57 |
</para> |
| 58 |
</warning> |
| 59 |
<para> |
| 60 |
All these operators (<link linkend="vaddv"><citetitle>vaddv</citetitle></link>,<link linkend="vsubv"><citetitle>vsubv</citetitle></link>,<link linkend="vmultv"><citetitle>vmultv</citetitle></link>,<link linkend="vdivv"><citetitle>vdivv</citetitle></link>,<link linkend="vpowv"><citetitle>vpowv</citetitle></link>,<link linkend="vexp"><citetitle>vexp</citetitle></link>, <link linkend="vcopy"><citetitle>vcopy</citetitle></link> and <link linkend="vmap"><citetitle>vmap</citetitle></link>) 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. |
| 61 |
</para> |
| 62 |
|
| 63 |
</refsect1> |
| 64 |
|
| 65 |
<refsect1> |
| 66 |
<title>Examples</title> |
| 67 |
<para> |
| 68 |
See <link linkend="vcopy"><citetitle>vcopy</citetitle></link> for an example. |
| 69 |
</para> |
| 70 |
</refsect1> |
| 71 |
|
| 72 |
<refsect1> |
| 73 |
<title>See also</title> |
| 74 |
<para><link linkend="vectorialvectorial"><citetitle>Operations Between two Vectorial Signals</citetitle></link></para> |
| 75 |
</refsect1> |
| 76 |
|
| 77 |
<refsect1> |
| 78 |
<title>Credits</title> |
| 79 |
<para>Written by Gabriel Maldonado. Optional arguments added by Andres Cabrera and Istvan Varga.</para> |
| 80 |
<para>New in Csound 5 (Previously available only on CsoundAV)</para> |
| 81 |
</refsect1> |
| 82 |
</refentry> |