samer@0: % spec_bench2 - Arrow for doing spectral-based processing (no phase) samer@0: % samer@0: % spec_bench :: samer@0: % N:natural ~'frame size', samer@0: % M:natural ~'hop size' samer@0: % arrow( {[dftbins(N),W]}, {[dftbins(N),W]}, S1), ~'arrow to process power spectra', samer@0: % -> arrow( {[N,W]}, {[N,W]}, pair(pair(empty,S1),empty)) ~'total arrow'. samer@0: % samer@0: % This splits a signal into magnitude and phase spectra (using Hanning analysis window), samer@0: % applies supplied arrows to the two branches, and then recombines them using an inverse samer@0: % DFT and overlap-and-add to compose the output signal. samer@0: function o=spec_bench(N,M,a) samer@0: o=apowspec(hanning(N))*a*aspecsyn(N,M,@hanning); samer@0: end