fft of a dat file?

Steven D'Aprano steven at REMOVE.THIS.cybersource.com.au
Wed Mar 25 07:45:03 CET 2009

On Wed, 25 Mar 2009 11:26:00 +0530, Soumen banerjee wrote:

> Hello,
> I'm kind of new to python and i wanted to do a little project, make a
> frequency plot of some wav audio. I have been following this webpage
> http://www.acronymchile.com/sigproc.html and have got to the making of a
> dat file containing the samples and time of sampling. The question here
> is how do i use FFT.fft to actually take an fft of this dat file since
> the first two lines are useless and also we have a \r\n after every
> sample. Also i would like some explanation on what FFT.fft expects as
> input. Does it expect the sampling times also or only the sampling
> values?

Did you follow the instructions in the webpage? I quote:

"Analysing the Signal
This is really quite easy, assuming you have Numerical Python and the FFT 
modules installed. Continuing from our last code snippet, where "out" 
contains a list of the samples from our sound file, the following gives 
us an FFT: 

import Numeric
import FFT

It is as easy as that!"

Have you done this? Did it work? If not, what error did you get? If it 
did work, then what's the problem?


More information about the Python-list mailing list