gen10 - make a function with a waveform, composed of harmonic partials
makegen(table_number, 10, table_size, harmonic1_amp [, harmonic2_amp, ... harmonicN_amp ])
Call makegen from a script with a function_type of 10 to make a function table with a waveform. You define the waveform in terms of any number of harmonic partials, with specific amplitudes for each.
Normally the table will be rescaled to fit between -1 and 1. Put a negative sign before the number to prevent this.
makegen(2, 10, 1000, 1)
makes one cycle of a sine wave, at full amplitude.
makegen(2, 10, 1000, 1, 1/2, 1/3, 1/4, 1/5, 1/6, 1/7, 1/8, 1/9, 1/10)
makes one cycle of a sawtooth wave, at full amplitude. (The amplitude of each partial is the inverse of its partial number.)
makegen(2, 10, 1000, 0, 1)
makes two cycles of a sine wave, at full amplitude. This works because the second partial has twice the frequency of the first partial, and the first partial has zero amplitude.
makegen(2, 10, 1000, 1, 0, 1/3, 0, 1/5, 0, 1/7, 0, 1/9, 0, 1/11, 0, 1/13, 0, 1/15, 0, 1/17, 0, 1/19, 0, 1/21, 0, 1/23, 0, 1/25)
makes one cycle of a square wave. (Only odd-numbered partials are present, and the amplitude of each is the inverse of its partial number.)
Gen 9 lets you specify a waveform with inharmonic, as well as harmonic, partials, and lets you control the starting phase of each.