vdivv Vectorial:Vectorial operations vdivv vdivv Performs division between two vectorial control signals Description Performs division between two vectorial control signals Syntax vdivv ifn1, ifn2, kelements [, kdstoffset] [, ksrcoffset] [,kverbose] Initialization ifn1 - number of the table hosting the first vector to be processed ifn2 - number of the table hosting the second vector to be processed Performance kelements - number of elements of the two vectors kdstoffset - index offset for the destination (ifn1) table (Default=0) ksrcoffset - index offset for the source (ifn2) table (Default=0) kverbose - Selects whether or not warnings are printed (Default=0) vdivv divides two vectorial control signals, that is, each element of ifn1 is divided by the corresponding element of ifn2. Each vectorial signal is hosted by a table (ifn1 and ifn2). The number of elements contained in both vectors must be the same. The result is a new vectorial control signal that overrides old values of ifn1. If you want to keep the old ifn1 vector, use vcopy_i opcode to copy it in another table. You can use kdstoffset and ksrcoffset to specify vectors in any location of the tables. Negative values for kdstoffset and ksrcoffset are acceptable. If kdstoffset is negative, the out of range section of the vector will be discarded. If ksrcoffset 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 elements will be set to 0). If the optional kverbose argument is different to 0, the opcode will print warning messages every k-pass if table lengths are exceeded. Using the same table as source and destination table in versions earlier than 5.04, might produce unexpected behavior, so use with care. This opcode works at k-rate (this means that every k-pass the vectors are divided). There's an i-rate version of this opcode called vdivv_i. Please note that the elements argument has changed in version 5.03 from i-rate to k-rate. This will change the opcode's behavior in the unusual cases where the i-rate variable ielements is changed inside the instrument, for example in: instr 1 ielements = 10 vadd 1, 1, ielements ielements = 20 vadd 2, 1, ielements turnoff endin All these operators (vaddv,vsubv,vmultv,vdivv,vpowv,vexpv, vcopy and vmap) are designed to be used together with other opcodes that operate with vectorial signals such as bmscan, vcella, adsynt, adsynt2 etc. Examples Here is an example of the vdivv opcode. It uses the file vdivv.csd. Example of the vdivv opcode. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. Credits Written by Gabriel Maldonado. Optional arguments added by Andres Cabrera and Istvan Varga. New in Csound 5 (Previously available only on CsoundAV)