DSP Filters and slopes?

Douglas R. Allen

Sophomore
Jan 11, 2011
297
15
18
Maine USA
At the risk of sounding silly (again) I have a question about DSPs and filter alignments.
For the most part filters in DSPs copy analog filters. BW,LR,Bis, etc.
Why?
With the processing power available today wouldn't it be better to write the unwanted freq. out of the code?

In the dsp world why not stop freq above and below a set point with code?
At the crossover point as an example of 90hz sub to low-mid.
At the 90 hz subwoofer output when the dsp sees freq. above this it just doesn't pass them.
It gives no 0s or 1s for any freq above 90hz.
Same with 90hz and above in the low mid out. It will make 0s and 1s for 90hz and above but none for 89.99999999hz and below.
Simply write unwanted freq. out of the code. There must be 0s and 1s for every freq. now or is this not how it works?
Or is this something that can't be done?
As its easy to tell I am unsure how the analog to digital back to analog works.
Anyone?
Just pondering.
Thanks;
Douglas R. Allen
 
Re: DSP Filters and slopes?

The problem is doing that sort of thing in (near) real time. Might be something you could on a stored file, though probably there would be some rather interesting side effects.

It might clarify things if you look at the analog circuitry as an analog implementation of certain mathematical functions, and the digital circuity as a digital implementation of those same functions.
 
Re: DSP Filters and slopes?

That isn't quite how digital processing works, but in fact DSP can make filters that are more than simply digital versions of standard analog filters, and speaker guys who are a lot smarter than me, know how to use these different flavor filters to good effect.

However these digital platform control coders are still a little too artistic with their interfaces, so DSP is like this kick ass gun, with a crooked gun sight, so you don't quite know where you're aiming, but if you do hit something you can kill it, digital dead.

JR
 
Re: DSP Filters and slopes?

I'm no expert on this topic, but the general rule is that because DSP working in real time, there is no way to "see" future signal and determine what is coming in and just instantly decide where to put it. Because of this fundamental flaw of physics :)p), any filter will have a penalty in time. We see this in the form of phase shift, and as you increase the slope of a filter, the greater the shift.

Brick wall filters as you describe exist, but they also exhibit the greatest penalty in phase shift. This can be compensated for by aligning the high pass filter with the low pass in time so the phase shift is minimized or negated completely, but you are still left with an overall delay. The lower the frequency of your filter, the greater the delay and the more processing power required.

As a note of interest: 8th order (48dB/oct) filters have been constructed using completely passive parts, but they are terribly complicated and have the greatest insertion loss so they're very uncommon.
 
Re: DSP Filters and slopes?

At the risk of sounding silly (again) I have a question about DSPs and filter alignments.
For the most part filters in DSPs copy analog filters. BW,LR,Bis, etc.
Why?
With the processing power available today wouldn't it be better to write the unwanted freq. out of the code?

In the dsp world why not stop freq above and below a set point with code?
At the crossover point as an example of 90hz sub to low-mid.
At the 90 hz subwoofer output when the dsp sees freq. above this it just doesn't pass them.
It gives no 0s or 1s for any freq above 90hz.
Same with 90hz and above in the low mid out. It will make 0s and 1s for 90hz and above but none for 89.99999999hz and below.
Simply write unwanted freq. out of the code. There must be 0s and 1s for every freq. now or is this not how it works?
Or is this something that can't be done?
As its easy to tell I am unsure how the analog to digital back to analog works.
Anyone?
Just pondering.
Thanks;
Douglas R. Allen

What you are asking has more or less been available since about 1998 in the Lake Contour, which offers brick wall FIR filters with slopes of up to 180 dB/oct.

http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/DLP_LinearPhaseCrossoversWhitePaper.pdf

The filters are implemented using a tapped delay chain. As a result the time needed to implement a crossover is proportional to the period of the crossover frequency. Depending on you application this may or may not be a issue.

http://en.wikipedia.org/wiki/Finite_impulse_response
 
Last edited:
Re: DSP Filters and slopes?

I believe Douglas is not asking about very high order filters, which I think are generally a bad idea sonically (at the very least). He is asking why it is not possible to create a bandpass filter that simply stops passing audio at a certain frequency... not 6dB down, not 180dB/octave, just stops passing audio above a certain frequency. I wish I had a good answer. I "know" it's not practical because if it were someone would have done it, and physics just doesn't start and stop like that. Unfortunately I don't have a really good answer.
 
Re: DSP Filters and slopes?

I recall back in the '70s when I worked at a company doing pitch shifting for restoring the pitch of speeded up talking book tape recordings. One approach investigated by the engineers at bell labs was effectively to capture and re-synthesize the speech at the altered pitch ratio (simply scale the pitch of the frequency components). A good idea on paper perhaps, but not practical, especially 40+ years ago. So even the most sophisticated pitch shifters are variants on sampling and stretching or shrinking those samples to a desired pitch (with gaps or discarded redundant data depending on the direction of pitch shift).

So a similar concept of capture and re-synthesis of the music could arbitrarily delete some single offending frequency component, but the computing power to do this would be serious, and that synthesizer would have to be very very good... So I will never say it couldn't be done, but not practical in my limited understanding of modern technology.

JR
 
Re: DSP Filters and slopes?

What Doug is requesting is available in DSP. This type of filtering is known as FIR filtering (Finite Impulse Response). This basically (gross oversimplification follows) allows one to draw out, or otherwise specify, the shape of the filter response that is desired. The magnitude response does not have to be related to the phase response. The two can be specified separately from each other. This is different from IIR (Infinite Impulse Response) filters that are minimum phase filters. That is to say that the phase response and magnitude response are related to each other via the Hilbert transform. DSP emulation of analog LP & HP filters are IIR filters.

The price to be paid for FIR filters (there is no free lunch) is that there is increasing latency (not phase shift, but broad-band delay) through the filter as the filter frequency decreases. This is a function of the period of the filter frequency (period = 1/freq) so increasing DSP speed cannot shorten this latency.

A 1 kHz crossover frequency may not impose too much latency to be used for live sound applications. However, an 80 Hz crossover frequency may require so much latency that it is not usable for live sound. For playback applications only, this normally should not matter.

A helpful item to remember the difference between IIR & FIR LP & HP filters is as follows.
IIR filters are minimum phase, but combine to yield non-minimum phase system response (first order filters excluded).
FIR filters can be non-minimum phase, but can combine to yield minimum phase system response.
 
Re: DSP Filters and slopes?

What Doug is requesting is available in DSP. This type of filtering is known as FIR filtering (Finite Impulse Response). This basically (gross oversimplification follows) allows one to draw out, or otherwise specify, the shape of the filter response that is desired. The magnitude response does not have to be related to the phase response. The two can be specified separately from each other. This is different from IIR (Infinite Impulse Response) filters that are minimum phase filters. That is to say that the phase response and magnitude response are related to each other via the Hilbert transform. DSP emulation of analog LP & HP filters are IIR filters.

The price to be paid for FIR filters (there is no free lunch) is that there is increasing latency (not phase shift, but broad-band delay) through the filter as the filter frequency decreases. This is a function of the period of the filter frequency (period = 1/freq) so increasing DSP speed cannot shorten this latency.

A 1 kHz crossover frequency may not impose too much latency to be used for live sound applications. However, an 80 Hz crossover frequency may require so much latency that it is not usable for live sound. For playback applications only, this normally should not matter.

A helpful item to remember the difference between IIR & FIR LP & HP filters is as follows.
IIR filters are minimum phase, but combine to yield non-minimum phase system response (first order filters excluded).
FIR filters can be non-minimum phase, but can combine to yield minimum phase system response.

Didn't TOA make the first one that was widely used?
Used a lot in the studio, but also for touring finally. I remember seeing it in one of the rags like MIX.
Stephen St. Croix gave it a great review using it in the studio for impossible fixes.
When I saw it in an AD I knew I had to have one...LOL. This was in the mid 80s I believe.
 
Re: DSP Filters and slopes?

Didn't TOA make the first one that was widely used?
Used a lot in the studio, but also for touring finally. I remember seeing it in one of the rags like MIX.
Stephen St. Croix gave it a great review using it in the studio for impossible fixes.
When I saw it in an AD I knew I had to have one...LOL. This was in the mid 80s I believe.

Yeah, I can remember checking out the TOA stuff ... the Saori in 1988, it was up there with the best ... I don't think it had FIRs ? ...what else did they do ?

JBL used FIR filters ( I think) in the processor for the Array Series … 4892s .. . ES 5200 or what ever it was called. Seem to remember it had a few issues and they replaced with some BSS stuff without the FIR filters.
 
Last edited:
Re: DSP Filters and slopes?

Hey Guys,
don't forget the processor stuff that Albert Lecesse (RIP) at audio analyst's did back at the start of the 80's

cheers,
ferrit
 
Re: DSP Filters and slopes?

Looking at the interesting responses so far it seems what I have in mind is not done at this time.
Although the Fir filters and others have a very steep slope they still have output, although very low, below or above the crossover point. I was thinking more on the lines of 0 output above or below the crossover freq.
No output dropping off below/above the crossover point. Simply no freq at all being reproduced.
Off to google Albert Lecesse.

Thanks;
Douglas R. Allen
 
Re: DSP Filters and slopes?

Looking at the interesting responses so far it seems what I have in mind is not done at this time.
Although the Fir filters and others have a very steep slope they still have output, although very low, below or above the crossover point. I was thinking more on the lines of 0 output above or below the crossover freq.
No output dropping off below/above the crossover point. Simply no freq at all being reproduced.
Off to google Albert Lecesse.

Thanks;
Douglas R. Allen

Douglas,

The perfect rectangular/brickwall low pass filter does exist, and its impulse response is the the sinc function. See the wikipedia article on the sinc filter.

The catch with the sinc filter is that its impulse response is symmetric about time T=0 and mathematically extends to infinity in both the "positive" and "negative" time directions. Finite frequency behavior requiring infinite time behavior is a mathematical consequence of Fourier's work.

Since we can't have negative time in the real world, where stuff ends after it begins, we have to delay the final output to account for the fraction of the impulse response in the negative time direction necessary for the desired filter behavior.

The sinc function is therefore windowed and/or truncated to zero at some finite time length in positive and negative time. The width of this window in the negative time direction sets the necessary amount of total output delay to "fill" the filter in the time domain and make it function. This is where the tradeoff between brick wall behavior, lowest frequency for FIR, and the filter side artifacts (from windowing) comes into play. Its not simply a matter of programming limitations, there is physics in play.

Dan Lavry takes this the other way in his sampling paper, by showing how the reconstructed waveform may be viewed as the summation of sinc functions about each sample point. Here the sinc functions arise as a consequence of the reconstruction filter's theoretically perfect low pass behavior at the Nyquist frequency.
 
Last edited:
Re: DSP Filters and slopes?

Looking at the interesting responses so far it seems what I have in mind is not done at this time.
Although the Fir filters and others have a very steep slope they still have output, although very low, below or above the crossover point. I was thinking more on the lines of 0 output above or below the crossover freq.
No output dropping off below/above the crossover point. Simply no freq at all being reproduced.


Thanks;
Douglas R. Allen


Never mind, Phil makes more sense than what I originally posted...
Thanks for sharing Phil.

I understand what you mean, but Phil's summary explains why it's just not that simple. My conclusions that it's not possible were based on knowing that non-time sensitive studio and mastering apps don't have this function (I'm sure they would if they could). Phil explains the limitations well....
 
Last edited:
Re: DSP Filters and slopes?

Douglas,

The perfect rectangular/brickwall low pass filter does exist, and its impulse response is the the sinc function. See the wikipedia article on the sinc filter.

The catch with the sinc filter is that its impulse response is symmetric about time T=0 and mathematically extends to infinity in both the "positive" and "negative" time directions. Finite frequency behavior requiring infinite time behavior is a mathematical consequence of Fourier's work.

Since we can't have negative time in the real world, where stuff ends after it begins, we have to delay the final output to account for the fraction of the impulse response in the negative time direction necessary for the desired filter behavior.

The sinc function is therefore windowed and/or truncated to zero at some finite time length in positive and negative time. The width of this window in the negative time direction sets the necessary amount of total output delay to "fill" the filter in the time domain and make it function. This is where the tradeoff between brick wall behavior, lowest frequency for FIR, and the filter side artifacts (from windowing) comes into play. Its not simply a matter of programming limitations, there is physics in play.

Dan Lavry takes this the other way in his sampling paper, by showing how the reconstructed waveform may be viewed as the summation of sinc functions about each sample point. Here the sinc functions arise as a consequence of the reconstruction filter's theoretically perfect low pass behavior at the Nyquist frequency.

Thanks for the link on Sinc Filter. A lot of interesting reading and the links in it as well.
Still there must be some way to get this done. Maybe a 180 degree out of phase signal generated from the desired signal then an all pass filter that rotates it 180 degrees in only the band pass needed for output?

Time to do some research.

Thanks
Douglas R. Allen
 
Re: DSP Filters and slopes?

Thanks for the link on Sinc Filter. A lot of interesting reading and the links in it as well.
Still there must be some way to get this done. Maybe a 180 degree out of phase signal generated from the desired signal then an all pass filter that rotates it 180 degrees in only the band pass needed for output?

Well, kind of...
In the end the allpass, if you want its filter slopes steep enough, will be the element requirering a certain lenght of the input signal (frequency dependant!) to calculate the desired result.
There is no way to cheat the math required in digital filters...

Marcus
 
Re: DSP Filters and slopes?

Hi Douglas,
Take a look at Phil's very good explanation. Even is a filter with 180° phase shift was used to cancel a portion of the bandwidth of a signal, this filter must still have a transition region (roll-off) between its pass band and its stop band.

Physics dictates that the more narrow something is in the frequency domain, the more broad it must be in the time domain (and vice-versa). This means that a true brick wall filter cut off (0 Hz transition region), about which you originally inquired, would require infinite time to process. Classical uncertainty principle at work; deltaT = 1 / deltaF.
 
Re: DSP Filters and slopes?

Hi Peter,
The FIR was its "Thing" from what I recall.
On the other hand it most likely used IIR for live applications and left the FIR function in the road case.

As I recall one of the fixes that it was used for was a very narrow ring at or above 10kHz in some studio tracks.
He used an extremely narrow and deep FIR filter without disturbing the SPL or phase or even worse have the fix introduce its own "ring" which IIR are known to create if you try to make the filter too steep.

Years after it was introduced I talked to a guy who used it for an overseas tour.
He said it was too noisy. My guess is he had little experience with Digital xovers.
Can't blame him for that. There were few around.
You have to be very careful you don't cut down its output inside the device and lose dynamic range as you head toward the noise floor.

Lots of DIY home audio types use the Behringer 2496. When they get to the the outputs they turn the gain in the DSP rather than turn down the the amp inputs and can not figure out why it is so noisy. Of course you have the added problem of going from Pro level to Home Audio level.
 
Last edited: