gen7 - make a function with any number of straight line segments
makegen(table_number, 7, table_size, value1, num_elements1 [, valueN-1, num_elementsN-1, ... ] valueN)
Call makegen from a script with a function_type of 7 to make a function table with any number of straight line segments.
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 setline more convenient.
Gen 5 works just like gen 7, except that it uses exponential line segments.
Normally the table will be rescaled to fit between -1 and 1. Put a negative sign before the number to prevent this.
The sum of all the num_elements arguments must equal table_size.
makegen(1, 7, 1000, 0, 200, 1, 600, 0.5, 200, 0)
makes a straight-line ramp from 0 to 1 over 200 table elements, followed by another ramp from 1 to 0.5 over 600 table elements, and then a ramp from 0.5 to 0 over 200 table elements.