Copy link to clipboard
Copied
Hi all,
I'm working the last two weeks on a module which uses computeSpecturm() to analyze FFT data from a mic.
I'm currnetly trying to figure out a way to detect the pitch on each 'sample' of this sound.
Does any one know how to find the fundamental frequencty or how to use auto-correclation on the FFT to get the pitch?
If more info required, please feel free to ask me!
Thank you in advance
initcode
Copy link to clipboard
Copied
you'll need to apply a fourier transform to obtain frequency data from a sound wave. you'll need to encode that yourself.
Copy link to clipboard
Copied
Hi kglad,
I already have the FFT from the computeSpectrum()...
I was using the highest peaks assuming that this is the correct funtamental frequency, but I was getting funny results.
After spending hours in various blogs, discoverd that hightest peak is not always the fundemantal frequency...
So now I'm trying to understand autocorrelation to apply it in Flash!
Any thougths?
Copy link to clipboard
Copied
the fundamental frequency would normally be the lowest pitch frequency. but with all the pitch bleeding from flash'es handling of sound, i would expect you to have difficulty picking it out.
Copy link to clipboard
Copied
I'm afraid is not the lowest or highest...
If you check here:
http://stackoverflow.com/questions/6283104/pitch-detection-with-computespectrum-return-fft-values/6297292#6297292
so what I'm trying to figure out is how to write down that formula:
IFFT(FFT(signal)â‹…FFT(signal)*)
in Actionscript.
I managed to find and I'm currently using, some very useful FFT and IFFT function from here:
http://gerrybeauregard.wordpress.com/2010/08/03/an-even-faster-as3-fft/
(click source to get the code, at the end of Gerry's post)
Another very useful link is:
http://cnx.org/content/m11714/latest/
which explaings the Pitch Detection Algorithm on a bit more detail...
Copy link to clipboard
Copied
Hello there,
Have you managed to get this pitch detection algorithm in ActionScript 3?