98
D. Rocchesso: Sound Processing
digital noise
sampling-rate conversion
It is easy to realize that the reading pointer accesses the wavetable at indexes
that are, in general, fractional. Therefore, some form of interpolation has to
be used. The following strategies have an increasing degree of accuracy (and
complexity):
Truncation: buf[ index ]
Rounding: buf[ index + 0.5 ]
Linear Interpolation: buf[ index ] (index - index ) +
buf[ index ] (1 - index + index )
Higher-order polynomial interpolation
"Multirate" interpolation: the problem is re-casted as a sampling-rate con-
version.
By increasing the complexity of interpolation it is possible, given a certain
level of acceptable digital noise, to decrease the wavetable size [41]. The linear
interpolation is particularly attractive for implementations in custom or special-
ized hardware (see section B.5.1 of the appendix B). The most-significant bits of
the index can be used to access the buffer locations, and the least-significant bits
are used to approximate the quantity (index - index ) in the computation of
the interpolation.
Sampling-rate conversion
The problem of designing a wavetable oscillator can be re-casted as a problem
of sampling-rate conversion, i.e., transforming a signal sampled at rate F
s,1
into
its copy re-sampled at rate F
s,2
. If
F
s,2
F
s,1
=
L
M
, with L and M irreducible integers,
we can re-sample by:
1. Up-sampling by a factor L
2. Low-pass filtering
3. Down-sampling by a factor M .
Figure 6 represents these three operations as a cascade of linear (but non-
time-invariant) blocks, where the upward arrow denots upsampling (or introduc-
ing zeros between non-zero samples) and the downward arrow denotes down-
sampling (or decimating).
L
M
h(n)
x(n)
x'
y'
y(m)
F
F L
F L
F L/M
s
s
s
s
Figure 6: Block decomposition of re-sampling
Figure 7 shows the spectral effects of the various stages of resampling when
L/M = 3/2.
If the interpolation is realized by sampling-rate conversion the problem re-
duces to designing a good lowpass filter. However, since the resampling ratio
L/M changes for each different pitch that is obtained from the same wavetable,
Next Page >>
<< Previous Page
Back to the Table of Contents