comparison dsp/synth/poly2snd.m @ 34:c75bb62b90a9

Imported audio synthesis tools.
author samer
date Sun, 20 Jan 2013 19:05:05 +0000
parents
children
comparison
equal deleted inserted replaced
33:5b7d90b6393a 34:c75bb62b90a9
1 function X=poly2snd(A,u)
2 % POLY2SND - Convert array of filter polynomial coeffs to one long sound by filtering noise
3 % Filter state is preserved as the function processes a number of filters
4 %
5 % poly2snd ::
6 % (A:array 1..N of Poly, signal~'noise to filter')
7 % ->signal~'N concatentated sounds'
8 %
9 % Each ROW of A contains coefficients for one filter
10
11 Z=[];
12 for k=1:size(A,1)
13 [x,Z]=filter(1,A(k,:),u,Z);
14 if any(isnan(Z)), Z=[]; end;
15 X(:,k)=0.999*x/max(abs(x));
16 end
17
18