<- C I ->

VALUE CONVERTERS

          ftlen(x)       (init-rate args only)

          int(x)         (init- or control-rate args only)
          frac(x)        (init- or control-rate args only)
          dbamp(x)       (init- or control-rate args only)

          i(x)           (control-rate args only)

          abs(x)         (no rate restriction)
          exp(x)         (no rate restriction)
          log(x)         (no rate restriction)
          sqrt(x)        (no rate restriction)
          sin(x)         (no rate restriction)
          cos(x)         (no rate restriction)
          ampdb(x)       (no rate restriction)
where the argument within the parentheses may be an expression.

Value converters perform arithmetic translation from units of one kind to units of another. The result can then be a term in a further expression.

ftlen(x)
returns the size (no. of points) of stored function table no. x.
int(x)
returns the integer part of x.
frac(x)
returns the fractional part of x.
dbamp(x)
returns the decibel equivalent of the raw amplitude x.
i(x)
returns an Init-type equivalent of the argument, thus permitting a K-time value to be accessed in at init-time or reinit-time, whenever valid.
abs(x)
returns the absolute value of x.
exp(x)
returns e raised to the xth power.
log(x)
returns the natural log of x (x positive only).
sqrt(x)
returns the square root of x (x non-negative).
sin(x)
returns the sine of x (x in radians).
cos(x)
returns the cosine of x (x in radians).
ampdb(x)
returns the amplitude equivalent of the decibel value x. Thus 60 db gives 1000, 66 db gives 2000, 72 db gives 4000, 78 db gives 8000, 84 db gives 16000 and 90 db gives 32000.

Note that for log, sqrt, and ftlen the argument value is restricted. Note also that ftlen will always return a power-of-2 value, i.e. the function table guard point (see F statement) is not included.

<- C I ->
Prepared from the MIT Media Lab Csound Manual, PJN, Nov 1994.