view arrows/dsp/aspecsyn.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
% aspecsyn - Spectral synthesis arrow
%
% aspecsyn ::
%    N:natural,
%    M:natural,
%    (N:natural-> [[N]]) ~'window function'
% -> arrow( {[[N]]}, {[[M]]}, _).
function o=aspecsyn(N,M,windowfn)
	o = (arr(@spec2fir) + asampler(@randn,[N,1])) ...  % FIR filter coefficients  and white noise
	    * adynfir(N,N) * amult(spdiag(windowfn(N))) ... % windowed sample buffers
		 * aolapadd(N,M);
end