pitch shifting

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

hi,

what is the best way to do pitch shifting in real time? i want to program an octaver for bass.
i thought about doing an fft, halve the spectrum, and transform it back in time domain. but i expect that either i get a big latency when using too much samples or that tracking and acuracy is not very good because of too less samples (especially for low frequencies)

thx tobias

Post

One thing you might be able to do is slice the audio into small fragments and play back each fragment at a different speed. For increaing the pitch, this would mean looping the fragments. You would also need to apply some sort of envelope to the fragments. This is kind of like granular synthesis I guess.

I doubt this is the best way though!

Post

If you only want to make a sound an octave lower, a really sneaky way of doing it is to flip the polarity of every 2nd cycle, and maybe lopass filter to taste.

Only sounds decent on simple (monophonic) sounds.

Forever,




Kim.

Post

You can interpole the samples with a zero, and then filter it at your original sample frequency.

The problem with FFT is that you suppose the signal is periodic, and that's not the case.

Post

Take a look at Perry Cooks STK. There is a delay based pitch shifter in there that sounds sweet..

Paul
__________________________
Paul Chana
Senior Software Engineer
FXpansion Audio UK Ltd

Post

first, thanks for all the answers.

but I think the fft is the best way to do what i want. if anyone is interested, i found a good article with additional c++ code on that theme by Stephan Bernsee:
http://www.dspdimension.com/
look under articles or downloads for "Pitch Shifting using the Fourier Transform"

@miles1981: but you can expect the signal to be periodic for short times, so you can do a fft.

Post

If you just want a standard bass-pedal octaver I'd saying doing it in time-domain is the best method. You can easily play around with different methods then. Adding a filtered "square wave" that changes it's polarity for instance every 2nd time that the input sounds crosses zero. Or every time. Etc. You could expand this into a small "bass synth" (as in "guitar synth" etc) by adding envelope followers, filters and so on.

Happy coding :)
Stefan H Singer
Musician, coder and co-founder of We made you look Web agency

Post Reply

Return to “DSP and Plugin Development”