| Author |
Message |
Jon Harris
Guest
|
Posted:
Mon Dec 13, 2004 6:59 am Post subject:
Re: lowpass resonant filter sweeping and peak equalization? |
|
|
"Erik de Castro Lopo" <nospam@mega-nerd.com> wrote in message
news:41BBD4C6.B67A297C@mega-nerd.com...
| Quote: | tpytel wrote:
I am using a direct form 2 with floating point math for all my filters.
I had actually tried just what you suggested - smoothing the frequency
sweep with a 1 pole LP, but the transition time is too long for an
acceptable attenuation of the transient.
The 1 pole LP can work, but I've had better results with linear
interpolation of the frequency and resonance parameters over 100
or more samples. This works for even the most radical step responses
in the parameters.
Erik
|
Interesting. I usually interpolate the filter coefficients themselves as this
is much less computationally demanding that re-calculating them from
frequency/resonance data for each point along the way. But perhaps that would
work better. |
|
| Back to top |
|
 |
robert bristow-johnson
Guest
|
Posted:
Mon Dec 13, 2004 6:36 pm Post subject:
Re: lowpass resonant filter sweeping and peak equalization? |
|
|
in article 324rfoF3h15l6U1@individual.net, Jon Harris at
goldentully@hotmail.com wrote on 12/13/2004 01:34:
| Quote: | the "4-multiply lattice ladder" filter is more expensive than direct forms or
other non-normalized forms, but as the saying goes "you get what you pay for"!
|
i dunno if that is the case all the time. for the purpose of accomplishing
something, you get less than what you pay for if your design is inefficient.
with either fixed or floating-point processors, i am not sure what the
advantage of the normalized ladder or lattice other than they both decouple
Q from the one coefficient ("k2" i think). the normalized ladder does put a
L2 norm limit on the amplitude of all of its nodes, but it doesn't guarantee
against clipping. i still think DF1 or maybe the transposed DF2 are just as
good as anything else, even if you have to calculate coefficients on the
fly.
r b-j |
|
| Back to top |
|
 |
Jon Harris
Guest
|
Posted:
Mon Dec 13, 2004 11:21 pm Post subject:
Re: lowpass resonant filter sweeping and peak equalization? |
|
|
"robert bristow-johnson" <rbj@audioimagination.com> wrote in message
news:BDE3051A.309B%rbj@audioimagination.com...
| Quote: | in article 324rfoF3h15l6U1@individual.net, Jon Harris at
goldentully@hotmail.com wrote on 12/13/2004 01:34:
the "4-multiply lattice ladder" filter is more expensive than direct forms
or
other non-normalized forms, but as the saying goes "you get what you pay
for"!
i dunno if that is the case all the time. for the purpose of accomplishing
something, you get less than what you pay for if your design is inefficient.
with either fixed or floating-point processors, i am not sure what the
advantage of the normalized ladder or lattice other than they both decouple
Q from the one coefficient ("k2" i think). the normalized ladder does put a
L2 norm limit on the amplitude of all of its nodes, but it doesn't guarantee
against clipping. i still think DF1 or maybe the transposed DF2 are just as
good as anything else, even if you have to calculate coefficients on the
fly.
|
Have you ever tried sweeping the coefs of a DF1 and a normalized lattice-ladder
and listening to the results? The DF1 sounds _much_ worse! Keep in mind that a
time-variant filter is the main concern of the OP. Here is an article that does
analysis on the transient behavior of various filter forms for the case of
time-variant filters:
http://www.sonicstudio.com/pdf/papers/48-bitAudioPaper.pdf
My intuitive explanation: since the normalization tends to keep the state
variables at "reasonable" values, you don't end up with problems where the
filter coefficients and the state variables are "way out of whack" with each
other like you can with direct forms.
If you are strictly considering the case of a static filter, then I agree with
everything you wrote and the normalized lattice-ladder is probably a waste of
DSP cycles. But its behavior both in terms of low noise with extreme filter
settings and "good behavior" with time-variant filters make it the Cadillac* of
filters IMHO. YMMV.
-Jon
*luxury features but high price |
|
| Back to top |
|
 |
tpytel
Guest
|
Posted:
Tue Dec 14, 2004 4:40 am Post subject:
Re: lowpass resonant filter sweeping and peak equalization? |
|
|
Jon Harris wrote:
| Quote: | Glad to here things are working for you. Yes, the "4-multiply
lattice ladder"
filter is more expensive than direct forms or other non-normalized
forms, but as
the saying goes "you get what you pay for"! :-)
-Jon
|
4 multiply? Don't you mean 7 multiplies for a two pole (6 for the
lattice part + 1 for the final normalization)? Anyway, it does get good
results for slow frequency sweeps even with high frequency FM of the
filter freq :) At some point I will also try to find some info on the
state-variable form, but for now this form works quite well.
Seeing as you have been so helpful with this particular detail, would
you mind if I pick your brain on the other original question I had? The
peak normalization I am doing now is that I am raising the original
resonance value to the power of the normalized frequency: res = pow
(res, freq). This works pretty well, but the power function is about
20x slower than a mul or add. I tried other formulas based on
specifically trying to set a resonance dB gain, but they all wound up
being more costly in terms of cycles due to painful trig operations.
What do you do to maintain a constant peak level across the frequency
spectrum? |
|
| Back to top |
|
 |
Jon Harris
Guest
|
Posted:
Tue Dec 14, 2004 11:50 am Post subject:
Re: lowpass resonant filter sweeping and peak equalization? |
|
|
"tpytel" <tompytel@yahoo.com> wrote in message
news:1102994475.154973.16390@f14g2000cwb.googlegroups.com...
| Quote: |
Jon Harris wrote:
Glad to here things are working for you. Yes, the "4-multiply
lattice ladder"
filter is more expensive than direct forms or other non-normalized
forms, but as
the saying goes "you get what you pay for"! :-)
-Jon
4 multiply? Don't you mean 7 multiplies for a two pole (6 for the
lattice part + 1 for the final normalization)? Anyway, it does get good
results for slow frequency sweeps even with high frequency FM of the
filter freq :) At some point I will also try to find some info on the
state-variable form, but for now this form works quite well.
|
That terminology threw me when I first heard it too. It refers to the number of
multiplies required by the lattice section for a first order (not second order)
filter. It is a "four-multiply" filter as opposed to the non-normalized version
(or direct form) which is "two-multiply". It's kind of confusing terminology,
but it's common in the industry, for example: D. C. Massie, "An Engineering
Study of the Four-Multiply Normalized Ladder Filter," J. Audio Eng. Soc., vol.
41, pp. 564-582 (1986 July/Aug.).
| Quote: | Seeing as you have been so helpful with this particular detail, would
you mind if I pick your brain on the other original question I had? The
peak normalization I am doing now is that I am raising the original
resonance value to the power of the normalized frequency: res = pow
(res, freq). This works pretty well, but the power function is about
20x slower than a mul or add. I tried other formulas based on
specifically trying to set a resonance dB gain, but they all wound up
being more costly in terms of cycles due to painful trig operations.
What do you do to maintain a constant peak level across the frequency
spectrum?
|
What platform are you on? My experience has been with the formulas found here:
http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt
I've always had the luxury of time to compute the coefficients directly since
they don't change very often in my case. But I have used approximations to a
power function by breaking the power into integer and fractional parts then
using a shift to do the integer part and a power series approximation for the
fractional part. This was on a floating-point SHARC DSP. However, this might
not be applicable to the case where the base is not constant.
General optimization principles such as using look-up tables possibly with
interpolation may be applicable as well. |
|
| Back to top |
|
 |
|
|
|
|