# Help with Orfanidis filters

Started by October 23, 2006
```Dear List,

I am currently working my way through the following Orfanidis Paper -

High-Order Digital Parametric Equalizer Design. It is available for

http://www.ece.rutgers.edu/~orfanidi/ece521/hpeq.pdf

It describes how higher order parametric equalizers can be designed
through first designing
analog low shelf filters and then convert these to equivalent low shelf
digital filter and then to digital equalizers via a bandpass
transformation.

I am keen to use just the digital shelving filters from this design and
have managed to implement the low shelf filters
as described in the article. However, I would like to have a stab at
implementing the high shelving filters using the same
approach. This is the bit I'm stuck at.

Orfanidis explains how to transform the analog lowpass shelving filter
into a digital lowpass version by applying the
bilinear transform.

EQ19. gives the analog transfer function -

Ha(s)= [g&#2013265951; + g0s / &#2013265951; + s] i=1 to L [ (g2&#2013265951;2 + 2gg0si&#2013265951;s + g20s2) / (&#2013265951;2 +
2si&#2013265951;s + s2) ]

Orfanidis says in his paper -

Using the coefficient transformations given in Appendix A.1,

D0 = A00 + A01

b00 = (B00 + B01)/D0
b01 = (B00 - B01)/D0
a01 = (A00 - A01)/D0

Di = Ai0 + Ai1 + Ai2
bi0 = (Bi0 + Bi1 + Bi2)/Di
bi1 = 2(Bi0 - Bi2)/Di
bi2 = (Bi0 - Bi1 + Bi2)/Di
ai1 = 2(Ai0 - Ai2)/Di
ai2 = (Ai0 - Ai1 + Ai2)/Di

..we find the coefficients of the digital lowpass shelving filter (18b),

D0 = &#2013265951; + 1
b00 = (g&#2013265951; + g0)/D0
b01 = (g&#2013265951; - g0)/D0
a01 = (&#2013265951; - 1)/D0

Di = &#2013265951;2 + 2si&#2013265951; + 1
bi0 = (g2&#2013265951;2 + 2gg0si&#2013265951; + g20) / Di
bi1 = 2(g2&#2013265951;2 - g20)/Di
bi2 = (g2&#2013265951;2 - 2gg0si&#2013265951; + g20)/Di
ai1 = 2(&#2013265951;2 - 1)/Di
ai2 = (&#2013265951;2 - 2si&#2013265951; + 1)/Di

How can I change that to get the high shelf filter?

Would it be correct to replace all instances of s in EQ19 with 1/s to get
the high shelf?

Any tips on how to get the high shelf version would be MUCH appreciated.

Thanks,
David
```
```davidross wrote:

...

> Any tips on how to get the high shelf version would be MUCH appreciated.

http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt

Jerry
--
"The rights of the best of men are secured only as the
rights of the vilest and most abhorrent are protected."
- Chief Justice Charles Evans Hughes, 1927
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```
```>davidross wrote:
>
>   ...
>
>> Any tips on how to get the high shelf version would be MUCH
appreciated.
>
>http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
>
>Jerry

.

that old chestnut...

mmh, so ya reckon i can use the Orfanidis paper and something in the
Cookbook to get the high shelf for the Orfanidis filters. Or are you
suggesting I just use straight from the Cookbook?

Best Regards,
David
```
```davidross wrote:
>> davidross wrote:
>>
>>   ...
>>
>>> Any tips on how to get the high shelf version would be MUCH
> appreciated.
>> http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt
>>
>> Jerry
>
> .
>
> that old chestnut...
>
> mmh, so ya reckon i can use the Orfanidis paper and something in the
> Cookbook to get the high shelf for the Orfanidis filters. Or are you
> suggesting I just use straight from the Cookbook?

The Cookbook will at least give you the form of the answer you want. Is
there a reason to believe that the Cookbook version won't serve as well
as any? How closely do Orfanidis's and L.B-J's low shelves compare?

Jerry
--
"The rights of the best of men are secured only as the
rights of the vilest and most abhorrent are protected."
- Chief Justice Charles Evans Hughes, 1927
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```
```Jerry Avins wrote:
>
> How closely do Orfanidis's and L.B-J's low shelves compare?

Jerry, there is a recent paper (later than that first one he did for
JAES) from Orfanidis that sorta maps higher order LPF prototypes (where
you can use Butterworth or Chebyshev type 1 or 2 or something else) to
either the parametric peaking or shelving filters.  so you can get an
edge on the shelf to be as vertical (< 100%) as you want and the
corners as sharp as you want (also <100%).  it's sorta how you map a
1st-order LPF to a BPF (and a BPF to a peaking EQ) or to a low-shelf EQ
but generalized for a higher order LPF prototype.

that's how i remember the paper.

i don't have access to my JAES at the moment (i might be able to get it
online unless it's more than a year old, i dunno if their server
remembers the years i was a member) and i hadn't (yet, anyway)
MATLIBized it.

r b-j

```
```> > How closely do Orfanidis's and L.B-J's low shelves compare?

Hi Jerry,

I implemented the RBJ Low Shelf filters in Matlab. There working very
well but when I used the Orfanidis filters they were really sharp and
more importantly for my case, they were very sharp at low frequencies
i.e. 100Hz, and this was just using one 1st Order section and two 2nd
Order sections, straight from the journal example. I imagine a 4th
Order design would be practically vertical even at low frequencies.
I've matlabized the Low Shelf design and can post it later once I'm at
home if anyone would like to see it.

I think the high shelf should be easy enough once I know how to
approach it, thats the learning curve I guess.

Orfanidis's personal web site. And I think you remembered the paper
well, basically mapping Analog prototype filter designs over to
shelving and parametric equalizers. I guess that means that by using,
for example, and 8th Order Butterworth polynomial design, we could get
an 8th Order Low Shelf digital filter. Really sharp! Also, serious
learning curve.

Best Regards,
David

> Jerry, there is a recent paper (later than that first one he did for
> JAES) from Orfanidis that sorta maps higher order LPF prototypes (where
> you can use Butterworth or Chebyshev type 1 or 2 or something else) to
> either the parametric peaking or shelving filters.  so you can get an
> edge on the shelf to be as vertical (< 100%) as you want and the
> corners as sharp as you want (also <100%).  it's sorta how you map a
> 1st-order LPF to a BPF (and a BPF to a peaking EQ) or to a low-shelf EQ
> but generalized for a higher order LPF prototype.
>
> that's how i remember the paper.
>
> i don't have access to my JAES at the moment (i might be able to get it
> online unless it's more than a year old, i dunno if their server
> remembers the years i was a member) and i hadn't (yet, anyway)
> MATLIBized it.
>
> r b-j

```
```davidross wrote:
>>> How closely do Orfanidis's and L.B-J's low shelves compare?
>
>
> Hi Jerry,
>
> I implemented the RBJ Low Shelf filters in Matlab. There working very
> well but when I used the Orfanidis filters they were really sharp and
> more importantly for my case, they were very sharp at low frequencies
> i.e. 100Hz, and this was just using one 1st Order section and two 2nd
> Order sections, straight from the journal example. I imagine a 4th
> Order design would be practically vertical even at low frequencies.
> I've matlabized the Low Shelf design and can post it later once I'm at
> home if anyone would like to see it.
>
> I think the high shelf should be easy enough once I know how to
> approach it, thats the learning curve I guess.
>
> Orfanidis's personal web site. And I think you remembered the paper
> well, basically mapping Analog prototype filter designs over to
> shelving and parametric equalizers. I guess that means that by using,
> for example, and 8th Order Butterworth polynomial design, we could get
> an 8th Order Low Shelf digital filter. Really sharp! Also, serious
> learning curve.

David,

Have you listened to music through these filters? I suspect that they
might produce unpleasant artifacts with some program material. I was
disappointed years ago when I cascaded a pair of analog tone controls to
get the steeper slopes I thought I wanted.

Jerry
--
"The rights of the best of men are secured only as the
rights of the vilest and most abhorrent are protected."
- Chief Justice Charles Evans Hughes, 1927
&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
```
```davidross wrote:

> http://www.ece.rutgers.edu/~orfanidi/ece521/hpeq.pdf

> Any tips on how to get the high shelf version would be MUCH
> appreciated.

Orfanidis states the way in eq. 9.

Martin

--
Quidquid latine scriptum sit, altum viditur.
```
```>davidross wrote:
>>>> How closely do Orfanidis's and L.B-J's low shelves compare?
>>
>>
>> Hi Jerry,
>>
>> I implemented the RBJ Low Shelf filters in Matlab. There working very
>> well but when I used the Orfanidis filters they were really sharp and
>> more importantly for my case, they were very sharp at low frequencies
>> i.e. 100Hz, and this was just using one 1st Order section and two 2nd
>> Order sections, straight from the journal example. I imagine a 4th
>> Order design would be practically vertical even at low frequencies.
>> I've matlabized the Low Shelf design and can post it later once I'm at
>> home if anyone would like to see it.
>>
>> I think the high shelf should be easy enough once I know how to
>> approach it, thats the learning curve I guess.
>>
>> Orfanidis's personal web site. And I think you remembered the paper
>> well, basically mapping Analog prototype filter designs over to
>> shelving and parametric equalizers. I guess that means that by using,
>> for example, and 8th Order Butterworth polynomial design, we could get
>> an 8th Order Low Shelf digital filter. Really sharp! Also, serious
>> learning curve.
>
>David,
>
>Have you listened to music through these filters? I suspect that they
>might produce unpleasant artifacts with some program material. I was
>disappointed years ago when I cascaded a pair of analog tone controls to

>get the steeper slopes I thought I wanted.
>
>Jerry

Hi Jerry,

No I havent yet listened to music through the filters. I'm right at this
moment putting together a c++ plugin to test the lowshelf filter but its
currently unstable so I will try it again tomorrow with a fresh head - not
sure if its my code or the filter algorithm and I've not debugged it yet to
check all the values to see how they compare to matlab. You may be right
that the filters may be just too sharp for audio. I will give it a try and
see how it pans out.

Best Regards,
David

```
```Martin Eisenberg wrote:
> davidross wrote:
>
> > http://www.ece.rutgers.edu/~orfanidi/ece521/hpeq.pdf
>
> > Any tips on how to get the high shelf version would be MUCH
> > appreciated.
>
> Orfanidis states the way in eq. 9.
>
>
> Martin
>
> --
> Quidquid latine scriptum sit, altum viditur.

Hi Martin,

Thanks, I will take a close look at EQ9.

Cheers,
David

```