Acoustically, a note perceived to have a single distinct pitch in fact contains a variety of additional overtones.
An ideal, homogeneous, infinitesimally thin or infinitely flexible string or column of air has exact harmonic modes of vibration.
However, in stringed instruments such as the violin, and guitar, or in some Indian drums such as tabla,[2] the overtones are close to—or in some cases, quite exactly—whole number multiples of the fundamental frequency.
When a string is bowed or a tone in a wind instrument is initiated by vibrating the reed or lips, a phenomenon called mode-locking counteracts the natural inharmonicity of the string or air column and causes the overtones to lock precisely onto integer multiples of the fundamental pitch, even though these are slightly different from the natural resonance points of the instrument.
In 1962, research by Harvey Fletcher and his collaborators indicated that the spectral inharmonicity is important for tones to sound piano-like.
They proposed that inharmonicity is responsible for the "warmth" property common to real piano tones.
The most sophisticated devices allow a technician to make custom inharmonicity measurements—simultaneously considering all partials for pitch and volume to determine the most appropriate stretch to employ for a given instrument.
The issues surrounding setting the stretch by ear vs machine have not been settled; machines are better at deriving the absolute placement of semitones within a given chromatic scale, whereas non-machine tuners prefer to adjust these locations preferentially due to their temptation to make intervals more sonorous.
The result is that pianos tuned by ear and immediately checked with a machine tend to vary from one degree to another from the purely theoretical semitone (mathematically the 12th root of two) due to human error and perception.
[1] Some performers choose to focus the tuning towards the key of the piece, so that the tonic and dominant chords will have a clear, resonant sound.
However, since this compromise may lead to muddy-sounding chords in sections of a piece that stray from the main key (e.g., a bridge section that modulates a semitone down), some performers choose to make a broader compromise, and "split the difference" so that all chords will sound acceptable.
Other stringed instruments such as the violin, viola, cello, and double bass also exhibit inharmonicity when notes are plucked using the pizzicato technique.