DSPRelated.com
Forums

Linear phase vs Min. Phase

Started by Max October 18, 2014
On Sat, 18 Oct 2014 09:34:57 -0400, Max <Max@sorrynope.com>
wrote:

>I noticed a post about 'pre-ring' here recently (couldn't find the >thread again), and I'm trying to follow up to figure the implications >to audio systems. Web searches turn up conflicting info regarding >subjective notions of sound, but some of the samples I've heard are >convincing (if a bit contrived). > >I haven't seen this covered in any books or references, which is >surprising, given the consequences. Is there a good method for >achieving linear phase while avoiding pre-ring? Minimal phase filter >followed by an all-pass to compensate?
I personally think the pre-ring "problem" is overblown. People focus on it because it looks bad, not because it is audible. See my "Gibbs Phenomenon" topic at <http://www.daqarta.com/dw_gggg.htm> for a scope photo and some numerical observations. Basically, on a typical sound card sampling at 48 kHz, the "ring" waveform is at about 20 kHz or so. It's true that some prople can detect 20 kHz at high levels in a threshold test, but that's a far cry from what we are dealing with pre-ring. To observe a pre-ring you need a low-frequency square wave (I used 2 kHz in the scope shot). So even if you could detect a loud solid 20 kHz burst in a silent background, to get that same level of 20 kHz in a ring test with a low-frequency component present the fundamental would be exceedingly loud. That creates a perfect condition for masking, since the fundamental will typically be (roughly) near the peak sensitivity of human hearing (say, 1-4kHz), while the ring is in a region of little-to-no sensitivity. Plus, the 20 kHz component is at least 15 dB below the fundamental, and decays rapidly. It should be fairly straightforward to set up a simple experiment with Olde Tyme analog equipment, using a tone burst generator on the sum of a 2 kHz tone and a 20 kHz tone, in variable proportions. The hard part might be finding a subject group that could detect the 20 kHz component even without the 2 kHz present. Best regards, Bob Masta DAQARTA v7.60 Data AcQuisition And Real-Time Analysis www.daqarta.com Scope, Spectrum, Spectrogram, Sound Level Meter Frequency Counter, Pitch Track, Pitch-to-MIDI FREE Signal Generator, DaqMusiq generator Science with your sound card!
Max

Mental error on my part , a strictly symmetric fir filter has zero phase error (relative to a pure delay ) so the ripples are only in magnitude. 

One advantage of min- phase filters is that the group delay is much lower until you get near the cutoff, which makes it easier to close a loop and maintain stability. 

Bob
Max wrote:
> [ _MASSIVE_ snip] > > In any case, this would seem to dispell any notion of completely > accurate reproduction of signals 'just as long as they comply with > Nyquist.' Certainly there must be something missing here. I can't > imagine that the audio industry could have overlooked this for so > long. >
My point may be tangential to your original question. Does Nyquist/Shannon/et. al. really apply (in the manner you assume)? P.S. I'm so antique that the predominate application of "sampling"(sic) was "chopper stabilized" DC amplifiers. P.P.S. My attempt at a BSEE was contemporaneous with Cooley and Tukey's papers. P.P.P.S. Power supplies tended to have 5U4's, occasionally Type 80's. Give me grief and I'll see your CK722 and raise you ...
Bob Masta <N0Spam@daqarta.com> wrote:
> On Sat, 18 Oct 2014 09:34:57 -0400, Max <Max@sorrynope.com>
(snip)
> >>I haven't seen this covered in any books or references, which is >>surprising, given the consequences. Is there a good method for >>achieving linear phase while avoiding pre-ring? Minimal phase filter >>followed by an all-pass to compensate?
> I personally think the pre-ring "problem" is overblown. > People focus on it because it looks bad, not because it is > audible. See my "Gibbs Phenomenon" topic at > <http://www.daqarta.com/dw_gggg.htm> for a scope photo and > some numerical observations.
I think, though, that there is a lot that is audible when it comes before a loud signal, that would not be audible after. One funny example, sometimes ThisTV has "Highway Patrol" from the 1950's (old black and white TV series). When the starting music comes on, sometimes there is a slightly audible copy a second earlier. I am not sure how they are stored. It could be magnetic print through on video tape (audio track). I wouldn't expect it for the optical audio track usually used on movie film, but maybe it could do it.
> Basically, on a typical sound card sampling at 48 kHz, the > "ring" waveform is at about 20 kHz or so. It's true that > some prople can detect 20 kHz at high levels in a threshold > test, but that's a far cry from what we are dealing with > pre-ring. To observe a pre-ring you need a low-frequency > square wave (I used 2 kHz in the scope shot).
(snip) -- glen
On Sun, 19 Oct 2014 08:56:56 -0700 (PDT), radams2000@gmail.com wrote:

>Max > >Mental error on my part , a strictly symmetric fir filter has zero phase error (relative to a pure delay ) so the ripples are only in magnitude. > >One advantage of min- phase filters is that the group delay is much lower until you get near the cutoff, which makes it easier to close a loop and maintain stability. > >Bob
Yeah, I could see that being a big factor in servo and other realtime systems. For audio playback, I always thought that linear phasewas the best option until the mention of pre-ring and related artifacts. It seems like pro audio takes an odd turn every few years. Very interesting to see what's been going on lately with apodizing filters and such.
On Sun, 19 Oct 2014 14:41:36 -0500, Richard Owlett
<rowlett@cloud85.net> wrote:

>Max wrote: >> [ _MASSIVE_ snip] >> >> In any case, this would seem to dispell any notion of completely >> accurate reproduction of signals 'just as long as they comply with >> Nyquist.' Certainly there must be something missing here. I can't >> imagine that the audio industry could have overlooked this for so >> long. >> > >My point may be tangential to your original question. > >Does Nyquist/Shannon/et. al. really apply (in the manner you >assume)?
Hi Richard, I meant that the traditional wisdom in pro audio was a simple equation: Humans don't hear frequencies above 20Khz. You need to sample at double that rate. Hence, 44.1khz is all we'll ever need. In fact, I've seen people ridiculed by the pro engineer crowd for using higher bit rates to record. No consideration given to left-right spacial timing (probably a hairy subject in itself), and obviously no thought given to the fact that perfect filters are not be realizable.
>P.S. I'm so antique that the predominate application of >"sampling"(sic) was "chopper stabilized" DC amplifiers. > >P.P.S. My attempt at a BSEE was contemporaneous with Cooley and >Tukey's papers. > >P.P.P.S. Power supplies tended to have 5U4's, occasionally Type 80's. > Give me grief and I'll see your CK722 and raise you ...
Ha! I actually know what all of those are. In fact, everyone knows tubes sound better, so I'm working on the first all-tube DSP mega processor. Power supply is underway now; I'm tunneling under the local ConEd plant. Type 80's do go back pretty far! I remember those from my grandfather's repair kits.
On Sun, 19 Oct 2014 13:02:33 GMT, N0Spam@daqarta.com (Bob Masta)
wrote:

>I personally think the pre-ring "problem" is overblown. >People focus on it because it looks bad, not because it is >audible. See my "Gibbs Phenomenon" topic at ><http://www.daqarta.com/dw_gggg.htm> for a scope photo and >some numerical observations. > >Basically, on a typical sound card sampling at 48 kHz, the >"ring" waveform is at about 20 kHz or so. It's true that >some prople can detect 20 kHz at high levels in a threshold >test, but that's a far cry from what we are dealing with >pre-ring. To observe a pre-ring you need a low-frequency >square wave (I used 2 kHz in the scope shot).
Hi Bob, I appreciate your comments on the web page (looks like a cool program!). I have always thought that using the 20Khz figure as the upper limit for human hearing was very optimistic, so I agree with you there. The major concern though is the burst of artifacts before the onset of a percussive signal. IOW, the attack of a snare drum is 'intended' to occur where the sinc-like coefficients peak, in the center of a linear phase FIR filter. But given the required number of filter stages, there can be a pre-event of audible duration. Some describe it as phase-smear. Given that it happens before the attack, there is no masking. In fact, filter plugin designers have been using minimum phase filters instead of linear phase in order to move the artifacts to the trailing edge where they presumably will be masked. Still amounts to corruption of the audio signal, but apparently that's the only available option. It's very audible in the samples at the link I had posted. The 'bell' sample may be way over-emphasized, but the last couple samples may be representative of what can happen with real EQ. And the fact that this occurs at all opens some new questions about sample rates and filtering methods. I'm turning up some interesting stuff on this now that I've got some good search keys (apodizing filters, for example)
On Mon, 20 Oct 2014 01:45:19 +0000 (UTC), glen herrmannsfeldt
<gah@ugcs.caltech.edu> wrote:

>I think, though, that there is a lot that is audible when it >comes before a loud signal, that would not be audible after.
Yeah, that's what was demonstrated in the audio samples that I've heard.
>One funny example, sometimes ThisTV has "Highway Patrol" >from the 1950's (old black and white TV series). When the >starting music comes on, sometimes there is a slightly audible >copy a second earlier. > >I am not sure how they are stored. It could be magnetic print >through on video tape (audio track). I wouldn't expect it >for the optical audio track usually used on movie film, but >maybe it could do it.
I wouldn't doubt that was due to print-through. It happens. I've always wondered about the vocal solo section in Led Zeppelin's "Whole Lotta Love." Music stops ... vocal "way down inside" preceded by a pre-echo. It seems long for print-through, but I can't imagine that they would have intentionally run the tape backward to get a pre-echo or done splicing tricks, given the limited number of tracks available then. It's pretty loud.
Max <Max@sorrynope.com> wrote:
> On Sun, 19 Oct 2014 14:41:36 -0500, Richard Owlett
(snip on CD sampling rates)
>>My point may be tangential to your original question.
>>Does Nyquist/Shannon/et. al. really apply (in the manner you >>assume)?
> I meant that the traditional wisdom in pro audio was a simple > equation: Humans don't hear frequencies above 20Khz. You need to > sample at double that rate. Hence, 44.1khz is all we'll ever need.
One that I do remember is that track numbers are stored in BCD (1 to 99) instead of binary (1-127) to save the logic needed to decode the count. Well, also it means you don't need three digits. Digital electronics were still expensive enough at the time, that they didn't try to stretch things so far. I believe the actual sample rate was chosen considering the fact that some might want to store data on video tape. There were no high density digital tape storage systems yet. A CD would fit on about five reels of 2400 foot half inch tape at 6250CPI. So, there were systems that would modulate the data in the form of an NTSC video signal and write it onto VHS or Beta tape. I haven't gone through the math, but I believe there are some convenient multiples to make that work.
> In fact, I've seen people ridiculed by the pro engineer crowd for > using higher bit rates to record.
Well, now that one can make very nice oversampling digital filters, it isn't at all hard to do. But the early CD players would have had analog filters at 44.1kHz. Then again, as well as I remember, they had HeNe lasers, as CW diode lasers weren't yet available.
> No consideration given to left-right spacial timing (probably a hairy > subject in itself), and obviously no thought given to the fact that > perfect filters are not be realizable.
As well as I know, the one DAC players came later, to keep costs down. For the high-cost early ones, two DAC was a small part of the cost. I do wonder how fast the original CD designers expected prices to drop.
>>P.S. I'm so antique that the predominate application of >>"sampling"(sic) was "chopper stabilized" DC amplifiers.
>>P.P.S. My attempt at a BSEE was contemporaneous with Cooley and >>Tukey's papers.
>>P.P.P.S. Power supplies tended to have 5U4's, occasionally Type 80's. >> Give me grief and I'll see your CK722 and raise you ...
I do remember when I was younger, borrowing old Popular Elecronics from the library. Many projects used CK722, even though you never saw them around.
> Ha! I actually know what all of those are. In fact, everyone knows > tubes sound better, so I'm working on the first all-tube DSP mega > processor. Power supply is underway now; I'm tunneling under the > local ConEd plant.
> Type 80's do go back pretty far! I remember those from my > grandfather's repair kits.
-- glen
>> Is there a good method for achieving linear phase while avoiding
pre-ring? Yes, simply give a numeric solver the task to design a FIR filter with x seconds group delay and the magnitude response of your choice. Now the result is not _exactly_ linear phase, in the same way as the designed filter (usually) does not implement the exact requested frequency response. But increasing the number of taps gets you as close as you like. _____________________________ Posted through www.DSPRelated.com