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

Invert diatonic/chromatic does not do what is expected #51

Closed hanshoglund closed 4 years ago

hanshoglund commented 9 years ago
-- Solve by just renaming:
--   invert => invertChromatic
--   (invertChromatic o . invertDiatonic o) => invertDiatonic o

>>> invertPitches c [c,d,eb,fs::Pitch]
[c,bb_,a_,gb_]
>>> 
>>> invertDiatonic c [c,d,eb,fs::Pitch]
[c,b_,ab_,gs_]
>>> (invertDiatonic c . invertChromatic c) [c,d,eb,fs::Pitch]
[c,b_,as_,gb_]