Optionaltonic?: NoteDataThe spelled tonic the key is written with, when it travels beside it.
Optionalvariant?: KeyVariantThe scale form the key stands in, when it travels beside it.
The scale this key data denotes.
Optionaltonic?: NoteDataThe spelled tonic the key is written with, when the caller named one.
Optionalvariant?: KeyVariantThe scale form the key was read under, when it was read under one.
The key data this value stands for, carrying everything it knows.
Anything that names a key: a key name, a plain KeyScale, the plain data a key serializes to, or a value that serializes to one such as the
Keyclass.The plain-data form is here because a project file holds a key that way, and reading one back has to be the same call as passing the class it came from.
Deliberately wider than what a resolver hands back: a caller may hand in a bare scale, or data written before the spelling travelled with it, and the resolver fills in what is missing rather than refusing it. Narrowing this to the resolved shape would make the acceptance of every entry point shrink the day the resolved shape gained a field.
A scale is accepted with the spelling and the form written beside it as well as without them, because a key region carries its key that way — asked positional questions wherever a plain scale would be. The resolver reads them when they are there, and this says so: a shape a resolver reads and a type denies is one refactoring away from being dropped silently.