Euterpea / Euterpea2

Euterpea version 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Euterpea.Music.Mode should have more modes

nskins opened this issue · comments

It would be nice to have access to these modes as well: Dorian, Phrygian, Lydian, Mixolydian, and Locrian.

This is something that was actually requested many times right after the Mode datatype was initially introduced, but it was apparently forgotten about and never updated (this was from long before I was the primary maintainer). Since I know there was originally intent to expand this data structure and I don't think it will pose a significant risk of breaking code that only relies on the two modes provided that they remain where they are in constructor order, this is a rare instance of a feature addition that shouldn't cause problems. My inclination is to actually be a bit more general:

data Mode = Major | Minor | -- most commonly used terms
Ionian | Dorian | Phrygian | Lydian | Mixolydian | Aeolian | Locrian |
CustomMode String
deriving (Show, Eq, Ord)

CustomMode would serve to accommodate other situations like harmonic minor and modes for which the names are less standardized. This is also in line with some of the other changes that took place from Euterpea 1.x to 2.x.

I've rolled this in with some other changes I pushed today.