GEN Routines: Line/Exponential Segment Generators

## GEN16

**f** # time size 16 beg dur type end

### Description

Creates a table from *beg* value to *end* value of *dur* steps.

### 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 normal value is power-of-2 plus 1.

*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

### Note

If *type* > 0, there is a slowly rising, fast decaying (convex)
curve, while if *type* < 0, the curve is fast rising, slowly decaying
(concave). See also **transeg**.

### Author

John ffitch

University of Bath, Codemist. Ltd.

Bath, UK

October, 2000

New in Csound version 4.09

GEN Routines: Line/Exponential Segment Generators