• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Pitch Detection with AS3

Community Beginner ,
Jun 20, 2011 Jun 20, 2011

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

TOPICS
ActionScript

Views

4.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2011 Jun 20, 2011

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 20, 2011 Jun 20, 2011

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2011 Jun 20, 2011

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 20, 2011 Jun 20, 2011

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...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 02, 2012 Oct 02, 2012

Copy link to clipboard

Copied

LATEST

Hello there,

Have you managed to get this pitch detection algorithm in ActionScript 3?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines