Are digital x-overs flawed??

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

But now I think I know what you really meant. And.... I don't know! It might be the same, but something tells me it isn't somehow. For one, I don't think PWM is a random thing - but I'm not well versed in PWM. I'll have to think about it a little more (unless someone else has the answer?) and try and see what's what.

Youre correct when you say that PWM isnt random by definition. (Pulse-Width-Modulation)
But just as you certainly understood i meant the idea behind pwm "if it is on and of for a certain time you get a value inbetween"
The difference between a long fixed pulse and a random set of pulses would be the spread of energy over the spectrum.(I just realised that)



Hmm, that's tricky. I don't think there's any direct comparison that can be made, because the mechanisms that produce the distortions in digital and analogue systems are so different. I could be wrong. I have some measurements of a digital attenuator, both dithered and undithered, to help show my general points made thus far.

Thanks! You seem to be correct when you called it noise instead of distortion...
However, i found some articles about dithering and distortion and from what i could get out of them then the level of noise generated is roughly the same as the level the harmonic distortion should have had if it wasnt dithered. Is that correct?
http://www.hifi-writer.com/he/dvdaudio/dither.htm
If so, then it is just a different but much less intrusive distortion in the shape of noise.

Another question that showed up in that article was how much effect it would have on the signal if the signal wasnt easy divided with the samplingrate, he mentions in the beginning why he choose 980hz (I use 980 hertz here rather than 1,000 simply because 1,000 does not divide evenly into 44,100, and when you start manipulating the signal it generates all sorts of spurious noises.)
-But i think by looking at your pictures that you didnt correlare to the samplingfrequency so that question is answered.

My next question is ofcourse....
How can a signal that is close, but not too close (2/3?), to the nyquistfrequency be regenerated in the DA again?
-This must be the second most common questionmark after the obvious quantisationquestion. :D



This is an FFT measurement of a sine wave generated to a very high precision at -12dBFS, and dithered to 24-bit.

I would really love to play with a program like this...
Is it possible to download that somewhere???
 
AX tech editor
Joined 2002
Paid Member
electroaudio said:
[snip]My next question is ofcourse....
How can a signal that is close, but not too close (2/3?), to the nyquistfrequency be regenerated in the DA again?[snip]


It isn't. It's 'regenerated' in the filtering post DAC. Many people forget that the anti-aliasing filters before an ADC and after a DAC are part of the process and absolutely required. A 20kHz sinusoidal signal without post-DAC filtering would not even be recognizeable; the DAC steps add a lot of harmonics that mess up the waveform. BUT, the filtering is dimensioned to take out those harmonics and what remains is... the sine wave! Neat, huh ? ;)

Jan Didden
 
Youre correct when you say that PWM isnt random by definition. (Pulse-Width-Modulation)
But just as you certainly understood i meant the idea behind pwm "if it is on and of for a certain time you get a value inbetween"
The difference between a long fixed pulse and a random set of pulses would be the spread of energy over the spectrum.(I just realised that)

You're reminding me of discussions I used to have with my roomate. One person would try to make a distinction between two concepts, the other would try to find the similarities. It would be problematic because both persons would drive their points repeatedly to the other as if to force them to concede.

The fact is, however, Wingfeather already acknowledged that similarity.
When he wrote:
It's similar to PWM in that things average out over time to some intermediate value. But the similarity really stops there as far as I know. There are many ways to perform the modulation in a PWM system, and they all have their tradeoffs. Dither isn't like that.

I found the wikipedia article on dithering, specifically on the audio section to be helpful. Highly recommend you check it out. Another way to think of it is to treat it as a technique to remove artifacts generated when trying to express high detail in a resolution that is lower than necessary to represent it properly. In video processing like in video games, its a anti-aliasing technique to remove the strange patterns you see when viewing a detailed texture at an extreme angle.

Anyways, I appreciate the contribution Wingfeather made. Now I am very curious to what his audio setup is. (In all its glory details) I'm trying to build a complicated digital system myself so I think his wisdom would be put to good use. He already changed the way I thought how I should implement attenuation. Instead of using a passive attenuator, just engineer the problems with noise floor away by properly matching it with your system. (Make the noise floor level lower than the sum of the rest of the chain). Thats at least $300 dollars worth of components I won't have to spend right there. :)
 
TNT said:


Why is that?

Because ringing is directly proportional to steepness. It's not so much an issue with post-DAC reconstruction filters, because the ringing is never stimulated by the band-limited signal (you'd better hope it's band-limited, otherwise you'll get aliasing!), but for crossovers the game changes, since you're operating with audio which will stimulate the filter's transient response issues.

Imagine an extremely steep 2 kHz low pass filter (LPF) to your mid, handing off to an equally steep high pass filter (HPF) to your tweeter: if the drivers are aligned and the filters are symmetrical, the ringing of the LPF exactly cancels out the ringing of the HPF and you get the original signal. Things change if you're off-axis, or the speakers aren't exactly aligned: the ringing no longer cancels, and under certain conditions it can actually increase over the level present in a single filter. This behaviour could manifest itself as harshness or even whistling with some program material.

I use filters with relatively gentle slopes to get around that problem. There's a bit more overlap at the crossover frequency, and a bit more lobing over a half-octave, but the lobing is relatively innocuous (less than 1 dB) and the filters are 90 dB down an octave away from the crossover point anyway. I can live with that.
 
SY said:
Of course with DSP, another wayl to get away from the ringing issue is by phase-precorrecting the data before conversion, since one knows the phase response of the antialiasing and anti-imaging filters.

You can still get ringing with linear-phase FIRs; it's in the nature of the beast if the slopes are steep enough. Messing with the phase will only change the phase of the ringing, but not reduce its amplitude.

http://en.wikipedia.org/wiki/Gibbs_phenomenon
 
And the different between linear phase FIR and minimum phase/maximum phase is?

FIR filters can approximate the slope of IIR filters?

What does one use to generate the coefficients for an FIR filter that is approximating say a 12db/24db Linkwitz Riley filter.?

How many taps is needed for 44.1khz source material to sound good?

Is it silly to combine and IIR filter with and FIR one? For example, use the IIR to generate the basic filter slope and use the FIR to correct (DRC) what the IIR one did?
 
Daveis said:
And the different between linear phase FIR and minimum phase/maximum phase is?

FIR filters can approximate the slope of IIR filters?

What does one use to generate the coefficients for an FIR filter that is approximating say a 12db/24db Linkwitz Riley filter.?

How many taps is needed for 44.1khz source material to sound good?

Is it silly to combine and IIR filter with and FIR one? For example, use the IIR to generate the basic filter slope and use the FIR to correct (DRC) what the IIR one did?

I'll answer the questions in order:

1) IIR stands for Infinite Impulse Response. These are filters with feedback to generate the denominator term in the polynomial of the transfer function. Since these polynomials can be generated from analog transfer functions, IIRs can map onto analog transfer functions quite well (there are some slight non-ideal effects, but for the most part you can ignore them). The Behringer DCX2496 uses IIRs in the crossovers.

FIR stands for Finite Impulse Response. These filters have no feedback; the output is generated by the sum of a series of delays multiplied by filter coefficients. The time response ends after the signal goes through all the delays. You can find these in sample rate converters, including oversampling DACs.

For a given transfer function approximation, IIRs take fewer compute cycles than FIRs. You don't get something for nothing: IIRs are more sensitive to coefficient quantization (not an issue for our work), and the noise floor can be much higher, than FIRs.

2) FIRs can approximate any response you want, but that's not the ideal use. It's like using a Lamborghini to tow a boat - you're better off with a pickup truck.

3) I wouldn't do it. There are perfectly good filter CAD programs which would give you IIR coefficients to do what you want. Or you could buy the aforementioned Behringer crossover.

4) That's an interesting approach, but once again I wouldn't do it. Once you have a FIR long enough to correct a driver across its range, you're awfully close to having the number of taps necessary to build a crossover as well. You can go for phase-wrapping filters like 4th order IIRs, or use the same number of cycles to calculate a slightly longer FIR to give you a spiffy linear-phase crossover. I heard some pretty good fullranges at Burning Amp, and I'm halfway convinced their realism on transients was due to a lack of crossovers. Ian McNeill showed off his three way with FIR crossovers/DRC, and it had a lot of the outstanding transient qualities of the fullranges. Marimbas, voice, and especially vibraphones were most revealing on this.
 
TNT said:



Why is that?

:D

An ideal lowpass filter has pre-ringing. The complemantary ideal high-pass filter also has pre-ringing of opposite sign so in the sum of the two signals, the ringings cancel and the result is an impulse (if we look at the impulse response).

Perfect, one might think. Until one realizes that the signals are affected by the driver's responses, and possibly even more important, the delay to the drivers is different in different directions. This will result in that the cancelation of pre- (and post-) ringing will not be perfect. This sounds horrible.

I wrote a little simulation of the addition of the two branches where one can add a small delay in one of the channels. A delay of one single sample at 44100 Hz sampling rate (which corresponds to 8 mm added pathway) is clearly audible.

Try it if you wish:
http://www.tolvan.com/idealcrosssim.exe
 
Jitter is an oft mishandled and misunderstood influence in digital systems. I have found, with nearly perfect jitter control, ie incredibly low jitter clocking, with wide spectrum low jitter..that even a lowly 44.1/16 system can be mistaken for an analog LP, even by 'old hand' audiophiles. I have tested this on my Audio system and that of my business partner's many a time. He has access to my clocking designs, of course. IT shows that the idea of lower sampling rates still being able to represent complex harmonics to be true-but only to a certain point.

The clocking is so good, that you can easily hear that nearly 'perfect' ramp of loss in harmonic complexity and richer content..as you scale up through the different frequencies of given notes produced. In a 44.1/16 system, it starts at around 1.5khz..and slowly goes 'fuzzy', in a linear ramp up to the highest frequencies produced in that system. Easily discernible. Of course, an incredibly good clock is necessary to hear this. Many of you may not have had opportunity to realize this point, as excellent wide spectrum low jitter clocks are not all as abundant as one would like or think. Therefore, it can sit as a very unrealized point, as the haze in your digital system has not been lifted yet, so you can eventually make that given connection. :)

Once again, I hope to mention, and hope to be heard, that clocking accuracy is VITAL to digital crossovers. Brutally so. As well as high sampling rates..and high levels of bit depth during any mathematical transforms. The DEQX and the Behringer have one, but not the other. Same goes for every other digital crossover I am aware of. I know little about the PCXO type systems at 192khz. But that will change soon. I'll likely try and go to 'digital out' on such a system, and re-clock at outboard DACs, for each frequency group. (mid/low/high)

In this sad world of digital, these days..few know the pleasures of sonic purity and 'phase truth' that a good analog system bring to the table, and thus, can have little understanding of how far a given digital system still has to go, in order to compete with the best that analog can do, and does do. It is the law of diminishing returns on this one, as well. It is no-less than an attempt to head toward the 'infinite' characteristic of 'pure analog', and where do you draw the lime? I would submit: at the limit of current digital design, always striving for higher sample rates and more correct cranial attacks on what exactly is required to get this done correctly.

Knowing the exact issues at hand is critical.
 

TNT

Member
Joined 2003
Paid Member
Tnxs but I'm ona Mac!

/j

Svante said:


:D

An ideal lowpass filter has pre-ringing. The complemantary ideal high-pass filter also has pre-ringing of opposite sign so in the sum of the two signals, the ringings cancel and the result is an impulse (if we look at the impulse response).

Perfect, one might think. Until one realizes that the signals are affected by the driver's responses, and possibly even more important, the delay to the drivers is different in different directions. This will result in that the cancelation of pre- (and post-) ringing will not be perfect. This sounds horrible.

I wrote a little simulation of the addition of the two branches where one can add a small delay in one of the channels. A delay of one single sample at 44100 Hz sampling rate (which corresponds to 8 mm added pathway) is clearly audible.

Try it if you wish:
http://www.tolvan.com/idealcrosssim.exe
 
KBK said:
...IT shows that the idea of lower sampling rates still being able to represent complex harmonics to be true-but only to a certain point.

The clocking is so good, that you can easily hear that nearly 'perfect' ramp of loss in harmonic complexity and richer content..as you scale up through the different frequencies of given notes produced. In a 44.1/16 system, it starts at around 1.5khz..and slowly goes 'fuzzy', in a linear ramp up to the highest frequencies produced in that system.


...As well as high sampling rates...

...what exactly is required to get this done correctly.

Knowing the exact issues at hand is critical.


Could you please explain how and why that fuzzy sound appear?
-On other words: why it doesnt work as it should....
 
Originally posted by electroaudio
I would really love to play with a program like this...

Sadly, I'm afraid not. What you're looking at are graphs made by the control software for a Prism DScope III analyser. A fine bit of kit, and I much prefer the software to the Audio Precision stuff I was also using. The data itself was captured by the DScope (which retails at a whopping ~£7k IIRC), measuring a PC with a digital sound card, running DSP software I wrote. The sine waves you see in the plots were generated by the instrument, sent through the PC, and then analysed.


Originally posted by Hara
Now I am very curious to what his audio setup is. (In all its glory details)


My setup isn't particularly special. I'm using a dedicated PC-based digital XO with a Lynx2B sound card in it (my audio source is another computer with a Lynx AES16 in it), 3 Behringer A500 power amps :)D), into some 3-ways I built based on the Seas Millennium tweeter, the Seas Excel W18EX001 mid and 2 Seas CA18REX woofers per channel. The woofers are mounted sideways as an opposing push-push pair. I'm very happy with the speakers (but do have ideas for next time!), although I never finished the cabinets properly - they're quite ugly! Maybe one day...

As for software, I'm in between two solutions - a set of VST plugins that I've written and host in Bidule, and a standalone crossover application that I wrote based on Portaudio. They are largely equivalent to each other, although since I'm nothing even resembling a Windows programmer the VST solution is certainly more user-friendly.
I use linear-phase FIR crossovers, around 200 taps in length, to cross between the mids and the tweeters (2200Hz), and LR4 filters to cross between the mids and woofers (200Hz). Both mids and woofers are Linkwitz Transformed down to 20Hz, which I think works very well. While this does require oodles of gain - especially for the mid - which could cause problems with input noise being boosted, in conjunction with the crossover filters the system noise in the digital domain is actually very low.
I add a smidgen of delay to time-align the tweeter and the mids a little better and try to center their main lobe as much as possible. I also align the outputs of the FIR crossover with that of the IIR crossover with some delay. Total system delay is low, though (~5ms) so it's fine for music and movies.

What I'm just starting to work on is a standalone hardware solution for it all based on an FPGA and some TI DACs. But it's very early days as far as that's concerned. I have little experience with FPGAs and it's a learning project as much as anything. Don't expect any news for a good long while!
 
Originally posted by Daveis
Would an FIR filter and a IIR filter with the same 24db/octave slope sound different? and why?

Assuming they're both properly implemented, they'll sound much the same. However, the important difference is that when you say a 24dB/octave slope you're essentially referring to a filter that has an impulse response of infinite length (analogue filters are like this). An IIR filter can implement this filter slope exactly (barring slight frequency response aberrations due to transforming into the digital domain - ignore this for now), because the structure of it is very similar to its analogue counterpart.
An FIR filter works by using the impulse response of the desired filter as its coefficients. When the impulse response is of infinite length, this poses an obvious problem - the filter won't be implementable because it'll require an infinite number of coefficients. And even if it were implementable it would have an infinite delay. The easiest way to get this thing working is to simply use as much of the impulse response as you need to get you close to the 24dB/octave response you started with. This can usually be done with a reasonable number of taps - depending on the specific filter specification - and so can be implemented. The frequency response won't be exactly what it should be, since you're not using the whole impulse response. But it can be made close.

One very interesting option for crossovers is to use IIR and FIR filters together to produce the rolloff characteristic of an analogue filter, but with linear phase - and in a very computationally efficient manner.
The way to do it is quite simple:

- First, design an IIR filter with the square root of the magnitude response that you desire. So, if you want an LR4 filter overall you design a 2nd-order Butterworth.
- Second, generate or even record the impulse response of this filter (in MATLAB, perhaps), truncate it to a reasonable length so that it still works well, and use these coefficients in an FIR filter.
- Third, take the coefficients of the new FIR filter and reverse them - first becomes last, and so on.
- Finally, cascade the IIR and the FIR filter.

What you will get is both magnitude responses summing with each other to get the LR4 filter, and the phase responses (which are approximately equal and opposite) cancelling out. This gets you an analogue rolloff characteristic but with very nearly linear-phase, and all with half the number of FIR taps (a big saving) as you would need to implement the entire filter as an FIR to the same degree of accuracy in the first place. A nice result.
 
Disabled Account
Joined 2006
Because ringing is directly proportional to steepness.
Ringing is hardly audible. A while back Stereophile had a very detailed comparison of various DAC oversampling filters, and they claimed essentially no audible difference between filters with no preringing and those with a moderate amount of preringing (such as the linear phase ones they tested). Only maximum phase ones with huge amount of preringing were audible.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.