[sdiy] Chromatic Tuner Design

rburnett at richieburnett.co.uk rburnett at richieburnett.co.uk
Thu Feb 7 10:55:06 CET 2019


Polyphonic pitch detection is a different kettle of fish altogether.  
FFT surely works better than AC or AMDF/ASDF for polyphonic content, but 
I wonder how well it works when one of the strings is badly out of tune 
and close to the frequency of another string?! :-O  It's going to take a 
big FFT on a relatively long recording to be able to resolve frequency 
components that are close together into separate bins.

-Richie,


On 2019-02-07 09:30, Steve wrote:
> Ah, thanks for the details. It does all make sense.
> What I remember this being used in was a tuner that would show you the
> tuned/sharp/flat status of 6 strings of your instruments in parallel
> for one strum, and thus which ones needed tuning. There were
> considerations of not minding a missing fundamental, depending on some
> conditions. Perhaps more of a hack that seemed to work for the
> intended scenario. I Don't remember all the details, and I obviously
> did not implement that part :)
> 
> VON: "Richie Burnett" <rburnett at richieburnett.co.uk>
> 
> Interpolating the spectrum with a polynomial is one way to infer the
> true frequency of spectral peaks that lie in between FFT bins. This
> works with some success provided there isn't too much noise or other
> tones contributing to the adjacent bins.
> 
> Another method of getting finer frequency resolution from the FFT is
> to perform two consecutive FFTs on the signal and then look at how
> much the phase has changed in the dominant bins from one FFT frame to
> the next. Again this is susceptible to noise though and doesn't work
> if there is more than one tone contributing to the magnitude and phase
> in a given spectral bin!
> 
> In my opinion Autocorrelation or AMDF deal much better with complex or
> difficult signals for pitch detection than the FFT does. For example
> think of what the first dominant spectral bin would be for the FFT of
> a harmonic waveform that just happens to have its fundamental
> frequency absent. Whereas AC or AMDF don't care if the fundamental
> frequency is missing, they just look for time-domain periodicity, so
> aren't so easily tricked.
> 
> They also take the entire waveform into account so aren't so easily
> tricked by complex waveforms that cross zero several times during each
> period. Whereas squaring up the audio waveform with a comparator and
> either counting the zero-crossings or measuring the time between
> zero-crossings are both doomed to failure on all but the simplest of
> waveforms like sine, tri, sqr, etc...
> 
> FFT also has a lot of latency for pitch detection because you have to
> buffer up a full frame of audio data before you can even start to
> transform it into the frequency domain and begin looking for spectral
> peaks.
> 
> -Richie,
> 
> Sent from my Xperia SP on O2
> 
> ---- Steve wrote ----
> 
>> Don't both with FFT for pitch detection. It has loads of latency,
> poor pitch resolution
> 
> Although that can be alleviated by using a center frequency estimator
> on FFT peaks?
> I have no mathematical clue how real the seeming gain in accuracy is,
> I just know this has been used in a tuning product.
> Some are described here:
> http://www.ericjacobsen.org/fe2/fe2.htm
> 
> VON: "Richie Burnett" <rburnett at richieburnett.co.uk>
> 
> Look up autocorrelation and AMDF. These are techniques used for
> detecting periodicity in complex waveforms.
> 
> Don't both with FFT for pitch detection. It has loads of latency, poor
> pitch resolution, and is easily tricked by a missing fundamental.
> 
> -Richie,
> 
> Sent from my Xperia SP on O2
> 
> ---- oren levy wrote ----
> 
>> Hi All,
>> 
>> I realize this isn't directly synth related but it's audio related
> electronics.
>> 
>> What are the preferred methods nowadays for designing accurate
> chromatic tuners for a range of instruments? I'd like to put together
> a chromatic tuner that I can hang on the wall that has a built in
> microphone to help tune instruments ranging from a bass (let's say
> 30Hz) up to maybe 2k with better resolution than a snark tuner. The
> idea being that I can just play an open string on an acoustic guitar
> and look at the wall to see how far off I am. Or play an oscillator on
> my modular through my speakers and tune it.
>> 
>> I am aware of two ways of going about it at the moment: measuring the
> period of the wave and doing an FFT.
>> I can take the mic signal and condition it and square it off through
> a comparator to get a clean pulse to measure the period on a uC but I
> worry that some instruments put out some funky waves.
>> 
>> Are there any newer or more novel ways to measure the frequency of
> funky waves as low as 30Hz?
>> 
>> Rock & Roll,
>> Oren Levy
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at synth-diy.org
>> http://synth-diy.org/mailman/listinfo/synth-diy
> 
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy


More information about the Synth-diy mailing list