Render a spelled tonic and a mode as a key name.
The inverse of parseKeyName. German is written the way it is read, with the mode in the case of the tonic as well as in the word.
The spelled tonic and mode; any octave on the tonic is dropped, since a key has no register.
Optional
system writes the name in that notation system instead of English.
system
The key name.
If the tonic or the mode is not valid.
import { formatKeyName, parseNote } from '@libraz/libcantus';formatKeyName({ tonic: parseNote('G#'), mode: 'minor' }); // 'G# minor'formatKeyName({ tonic: parseNote('G#'), mode: 'minor' }, { system: 'german' }); // 'gis moll' Copy
import { formatKeyName, parseNote } from '@libraz/libcantus';formatKeyName({ tonic: parseNote('G#'), mode: 'minor' }); // 'G# minor'formatKeyName({ tonic: parseNote('G#'), mode: 'minor' }, { system: 'german' }); // 'gis moll'
Render a spelled tonic and a mode as a key name.
The inverse of parseKeyName. German is written the way it is read, with the mode in the case of the tonic as well as in the word.