Digital Signal Processing Reference
In-Depth Information
1
0
−1
0
20
40
60
80
100
(a) Sample
1
0
−1
0
20
40
60
80
100
(b) Sample
1
0
−1
0
20
40
60
80
100
(c) Sample
Figure 3.7: (a) A sine wave with a frequency of 2 Hz sampled at 100 Hz; (b) A sine wave with a frequency
of 102 Hz sampled at 100 Hz; (c) A sine wave with a frequency of 98 Hz sampled at 100 Hz.
The script
ML_AliasingChirpAudio ( SR,StartFreq,EndFreq )
has been provided to both illustrate and make audible aliasing in an audio signal. A variable sample rate
SR , and the lowest frequency StartFreq and highest frequency EndFreq of a linear chirp are specified
as the input arguments.
Figure 3.9, plot (a) shows the result of the call
ML_AliasingChirpAudio(3000,0,1500)
which specifies a lower chirp limit StartFreq of 0 Hz and an upper chirp limit EndFreq of 1500 Hz,
which is right at the Nyquist rate of 3000/2 = 1500 Hz. You can see a smooth frequency increase in the
spectrogram in plot (b). Frequency 1.0 represents half the sampling frequency (3 kHz), or 1500 Hz in
this case. If you have a sound card on your computer, the chirp should sound automatically when the call
above is made.
• To use the script ML_AliasingChirpAudio with LabVIEW, restrict the value of SR to one of the
following values: 8000, 11025, 22050, 44100.
In Fig. 3.9, plot (c), the lower chirp limit is 0 Hz, and the upper chirp limit is 3000 Hz, with the
same 3000 Hz sampling rate. You can see a smooth frequency increase in the spectrogram (plot (d)) up
 
Search WWH ::




Custom Search