Reply by robert bristow-johnson December 23, 20082008-12-23
On Dec 23, 7:35&#4294967295;am, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> Nils <n.pipenbri...@cubic.org> wrote:
...
> > > If you smear the phase of a sawtooth-wave in a way that the short > > transient disappears it will sound different than a unphased sawtooth. > > I believe this is true, but it doesn't sound as different as > it looks.
of course, with two or more loudspeakers (and channels), if some phase change is applied to one channel, but not to another, that will mess up localization. but i see little reason to think that if identical phase changes were applied to both channels, that this would affect the perceived localization much. however, if such a sweeping statement is applied to a single (mono) sound source, i am not sure that this is true at all. rapidly *changing* phases, sure, but a static phase change, i am not very convinced at all that we can hear it. in this post, http://groups.google.com/group/comp.dsp/msg/184713978f96dd4c i listed a short MATLAB program to create a nyquist (or below) bandlimited square wave where the harmonic phases are slowly messed up (slowly enough that the harmonic detuning would not be noticed). the waveform drastically changes shape, but, if your sound reproduction system remains linear (so the peaks are not flattened), i doubt you will hear any difference. r b-j
Reply by glen herrmannsfeldt December 23, 20082008-12-23
Nils <n.pipenbrinck@cubic.org> wrote:
> Vladimir Vassilevsky wrote:
>>> That is very not true. The fact that brain does not interpret phase, but >>> only phase difference between ears is misleading in this case:
>> The hearing works like the spectrum analyser. The difference in the >> group delay can be perceived, but not the phase per se.
> Just wanted to add that this is true in most cases but not in all. The > ear does has some non-linear things as well. Especially the short > transients play a major role to perception.
I once asked a similar question to someone doing research on the way the ear works. (The research is done with owls.) It seems that the nerve impulses come out at a specific point in the sine for each frequency component, every cycle for lower frequencies, every Nth cycle (increasing N with frequency) for higher frequencies.
> If you smear the phase of a sawtooth-wave in a way that the short > transient disappears it will sound different than a unphased sawtooth.
I believe this is true, but it doesn't sound as different as it looks. As the timing (phase) differences are used to localize the source (which we do amazingly well considering diffraction and the size of our head) a more interesting question is how much such change, done to both channels of a stereo signal, affects localization.
> The harmonic content remains the same, and the ear will adjust rapidly > to the new phase situation but you hear the difference if you a/b switch > between the two different allpass-filtered version once a second or so.
As I understand it, the harmonic content and localization of the source are processed separately. -- glen
Reply by Nils December 23, 20082008-12-23
Vladimir Vassilevsky wrote:
>> >> That is very not true. The fact that brain does not interpret phase, but >> only phase difference between ears is misleading in this case: > > The hearing works like the spectrum analyser. The difference in the > group delay can be perceived, but not the phase per se.
Just wanted to add that this is true in most cases but not in all. The ear does has some non-linear things as well. Especially the short transients play a major role to perception. If you smear the phase of a sawtooth-wave in a way that the short transient disappears it will sound different than a unphased sawtooth. The harmonic content remains the same, and the ear will adjust rapidly to the new phase situation but you hear the difference if you a/b switch between the two different allpass-filtered version once a second or so. Nils
Reply by Jerry Avins December 22, 20082008-12-22
jungledmnc wrote:

   ...

> The link does not work, but thanks anyway.
http://www.aes.org/e-lib/browse.cfm?elib=12429 Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by robert bristow-johnson December 22, 20082008-12-22
On Dec 22, 6:37&#4294967295;pm, "jungledmnc" <jungled...@gmail.com> wrote:
> >you're doing the Powell/Chau/Azizi thing, right? &#4294967295;you're not using > >Truncated IIRs, are you? > > I didn't know it is called like that, but it looks so :-). And I > unfortunately don't know what TIIR is.
do you know what a "moving average" or "moving sum" filter is? (sometimes called a "CIC filter".) these are (simple) FIR filters. but there are two ways to implement them. one way is a standard FIR implementation (big convolution summation), the other way is actually a truncated IIR. ...
> >BTW, someone at tc electronic did a paper that was more of the final > >word on designing these 5-coefficient biquads: > > >http://www.aes.org/e-lib/browse.cfm?elib=3D12429 > > The link does not work, but thanks anyway.
how did that "3D" get into the line of text? it works when i click on it in my post (using Google Groups). r b-j
Reply by jungledmnc December 22, 20082008-12-22
>you're doing the Powell/Chau/Azizi thing, right? you're not using >Truncated IIRs, are you?
I didn't know it is called like that, but it looks so :-). And I unfortunately don't know what TIIR is. I'm not an expert really :-(.
>oh, i agree that doing that for the peakingEQ and shelving filters >works well. this is why i fudged the definition of bandwidth in the >peakingEQ from the traditional definition (following the lead of Andy >Moorer).
Well that explains everything :-). Great you did that! :-). But what with those LP, HP... filters? I have no idea... Except one fake - I can use the filter twice in normal mode -> 2 / 2 becomes 1. Not exactly ideal solution, but makes the equality of both responses possible.
>> Btw. I think you became somewhat famous with the cookbook, saves a lot
of
>> time of us mortals :-)! > >avoiding redundant labor was the point. > >i haven't published anything since 2001 and i've since realized that >this cookbook (which began as a post to the music-dsp mailing list, it >was supposed to be just a little thing) had more impact than anything >else i did. i didn't expect that. i just wanted to simplify the math >and make as much of it in common between the different filter types as >possible. i keep threatening to redo it in a pdf file and add some >more implementation tricks (like how to do the transcendental math in >a context where you don't have a standard C library to do it). i've >always put it off, but maybe i'll do that soon. i have more time on >my hands nowadays (but currently i'm fiddling around to get this >stupid digital TV to work before we lose analog TV in February). >anyway, someday i'll probably do that.
No rush, but believe me, you'll help many people. There are many highly advanced papers about some special filters, but I haven't seen many books talking about "we have these possibilities, this is good for that, this for that... and you can implement this filter like this... because math says..." heh... You can become a writer ;-).
>BTW, someone at tc electronic did a paper that was more of the final >word on designing these 5-coefficient biquads: > > http://www.aes.org/e-lib/browse.cfm?elib=3D12429
The link does not work, but thanks anyway. dmnc
Reply by robert bristow-johnson December 22, 20082008-12-22
On Dec 22, 4:29&#4294967295;pm, "jungledmnc" <jungled...@gmail.com> wrote:
> > >&#4294967295;with enough buffering delay, you can > >FILTFILT little snippets and overlap-add them. &#4294967295; > > Yeah this is exactly what I do!
you're doing the Powell/Chau/Azizi thing, right? you're not using Truncated IIRs, are you?
> >but, in all cases, it involves "halfing" the dB effect of the IIR > >design. &#4294967295;if the Q of a biquad is 1/2, that's pretty easy (since it is > >the cascade of two identical 1st-order filters. &#4294967295;dunno how to do it > >for the more general cases. > > So r-b-j there is no easy way to do that? Even for the peak and shelf > filters - I'm asking because I've measured that those two work very very > great just using half dB.
oh, i agree that doing that for the peakingEQ and shelving filters works well. this is why i fudged the definition of bandwidth in the peakingEQ from the traditional definition (following the lead of Andy Moorer). in an old paper (that started me on this EQ cookbook thingie), i wrote: " This 'midpoint dB gain' definition for bandedge gain is attractive because it is mathematically consistent and simplifies the design. Like the bandwidth definitions of White and Moorer, a cut of N dB exactly cancels a boost of N dB for any given N, boost/cut frequency, and bandwidth. An additional feature is that a boost (or cut) of N dB cascaded with another boost (or cut) of M dB very nearly approximates the frequency response of a single second order equalizer having a boost (or cut) of N+M dB, all filters having the same boost/cut frequency and bandwidth. This is because the magnitude frequency response for both cases agree exactly at five frequencies: DC, Nyquist, peak/notch, and the two bandedges. " (from http://www.musicdsp.org/files/EQ-Coefficients.pdf ) the same fact is essentially true for the shelving filters. if you have one single shelf and compare that to two identical shelves in cascade, except the dBgain has been reduced to 1/2 of the first, the gain agrees at the two shelf levels and at the midpoint level (which is at the "significant frequency" as i defined it in the cookbook).
> Thanks a lot again r-b-j!
yer welcome. FWIW.
> Btw. I think you became somewhat famous with the cookbook, saves a lot of > time of us mortals :-)!
avoiding redundant labor was the point. i haven't published anything since 2001 and i've since realized that this cookbook (which began as a post to the music-dsp mailing list, it was supposed to be just a little thing) had more impact than anything else i did. i didn't expect that. i just wanted to simplify the math and make as much of it in common between the different filter types as possible. i keep threatening to redo it in a pdf file and add some more implementation tricks (like how to do the transcendental math in a context where you don't have a standard C library to do it). i've always put it off, but maybe i'll do that soon. i have more time on my hands nowadays (but currently i'm fiddling around to get this stupid digital TV to work before we lose analog TV in February). anyway, someday i'll probably do that. BTW, someone at tc electronic did a paper that was more of the final word on designing these 5-coefficient biquads: http://www.aes.org/e-lib/browse.cfm?elib=12429 sorry, i don't have an electronic copy. r b-j
Reply by jungledmnc December 22, 20082008-12-22
>it doesn't have to be, Jerry. with enough buffering delay, you can >FILTFILT little snippets and overlap-add them.
Yeah this is exactly what I do!
>but, in all cases, it involves "halfing" the dB effect of the IIR >design. if the Q of a biquad is 1/2, that's pretty easy (since it is >the cascade of two identical 1st-order filters. dunno how to do it >for the more general cases.
So r-b-j there is no easy way to do that? Even for the peak and shelf filters - I'm asking because I've measured that those two work very very great just using half dB. Thanks a lot again r-b-j! Btw. I think you became somewhat famous with the cookbook, saves a lot of time of us mortals :-)! dmnc
Reply by robert bristow-johnson December 22, 20082008-12-22
Jerry Avins wrote:
> > Bidirectional filtering is an off-line batch process.
it doesn't have to be, Jerry. with enough buffering delay, you can FILTFILT little snippets and overlap-add them. we were discussing this back in days of yore: http://groups.google.com/group/comp.dsp/msg/60acd72665a2fa63 http://groups.google.com/group/comp.dsp/msg/30d3bd29d6f2a7c0 the author names i remember are Powell/Chau, Azizi, and Wang/Smith. actually Avery Wang's idea was not cascaded bidirectional IIR filters but cascading a stable TIIR ("Truncated IIR") with another TIIR where the poles and zeros are reflected (and unstable). i like the idea of the more conservative FILTFILT but using Truncated IIR filters. but, in all cases, it involves "halfing" the dB effect of the IIR design. if the Q of a biquad is 1/2, that's pretty easy (since it is the cascade of two identical 1st-order filters. dunno how to do it for the more general cases. glad you're well, Jerry. (or at least outa the hospital.) bestest, r b-j
Reply by Jerry Avins December 22, 20082008-12-22
jungledmnc wrote:

   ...

> Aaaaah, I was just confused about the "network". I'll check this out. But > what is the advantage of this approach compared to bidirectional > filtering?
Bidirectional filtering is an off-line batch process. Take it from there. ... Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;