Hi all! I'd like to implement 1st and 2nd order shelving filters - which are generally called 6 db/oct and 12 db/oct filters. I had a look at the 'Audio EQ Cookbook', but it doesn't say a word about 1st order filters, and for 2nd order filters it's not clear to me how the slope parameter S (S <= 1) relates to the filter slope expressed in db/oct. Matlab simulations showed that RBJ's second order filter could be a 12dB/oct when S is set to 1 - but in order to achieve such a rolloff, the amount of boost or cut must be significant (about 30dB) so i keep doubting (Sorry RBJ your document is just great - by the way thanks for making it available online - it's just that i don't know how to use it). I would greatly appreciate if someone could point a useful document - common analog transfer functions ready for a bilinear transformation or - even better! - digital transfer functions (yeah i'm a lazy bum ;) ) Thanks! Gus
Audio Shelving fliters
Started by ●August 29, 2006
Reply by ●August 29, 20062006-08-29
gusflit@gmx.net wrote:> Hi all! > > I'd like to implement 1st and 2nd order shelving filters - which are > generally called 6 db/oct and 12 db/oct filters. > > I had a look at the 'Audio EQ Cookbook', but it doesn't say a word > about 1st order filters,That's because first order shelving filters don't exist.> and for 2nd order filters it's not clear to me > how the slope parameter S (S <= 1) relates to the filter slope > expressed in db/oct.S is similar to the Q in lowpass filters. Around the 3dB-point, the Q of lowpass filters significantly affects the slope of the filter. It reaches the 12dB/oct roll-off only further away from the 3dB frequency. Similarly, the slope of shelving filters is affected by the S parameter, even though the order remains constant.> Matlab simulations showed that RBJ's second order > filter could be a 12dB/oct when S is set to 1 - but in order to achieve > such a rolloff, the amount of boost or cut must be significant (about > 30dB) so i keep doubting (Sorry RBJ your document is just great - by > the way thanks for making it available online - it's just that i don't > know how to use it).Perhaps you don't need a shelving filter at all? Shelving means that at DC and Nyquist, the filter is flat, with a certain gain difference between the two flat sections. The slope of the transition band is controlled with the S parameter, and can be much steeper than 12dB / oct.> > I would greatly appreciate if someone could point a useful document - > common analog transfer functions ready for a bilinear transformation or > - even better! - digital transfer functions (yeah i'm a lazy bum ;) )The cookbook has digital transfer functions. Regards, Andor
Reply by ●August 29, 20062006-08-29
Andor a =E9crit :> gusflit@gmx.net wrote: > > Hi all! > > > > I'd like to implement 1st and 2nd order shelving filters - which are > > generally called 6 db/oct and 12 db/oct filters. > > > > I had a look at the 'Audio EQ Cookbook', but it doesn't say a word > > about 1st order filters, > > That's because first order shelving filters don't exist. > > > and for 2nd order filters it's not clear to me > > how the slope parameter S (S <=3D 1) relates to the filter slope > > expressed in db/oct. > > S is similar to the Q in lowpass filters. Around the 3dB-point, the Q > of lowpass filters significantly affects the slope of the filter. It > reaches the 12dB/oct roll-off only further away from the 3dB frequency. > Similarly, the slope of shelving filters is affected by the S > parameter, even though the order remains constant. > > > Matlab simulations showed that RBJ's second order > > filter could be a 12dB/oct when S is set to 1 - but in order to achieve > > such a rolloff, the amount of boost or cut must be significant (about > > 30dB) so i keep doubting (Sorry RBJ your document is just great - by > > the way thanks for making it available online - it's just that i don't > > know how to use it). > > Perhaps you don't need a shelving filter at all? Shelving means that at > DC and Nyquist, the filter is flat, with a certain gain difference > between the two flat sections. The slope of the transition band is > controlled with the S parameter, and can be much steeper than 12dB / > oct. > > > > > I would greatly appreciate if someone could point a useful document - > > common analog transfer functions ready for a bilinear transformation or > > - even better! - digital transfer functions (yeah i'm a lazy bum ;) ) >=20 > The cookbook has digital transfer functions.=20 >=20 > Regards, > Andor
Reply by ●August 29, 20062006-08-29
Andor wrote:> gusflit@gmx.net wrote: > > Hi all! > > > > I'd like to implement 1st and 2nd order shelving filters - which are > > generally called 6 db/oct and 12 db/oct filters. > > > > I had a look at the 'Audio EQ Cookbook', but it doesn't say a word > > about 1st order filters, > > That's because first order shelving filters don't exist. >it may be a matter of semantics.. a filter that rises a 6 dB per octave for say two octaves and then goes flat again I might call a first order shelving filter... To the OP, a shelving filter is one that has a region of slope but ultimatly goes back to a flat response. i.e it may boost all the bass freqs from <20 Hz to 200 Hz by say 10 dB , then slope down at about 6 dB per octave from 200 Hz to 1 kHz then be flat > 1 kHz... i.e the response looks like a shelf... Mark
Reply by ●August 29, 20062006-08-29
Andor wrote:>>I had a look at the 'Audio EQ Cookbook', but it doesn't say a word >>about 1st order filters, > > > That's because first order shelving filters don't exist. >?????? A standard bass/treble control is the example of the 1st order shelving filter. It can be implemented using just one biquad section. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●August 29, 20062006-08-29
Ok i thought i was asking something easy, but looks like it's not. I'll try to be clearer. A first order iir filter uses 1 delay element in the feedback loop. A second order uses 2 of them. That's basically what i meant. Theoretically, if you want flat regions with no dip/oscillation, a 1st order filter will yield a max 6dB/oct meanwhile a 2nd will provide 12dB/oct. 1st order shelving filters are available. For example, in Regalia/Mitra nice approach, if you take a first order lowpass filter (transfer function Hlp(z) ) and fill in the stopband with the complementary highpass filter Hhp(z) by a given amount: G(z) =3D Hlp(z) + K*Hhp(z) you get a first order High shelving filter G(z) with boost or cut equal to 20*log10(K). The problem with Regalia/Mitra cooking recipe is that a pair of filters with opposite gains (in dB) are not magnitude-complementary - that's why i'm looking for an other approach. Maybe that repeating Regalia/Mitra strategy with standard Butterworth filters would yield to what i'm looking for, but as i said, i'm a lazy bum - digital shelving filters are ubiquitous and there's no challenge in deriving their transfer functions from scrap. Thanks for your input guys! Gus Mark a =E9crit :> Andor wrote: > > gusflit@gmx.net wrote: > > > Hi all! > > > > > > I'd like to implement 1st and 2nd order shelving filters - which are > > > generally called 6 db/oct and 12 db/oct filters. > > > > > > I had a look at the 'Audio EQ Cookbook', but it doesn't say a word > > > about 1st order filters, > > > > That's because first order shelving filters don't exist. > > > it may be a matter of semantics.. > > a filter that rises a 6 dB per octave for say two octaves and then goes > flat again I might call a first order shelving filter... > > To the OP, a shelving filter is one that has a region of slope but > ultimatly goes back to a flat response. i.e it may boost all the bass > freqs from <20 Hz to 200 Hz by say 10 dB , then slope down at about 6 > dB per octave from 200 Hz to 1 kHz then be flat > 1 kHz... i.e the > response looks like a shelf... >=20 > Mark
Reply by ●August 29, 20062006-08-29
Vladimir, A biquad is a second order section. Gus Vladimir Vassilevsky a =E9crit :> Andor wrote: > > > >>I had a look at the 'Audio EQ Cookbook', but it doesn't say a word > >>about 1st order filters, > > > > > > That's because first order shelving filters don't exist. > > > > ?????? > > A standard bass/treble control is the example of the 1st order shelving > filter. It can be implemented using just one biquad section. > > Vladimir Vassilevsky >=20 > DSP and Mixed Signal Design Consultant >=20 > http://www.abvolt.com
Reply by ●August 29, 20062006-08-29
gusflit@gmx.net wrote:> Vladimir, >=20 > A biquad is a second order section. >=20You have TWO 1-st order shelf filters combined in one biquad. Separate controls for bass and for treble. Is that understood?>=20 > Vladimir Vassilevsky a =E9crit : >=20 >=20 >>Andor wrote: >> >> >> >>>>I had a look at the 'Audio EQ Cookbook', but it doesn't say a word >>>>about 1st order filters, >>> >>> >>>That's because first order shelving filters don't exist. >>> >> >>?????? >> >>A standard bass/treble control is the example of the 1st order shelving=>>filter. It can be implemented using just one biquad section. >> >>Vladimir Vassilevsky >> >>DSP and Mixed Signal Design Consultant >> >>http://www.abvolt.com >=20 >=20
Reply by ●August 29, 20062006-08-29
Vladimir Vassilevsky a =E9crit :> gusflit@gmx.net wrote: > > Vladimir, > > > > A biquad is a second order section. > > > > You have TWO 1-st order shelf filters combined in one biquad. > Separate controls for bass and for treble. > Is that understood? >Ok, that was indeed a misunderstanding because i had in mind separate implementations for hi and lo shelves. Sorry.
Reply by ●August 29, 20062006-08-29
Gus wrote:> 1st order shelving filters are available. For example, in Regalia/Mitra > nice approach, if you take a first order lowpass filter (transfer > function Hlp(z) ) and fill in the stopband with the complementary > highpass filter Hhp(z) by a given amount: > > G(z) = Hlp(z) + K*Hhp(z) > > you get a first order High shelving filter G(z) with boost or cut equal > to 20*log10(K).That's correct. Where was my head.> > The problem with Regalia/Mitra cooking recipe is that a pair of filters > with opposite gains (in dB) are not magnitude-complementary - that's > why i'm looking for an other approach.Perhaps wave filters give you what you want: journals.tubitak.gov.tr/elektrik/issues/elk-03-11-3/elk-11-3-3-0302-1.pdf I still don't understand why you can't user r b-j's shelving filter ... ? Regards, Andor






