vpow_iVectorial:Scalar operationsvpow_ivpow_i
Raises each element of a vector to a scalar power
Description
Raises each element of a vector to a scalar power
Syntaxvpow_i ifn, ival, ielements [, idstoffset]Initializationifn - number of the table hosting the vectorial signal to be processed
ielements - number of elements of the vector
ival - scalar value to which the elements of ifn will be raised
idstoffset - index offset for the destination table
Performancevpow_i elevates each element of the vector contained in the table ifn to the power of ival, starting from table index idstoffset. 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.
This opcode runs only on initialization, there is a k-rate version of this opcode called vpow.
Negative values for idstoffset are valid. Elements from the vector that are outside the table, will be discarded, and they will not wrap around the table.
In all these opcodes, the resulting vectors are stored in ifn, overriding the intial vectors. If you want to keep initial vector, use vcopy or vcopy_i 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 vcella, adsynt, adsynt2, etc. They can also be useful in conjunction with the spectral opcodes pvsftw and pvsftr.
Examples
Here is an example of the vpow_i opcode. It uses the file vpow_i.csd.
Examples of the vpow_i opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
Here is another example of the vpow_i opcode. It uses the file vpow_i-2.csd.
See alsoOperations Vectorial/Scalar SignalCreditsWritten by Gabriel Maldonado. Optional arguments added by Andres Cabrera and Istvan Varga.New in Csound 5 (Previously available only on CsoundAV)