# String Tuner

This application uses independent phase-locked loops (PLL) to track up to 16 harmonics of the string. A band-pass filter at the input of each loop has bandwith ±1 semitone (1/12 of octave).

 This tune is 10 cents lower than B3. This tune is 20 cents higher than B3.

## The string theory

The sound of a vibrating string can be approximated by a harmonic series, a sequence of simple tones (sine waves) with frequencies that are integer multiples of the fundamental. In a chord, some of these harmonics play more important role than the fundamental because they match the harmonics of the other strings. The following picture shows spectrum of 2 notes that make a perfect fifth (7 semitones apart), G3 and D4.

Notice that third harmonic of one string matches second harmonic of the other. They are close enough to be perceived as one tone, but the difference in frequency can produce beats or roughness, making the chord sound dissonant [2].

Many electronic tuners only indicate the fundamental frequency, but the other partials are more important. And these partials are not exact multiple of the fundamental frequency [1].

$f_n = n f_0 \sqrt{1 + B n^2}, \label{partials} \tag{1}$

where Β is the inharmonicity coefficient.

This effect gets more pronounced in higher partials:

Compare this indication with partials computed by (\ref{partials}) for Β = 0.0001 :

Remember that you should always end with tightening the string rather than loosening it. [3]

## References

1. Young, R. Inharmonicity of plain wire piano strings.
Journal of the Acoustical Society of America, 1952 ,vol. 24, p. 267-273

2. Roederer, J.G. The Physics and Psychophysics of Music - An Introduction
Springer, 2009

3. When tuning a guitar... - StackExchange Music.