HardwareHeaven.com

HardwareHeaven.com

Looking for the skin chooser?
 
 
  • Home

  • Hardware reviews

  • Articles

  • News

  • Tools

  • Gaming at HardwareHeaven

  • Forums

 

Go Back   HardwareHeaven.com > Forums > Hardware and Related Topics > kX Project Audio Driver Support Forum > Effects and the DSP


Reply
 
Thread Tools
Old Feb 8, 2010, 08:23 PM   #1
HardwareHeaven Newbie
 
Join Date: Dec 2009
Location: White Plains, NY
Posts: 17
Rep Power: 0
boris81 is on a distinguished road

All-pass filter

Hi,
I'm looking for a way to compensate for the phase delay caused by crossovers. Crossovers can sum up to a flat frequency response but they introduce a serious phase shift. Bass could easily get delayed form one driver to the other by more than 10ms. Smooth synchronization between a sub and the mids is almost impossible with mainstream designs.

Here are some links to commercial solutions that do this already.
DSP Loudspeaker Phase Arbitrator. Transient Perfect loudspeaker processor
HOLM Acoustics

I'm experimenting with "theSmallDelay" plug-in right now but I feel that an all-pass filter would be the ideal solution for this. An all-pass filter would pass all frequencies flat but will shift the phase at a given point quite like a LR-crossover.
http://www.isip.piconepress.com/proj...es/allpass.gif

Has anybody made an all-pass filter? Can I interest somebody in such a project?
boris81 is offline   Reply With Quote


Old Feb 8, 2010, 09:20 PM   #2
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69
Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!

Ответ: All-pass filter

you could find some allpass implementations in the sources of kx crossovers and "sa.minus" plugins (their Dane part) - they are build solely of allpass filters (there're more - just search here for "allpass").
However it's not that you need whatever allpass filter (there're infinite variety of them) - but a very specific one - having a phase response being opposite to those of crossover filters. And here it gots a bit complecated - simple (mm, let's say... ~1st-8th order) IIR allpass filters (like the one at http://www.isip.piconepress.com/proj...es/allpass.gif) give a phase response similar to crossover filters but what you actually need is the opposite response - which (afair) can be achieved only with higher order IIR or FIR approximations (i'm not 100% sure though - it's been a while i was into that stuff).
Either way here is the tricky part: the DSP code is not a question at all (i'll point to a suitable implementation later) - but you'll need to write some code that will handle corresponding coefficients computations (if you need a tunable filter that could match relatively wide range of crossover implementations) or just do the math once with some filter design tool (if you know exact phase response you need to correct - but i suppose it is not your situation).

edit: sorry for my eng. - i guess i'll make some corrections tomorrow - it's just too late here to turn head on.

edit2:
>Smooth synchronization between a sub and the mids is almost impossible with mainstream designs.

just btw.: "Smooth synchronization" is not possible in real world at all since the bass/mid/high loudspeakers are not in the same point of space - so the distance between loudspeakers and a listener ears is never constant.
I.e. you can tune it perfectly corrected in one position - but move your head by a few millimeters and it all gets broken.

edit3: beside "dedicated" allpass DSP code - you also can get a generic "biquad" filter implementation (you also find several examples of biquad implementations here) to serve as an allpass (it's a matter of biquad coefficients) - it could be easier for a starting point, especially since most of filter design tools and corresponding libraries are made to compute filter coefficients for the "N biquad sections" implementation. (A "dedicated" allpass filter structures are just more efficient in terms of DSP resources - so their usage is more a matter of optimizations at further steps).
__________________

Last edited by Max M.; Feb 8, 2010 at 10:57 PM.
Max M. is offline   Reply With Quote
Old Feb 8, 2010, 10:46 PM Threadstarter Thread Starter   #3
HardwareHeaven Newbie
 
Join Date: Dec 2009
Location: White Plains, NY
Posts: 17
Rep Power: 0
boris81 is on a distinguished road

Re: All-pass filter

Max,

Thanks for the speedy reply! I was fooling myself thinking this could be easy. I'm only familiar with signal processing from the end-user perspective so your explanation was very useful.

I understand that there's not much we can do to remedy the acoustic delay in a multi-driver system, so I was looking into what can be done to the electrical phase shift. I feel that with dsps there's room for improvement over old-style analog crossovers. I'm thinking of a compliment filter to the already existing 4th-LR XO block in KX. Since the slopes are constant, coefficients will only have to be calculated based on the crossover frequency.

The screenshot I posted earlier is from an open source java applet. They seem to calculate the coefficients you mentioned based on user input. I'm gonna have a look at the code and see if I can make sense of it.
http://www.isip.piconepress.com/proj...esign/current/
boris81 is offline   Reply With Quote
Old Feb 8, 2010, 11:26 PM   #4
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69
Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!

Ответ: All-pass filter

>http://www.isip.piconepress.com/proj...esign/current/

unfortunalty - it seems it can compute only those "simple" (particulary second-order) allpass filters i mentioned above. That's not it. I think you could start with searching for some "arbitrary phase response allpass design" keywords (or something like that).
By now i can recall only Matlab library/functions (like this: Filter Design Toolbox - IIR Filter Design Given a Prescribed Group-Delay Demo - this is exactly what you need). But i'm pretty sure other such libraries (or at least some papers with formulae) should be available somewhere out there too.
(Maybe you could use that matlab link to get some keywords for searching. Besides they have a valuable information about this sort of allpass filters there - the Matlab documentation is very handy even wthout Matlab itself . Btw. that "group delay" thing is just another kind of representation of the phase response).

P.S.
Quote:
I understand that there's not much we can do to remedy the acoustic delay in a multi-driver system, so I was looking into what can be done to the electrical phase shift.
Yeah, i'm sorry for my pointless remark (sometimes i just can't stop myself from putting such useless "that's impossible/not in this life/common-myths" remarks... - that's just my sorta destructive mind fluids... well, let's think it was "just in case btw."... whatever... )
__________________

Last edited by Max M.; Feb 9, 2010 at 12:48 AM.
Max M. is offline   Reply With Quote
Old Feb 9, 2010, 12:15 AM   #5
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69
Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!

Ответ: All-pass filter

i found another library (or paper/example-code) here http://www.musicdsp.org/archive.php?classid=3#143 - but the link is dead
edit: Ah, it seems this lib was for FIR filtering only - it won't fit into the DSP (i mean kx's one) anyway. (The order of such FIR filter would be hundred times bigger than the DSP could handle).
__________________

Last edited by Max M.; Feb 9, 2010 at 12:28 AM.
Max M. is offline   Reply With Quote
Old Feb 9, 2010, 01:13 AM Threadstarter Thread Starter   #6
HardwareHeaven Newbie
 
Join Date: Dec 2009
Location: White Plains, NY
Posts: 17
Rep Power: 0
boris81 is on a distinguished road

Re: All-pass filter

Maybe this is a stupid question but isn't the 4th order Linkwitz-Riley crossover made by compounding 2nd order Butterworth LP and HP filters. Would it make sense to tailor an allpass phase canceling filter to pair up with each of the Butterworth filters? Would that be easier and does it make sense?
boris81 is offline   Reply With Quote
Old Feb 9, 2010, 08:18 AM   #7
h/h member-shmember
 
Join Date: Dec 2002
Location: Evil Empire
Posts: 2,639
Rep Power: 69
Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!Max M. is just super!

Ответ: All-pass filter

Quote:
Would it make sense to tailor an allpass phase canceling filter to pair up with each of the Butterworth filters?
Yes, the method is "to tailor an allpass phase canceling filter", but you can't "cancel" the phase of the 2nd order Butterworth (or any other 2nd order LP, HP, BP, AP) with just a second order AP. Much more higher order allpass filter is needed to do this. That's the trick. Hence you need to find a library that will compute the coefficients for such high-order allpass from given parameters (crossover type/frequency or its phase-response/group-delay) or write your own.
(Hehe, if that could be so easy - don't you think we would already have that "cancellation" in kX's crossovers? )
__________________

Last edited by Max M.; Feb 9, 2010 at 03:20 PM.
Max M. is offline   Reply With Quote
Old Feb 9, 2010, 03:48 PM Threadstarter Thread Starter   #8
HardwareHeaven Newbie
 
Join Date: Dec 2009
Location: White Plains, NY
Posts: 17
Rep Power: 0
boris81 is on a distinguished road

Re: All-pass filter

case in point!
i got lots of reading to do.
boris81 is offline   Reply With Quote
Reply

Thread Tools