Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: Shawn Hargreaves , djgpp AT delorie DOT com Date: Thu, 11 Feb 1999 14:53:50 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: sound spectrum analysis In-reply-to: <8D53104ECD0CD211AF4000A0C9D60AE3511F54@probe-2.acclaim-euro.net> X-mailer: Pegasus Mail for Windows (v2.54) Reply-To: djgpp AT delorie DOT com Shawn Hargreaves 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