NAME

multgens - multiply two function tables to create a new one


SYNOPSIS

multgens(new_table, table_A, table_B [, normalize ])


DESCRIPTION

Call multgens from a script to make a new function table by multiplying corresponding points from two existing tables. These two tables do not have to be the same size. The new table will be as large as the larger of the two existing tables.

NOTE: Much of the functionality of multgens has been duplicated and extended by the mul scorefile command in the new (in RTcmix 4.0) table-handle scheme.


ARGUMENTS

new_table
The numeric ID for the new function table.

table_A
table_B
The numeric IDs for the existing function tables.

normalize
If this argument is given and is non-zero, then the new function table will be normalized. If the table has no negative values, then its values will be scaled so that they fit between 0 and 1. If the table has negative values, its values will be scaled so that they fit between -1 and 1.


EXAMPLES

   /* Make six cycles of a sine wave. */
   makegen(1, 10, 1000, 0, 0, 0, 0, 0, 1)
   /* Make an envelope that fades in and out. */
   makegen(2, 6, 200, 0, 0, 1, 1, 2, 0)
   multgens(3, 1, 2)

Table number 3 will contain six cycles of a sine wave, with amplitude following the fade in/out envelope shape. The table will have 1000 elements.



SEE ALSO

makegen, addgens, copygen, offsetgen, scalegen, invertgen, reversegen, shiftgen, quantizegen


AUTHOR

John Gibson <johgibso at indiana edu>