Use Non-Frames Version Previous Page Next Page
Score Syntax: Statements

f Statement (or Function Table Statement)

  f  p1  p2  p3  p4 ...


This causes a GEN subroutine to place values in a stored function table for use by instruments.

P Fields

  p1    Table number (from 1 to 200) by which the stored function will be known. A negative number requests that the table be destroyed.   
  p2    Action time of function generation (or destruction) in beats. 
  p3    Size of function table (i.e.  number of points) Must be a power of 2, or a power-of-2 plus 1 (see below). Maximum table size is 16777216 (2**24) points. 
  p4    Number of the GEN routine to be called (see GEN ROUTINES). A negative value will cause rescaling to be omitted. 
  p5    |
  p6    |    Parameters whose meaning is determined by the particular GEN
        |    routine.
  .     |
  .     |

Special Considerations

Function tables are arrays of floating-point values. Arrays can be of any length in powers of 2; space allocation always provides for 2n points plus an additional guard point. The guard point value, used during interpolated lookup, can be automatically set to reflect the table's purpose: If size is an exact power of 2, the guard point will be a copy of the first point; this is appropriate for interpolated wrap-around lookup as in oscili, etc., and should even be used for non-interpolating oscil for safe consistency. If size is set to 2n + 1, the guard point value automatically extends the contour of table values; this is appropriate for single-scan functions such in envplx, oscil1, oscil1i, etc.

Table space is allocated in primary memory, along with instrument data space. The maximum table number has a soft limit of 200; this can be extended if required.

An existing function table can be removed by an f statement containing a negative p1 and an appropriate action time. A function table can also be removed by the generation of another table with the same p1. Functions are not automatically erased at the end of a score section.

p2 action time is treated in the same way as in i statements with respect to sorting and modification by t statements. If an f statement and an i statement have the same p2, the sorter gives the f statement precedence so that the function table will be available during note initialization.

An f 0 statement (zero p1, positive p2) may be used to create an action time with no associated action. Such time markers are useful for padding out a score section (see s statement)

Use Non-Frames Version Previous Page Next Page
Score Syntax: Statements