module Temporal.Music.Western.TwelveTone(
Chromatic(..),
c, d, e, f, g, a, b,
cs, ds, es, fs, gs, as, bs,
cf, df, ef, ff, gf, af, bf,
eqt, pyth,
hind, hindFs, hindGb,
minor5, major5, bluesMinor5, bluesMajor5, egyptian5,
pureOctave, pureFifth, pureForth, pureMajorThird,
pureMinorThird, pureWholeTone, pureHalfTone, pureMajorSixth,
pureMinorSixth, pureMajorSeventh, pureMinorSeventh,
majorSeventh, minorSeventh, majorSixth, minorSixth,
fifth, tritone, forth, majorThird,
minorThird, wholeTone, halfTone
)
where
import Temporal.Music.Notation.Seg(Seg)
import Temporal.Music.Notation.Pitch
import Temporal.Music.Notation.Scales(
eqt, pyth, hind, hindFs, hindGb,
minor5, major5, bluesMinor5, bluesMajor5, egyptian5,
major, minor, ionian, dorian, phrygian, lydian,
mixolydian, aeolian, locrian)
data Chromatic =
C | Cs | D | Ds | E | F
| Fs | G | Gs | A | As | B
deriving (Enum, Bounded, Eq, Show)
instance Seg Chromatic
instance Pch Chromatic where
pitch = Pitch (eqt 0 c1)
c, d, e, f, g, a, b,
cs, ds, es, fs, gs, as, bs,
cf, df, ef, ff, gf, af, bf :: Tone Chromatic
c = tone C
cs = tone Cs
d = tone D
ds = tone Ds
e = tone E
f = tone F
fs = tone Fs
g = tone G
gs = tone Gs
a = tone A
as = tone As
b = tone B
bs = c
es = f
cf = b
df = cs
ef = ds
ff = e
gf = fs
af = gs
bf = as
pureOctave, pureFifth, pureForth, pureMajorThird,
pureMinorThird, pureWholeTone, pureHalfTone, pureMajorSixth,
pureMinorSixth, pureMajorSeventh, pureMinorSeventh :: Fractional a => a
pureOctave = 2
pureFifth = 3/2
pureForth = 4/3
pureMajorThird = 5/4
pureMinorThird = 6/5
pureWholeTone = 9/8
pureHalfTone = 25/24
pureMajorSixth = 5/3
pureMinorSixth = 8/5
pureMajorSeventh = 48/25
pureMinorSeventh = 16/9
majorSeventh, minorSeventh, majorSixth, minorSixth,
fifth, tritone, forth, majorThird,
minorThird, wholeTone, halfTone :: Step
majorSeventh = 11
minorSeventh = 10
majorSixth = 9
minorSixth = 8
fifth = 7
tritone = 6
forth = 5
majorThird = 4
minorThird = 3
wholeTone = 2
halfTone = 1