The same sounding key written the other way round the circle of fifths, or
null when it has no second spelling.
Twelve fifths is one enharmonic turn of the circle, so a tonic's alternative
spelling sits at its own position ±12: Db (-5) is also C# (+7). It is offered
only when the key is actually written there, by the same test
spelledKeyOf spells with. That is why C major is alone while Db major
and F# major each answer with their twin: Eb major's twin would be D# major
and its nine sharps, and pitch class 3 altered is written D# but never Eb,
which would need two double flats to say the same thing.
The answer is therefore always a spelling the key is written on, which makes
the relation its own inverse for such a key. A key spelled some other way —
a tonic a transposition drove out to Ebb, say — still names its written twin,
so this is also the way back from a spelling no one writes.
The relation respells rather than moves, so the mask is kept: the other
spelling of C# lydian is Db lydian, and its root pitch class is the one it
was handed.
The same sounding key written the other way round the circle of fifths, or null when it has no second spelling.
Twelve fifths is one enharmonic turn of the circle, so a tonic's alternative spelling sits at its own position ±12: Db (-5) is also C# (+7). It is offered only when the key is actually written there, by the same test spelledKeyOf spells with. That is why C major is alone while Db major and F# major each answer with their twin: Eb major's twin would be D# major and its nine sharps, and pitch class 3 altered is written D# but never Eb, which would need two double flats to say the same thing.
The answer is therefore always a spelling the key is written on, which makes the relation its own inverse for such a key. A key spelled some other way — a tonic a transposition drove out to Ebb, say — still names its written twin, so this is also the way back from a spelling no one writes.
The relation respells rather than moves, so the mask is kept: the other spelling of C# lydian is Db lydian, and its root pitch class is the one it was handed.