annotate arrows/dsp/spec_bench2.m @ 61:eff6bddf82e3
tip
Finally implemented perceptual brightness thing.
author |
samer |
date |
Sun, 11 Oct 2015 10:20:42 +0100 |
parents |
672052bd81f8 |
children |
|
rev |
line source |
samer@0
|
1 % spec_bench2 - Arrow for doing spectral-based processing (no phase)
|
samer@0
|
2 %
|
samer@0
|
3 % spec_bench ::
|
samer@0
|
4 % N:natural ~'frame size',
|
samer@0
|
5 % M:natural ~'hop size'
|
samer@0
|
6 % arrow( {[dftbins(N),W]}, {[dftbins(N),W]}, S1), ~'arrow to process power spectra',
|
samer@0
|
7 % -> arrow( {[N,W]}, {[N,W]}, pair(pair(empty,S1),empty)) ~'total arrow'.
|
samer@0
|
8 %
|
samer@0
|
9 % This splits a signal into magnitude and phase spectra (using Hanning analysis window),
|
samer@0
|
10 % applies supplied arrows to the two branches, and then recombines them using an inverse
|
samer@0
|
11 % DFT and overlap-and-add to compose the output signal.
|
samer@0
|
12 function o=spec_bench(N,M,a)
|
samer@0
|
13 o=apowspec(hanning(N))*a*aspecsyn(N,M,@hanning);
|
samer@0
|
14 end
|