By minimizing the entropy in the sound waves produced by a musical instrument it might be possible to use an electronic device to tune that instrument as well as is possible with the best human ear. So says a German physicist who has found that seemingly random fluctuations in the pitch difference between successive keys in a tuned upright piano may in fact be crucial to a harmonious sound.

The system of tuning used in most Western musical scales is known as "equal temperament", which means that the ratio of frequencies of successive notes in the scale is a constant. Since the pitch doubles every 12 notes, the frequency ratio between neighbouring notes is 21/12. Intuitively, it might be expected that tuning a piano or other keyboard instrument is then simply a question of ensuring that this ratio holds for every pair of adjacent notes. However, this would only be true for pianos with perfect strings – those that have no stiffness.

In practice, the higher-frequency modes, or "harmonics", that always accompany a note of a particular fundamental frequency, and which provide an instrument with its characteristic sound, deviate from their theoretical frequency values. This means that where they ought to coincide and produce a harmonious sound, harmonics from different notes that are played together are instead out of step and produce a series of unpleasant beats.

Stretching intervals

Professional aural tuners overcome this problem by "stretching" intervals – slightly increasing the pitch of higher notes to ensure their harmonics are never too far below those of lower-frequency notes while marginally decreasing the pitch of the lower notes. This can also be done using electronic devices rather than the human ear, although this approach is complicated by the fact that "inharmonicity" varies from instrument to instrument. Some devices simply use predefined stretch factors depending on the type and size of instrument, while more sophisticated appliances record the spectrum of harmonics from each note for a particular instrument and then use these data to calculate how the stretch should vary as a function of frequency.

Haye Hinrichsen, a statistical physicist at the University of Würzburg, wondered whether this approach could be improved upon, after measuring the frequencies of the notes produced by a piano that his family had recently bought and which had been tuned aurally by a technician. Rather than finding that the stretch varied smoothly with frequency, as is the case when pianos are tuned using electronic devices, Hinrichsen found it varied in quite an irregular way. He wondered whether these irregularities were random and the result of the limitations of human hearing or whether they might, on the contrary, be vital for good tuning. He also speculated that entropy was the key to reproducing these fluctuations systematically.

Here, entropy refers to the amount of information needed to describe a physical state. When two harmonics from different notes overlap, less information is needed to describe their combined state than if they were to remain distinct, which means they have a lower entropy. So Hinrichsen hypothesized that maximizing tuning means minimizing entropy.

Fourier transforms

He began by recording the waveforms produced by each of the 88 keys on his piano. He used a computer program to apply a Fourier transform to each waveform, giving him a series of peaks on a plot of intensity versus frequency. He then "detuned" the resulting spectrum so that it formed a scale of equal temperament, with the fundamental frequency of each note being 21/12 times higher than the preceding one, and then he added all 88 plots together. Next, he applied an algorithm to work out the spectrum's entropy, then randomly increased or decreased the pitch of one of the 88 notes by a small amount. If as a result of this change the spectrum's entropy dropped, then the change was kept, otherwise it was rejected. The pitch of another note chosen at random was then changed and the cycle repeated until the entropy could be reduced no more.

Hinrichsen was able to produce tuning curves very similar to those from the aural tuning. As he points out, not only does it reproduce the overall shape of the curve but it also recreates many of the individual fluctuations. He believes that it might therefore be possible to produce a new kind of hybrid electronic device that uses conventional harmonics-matching to generate a smooth tuning curve and that then uses entropy minimization to produce the all-important detail. He explains that the entropy technique is probably not suitable for use on its own because it yields local rather than global minima, potentially causing the system to get locked into higher or lower notes than it should. He also points out that the approach remains unproven, because he has so far tested it on just one piano and because he has not shown it to work using small subsets of notes, which is the approach taken by professional tuners.

Yuriy Ushakov of Nizhny Novgorod State University in Russia, part of a team that carried out research showing how neurons fire in response to harmonious sets of notes, believes that the latest work makes a "noticeable contribution" to our understanding of sound perception, as well as that of instrument tuning, by highlighting the role of entropy in that process.

Brian Foster of Hamburg and Oxford universities, a particle physicist who is also a keen violinist, says that although the latest research is interesting, he believes "there is nothing very profound in it", pointing out that Hinrichsen's entropy is not the thermodynamical quantity with which most physicists would be familiar. He also thinks that the research leaves a number of questions unanswered, including the significance of the fluctuations in the tuning curve, adding that it should be a trivial matter to test whether or not these are random. He believes the research could lead to a commercial tuning device but doubts that it would have a huge market. "Musicians, not being a very technologically aware bunch," he says, "will pretty much stick to the human tuner, in my humble opinion."

The research is described in a preprint on the arXiv server.