Hi !
I’d like to know if it was possible to take one sound and modify it in a way to get a different octave of the same sound.
I guess I could:
-compute the FFT of my sound
-find the central frequency (may be hard for some sample…)
-modulate my frequency to the octave I want: sig*exp(2*i*PI*Fmod*t)
Does anyone have a more precise idea ? There must be some nice library doing this I guess…
Firstly, how are you playing back your sound? using ofSoundStream or ofSoundPlayer?
Maybe what you want is setFrequency () on the FMOD channel. It’s not part of the ofSoundPlayer but if you read up on the FMOD api you should be able to add it fairly easily.
Using an FFT for a pitch shift, if done properly will give you a better result but is much more computationally expensive.
simply playing it at double the speed will play one octave higher, and half the speed one octave lower. Of course the duration will change too. If this is not the intended effect, and you’d like to change the pitch without changing duration you need to look into time-stretching / pitch-shifting (flip sides of the same coin).
a few things got mangled a bit in the editorial process or got formatted weird. Luckily, I’ve had a few sharp readers pick those things up and point them out.
I quickly looked at your octaveDown function during a break.
It seems to be more a low pass filter than a function to get one octave down.
The name may be a bit misleading !
I’ll keep on reading tonight
smbPitchShift seems to be what I need