Audio file to FFT

I want to use FFT to separate the frequencies from the audio file. Now, I can use FFT to separate the frequencies from the function generator by using adc signal. Did someone know the way to convert the audio file to adc signal or it have another way to do

Thank you for help

I've never used FFT, but you can perform FFT on a sequence of samples from a file just as you can on a sequence of samples in real-time.

In some applications it's easier to process the data from a file precisely because you don't have to worry about the processing time... You can do it faster if the processor is fast enough, or you can take your time if the processor is not fast enough.

DVDdoug:
you can perform FFT on a sequence of samples from a file

How? can you explain more, I don't know how to read the audio file on arduino. I can use FFT from the adc port but I don't know how to use it with the audio file.

Thank you for replied

Try the [u]SD Library[/u]. (You'll probably need an SD Card or some kind of external memory to hold the audio file, due to the Arduino's limited memory.)

If you want to read a WAV file and you don't know how, [u]here[/u] is some information on the WAV file structure. If you know the sample rate, bit depth, and number of channels, you can probably skip-over the header and just read the sample data.

8-bit WAV mono files are fairly easy, but they use unsigned bytes so you have to subtract-out the bias (just as you have to subtract-out the bias from the Arduino's ADC which doesn't go negative). Or with FFT, you can probably just ignore the DC (zero Hz) component.

With 16 or 24-bit files and/or stereo files (signed integers) you have to get the byte-order and sequence correct to "reassemble" the samples.