Overlap-Add (OLA)
STFT Processing
Convolution of Short Signals
Acyclic FFT Convolution in Matlab or OctaveSearch Spectral Audio Signal Processing
Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?
The following example illustrates the implementation of acyclic convolution using the FFT in Matlab or Octave:
% convexample.m x = [1 2 3 4]; h = [1 1 1]; nx = length(x); nh = length(h); nfft = 2^nextpow2(nx+nh-1) xzp = [x, zeros(1,nfft-nx)]; hzp = [h, zeros(1,nfft-nh)]; X = fft(xzp); H = fft(hzp); Y = H .* X; format bank; y = real(ifft(Y)) % zero-padded result yt = y(1:nx+nh-1) % trim and print yc = conv(x,h) % for comparisonProgram output:
nfft = 8
y =
1.00 3.00 6.00 9.00 7.00 4.00 0.00 0.00
yt =
1.00 3.00 6.00 9.00 7.00 4.00
yc =
1 3 6 9 7 4
