DSPRelated.com
Forums

Audio application problem

Started by PROVENTEK MINDCRAFT AB January 17, 2004
"Allan Herriman" <allan.herriman.hates.spam@ctam.com.au.invalid> wrote in
message news:bghr009kj4gkmsmg52ea3o2lhgrjs8rqtu@4ax.com...
> On Tue, 20 Jan 2004 17:59:17 -0500, Jerry Avins <jya@ieee.org> wrote: > > >Jon Harris wrote: > > > >> "Allan Herriman" <allan.herriman.hates.spam@ctam.com.au.invalid> wrote
...
> >>>The regular bass and treble controls on your stereo are 2nd order. > >> > >> > >> That's interesting to know. The only thing I've actually measured is a > >> Mackie 1604VLZ-Pro mixer. It's high and low EQ were 6dB/octave, so I > >> assumed 1st order. From that I generalized to think that most
treble/bass
> >> controls were first order, but that may well be a faulty assumption. > >> > >> Can anyone else confirm Allan's assertion? > > > >http://msswartz.tripod.com/baxandall1.htm shows a typical analog tone > >control "stack". (I use separate bass and treble controls in a feedback > >configuration, but the equations are substantially the same.) To a first > >approximation, it's second order. In detail, it's worse. > > There's a discussion about the transfer function in this old > sci.electronics.design thread: > http://groups.google.com/groups?threadm=7edjrg%24n1j%241%40wrqnews.wrq.com > > Brief summary: The transfer function of the classic Baxandall is > bicubic (3 poles, 3 zeros), but this is due to the way the circuit is > designed. A simplified version that doesn't have all the interactions > between the controls would only have two poles and two zeros. > Certainly, only two poles and two zeros are needed to get the desired > tone control effect.
I think there is a little confusion with terms in regard to order. I was originally talking about the order of a single shelving filter, e.g. the bass filter. The order of a tone control that has both a treble and bass adjustment would of course have twice that order. You can make a first order low shelving filter, but you would need this plus a first order high shelving filter for a treble/bass control, hence 2nd order at minimum. So back to an earlier point, Allan, when you said "The regular bass and treble controls on your stereo are 2nd order" are you referring to the composite circuit or the each individual filter? Or maybe they are intertwined such that this is not a meaningful question? And back to my original point to the original poster, the shelving filters given in r b-j's cookbook are 2nd order (12dB/octave). If you made a treble/bass control out of 2 of these, you would have a fourth order circuit, and it may not emulate traditional analog tone control circuits. One further question, some cheaper stereos don't have separate treble/bass controls, just a single "tone" knob. What does this do? Just a high shelf?
Jon Harris wrote:
...
>><sidebar> Look closely at the curve when one control is set to full >>boost and the other is flat. You will see a dip before the boost >>begins. That is not an optical illusion, but evidence that the >>cancelling breaks don't cancel. I'll show you how to make the >>cancellation exact if you want to. </sidebar> > > > Interestingly, I recently read about a digital EQ that also offers this > feature, claiming it sounds better that way! Maybe it just sounds more like > people are used to?
Some very respected analogue EQs (and at least one digital EQ that I know of :) actually modify the "Q" of the shelving filters with the boost value. The aim is that there is sort of a constant transition bandwidth between the two flat sections of the shelve filter (is it clear why that makes sense?). This is only possible with second order shelve filters, obviously. I think the channel strip EQs on the Oxford desk has a switch (with three different settings?) which allows to specifiy how the "Q" relates to the boost for shelve filters. Come to think of it, this would also make sense for peaking filters. Anycase, on some material it is quite interesting to use steep shelve filters (ie. with overshoot). I wouldn't say that it always sounds better to use one or the other setting for the filter. As usual, it depends on the programme material being filtered. Andy Moorer in his classic audio filter design paper used a critically damped shelve filter, saying that this is the only value for the shelve "Q" which makes sense (however, never exactly explaining why he thinks so). I don't see why one should be able to control the Q on a peaking filter but not on a shelving filter. So we added this control to our EQ: http://www.weiss.ch/eq1/eq1-mk2.html
>>A tone control boosts or cuts for a while, then flattens out. It takes >>two breakpoints to do that: one pole, one zero. I called that second >>order. Was I wrong?
I would say that is first order. The order of a rational function is the maximum of the order of the numerator and the denominator (at least that's how I learned it). OTH, the order (power) of the error term in a rational Pade approximation is the sum of the order of numerator and denominator. It's all a bit confusing. Regards, Andor
Jon Harris wrote:

   ...

> I don't know what is standard in the analog world, but with digital > filtering, something with one pole and one zero would be first order. A > biquad (quadratic in both numerator and denominator) is second order and has > 2 poles and 2 zeros.
Analog too. I seem to be better at building things than naming them. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Jon Harris wrote:

   ...

> I think there is a little confusion with terms in regard to order. I was > originally talking about the order of a single shelving filter, e.g. the > bass filter. The order of a tone control that has both a treble and bass > adjustment would of course have twice that order. You can make a first > order low shelving filter, but you would need this plus a first order high > shelving filter for a treble/bass control, hence 2nd order at minimum.
That doesn't let me off the hook. To minimize interaction, the impedances in a tone-control "stack" are chosen to effectively break it into separate functions, and the better ones use a buffer between the bass and treble sections.
> > So back to an earlier point, Allan, when you said "The regular bass and > treble controls on your stereo are 2nd order" are you referring to the > composite circuit or the each individual filter? Or maybe they are > intertwined such that this is not a meaningful question? > > And back to my original point to the original poster, the shelving filters > given in r b-j's cookbook are 2nd order (12dB/octave). If you made a > treble/bass control out of 2 of these, you would have a fourth order > circuit, and it may not emulate traditional analog tone control circuits. > > One further question, some cheaper stereos don't have separate treble/bass > controls, just a single "tone" knob. What does this do? Just a high shelf?
In analog implementations, it's usually a "losser". That's a capacitor connected between the arm of a pot to ground, and the signal, typically at a collector. Both the depth of cut and the turnover frequency vary with the pot setting. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Thu, 22 Jan 2004 11:36:03 -0500, Jerry Avins <jya@ieee.org> wrote:

>Jon Harris wrote: >> So back to an earlier point, Allan, when you said "The regular bass and >> treble controls on your stereo are 2nd order" are you referring to the >> composite circuit or the each individual filter? Or maybe they are >> intertwined such that this is not a meaningful question?
[My news server missed Jon's post.] Yes, I was referring to the composite filter. The typical (analog) implementation has both bass and treble filters in the one circuit. This results in some interactions between the controls, and the composite response has three poles and three zeros. This thread: http://groups.google.com/groups?threadm=7edjrg%24n1j%241%40wrqnews.wrq.com contains an analysis of a typical circuit. It would be possible to implement them as separate filters, each with one pole and one zero. In DSP, this could possibly be a good thing. In the analog world, this requires an extra buffer amp, with its attendant cost and signal degradation. Regards, Allan.
"Allan Herriman" <allan.herriman.hates.spam@ctam.com.au.invalid> wrote in
message news:n49110d284ltvo7j287busoauar31htf8b@4ax.com...
> On Thu, 22 Jan 2004 11:36:03 -0500, Jerry Avins <jya@ieee.org> wrote: > > >Jon Harris wrote: > >> So back to an earlier point, Allan, when you said "The regular bass and > >> treble controls on your stereo are 2nd order" are you referring to the > >> composite circuit or the each individual filter? Or maybe they are > >> intertwined such that this is not a meaningful question? > > [My news server missed Jon's post.] > > Yes, I was referring to the composite filter. The typical (analog) > implementation has both bass and treble filters in the one circuit. > This results in some interactions between the controls, and the > composite response has three poles and three zeros.
OK, we are all in agreement now that the terminology issues have been straigtened out.
> This thread: > http://groups.google.com/groups?threadm=7edjrg%24n1j%241%40wrqnews.wrq.com > contains an analysis of a typical circuit. > > > It would be possible to implement them as separate filters, each with > one pole and one zero. > In DSP, this could possibly be a good thing. In the analog world, > this requires an extra buffer amp, with its attendant cost and signal > degradation.
Got it. In DSP, you could implement it as a single 2nd order filter (biquad) just by convolving the filter coefs of each section. That would be very efficient and still have no interaction between bands, though you would have to recalculate all the coefs any time either parameter changed.
Jon Harris wrote:

> "Allan Herriman" <allan.herriman.hates.spam@ctam.com.au.invalid> wrote in > message news:n49110d284ltvo7j287busoauar31htf8b@4ax.com... >
... P.S. (Whole discussion) It was (is?) common practice to set the break points for both bass and treble controls to a common frequency between 1 and 2 KHz. I built my own with these breaks separated, lowering the bass break to around 450 Hz and raising the treble to around 2,500, with a flat range between. I found this more satisfactory for general listening and for correcting the equalization of non-RIAA recordings. If you want to think of it that way, it's a three-band equalizer of sorts. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
"PROVENTEK MINDCRAFT AB" <torbjorn.landgren@telia.com> skrev i meddelandet
news:48dOb.45050$mU6.167467@newsb.telia.net...
> Hi folks, > > I'm working with an dsp audio application and I desperately > need an algorithm for tone control. > > The filter is described in my spec as a Baxendall filter > with the axial point of 1kHz and the characteristics is > a maximum of +-6dB per octave. > > So far I have implemented low and high pass second order > Butterworh IIR filters with coefficients calculated with > Matlab and they work fine. > For the filter below 1kHz +6dB/octave I ran into problems. > I don't know how to calculate the filter coefficients and > which function to use. I have tried yulewalk calculated > parameters and it did not work at all. Any suggestions? > > The developent platform is a SHARC DSP EZ-Kit Lite > equipped with a ADSP 21061 (floating point) and the > sampling rate is 44,100 kHz. > > Regards T Landgren > >
Hello, Thank you all for your input. It has been most helpful. However I'm not certain how to chose the values for Q and S described in the document http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt Jerry presented to me. Regards T Landgren
"T Landgren" <torbjorn.landgren@telia.com> wrote in message
news:9sDQb.46210$mU6.174116@newsb.telia.net...
> > "PROVENTEK MINDCRAFT AB" <torbjorn.landgren@telia.com> skrev i meddelandet > news:48dOb.45050$mU6.167467@newsb.telia.net... > > Hi folks, > > > > I'm working with an dsp audio application and I desperately > > need an algorithm for tone control. > > > > The filter is described in my spec as a Baxendall filter > > with the axial point of 1kHz and the characteristics is > > a maximum of +-6dB per octave. > > > > So far I have implemented low and high pass second order > > Butterworh IIR filters with coefficients calculated with > > Matlab and they work fine. > > For the filter below 1kHz +6dB/octave I ran into problems. > > I don't know how to calculate the filter coefficients and > > which function to use. I have tried yulewalk calculated > > parameters and it did not work at all. Any suggestions? > > > > The developent platform is a SHARC DSP EZ-Kit Lite > > equipped with a ADSP 21061 (floating point) and the > > sampling rate is 44,100 kHz. > > > > Regards T Landgren > > Hello, > > Thank you all for your input. It has been most helpful. However I'm not > certain how to > chose the values for Q and S described in the document > http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt > Jerry presented to me.
Using Matlab, graph the frequency responses of the shelving filters using freqz. Try different values for Q, S, gain, etc. and see what the effects. Find the values that meet your requirements. Try starting with S = 1, and then decrease it for large gain values (> 10dB or so).
Hi Torbj&#4294967295;rn,

If Proventek Mindcraft is related to Proventek AB in Stockholm, then I have
worked with your company before. If you don't manage to work this out you
can email me or ask Tomas Lann&#4294967295;r at Proventek to give you my phone numbers.

Best regards,

Tomas

"T Landgren" <torbjorn.landgren@telia.com> skrev i meddelandet
news:9sDQb.46210$mU6.174116@newsb.telia.net...
> > "PROVENTEK MINDCRAFT AB" <torbjorn.landgren@telia.com> skrev i meddelandet > news:48dOb.45050$mU6.167467@newsb.telia.net... > > Hi folks, > > > > I'm working with an dsp audio application and I desperately > > need an algorithm for tone control. > > > > The filter is described in my spec as a Baxendall filter > > with the axial point of 1kHz and the characteristics is > > a maximum of +-6dB per octave. > > > > So far I have implemented low and high pass second order > > Butterworh IIR filters with coefficients calculated with > > Matlab and they work fine. > > For the filter below 1kHz +6dB/octave I ran into problems. > > I don't know how to calculate the filter coefficients and > > which function to use. I have tried yulewalk calculated > > parameters and it did not work at all. Any suggestions? > > > > The developent platform is a SHARC DSP EZ-Kit Lite > > equipped with a ADSP 21061 (floating point) and the > > sampling rate is 44,100 kHz. > > > > Regards T Landgren > > > > > > Hello, > > Thank you all for your input. It has been most helpful. However I'm not > certain how to > chose the values for Q and S described in the document > http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt > Jerry presented to me. > > Regards T Landgren > > > >