Could it be as simple as amplifying into cut off with a transistor or op=20 amp? That should give you a square wave... watch out for ringing though... On 4/7/2012 8:21 AM, 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)? --=20 John Ferrell W8CCW =93During times of universal deceit, Telling the TRUTH becomes a revolutionary act=94 George Orwell --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .