gen5 - make a function with any number of exponential line segments
makegen(table_number, 5, table_size, value1, num_elements1 [, valueN-1, num_elementsN-1, ... ] valueN)
Call makegen from a script with a function_type of 5 to make a function table with any number of exponential line segments, where the ratio between successive values is equal.
The num_elements arguments control how many table elements a line segment spans, as it connects two successive value arguments.
If you want to use this to make table number 1 -- for an amplitude envelope, for example -- you may find setexp more convenient.
Gen 7 works just like gen 5, except that it uses straight line segments.
Normally the table will be rescaled to fit between -1 and 1. Put a negative sign before the number to prevent this.
A value of 0 will be converted internally to 0.00001.
The sum of all the num_elements arguments must equal table_size.
makegen(1, 5, 1000, 0.01, 1000, 1)
makes an exponential ramp from 0.01 to 1.
makegen(1, 5, 1000, 0, 700, 1, 300, 0.01)
makes an exponential ramp from 0.00001 to 1 over 700 table elements, followed by an exponential ramp from 1 to 0.01 over 300 table elements. The first segment is steeper, because the ratio between its values, 0.00001 and 1, is greater. (Remember, a 0 value is converted internally to 0.00001.)