[comp.music] Freq'cy vs. pitch shifting & "missing fundamental"

sandell@aristotle.ils.nwu.edu (07/26/90)

From: Greg Sandell <sandell@aristotle.ils.nwu.edu>

Johan Thornton writes:

> Well, yes.  Let's look at a signal that contains a 100Hz, a 200Hz and a 
> 300Hz sine.  The spectrum of this signal is:
> 
> A|
>  |   |   |   | 
>  |   |   |   |
>  ---------------------
>  0   1   2   3   4   5  (x 100Hz) 
 
 	[ some stuff deleted here... ]
 
> If we do a frequency shift on the original signal, say by 50Hz, we do
> 
>        f =  f(old) + 50
> 
> and get 150, 250 and 350 Hz.  Note that these no longer have the same
>                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> harmonic relationship.  The spectrum now looks like:
> ^^^^^^^^^^^^^^^^^^^^^
 
Yes, this is true.
 
> A|
>  |     |   |   |
>  |     |   |   |
>  ---------------------
>  0   1   2   3   4   5
> 
> 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.

That's right, you hear harmonics that aren't even there...amazingly,
even harmonics quite a bit below the lowest actually-present harmonic.
This is called the "missing fundamental" effect. (In older writings,
it was called the "residue pitch".)  

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.
I believe that Ritsma(1967) found that the "missing fundamental"
effect is most effective when at least some of the components are
below 5000Hz, and even more specifically, when the 3rd through 5th
harmonics are present and happen to fall in the range of 300-2000Hz.
(JASA 42, 191-198).

Although nearly everybody is skeptical when they first hear this, they
are usually won over by the "transistor radio" demonstration.  The
bass guitar has fundamental frequencies as low as 41 Hz:  the tiny
speaker in your walkman headphones is obviously inadequate to
project a tone this low effectively.  But do we have any trouble 
making out the bass part?  No...it would appear that we reconstruct
the signal perceptually from the higher frequency information which
is present.

Greg Sandell
sandell@ils.nwu.edu

jthornto@fs1.ee.ubc.ca (THORNTON JOHAN A) (07/27/90)

In article <10133@accuvax.nwu.edu> sandell@aristotle.ils.nwu.edu writes:
>From: Greg Sandell <sandell@aristotle.ils.nwu.edu>
>
>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
 ----  |__|/_|   ------------------------------------------------------