- The frequency of a quarter tone:
Your first method with, the square root of the product is theor geometric mean, and is correct. If you're using a spreadsheet like Excel or Google Sheets, you can use the =GEOMEAN (f1,f2)
function as a shortcut. This will actually calculate the midpoint between any two pitches, for example with A4 = 440 Hz and A5 = 880 Hz, the midpoint is √(440 * 880) = 622.25 Hz, which is E♭5.
- Map each frequency I get to a Note:
You have to select a base frequency first, and calculate the number of quarter-tones difference from that base, using:
Q = 24 × (log (f / f0) / log (2))
Where Q is the number of quarter-tones, f is the frequency, and f0 is the base frequency. Q will be negative for pitches below f0.
For your example pitch of 160.11 Hz and A4=440 Hz as the base frequency, I get -35 quarter-tones, or an octave and 11 quarter-tones down, which is correct for E𝄳 (E half-flat).
If your calculator or software can do logarithms in any base, it's simpler if you use the base 2 logarithm and this form: Q = 24 × log2 (f / f0). In Excel, it would be =LOG(F1/F0,2)
.
If you start with a frequency in between two quarter-tones, you won't get an integer. You can round if you like.
It might be helpful to go the other way around and generate a list of frequencies for each note. You would use
f = f0 × 2 Q / 24.
If you increment Q by 0.5 you can get the (eighth-tone) boundary between two quarter-tone pitches if that's useful.
- In some tuners I see that they pick a little different numbers for the Notes:
It's hard to say without knowing which tuner you're talking about, and how much difference. It might be as simple as a rounding error. It could also be that the tuner is set to use something other than equal temperament.