copygen - copy a function table, with optional size and interpolation change
copygen(new_table, old_table [, new_size [, interpolation_type ]])
Call copygen from a script to make a new function table by copying the elements of one table into a new one. The new table may have a different size, in which case an interpolation scheme may be employed.
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>