This content has been marked as final.
Show 19 replies

15. Re: audio files real and imaginary data for FFT
801494 May 3, 2010 3:27 AM (in response to 801494)Just a another question  hope you get this.
here are some of the figures in the float array after the FFT was performed
1373.0
1242.0
1104.0
994.0
911.0
837.0
802.0
798.0
845.0
896.0
969.0
1044.0
1136.0
1220.0
1306.0
and here they are after the FFT
887053.0
55940.547
39998.695
8833.956
35591.523
38889.035
22612.11
33931.066
28203.643
111110.01
48288.0
4454.8623
74990.67
28749.047
57473.074
do these values look right to you?
also, If you look at the parameters of the FFT function above, one of them is int n, which I assumed had to be the number of samples. but when I put the number of samples in it came up with an array out of bounds exception so I used a smaller number (30000) for n and it came up with some results as shown above initally but the last of the results were the same as before the FFT.
is the entire original array meant to be full of entirely different results?
cheers for your help  it is truly appreciated 
16. Re: audio files real and imaginary data for FFT
843853 May 3, 2010 7:00 AM (in response to 801494)It's impossible to tell whether or not they are OK from just that small sample of the input. To test this you have to work with an input that you know the output for. For example, find a sound file with a single frequency and make sure that the dominant component in the transformed data represents that single frequency.
You don't appear to have spent enough time reading about the signal processing aspects of this work. Until you do so you will not be able to decide whether or not what you are seeing is correct and what pre and post transform processing is required. 
17. Re: audio files real and imaginary data for FFT
843853 May 17, 2010 3:34 PM (in response to 801494)ultiron wrote:
Sorry for jumping on board late on this, but I was recently involved with a project that involved some realtime audio analysis using a convesion to the frequency domain. As I understand it (I didn't do much on the soundanalysis side), an FFT's real parts give you the power of frequencies whereas the imaginary part gives you information on phase. If you aren't interested in the phase (we only cared about frequency), you might be interested in a [Discrete Hartley transformhttp://en.wikipedia.org/wiki/Discrete_hartley_transform] which basically is a discrete Fourier transform but ignoring imaginary values.
cheers for the help on the floats. I'm working on that now.
Im totally unsure on how to interpret the complex data. I was going to work it out when I got that actual FFT itself working. 
18. Re: audio files real and imaginary data for FFT
801494 May 17, 2010 10:19 PM (in response to 843853)cheers for the reply! I would have probably used the algorithm you talked about but the project I was working on is over now. Still good to know though. 
19. Re: audio files real and imaginary data for FFT
843853 May 17, 2010 10:47 PM (in response to 843853)endasil wrote:
No! Very very very wrong! The real parts represents the 'cos' magnitude at a particular frequency and the imaginary parts represent the 'sin' magnitude at a particular frequency. The atan2() of the (real,imag) pair is the phase and the sqr(real) + sqr(imag) represents the power. BUT  one has to deal with 'windowing' which smears neighbouring estimates and to deal with noise which can bias the estimates.ultiron wrote:
Sorry for jumping on board late on this, but I was recently involved with a project that involved some realtime audio analysis using a convesion to the frequency domain. As I understand it (I didn't do much on the soundanalysis side), an FFT's real parts give you the power of frequencies whereas the imaginary part gives you information on phase.
cheers for the help on the floats. I'm working on that now.
Im totally unsure on how to interpret the complex data. I was going to work it out when I got that actual FFT itself working.
If you aren't interested in the phase (we only cared about frequency), you might be interested in a [Discrete Hartley transformhttp://en.wikipedia.org/wiki/Discrete_hartley_transform] which basically is a discrete Fourier transform but ignoring imaginary values.
Very much a distortion and an over simplification.
Please please please spend some time learning about signal processing before commenting on signal processing issues.