A key defines a relationship between a set of pitch classes in a composition. E.g. the "key of D major".
Music.Internal.Key.Key
tonic : Key -> Music.PitchClass.PitchClass
Get the tonic pitch class for a key:
tonic gMinor == PitchClass.g
scale : Key -> Music.Internal.Scale.Scale
Get the scale for a key:
scale aFlat == Scale.major PitchClass.aFlat
isMajor : Key -> Basics.Bool
Check whether a key is major:
isMajor bFlat == True
isMinor : Key -> Basics.Bool
Check whether a key is minor:
isMinor cSharpMinor == True
signature : Key -> List Music.PitchClass.PitchClass
Get the key signature for a key as a list of the pitch classes that are sharpened or flattened:
signature bFlat == [ PitchClass.bFlat, PitchClass.eFlat ]
relative : Key -> Key
Get the relative minor or relative major of a key:
relative f == dMinor
relative cSharpMinor == e
parallel : Key -> Key
Get the parallel minor or parallel major of a key:
parallel f == fMinor
parallel cSharpMinor == cSharp
toString : Key -> String
Get the name of a key:
toString eFlat == "E♭"
toString aMinor == "Am"
c : Key
f : Key
bFlat : Key
eFlat : Key
aFlat : Key
dFlat : Key
gFlat : Key
g : Key
d : Key
a : Key
e : Key
b : Key
fSharp : Key
aMinor : Key
dMinor : Key
gMinor : Key
cMinor : Key
fMinor : Key
bFlatMinor : Key
eFlatMinor : Key
eMinor : Key
bMinor : Key
fSharpMinor : Key
cSharpMinor : Key
gSharpMinor : Key