C major is just a point on a continuum. Here are the major keys, the ones with the most flats at the beginning and the ones with the most sharps at the end...
G flat major (6 flats)
D flat major (5 flats)
A flat major (4 flats)
E flat major (3 flats)
B flat major (2 flats)
F major (1 flat)
C major (no sharps or flats)
G major (1 sharp)
D major (2 sharps)
A major (3 sharps)
E major(4 sharps)
B major (5 sharps)
F sharp major (6 sharps)
In the 24-prelude-form of Chopin, Scriabin, Shostakovich, etc, you actually start with Prelude 1 in C major, then Prelude 2 in the relative minor (A minor in this case), then Prelude 3 move to the dominant of the preceding major (G), then Prelude 4 to its relative minor (E minor), and so on. You are moving regularly sharpwards all the time. But at the point (the thirteenth Prelude) when you ought by rights to get to F sharp major the composer switches to G flat (which on a piano is exactly the same thing) and then rides home on the flat keys, to end, finally, with the 24th Prelude in D minor.
This midway switch from sharps to flats isn't very satisfactory in theory because you can't really loop the loop like that. You really ought to carry on as you were. After all, the key sequence could be continued infinitely in either direction.
For instance, the dominant of F sharp major is C sharp major, which has seven sharps. The dominant of C sharp major is G sharp major with eight sharps. How do you get eight sharps when there are only seven notes in the scale? Because then you get into the realms of double sharps. In this case G sharp major includes the note F double-sharp (which is played on a piano as the white note more commonly known as G). If you carry on repeatedly modulating to the dominant then the key progression goes like this:
F sharp major (six sharps)
C sharp major (seven sharps)
G sharp major (eight sharps, the new note is F double-sharp)
D sharp major (nine sharps, the new note is C double-sharp)
A sharp major (ten sharps, the new note is G double-sharp)
E sharp major (eleven sharps, the new note is D double-sharp)
B sharp major (twelve sharps, the new note is A double-sharp)
F double-sharp major (thirteen sharps, the new note is E double-sharp)
C double-sharp major (fourteen sharps, the new note is B double-sharp)
G double-sharp major (fifteen sharps, the new note is F treble-sharp)
and so on....
It may all be only 24 keys (major and minor) on the piano, but in reality these keys extend forever. No, not in our reality. Who ever heard of such monstrous modulation? It's true that a composer occasionally ends up trespassing into one of these strange keys (Janaček is notorious) and he does it for excellent reasons, you do not suddenly switch from sharp notation to flat notation, not even in piano music, and if you are moving through dominants and end up modulating to G sharp major, then that's how it is, and to suddenly switch to flat notation would actually be more difficult for the performer as well as conveying a false idea of the underlying relationship.
If you glance down the left-hand side of those lists of keys you'll notice the following repeated sequence of letters: CGDAEBF. And it's just the same with minor keys.
(in the sharp keys you get to the dominant by acquiring a sharp, while in the flat keys you get to it by giving up a flat...)
"Flats" and "sharps" and the names of notes are completely arbitrary terms; for example in other European languages the notes are not named by letters of the alphabet. Even the actual pitch is not a fixed thing, Mozart's note C was a good deal lower than our note C. The only thing that isn't arbitrary is the mathematical pattern. And yet even this is culturally bound because key-modulation plays no great part in most of the world's music, and in post-classical western popular music is minimal or rudimentary, while in post-classical western art music it is now conceived as one style among many, moreover one with particular antique resonances. We are talking about a false stasis, Bach to Shostakovich and out. It was a moment. Everything moves on.
This Prelude form is a dead letter. [You might say it already became so when Debussy, though retaining the number 24 in his two books of preludes, abandoned the scheme of keys.] It is therefore merely cranky and amateur to raise some objections, but personally though I do love these sets of Preludes there is one thing in them I find cloying, especially if the performer leaves very short gaps between each Prelude, which they usually do. It's the repetitive nature of the key transitions from one prelude to the next. Every single minor Prelude comes to us preceded by a piece in the relative major. Every single major prelude (except the first) comes to us preceded by a piece in the relative minor of the subdominant.
When I compose my 24 preludes (in imaginary Crankland) they will be the worst in the world, except in one sole respect - every single one of my 23 transitions will involve a different kind of key relationship - not just dominants and relative minors, but the relative minor of the submediant and remoter leaps too. So here's a puzzle: - can you work out a sequence that achieves this using each of the 24 (major and minor) keys once and only once? And can you do the same thing for a set of twelve preludes in the major keys alone?
(3 days later...)
There is one solution of a quite methodical kind. You begin with a zero point (C major for example) and if you keep leaping back and forth across it, steadily widening the interval each time, you end up with a key sequence where all the modulations are different: C, B, D flat, B flat, D, A, E flat, A flat, E, G, F, G flat. This would work as the pattern for twelve preludes, irrespective of whether the keys are major or minor or anything else.
A workable sequence involving all 24 major and minor keys is possible by doubling the above sequence. I can’t see a way, however, to consistently alternate major and minor as in the traditional sequence – but isn’t this better in any case?
1. C major
2. B minor (implying transition through G)
3. D flat major (remote)
4. B flat minor (to relative minor)
5. D major (remote)
6. A major (to dominant – majors)
7. E flat minor (remote – tritone shift, major to minor)
8. G sharp minor (to subdominant – minors – considered as A flat minor)
9. E major (to relative major of subdominant)
10. G minor (remote)
11. F major (to relative major of dominant)
12. F sharp minor (remote – sharing a third on A)
13. C minor (remote – tritone shift, minor to minor)
14. B major (remote – sharing a third on E flat/D sharp)
15. C sharp minor (to relative minor of subdominant)
16. B flat major (remote)
17. D minor (to relative minor of dominant)
18. A minor (to dominant – minors)
19. E flat major (remote – tritone shift, minor to major)
20. A flat major (to subdominant – majors)
21. E minor (remote)
22. G major (to relative major)
23. F minor (remote)
24. G flat major (implying transition through D flat)
You might also be interested in this post