Re: What are all the "really efficient" filter algoritms?



On Mar 3, 1:35 pm, Martin Eisenberg <martin.eisenb...@xxxxxxx> wrote:
Tony wrote:
I've played with several "standard" generalized routines for up-
and down-sampling of audio, and now I want to get into the ones
that really are more efficient in hardware or software - haven't
decided yet - just know I want the most grunt for the least
power, and because I'll be introducing nonlinearities and don't
want artifacts.

Perhaps you've seen them before, but I've been satisfied with the
polyphase-IIR halfband filters athttp://www.musicdsp.org/archive.php?classid=3#39. That code provides
only single-rate processing, so you'll want to add rate-changing
operations that actually exploit the polyphase structure.

Here's how. Note that I'm writing this from the top of my head
because I use my own adaptation of Dave Malham's code. I list the
original single-rate processing first for comparison, then the
additions:

double CHalfBandFilter::process(const double input)
{
  const double output=(filter_a->process(input)+oldout)*0.5;
  oldout=filter_b->process(input);
  return output;

}

double CHalfBandFilter::decimate(const double* input)
{
  const double output = (filter_a->process(input[0]) + oldout)*0.5;
  oldout = filter_b->process(input[1]);
  return output;

}

void CHalfBandFilter::interpolate(const double input, double* output)
{
  input *= 0.5;
  output[0] = filter_a->process(input);
  output[1] = filter_b->process(input);

}

Martin

--
Quidquid latine scriptum est, altum videtur.

You need to first choose whether or not linear phase is important to
you (or your customer). This should be simply a matter of science
(that is, what do controlled listening tests say?) but like many
topics in audio you will encounter those who adhere to one view or
another with a conviction approaching religious fervor. You need to
decide this first because the hardware implementations for IIR versus
FIR is very different.

You should be very skeptical of Matlab results that say, "filter A
needs 20 multipliers and 30 adders, whereas filter B needs 15
multipliers and 20 adders, therefore filter B will be cheaper to
implement". Anyone with any real experience in this area knows enough
to disregard such advice; the bag of tricks that can be brought to
bear is quite large.


Bob Adams
.



Relevant Pages

  • Re: Moving From ProTools to Linux? Good or bad?
    ... I find that it's much easier to explain how audio routing works when people know the fundamentals. ... In hardware I always send them to the block diagram, and if necessary, coach them in reading it. ... I get the hint that Jack has something to do with this, but it's just not clear from what I can see from the JACK GUI. ... Has Linux "found" the sound card? ...
    (rec.audio.pro)
  • Re: Added iviaudioncss.ax to the Problem Codec List
    ... > also the exact same audio compression standard used for MPEG-1 VCDs; ... >> there's another appropriate codec on my system, ... > Only if the audio codec (DS Filter) was properly registered as a Direct ... > Remove Programs" to force a repair install of the affected program. ...
    (microsoft.public.windowsxp.moviemaker)
  • Re: Good bye
    ... And if you expect a 5-year useful life for hardware, ... windows machines are as stable/reliable as anything running Linux. ... full processor, memory, RF, IF, audio, and peripheral drivers on board. ...
    (Fedora)
  • Re: Free download spectral analyser.
    ... suite for measuring speaker response in-room. ... that will be good for most of the audio programs and tests (good S/N, IMD, ... and the filter I built is an opamp with bridged RC T filter in the NFB ... But to facilitate the measuring process, ...
    (rec.audio.tubes)
  • Re: Not your fathers Applicard
    ... I grew up with audio and have it in my blood. ... of how to put a CPU core on an FPGA, much less the entire Mill card. ... I actually knew this stuff reasonably well when I got my CS degree, but never worked in the hardware domain and it sort of dissipated. ...
    (comp.sys.apple2)