Recently became interested in analyzing audio files.
My task this - read the source file and make him FFT...
Here such I turned the code:
I do not know if he is right, but he will come out about the following values: (here are a few for example)
In general please help fix bugs in it (if any)
Thanks in advance!)
LenGrand Bibi wrote:I do not know if he is right, but he will come out about the following values: (here are a few for example)
1. I've moved your post, because it's definitely not for beginners.
2. I have no idea how the FFT algorithm works, but you should be aware that Java int's are signed, so the bit reversal stuff you have going on might produce anomalous results.
Your FFT method just swallows the results! The FFT can be done in place so there is no need to create copies of the data. Just change to
and remove the code to copy the values for the input arrays to the xReal and xImag arrays. By doing this the FFT results will be available in the input arrays.
A quick simple test of your FFT methd using
indicates that the FFT is probably implemented correctly but one needs to do much more extensive testing to be certain. The 'bit twiddling' is correct.
The decode() method will only work for one format of audio files (little endian signed) so you will need to deal with other encoding.
One major problem you seem to have is in understanding what the results of the FFT mean. For that you need to spend some time learning about spectral estimation which means you will need a thorough understanding of Fourier transforms and in particular the Discrete Fourier Transform. I have a strong background in this and I can help but forums are very poor for '1 on 1' teaching of complex topics so you will need to spend a lot of time reading books and articles.
LenGrand Bibi wrote:, if I suddenly want to here these results (after conversion) converted to mel cepstral coefficients, the fact that this should be done?
what it does take to do?
I had never heard of the "mel cepstral coefficients" until you mentioned them so I can't help with that aspect. My music player only displays the short term spectrum but now I know it exists when I get some spare time I might try at some point to add to it a plot of the "mel cepstral coefficients".
The final path (If I understand correctly) is obtained as follows:
FFT ( we've already done it)) ---> mel transformation ( translate values that we received after the FFT in Mel ) ---> Discrete Cosine Transform ----> MFCC \o/
What do you think about this?
Note - though not the most efficient method of computing the DCT, it is possible to use the FFT to do much of the work of computing the DCT.