# Would an instrument that tuned itself harmonically on the fly sound in tune?

Pianos can't be tuned perfectly using harmonic tuning, because they have a string for every note. See this MinutePhysics video for a good explanation of why.

But with current technology, we could theoretically create an instrument that tuned every note harmonically according to the previous note. For example, if one played A440 and then D5, D5 would sound at 440 * 4/3 = 586.333... Hz. But playing A440, then E5, and then D5 would cause the D to sound at 440 * 3/2 * 8/9 = 586.666... Hz.

How would this instrument sound, and would it sound in tune playing an equal-tempered piece?

• I have to wonder if it could keep up with Liszt. Anyway, what happens when you go all the way around the circle of fifths? You can't land back where you started without having something sound out of tune. Feb 11, 2017 at 0:20
• There have been various systems that do things like this (one is called 'Hermode tuning' IIRC) but the particular algorithm you outline sounds like it would only work for monophonic lines, so i wonder if that algorithm in particular would be available in a commercial product. It would be something very easy to try, if you code a bit! Feb 11, 2017 at 0:36
• In any case, pianos are not tuned to equal temperament - if they are tuned that way by people who don't know any better, they sound terrible. Google for "stretched tuning" and "inharmonicity".
– user19146
Feb 11, 2017 at 4:04
• @alephzero i thought of mentioning that but I tend to think of stretched tuning as another consideration over and above equal temperament, rather than thinking that equal temperament conceptually has no place in the tuning of the piano..? Feb 11, 2017 at 9:32
• Does this answer your question? With modern electronic technology is temperament unnecessary? Jan 13, 2021 at 4:55

Any good wind or string ensemble or choir tunes itself harmonically on the fly. For example in a major chord, whoever is playing the third will (probably subconsciously) play a bit flatter to be in tune according to just intonation.

• @Aaron "or choir" isn't sufficient mention of vocal ensembles? Jan 13, 2021 at 4:55
• @phoog My mistake. I misread. Jan 13, 2021 at 4:56

Of interest may be "adaptive tuning" by William A. Sethares

http://sethares.engr.wisc.edu/mp3s/three_ears.html

which aims at achieving maximum consonance via microtonal adjustments based on the spectrum. Whether the resulting music "sounds in tune" is subjective:

``The chords sounded smooth and nondissonant but strange and somewhat eerie. The effect was so different from the tempered scale that there was no tendency to judge in-tuneness or out-of-tuneness. It seemed like a peek into a new and unfamiliar musical world, in which none of the old rules applied, and the new ones, if any, were undiscovered." - F. H. Slaymaker

This is more complex than it might seem. The paper, "A Practical Guide to Intonation and Tuning for unaccompanied ensembles and vocal groups" by Karel van Steenhoven discusses the matter in some detail. Each harmonic transition needs consideration (assuming that one is trying to keep intervals in some assigned temperament such as Just Tuning.) Keeping in tune takes some lookahead as the resolution of harmonies is important.

There is a fundamental problem with this idea - it only works if the "magic tuning system" understands what key the music is in. If not, the overall pitch will drift up or down over time.

It's easy to see why that happens if you do the math and chain some intervals together. Let's start with A = 440.

Go down a 4th to E: E = 440 x (3/4) = 330.

Up a 5th to B: B = 330 x (3/2) = 495.

Down a 4th to F sharp: F# = 495 x (3/4) = 371.25

Down a major 3rd to D: D = 371.25 x (4/5) = 297.

Up a 5th and back to A: A = 297 x 3/2 = 445.5.

Oops! A used to be 440, but now it's drifted higher by a factor of 81/80, which is much too big to ignore.

If we "know" that all these notes are in A major, we could fudge the numbers so we do get back to A = 440. But most interesting music doesn't stay in one key for ever.

This is one of the reasons why unaccompanied choirs (which usually try to sing chords with "pure intonation") tend to drift up or down in pitch over time.

• The tuning systems described would definitely drift, as you say - as I understood it, the point of the algorithm as described is that there's no place for 'fudging' based on key. As it's only defined for monophonic pieces, the drift might not be a problem, similarly to the choir pieces you mention. Feb 11, 2017 at 9:39