NAME

gen6 - make a function with straight line segments


SYNOPSIS

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


DESCRIPTION

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.

NOTE: Much of the functionality of gen 6 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.

Normally the table will be rescaled to fit between -1 and 1. Put a negative sign before the number to prevent this.

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, 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.



NOTES

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...)


SEE ALSO

makegen, setline, gen18