> David, here are a few suggestions for a solution to your problem with
> harmonics:
>
> 1) Use a dual speed PLL to initially lock onto the strong fundamental
> in 'fast' tracking mode and then automatically switch to 'slow' mode
> to stay locked onto the decaying fundamental (decrease capture
> range). The 'fast' speed would be optimized to lock onto the
> fundamental quickly and the 'slow' speed would be fast enough to
> track tuning variations but too slow to 'jump' over to a harmonic.
> The fundamental could then be measured by coupling the vco to the
> pic.
>
> 2) Use zero crossing detection. It has the unique property of allways
> digitizing the lowest frequency, even if its not the strongest.
> A well designed front end, and possibly threshold tracking to
> maintain sensitivity could be used to extend its range.
>
> 3) Use a switched capacitor filter with external clock input configured
> as a 'comb' filter. Lock on to the fundamental and feed it into the
> filter's clock, thereby attenuating its harmonics. Something
> creative would need to be done here to aquire the fundamental in the
> first place.
>
> 4) Use the pic to implement an FIR or IIR filter.
>
> 5) Use the pic to integrate its measurement of frequency and then use
> that to detect the rate-of-change. If the rate of change (slope)
> exceeds a pre-set value then we know the detection circuitry has
> switched from the fundamental to a harmonic. At that point in time
> divide the new frequency measurement by the fundamental to calculate
> the harmonic factor and use that factor in subsequent calculations.
> This idea would work best if the signal were processed first by a
> PLL to lock onto a single spectral component. In fact, you could use
> the lock detection circuitry of the PLL to detect when the
> switchover to a harminic occurs.
>
> 6) Can you tell if a note is sharp or flat from its harmonic as well as
> from its fundamental? If so, then use a PLL front end to purify the
> spectrum (one frequency at a time) and do your function on the VCO
> signal.
>
> 7) Use an analog input and implement a PLL in pic firmware, using a
> combination of the above ideas.
>
> I really know absolutely nothing about music, but I hope these ideas are
> usefull, or stimulate the formulation of new ones.
>
> Regards, Dana Frank Raymond - Foxtrot Systems Ltd.
> Internet:
dana.raymond
spam_OUTcanrem.com. Compuserve: 73362,3052