Conversion to and from PitchClass tuple form would be simpler if the Accidental type didn't exist, because Offsets can't be converted to Accidentals, only to Maybe Accidentals or similar.
Since Accidental exists mainly to help a programmer think in terms of music notation as limited to triple accidentals, we could replace this type with convenience functions natural, sharp, flat, doubleSharp, doubleFlat, tripleSharp, and tripleFlat which would return Offsets of the correct values. This, I think, would achieve the same effect, and would allow PitchClass to tuple conversion to be a reversible process.
Conversion to and from
PitchClass
tuple form would be simpler if theAccidental
type didn't exist, becauseOffset
s can't be converted toAccidental
s, only toMaybe Accidental
s or similar.Since
Accidental
exists mainly to help a programmer think in terms of music notation as limited to triple accidentals, we could replace this type with convenience functionsnatural
,sharp
,flat
,doubleSharp
,doubleFlat
,tripleSharp
, andtripleFlat
which would returnOffset
s of the correct values. This, I think, would achieve the same effect, and would allowPitchClass
to tuple conversion to be a reversible process.