tablexkt

Name

tablexkt --  Reads function tables with linear, cubic, or sinc interpolation.

Description

Reads function tables with linear, cubic, or sinc interpolation.

Syntax

ar tablexkt xndx, kfn, kwarp, iwsize [, ixmode] [, ixoff] [, iwrap]

Initialization

iwsize -- This parameter controls the type of interpolation to be used:

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

Notes: if tablexkt is used to play back samples with looping (e.g. table index is generated by lphasor), there must be at least iwsize / 2 extra samples after the loop end point for interpolation, otherwise audible clicking may occur (also, at least iwsize / 2 samples should be before the loop start point).

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

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

Note: iwrap also applies to extra samples for interpolation.

Performance

ar -- audio output

xndx -- table index

kfn -- function table number

kwarp -- if greater than 1, use sin (x / kwarp) / x function for sinc interpolation, instead of the default sin (x) / x. This is useful to avoid aliasing when transposing up (kwarp should be set to the transpose factor in this case, e.g. 2.0 for one octave), however it makes rendering up to twice as slow. Also, iwsize should be at least kwarp * 8. This feature is experimental, and may be optimized both in terms of speed and quality in new versions.

Note: kwarp has no effect if it is less than, or equal to 1, or linear or cubic interpolation is used.

Credits

Author: Istvan Varga
January 2002

New in version 4.18