vcopy_i
Prev | Orchestra Opcodes and Operators | Next

## vcopy_i

vcopy_i — Copies a vector from one table to another.

## Description

Copies a vector from one table to another.

## Syntax

    vcopy_i  ifn, ifn2, ielements [,idstoffset, isrcoffset]

## Initialization

ifn - number of the table where the vectorial signal will be copied

ifn - number of the table hosting the vectorial signal to be copied

ielements - number of elements of the vector

idstoffset - index offset for destination table

isrcoffset - index offset for source table

## Performance

vcopy copies ielements elements from ifn2 (starting from position isrcoffset) to ifn1 (starting from position idstoffset). Useful to keep old vector values, by storing them in another table. This opcode is exactly the same as vcopy but performs all the copying on the intialization pass only.

Negative values for idstoffset and isrcoffset are acceptable. If idstoffset is negative, the out of range section of the vector will be discarded. If isrcoffset 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).

| Warning
Using the same table as source and destination table in versions earlier than 5.04, might produce unexpected behavior, so use with care.

All these operators (vaddv,vsubv,vmultv,vdivv,vpowv,vexp, vcopy and vmap) are designed to be used together with other opcodes that operate with vectorial signals such as bmscan, vcella, adsynt, adsynt2 etc.

Note: bmscan not yet available on Canonical Csound

## Examples

See vcopy for an example.

## Credits

Written by Gabriel Maldonado. Optional arguments added by Andres Cabrera and Istvan Varga.

New in Csound 5 (Previously available only on CsoundAV)

Prev | Up | Next
vcopy | Home | vdelay