Digital Signal Processing Reference
In-Depth Information
Sinc Interp
Original Samples
0.8
0.6
Linear Interp
0.4
0.2
0
−0.2
−0.4
−0.6
−0.8
1089
1090
1091
1092
1093
1094
1095
Input Sequence Sample
Figure 3.35: A plot of several samples from an audio sequence sampled at 8 kHz, with interpolated
values at the new sample rate of 11025 Hz. Interpolated values computed using linear interpolation are
plotted as stems with diamond heads, and those computed using sinc interpolation are plotted as stems
with stars. The original samples, plotted at integral-valued index values, are plotted as stems headed by
circles. Note that in some cases the sinc-interpolated value differs remarkably from the linear-interpolated
value. The test signal consisted of a 2450 Hz cosine wave. The interpolated samples are shown prior to
post-interpolation lowpass filtering.
3.17 FREQUENCY GENERATION
Sinusoids of arbitrary frequency for use in music or the like can be generated by storing one or more
cycles of a sinusoid in a memory and cyclically reading out samples. The effective frequency can be varied
using decimation by, in general, nonintegral decimation factors. Linear interpolation between samples is
often adequate, so the more costly sinc interpolation referred to above need not be used.
3.17.1 VARIABLE SR
A first method of readout is to sequentially and cyclically read out every sample in the ROM at a frequency
(sample rate) which is a multiple of the number of samples in the ROM. This method is used principally
in electronic musical instruments, where hardware or software is available to generate all the different
sample rates needed. In this method, each sample of the ROM is read out in its turn, one after another.
For example, if the ROM contains one cycle of a sine over 32 samples, and we want
a 1 kHz output,
Search WWH ::




Custom Search