Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!ginosko!uunet!image.soe.clarkson.edu!dean
From: dean@image.soe.clarkson.edu (Dean Swan)
Newsgroups: comp.dsp
Subject: Re: My pitch shifter for 56000
Message-ID: <1989Sep25.172140.27543@sun.soe.clarkson.edu>
Date: 25 Sep 89 17:21:40 GMT
References: <5334@merlin.usc.edu>
Sender: dean@sun.soe.clarkson.edu (Dean Swan)
Organization: Clarkson University, Potsdam, NY
Lines: 39

Todd,
  Have you considered using a sample rate conversion filter to do your
pitch shifting?  To increase the pitch you'd also have to low-pass filter
the original to prevent nyquist aliasing, and use the sample rate converter
to generate a lower sample rate. Then just output the new samples at the 
same rate.
  To decrease pitch, you can skip the low-pass and use the conversion filter
to generate a higher sample rate, then just play it back at the same old
speed.
  This method would tend to sound Mickey Mouse-y or Darth Vader-like if you
do any extreme pitch shifting, and it's also subject to time compression and
expansion problems proportional to the amount of pitch shifting, but it would
give the "smoothest" (I hesitate to say "best" because the time compression
could be unaccecptable) sounding results.

Here's another possibility, which may or may not work:

      Assume that your input is of the form:
        Y=Sin( F*A )

      Then  F = ArcSin(Y)/A
      Next do F=F+pitch shift amount
      and reconstruct with Y=Sin(F*A).

I've been doing a lot of work with FM synthesis, and this idea just ocurred
to me because of that.  If it works, let me know, and apropriately credit
your sources (i.e. Me).  This is not compute intensive at all and it isn't
subject to time compression or expansion either.

By the way A represents the phase angle.  In your case you would use T, the
time value and pick some scaling factor so that the trig functions (or more
likely, table look-ups and interpolations) will make sense.

Good Luck, and let me know what the results are.  I'll try to do some math
on this and see if it's really workable, if I have some spare time.

-Dean Swan
dean@sun.soe.clarkson.edu