A modal key: a root note, a mode name, and the parent major key that the mode is derived from. For example, D dorian is derived from C major (D is the 2nd degree of C major).
Mode name in lower case: 'dorian'.
'dorian'
Major key the mode belongs to ('C' for D dorian); empty when the mode is not one of the seven diatonic modes.
'C'
Root of the mode, as passed in: 'D'.
'D'
A modal key: a root note, a mode name, and the parent major key that the mode is derived from. For example, D dorian is derived from C major (D is the 2nd degree of C major).