Reply by Rune Allnor December 8, 20062006-12-08
jeff227 skrev:
> >Vladimir Vassilevsky > > >Design of a filter is pretty trivial and standard task. > > > Really?
Yes.
> Guess all these discussions and textbooks are just for fun, eh?
No. Everything in life -- including filter design -- has to be learned. And as with everything else, learning filter design does require a little bit of effort from the student. That *you* are not able to do it yet, does not mean that filter design is one of those insurmountable tasks, like finding a cure for the common cold, that humankind is faced with. Rune
Reply by Vladimir Vassilevsky December 8, 20062006-12-08

jeff227 wrote:

>>Vladimir Vassilevsky > > >>Design of a filter is pretty trivial and standard task. > > > > Really?
Indeed. Let's make a bet for $1000 that I will do your freaking bibifilter in one day. Guess all these discussions and textbooks are just for fun, eh? Mostly a clueless people like you who never open a textbook are participating in those discussions. VLV
Reply by jeff227 December 8, 20062006-12-08
>Vladimir Vassilevsky
>Design of a filter is pretty trivial and standard task.
Really? Guess all these discussions and textbooks are just for fun, eh?
Reply by Vladimir Vassilevsky December 8, 20062006-12-08

jeff227 wrote:

>>Did you try to read any books? > > > > If you are annoyed by my questions why did you bother responding?
Is it a new way to say "thank you for the valuable suggestions" ? Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by jeff227 December 8, 20062006-12-08
>Did you try to read any books?
If you are annoyed by my questions why did you bother responding?
Reply by Ray Andraka December 8, 20062006-12-08
Ray Andraka wrote:


> > You could resample the impulse response (the function depicted by the > coefficients) to obtain the new filter coefficients at the new sample > rate. You'll end up with different filter lengths depending on the > sample rate, and a different set of coefficients for each, but with the > same (but resampled) impulse response. This is basically what happens > with a polyphase resampler. So, while the coefficients and filter > length depend on the sample rate, it isn't technically a clean sheet > design for each sample rate.
Furthermore, you can generate the filter coefficients on the fly by interpolating from a master table containing the impulse response sampled at some arbitrary rate. Alternatively, you can resample to a common rate and then filter, although that is a little redundant since a resampler is also a filter, and by being clever you can fold your desired filter into the resampler.
Reply by Ray Andraka December 8, 20062006-12-08
Rune Allnor wrote:

> jeff227 skrev: > >>Sorry for the "DSP 101" questions but I'm a newbie... >> >>Is there a way to scale FIR filter coefficients so I can have the same >>cutoff and transition bandwidth regardless of sample rate (provided the >>sample rate is always within Nyquist limits)? > >>I am designing an audio processor that needs to have the same filter >>response regardless of user-selected sample rate (44.1KHz, 48KHz, 96KHz, >>etc.). >> >>How would one accomplish this with FIR filters? >
You could resample the impulse response (the function depicted by the coefficients) to obtain the new filter coefficients at the new sample rate. You'll end up with different filter lengths depending on the sample rate, and a different set of coefficients for each, but with the same (but resampled) impulse response. This is basically what happens with a polyphase resampler. So, while the coefficients and filter length depend on the sample rate, it isn't technically a clean sheet design for each sample rate.
Reply by Vladimir Vassilevsky December 8, 20062006-12-08

jeff227 wrote:

>>1. Compute the FIR to the highest sample rate you need. >>2. If you want to recalculate the filter to the different sample rate, >>interpolate the coefficients in the time domain so the impulse response >>will look same. > > > > Thank you, but it looks like even that approach requires an "adaptive" > array length (proportional to samplerate) and some carefully designed > interpolation code.
Well, if it is a problem, you'd better think of a different occupation.
> Yuck. My "simple" problem seems to be getting worse.
BTW, you didn't tell what the problem is. What are you trying to achieve as the result? I can't use IIR
> because of the excessive ringing and phase shifts.
What in the particular is wrong with ringing and phase shift? If I use FIR I need
> multiple filters and delay lines for every possible samplerate.
Every possible rate? I thought you are considering the standard sample rates like 44.1, 48, 96, etc. There are only several rates of interest.
> There are numerous audio editors and VST/DirectX plugins available that > use FIRs and work at any samplerate (including odd rates). HOW ARE THEY > DOING THAT?!?
Design of a filter is pretty trivial and standard task. > Any ideas appreciated! Did you try to read any books? Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by Andrew Reilly December 7, 20062006-12-07
On Thu, 07 Dec 2006 13:01:08 -0600, jeff227 wrote:

> Yuck. My "simple" problem seems to be getting worse. I can't use IIR > because of the excessive ringing and phase shifts.
IIRs don't *have* to have ringing: that's a design decision. (Look up "maximally flat".)
> If I use FIR I need > multiple filters and delay lines for every possible samplerate.
Yep.
> There are numerous audio editors and VST/DirectX plugins available that > use FIRs and work at any samplerate (including odd rates). HOW ARE THEY > DOING THAT?!?
They almost certainly have different implementations for each sample rate. In some circumstances (depends on what the plugin is doing, obviously), it is reasonable to do the filter-design (compute the impulse response) at run-time, whenever the sample rate changes. Another approach that is sometimes used is to run your filter at one "gold standard" sample rate (say 96kHz) and sample-rate-convert on input and output. That's probably harder to do in a plug-in environment than in one where you control all of the horizontals and verticals. It also guarantees that you use the largest number of MIPS possible, if that is a concern... Cheers, -- Andrew
Reply by Ron N. December 7, 20062006-12-07
Jerry Avins wrote:
> jeff227 wrote: > > > ... I can't use IIR because of the excessive ringing and phase shifts. > > Phase shift and ringing are not closely connected. > > > If I use FIR I need > > multiple filters and delay lines for every possible sample rate. > > A filter's frequency response implies a certain impulse response. > Achieving the same impulse response at different sample rates > necessarily involves a different number of delay elements.
It involves a maximum number of delay elements (given some bounds on the sample rates). You can always use coefficients of zero for a shorter impulse response, without actually changing the number of delay elements or taps in the filter implementation. The OP asked for "ease" of filter generation, not efficiency of operation. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M