tab

tab — Fast table opcodes.

Description

Fast table opcodes. Faster than table and tablew because don't allow wrap-around and limit and don't check index validity. Have been implemented in order to provide fast access to arrays. Support non-power of two tables (can be generated by any GEN function by giving a negative length value).

Syntax

ir tab_i indx, ifn[, ixmode]
kr tab kndx, ifn[, ixmode]
ar tab xndx, ifn[, ixmode]
tabw_i isig, indx, ifn [,ixmode]
tabw ksig, kndx, ifn [,ixmode]
tabw asig, andx, ifn [,ixmode]

Initialization

ifn -- table number

ixmode -- defaults to zero. If zero xndx and ixoff ranges match the length of the table; if non zero xndx and ixoff have a 0 to 1 range.

isig -- input value to write.

indx -- table index

Performance

asig, ksig -- input signal to write.

andx, kndx -- table index.

tab and tabw opcodes are similar to table and tablew, but are faster and support tables having non-power-of-two length.

Special care of index value must be taken into account. Index values out of the table allocated space will crash Csound.

Credits

Written by Gabriel Maldonado.