[x, fs, nbits] = wavread(`...');
N = length(x);
Nwin = 256; % window size
Noverlap = Nwin/2; % 50 percent overlap
zpf = 1; Nfft = Nwin*zpf;
X = zeros(Nfft, round(N/Noverlap-1));
win = hanning(Nwin); %COLA window
for i=0:N/Noverlap-2
ix = Noverlap*i+[1:Nwin];
X(:,i+1) = fft(x(ix).*win, Nfft);
end
%Reconstruct
y = zeros(N,1);
for i=0:N/Noverlap-2
ix = Noverlap*i+[1:Nwin];
y(ix) = y(ix) + real(ifft(X(:,i+1)));
end
``Music 270a: Signal Analysis''
by Tamara Smyth,
Department of Music, University of California, San Diego.
Download PDF version (analysis.pdf)
Download compressed PostScript version (analysis.ps.gz)
Download PDF `4 up' version (analysis_4up.pdf)
Download compressed PostScript `4 up' version (analysis_4up.ps.gz)
Copyright © 2019-12-02 by Tamara Smyth.
Please email errata, comments, and suggestions to Tamara Smyth<trsmyth@ucsd.edu>