[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
<AUDITORY> Re: Frequency Content
very compact C code for Fourier transforms is available in a book called Numerical Recipes by Press et al., which is widely available. Copy your 512 chars to an array of 512 floats, then use the function "realft" to convert this inline to a spectral representation (you also have to type in the function "four1").
As for the result, data*data is the direct-current power (f = 0), and data*data is the power in the highest frequency, which is half of the sample rate.
The first genuine frequency power (f = sample rate divided by 512) is data*data+data*data, the second frequency power (f = 2 * samplerate/512) is data*data+data*data, and so on, up to data*data+data*data, which is the power at f = 255 * samplerate/512.
Institute of Phonetic Sciences, University of Amsterdam
Herengracht 338, 1016CG Amsterdam, The Netherlands