music-suite / music-pitch

This repo has been merged into: https://github.com/music-suite/music-suite
http://music-suite.github.io
BSD 3-Clause "New" or "Revised" License
9 stars 9 forks source link

Better name for spellings #13

Closed hanshoglund closed 10 years ago

hanshoglund commented 10 years ago
>>> let usingSharps = sharps
>>> let usingFlats = flats
>>> let spelled = spelledWith
>>> let modally = modal

>>> (2*tone+1*semitone) `spelled` usingSharps
_P4
>>> (2*tone+1*semitone) `spelled` usingFlats
_P4
>>> 
>>> spell usingSharps tritone
_A4

>>> fmap (spell modally) [0..12::Semitones]
[_P1,_A1,_M2,m3,_M3,_P4,_A4,_P5,_A5,_M6,m7,_M7,_P8]

>>> [0..12::Semitones] <&> (`spelled` modally)
[_P1,_A1,_M2,m3,_M3,_P4,_A4,_P5,_A5,_M6,m7,_M7,_P8]

>>> fmap (relative c (spell modally)) [c,fs,ab,eb::Pitch]
[c,fs,gs,eb]

>>> fmap (relative eb (spell modally)) [c,fs,ab,eb::Pitch]
[c,gb,ab,eb]