gen18 - make a function with straight line segments
makegen(table_number, 18, table_size, time1, value1, time2, value2, ... timeN, valueN)
Call makegen from a script with a function_type of 18 to make a function table with any number of straight line segments.
If you want to use this to make table number 1 -- for an amplitude envelope, for example -- you may find setline more convenient.
Unlike other gens, gen 18 never rescales the table to fit between -1 and 1.
Successive times must be in ascending order. To make an instantaneous change of amplitude, use the same time for two adjacent pairs.
The shape created by the table is scaled to fit the duration of each note that follows.
makegen(1, 18, 1000, 0,0, 1,1, 10,0)
makes a quick ramp from 0 to 1, followed by a much slower ramp from 1 to 0.
Gen 6 works just like gen 18, except that it normally scales the table to fit between -1 and 1.