pyabc2.Key.parse_key

static Key.parse_key(key)

Parse a key spec string (e.g., D, Amin) and return the tonic and mode (3-char abbreviation).

Used when you pass name to the constructor.

Parameters:

key (str)

Return type:

tuple[PitchClass, str]