ir table indx, ifn[, ixmode[, ixoff[, iwrap]]] ir tablei indx, ifn[, ixmode[, ixoff[, iwrap]]] ir table3 indx, ifn[, ixmode[, ixoff[, iwrap]]] kr table kndx, ifn[, ixmode[, ixoff[, iwrap]]] kr tablei kndx, ifn[, ixmode[, ixoff[, iwrap]]] kr table3 kndx, ifn[, ixmode[, ixoff[, iwrap]]] ar table andx, ifn[, ixmode[, ixoff[, iwrap]]] ar tablei andx, ifn[, ixmode[, ixoff[, iwrap]]] ar table3 andx, ifn[, ixmode[, ixoff[, iwrap]]] kr oscil1 idel, kamp, idur, ifn kr oscil1i idel, kamp, idur, ifn ar osciln kamp, ifrq, ifn, itimes
Table values are accessed by direct indexing or by incremental sampling.
ifn – function table number. tablei, oscil1i require the extended guard point.
ixmode (optional) – index data mode. The default value is 0.
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.
idel – delay in seconds before oscil1 incremental sampling begins.
idur – duration in seconds to sample through the oscil1 table just once. A zero or negative value will cause all initialization to be skipped.
ifrq, itimes – rate and number of times through the stored table.
table invokes table lookup on behalf of init, control or audio indices. These indices can be raw entry numbers (0,l,2...size - 1) or scaled values (0 to 1-e). Indices are first modified by the offset value then checked for range before table lookup (see iwrap). If index is likely to be full scale, or if interpolation is being used, the table should have an extended guard point. table indexed by a periodic phasor ( see phasor) will simulate an oscillator.
oscil1 accesses values by sampling once through the function table at a rate determined by idur. For the first idel seconds, the point of scan will reside at the first location of the table; it will then begin moving through the table at a constant rate, reaching the end in another idur seconds; from that time on (i.e. after idel + idur seconds) it will remain pointing at the last location. Each value obtained from sampling is then multiplied by an amplitude factor kamp before being written into the result. Because oscil1 is an interpolating opcode, the table it reads should have a guard point.
osciln will sample several times through the stored table at a rate of ifrq times per second, after which it will output zeros. Generates audio signals only, with output values scaled by kamp.
tablei and oscil1i are interpolating units 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). table3 is experimental, and is identical to tablei, except that it uses cubic interpolation. (New in Csound version 3.50.)