Mercurial > hg > ishara
view arrows/dsp/spec_bench1.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | 672052bd81f8 |
children |
line wrap: on
line source
% spec_bench - Arrow for doing spectral-based processing % % spec_bench :: % N:natural ~'frame size', % M:natural ~'hop size' % arrow( {[dftbins(N),W]}, {[dftbins(N),W]}, S1), ~'arrow to process magnitude spectra' % -> arrow( {[N,W]}, {[dftbins(N),W]}, spec_bench1_state(S1,S2)) ~'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,path]=spec_bench1(N,M,a1,a2) H=spdiag(hanning(N,'periodic')); o= ( amult(H) ... % analysis window * mag_phase_split(N) ... % split into magnitude and phase spectra * (a1 + anull) ... % apply a1 and a2 to mag and phase ); path=[2,1]; end