Why are D-sharp and E-flat considered to be two different notes

Why do the black keys on the piano each have two different names? If the posts on r/musictheory are any indication, this is a persistent point of confusion, especially when music theory teachers get all persnickety about using the correct name.

This confusion applies to all of the black keys, but in this post, I’ll be talking about the one between D and E. You could think of it as a raised D, in which case it’s called D-sharp. You could also think of it as a lowered E, in which case it’s called E-flat. Guitars don’t have black and white keys, so when I was a feral self-taught musician, I just thought of that note as the eleventh fret on the E string, the sixth fret on the A string, the first fret on the D string, etc. I pretty much always called it E-flat, regardless of context. I have since learned to use the correct name, but it still feels arbitrary sometimes, especially outside of diatonicism. If you are in B major, the note is supposed to be called D-sharp, and if you are in B-flat major, the note is supposed to be called E-flat, that makes sense. But what if you’re in A blues? How are you supposed to spell it then? And what difference does it make anyway?

The usual answer is that you are only supposed to use each letter name once in any given scale. All major scales are considered to be based on C major, and you are supposed to preserve the white keys’ names, modified by accidentals as needed. So for example, you spell the B major scale like so: B, C-sharp, D-sharp, E, F-sharp, G-sharp, A-sharp. If you were to spell it as B, D-flat, E-flat, E, G-flat, A-flat, B-flat, it would sound exactly the same, but it would be harder to read, and you would lose points on your music theory exam.

Okay, so if you spell B major using flats instead of sharps, then it’s hard to read in notation, but what musical difference does it make? On a modern-day piano or guitar, the answer is, none whatsoever. Five hundred years ago, however, it would have made a very big difference. Before the advent of temperament systems, D-sharp and E-flat were two different notes. They weren’t just written differently; they sounded different. You can compare the historical versions of these notes yourself in this track I made.

My track is tuned in a system called five-limit just intonation, via the magic of MTS-ESP. Five-limit just intonation is the basis for all the tuning systems used in Western Europe between about 1500 and 1900 (though they did not call it by this name back then.) Why do D-sharp and E-flat sound so different from each other in five-limit just intonation and related tuning systems? To answer this question, I’m going to take you through a heavily simplified history of European tuning. (For a more accurate version of this history, consult Kyle Gann’s web site, or Rudolph Rasch’s chapter on tuning and temperament in The Cambridge History of Music Theory.)

Imagine you are building a guitar, and you want to decide what notes the strings are going to play. You start by putting on a string tuned to middle C. When you pluck this string, it vibrates at a frequency of 1 Hz, meaning that it vibrates back and forth once per second. (In real life, a guitar string tuned to middle C would vibrate at a frequency of 261.626 Hz. If you want to think about actual frequencies, multiply everything in this post by 261.626.)

When you think of a guitar string vibrating, you probably imagine the entire string bending to and fro. But plucked guitar strings move in a much more complex way, because subsections of the string vibrate independently of each other. All of these subsection vibrations combine to make the guitar string’s overall movement. The vibrations of the guitar string’s subsections are called harmonics. This video does an excellent job explaining how harmonics combine to form the complex vibration of a plucked string.

The main thing you need to know about harmonics is that each one produces its own distinct pitch. When you pluck a guitar string, you are hearing many different pitches at once. The pitch produced by the first harmonic is the loudest one, and it’s the one that you tend to think of as being “the note”, but the pitches produced by the other harmonics are also crucial to the guitar’s sound.

Western Europeans like it when you tune instruments to match the pitches produced by the first five harmonics of a string. These pitches have a surprisingly simple mathematical relationship to each other.

  • The C string’s vibration along its entire length is called the first harmonic. The string’s whole length vibrates at 1 Hz (it bends back and forth once per second), producing the note C.
  • The C string’s vibration in halves is called the second harmonic. Each half vibrates at 2 Hz (it bends back and forth twice per second), producing another C that’s an octave higher then the first harmonic.
  • The C string’s vibration in thirds is called the third harmonic. Each third vibrates at 3 Hz (it bends back and forth three times per second), producing the note G.
  • The C string’s vibration in quarters is called the fourth harmonic. Each quarter vibrates at 4 Hz (it bends back and forth four times per second), producing yet another higher-octave C.
  • The C string’s vibration in fifths is called the fifth harmonic. Each fifth vibrates at 5 Hz (it bends back and forth five times per second), producing the note E.

There are more harmonics at 6 Hz, 7 Hz, 8 Hz, and so on up to infinity, each producing its own pitch. Harmonics get quieter as they get higher, and you can usually only hear the first eleven or twelve harmonics of an acoustic guitar string.

Next, we’re going to add two new strings to the guitar. We’re going to tune them to match the notes in the harmonic series of the C string. We can ignore the second and fourth harmonics, because they just produce more C’s. We can add a G string to match the third harmonic, and an E string to match the fifth harmonic. It will sound better if we move the G down an octave to 3/2 Hz, and the E down two octaves to 5/4 Hz. We can do this because Western people consider octaves to be equivalent, meaning that you can multiply or divide the frequency of any note’s first harmonic by any factor of two and it will still be the “same” note. In the rest of the post, I will be multiplying and dividing frequencies by two as needed in order to keep all the notes within the same octave.

If you strum the C, E and G strings, you will get a C major chord. Each of the notes in this chord produces harmonics that overlap extensively with the harmonics of other notes. Your ear detects all of that alignment and thinks, yeah, this makes sense, I like this.

Now we’re going to find some more good-sounding notes by examining the first five harmonics of the G and E strings. We can always ignore second and fourth harmonics, because those are just higher-octave copies of the first harmonic.

  • The G string’s third harmonic has a frequency that is three times the frequency of its first harmonic, producing the note D. The G string’s fifth harmonic has a frequency that is five times the frequency of its first harmonic, producing the note B. So let’s add two more strings tuned to D at 9/8 Hz and B at 15/8 Hz.
  • The E string’s third harmonic produces that same B, and its fifth harmonic produces G-sharp. We don’t need another B string, but we can add a G-sharp string tuned to 25/16 Hz.

We can find even more good-sounding notes by looking at the first five harmonics of our D, B, and G-sharp strings.

  • The D string’s third harmonic produces A, and its fifth harmonic produces F-sharp. So let’s add two more strings tuned to A at 27/16 Hz and F-sharp at 45/32 Hz.
  • The B string’s third harmonic produces the same F-sharp, and its fifth harmonic produces D-sharp. So let’s add a D-sharp string tuned to 75/64 Hz. This is where the historical version of D-sharp comes from, the one I used in my track above.
  • Finally, the G-sharp string’s third harmonic produces the same D-sharp, and its fifth harmonic produces, uh, B-sharp. That seems like a weird note, but you need it for C-sharp major and C-sharp harmonic minor. So I guess we can add a B-sharp string tuned to 125/64 Hz. That is awfully close to being an octave above C, but it’s 3/64 Hz too flat. You probably would not want to pluck the B-sharp and C strings at the same time, because they would clash horribly.

Anyway, now that we have D-sharp, let’s derive E-flat, which we will do using a slightly different method. So far, we have been looking at the notes you get from the first five harmonics of the C string, and making more notes from those notes’ first five harmonics. Now we are going to identify notes whose own first five harmonics include C. There are two such notes: F and A-flat.

  • If we add an F string tuned to 4/3 Hz, its third harmonic will produce C as expected, and its fifth harmonic will produce A. We already had an A string tuned to 27/16 Hz derived from the third harmonic of the D string. However, the A that we get from the fifth harmonic of the F string is tuned to 5/3 Hz. This is going to be a problem. The original A is not going to sound good with F, but the new A is not going to sound good with D. So I guess we’ll need two different A strings. Just intonation is hard!
  • Anyway, if we add an A-flat string tuned to 8/5 Hz, then its third harmonic will produce E-flat, and its fifth harmonic will produce C. So we can now add an E-flat string tuned to 6/5 Hz.

Now our imaginary guitar has a D-sharp string tuned to 75/64 Hz and an E-flat string tuned to 6/5 Hz. These strings are almost but not quite tuned to the same pitch—the E-flat string is only 125/128 Hz sharper than the D-sharp string. This may not seem like much, but the difference is audible, as you can hear in my track above. If you tried to use this E-flat in the B major scale, it would sound skin-crawlingly bad. By the same token, if you tried to use D-sharp in the B-flat major scale, it would sound equally bad.

In real life, guitars don’t need to have separate strings for every note. However, keyboard instruments do. Harpsichords have one string for each note on the keyboard. Pianos have two or three strings for each note. (And organs have separate pipes for each note.) To tune your acoustic keyboard instrument in five-limit just intonation, you would need separate D-sharp and E-flat keys in every octave. You would also need separate C and B-sharp keys for each octave, and two different A keys for each octave, and many other adjacent keys playing similarly-but-not-quite-identically-tuned notes. There were some proposed keyboard instruments that included some or all of these notes, and a few were actually constructed. This organ has split black keys so you can treat D-sharp and E-flat as separate notes.

Ultimately, split black keys did not catch on. The more typical approach to instrument building was to say, look, we can only put so many keys on this thing. We’ll give you one black key between D and E. It’s up to you whether you want to tune it to D-sharp or E-flat. If you choose D-sharp, then you’ll probably want to avoid the left side of the circle of fifths, and if you choose E-flat, you’ll want to avoid the right side of the circle. Also, we’re not including a B-sharp key, so stay out of C-sharp. And we’re only including one A per octave, so pick a tuning for it and make your musical choices accordingly.

Instrument makers and music theorists were not satisfied by having to choose between bewilderingly complex instruments and only being able to play in certain keys. Gioseffo Zarlino asked, what if we just split the difference between D-sharp and E-flat, so the black key between D and E could function as both notes? Then you could switch from playing in B major to playing in B-flat major without retuning your entire harpsichord. You would have to live with out-of-tune D-sharps and E-flats, but could you do it in a way that make them at least okay-sounding?

Theorists spent hundreds of years designing temperament systems that tried to find compromises between D-sharp and E-flat and other closely-tuned notes, and to spread the resulting out-of-tuneness out across the keyboard. The history of temperament is mind-numbing, but all you need to know is that the systems fall into two big categories.

  • The meantone temperaments produce some lovely pure intervals and some unusably out-of-tune ones. These temperaments sound great in and near C major, but you would not want to use them to play in, say, F-sharp major.
  • The well temperaments produce lots of slightly out-of-tune intervals, but they are all at least bearable, and they make for a wider variety of usable keys. Bach wrote The Well-Tempered Clavier to show off how one well temperament system (no one knows which one) sounds okay in every major and minor key. In well temperaments, the keys closer to C sound sweeter and more euphonious, while the more distant keys sound darker and edgier.

We as a civilization eventually adopted an extreme version of well temperament called twelve-tone equal temperament (12-TET). It’s the standard tuning system used throughout the Western world. It solves the problem of conflicting notes through brute force. In 12-TET, all intervals are built from uniform semitones, defined as a frequency ratio of one to the twelfth root of two. There are no nice frequency ratios with small prime factors in 12-TET. Both D-sharp and E-flat are defined as the note that’s three semitones higher than C, a ratio of one to the fourth root of two. If you interpret the three-semitone interval as an augmented second, then it’s too sharp, and if you interpret it as a minor third, then it’s too flat. Every interval in 12-TET is similarly out of tune except for octaves, by design. Fifths sound pretty good, actually, but thirds and sixths are grim. 12-TET is convenient for instrument builders and piano tuners, but it makes harmony sound grey and mushy.

I explain all of this in more depth and provide lots of graphics and audio examples here.

This semester I am resuming teaching intro-level music theory at the New School after a pandemic-enforced hiatus. The big question is always: how deep should I go with this kind of explanation? There’s one level: “D-sharp and E-flat are the same note, yet this note has two different names, because I say so.” That is going to be unsatisfying for the critical thinkers in my classroom. The next level of explanation is to say: “Yes, I recognize that D-sharp and E-flat sound the same, but they function differently, and the spelling communicates this functional difference.” This explanation always bothered me, because if the “function” is limited to the page and isn’t audible, then is it even a real thing? This blog post goes for a deeper level of explanation, and it’s the one that I find satisfying. I don’t want to overwhelm a bunch of intro-level students, though. So now my task is to find the balance.

Update: Hacker News is having a lively discussion of this post.

Further update: Wenatchee the Hatchet points to a Haydn piece where he specifically distinguishes between D-sharp and E-flat, and between different tunings of A.

10 replies on “Why are D-sharp and E-flat considered to be two different notes”

  1. Good stuff – it’s amazing how many musicians are unaware of this stuff.

    In answer to your question about how you spell this note in A Blues: it makes no difference whether you call it D# or Eb, you can’t avoid having either two D’s or two E’s in the scale and key. You might want to avoid two of the same letter in the same phrase – if you can – so you might choose D# before an E natural and Eb before a D natural. I don’t have a problem using two names for this one note in different contexts; others might.

    The same applies in the Blues keys of C, D, E and G as for A Blues. In the other seven Blues keys, I’d just call this scale-step by its “natural” letter name in all situations and avoid double sharps and double flats as well as B#, Cb, E# and Fb.

  2. Also worth noting here is readability: it’s a lot easier to read “G-Ab-G-Ab-G” than G-G#-G♮-G#-G♮ (with that swarm of accidentals).

    1. Notation readers are mystified why anyone would be sloppy about naming their enharmonics. Non-readers, like my young guitar-playing self, are mystified why anyone cares about how you name your enharmonics.

  3. Oops, I forgot to add in my previous comment: I understand intellectually that 12TET is out of tune, but when I listen to demonstrations of Baroque music being played first in 12TET and then in just intonation, I either can’t hear any difference, or I hear just a subliminal weirdness. Even when I hear a single interval like a major third played in both, it’s hard for me to tell a difference. It makes me a bit nervous, that I’m somehow tone-hard-of-hearing, or my ear isn’t refined enough to detect the sweeter harmony.

    1. I can’t instantly hear the difference if I listen to an entire performance, but when you play intervals back to back repeatedly, like I did in my track, then the difference jumps right out. It takes my ears some time to acclimate to a different tuning system, I have to listen to a bunch of music in it exclusively. (This is a lot easier using MTS-ESP or some similar software.) Once I get used to the alternate tuning, then when I go back to 12-TET I can hear how blah it is.

      Also, when people do these side-by-side videos where they perform some piece of music in different temperaments, it matters what key the music is in. If it’s the C major prelude from the Well-Tempered Clavier, then it will only sound very slightly better in a Baroque temperament than in 12-TET. However, if they play the F-sharp prelude, then that will sound very different. It will sound horrendous in quarter-comma meantone, and strange but appealingly so in a well temperament.

  4. This stuff drove me away from trying to learn piano in my 20s, despite having had no trouble with basic guitar. Piano (and music notation) came with more theory, and to my engineer mind the theory made no sense. I would rant “If there are twelve notes, why did they give them seven letters? Seven doesn’t go into twelve!”

    It was only when I dug into this again in my 40s and found some deeper explanations that it started to make sense: the way the notes are derived stepwise from integer ratios, as you explain here, and we tend to like groups of five or seven of them. Deva Sobel’s (sp?) book “Temperament” was a great read too.

  5. Thanks for this post. Note, however, that D# and Eb *are* different notes on stringed instruments. They’re played differently. If they were played the same, double stops would be out of tune.

  6. Thanks a lot for this very enlightening post. When I was a beginner guitarist, teaching myself to play and learning scales, the enharmonics were sometimes very confusing. Let me ask a question: on modern instruments, why not just name the notes A through L?

Comments are closed.