Message-ID: <36C31416.4C5F@gazonk.del> Date: Thu, 11 Feb 1999 12:32:06 -0500 From: "Foobar T. Clown" Organization: Blurp X-Mailer: Mozilla 3.01 (WinNT; I) MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: sound spectrum analysis References: <19990210163607 DOT 13019 DOT 00000098 AT ng04 DOT aol DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 198.133.110.49 X-Trace: 11 Feb 1999 12:32:36 -0500, 198.133.110.49 Lines: 28 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Cminnican wrote: > > Hi, > > 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. ... I have heard that the fast fourier transform may have > something to do with what I am trying to achieve - can anyone confirm > this? Would I be correct in guessing that you want your visual effects to vary according to the average power level in a few different frequency bands? You could use a discrete Fourier transform (a.k.a., DFT, a.k.a., FFT), but there's another, simpler way. Search the web for "Finite Impulse Response Filter" (a.k.a., "FIR filter," a.k.a., "simulated comb filter," or simply, "digital filter." An FIR filter is extremely simple to implement: Each time you read a new sample from the input, you do a vector multiply of the last N samples by a fixed, N element "kernel." Designing the kernel is the tricky part, but the information is out there on the web and in books. FIR filtering and FFTs are both standard Digital Signal Processing methods. Try asking your question on comp.dsp.