tag:blogger.com,1999:blog-10811201.post115075571225081102..comments2022-03-21T15:18:46.067+01:00Comments on Squobble Blog: Speech Analyzer v1.0Steven Van Vaerenberghhttp://www.blogger.com/profile/06370501234218207306noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-10811201.post-33260476444204751572009-01-05T10:26:00.000+01:002009-01-05T10:26:00.000+01:00Hi Jeff,I closed this project a few years ago, and...Hi Jeff,<BR/><BR/>I closed this project a few years ago, and I don't recall exactly what coefficients the FFT function returns. But supposing it is just an array of Fourier coefficients of length N/2, then you get the fundamental frequency by taking into account that index i in your array corresponds to frequency 2*(i-1)/fs, where fs is your sampling frequency.<BR/><BR/>If it still doesn't make sense, try plotting the entire array of absolute values of cf for a simple signal (i.e. a sine wave). You should see a very distinctive peak in the diagram.Steven Van Vaerenberghhttps://www.blogger.com/profile/06370501234218207306noreply@blogger.comtag:blogger.com,1999:blog-10811201.post-86758347612767935972008-12-28T10:08:00.000+01:002008-12-28T10:08:00.000+01:00I am trying to use Exocortex to extract the pitch ...I am trying to use Exocortex to extract the pitch (fundamental frequency) of a wav file. The wav sample is just a single tone. I am able to create a Complex array and FFT it, but how to determine pitch from the FFT'd array? Numerical Recipes in C hinted that you find the maximum absolute value of the array and the index is the pitch:<BR/><BR/>Exocortex.DSP.Fourier.FFT(cf, Exocortex.DSP.FourierDirection.Forward);<BR/> int fundamental_frequency = 0;<BR/> for (int i = 0; i < 1024; i++)<BR/> {<BR/> if ((Math.Pow(cf[i].Re, 2) + Math.Pow(cf[i].Im, 2)) > (Math.Pow(cf[fundamental_frequency].Re, 2) + Math.Pow(cf[fundamental_frequency].Im, 2)))<BR/> {<BR/> fundamental_frequency = i;<BR/> }<BR/> }<BR/> textBox1.Text += fundamental_frequency.ToString();<BR/><BR/>But these results dont make much scense.<BR/><BR/>Tnx for any help with this.<BR/>jpreston12 at hotmail.com<BR/>jeffUnknownhttps://www.blogger.com/profile/13853999784684911297noreply@blogger.com