Static ReadonlymajorMajor keys clockwise from C, in upper case.
Static ReadonlyminorMinor keys clockwise from A, in lower case ('a' is A minor), aligned with their relative majors.
StaticgetShortest distance (0–6) between two keys on the same circle. Returns -1 if keys are of different modes or unrecognized.
StaticgetGets the dominant key (perfect fifth up / one step clockwise).
StaticgetStaticgetReturns the ModalKey for a given root and mode name, computing the
parent major key (the major scale from which this mode is derived).
For example, D dorian → parent major key = C (D is degree 2 of C major). Only the 7 diatonic modes of the major family are supported.
StaticgetStaticgetReturns keys within radius steps on the same circle, sorted closest first. Clockwise neighbor before counter-clockwise at each distance. Excludes key itself.
StaticgetReturns the parallel key - same root, opposite mode. 'C' → 'c', 'a' → 'A', 'F#' → 'f#'.
StaticgetReturns the 0–11 index of the key on its circle (C/a = 0, G/e = 1…). Returns -1 if the key is not recognized.
StaticgetReturns all tonally related keys sorted by distance ascending. Covers: relative, parallel, dominant, subdominant, and ±2 neighbors.
StaticgetGets the relative minor for a major key, or relative major for a minor key.
StaticgetReturns the key signature of a key as written: Gb → 6 flats, F# → 6 sharps, C# → 7 sharps, eb → 6 flats. Theoretical keys go past 7 (G# → 8 sharps). Unrecognized keys → no accidentals.
Number of flats in the key signature.
Number of sharps in the key signature.
StaticgetGets the subdominant key (perfect fourth up / one step counter-clockwise).
StaticnavigateMoves steps positions clockwise (positive) or counter-clockwise (negative). Returns empty string if key is not recognized.
Circle of Fifths utility. Convention: major keys use uppercase ('C', 'G'...), minor keys use lowercase ('a', 'e'...). Methods that return keys follow this same convention - callers should use case to distinguish mode.