Mercurial > hg > ishara
view dsp/synth/poly2snd.m @ 34:c75bb62b90a9
Imported audio synthesis tools.
author | samer |
---|---|
date | Sun, 20 Jan 2013 19:05:05 +0000 |
parents | |
children |
line wrap: on
line source
function X=poly2snd(A,u) % POLY2SND - Convert array of filter polynomial coeffs to one long sound by filtering noise % Filter state is preserved as the function processes a number of filters % % poly2snd :: % (A:array 1..N of Poly, signal~'noise to filter') % ->signal~'N concatentated sounds' % % Each ROW of A contains coefficients for one filter Z=[]; for k=1:size(A,1) [x,Z]=filter(1,A(k,:),u,Z); if any(isnan(Z)), Z=[]; end; X(:,k)=0.999*x/max(abs(x)); end