copygen - copy a function table, with optional size and interpolation change
copygen(new_table, old_table [, new_size [, interpolation_type ]])
Call addgens from a script to make a new function table by adding 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.
If this argument is not given, then linear interpolation will be used.
/* Make a low-resolution sine wave (only 30 table elements). */ makegen(1, 10, 30, 1)
/* Copy sine wave to a larger table with no interpolation. */ copygen(2, 1, 10000, 0)
Table number 2 will contain a sine wave with stair-steps. The reason you might want this is that most instruments using function tables will perform linear interpolation between adjacent table values, thus smoothing your low-resolution sine wave. If you really want a jagged sine wave, then you have to make a very large table that preserves the jagged shape.
makegen, addgens, multgens, offsetgen, scalegen, invertgen, reversegen, shiftgen, quantizegen
John Gibson <johgibso at indiana edu>