INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: DSP 6 dB/Oct filters  (Read 5755 times)

dvogel1

  • Recent member
  • *
  • Posts: 43
DSP 6 dB/Oct filters
« on: October 24, 2014, 04:13:05 pm »

I am attempting to create a second order Linkwitz-Riley (LR2) filter using two consecutive 6 dB/oct filters. The LR2 filter response is down six dB at the crossover frequency. I am measuring -13 dB at the crossover frequency with the two cascaded first order filters. I have assumed that the first order filters are the Butterworth type. Is that correct?

I have referred to a couple of posts:
http://yabb.jriver.com/interact/index.php?topic=88345.msg605777#msg605777
http://yabb.jriver.com/interact/index.php?topic=90000.msg622530#msg622530


Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: DSP 6 dB/Oct filters
« Reply #1 on: October 24, 2014, 07:02:36 pm »

All the built in filters are supposed to be butterworths (including the 1st orders), but I just measured them in response to your query and I can confirm your measurements.  My measurements suggest the 6 dB/octave filters are -6dB at the crossover point not -3dB, which is incorrect.  I'm not sure what to even call it; I don't think there's a named filter slope that's 6dB an octave and -6dB at the crossover point (no such thing as a 1st order linkwitz riley, etc.).  In any event I measured -12dB at the crossover point by stacking two of them, which is close enough to your -13 to say we're likely seeing the same issue.  

This made me worried about the other filters, but I re-measured the higher order filters (which I have been relying on for my own crossover) and I can confirm that they are correct butterworths (-3dB at the crossover point).  That part is unsurprising because I'd measured the higher order filters many times in setting up my speakers, but obviously I wanted to reconfirm.  The 6dB/octave filter was a fairly recent addition (within the last year or so) and I don't have speakers that could benefit from a slope that shallow; I was assuming they worked the same way as the other filters, but clearly they do not as currently implemented. Good catch.

Until this gets fixed, I can confirm that two of MC's 12dB filters stacked make a working 4th order Linkwitz Riley (which is what I've been using myself).  If you really need a 2nd order response right now, you can use 2nd order butterworths plus a -3dB PEQ notch to get rid of the lump.  The latter approach will produce a LR-2-like slope and phase response because MC's filters are all minimum phase.

Hopefully Matt can fix this though, so work arounds are not necessary. This is not expected behavior from a first order filter:
https://en.wikipedia.org/wiki/Low-pass_filter#Continuous-time_low-pass_filters
https://en.wikipedia.org/wiki/File:Butterworth_response.svg.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10942
Re: DSP 6 dB/Oct filters
« Reply #2 on: October 25, 2014, 03:14:39 am »

Hey Matt,

I briefly looked at the implementation and the formula mentioned, and I think the problem is that there is a factor 2 missing from the normalized cutoff frequency which is mentioned in the formula but not the code.

I don't quite understand the math here yet, so I figure I would just point this out to you!
Logged
~ nevcairiel
~ Author of LAV Filters

natehansen66

  • World Citizen
  • ***
  • Posts: 239
Re:
« Reply #3 on: October 25, 2014, 07:52:58 am »

Good catch indeed! I use the 1st order filter and I thought the knee was a little steep. It produced the desired result so I didn't look into it any further.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42384
  • Shoes gone again!
Re: DSP 6 dB/Oct filters
« Reply #4 on: October 25, 2014, 08:57:41 am »

Hey Matt,

I briefly looked at the implementation and the formula mentioned, and I think the problem is that there is a factor 2 missing from the normalized cutoff frequency which is mentioned in the formula but not the code.

I don't quite understand the math here yet, so I figure I would just point this out to you!

Care to take a stab at a fix?
Logged
Matt Ashland, JRiver Media Center

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: DSP 6 dB/Oct filters
« Reply #5 on: November 04, 2014, 12:52:12 pm »

Any update on this? 
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10942
Re: DSP 6 dB/Oct filters
« Reply #6 on: November 05, 2014, 06:50:50 am »

I applied the fix, and in my measurements it seems to line up with what you would expect (3dB at the point, 6dB octave after), but further testing to confirm is appreciated!
Logged
~ nevcairiel
~ Author of LAV Filters

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: DSP 6 dB/Oct filters
« Reply #7 on: November 05, 2014, 07:21:09 am »

I applied the fix, and in my measurements it seems to line up with what you would expect (3dB at the point, 6dB octave after), but further testing to confirm is appreciated!

Sweet, I'll measure when I get home.  I just didn't see it in the release notes.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10942
Re: DSP 6 dB/Oct filters
« Reply #8 on: November 05, 2014, 07:31:26 am »

Sweet, I'll measure when I get home.  I just didn't see it in the release notes.

Its not in any release yet.
Logged
~ nevcairiel
~ Author of LAV Filters

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: DSP 6 dB/Oct filters
« Reply #9 on: November 05, 2014, 08:03:09 am »

Its not in any release yet.

Sorry, I misunderstood "applied the fix."  I'm happy to test when it's out  :)
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42384
  • Shoes gone again!
Re: DSP 6 dB/Oct filters
« Reply #10 on: November 05, 2014, 11:55:15 am »

Sorry, I misunderstood "applied the fix."  I'm happy to test when it's out  :)

It's out now.  Testing appreciated.
Logged
Matt Ashland, JRiver Media Center

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: DSP 6 dB/Oct filters
« Reply #11 on: November 05, 2014, 07:36:08 pm »

Just took a few measurements with a hardware loopback in Holm; it looks good to me.  The attached picture shows no filter and one of the 6 dB octave low passes set at 300Hz.  It's -3dB at 300 Hz, and is -12dB at 1.2KHz (two octaves away).  It's also 6dB an octave from there on up (not pictured  ;D).

Thanks for the fix!
Logged
Pages: [1]   Go Up