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

Matlab, Continued

Given the above design parameters, we compute some derived parameters as follows:

  fn = fs/2;             % Nyquist limit (Hz)
  f2 = fn - f1;          % upper pass-band limit 
  N = 2^(nextpow2(8*M)); % large FFT for interpolated display
  k1 = round(N*f1/fs);   % lower band edge in bins
  if k1<2, k1=2; end;    % cannot have dc or fn response
  kn = N/2 + 1;          % bin index at Nyquist limit (1-based)
  k2 = kn-k1+1;          % high-frequency band edge
  f1 = k1*fs/N           % quantized band-edge frequencies
  f2 = k2*fs/N
Setting the upper transition band the same as the low-frequency band ( $ f_2 = f_s/2 - f_1$ ) provides an additional benefit: the symmetry of the desired response about $ f_s/4$ cuts the computational expense of the filter in half, because it forces every other sample in the impulse response to be zero [224, p. 172].5.9


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

[How to cite this work]  [Order a printed hardcopy]  [Comment on this page via email]

``Spectral Audio Signal Processing'', by Julius O. Smith III, W3K Publishing, 2011, ISBN 978-0-9745607-3-1.
Copyright © 2022-02-28 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA