Digital Sound & Music: Concepts, Applications, & Science, Chapter 2, last updated 6/25/2013
50
plot(hamming);
title('Hamming');
The Hamming function is shown in
Figure 2.53 Hamming windowing function
yshort = y(1:2048); %first 2048 samples from sound file
%Multiply the audio values in the window by the Hamming function values,
% using element by element multiplication with .*.
% first convert hamming from a column vector to a row vector
ywindowed = hamming .* yshort;
figure;
plot(yshort);
title('First 2048 samples of audio data');
figure;
plot(ywindowed);
title('First 2048 samples of audio data, tapered by windowing function');
Before the Hamming function is applied, the first 2048 samples of audio data look like this:
Figure 2.54 Audio data
After the Hamming function is applied, the audio data look like this:
Previous Page Next Page