annotate 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
rev   line source
samer@0 1 % aspecsyn - Spectral synthesis arrow
samer@0 2 %
samer@0 3 % aspecsyn ::
samer@0 4 % N:natural,
samer@0 5 % M:natural,
samer@0 6 % (N:natural-> [[N]]) ~'window function'
samer@0 7 % -> arrow( {[[N]]}, {[[M]]}, _).
samer@0 8 function o=aspecsyn(N,M,windowfn)
samer@0 9 o = (arr(@spec2fir) + asampler(@randn,[N,1])) ... % FIR filter coefficients and white noise
samer@0 10 * adynfir(N,N) * amult(spdiag(windowfn(N))) ... % windowed sample buffers
samer@0 11 * aolapadd(N,M);
samer@0 12 end