Double-flats and double-sharps are used in music as accidentals, but they are never placed in the key signature (in music that uses equal temperament), because it would make reading the key signature very difficult.
For example, the key of D♭ minor is not usually used to write music down, because its key signature would contain a B. An equal-tempered scale of D♭ minor has exactly the same notes as the C♯ minor scale. Key pairs like this are called enharmonically equivalent. So the theoretical key of D♭ minor is usually written with the key signature of C♯ minor.
Enharmonic equivalence [change]
A piece of Western music usually has a home key, and a passage within it may modulate to another key, which is usually closely related to the home key. (Usually, close to the original around the circle of fifths.) When the key is near the top of the circle (a key signature of zero or few accidentals), the writing of both keys is easy- a small number of extra sharps or flats is added. But if the home key is near the bottom of the circle (a key signature with many accidentals), enharmonic equivalence may need to be used because simply adding accidentals will result in a key with too many accidentals to be easy to play or write in.
The need to consider theoretical keys [change]
In each of the bottom three places on the circle of fifths the two enharmonic equivalents can both be written without double-sharps or double-flats and so do not classify as 'theoretical keys':
|Major (minor)||Key signature||Major (minor)||Key signature|
|B (G♯)||5 sharps||C♭ (A♭)||7 flats|
|F♯ (D♯)||6 sharps||G♭ (E♭)||6 flats|
|C♯ (A♯)||7 sharps||D♭ (B♭)||5 flats|
But when a relative key is on the opposite side of the circle from its home key, then in theory modulating to that key would involve adding so many sharps or flats that double-sharps and double-flats would have to be written in the key signature. The following six keys (which are the parallel major/minor keys of those above) would require one, two or three double-sharps or double-flats:
|Key||Key Signature||Relative key|
|D♭ minor||8 flats (= C♯ minor)||F♭ major|
|G♭ minor||9 flats (= F♯ minor)||B major|
|C♭ minor||10 flats (= B minor)||E major|
|G♯ major||8 sharps (= A♭ major)||E♯ minor|
|D♯ major||9 sharps (= E♭ major)||B♯ minor|
|A♯ major||10 sharps (= B♭ major)||F minor|
For example, if a piece in E major were to modulate up a fifth to B major, which is next to it on the circle and on the same side of the circle, the notation is clear and simple; an extra sharp is added to make five sharps. If it was modulated again, it would become F♯ major, written with six sharps. The next modulation, to C♯ has seven sharps. But the next modulation would be to a theoretical key of G♯ which would need an eighth sharp- for the previous F♯ note to become F in the key signature. To avoid theoretical keys, the new section would usually be written in the enharmonically equivalent key signature of A♭ major.