DSPRelated.com
Forums

frequency/pitch shifting

Started by David Reid April 20, 2004
"David Reid" wrote:
> Well, i think that's what DirectSound allows you to do when you change the > buffer frequency. If the sample rate of the sound is 44100 and you multiply > by 1.08 approx, the buffer will now contain data for 48kHz playback, which > when played back at 44.1kHz would yield a "faster" sound. This method was > acceptable for the company so that's what im trying to achieve but using a > different sound API (ASIO). So i have to do the sample rate conversions > myself.
Yes - and the good thing is you don't need pitch nor frequency shifting! Just convert the sample rate and there you go... --smb
That's the plan.

--smb

Bob Cain wrote:
> Oh, I failed to ask. Please, oh please, make it > continuously variable under a contour while you're at it. :-) > > > Bob
"David Reid" <dreid_nospam@remove_no_spam_mechtronix.ca> wrote in message news:<mDAhc.57875$Gp4.1315198@news20.bellglobal.com>...
> Well, i think that's what DirectSound allows you to do when you change the > buffer frequency. If the sample rate of the sound is 44100 and you multiply > by 1.08 approx, the buffer will now contain data for 48kHz playback, which > when played back at 44.1kHz would yield a "faster" sound. This method was > acceptable for the company so that's what im trying to achieve but using a > different sound API (ASIO). So i have to do the sample rate conversions > myself.
Maybe, I am misunderstanding something here. If you have original data at 44.1K, then you upsample it at 48K and then if you play it back again at 44.1K, it would yield a slower sound, not faster. Maybe, what you should do is play the data at 44.1K at 48K to shift the pitch higher and for the sound to go faster?
> > I've started looking at the osalp on sourceforge, it has a class that does > sample rate conversions. i think that will be good enough for what i want > to do, but we'll see how it goes. > > Thanks for all your help.
Yes, you are right.  That was a mistake on my part due to being tired .

I've found a set of classes that does what i need.  Thanks for all the help
and brainstorming.

David

"Google User" <someonehr@yahoo.com> wrote in message
news:44fa6d0f.0404220208.4da3f759@posting.google.com...
> "David Reid" <dreid_nospam@remove_no_spam_mechtronix.ca> wrote in message
news:<mDAhc.57875$Gp4.1315198@news20.bellglobal.com>...
> > Well, i think that's what DirectSound allows you to do when you change
the
> > buffer frequency. If the sample rate of the sound is 44100 and you
multiply
> > by 1.08 approx, the buffer will now contain data for 48kHz playback,
which
> > when played back at 44.1kHz would yield a "faster" sound. This method
was
> > acceptable for the company so that's what im trying to achieve but using
a
> > different sound API (ASIO). So i have to do the sample rate conversions > > myself. > > Maybe, I am misunderstanding something here. If you have original data > at 44.1K, then you upsample it at 48K and then if you play it back > again at 44.1K, it would yield a slower sound, not faster. Maybe, what > you should do is play the data at 44.1K at 48K to shift the pitch > higher and for the sound to go faster? > > > > > I've started looking at the osalp on sourceforge, it has a class that
does
> > sample rate conversions. i think that will be good enough for what i
want
> > to do, but we'll see how it goes. > > > > Thanks for all your help.

Stephan M. Bernsee wrote:

> That's the plan.
Yowser! :-) Oh, and while I'm at it, how about leaving the sample values and the first derivative unchanged at each end (for catenating separately scaled regions.) Ah, I'm sure I'll come up with more. I suppose the best place for this would be your site. How's about adding a click box for "Wish List". Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein