Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Matlab for Method 2

... as in Method 1 for poles ...

% Construct a resonator as a sum of arbitrary modes 
% with unit residues, adding a near-zero at DC.

B = zeros(1,2*nsec+1);
impulse = [1,zeros(1,2*nsec)];
for i=1:nsec, 
    % filter() does polynomial division here:
    B = B + filter(A,denoms(i,:),impulse);
end;

% add a near-zero at DC 
B = filter([1 -0.995],1,B);

... as in Method 1 for display ...


Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite and copy this work] 
``Physical Audio Signal Processing for Virtual Musical Instruments and Digital Audio Effects'', by Julius O. Smith III, (December 2005 Edition).
Copyright © 2006-07-01 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]