NOTE: Version 16 (2020/10/24) updates to a new version of the Android SDK. That's 10 years of SDK updates in one step, so contact me if you have trouble!
TunerTime is a tool for visualizing sound, a detail-oriented augmentation for the human ear. It can be used to tune pianos, and for many other uses.
Its primary mode operates on the same principle as a strobe tuner. The strobe mode shows you a very precise and nuanced picture of the frequency of a tone as it relates to an ideal reference.
It also has an FFT mode, or spectrum analyzer. This produces a real-time spectrogram, allowing you to easily see harmonics and relationships between sounds without knowing the frequency beforehand. This is for more than just tuning, I use it to understand everything from melodies to insect sounds.
I had Piano Servicing Tuning & Rebuilding by Arthur A. Reblitz and a very old piano by my side while I was writing this software. I have since used it to help me tune 4 pianos, and I wouldn't change a thing about it.
Yeah, TunerTime is a dumb name for this program. You should say it as if you were saying "it's tuner time." The same way you might say "it's dinner time," but perhaps with less anticipatory salivation.
The strobe mode is based off of an electro-mechanical spinning-disk strobe tuner, except instead of appearing like it is spinning forward or backward depending on the frequency, the dividing line between red and green bands moves up and down the screen.
Intro for electronics nerds: Imagine a CRT, with the electron beam intensity controlled by the signal from a microphone, and the horizontal sync is at the reference frequency you're aiming for. The vertical is unsynchronized, wrapping when it hits the bottom. The microphone input passes through a long-roll-off bandpass RC (IIR) filter centered on the reference frequency. Flip it over sideways and you've got TunerTime's strobe mode.
Just start up the app, set it for a note (semi-tone and octave) in the range of your instrument, and then bang on or blow into your instrument. Sing if you dare, but beware the human voice is incredibly unstable.
If the note is flat, the red and green lines will slope down. If it is sharp, they will slope up. If it is very sharp or very flat (or you set it for the wrong note), the lines will appear vertical or messy. If it is sounding a beat note (perhaps due to resonating with other parts of the instrument), the lines will be wavy.
Another thing to do is set TunerTime to E-5, and then sound an A-3. Notice how the 3rd harmonic of A-3 shows up in the E-5 strobe. The 3rd harmonic is 1901.955 cents (1 octave, 7 semitones, and spare change) higher than the fundamental. C'est la vie.
Three harmonics are shown at once, by default showing the two upper octaves.
The small vertical yellow lines along the bottom of the strobe bands represent 1 second intervals. If it takes 1 second for the green line to go from the top to the bottom and wrap around, then it is 1 Hz flat.
Tap on the strobe display to pause.
Tap on the "tone" button to toggle playback of a reference tone, so you can hear what fundamental the strobe display is aiming for. While the reference tone is playing, a few interesting effects may be observed.
It is a self-test, if the display is not showing perfectly horizontal red/green bands (in tune) in the top strobe display, there is a problem. If they gently but consistently slope one way or the other, that indicates a calibration failure in your phone's audio hardware. If there are erratic phase changes (the line jumps up and down even without background noise, or doesn't return to the same level once the noise stops), it indicates buffer overruns or similar (e-mail me!)
Background noises (talking, etc) show up as intermittent phase discrepancies.
If the fundamental display is showing an octave high (i.e., red/green/red/green instead of red/green), that usually indicates clipping distortion. Your phone's microphone and speaker are so close to eachother that the microphone can be saturated beyond its capacity, and the clipping effectively introduces overtones.
If you output through an external (i.e., bluetooth) speaker or a second Android device, then the doppler effect is visible clear as day if you move the Android device relative to the speaker.
When changing frequencies, the strobe display updates faster than the audio output buffer, so often there will be some period of the previous frequency visible on the new strobe. This is clearest when using cent+/cent- to change the tone.
There is a bar of panel selection buttons along the bottom of the strobe display. In each panel, you can configure a different aspect of the strobe's behavior.
This is the default panel where you can control the semi-tone, octave, and cents (1/100ths of a semi-tone) to select the note that determines the frequency of the fundamental, the note you are tuning against.
On this panel you can adjust the frequency for the center A (defaults to 440Hz), or reset it to the default. This is handy, for example, if you want to tune the entire instrument flat to avoid stretching old strings too much. Or, of course, if you're matching an orchestra that tunes to a different A.
On this panel you can adjust the stretch factor, or reset it to 0.
When tuning pianos, the upper harmonics of a single string are often slightly higher than you would expect in an ideal world. Instead of the second harmonic (octave) being at exactly 1200 cents (2.0 times), it might be at, for example, 1200.5 cents (2.0005777 times). This is called inharmonicity, and will make a perceptible beat note if you use ideal tuning and play octaves on the piano. To avoid this, piano tuners typically tune a slightly stretched scale.
Here's how I set up the stretch factor when I sit down to a new piano. I get the fundamental for a middle note to show a horizontal line, and then I adjust the stretch panel until the second harmonic is also a horizontal line. Repeat for a couple other notes to get a feel for the instrument, and pick an "in-between" value. It doesn't need to be perfect for every note, it just needs to be pretty close on average so that the outer octaves don't sound funny.
In the past, the stretch factor was specified in decimal, but now it uses the standard units of cents per octave.
A "preset" is a selection of notes that are useful together. An example might be E-2, A-2, D-3, G-3, B-3, E-4 for the six strings of a guitar. A preset which contains all twelve semi-tones may be used as a tempered scale.
In the preset panel, you can cycle through the notes in the preset or apply an octave bias to the whole preset. You can select one of the stored presets or edit the notes in the current one.
Under the options menu, there is a Settings activity which allows some configuration.
Alternatives to red/green for the strobe display can be selected, for example to aid color-blind people.
The harmonics which are displayed in the extra strobes can be configured. By default, the 1st (fundamental), 2nd, and 4th harmonics are displayed because it is often convenient to see what is happening in other octaves. Note that the stretch factor is in effect here, so if the stretch factor is non-zero then the distance between the fundamental and 2nd harmonic will not be exactly a multiple of 2.0.
Tapping the "FFT" button in the lower-right corner switches between the strobe view and the FFT (spectrum) view.
FFT stands for Fast Fourier Transform, which is a technique for converting a time-domain signal (like a waveform) into a frequency-domain signal (like a spectrum analyzer).
The vertical axis is time, with markings at 1 second intervals.
The horizontal axis is frequency, with lower frequencies to the left. In musical "scale" mode, the legend along the bottom of the screen has a little white line for each of the 52 white keys on a piano, and labels where they fit. In "Hz" mode, the legend indicates frequency in Hertz.
The useful tuning parameter is "N", which is the size of the block that the FFT operates on. The rule is that bigger N means more precise frequency measurements for tones that do not change over time. Smaller N means faster response and better display of tones that do change over time.
Pinch to zoom, drag to scroll horizontally, tap to pause.
TunerTime is open source software written by Greg Alexander. Questions
or comments?
TunerTime is Copyright Greg Alexander, 2018. To be distributed under the terms of the GNU GPL version 2.
To get the source:
git clone http://galexander.org/git/tunertime.git
Here's a copy of the APK: