Mail Archives: djgpp/1999/02/11/12:51:18
Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk> wrote:
> Cminnican writes:
> > I am interested in writing some code to analyse sound in realtime
> > through the line in input on my soundcard. I would like to be able
> > to extract certain frequencies from the incoming sound and use these
> > values to create visual effects that respond to the music as it is
> > playing.
>
> You need to do a Fourier analysis of the input data. That's quite a
> complex operation, but you can probably find some code for it on the
> net (sorry, I don't know where). Alternatively, you should be able
> to find descriptions of the algorithm in a computing or math textbook:
> check the library.
Some recomendations about the topic:
1) Use an integer math version of the FFT algorithm. It works even in 486 PCs
and you can update the screen at 70 fps.
2) Apply some windowing algorithm to the data or you'll calculate the
spectrum of the rect and the data (convolutioned).
3) Look in some DSP or Signal processing book to find the algorithm. Some
years ago I adapted one for the Intel 8096 family of processors to C + i386
code, the algorithm was *very* fast.
SET
------------------------------------ 0 --------------------------------
Visit my home page: http://welcome.to/SetSoft
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013
- Raw text -