NAME

gen18 - make a function with straight line segments


SYNOPSIS

makegen(table_number, 18, table_size, time1, value1, time2, value2, ... timeN, valueN)


DESCRIPTION

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.

NOTE: Much of the functionality of gen 18 has been duplicated and extended by the "line" table-type in maketable and the new (in RTcmix 4.0) table-handle scheme.


ARGUMENTS

table_number
The numeric ID for the function table.

Unlike other gens, gen 18 never rescales the table to fit between -1 and 1.

table_size
The size of the function table: how many values it stores.

timeN
valueN
Pairs of time,value arguments define points throught which straight line segments are drawn.

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.


EXAMPLES

   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.



NOTES

Gen 6 works just like gen 18, except that it normally scales the table to fit between -1 and 1.


SEE ALSO

makegen, setline, gen6