filtering

Hi Dose any one know how I might go about programing a band pass filter. (building one using caps and resistors is not an option) thanks

Some of us regularly use filters in our software -- tell us more...

I use Low Pass filters regularly for Low Frequency Vibration. Bandpass filters in software take a [u]lot[/u] more thought.

Im trying to filter out different frequencys from music to control lights. At the moment im trying to get an led to light on every beat.

It looks like you need fft, check on: http://arduino.cc/forum/index.php/topic,51828.0.html

Simpler than an FFT (potentially) is Goertzel’s algorithm.

Google DSP Band pass filter.

so useful links are:- www.commsp.ee.ic.ac.uk/...Digital%20Filter%20Design/2-Digital%20filters%20(IIR).ppt

However note that the arduino is not well suited for the sort of maths involved, that is it is a bit slow to get much of a filter.

Like a dog walking on it's hind legs, the wonder isn't that it does it well, the wonder is that it does it at all. ;)

Is this what you were looking for?

filter library http://arduino.cc/forum/index.php/topic,52681.0

regards,
Jeroen

Many embedded systems are interested in a single or small set of frequencies in an input waveform. The Goertzel Algorithm is a useful tool when these frequencies of interest are known. The Goertzel Algorithm is a specialized algorithm intended to detect the presence of a single frequency. It is implemented in the form of a two-pole IIR filter, though the derivation comes from a single-bin Discrete Fourier Transform output*. *Note: Lyons, Richard. Understanding Digital Signal Processing. Second Edition. 2004.

In other words Goertzel Algorithm useless for Low- Pass- High Band filters.

Duly noted, however:

Im trying to filter out different frequencys from music to control lights

Sometimes posters use the wrong terms (and spellings) when describing their problems.

xtm49: Im trying to filter out different frequencys from music to control lights. At the moment im trying to get an led to light on every beat.

Probably this is something you are looking for. http://arduino.cc/forum/index.php/topic,56331.0.html

http://www.youtube.com/watch?v=PPUPVrPKhEc