GEN27 GEN27 GEN27 Construct functions from segments of straight lines in breakpoint fashion. Description Construct functions from segments of straight lines in breakpoint fashion. Syntax f # time size 27 x1 y1 x2 y2 x3 ... Initialization size -- number of points in the table. Must be a power of 2 or power-of-2 plus 1 (see f statement). x1, x2, x3, etc. -- locations in table at which to attain the following y value. Must be in increasing order. If the last value is less than size, then the rest will be set to zero. Should not be negative but can be zero. y1, y2, y3,, etc. -- Breakpoint values attained at the location specified by the preceding x value. Note If p4 is positive, functions are post-normalized (rescaled to a maximum absolute value of 1 after generation). A negative p4 will cause rescaling to be skipped. Examples Here is an example of the GEN27 generator. It uses the file gen27.csd. Example of the GEN27 generator. See the sections Real-time Audio and Command Line Flags for more information on using command line flags. This is the diagram of the waveform of the GEN27 routine, as used in the example: f 2 0 1025 27 0 0 200 1 400 -1 513 0 - a function which begins at 0, rises to 1 at the 200th table location, falls to -1, by the 400th location, and returns to 0 by the end of the table. The interpolation is linear f 2 0 1025 27 0 0 200 1 400 -1 513 0 - a function which begins at 0, rises to 1 at the 200th table location, falls to -1, by the 400th location, and returns to 0 by the end of the table. The interpolation is linear See Also f statement, GEN25 Credits Author: &namejohn; University of Bath/Codemist Ltd. Bath, UK New in Csound version 3.49