Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!uw-beaver!ubc-cs!fs1!fs1.ee.ubc.ca!jthornto From: jthornto@fs1.ee.ubc.ca (THORNTON JOHAN A) Newsgroups: comp.music Subject: Re: Freq'cy vs. pitch shifting & "missing fundamental" Message-ID: <1341@fs1.ee.ubc.ca> Date: 26 Jul 90 20:11:09 GMT References: <10133@accuvax.nwu.edu> Sender: root@fs1.ee.ubc.ca Reply-To: jthornto@fs1.ee.ubc.ca (THORNTON JOHAN A) Organization: Dept. of Electrical Engineering University of B.C. Lines: 58 In article <10133@accuvax.nwu.edu> sandell@aristotle.ils.nwu.edu writes: >From: Greg Sandell > >Johan Thornton writes: > >> A pitch change stretches the spectrum while a frequency shift slides it. >> A frequency shift will generally change a harmonic sound into an >> ^^^^^^^^^ >> inharmonic sound. >> >> Johan Thornton, Esq. >> jthornto@fs1.ee.ubc.ca > >The choice of the word "generally" is interesting. The transformation >created above suggests a harmonic sound with a 50 Hz fundamental, >with components at the first, second, 4th and 6th harmonic missing. In this >case, most people aren't likely to experience this as a harmonic tone, >but if four or five higher harmonics (preferably consecutive) were >present, the listener would probably 'hear' the 50 Hz fundamental >and the signal would fuse as a harmonic sound. This is exactly why I said "generally." Let's use a factor of 1.001 this time. Pitch shifting gives you 100.1, 200.2 and 300.3 Hz. Fine. Frequency shifting gives you 100.1, 200.1 and 300.1 Hz. I think that nobody would perceive this as a 0.1 Hz sound with only the 1001st, the 2001st and the 3001st harmonics present. >So any frequency shift always creates a shift to a new potentially >harmonic sound with missing components, and depending upon the >number of consecutive components present and the range in which they appear, >the sound may actually be perceived as harmonic, with a new pitch. ^^^ (for factors m/n where m and n are small) >Although nearly everybody is skeptical when they first hear this, they >are usually won over by the "transistor radio" demonstration. [...] A better example of the "fundamental tone reconstruction" is the 60Hz buzz we're all familiar with. Rarely is the fundamental present. In any case, this is not very interesting. Pitch shifting is what is of interest here. What is the best window to use? I'm building a DSP board and pitch (!) shifting in real-time is one of the effects it will have. My plan is to use an interval of about 10ms with the following algorithm: sample the incoming signal for the interval, and play it back at a different sample rate (probably with linear interpolation). Of course to avoid the clicking between adjacent intervals, a decent /~\ type windowing technique is needed. ------- _/__/ ----------------------------------------------------- _| ___| E l e c t r i c a l | Johan Thornton, Esq. | | |_/ E n g i n E E r i n g |------------------------- |/| __| U n i v e r s i t y | jthornto@fs1.ee.ubc.ca |-| |/__ o f B r i t i s h |------------------------- | |_____| C o l u m b i a | This space for rent ---- |__|/_| ------------------------------------------------------