max@prls.UUCP (Max Hauser) (05/31/91)
Original posting asked for "the algorithm that would take a stream of sampled sound, shift it 180 deg in phase and spit it back out again." Two replies each advised a pair of Hilbert transformers (which are frequency-independent 90-degree phase shifters, more or less). One reply asserted that a transfer function such as 180-degree phase shift cannot be implemented "without getting it into the form of a difference equation." One reply stated that "180 deg phase shift is not the same as simply inverting the signal. A phase shift implies a time delay of some sort." And added, "he *may* have meant a 180 deg phase shift for each of the frequencies that add up to his composite signal. The output signal will definitely NOT look much like the input signal. You can prove this to your self ..." [And later apologized, though only about this second part] Another separate reply declared that "Inverting is NOT the same as 180 deg phase shift. For a symetric waveform (eg a sine wave) it looks the same, but with something assymetric what you will see is the waveform upside-down, which is not the same as shifted 180 deg. Phase shifting moves a waveform along the time axis: it stays the same way up ..." [This was my favorite] Another suggested, "I think ... that the correct 'theoretical' answer is to find a filter that actually does produce the proper time shift for each frequency ..." although this respondent added sensible comments and had the rare insight to qualify the foregoing remark with "I think." One respondent assaulted a stipulation "Given *ANY* signal x(n) with Fourier Transform X(w)" with the comment "Really? You surely mean _periodic_ signal." Another "clarified" this with "Why do we keep tagging onto this thread? `any signal ..with a fourier transform' implies any periodic signal.... so why the beef? Let it go!" An earlier and prolific respondent re-entered with an explanation of how, indeed, inverting does shift every frequency component by 180 degrees, but then added that "the original question was to shift the phase of a signal by 180 degrees, which implicitly means to delay the signal by pi degrees as referred to its fundamental frequency. [See the original, above -- MH] Now, it is conceivable that one or more of these respondents was attempting irony (in which case, they failed); but basically, none of them knew what he was talking about. If any of them displayed this kind of "expertise" on a signal-processing quiz at a serious engineering school (few enough of these, by the way, in the United States) or a serious job interview, it might produce a rude surprise. (And this was on "serious" technical newsgroups -- I let you imagine what might have transpired on rec.audio.) One astute respondent (and indeed there were a few, very few) remarked "I assume that this is due to a tendency to respond without taking time to think about the problem. ... I just [thought] I would throw in my $.02 because the argument seemed to be shifting to the wrong answer." Preserved in its entirety, this exchange makes an instructive example about the Usenet, especially when you see the tones of decisiveness and authority that so many of them took. These exchanges are so neat I will try to think up some more innocent questions, have them posted, and watch what ensues.