ptableiSignal Generators:Table Accessptableiptablei
Accesses table values by direct indexing with linear interpolation.
Description
Accesses table values by direct indexing with linear interpolation.
Syntaxares ptablei andx, ifn [, ixmode] [, ixoff] [, iwrap]ires ptablei indx, ifn [, ixmode] [, ixoff] [, iwrap]kres ptablei kndx, ifn [, ixmode] [, ixoff] [, iwrap]Initializationifn -- function table number. The table
need not be a power of 2 long.
ixmode (optional) -- index data mode. The default value is 0.
0 = raw index1 = 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.Performanceptablei 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.
Examples
Here is an example of the ptablei opcode. It uses the file ptablei.csd.
Example of the ptablei opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See Alsotable,
tablei,
table3,
ptable,
ptable3,
oscil1,
oscil1i,
osciln More information on this opcode: http://www.csoundjournal.com/issue12/genInstruments.html , written by Jacob Joaquin CreditsAuthor: &namejohn;Jan 2012New in Csound version 5.16