Entropy is the key to a tuneful piano

That’s Maths: In piano tuning, entropy measures disharmony or discord: the aim is to make it as small as possible

An ingenious method of tuning pianos based on the concept of entropy was recently devised by Haye Hinrichsen of Würzburg University. Entropy was first recognised in the mid-19th century in thermodynamics and later in statistical mechanics. It measures disorder.

Around 1948, Claude Shannon developed a mathematical theory of communications and used entropy to indicate information content. In the context of piano tuning, entropy measures disharmony or discord: the aim is to make it as small as possible.

Sound is a series of variations of air pressure. All sounds travel at the same speed, but they have many different patterns of pressure. They may be analysed into wave- like components, each being a pure sine wave with fixed amplitude and frequency. The amplitude gives the loudness of the wave, whereas the frequency – the number of pressure oscillations per second – gives the pitch or tone.

Equal temperament

Western music is based predominantly on a tuning system called equal temperament, where the ratio of frequencies of neighbouring notes is constant. With 12 semitones in an octave, this ratio is the 12th root of two. Thus, by advancing a full octave, the frequency is doubled. The system allows music in all keys, but at a price: all intervals other than octaves are slightly out of tune. With the exception of purists, we have learned to tolerate the slight imperfections of equal temperament.


Each note on the piano has a frequency and overtones or harmonics. For an idealised vibrating string, the harmonics are exact multiples of the fundamental frequency: the second overtone has twice the base frequency, the third is three times larger, and so on. A piano string is more complex, with vibrations between those of an ideal string and a thin rod. Consequently, the overtones are not whole-number multiples of the fundamental frequency, but slightly different from these values.

We call this discrepancy inharmonicity, and piano tuners allow for it. The pattern of inharmonicity differs from one piano to another, and the tuning must be tailored to suit each individual instrument. One consequence of inharmonicity is that a piano sounds better when its tuning deviates from a pure harmonic sequence. Higher pitches are tuned up and lower ones down, a process called stretching. Aural tuners are skilled at choosing the stretch to suit the instrument. They also allow deviations for individual notes.

The entropy tuning method also produces a tuning that allows for these effects. The entropy of two notes sounded together decreases as their harmonics or overtones come into alignment. Thus, the method produces a sequence of pitches that minimises the total discordance between the harmonics of all the notes. The method is inherently sensitive to all intervals, not just to octaves. It can produce stretch deviations for individual notes comparable to those found by an aural tuner.

In a practical implementation of the method, each piano note is recorded and analysed into harmonics. Random variations are tested, and accepted if they reduce the entropy. The process continues until a satisfactory tuning is reached. This gives the target pitch for each note. The method is increasingly being used by professional tuners. Of course, some musicians feel that a skilled piano technician can produce a superior result. They are probably correct; but for how long?

Entropy Piano Tuner software can be downloaded free from piano-tuner.org.

  • Peter Lynch is emeritus professor at the school of mathematics and statistics, University College Dublin. He blogs at thatsmaths.com