'LGT' Construction Diary

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
hi m0tion,

Yeah, that thread was actually this one - just much earlier on. My experiments with all this stuff has come on a ways since then.

I originally wrote a standalone application based on Portaudio (www.portaudio.com) to run my speaker crossovers. This works well, but is a pain to set up and isn't very tweak friendly.
To help with prototyping I've also written a set of VST plugins which are much more tweakable. I use them in Bidule but any VST host should work.
I have:
- A biquad plugin implementing a cascade of five biquad filters. This will design a variety of filters for you based on parameters.
- An FIR filter plugin implementing FIR filters in direct form. This plugin takes FIR coefficients from a text file.
- An FIR Crossover plugin which will output the product of a normal FIR filter, plus the complement of this output (provided the filter kernel is of odd length and is linear-phase). This guarantees you a pair of outputs which add up to unity magnitude.
- Multichannel gain/delay options for lining up different outputs and gain level matching.

An important point to me (this was talked about in the earlier posts) was to pay special attention to quantization noise and the correct use of dither. To this end, all of the DSP code I've written runs in fixed-point format, with every quantization stage being TPDF-dithered. This means that the processing introduces zero distortion into the signal. Quantization noise is something that almost everyone else in the PC-based audio world (and indeed the embedded hardware world) appears to ignore - they just use floating-point arithmetic and assume it's okay. In many cases this assumption is wrong.

Each of the plugins provides dithered 24-bit performance. No distortion.

As for crossover methodology, it's as I said in my last post:
- Flatten drive units using minimum-phase correction. A Linkwitz Transform will take care of the LF rolloff, and gentle shelf or notch filters can take care of any sweeping response deviations. Done properly, the individual drive units will have a zero-phase response within the bandwidth of the correction.
- Apply a linear-phase FIR crossover (say, 150-taps at 44kHz) between the mid and the tweeter. This provides plenty of rolloff, and time-domain effects can be made less than 1ms with this length of filter.
- Apply an LR4 or LR6 crossover between the mid/woofer and woofer/sub. Linkwitz Riley crossover outputs are always in phase with each other and do a very nice overall job. While not linear-phase, the benefits of that are not really known and the overall phase at the listening position is likely dominated by room effects at these frequencies anyway.

This is the system I'm currently using and I think it works beautifully. The driver equalization was done based on swept-sine measurements taken in an anechoic chamber using a B&K mic/preamp and an Audio Precision analayzer. Of course, that isn't kit that the average Joe has lying around and its use helped me an awful lot. Getting good measurements is always a problem.

My room is quite forgiving and I haven't really taken it into account. Further processing would of course be needed to do anything with the room. However, unless you have honking great room problems it must at least be worth giving the system a try without any correction. It's worth bearing in mind that proper acoustic treatment of a room (i.e. bass traps) is better than any electronic equalization could ever hope to be. With the kinds of money people are spending on their systems it might be an idea to budget in some treatment.
 
Wingfeather said:
Yeah, that thread was actually this one - just much earlier on. My experiments with all this stuff has come on a ways since then.

Hi Wingfeather,

I remember that post - very interesting too.

Are you planning on doing anything more with your work (i.e. going beyond using it in your own rooms)? I'm thinking on the lines of a public software release, or maybe even some hardware if you have/know people who have the skills to make such kit.


Wingfeather said:
It's worth bearing in mind that proper acoustic treatment of a room (i.e. bass traps) is better than any electronic equalization could ever hope to be. With the kinds of money people are spending on their systems it might be an idea to budget in some treatment.

I wouldn't claim to be any sort of expert on this, but from my experience of doing a little EQ, and playing with quite a lot of room treatment, I'd agree completely with the above.

There are a couple of interesting articles here:

http://www.realtraps.com/eq-traps.htm
http://www.realtraps.com/art_audyssey.htm
 
Hi Sploo,

I am definitely thinking of releasing the plugins. They're not quite ready for prime-time yet, but I could probably arrange for some kind of uber-pre-alpha type release in the near future if people want them. They're not the prettiest but they're stable and they do the job very well. Show of hands from anyone who'd be interested?

I'll probably release the source code eventually, but I want to wait until I'm happier with it before I do that.

If I one day manage to turn the portaudio application into something that someone else would actually like to use, then I'll release that too. I have all sorts of funky feature ideas floating around my head, like controlling it over a network (perhaps write some kind of java application for a smartphone to control it with?), plus a fancy GUI, thermal protection and the like. There's a lot that could be done with it.

Making a hardware solution would be enormous fun, but I'm not in that place yet (with either hardware design skills or embedded DSP coding knowledge), nor do I have the huge amounts of free time it would require right now. But this is definitely in my medium-to-long-term plans. There are also a few things you can do in dedicated hardware that are difficult or impossible to do on the PC, such as precision upsampling (not using those nasty SRC chips), combination analogue/digital volume control and pretty VFD displays.

Having to have a PC sat on your desk just doing your speaker crossovers is a bulky option indeed. But for now it does 99% of the important stuff and there's more than enough to be going on with with it. :)

Thanks
 
diyAudio Member
Joined 2004
Wing Feather have you looked at "Acourate"? I understand what your saying but I think my post that led to your response was a little outdated and misleading.

For the time being I use Acourate to generate and manipulate my filters.

Have a gander at this brief whitepaper for modus operandi:

http://www.acourate.com/XOWhitePaper.doc

BTW It sounds like nice work on the software you've written. Congrats.
 
diyAudio Member
Joined 2004
Wingfeather said:
My room is quite forgiving and I haven't really taken it into account. Further processing would of course be needed to do anything with the room. However, unless you have honking great room problems it must at least be worth giving the system a try without any correction. It's worth bearing in mind that proper acoustic treatment of a room (i.e. bass traps) is better than any electronic equalization could ever hope to be. With the kinds of money people are spending on their systems it might be an idea to budget in some treatment.

Proper bass traps are huge:

Advanced Acoustics MAXXX Trap
Dimensions: 90cm x 60cm x 60cm

Auralex Venus
Dimensions: 120cm x 60cm x 30cm

Combine multiples of these treatments and you soon start to loose real estate and create an ugly mess. This makes it extremely unattractive to the average person who wants to add treatments to their room. Tacking these treatments onto your lounge walls or an existing listening room just looks cheap, overbearing and hideous - I know I've tried it :D
IMO attractive, effective and unobtrusive bass treatments must be engineered into a room thats built from the ground up. That's if you want the room to still look like a room. A good example is Mike Lavigne' room:

http://www.positive-feedback.com/Issue16/lavigneroom.htm

So there's clearly a place for electronic EQ. Its not as effective but its another one of those compromises and is better than nothing.

The middle ground is EQ on the low end and discrete treatment for the 800hz+ range. Most listening rooms will stand to that and sound better for it.
 
diyAudio Member
Joined 2004
Not far to go now:

tism154.jpg
 
I use four 4ft x 2ft bass traps and EQ in the bass range. Basically, do what you can with room treatments and clean up the rest with EQ.

That dedicated room is huge! :eek: I often think even if I did have unlimited resources I wouldn't build a huge listening room. I mean I'd have quite a large one (no pun!), but not massive. I can already get extremely impressive results in a small room so I think I would just scale it up for a bit of a bigger soundstage and leave it at that.
 
Shinobiwan,

First of all, those pics are starting to look really exciting now :) It's going to be like Christmas morning when you get to fire these babies up properly for the first time!

Second of all, I do agree on your comments about room treatment. They're large and also quite expensive. There's no denying that. I guess I was just musing. In an ideal world and all that!


I read that white paper you linked me to - thanks for that - and there appear to be a couple of mistakes in it. It may be that I'm missing something - if anyone else wants to comment I'd welcome the discussion.


- Take figure 7 on Page 6. There he shows that the outputs from two sets of complementary Butterworth filters (with cutoffs at 150Hz and 3500Hz) do not sum to unity but produce large dips. I can't see any way that graph can be true.

To work out if this is true, let's just take one of these crossover filters. It is well known (and easy to demonstrate in MATLAB or similar) that second-order Butterworth filters like these will be 180 degrees out of phase all the time. Add them up directly and you get an enormous dip at the crossover frequency. Second-order filters like these are common in speaker crossovers and the trick that everyone uses is to invert one of the outputs. This gives you a pair of outputs which are now in-phase at all frequencies. If you use Butterworth filters, you end up with a 3dB hump at the crossover frequency since the two filters are each only 3dB down there.
The salient point with Linkwitz Riley filters (the fourth-order version of which is equivalent to two Butterworths in cascade) is that they're in-phase all the time but they meet at their -6dB point. The result is that they sum to unity magnitude at all frequencies.

You also don't get his result if you consider both pairs of filters interacting with each other. The 3500Hz lowpass filter creates a phase shift of only ~3 degrees at 150Hz, which has no practical effect on the 150Hz crossover.

The graph on page 6 simply cannot be describing what he says it is! The individual filter slopes aren't even correct because they are meeting each other at -6dB! Butterworths don't do that. The real situation is that the Butterworths sum relatively nicely if you invert one of the outputs (albeit with that 3dB hump) and an Linkwitz Riley would sum perfectly.

- Moving on to page 10, just under figure 13, talking about linear-phase filters:

The three crossovers add to a Dirac pulse and thus the step response shows the behaviour that we wish. Please note that the lowpass shows an overshoot. But it is compensated by the bandpass. And this is valid at any time. The filters compensate each other so that the sum is perfect.

What he has said is true in the domain of the original signals. If you add these outputs together mathematically you do get a perfect result. However, in a speaker system these outputs aren't being added together like that, they're being added together in the air after they've come out of the drive units. Since the drive units are not in exactly the same physical position as each other, the acoustic sum doesn't happen as nicely as he is suggesting and these time-domain effects aren't nulled out. The amount that gets through is dependent on where you are in the room and what angle you make to the speaker. Imagine how this affects the sound-field in the room - with different angles having different amounts of "nasties"-cancellation. It starts to look complicated.


Those are the two main points in his paper that I take issue with. And they seem quite fundamental, too :confused:

There is of course the problem that the man in question has a doctorate and has put together a very substantial-looking piece of software - and I'm.. well.. who am I?
But if anybody can tell me what I've missed in his explanation, or find any resource on the web (or otherwise) that shows that minimum-phase filters add up like the paper says, I'll be very interested to see it.
 
diyAudio Member
Joined 2004
Wingfeather said:
I read that white paper you linked me to - thanks for that - and there appear to be a couple of mistakes in it. It may be that I'm missing something - if anyone else wants to comment I'd welcome the discussion.

Rather than me or other folks second guess Uli may I suggest you mail him first:

uli.brueggemann@gmail.com

I've pointed him here and he's a member so hopefully he'll reply.

- Moving on to page 10, just under figure 13, talking about linear-phase filters:

What he has said is true in the domain of the original signals. If you add these outputs together mathematically you do get a perfect result. However, in a speaker system these outputs aren't being added together like that, they're being added together in the air after they've come out of the drive units. Since the drive units are not in exactly the same physical position as each other, the acoustic sum doesn't happen as nicely as he is suggesting and these time-domain effects aren't nulled out. The amount that gets through is dependent on where you are in the room and what angle you make to the speaker. Imagine how this affects the sound-field in the room - with different angles having different amounts of "nasties"-cancellation. It starts to look complicated.

What your talking about is absolutely no different for any crossover type. Forget FIR vs. IIR / linear vs. min. phase. Once in the acoustic domain all bets are off.

Having said that those examples he used for Butterworth are similarly based in the electrical/arithmetic rather than acoustic domain. The point he was illustrating was that of a perfect Dirac pulse response of the FIR based crossover.

BTW There's also a disclaimer that states the graphs assume perfect driver and enclosure behaviour.
 
Thanks Shin, I might take you up on that email address.

What your talking about is absolutely no different for any crossover type. Forget FIR vs. IIR / linear vs. min. phase. Once in the acoustic domain all bets are off.

Well, of course - you're absolutely right. But with conventional IIR filters or short FIR filters the raw output you get from each of the filters is basically correct. You will get lobing from any crossover, and this is well understood and can be readily modeled. The lobing causes amplitude response deviations as you move around the speaker, which is regrettable but is still a linear form of distortion.
Long FIR filters on the other hand can introduce quite serious time-domain distortion. Dr. Brueggemann is saying these effects are irrelevant because they cancel out - it was in fact one of his major plus-points about the FIR filters in that paper.
My point was that they don't cancel perfectly and so these effects can't simply be disregarded as is being suggested - they will lobe just like everything else.

Don't get me wrong, I'm a big proponent of linear-phase filters. I use them in my own system. But this point is their one big drawback and I think that glossing over it might be a big mistake. I think care should be taken to minimize the time-domain problems rather than relying on questionable cancellation to make everything okay.


Back to the Butterworth examples - my comments on them were based purely on theoretical Butterworth filters also - no drive units or anything. The simple fact is that those curves are not second-order Butterworth filters.

Thanks
 
Hello,

may I add my comments on this discussion?

If the Butterworth filter is not of type Butterworth then please claim this to the Adobe people. I have used Audition to generate the filters for this example.

I agree for the point that in practice we do not add crossover filters only but also the drivers. They follow of course a minphase behaviour. But what is the result of it ?

1. if the crossovers do not add up perfectly: do they add up when the minphase drivers are included?
2. if you follow the driver linearization tutorial then you will find a linearization procedure that simply tries to get exactly the desired behaviour of both driver and crossover, which is described by the ideal crossover.
3. you will also find some information about time alignment. Typically I adjust the arrival of the driver signals at the listening position so that they match perfectly. Under this situation e.g. corner woofers work very well.

We all know that in practice we always have deviations to the ideal situation. But the question is how cloase can we get to this. The whitepaper simply likes to show that with standard passive minphase crossover this is not possible. It also tries to show some other approach to this. And it has been proven to work!

Best

Uli
 
Hi Uli,

may I add my comments on this discussion?

Absolutely!

I agree for the point that in practice we do not add crossover filters only but also the drivers. They follow of course a minphase behaviour. But what is the result of it ?

Well this is the beauty of it. An important fact about the definition of minimum phase is that if a frequency region has flat amplitude response then it also has no or very little phase shift at all. If you equalize your drive units flat to far beyond your crossover point with minimum-phase filters, then what you are left with is a driver that is effectively zero phase in its passband.
The Linkwitz Transform is an example of this. It's well known that the LF response of a driver in a sealed box is dominated by a pair of poles in its transfer function. What you're doing when you use the LT is placing zeros on top of these poles, cancelling out their effects in every way (amplitude, phase, you name it). Since you can't (in a real system, anyway) equalize the driver flat for the entire audible range you just choose a new frequency that is far enough beyond your crossover point to not matter anymore and put some new poles in there. What you're left with is a drive unit that behaves very close to perfectly in the frequency range of interest.
The real beauty of this approach is that you're not "adding some gain in just the right place to compensate for a dip in the drivers' response" or something similar. It doesn't feel like "correction" so much as fundamentally redefining the system. In mathematical terms the outcome is exactly equivalent in all ways to having a drive unit/box combo with a better transfer function than you really do. Using an FIR to achieve this kind of correction is much more like papering over the cracks.

Applying this minimum-phase correction prior to any kind of crossover is what I was recommending. If you do this then you basically only have the transfer functions of the crossover filters to worry about - the drivers' own responses play no real part anymore. That simplifies the design process no-end.

If the Butterworth filter is not of type Butterworth then please claim this to the Adobe people

I absolutely 100% promise that the graph in your paper is not showing how Butterworth filters add up. I can produce graphs in MATLAB to show how they really look but I don't have anywhere to host them. What I'd also really like to show is the behaviour of LR4 filters - these (minimum-phase) filters do just about everything right. The only thing they don't do is produce a linear-phase response. This will make the impulse response of the summed LR4 filters look imperfect because the various frequency components of the impulse are not in phase with each other when they leave the filter. However, this kind of distortion is widely believed to be totally inaudible since our hearing system cannot detect absolute phase.

The whitepaper simply likes to show that with standard passive minphase crossover this is not possible. It also tries to show some other approach to this. And it has been proven to work!

My point here is that it is possible to get very close to ideal with minimum-phase filters - active or passive. Perhaps even closer to ideal than is possible with FIR filters alone. I don't want it to seem like I'm slamming your approach, because it's clearly a very clever solution (the implementation of which must have been a nightmare!) and I'm sure it works well in many ways. It also lends itself very nicely to automation in ways that what I'm suggesting does not. I just think your white paper was misleading about what can and can't be done with "conventional" crossovers and about the effectiveness of your software's approach to the problem.
 
Hi M0tion,

Jost looks pretty funky. On the face of it it looks very similar to what I'm using under Windows - Bidule. It's a great little program. Modular hosts are brilliant for stuff like speaker crossovers.
I've written my plugins using only the VST SDK and VSTUI components, so there's no real reason they shouldn't work under Linux. That said, I don't have a Linux box and won't be able to test them. Do you know if it's possible to compile for Linux from under Windows? I'll have a look around for something like that.

I do agree that Linux definitely seems to have some advantages over Windows for stuff like this - provided you have the time to write some code. If you have that time then you could make a Linux box do just about anything! You could produce something quite special.
I've been wanting to take the Linux plunge for a while now but it never seems to happen. I'm sure one day the incentive I need will pop up out of nowhere :)
 
Shortly? It's been hours! I for one am on tenterhooks here. Put me out of my misery!


M0tion,
Apparently Cygwin is a viable option for compiling things for Linux under Windows. I'll look into that. But I'll need a little time to get them into some sort of releaseable shape. I'll see what I can get done over this long weekend and let you know.
 
diyAudio Member
Joined 2004
Et voila :)

The baffles and the tweeter cabinet all need sanding and buffing so thats why the gloss looks a little poor and the baffles themselves aren't quite correctly lined up as they're missing the damping that fits between them and the enclosures but other than that they just need the drivers and that'll be one done.

Enjoy the pics, they've been a long time coming ;)

An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.


An externally hosted image should be here but it was not working when we last tested it.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.