pitch shifting
-
- KVRer
- Topic Starter
- 23 posts since 12 Jun, 2004
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
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
-
- KVRian
- 922 posts since 26 Mar, 2003 from Guildford, England
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!
I doubt this is the best way though!
-
- KVRAF
- 4692 posts since 28 Jan, 2003 from In these very interwebs
-
- KVRian
- 1379 posts since 26 Apr, 2004 from UK
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.
The problem with FFT is that you suppose the signal is periodic, and that's not the case.
-
- KVRian
- 742 posts since 22 Jun, 2004
Take a look at Perry Cooks STK. There is a delay based pitch shifter in there that sounds sweet..
Paul
Paul
__________________________
Paul Chana
Senior Software Engineer
FXpansion Audio UK Ltd
Paul Chana
Senior Software Engineer
FXpansion Audio UK Ltd
-
- KVRer
- Topic Starter
- 23 posts since 12 Jun, 2004
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.
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.
-
- KVRAF
- 4641 posts since 20 Feb, 2004 from Gothenburg, Sweden
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 :)
Happy coding :)
Stefan H Singer
Musician, coder and co-founder of We made you look Web agency
Musician, coder and co-founder of We made you look Web agency