Use DFT or Wavelet Transform, signal doesn't have to be clean/ideal. I did it in VHDL, don't know about PIC implementation, -maybe- dsPIC. On Sat, Apr 7, 2012 at 3:21 PM, V G wrote: > Hi all, > > 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. > > I used my oscilloscope to look at the signal generated by the guitar, and > it's pretty clean, but it: > > 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) > > 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)? > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .