On Sat, 2012-04-07 at 08:21 -0400, V G wrote: > Hi all, >=20 > What algorithms/filters/whatever would I start looking into to use a > microcontroller/FPGA/digital ICs/analog components to detect the frequenc= y > of a single audio source such a as an electric guitar input? I don't real= ly > even need the actual frequency number, I just somehow need to convert the > input wave into a square wave/pulse that can be used to pulse an LED, for > example. >=20 > I used my oscilloscope to look at the signal generated by the guitar, and > it's pretty clean, but it: >=20 > 1. doesn't look exactly like a sin wave > 2. decreases in amplitude over time (and becomes almost exactly like a > sawtooth wave at low amplitudes) >=20 > How would I go about extracting the frequency out of this, or getting a > clean pulse corresponding to the frequency (like a square wave, or > whatever)? Do a transform in to the frequency space (DFT or others depending on what hardware you've got) and usually just select the biggest peak. You might have program a little more intelligence then that if you the guitar is being put through distortion stuff, but I doubt it. If you're update rate is low (say 5Hz) you have lots of options. TTYL --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .