vtabk

vtabk — Read vectors (from tables -or arrays of vectors).

Description

This opcode reads vectors from tables at k-rate.

Syntax

vtabk  kndx, ifn, kout1 [, kout2, kout3, .... , koutN ]

Initialization

ifn - table number

Performance

kndx - Index into f-table, either a positive number range matching the table length

kout1...koutN - output vector elements

This opcode is useful in all cases in which one needs to access sets of values associated to unique indexes (for example, multi-channel samples, STFT bin frames, spectral formants, p-field based scores etc.) . The number of elements of each vector (length of the vector) is determined by the number of optional arguments on the right (kout1, kout2, kout3, .... koutN).

Notice that no wrap nor limit mode is implemented. So, if an index attempt to access to a zone not allocated by the table, Csound will probably crash. However this drawback can be easily avoided by using wrap or limit opcodes applied to indexes before using vtabk, in order to correct eventual out-of-range values.

The vtab family is similar to vtable, but is much faster because interpolation is not available, table number cannot be changed after initialization, and only raw indexing is supported.

[Note] Note

Notice that vtabk's output arguments are placed at the right of the opcode name, differently from usual (this style is already used in other opcodes using undefined lists of output arguments such as fin or trigseq).

Examples

For an example of the vtabk opcode usage, see vtablek.

See also

vtabi, vtaba, vtablek, vtablewk, vtabwk,

Credits

Written by Gabriel Maldonado.

New in Csound 5 (Previously available only on CsoundAV)