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

ftlen, ftlptim, ftsr, nsamp

          ftlen(x)   (init-rate args only)
          ftlptim(x) (init-rate args only)
          ftsr(x)    (init-rate args only)
          nsamp(x)   (init-rate args only)

Description

Where the argument within the parentheses may be an expression. These value converters return information about a stored function table. The result can be a term in a further expression.

Performance

ftlen(x) – returns the size (number of points, excluding guard point) of stored function table, number x. While most units referencing a stored table will automatically take its size into account (so tables can be of arbitrary length), this function reports the actual size if that is needed. Note that ftlen will always return a power-of-2 value, i.e. the function table guard point (see f Statement) is not included.As of Csound version 3.53, ftlen works with deferred function tables (see GEN01).

ftlptim(x) - returns the loop segment start-time (in seconds) of stored function table number x. This reports the duration of the direct recorded attack and decay parts of a sound sample, prior to its looped segment. Returns zero (and a warning message) if the sample does not contain loop points.

ftsr(x) – returns the sampling-rate of a GEN01 or GEN22 generated table. The sampling-rate is determined from the header of the original file. If the original file has no header, or the table was not created by these two GENs ftsr returns 0. New in Csound version 3.49.

nsamp(x) – returns the number of samples loaded into stored function table number x by GEN01 or GEN22. This is useful when a sample is shorter than the power-of-two function table that holds it. New in Csound version 3.49.

Authors

Barry Vercoe
MIT
Cambridge, Massachussetts
1997

Gabriel Maldonado (ftsr, nsamp)
Italy
October, 1998


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