view arrows/dsp/spec_bench2.m @ 6:0ce3c2070089

Removed duplicate code and fixed doc in timed_action.
author samer
date Mon, 14 Jan 2013 14:33:37 +0000
parents 672052bd81f8
children
line wrap: on
line source
% spec_bench2 - Arrow for doing spectral-based processing (no phase)
%
% spec_bench ::
%    N:natural ~'frame size',
%    M:natural ~'hop size'
%    arrow( {[dftbins(N),W]}, {[dftbins(N),W]}, S1), ~'arrow to process power spectra',
% -> arrow( {[N,W]}, {[N,W]}, pair(pair(empty,S1),empty)) ~'total arrow'.
%
% This splits a signal into magnitude and phase spectra (using Hanning analysis window),
% applies supplied arrows to the two branches, and then recombines them using an inverse
% DFT and overlap-and-add to compose the output signal.
function o=spec_bench(N,M,a)
	o=apowspec(hanning(N))*a*aspecsyn(N,M,@hanning);
end