GEN16GEN16GEN16
Creates a table from a starting value to an ending value.
Description
Creates a table from beg value to end value of dur steps.
Syntaxf # time size 16 val1 dur1 type1 val2 [dur2 type2 val3 ... typeX valN]Initializationsize -- number of points in the table. Must
be a power of 2 or a power-of-2 plus 1 (see f statement). The
normal value is power-of-2 plus 1.
The end value is only reached when the table length is power-of-2 plus 1.
(This length is crucial for use with the tab generator.)
beg -- starting value
dur -- number of segments
type -- if 0, a straight line is produced. If non-zero, then GEN16 creates the following curve, for dur steps:
beg + (end - beg) * (1 - exp( i*type/(dur-1) )) / (1 - exp(type))
end -- value after dur segments
Here are some examples of the curves generated for different values of type:
Tables generated by GEN16 for different values of type.
Tables generated by GEN16 for different values of type.
Note
If type > 0, there is a slowly rising (concave) or slowly decaying
(convex) curve, while if itype < 0, the curve is fast rising (convex) or
fast decaying (concave). See also transeg.
A simple example of the GEN16 routine.CreditsAuthor: &namejohn;University of Bath, Codemist. Ltd.Bath, UKOctober, 2000New in Csound version 4.09