ebeam said:
What is the difference between a perfect sine wave and a perfect cosine wave (with the same amplitude and frequency) starting and ending at the same time? Phase. No time difference, just 90 degrees out of phase.
The definitions are completely interchangeable for sine waves. Time, phase, same thing. Delay the sine wave a quarter of a cycle and you produce the cosine wave, though the attack has been time shifted. Mathematically, if someone said "shift the phase of this sine wave 10 degrees" you would simply time delay or advance the wave 1/36 of a cycle and use your original time points for attack and release to truncate the wave. That is, by definition, what you are doing when you manipulate the phase of a sine wave... time shifting.
Take a look at this neat applet:
http://www.udel.edu/idsardi/sinewave/sinewave.html Leave only the blue box checked, and play with the third numerical value - the phase. When you change it by 10, 20, 30 degrees... doesn't that look like simply a time delay of the waveform to you? It is.
I understand what you are getting at, but mathematically it's the same result. I suppose you could go through the trouble of examing a waveform, calculating its frequency, calculating the offset at each sampling point (in the digital sample) to phase shift it, and be done with it. Or, you could slide the waveform in time by the phase shift required, and retain the original time dependent attack and release times to truncate the shifted wave. Identical end result, but probably much less computationally intensive to manipuate the waveform in the time domain instead of offsetting every single sample point.
You can calculate the phase difference between these two and redraw one to match the other without changing the attack and release at all.
Look at that wave applet again, and look at how the attack looks when you have a phase of 0, 90, 180 degrees. There is a
very subtle sonic difference in the attack being in a trough, midpoint, or crest of the wave. You yourself said that humans can hear the difference in a polarity change (which I highly doubt in the case of a sustained pitch, but perhapse we can detect differences in attack), which means the attack is still in the midpoint, just that it ascends in level in one case, and descends in the other. Personally, I think such sonic differences will be small in most cases. Perhaps for low frequencies it is more noticeable. What I would be worried about is some cumulative effect of altering the attack characteristic of
every single frequency component in the waveform. That might have a noticeable effect... or it might not. Never done a listening test on that one.
And a fourier transformation is a method for solving/manipulating a differential equation...
Well, it's actually a differential equation that transforms a wave from the time domain to the frequency domain. Been a while since I did that though, and don't plan on doing it again if I can avoid it.
