neoscore.western.key_signature_type

class neoscore.western.key_signature_type.KeySignatureType[source]

Bases: Enum

Common key signatures.

Key signatures are specified as dicts between the 7 pitch letter names and either an AccidentalType or None. They are enumerated here in the form [pitch letter][f|s]_[major|minor]. For example:

  • c major is KeySignatureType.c_major

  • f-sharp minor is KeySignatureType.fs_minor

  • d-flat major is KeySignature.df_major

This enum defines the entire circle of fifths - from 0 flats to 7, and 0 sharps to 7.

C_MAJOR = {'a': None, 'b': None, 'c': None, 'd': None, 'e': None, 'f': None, 'g': None}
A_MINOR = {'a': None, 'b': None, 'c': None, 'd': None, 'e': None, 'f': None, 'g': None}
DF_MAJOR = {'a': AccidentalType.FLAT, 'b': AccidentalType.FLAT, 'c': None, 'd': AccidentalType.FLAT, 'e': AccidentalType.FLAT, 'f': None, 'g': AccidentalType.FLAT}
BF_MINOR = {'a': AccidentalType.FLAT, 'b': AccidentalType.FLAT, 'c': None, 'd': AccidentalType.FLAT, 'e': AccidentalType.FLAT, 'f': None, 'g': AccidentalType.FLAT}
CS_MAJOR = {'a': AccidentalType.SHARP, 'b': AccidentalType.SHARP, 'c': AccidentalType.SHARP, 'd': AccidentalType.SHARP, 'e': AccidentalType.SHARP, 'f': AccidentalType.SHARP, 'g': AccidentalType.SHARP}
D_MAJOR = {'a': None, 'b': None, 'c': AccidentalType.SHARP, 'd': None, 'e': None, 'f': AccidentalType.SHARP, 'g': None}
B_MINOR = {'a': None, 'b': None, 'c': AccidentalType.SHARP, 'd': None, 'e': None, 'f': AccidentalType.SHARP, 'g': None}
EF_MAJOR = {'a': AccidentalType.FLAT, 'b': AccidentalType.FLAT, 'c': None, 'd': None, 'e': AccidentalType.FLAT, 'f': None, 'g': None}
C_MINOR = {'a': AccidentalType.FLAT, 'b': AccidentalType.FLAT, 'c': None, 'd': None, 'e': AccidentalType.FLAT, 'f': None, 'g': None}
E_MAJOR = {'a': None, 'b': None, 'c': AccidentalType.SHARP, 'd': AccidentalType.SHARP, 'e': None, 'f': AccidentalType.SHARP, 'g': AccidentalType.SHARP}
CS_MINOR = {'a': None, 'b': None, 'c': AccidentalType.SHARP, 'd': AccidentalType.SHARP, 'e': None, 'f': AccidentalType.SHARP, 'g': AccidentalType.SHARP}
F_MAJOR = {'a': None, 'b': AccidentalType.FLAT, 'c': None, 'd': None, 'e': None, 'f': None, 'g': None}
D_MINOR = {'a': None, 'b': AccidentalType.FLAT, 'c': None, 'd': None, 'e': None, 'f': None, 'g': None}
GF_MAJOR = {'a': AccidentalType.FLAT, 'b': AccidentalType.FLAT, 'c': AccidentalType.FLAT, 'd': AccidentalType.FLAT, 'e': AccidentalType.FLAT, 'f': None, 'g': AccidentalType.FLAT}
EF_MINOR = {'a': AccidentalType.FLAT, 'b': AccidentalType.FLAT, 'c': AccidentalType.FLAT, 'd': AccidentalType.FLAT, 'e': AccidentalType.FLAT, 'f': None, 'g': AccidentalType.FLAT}
FS_MAJOR = {'a': AccidentalType.SHARP, 'b': None, 'c': AccidentalType.SHARP, 'd': AccidentalType.SHARP, 'e': AccidentalType.SHARP, 'f': AccidentalType.SHARP, 'g': AccidentalType.SHARP}
DS_MINOR = {'a': AccidentalType.SHARP, 'b': None, 'c': AccidentalType.SHARP, 'd': AccidentalType.SHARP, 'e': AccidentalType.SHARP, 'f': AccidentalType.SHARP, 'g': AccidentalType.SHARP}
G_MAJOR = {'a': None, 'b': None, 'c': None, 'd': None, 'e': None, 'f': AccidentalType.SHARP, 'g': None}
E_MINOR = {'a': None, 'b': None, 'c': None, 'd': None, 'e': None, 'f': AccidentalType.SHARP, 'g': None}
AF_MAJOR = {'a': AccidentalType.FLAT, 'b': AccidentalType.FLAT, 'c': None, 'd': AccidentalType.FLAT, 'e': AccidentalType.FLAT, 'f': None, 'g': None}
F_MINOR = {'a': AccidentalType.FLAT, 'b': AccidentalType.FLAT, 'c': None, 'd': AccidentalType.FLAT, 'e': AccidentalType.FLAT, 'f': None, 'g': None}
A_MAJOR = {'a': None, 'b': None, 'c': AccidentalType.SHARP, 'd': None, 'e': None, 'f': AccidentalType.SHARP, 'g': AccidentalType.SHARP}
FS_MINOR = {'a': None, 'b': None, 'c': AccidentalType.SHARP, 'd': None, 'e': None, 'f': AccidentalType.SHARP, 'g': AccidentalType.SHARP}
BF_MAJOR = {'a': None, 'b': AccidentalType.FLAT, 'c': None, 'd': None, 'e': AccidentalType.FLAT, 'f': None, 'g': None}
G_MINOR = {'a': None, 'b': AccidentalType.FLAT, 'c': None, 'd': None, 'e': AccidentalType.FLAT, 'f': None, 'g': None}
B_MAJOR = {'a': AccidentalType.SHARP, 'b': None, 'c': AccidentalType.SHARP, 'd': AccidentalType.SHARP, 'e': None, 'f': AccidentalType.SHARP, 'g': AccidentalType.SHARP}
GS_MINOR = {'a': AccidentalType.SHARP, 'b': None, 'c': AccidentalType.SHARP, 'd': AccidentalType.SHARP, 'e': None, 'f': AccidentalType.SHARP, 'g': AccidentalType.SHARP}
CF_MAJOR = {'a': AccidentalType.FLAT, 'b': AccidentalType.FLAT, 'c': AccidentalType.FLAT, 'd': AccidentalType.FLAT, 'e': AccidentalType.FLAT, 'f': AccidentalType.FLAT, 'g': AccidentalType.FLAT}