Use Non-Frames Version Previous Page Next Page
Function Table Control: Table Selection

tablekt, tableikt

  kr      tablekt    kndx, kfn[, ixmode[, ixoff[, iwrap]]]
  ar      tablekt    xndx, kfn[, ixmode[, ixoff[, iwrap]]]
  kr      tableikt   kndx, kfn[, ixmode[, ixoff[, iwrap]]]
  ar      tableikt   xndx, kfn[, ixmode[, ixoff[, iwrap]]]

Description

k-rate control over table numbers.

The standard Csound opcodes table and tablei, when producing a k- or a-rate result, can only use an init-time variable to select the table number. tablekt and tableikt accept k-rate control as well as i-time. In all other respects they are similar to the original opcodes.

Initialization

indx - Index into table, either a positive number range

ifn - Table number. Must be >= 1. Floats are rounded down to an integer. If a table number does not point to a valid table, or the table has not yet been loaded (GEN01) then an error will result and the instrument will be de-activated.

ixmode - if 0, xndx and ixoff ranges match the length of the table. if non-zero xndx and ixoff have a 0 to 1 range. Default is 0

ixoff - if 0, total index is controlled directly by xndx, ie. the indexing starts from the start of the table. If non-zero, start indexing from somewhere else in the table. Value must be positive and less than the table length (ixmode = 0) or less than 1 (ixmode !=0). Default is 0.

iwrap - if iwrap = 0, Limit mode: when total index is below 0, then final index is 0.Total index above table length results in a final index of the table length - high out of range total indexes stick at the upper limit of the table. If iwrap !=0, Wrap mode: total index is wrapped modulo the table length so that all total indexes map into the table. For instance, in a table of length 8, xndx = 5 and ixoff = 6 gives a total index of 11, which wraps to a final index of 3. Default is 0.

Performance

kndx - Index into table, either a positive number range

xndx - matching the table length (ixmode = 0) or a 0 to 1 range (ixmode != 0)

kfn - Table number. Must be >= 1. Floats are rounded down to an integer. If a table number does not point to a valid table, or the table has not yet been loaded (GEN01) then an error will result and the instrument will be de-activated.

Author

Robin Whittle
Australia
1997


Use Non-Frames Version Previous Page Next Page
Function Table Control: Table Selection