This is a newbie question: I have seen some songs being played in F major or E major or C or D on the piano, and they correspond to different levels of difficulties. For example, E major could be the most difficult original one, and it might be converted to F major to become intermediate level. And if it is converted to C major, usually that means it is for beginners.

Can any songs played on the piano be changed to any different keys? I think it means the "Do Ray Me" changes from C to D or to E or to F, all the way to B. Would some song be "adapted" but cannot be played due to a missing black key on the piano? If any songs can be played in any key, how do the white keys and black keys make it always possible -- by what principle is it?

  • 3
    a missing black key? Commented Apr 2, 2022 at 21:28
  • 6
    Spoiler alert: the key (in the sense of tonality) of a piece has absolutely nothing to do with its difficulty; knowing that a piece is in C rather than in F is not enough to tell if it's difficult to play or not. But. It is true that there are tonalities that are easier or harder than others, but that still depends on the piece: some music would be almost impossible to play in a key different than the original composition, that though has nothing to do with the harmonic aspects of the key, but with the way keys (of the keyboard) are placed and human hands are made. Commented Apr 2, 2022 at 21:37
  • 5
    @musicamante "the key (in the sense of tonality) of a piece has absolutely nothing to do with its difficulty": this is incorrect to the extent that the number of symbols in the key signature affects the difficulty of the same piece transposed to different keys. This is certainly true for beginning students.
    – phoog
    Commented Apr 3, 2022 at 8:33
  • 2
    What do you mean by 'missing black key'? Although there are spaces between the 2 and 3 sets of black keys, there is nothing missing.
    – Tim
    Commented Apr 3, 2022 at 12:45
  • 3
    @Tim wild guess: the OP does not know how scales work
    – ojs
    Commented Apr 4, 2022 at 7:25

11 Answers 11


As I understand the question, the answer is well-temperedness (one technical term is 12EDO system) or very regular distribution of notes. Therefore you can start your song with any white or black key on the keyboard and use the corresponding number of key to the right or left respectively (keeping the intervals the same, a process called transposition) and the melody will remain recognizable. In earlier times with their old tunings the deviations were bigger and the impact on the melody easily recognizable.

After leaving the early learning phase behind, the number of accidentals will no longer correspond to the degreee of difficulty (a claim which most players will disagree with anyway).

Note, that for professional solo singers transposition is done on a regular base, to ensure, that the song finely fits their compass, some classical sheet music is even available in different editions for low/middle/high voice. (For the singer it is still easier than for the piano player to adjust by one half-tone, but pianists are used to that task.)

  • 2
    Even for unequal temperaments, the differences in interval sizes would not make a melody unrecognizable; it might just sound out of tune. Harmonic intervals would be more likely to sound out of tune (because tuning discrepancies are easier to hear in a harmonic interval than in a melodic interval). Whether these changes in the tuning would mean that a song can't be played in a given key is a fairly academic question the answer to which would have changed over the centuries as temperaments became closer and closer to equal.
    – phoog
    Commented Apr 3, 2022 at 10:10
  • 1
    In equal temperament (but NOT in the other well-tempered tunings), the OP’s question (a piece can be played in any key no matter what) holds true. In other well-tempered tunings (such as Bach/Lehmann), it will have a distinct sound for each key (so no “no matter what”) but will still be enjoyable. In other temperaments, it… has a good chance of sounding out of tune at some point.
    – mirabilos
    Commented Apr 6, 2022 at 2:11

Would some song be "adapted" but cannot be played due to a missing black key on the piano?

No. The reason songs can be transposed to different keys and still sound the same is that the relative intervals remain the same after transposition. Whether a key is black or white doesn't affect this. Some notes will move from a black key to a white key, or vice versa, but the distance between any two notes, as counted in half steps (semitones), will remain the same.

Consider "do re mi." The second note is two half steps above the first. The third note is four half steps above the first and two half steps above the second. But there are several different possibilities for black and white keys:

  • C D E: white, white, white
  • D♭ E♭ F: black, black, white
  • D E F♯: white, white, black
  • E♭ F G: black, white, white
  • E F♯ G♯: white, black, black
  • F G A: white, white, white
  • F♯ G♯ A♯: black, black, black

And so on. Note that F♯ G♯ A♯ is enharmonically equivalent to G♭ A♭ B♭.

In other words, it's not possible for there to be a "missing black note"; whatever note the transposition requires, be it black or white, it will be present.

  • 2
    The "No" at the beginning of your answer caught me off guard. You are correct that "No" applies to the text you quoted. I believe you would also say "Yes" to the question in the title, "Can we play any song in any key on the piano and by what principle is that?".
    – Ben
    Commented Apr 4, 2022 at 15:58
  • 1
    The only other possible interpretation for a “missing black key” I can think of is if they’re referring to a partially broken piano where a key is literally missing. But that’s in no way the regular situation when playing a piano. Commented Apr 4, 2022 at 23:47

Yes, any piece of piano music can be transposed to any key. And yes, sometimes a piece that was originally in a 'hard' key is adapted for beginners in an 'easy' one.

It can be surprising how often a 'pop' song is recorded in a 'hard' key like G♭ major or B major, while the sheet music is published in F or C. This is all very well, but remember WHY it might have been recorded in that key. Probably to put the vocalist in their optimum range, with the high notes high enough to be impressive but no so high as to be impossible! YOUR performance might be best in yet another key, and it won't have anything to do with ease of playing on the keyboard!

We could discuss highly technical pieces for piano that would become real finger-twisters if transposed. Or we could talk about schemes of tuning from the Baroque era that limited the possibilities of transposition. We could talk about the lowest note on a bass guitar, or about how certain guitar 'licks' only work in certain keys due to using open strings. But I think this question is about 'songs', today, played on a piano. No, there won't be any 'missing black notes'. Any song can be played in any key.

  • There are piano pieces that use notes close to the ends of the 88-key keyboard. I have heard the word "song" used generically to include instrumental pieces, so in this sense there would be some "songs" that cannot be transposed into certain keys (without using a non-standard piano).
    – Peter
    Commented Apr 3, 2022 at 11:38
  • @Peter - not strictly true. At the top end, a 'song' could be transposed into any key, an octave lower, and at the bottom, vice versa.
    – Tim
    Commented Apr 3, 2022 at 12:48
  • 5
    Yes, there will always be extreme cases. And isn't it wonderful how this forum delights in discussing them - often at greater length than the main answer!
    – Laurence
    Commented Apr 3, 2022 at 12:58
  • 1
    @Tim, if it uses one extremity or the other, but not both. Changing octaves as needed for that would be a rearrangement, not just a transposition.
    – Peter
    Commented Apr 3, 2022 at 13:30
  • 1
    Note that if you're using an electric keyboard instead of a mechanical piano, most of the better quality ones will give you the option to quickly transpose the entire instrument up or down as needed - which can allow you to match whatever the singer or other musicians need without making the fingering more complicated for the pianist. (You technically can do this with an old fashioned regular mechanical piano, it just takes hours to retune every string...) Commented Apr 4, 2022 at 15:42

By using movable do any song can be played in any key. Let's say it starts with do, do, do, re, mi, re. That equates to notes (in any key) of 1,1,1,2,3,2.

The simplicity of a song played on the piano in particular seems to revolve around the 'how many black keys' syndrome. None - every note is from a white key - seems to be regarded as the easiest, thus playing in key C is easier than in, say, key E, with 4 black keys being needed. That's the reason piano starter books are essentially using key C.

Obviously accidentals will mess up the plan - in key C, they're going to be black keys, but in other keys they may end up white! Not a lot of help to someone beginning.


Let's start with a definition.

The term "octave" came from the fact that it is a group eight "natural" notes (the white keys). However, if you actually count the keys, you'll notice that there are actually only seven notes in an octave. Whoever came up with this nomenclature counted A as being part of both the octave below it, and the one above it*. (This is also why "Do Re Me" both starts and ends on "Do".) Then, when you add the 5 black keys, you see that there are actually 12 notes ("half-steps") per octave.

However, all of that is just a convenient way to label certain specific frequencies of sound. The A above middle C is defined as 440Hz**. The frequency for every other note on the keyboard is just the frequency of the note immediately below it multiplied by the 12th root of 2 (approximately 1.0595).

So, what does that have to do with tuning?

Consider a basic C Major chord, which is C, E, and G played at the same time. If you do the math, you'll find that E is 1.25 times the frequency of C, and G is 1.5 times the frequency (or at least, close enough that our ears can't tell the difference). It turns out that our ears are sensitive to the ratio of frequencies, and that's what creates the sensation of being "in tune". So, if you move each note down a half step (C to B, E to D#, and G to F#), the chord will sound exactly the same (albeit slightly lower), because the ratios between the notes is preserved. On the other hand, if you move just the E down to D# (creating a C Minor chord), the structure of the chord is changed, so it doesn't sound the same.

Try this on an actual piano. Play a C Major (C, E, G), a C Minor (C, D#, G), a B Major (B, D#, F#), and a B Minor (B, D, F#). You'll hear that the major chords sound much more similar to each other than they do to their respective minor chords, even though they don't have any notes in common.

So, to transpose a song, it's only necessary to maintain the relative position of each note by moving it the same number of half-steps in the same direction. C to D is two half-steps*** up, so to transpose a song from C to D, every single note would be moved up two half-steps (C to D, E to F#, etc.).

* A majority of music theorists consider the octave to go from C to C, rather than from A to A. But since I'm taking a more mechanistic view of music for this answer, I'm using A as the start of the octave.

**In the most common modern tuning, anyway. There are others.

*** Not necessarily the same thing as one whole step.

  • 4
    C minor contains Eb, not D#. 'Two half steps not necessarily equal to one whole step' - please explain.
    – Tim
    Commented Apr 4, 2022 at 7:43
  • Isn't C to D one whole step up and not 2 half steps up? C and D being one whole step apart instead of 2 half steps becomes really apparent when figuring out your own just intonation system or Pythagorean tuning.
    – Dekkadeci
    Commented Apr 4, 2022 at 12:32
  • 1
    @HiddenWindshield - a 'whole note' is actually a note which is four beats long! Time for a change of teacher..?
    – Tim
    Commented Apr 4, 2022 at 15:55
  • 3
    That's o.k. But C minor still doesn't have D# in it !
    – Tim
    Commented Apr 4, 2022 at 16:08
  • 1
    Cm contains Eb, not D#; you lower the third of a major triad to get a minor triad. D# is the minor third of B#m, and calling the minor third of Cm a D# can only lead to confusion, not consistency. A whole-step is always two half-steps; scales are even described as collections of whole-steps and half-steps. If your contention that the next note in a scale is a whole-step were true, then the major scale would just be a collection of whole-steps (instead of W W H W W W H). You seem to be confusing whole-steps and half-steps with scale-steps.
    – user39614
    Commented Apr 4, 2022 at 16:45

Each semitone is (twelfth root of two, about 1.059463) times the frequency of the previous. The music comes from relative frequencies, so shifting the entire piece by any number N of semitones yields the same music perception.

What is "relative frequencies"? Let's assume

Mid-C is 261.625565 Hz. Then, 
C# is 261.625565 * 1.059463 = 277.182605 Hz and 
D is 277.182605 * 1.059463 = 293.664714 Hz

Let's consider a two-note song C-C#. What you actually hear (perceived music) is : something, then something 1.059463 times higher than that something. The music "stays the same" either in the original 261.625565 then 277.182605 or if you shifted one semitone higher 277.182605 then 293.664714.

Note that all this is possible because of the initial fact that each semitone is (constant) times the previous. This is true in modern music...it has not always been such. I don't know much about this, but I think "pythagorean scale" is a counterexample.

  • 5
    Thanks for contributing! This answer could benefit from some expansion of the one phrase that addresses the OP's core question, "The music comes from relative frequencies." It's nice to keep in mind the background of the OP and to answer in terms that are suited to their experience and prior knowledge. Commented Apr 4, 2022 at 15:08

Maybe the question here is asking for insights on how to play songs in any key?

Back in summer 2019, I was trying to play some traditional Christmas carols by ear and after playing 3 or 4 songs, I suddenly realized that the basic chord that goes with the melody is the melodic note played as note 1, 3, or 5 of the basic chord. This is essentially an alternative but much more simplified expression of the commonly cited and shared rule of thumb or “principle”: select one of the seven basic chords on the key of the song’s melody that carries the current note in the melody.

The moment I discovered this simplified rule, I was suddenly able to play songs by ear for hours on end and play songs in any key, and doing this without having to know in advance what key I unknowingly chosen to start and play a song (no joke!). I thought I would never be able to do any of this in the 40+ years of playing piano with 100% reliance on rote memory and sheet music!


...I think it means the "Do Ray Me" changes from C to D or to E or to F, all the way to B. Would some song be "adapted"...

The term for this is transposition. You can transpose a song from one key like C major to another like E♭ major.

...but cannot be played due to a missing black key on the piano? If any songs can be played in any key, how do the white keys and black keys make it always possible -- by what principle is it?

I don't know if "principle" is the right word, but all the piano keys - regardless of black/white color - in modern equal temperament tuning - are spaced one half step apart. Some systems like MIDI simply number those keys sequentially (1,2,3...) regardless of color. For example, MIDI key 60 is middle C. One way to think of transposition is adding a certain number of half steps to a given pitch. So, middle C, scientific name C4, MIDI key 60, can be transposed up two half steps by adding 2 to get MIDI key 62, or D4. You could transpose it up three half steps by adding 2 to get MIDI key 63, D♯4/E♭4.

The point is theoretically there will always be a piano key available above or below because the piano keys are all separated by half steps and you transpose by some number of half steps. The color of the key may change, but nevertheless there will be a key available.

You can play around with this idea on the keyboard yourself to see it in action. Just play something simple like a C major chord, or just the first five tones of C major C D E F G. Then pick some number of half steps to transpose, like 3. Take each tone and move it up by 3 half steps. If you do that, the C major chord becomes E♭ major, and C D E F G become E♭ F G A♭ B♭. If you do that for transpositions of 1 to 12 half steps, you will transpose to all major keys, and you will see you never end up with any missing keys.

Simply put, you can transposed from any key to any other key. You will not find any missing piano keys.

I have seen some songs being played in F major or E major or C or D on the piano, and they correspond to different levels of difficulties.

Generally speaking, I think the "easy" keys are consider those with key signatures of up to two sharps or flats, or perhaps 3 sharps or flats. In a lot of beginner/recreational/practical music up to 2 sharps/flats will cover the bulk of material with 3 sharps/flats mixed in occasionally.

I think that sense of "easy" has more to do with reading the score than keyboard mechanics. For a beginner it's hard to remember all the sharps and flats of key signatures and keep track of accidentals. "Easy" keys just reduces the number of sharps/flats encountered in a score overall. When the beginner advances to playing comfortably in all keys, the notion of "easy" keys sort or goes away. Although for me, "hard" keys become hard, because of certain enharmonic note spelling and double sharps/flats that can be encountered.

It's interesting to note that Chopin considered the supposedly "easy" key of C major a difficult key and keys with a few sharps/flats easier to play in, because the mixture of black and white keys fits the hand more comfortably.

Getting back to transposition. You could take some music that is relatively easy in one key, easy because the particulars of the piano key mechanics fit the hand, but when transposed into another key, it no longer fits the hand the same way, and it becomes hard. That is a possibility, but not a given. Lots of music can be transposed with no problems, and some musicians can transposed music on the fly.

For the SE community more than the OP, my answer is about tonal music, in major/minor key, in the typical range of typical beginner piano music. The OP is a newbie. They aren't asking about transposing in ancient tuning systems, or extreme ranges that would run off the ends of the piano keyboard.


Any song can be played in any key. Whether a key is easy depends on who is playing it. Irving Berlin could only play in F# and had a transposing lever on his piano.


From the answer of @guidot about the 12EDO, I made a guess, and did some experiment on the piano keyboard, and turned out this may be the case:

And thanks to several other users: they have mentioned "12" or "twelve" as well.

I am hoping I can write it here, so that a 10 year old can understand it.

  1. When we say the notes are Do Ray Me Fa So, and that Do♯ is a "half note", that is only a convenient way for us to describe things. In reality, whenever we have a key on the keyboard, no matter it is white key or black key, it is going up 1 "note".

  2. Therefore, from Do to Do♯, that is one note. And then from Do♯ to Ray, that also is one note. The same is true from Ray to Ray♯, and from Ray♯ to Me, and Me to Fa.

  3. Now the interesting part is from Me to Fa. There is no black key, and it is just one "note" here also.

  4. So you see, in 1 Octave, which is Do Ray Me Fa So La Ti, there are 7 white keys and 5 black keys, and that's "12 increments", and each increment is in fact one "note".

  5. It is just that human defines "jumping twice" from Do to Ray, as the "traditional one note" increase. But in fact, it is going up 2 "notes".

  6. So human defined the "7 notes" for it to sound well to the ears, perhaps some several hundred years ago, when in fact, it is going up 12 notes.

  7. And I suspect that it is either by multiplication or exponential, so that going from one note to the next, it is by a certain factor. Turns out it is multiplication, because when I check the frequency of C3 and C4 (which is a Do to the next higher Do), I get the following webpage, and when I divide Do# by Do, or divide Fa by Me, I get the same number: 1.059....

  8. And in fact, if I look at C3 and C4, it is exactly double the frequency.

  9. So if I take the 12th root of 2, using Ruby, Python, or JavaScript: 2 ** (1.0 / 12), I get 1.0594630943592953.

  10. So that means, from Do to Do#, the frequency is multiplied by 1.0594630943592953, and the same from Do# to Ray, or Ray to Ray#, or Ray# to Me, or Me to Fa: whenever there is a white or black key and we "move to the next step", it is multiplied by 1.0594630943592953 for the frequency.

  11. So now, if we take the Do# as the new "Do", we can get the full 12 "notes" again, by doing the same thing: C# is the new Do, and D# is the new Ray, and F is the new Me (because we need to jump 2 steps). And we just follow this "jump up the same way by 2 steps or 1 step), we can get the new Do Ray Me Fa So La Ti Do. So to go from the new Me to the new Fa, we can only jump 1 step but not two, because that's the way to go from Me to Fa if we look at how it is from C3 to C4.

  12. Likewise, we can do exactly the same step, if we start with D and call it the new Do, and then "jump two steps" to get the new Ray...

  13. So in fact, we can start with any key on the piano keyboard at all, and say it is a Do, and "jump twice" to get the Ray, jump twice again to get the Me, and "jump once" to get the Fa.

  14. And it is the same: we jump exactly 12 times to get to the new Do. What does that mean? It means we can pick any key on the keyboard, and call it a Do, and then jump 2 steps to get a Ray, jump 2 steps to get a Me, and jump 1 step to get a Fa, and after doing so, for 12 steps, we get the new, higher Do.

  15. As a result, we can just follow this rule: jump 12 times to jump to the next octave, and we can start by any note of the piano keyboard, and we have "transposed it" or did the "transposition".

  16. Now why we pick 7 notes out of the 12 notes to make it sound good to our ears, I am not sure how or why. In fact, why would different cultures pick the same 7 notes? Or maybe several hundred years ago when people can travel to different continents by ship, they consolidated the middle C to the same frequency and consolidated some other notes, and all different cultures follow the same way of frequency increase.

  17. Using 12 steps for doubling the frequency seems like something special as we have 12 hours in the day and in the evening, and we have 12 months in a year, and we have 12 markings on a clock to divide an hour into 12 five-minutes.

  18. Perhaps in some culture, it was said that there are only 5 notes... so their music is special and has their own characteristics, but this part I don't have too much knowledge about.


There are two things you should understand.

First, the interval between two consecutive piano keys is always a semitone. Doesn't matter what colour. C to C#, C# to D, E to F are semitones.

There aren't any black keys missing.

(Let's not get into how it came to be that the white keys are sometimes a semitone apart and sometimes a whole tone and there's a black key in between. Let's leave it at accepting that it is that way.)

Second, transposing a song means taking it and shifting it all a given number of semitones up or down.

Say you take a song composed in A major and play it in C major. Every tone you play will be three semitones above what it was in the original version. Every A becomes C, every B becomes D, every C# becomes E, if there was a C♮ then it becomes Eb.

You can transpose any song to any key of the same kind: X minor to any Y minor, X major to any Y major. You can't transpose songs from major key to minor or vice versa.

You can do this because the piano has equal temperament tuning, so each semitone is the same ratio of frequencies. Doesn't matter which key you play in, it sounds equally good. There are older systems of tuning in which the semitones are NOT the same size but some are slightly larger and other slightly smaller. In such a tuning, the song would only sound good in some keys, in others it would sound off (because the pattern of which semitones are slightly smaller and which are slightly larger would be "wrong", and intervals that are meant to sound clear would not).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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