tablei

tablei — Accesses table values by direct indexing with linear interpolation.

Description

Accesses table values by direct indexing with linear interpolation.

Syntax

ares tablei andx, ifn [, ixmode] [, ixoff] [, iwrap]
ires tablei indx, ifn [, ixmode] [, ixoff] [, iwrap]
kres tablei kndx, ifn [, ixmode] [, ixoff] [, iwrap]

Initialization

ifn -- function table number. tablei requires the extended guard point.

ixmode (optional) -- index data mode. The default value is 0.

  • 0 = raw index

  • 1 = normalized (0 to 1)

ixoff (optional) -- amount by which index is to be offset. For a table with origin at center, use tablesize/2 (raw) or .5 (normalized). The default value is 0.

iwrap (optional) -- wraparound index flag. The default value is 0.

  • 0 = nowrap (index < 0 treated as index=0; index tablesize sticks at index=size)

  • 1 = wraparound.

Performance

tablei is a interpolating unit in which the fractional part of index is used to interpolate between adjacent table entries. The smoothness gained by interpolation is at some small cost in execution time (see also oscili, etc.), but the interpolating and non-interpolating units are otherwise interchangeable. Note that when tablei uses a periodic index whose modulo n is less than the power of 2 table length, the interpolation process requires that there be an (n+ 1)th table value that is a repeat of the 1st (see f Statement in score).

See Also

table, table3, oscil1, oscil1i, osciln