DDSP's Wavetable synthesizer reads a learned single-cycle waveform at a time-varying phase
The Wavetable processor synthesizes audio by linearly interpolating into a frame-wise wavetable at positions determined by accumulated phase. The fundamental frequency controls how fast phase advances; the wavetable specifies the spectral shape of the waveform. Wavetables can be static (single-frame) or time-varying (interpolated between frames), enabling smooth timbral evolution. Phase accumulation uses tf.cumsum on the normalized frequency (cycles/sample), wrapping to [0, 1]. The harmonic_distribution_to_wavetable() function converts a harmonic amplitude spectrum into a wavetable via IRFFT, connecting harmonic analysis to wavetable synthesis.
Examples
wavetable = ddsp.synths.Wavetable(n_samples=64000)
audio = wavetable(frequencies, amplitudes, wavetables)
# Or generate wavetable from harmonics:
wt = ddsp.core.harmonic_distribution_to_wavetable(harmonic_distribution, n_wavetable=2048)
Assessment
Describe the phase accumulation process in wavetable synthesis. What is the relationship between the wavetable and the harmonic spectrum of the output?