Subject: Re: Ensoniq AudioPCI 97
To: Lennart Augustsson <lennart@augustsson.net>
From: Brett Lymn <blymn@baea.com.au>
List: current-users
Date: 09/05/1999 18:44:30
According to Lennart Augustsson:
>
>Well, for CD quality sound it seems to be about 25 multiply-adds per output
>sample.
>

Hmmm my gut reaction is that is a bit excessive but I have not thought
too much about it....

>
>If I understand what's happening with the convolution it does exactly
>low pass filtering.  So for oversampling you start by just treating the
>input signal as it was an analog signal, then resample it at the new rate,
>and finally filter away anything above the (original) Nyquist
>frequency.

Correct.  When we were doing resampling we just duplicated samples and
then filtered.  The reason you have to filter is you get the frequency
spectrum mirrored at the old sample frequency.  If you have a frequecy
spectrum like this:

  |
  |---------\
  |          \
  |           \
  +==============+=====
                 fs

then oversampling 2:1 gives you:


  |
  |---------\         /---------
  |          \       /
  |           \     /
  +==============+==============+==
                 fs            2*fs

Of course, the frequency components between fs and 2*fs are complete
bogons so you have to remove them.  This is the confusing thing about
DSP, the spectrum can be thought of being symmetrical about the sample
frequency (negative frequency too) and the spectrum replicates at
integer values of the sample rate.

>For undersampling you start by filtering away anything above the (new)
>Nyquist frequency and then resample.

again correct.

>Well, that's the key point, isn't it?  To get a good filter and fast filter.
>I'm very open to suggestions on how to do it.
>

Aah this is the art - trading off roll off/linearity against the
number of poles in the filter :-)  I would guess by the sounds of it
the algorithm you have is basically sticking to a simple 25-pole
filter which is easy to design, linear and absolutely stable.

>
>Hey, why am I trying to do this when we have a professional here? :-)
>If you write the conversion code I'll adapt it for the audio driver.
>

talk to me offline - I will want to know what resampling needs to be
done and I shall ask some guys at work to see if I can get a good
filter design done :-)


-- 
===============================================================================
Brett Lymn, Computer Systems Administrator, British Aerospace Australia
===============================================================================