Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Some examples of waveforms with the same power spectrum, different phases

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Some examples of waveforms with the same power spectrum, different phases

    Here are some files to listen to, in reference to the discussion on phase in the discussion on the new Fishman pickup.

    The attached plot (sameFDiffPh.pdf) shows the beginning parts of two waveforms in these two attached .mps files (tfuni220.mp3, tfunr220.mp3). The blue line shows the beginning of a wavefrom with a fundamental of 220 Hz, and the first seven harmonics, all equal amplitude and phase. The green line is for random phase. If you want to hear just how much alike the sounds are, you have to play through a very linear system since the one with the higher peak amplitude would tend to produce more harmonics from any non-linearity. Note that the two files can be distinguished by the transient at the end; the random file terminates at a higher value, and the higher harmonics from the abrupt transition are easily heard as a click.

    These files (tfuni880.mp3, tfunr880.mp3) are the same waveforms (unchanging phase, random phase) at a fundamental of 880 Hz. This puts harmonics in the frequency range where the ear is most sensitive. Given the tiny (if any) effect here, how much could the effect be above 20KHz, where the sensitivity of the ear is more than 20 db less?

    This .mp3 file (tfunrp1000.mp3) has a different kind of phase shift. The fft of the entire first waveform has its phase modified by adding a phase function that increases in frequency in the form of a parabola. This is transformed back to the time domain. This produces changes over a very long time making a huge effect on the sound.

  • #2
    Let's measure the transient response of the ear/brain.

    This attached pdf file (tb6.pdf) shows a pair Gaussian pulses with a 2 KHz center frequency, a characteristic width of about a millisecond, and a separation of six milliseconds. We shall see that although they are essentially distinct, that is not how they sound. 6 msec is the shortest separation to be considered, 100 msec is the longest. These mp3 files (tgs100.mp3, tgs50.mp3, tgs25.mp3, tgs12.mp3, tgs6.mp3) have the various separations. Your results might vary, but I hear a distinct pair of pulses at 100 and 50 msec of separation, a blurring at 25, and then a further loss of distinctness below that. My conclusion is that the response time is on the order of 25 msec. You might hear it a bit differently.

    Comment


    • #3
      One question: Do we know that mp3 files are good enough to show phase effects, if any? If not, we could be misled.

      Comment


      • #4
        Originally posted by Joe Gwinn View Post
        One question: Do we know that mp3 files are good enough to show phase effects, if any? If not, we could be misled.
        I am making aiff files from python, but the forum will not accept them, and so they must be converted. I do not hear any significant differences with regards to the phase.

        Comment


        • #5
          Originally posted by Joe Gwinn View Post
          One question: Do we know that mp3 files are good enough to show phase effects, if any? If not, we could be misled.
          Better answer: I reconverted an mp3 converted from aiff back to aif and read it back into Python. The result (recon2aif.pdf) has the same peak structure and so the phase has not been affected.

          Comment


          • #6
            Originally posted by Mike Sulzer View Post
            Better answer: I reconverted an mp3 converted from aiff back to aif and read it back into Python. The result ([ATTACH]27380[/ATTACH]) has the same peak structure and so the phase has not been affected.
            Yes, that's the better answer, as it does not depend on one person's hearing. It may be that only those with precious-metal ears can tell the difference.

            Does the pdf co-plot the original aiff and the roundabout (via-mp3) aiff?

            I assume that the sampling rate was 44.1 KHz. Are higher sampling rates required to hear the effect, if any? MP3 - Wikipedia, the free encyclopedia

            Afterthought: The peaks on the test waveform don't look aggressive enough. I'd digitize an abrupt guitar strum and try to generate something similar as the test case. Or just use the digitized signal, if the sample rate is high enough.

            Comment


            • #7
              Originally posted by Joe Gwinn View Post
              Yes, that's the better answer, as it does not depend on one person's hearing. It may be that only those with precious-metal ears can tell the difference.

              Does the pdf co-plot the original aiff and the roundabout (via-mp3) aiff?

              I assume that the sampling rate was 44.1 KHz. Are higher sampling rates required to hear the effect, if any? MP3 - Wikipedia, the free encyclopedia

              Afterthought: The peaks on the test waveform don't look aggressive enough. I'd digitize an abrupt guitar strum and try to generate something similar as the test case. Or just use the digitized signal, if the sample rate is high enough.
              I did not the plot one over the other, but the before and after sure do look the same. In any case, suppose there are small differences between what I produced in 64 bit floating point and the processed file for listening. Since the result of the test is "no significant differences", then any small deviations from the original waveforms did not matter. If the result had been "significant differences", then it would have been necessary to determine if the small deviations were the cause of the audible differences before claiming it was the phase differences. A similar arugment would apply to the posible use of 24 bit instead of 16.

              Increasing the sampling rate might change the very small quantization noise somewhat. But this noise is inaudible, and if it were masking the audibility of differences between the "in phase" and "random phase cases", then that effect would be of no significance in the real world.

              Your afterthought: I think I am missing what you mean. Could this relate to the other post relating to the transients?

              Comment


              • #8
                Originally posted by Mike Sulzer View Post
                Your afterthought: I think I am missing what you mean. Could this relate to the other post relating to the transients?
                I just recall the actual guitar transients I recorded some years ago, and the peaks were far sharper (and therefore the high-frequency content more prevalent) than the current test waveform.


                But as I think more deeply about the experimental approach, a fundamental issue occurs to me. The ADC and DACs on most audio equipment incorporates a "brick-wall" low-pass filter, where the wall is at 20 KHz or so. A brick-wall filter has a rectangular passband, having the same attenuation across the passband, and dropping abruptly to zero outside the passband.

                The problem with brick-wall filters is that they of necessity mangle phase, so any test series made with such equipment will never detect a phase effect, because the phase is pre-mangled.

                In radar systems, the filters are never brick walls, they are Bessel, precisely to preserve linear phase (and thus wave shape).

                What linear phase means in practice is that all frequencies suffer the same time delay - the delay is constant, and the phase varies because the frequency varies.


                What to do? The most basic test would be to demonstrate that the experimental setup does a reasonable job of preserving linear phase to the ear. Failing that, no useful test of phase sensitivity can be made.

                And then there is the matter that it's difficult to verify sensitivity to components above 20 KHz if the brick wall cuts everything above 20 KHz off.


                So, we need to rethink the experimental approach.

                Comment


                • #9
                  Originally posted by Joe Gwinn View Post
                  But as I think more deeply about the experimental approach, a fundamental issue occurs to me. The ADC and DACs on most audio equipment incorporates a "brick-wall" low-pass filter, where the wall is at 20 KHz or so. A brick-wall filter has a rectangular passband, having the same attenuation across the passband, and dropping abruptly to zero outside the passband.

                  The problem with brick-wall filters is that they of necessity mangle phase, so any test series made with such equipment will never detect a phase effect, because the phase is pre-mangled.
                  The bolded part is not correct. This test compares the sound of two test waveforms with the same amplitudes of the same frequencies, but with very different phases. Suppose the phase changes made by the system anti-aliasing filters were arbitrarily large; the phases of the two waveforms would still be just as different, and if the ear/brain has a significant sensitivity to the relative phases, the effect would be audible. However, the phase changes from the system anti-aliasing filters are not very large; we know this because the in phase waveform exhibits the expected sharp peak. That peak would not be there if the relative phases were significantly mangled. So we see that the ear/brain is not very, or maybe not at all, sensitive to the relative phases of the fundamental and harmonics in a musical type waveform. This is hardly a new result; as far as I know, no competent person who has conducted proper tests has concluded any differently.

                  Comment


                  • #10
                    Originally posted by Mike Sulzer View Post
                    The bolded part is not correct. This test compares the sound of two test waveforms with the same amplitudes of the same frequencies, but with very different phases. Suppose the phase changes made by the system anti-aliasing filters were arbitrarily large; the phases of the two waveforms would still be just as different, and if the ear/brain has a significant sensitivity to the relative phases, the effect would be audible. However, the phase changes from the system anti-aliasing filters are not very large; we know this because the in phase waveform exhibits the expected sharp peak. That peak would not be there if the relative phases were significantly mangled. So we see that the ear/brain is not very, or maybe not at all, sensitive to the relative phases of the fundamental and harmonics in a musical type waveform. This is hardly a new result; as far as I know, no competent person who has conducted proper tests has concluded any differently.
                    This requires us to assume that the ear is sensitive only to differential phase, no matter how far off the absolute phase is. Do we have any way to verify this assertion?

                    If the passband is rectangular, the frequency response will be sin(x) over x, and complex in general.

                    Comment


                    • #11
                      Originally posted by Joe Gwinn View Post
                      This requires us to assume that the ear is sensitive only to differential phase, no matter how far off the absolute phase is. Do we have any way to verify this assertion?

                      If the passband is rectangular, the frequency response will be sin(x) over x, and complex in general.
                      What do you mean by absolute phase? I think that is a meaningless concept, but I am willing to listen. Furthermore, it is the phase between the fundamental and the various harmonics that we are discussing, whether or not absolute phase is meaningful. Thus, it is quite sufficient that the test measure the sensitivity to differential phase.

                      This plot (ImpulseResponse.pdf) shows an impulse (digital) which then goes through the D/A into the A/D and back into digital form (green).

                      Comment


                      • #12
                        Originally posted by Joe Gwinn View Post
                        This requires us to assume that the ear is sensitive only to differential phase, no matter how far off the absolute phase is. Do we have any way to verify this assertion?

                        If the passband is rectangular, the frequency response will be sin(x) over x, and complex in general.
                        If the passband is rectangular, the time response is sin(x) over x, yes. The square function and the sinc function (sin(x) over x) are a Fourier transform pair. Note that both are real and thus the phase is zero, or linear if a time delay is involved. This means that for such a bandpass, there is no phase "mangling", contrary to your statement two posts ago. I think you need to revise your entire estimate of just difficult this measurement process is, and recognize that what I am doing is correct.

                        You also might want to rethink those statements you made about what kind of filter you have to use in a radar. If you transmit a square pulse, the proper filter to use has a matching square impulse response, the so called matched filter. If you transmit a binary phase code, then the proper filter is found by convolving a square pulse of one baud length by the impulses that describe the code. If you are transmitting a chirp, then you might use a Bessel filter as a good approximation, but it is not really right.

                        Comment


                        • #13
                          Originally posted by Mike Sulzer View Post
                          If the passband is rectangular, the time response is sin(x) over x, yes. The square function and the sinc function (sin(x) over x) are a Fourier transform pair. Note that both are real and thus the phase is zero, or linear if a time delay is involved. This means that for such a bandpass, there is no phase "mangling", contrary to your statement two posts ago. I think you need to revise your entire estimate of just difficult this measurement process is, and recognize that what I am doing is correct.
                          Rectangular is the mathematical ideal, never achieved in practice. And elimination of the imaginary component requires perfect symmetry around zero.

                          You also might want to rethink those statements you made about what kind of filter you have to use in a radar. If you transmit a square pulse, the proper filter to use has a matching square impulse response, the so called matched filter. If you transmit a binary phase code, then the proper filter is found by convolving a square pulse of one baud length by the impulses that describe the code. If you are transmitting a chirp, then you might use a Bessel filter as a good approximation, but it is not really right.
                          We don't actually use square pulses. For one thing, the sharp start and stop edges will cause excessive out-of-band energy, and NTIA (the regulator) will object.

                          Most common is linear FM in a trapezoidal pulse. We do use matched filters, in various forms, the choice depending on various practical considerations. It's a long story. A good place to start is "Radar Principles" by Peyton Z Peebles Jr. This is the standard textbook.


                          More generally, the argument over phase effects in audio has been going on for decades. If it were easy to do the definitive experiment, someone would have done so by now, and the argument would have been settled. I think some research into what has already been tried, and why it didn't settle the issue, would be useful.

                          Comment


                          • #14
                            Originally posted by Joe Gwinn View Post
                            Rectangular is the mathematical ideal, never achieved in practice. And elimination of the imaginary component requires perfect symmetry around zero.
                            So you are implying that real world filters that only approximate rectangular would mangle phase? I hope not, because that would be false. Sure, real world filters will not have perfect phase response, but that does not mean that they mangle it, and it certainly does not mean that the test I did is invalid, something you seem unwilling to admit.


                            Originally posted by Joe Gwinn View Post
                            We don't actually use square pulses. For one thing, the sharp start and stop edges will cause excessive out-of-band energy, and NTIA (the regulator) will object.

                            Most common is linear FM in a trapezoidal pulse. We do use matched filters, in various forms, the choice depending on various practical considerations. It's a long story. A good place to start is "Radar Principles" by Peyton Z Peebles Jr. This is the standard textbook.
                            Right, as I said, Bessel filters are not the answer for everything.
                            Originally posted by Joe Gwinn View Post
                            More generally, the argument over phase effects in audio has been going on for decades. If it were easy to do the definitive experiment, someone would have done so by now, and the argument would have been settled. I think some research into what has already been tried, and why it didn't settle the issue, would be useful.
                            More generally, although no one test might be definitive, and even the results of all the tests ever done might not be completely definitive, what the tests show is that phase is unimportant. The problem is that some people do not want to believe the results; that is why no test has settled the issue: too many people do not want to settle the issue. No research into why the issue is not settled is necessary. Look at this discussion: post after post you bring up "reasons" why the test I did is no good. But your "reasons" all turn out to be invalid. The current model of how hearing works, and the results of the tests are in agreement. Believing that phase is important requires the invalidation of both the measurements and the model.

                            Comment


                            • #15
                              Originally posted by Mike Sulzer View Post
                              So you are implying that real world filters that only approximate rectangular would mangle phase? I hope not, because that would be false. Sure, real world filters will not have perfect phase response, but that does not mean that they mangle it, and it certainly does not mean that the test I did is invalid, something you seem unwilling to admit.
                              No, I said that in practical systems there is always a significant imaginary (quadrature) component.

                              Right, as I said, Bessel filters are not the answer for everything.
                              Whoa. Real radar systems have many many filters. The physically implemented filters are usually Bessel or very close. The RF filters in the front end are fairly wide. The IF filters are narrower, but still ~Bessel. The matched filter is implemented in the digital signal processor, and id typically a correlation filter. While this path cannot be compressed into a single filter, it's that last filter that dominates. And radar receivers are required to be phase linear across the passband, and this is directly verified in the lab. Linear phase implies Bessel.

                              More generally, although no one test might be definitive, and even the results of all the tests ever done might not be completely definitive, what the tests show is that phase is unimportant. The problem is that some people do not want to believe the results; that is why no test has settled the issue: too many people do not want to settle the issue. No research into why the issue is not settled is necessary. Look at this discussion: post after post you bring up "reasons" why the test I did is no good. But your "reasons" all turn out to be invalid. The current model of how hearing works, and the results of the tests are in agreement. Believing that phase is important requires the invalidation of both the measurements and the model.
                              Well, we are certainly recapitulating the debate of decades.

                              Phase is known to be important in angle-of-arrival determination, so it cannot be said that humans are totally insensitive to phase.

                              Saying that people "don't want to believe" is ad hominem, and begs the question of if the current models of human hearing are both correct and complete.

                              Comment

                              Working...
                              X