Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!apple!wass From: wass@Apple.COM (Steve Wasserman) Newsgroups: comp.dsp Subject: Re: Pitch shift / offset and FFT Message-ID: <4441@internal.Apple.COM> Date: 28 Sep 89 19:54:03 GMT References: <89264.171306P85025@BARILVM.BITNET> <9520001@hpsad.HP.COM> <1787@draken.nada.kth.se> <4730@orca.WV.TEK.COM> Organization: Apple Computer Inc, Cupertino, CA Lines: 69 In article <4730@orca.WV.TEK.COM> mhorne@orca.WV.TEK.COM writes: > >In a recent article by Steve Wasserman... > >>If you have a 1000 Hz sine wave and an 1100 Hz sine wave, and you ADD >>them ... stuff deleted ... >When you add two sinusoids together, you get exactly that: the sum of >two sinusoids. I didn't ever say you'd get anything else. However, I did use some very simple trig identities (disguised as lots of complex algebra in my last posting) to show that in the special case of adding two sinusoids, you get a phenomenon called "beating", and that this phenomenon is the consequence of basic physical principles and not any processing done by human ears or minds. The result from my last posting was: cos(f1*t) + cos(f2*t) = 2*cos[(f1-f2)*t/2] * cos[(f1+f2)*t/2] Now look at the right side of this equation closely. The first term is a cosine at a frequency equal to half of the difference between f1 and f2. This is *multiplied* (i.e. it acts as an envelope) by the second cosine which has a frequency equal to the average of f1 and f2. When two sinwaves of equal amplitude are combined, this is what you get. When you hear "beating", f1 and f2 are close to each other in frequency, hence (f1-f2)/2 is small. So what *you* hear, and what a microphone also hears, and what really happens is a sinewave that gets cyclically louder and softer. So what if they don't have the same amplitude? In general when you add two sinusoids of arbitrary magnitude, you get: A*cos(f1*t) + B*cos(f2*t) = [A+B]*cos[(f1-f2)*t/2]*cos[(f1+f2)*t/2] + [B-A]*sin[(f1-f2)*t/2]*sin[(f1+f2)*t/2] As you can see, if A and B are even *close*, the first term on the right side will dominate and again you hear beating. >Any apparent beating between two (or more) added >sinusoids is purely a perceptual effect. I disagree. Try plotting cos(2*pi*1000.0*t)+cos(2*pi*1000.1*t). Even better, get two waveform generators and set them at the above frequencies at approximately equal magnitudes. Put one generator on channel 1 of your 'scope and the other on channel 2 and hit the "add" button. Turn the scale waaaaay down so that you can see stuff at .1 Hz and trigger on the maximum (or minimum) amplitude of the whole waveform. (Since you're posting from Tektronix, you ought to be able to find a few waveform generators and 'scopes lying around :-) > In the case of hearing a >beat between two summed sinusoids, the ear is acting as a mixer which >detects the sum/difference signals as well as detecting the base >signals. Looking at the sum of two sinusoids on a `scope may lead one >to believe that somehow the sum of the two signals has yielded two >(or more) new, different signals. This interpretation may seem valid, >but nothing magical is happening: you're only seeing the result of two >sinusoids being summed together, not a mixing of the two. The two *do* mix: they are added. Linear superposition applies! Of course they sum together. >Mike Horne >mhorne@ka7axd.wv.tek.com -- swass@apple.com