The problem is that if you want to remove the harmonics well,
you need a very sharp filter. If you had only a single note,
you would tune the filter to put the cutoff just above the
fundamental, so the 2nd harmonic would be well attenuated.
You could select a suitable filter by consulting a filter design
book, which shows the responses of various filter types and
orders (at roughly 2 orders per op-amp stage). What you would
quickly discover is that a really sharp cutoff requires a lot of
stages, and the values of their components have to be really
close tolerance.
But that's for a single, fixed-fundamental note. If you play another
note into that same filter, the alignment won't be correct: If the
new note is a bit lower, its 2nd harmonic will now fall in the
passband of the filter. If the new note is higher, the fundamental
will fall in the stopband.
Don't bother to think about trying to make the filter adjustable
to somehow track the note being played: Such a many-stage
filter with lots of critical components is really tough to adjust
dynamically, but that's not the problem... it's figuring out
what the fundamental is that you want to tune it to! This
is called "pitch tracking" and it is a non-trivial problem.
It's especially difficult for plucked strings like a guitar
because the "2nd harmonic" is not exactly twice the
fundamental, but moves around as the note attacks and
decays. That means that the 2nd harmonic sort of
"rolls through" the fundamental waveform, so simple
schemes that look at waveform zero crossings get really
confused.
Perhaps if you explain what your ultimate goal is, we
can give better suggestions. But basically, you will need
to use digital methods if you are serious about pitch
extraction, and even then this is just "borderline" possible.
Best regards,
Bob Masta
D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Signal Generator
Science with your sound card!