Alias-Free Digital Synthesis of Classic Analog Waveforms
Tim Stilson[email protected] rd.edu
Julius Smith [email protected] u
CCRMA http://www-ccrma.stanford.edu/ Music Department, Stanford University
Abstract Techniques are reviewed and presented for alias-free digital synthesis of classical analog synthesizer waveforms such as pulse train and sawtooth waves. Techniquesdescribed include summation of bandlim- ited primitive waveforms as well as table-lookup techniques. Bandlimited pulse and triangle waveforms are obtained by integrating the difference of two out-of-phase bandlimited impulse trains. Bandlimited impulse trains are generated as a superposition of windowed sinc functions. Methods for more general bandlimited waveform synthesis are also reviewed. Methods are evaluated from the perspectives of sound quality, computational economy, and ease of control.
1 Introduction impulse train Any analog signal with a discontinuity in the wave- 1 form (such as pulse train or sawtooth) or in the wave- 0.8
form slope (such as triangle wave) must be bandlim- 0.6 ited to less than half the sampling rate before sampling 0.4 to obtain a corresponding discrete-time signal. Simple methods of generating these waveforms digitally con- 0.2 tain aliasing due to having to round off the discontinuity 0 0 5 10 15 20 time to the nearest available sampling instant. The sig- nals primarily addressed here are the impulse train, rect- Box Train, and Sample Positions angular pulse, and sawtooth waveforms. Because the 1 latter two signals can be derived from the ®rst by inte- 0.8 gration, only the algorithm for the impulse train is de- 0.6 veloped in detail. 0.4
0.2
2 Why Simple Discrete-Time Pulse 0 0 5 10 15 20 Trains are Aliased Rounded−Time Pulse Train
The ªobviousº way to generate a discrete-time ver- 1 sion of an impulse train is to approximate it by a unit- 0.8
δ sample-pulse train. The unit sample pulse n is de- 0.6
®ned as 0.4 =
δ ∆ 1; n 0 =
n 0.2
j j = ; ; ;::: 0; n 1 2 3 0 The unit-sample pulse is only de®ned for integer n,so 0 5 10 15 20
we have a problem: Suppose the desired impulse-train =
frequency is f1 = 1 T1, then the period in samples has to Figure 1: Rounded-Time Impulse Train as a Sampled Version
= = = = = be P = T1 Ts Fs f1,whereFs 1 Ts is the sampling of an Ideal Rectangular Pulse Train rate, and P is rarely an integer. Because pitch perception
Stilson and Smith 1 Alias-Free Synthesis ∞
is so accurate , it does not work to round M to the near- jωTs
∝ ω + π Y e ∑ X k2 Fs
est integer, except at frequencies so low that the error is