elm-music / music-theory

Principled library for working with intervals and pitch classes
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

Remove Accidental type #9

Closed duncanmalashock closed 6 years ago

duncanmalashock commented 6 years ago

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.