A pitch class is like a pitch, but with no octave specified. E.g. the pitch class "B♭".
Convert a Pitch to a PitchClass.
fromPitch Pitch.c4 == cCheck whether two pitch classes are enharmonic equivalents of each other. Enharmonic equivalents are two pitch classes with different names but the same sound:
areEnharmonicEquivalents cFlat b == TrueGet the accidentals of a pitch class.
Sharps are positive:
accidentals fSharp =
1Flats are negative:
accidentals aFlat =
-1Naturals are zero:
accidentals c =
0Get a pitch class's letter name and accidental:
toString bFlat == "B♭"These are used less frequently in music. Most likely you want a pitch from the previous section.