New Algorithm Captures What Pleases the Human Ear---and May Replace Human Instrument Tuners

80beats
By Sarah Zhang
Mar 29, 2012 7:16 PMNov 20, 2019 1:23 AM

Newsletter

Sign up for our email newsletter for the latest science news
 

As computer hardware and software becomes ever more powerful, they find ways to match and then exceed many human abilities. One point of superiority that humans have stubbornly refused to yield is tuning musical instruments. Pythagoras identified the precise, mathematical relationships between musical tones over 2,000 years ago, and modern machines can beat out any human when it comes to precise math. So why aren't computers better than people? The professional tuner does have one incontrovertible advantage: a trained human ear. Imprecision, it turns out, is embedded in our scales, instruments, and tuning system, so pros have to adjust each instrument by ear to make it sound its best. Electronic tuners can't do this well because there has been no known way to calculate it. Basically, it's an art, not a science. But now, a new algorithm published in arXiv claims to be just as good as a professional tuner. To understand how this new algorithm works, it's worth understanding how today's electronic tuners don't work. Human 1, Machine 0 One major problem with automatic tuning is baked into the Western musical system and the limits of human hearing. In the equal temperament system, which is used for most modern Western instruments, the frequency of each note is greater than the half-step below it by a factor of 2^(1/12), or 1.0595. If you go up by 12 of those half-steps, the frequency of the note is twice where you started: an octave. But there's a problem: Equal temperament systems don't exactly generate intervals like a perfect fifth, where the ratio of the frequencies between the top and bottom notes should be exactly 3:2. (A perfect fifth is the interval in the first four notes in "Twinkle Twinkle Little Star.") On an instrument tuned according to strict equal temperament, the top note of a perfect fifth is 2^(7/12) times the frequency of the bottom, or 2.997:2---not exactly 3:2---and our ears naturally find whole number ratios between the frequency of notes to be most pleasing. (This previous sentence was corrected based on a comment below.) A musician with a good ear can hear the subtle difference. Over the entire range of an instrument, from its lowest to highest notes, this small difference is compounded, and interferes with what should be the pleasant, harmonious sounds of its overtones---the higher-pitched, secondary sounds created by any instrument. The solution is to fudge it: tuners "stretch" the frequencies of some strings to make the instrument sound good overall. A seasoned pro figures out a way to optimize the instrument's sound based on both our purely mathematical musical system and on human psychoacoustics. This stretching makes a pro-tuned instrument sound noticeably better than an electronically tuned one. The chart above shows how an example of stretching on a human-tuned piano. Human 1, Machine 1? 

The new study replaces the human ear's ability to detect "pleasingness" with an algorithm that minimizes the Shannon entropy of the sound the instrument produces. (Shannon entropy is related to the randomness in a signal, like the waveform of a sound, and is unrelated to the entropy of matter and energy). Entropy is high when notes are out of tune, say the researchers, and it decreases as they get into tune. The algorithm applies small random changes to a note's frequency until it finds the lowest level of entropy, which is the optimal frequency for it, say the researchers. And setting tuners to follow this algorithm instead of the current, more simple formula, would be a simple fix. The paper has a graph comparing the results of human (black) and algorithmically tuning (red) as proof of the latter's effectiveness. Not bad, but entropy-based tuning hasn't passed the real test yet: a musician's ear. [via arXiv Blog]

Images via Haye Hinrichsen / arXiv

1 free article left
Want More? Get unlimited access for as low as $1.99/month

Already a subscriber?

Register or Log In

1 free articleSubscribe
Discover Magazine Logo
Want more?

Keep reading for as low as $1.99!

Subscribe

Already a subscriber?

Register or Log In

More From Discover
Stay Curious
Join
Our List

Sign up for our weekly science updates.

 
Subscribe
To The Magazine

Save up to 40% off the cover price when you subscribe to Discover magazine.

Copyright © 2025 LabX Media Group