Clip on guitar tuner

I helped another recently make a guitar tuner. We made an opamp circuit with a DC offset to amplify the guitar string frequency, feeding this into a digital input. We then used micros() to count how long the signal was high for, giving the frequency.
Our guitar had a preamp, so didn't need to generate a sound, but a small microphone would do the job