Declan asked:
> Ideally, I'd like to convert my wav file to a series of x-y points, so
> that I can do some fft to generate a list of x-y points for a
> spectrum analysis.
>> Any pointers.
Google for "wav file format"?!? :)
Seriously, this sounds like my final year University project - which
involved running a WAV file through an FFT.
WAV files are actually dead simple. Take a look at:
http://www.technology.niagarac.on.ca/courses/comp630/WavFileFormat.html
The sound data is stored as amplitude, 1 byte for 8-bit mono, 4 bytes for
16-bit stereo, etc. The only tricky bit is writing an FFT that works. (I
remember squashing bugs for days - all of them silly single character
typos).
Of course, you could do it the easy way and use an FFT library and a sound
file filter library:
# apt-cache search fft
fftw-dev - Library for computing Fast Fourier Transforms
fftw2 - Library for computing Fast Fourier Transforms
grace - An XY plotting tool
libwn-dev - Many numerical and memory management functions
libwn6 - Many numerical and memory management functions
mixviews - Powerful soundfile editor.
octave2.0 - The GNU Octave language for numerical computations (2.0 branch)
octave2.1 - The GNU Octave language for numerical computations (2.1 branch)
paul - Yet another image viewer (displays PNG, TIFF, GIF, JPG, etc.)
python-numeric-ext - Extension modules for Numeric Python
python2.1-numeric-ext - Extension modules for Numeric Python
python2.2-numeric-ext - Extension modules for Numeric Python
sfftw-dev - Library for computing Fast Fourier Transforms
sfftw2 - Library for computing Fast Fourier Transforms
synaesthesia - A program for representing sounds visually
And:
# apt-cache search audio files library
libsndfile-dev - Library for reading/writing audio files
libsndfile0 - Library for reading/writing audio files
Should be enough to get you started?
HTH,
- Matthew
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!