I am a Physics student but also love math and music, and know a little bit about tuning because it is related to mathematics.

So as far as I understand, Just Intonation is more consonant than Temperaments.

The major problem of Just Intonation is modulation in instruments which can only play fixed frequencies like the piano or the woodwinds.

For example, the mainstream 12TET in western music can be considered as a compromise to make modulation extremely easy while the dissonance introduced is equally shared by every tone.

My question is, with modern technology and when music can be played electronically, it seems that we can solve the century-long problem of modulation and consonance of music now. Say, with an electronic piano we can play a song in a certain key in Just Intonation. Then when one needs to change key, the computer just immediately adjusts all the frequencies slightly so that we still have Just Intonation in the new key.

Am I right? And in fact is this actually what is already done in practice in electronic music?

  • 3
    I wonder if Scala could be used for this - though note I haven't used it. My understanding is it can re-tune individual notes in keyboards/synthesisers and various software synths too...
    – Andy
    Commented Aug 3, 2016 at 11:42
  • 2
    My take on this is: temperament has always been unnecessary. Almost all instruments (woodwinds certainly included), as well as human voice, are capable of just intonation. However, there is not one definitive just intonation, but a whole bunch of different ways to intonate with integer ratios. Furthermore, these instruments generally don't produce unambiguous pitches that could clearly be classified, but use various kinds of vibrato etc., leaving a decent amount of interpretation. Usually, these modulations leave an uncertainly that is large enough to also include the 12-edo pitches. Commented Aug 3, 2016 at 14:11
  • 3
    Consider pieces with changing keys. The challenge would be to automatically detect this change while playing. Could be hard in Jazz and Progressive music. But maybe you could reduce your idea to pieces with a fixed key for the beginning.
    – Alfe
    Commented Aug 4, 2016 at 9:24
  • Consider pieces with modulations based on enharmonic equivalents. If you "re-spell" an A dominant seventh chord to a German augmented chord on F double sharp to modulate, what frequency does the G turning into an F double sharp have?
    – 11684
    Commented Aug 27, 2017 at 0:25

10 Answers 10


In principle, the answer is yes, with software instruments it is feasible to (re-)set the tuning so that you can realize music with modulation that stays in just intonation across these changes. The frequencies are directly accessible in sound synthesis environments like PureData or Overtone, and even just by setting the tuning information in a set of MIDI data.

The main issue is deciding how/when/where to use which frequency for a given key on the keyboard. For standard keyboards, there is the base ambiguity between enharmonic notes: obviously between C sharp and D flat, which have different frequencies in JI, and less obviously between C double-sharp and D (and so on). In 5 limit JI there is an additional 2 fold ambiguity for a note of a given name! The D that is a third above B-flat (B-flat is 2 fifths below C) is tuned differently than the D that is two fifths above C. This issue is alluded to in @ttw and @Todd answers: for even moderately complex music, making just intonated chords would require on-the-fly decisions about how to assign frequencies to the notes. To date, no automated software system has enough "understanding" of musical context to do this at all, let alone in real time. In sequenced music, it is possible for the composer to assign these frequencies, but then they're already approaching their composition from a point of view that significantly diverges from common practice harmony.

A quick search resulted in a video that involved changing the root tone of the just intonation to the septimal seventh. I'm sure that many other people have experimented with these capabilities, but it's not something that has, in my perspective, taken off. I suspect that something like the following is going on: If I have the desire and power to reset the frequencies of all of my sounds at will, and I'm not trying to recreate conventional sounds (as Todd pointed out, synthesized sounds always sound synthesized) I can do much more novel, or extreme, things than just modulate in the conventional ways of classical music.

To summarize, yes software synths (of various sorts) in principle allow you to realize harmonically complex music in just intonation. particularly for seqeuenced music. For actual performance with a keyboard, the complexities involved in dynamically modifying the frequencies hard to address: it is too much for the performer to tweak the intonation on the fly (though this kind of keyboard might help), and automated support is not yet available. The prospects for sequenced music are more promising, but still, for conventional harmonic music the effort to benefit ratio is pretty low: you have to construct a complex system that goes beyond current standards to specific which frequencies you mean, and the problem of creating "good sounding" harmonic music is already reasonably well solved by other temperaments. It's only when you go to more extreme experimental music that exploiting this fine level of control gives you bang for the buck, but then you've moved beyond conventional harmonic practice altogether.

Note: this answer assumes that you're considering music that "sounds synthesized", getting an organic feel to the music would require better (more authentic) intrinsic sound generation capabilities, and an ability to realize expressive intonation.

  • My question is, do listeners want this? This is one of the attributes of human vocal performances and performances on many instruments; automating it would be easy to do "just good enough" and remove creative possibilities from the music. Emulating a human's expressiveness would not be trivial. Commented Aug 25, 2017 at 17:36

You cannot even realize "just temperament" reliably when you are working with continuous-tone instruments like singers and trombones.

Take a look at even something as old as J.S. Bach's mass in B minor, like the "Confiteor" which goes off-tonality somewhere after 2:30 (in this recording) and loses tonal center rather thoroughly between 3:00 and 4:00. The score shows some enharmonic note combinations (which would not be identical in any just intonation) so there just are moments without a go-to just intonation.

Of course, a choir will have to figure out a strategy for the a cappella passages (either proactively or by practising until the temperament falls into place or by being bad enough that temperament is the least of the singers' worries), but it's not really something you can expect some automaton to realize without qualified direction.


It's a bit more complicated than may appear at first glance. Within a single key, if Just Intonation makes the I,IV, and V chords all (4,5,6) ratios, the ii chord will be off.

The other question is what note to play as a melody note. Often, melodies are somewhat independent of the underlying chords (at least in CPP if not in Jazz and other Pop theories). I suppose one may use any close intonation for a passing tone.

Some places on the NET (I don't remember which at the moment) have suggestions that Medieval music may sound better in Pythagorean temperament than in Just or Equal.

  • 1
    Pythagorean is a kind of just intonation. When talking about JI, one usually means Ptolemaic tuning (5-limit), but as said there are many flavours. Pythagorean is indeeds sometimes better, and not only for medieval music. Commented Aug 4, 2016 at 20:14

"just intonation better than equal temperament"

Judgement call there. When instruments are slightly off perfect ratios, there can be very appealing beating and chorus effects. Piano strings are intentionally mistuned from each other by slight amounts. Nothing but perfect ratios can sometimes lead to a very thin sound. Depends on context.

"instruments which can only play fixed frequencies like the piano or the woodwinds."

As an oboist who has performed in orchestras, I can assure you that the winds do not play fixed frequencies. In fact neither do the strings nor brass. These instruments all have varying degrees of flexibility to their intonation, and in top orchestras, adjustments are made on the fly as keys change and modulate. The same can happen with good vocal ensembles.

I don't know if there is an orchestral sample based package and DAW or notational software that allows encoding this. It isn't always clear, for example with pivot chords or transitional areas, which tonic to tune to, and there is also the problem of polytonal music. It could be a way to help sample-based orchestral recordings sound better in places.

  • You mean piano strings are not tuned exactly following the frequency ratios in 12TET?
    – velut luna
    Commented Aug 3, 2016 at 18:40
  • 3
    @AlphaGo c.f. en.wikipedia.org/wiki/Piano_acoustics
    – Dave
    Commented Aug 3, 2016 at 19:37
  • 3
    @AlphaGo in addition to the acoustics issues, from the 17th to 20th centuries western classical music didn't even aim at following 12TET. Other "well-temperaments" that allowed playing in all keys but gave each key a unique "sound" were more commonly used, and composers intentionally exploited the differences. (Before the 17thC, the most commonly used tunings did not allow playing in all keys - even JS Bach complained that his favourite pipe organ builder (Silbermann) still preferred to tune his instruments so that A flat major was unplayable.
    – user19146
    Commented Aug 3, 2016 at 19:46
  • 1
    @AlphaGo check the second paragraph: "This list of frequencies is for a theoretically ideal piano. On an actual piano the ratio between semitones is slightly larger, especially at the high and low ends,"
    – Dave
    Commented Aug 3, 2016 at 21:37
  • 1
    @AlphaGo - One thing that I found particular interesting when learning about piano tuning is that sometimes they will choose to detune strings within a specific frequency. You may be aware that each note on the piano has more than one string that creates its pitch. I learned that sometimes they will detune one or two of the strings for a given frequency as a means of modifying the sustain or overall tone of that pitch. Some of this stuff I learned from a great documentary; I believe it was called Pianomania but I'm not sure. Commented Aug 4, 2016 at 20:43

The biggest issue here is that computer based virtual instruments just don't sound right. Even virtual versions of analog synthesizers don't sound quite like the real thing. Plus, the feeling and method of play usually can't be reproduced at all, as in the case of the violin or French horn or clarinet, say.

In addition, I'm not aware of an algorithm whereby a computer can automatically detect a change in key during a performance. That means the musicians have to manually specify the key somehow. Auxiliary keyboard controllers or foot pedal controllers could be used, but that would put an excessive burden on musicians for a dubious benefit.

And that brings us to the fact that while there are benefits to other intonations, musicians and listeners have grown to expect equal temperament in many ways. Less so in other ways, but the subtle situations where just intonation would occasionally be heard are not making listeners find the rest of modern music unpalatable. It might be a neat trick, but the benefits to the modern listener don't outweigh the complications.

  • Thanks for your answer. Just another little question sort of unrelated. I heard that in vocal music, people naturally sing in just intonation, even when accompanied by a piano. Is that true? Do violin players also play in just intonation naturally?
    – velut luna
    Commented Aug 3, 2016 at 11:10
  • About my last question, I would expect if there is nothing to interfere or "force" temperature, vocal music and string music will naturally be in some kind of just intonation. For example, even when before playing, the violin players tune their violins by listening to the consonance frequency ratio of 1.5, not 1.498307.
    – velut luna
    Commented Aug 3, 2016 at 11:38
  • 1
    @AlphaGo For strings (and voice presumably) one thing that would be missing is expressive intonation (thestrad.com/cpt-latests/…)
    – Dave
    Commented Aug 3, 2016 at 12:42
  • I like your take and (obviously) agree for the most part. The question presupposes that dissonance is a thing to eliminate, something that I cannot agree with.
    – Yorik
    Commented Aug 3, 2016 at 18:30
  • 2
    @AlphaGo Ever cook with garlic, or fish sauce, or another substance that alone tastes awful? Also, with professionals, they are well aware if the note they are playing is a 3rd or 7th in the key and needs to be adjusted or not. It isn't something that happens naturally, it is a choice that comes from a high level of awareness and training. For many it is an over-learned ability to hear (or mentally hear what comes next) and follow and adjust to what is going on around them. Commented Aug 4, 2016 at 18:05

I think nowadays there is an option for the retroactive temperament change. Check YouTube for such records as "Nothing else majeur" or "what's up in minor key". Those are popular songs that were digitally translated from its original key to an opposite one. If there is software capable of changing key, I'm sure it also could change the temperament.

I think it would be an interesting experiment to try. Or did they already do it?..


i can suggest to have a look at these references about "adaptative just intonation". The objective is to play music without a fixed temperament but only with only just intonation, just intervall and just chords. Also to be able to use this in practice on stage for live music (composition or improvisation).


https://www-fourier.ujf-grenoble.fr/%7Efaure/Modelisation_musicale/index.html and more references or records there.


What would it even mean to play "Giant Steps" in just intonation? Never mind figuring out how to physically play it, what sequence of pitches would give you a) perfect pythagorean ratios and b) bring you back exactly to the key you started on?

I haven't tried the exercise, but I strongly suspect the answer is "there isn't one".

It's not the instruments, the flaws are built into the system itself. We're just stuck with the fact that 2^{7/12}, for example, isn't exactly 3/2.

Sure, with the right instruments and music, it can be useful to be able to tune intervals in this way. But in the end you're not going to find a perfect universal solution.

That's OK, something can be beautiful without being perfect.

  • ♭VI of B major is G, of G is E♭, and of E♭ is C♭. No problem! Major thirds are not quite as giant in just intonation as in 12-equal. After the music establishes a home key and then modulates away, this would be a problem only if the music makes sense only if it returned to that earlier home key, but, in between it did some sort of comma pump and reaches some key which is equivalent to that home key only in temperaments of a particular sort.
    – Rosie F
    Commented Jan 13, 2021 at 12:59

So as far as I understand, Just Intonation is more consonant than Temperaments.

This is a widely held misunderstanding. If you try to tune a keyboard in just intonation using 5:4 major thirds, at least one perfect fifth will be horribly out of tune in the home key.

Say, with an electronic piano we can play a song in a certain key in Just Intonation...

You can't. Well there are some pieces you can do that with, but some, even harmonically fairly simple, that you can't.

The sixth degree of the major scale is typically given as 5:3 in most discussons of just intonation, giving a 5:4 major third with the fourth degree of the scale. Since the second degree of the scale is 9:8, however, this yields a slightly smaller ratio of (5:3)/(9:8)=(40:27) for that perfect fifth instead of the expected 3:2. (The quotient gives us the syntonic comma: (40:27)/(3/2)=80/81).

Suppose you're tuning in C. If you raise the A to tune the fifth with D, you detune the fifth between A and E. You can raise E, but then you also need to raise B, and then you have the Pythagorean major scale with no 5:4 major thirds. Alternatively, you can lower the D to tune the fifth between D and A, but if you do that you get a sour fifth between G and D. And if you keep going in that direction you end up having to lower the pitch of the note you started from, which is logically impossible.

So the system you suggest would be necessary for all but the simplest pieces of music, even in a single key and without chromatic notes or modulation.


Seems to me a keyboard could look at the intervals between pairs of played keys and consult a table like

  • 0 = 1:1
  • 12 = 1:2
  • 19 = 1:3
  • ...
  • 7 = 2:3
  • 5 = 3:4
  • 4 = 4:5
  • ...

where all 88 intervals are ranked from most to least harmonious; build up a spanning tree (a connected loopless graph), and thence a set of ratios of all played keys to each other. Then: considering each note separately, suppose that its tempered pitch is accurate, and infer what the other pitches ought to be; so if n keys are played, each has n inferred pitches (including unison with itself). If each key's pitch is bent to the average of these, then the whole chord will be “justified”.

EDIT (March 2018): From time to time I'm reminded of this post's existence, and think, someday I should add a simple example. So here it is.

Consider the triad C 261.626, E 329.628, G 391.995. There are three ways to justify it by bending two of the pitches to fit the other:

  • Cc 261.626, Ec 327.032, Gc 392.438
  • Ce 263.702, Ee 329.628, Ge 395.553
  • Cg 261.330, Eg 326.663, Gg 391.995

If each of these is just, it follows that their average is also just:

  • Cm 262.219, Em 327.774, Gm 393.329
  • 1
    Well, it's not clear to me exactly what the algorithm is. I guess I'd start by working a few simple examples (root-position triads? Inversions? What about symmetric chords (like a fully diminshed 7th)). But after that there's still the horizontal aspect of music to take into account. (Melody, voice leading?) Commented Aug 29, 2017 at 14:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.