The secret of Accurate Tuner for Windows Phone– it works like a human ear


Accurate Tuner demoed on Nokia Lumia 800

“If a lute player has lived eighty years, he has surely spent sixty years tuning.”

Johann Mattheson, German composer, ca. 1720

The ability to tune a musical instrument – a musical ear – is still a fundamental skill for any musician. But tuning by ear is hard, takes time and the result is rarely perfect. Some instruments are a true challenge to get perfectly in tune. It may surprise you, but even a guitar belongs among these hard to tune instruments, as the major third between G and B (3rd and 2nd strings) has to be in fact slightly out of tune to be tuned properly.

The recent explosion of electronic pitch tuners has solved this issue for many musicians. But these tools cost money and people don’t have them always in their pockets. The smartphones come to help here. The computing power of these small beasts is good enough for quite advanced DSP processing and tuners can be realized in software.

Hardware Pitch Tuner
Hardware Pitch Needle Tuner

Today, there are hundreds of pitch tuning apps on all smartphone platforms and even the youngest platform – Windows Phone – already enjoys dozens of tuners in the Marketplace. But there is a small ugly secret I am going to share with you: 95 % of these apps are unusable. It is true for all platforms. For example, almost all iOS tuners are beautiful, with gorgeous and handy UI, but only about 1 out of 20 of them has the right mix of precision, speed and other features to be usable and reliable enough in practice.

In this article I am going to concentrate on needle phone tuners and to pick just one of their common pitfalls. And I am even going to broadly explain how it is solved by Accurate Tuner for Windows Phone, although do not expect any source code.

Needle tuners are the simplest ones to use. They show a measured tone pitch in a very natural way by a needle, LEDs or other “analog” indicator. They also usually show a note in a scientific notation, for example “C4″ (C = note, 4 = octave). And this is a common issue with phone tuners, as the letter and number are often wrong and constantly changing. Let’s explain why it happens.

Needle tuners analyse the sound signal by a complex scientific algorithm – Fast Fourier Transform (FFT). FFT transforms the signal into the graph, where the X-axis is a frequency and Y-axis is an amplitude. Peaks denote dominant frequencies.

A typical FFT graph of one musical tone
A typical FFT graph of one musical tone (Click to Expand)

As you can see, there are several frequencies in this signal. But in fact, this is the frequency analysis of just one tone, namely one string of a guitar. And now the fun fact comes: For musical tones, this is always the case! There are always 4-12 peaks for any given note, because every musical tone is composed of harmonic (partial) frequencies. Usually they are integer multiples of the fundamental frequency.

In the above illustrated case, the fundamental frequency (the 1st harmonic) is the strongest one, but it isn’t the rule. Quite often the 2nd, 3rd or 4nd harmonics are stronger than the 1st one, so if the tuner just shows the strongest harmonic, it shows it +1 octave, +1 octave and 1 perfect fifth or +2 octaves higher! And these notes are constantly changing.

Most often just the octave is wrong, while the letter is correct. Cheap hardware tuners solve this issue the easiest way – they just don’t show the octave. See the Artisan WCT-50 picture above – there is no octave number shown. C is always C, but the device is not sure about its octave. To be honest, you rarely need to know the octave during tuning.

On smartphones this issue is even more pressing, as typical phone microphones have weak frequency response under 100 Hz, which makes those peaks smaller for frequencies under 100 Hz. Thus phone tuners struggle with the lowest guitar string E2 (82,41 Hz) and the lowest bass string E1 (40,20 Hz) is usually completely unreachable by them.

Let’s record a guitar’s E2 on Samsung Focus Flash. This is the recorded signal:

Signal of E2 note played on guitar
Signal of E2 note played on guitar

And this is the FFT output:

FFT analysis of the guitar's E2 string sound
FFT analysis of the guitar’s E2 string sound

As you can see, both 2nd (E3) and 3rd (B3) harmonics are stronger than the 1st one, E2, which is the correct note! Frequencies below 100 Hz are just quieter for the microphone of Focus Flash and other phones are no better. Still, Accurate Tuner is able to identify it correctly:

Accurate Tuner Screenshot - note E2
Accurate Tuner Screenshot – note E2

Note: The list of harmonics and the wave shape slightly differs from above graphs, as it isn’t taken in exactly the same moment. The frayed wave shape was caused by some background noise. Also, there is a known bug in AT that the 2nd harmonic is always skipped in the list – it will be corrected in the next upgrade.

How is this possible? Accurate Tuner analyses all the harmonics, not just the strongest one. In some cases it is even able to compute the fundamental frequency from the higher harmonics even if it’s completely lost in a background noise.

A human ear works the same way. Its pitch sensitivity is much worse in very low frequencies, but a listener knows for sure this is E2, not E3. A trained musician is able to measure low musical tones ten times better than is anatomically possible, because his brain hears the tone in its complexity and analyses all its components, not only the lowest one. However, it doesn’t work for any tone or sound, just for harmonically rich sounds, as tones produced by musical instruments typically are.

If you buy the paid version of Accurate Tuner Pro, you can model harmonically poor or rich tones in its Tone Generator by setting the levels of harmonics. If you have two phones, you can use it for testing of Accurate Tuner and other phone tuners. As you can guess, best tuners will be more precise with more harmonics present in the sound. Of course, for best results you should use solid external speakers.

Accurate Tuner Screenshot - Tone Generator (paid version only)
Accurate Tuner Screenshot – Tone Generator (paid version only)

DOWNLOAD FULLY WORKING ACCURATE TUNER FREE NOW!

Paid Pro version with more features is available too. For $2.99 it supports a lot of alternate instrument tunings and temperaments, offers screen lock blocking, tone generator and other features.

Some links in the article may not be viewable as you are using an AdBlocker. Please add us to your whitelist to enable the website to function properly.

Related
Comments