[citation needed] Pianos are usually tuned to a modified version of the system called equal temperament.
[3] An out-of-tune piano can often be identified by the characteristic "honky tonk" or beating sound it produces.
Early tuners faced challenges related to a large variety of new and changing pianos and non-standardized pitches.
The famous "Well-Tempered Clavier" by Johann Sebastian Bach took advantage of this breakthrough, with preludes and fugues written for all 24 major and minor keys.
[12] In theory the higher harmonics (also called overtones or partials) vibrate at integer multiples of the fundamental frequency.
In reality, the frequencies of the overtones are shifted up slightly, due to inharmonicity caused by the stiffness of the strings.
During tuning it is common to assess perfect fifths and fourths, major and minor thirds, and major and minor sixths, often playing the intervals in an ascending or descending pattern to hear whether an even progression of beat rates has been achieved.
The devices use sophisticated algorithms to continuously test the harmonic makeup of each string as it is sounded, and apply the derived information to determine its optimal pitch within the context of the entire instrument.
One of the easiest tests of equal temperament is to play a succession of major thirds, each one a semitone higher than the last.
As described above, when tuning a perfect fifth, for instance, the beating can be heard not at either of the fundamental pitches of the keys played, but rather an octave and fifth (perfect twelfth) above the lower of the two keys, which is the lowest pitch at which their harmonic series overlap.
If extended further, however, the actual tuning of the instrument becomes increasingly inaccurate because of deviation of the real partials from the theoretical harmonics, pianos' partials run slightly sharp, as increasingly higher orders of the harmonic series are reached.
A pianist constantly plays notes spread over three and four octaves, at least, so it is critical that the mid and upper range of the treble be stretched, or widened, to better match with the inharmonic overtones of lower registers.
Good tuning requires compromise between tonal brilliance, accurate intonation, and an awareness of gradation of timbre through the compass of the instrument.
The amount of stretching necessary to achieve the desired compromise is a complicated determination described theoretically as a function of string scaling.
Imperfect "springiness" anywhere in the string wire makes its partials deviate slightly from mathematically pure harmonics, and no real material used to generating musical tones is perfectly elastic.
The Railsback curve is the result of measuring the fundamental frequencies of stretched tunings and plotting their deviations from unstretched equal temperament.
In large pianos like concert grands, less inharmonicity allows for a more complete string stretch without negatively affecting close octaves and other intervals.
A benefit of stretching octaves is the correction of dissonance that equal temperament imparts to the perfect fifth.
Modern western ears easily tolerate fast beating in non-just intervals (seconds and sevenths, thirds and sixths), but not in perfect octaves or fifths.
Happily for pianists, the string stretch that accommodates inharmonicity on a concert grand also nearly exactly mitigates the accumulation of dissonance in the perfect fifth.
The principal psychoacoustic factor is that the human ear tends to perceive the higher notes as being flat when compared to those in the midrange.