The Alternative Csound Reference Manual
Previous |  | Next

# GEN02

GEN02 -- Transfers data from immediate pfields into a function table.

## Description

This subroutine transfers data from immediate pfields into a function table.

## Syntax

f # time size 2 v1 v2 v3 ...

## Initialization

size -- number of points in the table. Must be a power of 2 or a power-of-2 plus 1 (see f statement). The maximum tablesize is 16777216 (224) points.

v1, v2, v3, ... -- values to be copied directly into the table space. The number of values is limited by the compile-time variable PMAX, which controls the maximum pfields (currently 1000). The values copied may include the table guard point; any table locations not filled will contain zeros.

| Note
| If p4 is positive, the table will be post-normalized (rescaled to a maximum absolute value of 1 after generation). A negative p4 will cause rescaling to be skipped.

## Examples

    f   1  0  16  -2  0  1  2  3  4  5  6  7  8  9  10  11  0

This calls upon GEN02 to place 12 values plus an explicit wrap-around guard value into a table of size next-highest power of 2. Rescaling is inhibited.

## Credits

December 2002. Thanks to Rasmus Ekman, corrected the limit of the PMAX variable.

Previous | Home | Next
GEN01 | Up | GEN03