gen6 - make a function with straight line segments
makegen(table_number, 6, table_size, time1, value1, time2, value2, ... timeN, valueN)
Call makegen from a script with a function_type of 6 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.
Normally the table will be rescaled to fit between -1 and 1. Put a negative sign before the number to prevent this.
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, 6, 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 18 works just like gen 6, except that it never normalizes the table to fit between -1 and 1.
Gen 24 works just like gen 6, but is subtly different. (We're not really sure why both of these exist...)