packages feed

temporal-music-notation-western 0.1.6 → 0.2

raw patch · 7 files changed

+160/−363 lines, 7 filesdep ~temporal-music-notationPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: temporal-music-notation

API changes (from Hackage documentation)

- Temporal.Music.Western: F :: Dynamics
- Temporal.Music.Western: FF :: Dynamics
- Temporal.Music.Western: FFF :: Dynamics
- Temporal.Music.Western: MF :: Dynamics
- Temporal.Music.Western: MP :: Dynamics
- Temporal.Music.Western: Note :: Volume nVol -> Pitch nPch -> Maybe a -> Note nVol nPch a
- Temporal.Music.Western: P :: Dynamics
- Temporal.Music.Western: PP :: Dynamics
- Temporal.Music.Western: PPP :: Dynamics
- Temporal.Music.Western: absDrum :: Seg nVol => Drum nVol a -> Amplitude
- Temporal.Music.Western: absNote :: (Seg nVol, Seg nPch) => Note nVol nPch a -> (Amplitude, Frequency)
- Temporal.Music.Western: bd :: Accent -> Score (DrumW a)
- Temporal.Music.Western: bn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: bnr :: Score a
- Temporal.Music.Western: data Drum n a :: * -> * -> *
- Temporal.Music.Western: data Dynamics
- Temporal.Music.Western: data Note nVol nPch a :: * -> * -> * -> *
- Temporal.Music.Western: dbd :: Accent -> Score (DrumW a)
- Temporal.Music.Western: dbn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: dbnr :: Score a
- Temporal.Music.Western: ded :: Accent -> Score (DrumW a)
- Temporal.Music.Western: den :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: denr :: Score a
- Temporal.Music.Western: dhd :: Accent -> Score (DrumW a)
- Temporal.Music.Western: dhn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: dhnr :: Score a
- Temporal.Music.Western: dqd :: Accent -> Score (DrumW a)
- Temporal.Music.Western: dqn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: dqnr :: Score a
- Temporal.Music.Western: dsd :: Accent -> Score (DrumW a)
- Temporal.Music.Western: dsn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: dsnr :: Score a
- Temporal.Music.Western: dtd :: Accent -> Score (DrumW a)
- Temporal.Music.Western: dtn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: dtnr :: Score a
- Temporal.Music.Western: dwd :: Accent -> Score (DrumW a)
- Temporal.Music.Western: dwn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: dwnr :: Score a
- Temporal.Music.Western: ed :: Accent -> Score (DrumW a)
- Temporal.Music.Western: en :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: enr :: Score a
- Temporal.Music.Western: f' :: LevelFunctor a => a -> a
- Temporal.Music.Western: ff' :: LevelFunctor a => a -> a
- Temporal.Music.Western: fff' :: LevelFunctor a => a -> a
- Temporal.Music.Western: hd :: Accent -> Score (DrumW a)
- Temporal.Music.Western: hn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: hnr :: Score a
- Temporal.Music.Western: instance Bounded Dynamics
- Temporal.Music.Western: instance Enum Dynamics
- Temporal.Music.Western: instance Eq Dynamics
- Temporal.Music.Western: instance Seg Dynamics
- Temporal.Music.Western: instance Show Dynamics
- Temporal.Music.Western: instance Vol Dynamics
- Temporal.Music.Western: mf' :: LevelFunctor a => a -> a
- Temporal.Music.Western: mp' :: LevelFunctor a => a -> a
- Temporal.Music.Western: noteParam :: Note nVol nPch a -> Maybe a
- Temporal.Music.Western: notePitch :: Note nVol nPch a -> Pitch nPch
- Temporal.Music.Western: noteVolume :: Note nVol nPch a -> Volume nVol
- Temporal.Music.Western: p' :: LevelFunctor a => a -> a
- Temporal.Music.Western: pp' :: LevelFunctor a => a -> a
- Temporal.Music.Western: ppp' :: LevelFunctor a => a -> a
- Temporal.Music.Western: qd :: Accent -> Score (DrumW a)
- Temporal.Music.Western: qn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: qnr :: Score a
- Temporal.Music.Western: sd :: Accent -> Score (DrumW a)
- Temporal.Music.Western: sn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: snr :: Score a
- Temporal.Music.Western: td :: Accent -> Score (DrumW a)
- Temporal.Music.Western: tn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: tnr :: Score a
- Temporal.Music.Western: type DrumW a = Drum Dynamics a
- Temporal.Music.Western: type NoteW p a = Note Dynamics p a
- Temporal.Music.Western: wd :: Accent -> Score (DrumW a)
- Temporal.Music.Western: wn :: Pch p => Tone p -> Score (NoteW p a)
- Temporal.Music.Western: wnr :: Score a
- Temporal.Music.Western.BohlenPierce: A :: StepBP
- Temporal.Music.Western.BohlenPierce: As :: StepBP
- Temporal.Music.Western.BohlenPierce: B :: StepBP
- Temporal.Music.Western.BohlenPierce: C :: StepBP
- Temporal.Music.Western.BohlenPierce: Cs :: StepBP
- Temporal.Music.Western.BohlenPierce: D :: StepBP
- Temporal.Music.Western.BohlenPierce: E :: StepBP
- Temporal.Music.Western.BohlenPierce: F :: StepBP
- Temporal.Music.Western.BohlenPierce: Fs :: StepBP
- Temporal.Music.Western.BohlenPierce: G :: StepBP
- Temporal.Music.Western.BohlenPierce: H :: StepBP
- Temporal.Music.Western.BohlenPierce: Hs :: StepBP
- Temporal.Music.Western.BohlenPierce: J :: StepBP
- Temporal.Music.Western.BohlenPierce: a :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: af :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: as :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: b :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: bf :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: bs :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: c :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: cf :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: cs :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: d :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: data StepBP
- Temporal.Music.Western.BohlenPierce: df :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: ds :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: e :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: ef :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: eqBP :: Int -> Frequency -> Scale
- Temporal.Music.Western.BohlenPierce: es :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: f :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: ff :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: fs :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: g :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: gf :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: gs :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: h :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: hf :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: hs :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: instance Bounded StepBP
- Temporal.Music.Western.BohlenPierce: instance Enum StepBP
- Temporal.Music.Western.BohlenPierce: instance Eq StepBP
- Temporal.Music.Western.BohlenPierce: instance Pch StepBP
- Temporal.Music.Western.BohlenPierce: instance Seg StepBP
- Temporal.Music.Western.BohlenPierce: instance Show StepBP
- Temporal.Music.Western.BohlenPierce: j :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: jf :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: js :: Tone StepBP
- Temporal.Music.Western.BohlenPierce: justBP :: Int -> Frequency -> Scale
- Temporal.Music.Western.TwelveTone: A :: Chromatic
- Temporal.Music.Western.TwelveTone: As :: Chromatic
- Temporal.Music.Western.TwelveTone: B :: Chromatic
- Temporal.Music.Western.TwelveTone: C :: Chromatic
- Temporal.Music.Western.TwelveTone: Cs :: Chromatic
- Temporal.Music.Western.TwelveTone: D :: Chromatic
- Temporal.Music.Western.TwelveTone: Ds :: Chromatic
- Temporal.Music.Western.TwelveTone: E :: Chromatic
- Temporal.Music.Western.TwelveTone: F :: Chromatic
- Temporal.Music.Western.TwelveTone: Fs :: Chromatic
- Temporal.Music.Western.TwelveTone: G :: Chromatic
- Temporal.Music.Western.TwelveTone: Gs :: Chromatic
- Temporal.Music.Western.TwelveTone: a :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: af :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: as :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: b :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: bf :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: bs :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: c :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: cf :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: cs :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: d :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: data Chromatic
- Temporal.Music.Western.TwelveTone: df :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: ds :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: e :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: ef :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: eqt :: Int -> Frequency -> Scale
- Temporal.Music.Western.TwelveTone: es :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: f :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: ff :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: fifth :: Step
- Temporal.Music.Western.TwelveTone: forth :: Step
- Temporal.Music.Western.TwelveTone: fs :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: g :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: gf :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: gs :: Tone Chromatic
- Temporal.Music.Western.TwelveTone: halfTone :: Step
- Temporal.Music.Western.TwelveTone: hind :: Int -> Frequency -> Scale
- Temporal.Music.Western.TwelveTone: hindFs :: Int -> Frequency -> Scale
- Temporal.Music.Western.TwelveTone: hindGb :: Int -> Frequency -> Scale
- Temporal.Music.Western.TwelveTone: instance Bounded Chromatic
- Temporal.Music.Western.TwelveTone: instance Enum Chromatic
- Temporal.Music.Western.TwelveTone: instance Eq Chromatic
- Temporal.Music.Western.TwelveTone: instance Pch Chromatic
- Temporal.Music.Western.TwelveTone: instance Seg Chromatic
- Temporal.Music.Western.TwelveTone: instance Show Chromatic
- Temporal.Music.Western.TwelveTone: majorSeventh :: Step
- Temporal.Music.Western.TwelveTone: majorSixth :: Step
- Temporal.Music.Western.TwelveTone: majorThird :: Step
- Temporal.Music.Western.TwelveTone: minorSeventh :: Step
- Temporal.Music.Western.TwelveTone: minorSixth :: Step
- Temporal.Music.Western.TwelveTone: minorThird :: Step
- Temporal.Music.Western.TwelveTone: pureFifth :: Fractional a => a
- Temporal.Music.Western.TwelveTone: pureForth :: Fractional a => a
- Temporal.Music.Western.TwelveTone: pureHalfTone :: Fractional a => a
- Temporal.Music.Western.TwelveTone: pureMajorSeventh :: Fractional a => a
- Temporal.Music.Western.TwelveTone: pureMajorSixth :: Fractional a => a
- Temporal.Music.Western.TwelveTone: pureMajorThird :: Fractional a => a
- Temporal.Music.Western.TwelveTone: pureMinorSeventh :: Fractional a => a
- Temporal.Music.Western.TwelveTone: pureMinorSixth :: Fractional a => a
- Temporal.Music.Western.TwelveTone: pureMinorThird :: Fractional a => a
- Temporal.Music.Western.TwelveTone: pureOctave :: Fractional a => a
- Temporal.Music.Western.TwelveTone: pureWholeTone :: Fractional a => a
- Temporal.Music.Western.TwelveTone: pyth :: Int -> Frequency -> Scale
- Temporal.Music.Western.TwelveTone: tritone :: Step
- Temporal.Music.Western.TwelveTone: wholeTone :: Step
+ Temporal.Music.Western: ppp', fff', ff', f', mf', mp', p', pp' :: VolumeLike a => Score a -> Score a
+ Temporal.Music.Western: pppiano, ffforte, fforte, forte, mforte, mpiano, piano, ppiano :: VolumeLike a => Score a -> Score a
+ Temporal.Music.Western.P12: c, bf, af, gf, ff, ef, df, cf, bs, as, gs, fs, es, ds, cs, b, a, g, f, e, d :: Score (Note a)
+ Temporal.Music.Western.P12: eqt :: Hz -> Scale
+ Temporal.Music.Western.P12: hind :: Hz -> Scale
+ Temporal.Music.Western.P12: hindFs :: Hz -> Scale
+ Temporal.Music.Western.P12: hindGb :: Hz -> Scale
+ Temporal.Music.Western.P12: pyth :: Hz -> Scale
+ Temporal.Music.Western.P12: tone :: Step -> Score (Note a)
+ Temporal.Music.Western.P13: c, bf, bs, b, af, as, a, jf, js, j, hf, hs, h, gf, gs, g, ff, fs, f, ef, es, e, df, ds, d, cf, cs :: Score (Note a)
+ Temporal.Music.Western.P13: eqBP :: Hz -> Scale
+ Temporal.Music.Western.P13: justBP :: Hz -> Scale
+ Temporal.Music.Western.P13: tone :: Step -> Score (Note a)
- Temporal.Music.Western: cresc :: LevelFunctor a => Accent -> Score a -> Score a
+ Temporal.Music.Western: cresc :: VolumeLike a => Accent -> Score a -> Score a
- Temporal.Music.Western: dim :: LevelFunctor a => Accent -> Score a -> Score a
+ Temporal.Music.Western: dim :: VolumeLike a => Accent -> Score a -> Score a

Files

LICENSE view
@@ -1,4 +1,4 @@-Copyright Anton Kholomiov 2011+Copyright Anton Kholomiov 2011-2012  All rights reserved. 
src/Temporal/Music/Western.hs view
@@ -1,101 +1,66 @@+{-# Language FlexibleContexts #-}+ -- | Names specific to western music tradition module Temporal.Music.Western(+    -- * Basic functions+    -- | All basic functions (composition, time stretching, +    -- dynamic changing of volume and pitch etc, etc) live in this module. +    module Temporal.Music,     -- * Volume-    -- ** Levels-    -- | Dynamics values form 8-level equally spaced grid. +    -- | Dynamics values form 9-level equally spaced grid.      -- They are from quietest     -- to loudest: piano pianissimo (ppp), pianissimo (pp), piano (p),     -- mezzo piano (mp), mezzo forte (mf), forte (f), fortissimo (ff),     -- forte fortissimo (fff).-    Dynamics(..),--    -- ** short-cuts+    --  These modifiers change level relative to the current level.+    -- It means that+    --+    -- > piano . forte = id+    pppiano, ppiano, piano, mpiano, mforte, forte, fforte, ffforte,+    -- ** Shortcuts to set dynamics level.     ppp', pp', p', mp', mf', f', ff', fff',      -- ** Envelops     dim, cresc,  -    -- ** Volume level constants-         -- * Score    -    -- ** Forms         rondo, reprise,      -    -- ** Tempo+    -- * Tempo     -- | Tempo terms specify not a rigid value but tempo range. So all     -- terms are functions from relative power of term (it's value     -- of type Double from 0 to 1) to some tempo value. Zero means-    -- lowest value from tempo range and one means highest value.+    -- the lowest value from tempo range and one means the highest value.+    -- To be used with 'bpm' function.     Tempo,  	lento, largo, larghetto, grave, adagio, adagietto,     andante, andantino, moderato, allegretto,-    allegro, vivace, presto, prestissimo,--    -- * Note-    NoteW, DrumW,-    Note(..), Drum,    -    absNote, absDrum,-    -    -- ** Rests    -    bnr, wnr, qnr, hnr, enr, snr, tnr, -    dbnr, dwnr, dqnr, dhnr, denr, dsnr, dtnr,-    -    -- ** Notes-    -    bn, wn, hn, qn, en, sn, tn, -    dbn, dwn, dhn, dqn, den, dsn, dtn,-    -    -- ** Drums-    bd, wd, hd, qd, ed, sd, td, -    dbd, dwd, dhd, dqd, ded, dsd, dtd+    allegro, vivace, presto, prestissimo  ) where -import Temporal.Music.Notation----import Temporal.Music.Notation.Note(Note(..), Drum,-    absNote, absDrum,-    bnr, wnr, qnr, hnr, enr, snr, tnr, -    dbnr, dwnr, dqnr, dhnr, denr, dsnr, dtnr) --import qualified Temporal.Music.Notation.Note as N---------------------------------------------- volume levels---- | Dynamics levels. Default defined volume --- defined in 'Vol' class is (1e-5, 1).-data Dynamics = PPP | PP | P | MP | MF | F | FF | FFF-    deriving (Show, Eq, Enum, Bounded)--instance Seg Dynamics+import Temporal.Music -instance Vol Dynamics where-    volume = Volume (1e-5, 1)+pppiano, ppiano, piano, mpiano, mforte, forte, fforte, ffforte :: +    (VolumeLike a) => Score a -> Score a --- short-cuts+pppiano = quieter 4;    ppiano  = quieter 3;    piano   = quieter 2+mpiano  = quieter 1;    mforte  = louder 1;     forte   = louder 2;+fforte  = louder 3;     ffforte = louder 4; -ppp', pp', p', mp', mf', f', ff', fff' :: LevelFunctor a => a -> a+ppp', pp', p', mp', mf', f', ff', fff' ::+    (VolumeLike a) => Score a -> Score a -ppp' = setLevel PPP-pp'  = setLevel PP -p'   = setLevel P-mp'  = setLevel MP-mf'  = setLevel MF-f'   = setLevel F-ff'  = setLevel FF-fff' = setLevel FFF+ppp'    = pppiano;  pp'     = ppiano;   p'      = piano;+mp'     = mpiano;   mf'     = mforte;   f'      = forte;+ff'     = fforte;   fff'    = ffforte;  -- | diminuendo-dim :: LevelFunctor a => Accent -> Score a -> Score a-dim v = dynamics ((-v) *)+dim :: VolumeLike a => Accent -> Score a -> Score a+dim = envelope . (*) . negate  -- | crescendo-cresc :: LevelFunctor a => Accent -> Score a -> Score a-cresc v = dynamics (v * )+cresc :: VolumeLike a => Accent -> Score a -> Score a+cresc = envelope . (*)  --------------------------------------- -- forms@@ -195,57 +160,5 @@ -- | extremely fast (200 - 230 bpm) prestissimo :: Double -> Tempo prestissimo = getTempo prestissimoRange---- Note---- | Western 'Note' (eight volume levels and twelve tones)-type NoteW p a = Note Dynamics p a---- | Western 'Drum' note (eight volume levels)-type DrumW a = Drum Dynamics a---- shortcuts---- notes-bn, wn, hn, qn, en, sn, tn, -    dbn, dwn, dhn, dqn, den, dsn, dtn :: -    Pch p => Tone p -> Score (NoteW p a)--bn = N.bn-wn = N.wn-hn = N.hn-qn = N.qn-en = N.en-sn = N.sn-tn = N.tn-dbn = N.dbn-dwn = N.dwn-dhn = N.dhn-dqn = N.dqn-den = N.den-dsn = N.dsn-dtn = N.dtn---- drums--bd, wd, hd, qd, ed, sd, td, -    dbd, dwd, dhd, dqd, ded, dsd, dtd :: -    Accent -> Score (DrumW a)--bd = N.bd-wd = N.wd-hd = N.hd-qd = N.qd-ed = N.ed-sd = N.sd-td = N.td-dbd = N.dbd-dwd = N.dwd-dhd = N.dhd-dqd = N.dqd-ded = N.ded-dsd = N.dsd-dtd = N.dtd-  
− src/Temporal/Music/Western/BohlenPierce.hs
@@ -1,64 +0,0 @@--- | Bohlen-Pierce tones-module Temporal.Music.Western.BohlenPierce(-        -- * Tones-        StepBP(..),--        c, cs, cf, d, ds, df, e, es, ef,-        f, fs, ff, g, gs, gf, h, hs, hf, -        j, js, jf, a, as, af, b, bs, bf,--        -- * Scales-        eqBP, justBP-)    -where--import Temporal.Music.Notation.Seg(Seg)-import Temporal.Music.Notation.Pitch-import Temporal.Music.Notation.Scales(eqBP, justBP)---- | Tones for Bohlen-Pierce 13-tone scale. --- Default scale defined in 'Pch' class is equal --- temperament Bohlen-Pierce scale-data StepBP = -      C  | Cs | D  | E  | F  | Fs | G -    | H  | Hs | J  | A  | As | B-    deriving (Enum, Bounded, Eq, Show)--instance Seg StepBP--instance Pch StepBP where-    pitch = Pitch (eqBP 0 c1)--c, cs, cf, d, ds, df, e, es, ef,-    f, fs, ff, g, gs, gf, h, hs, hf, -    j, js, jf, a, as, af, b, bs, bf :: Tone StepBP--c  = tone C  -cs = tone Cs -d  = tone D -e  = tone E-f  = tone F-fs = tone Fs-g  = tone G-h  = tone H-hs = tone Hs-j  = tone J-a  = tone A-as = tone As-b  = tone B--cf = b-ds = e-df = cs-es = f-ef = d-ff = e-gs = h-gf = fs-hf = g-js = a-jf = hs-af = j--bf = as-bs = c
+ src/Temporal/Music/Western/P12.hs view
@@ -0,0 +1,67 @@+-- | Western twelve-tone scale.+module Temporal.Music.Western.P12(+    module Temporal.Music.Western,+    tone,+    -- * Steps+    -- | Step defines a value of type score (hence @Track@), so we can +    -- transform them on the fly:+    --+    -- > qn $ line [forte c, d, e, low b, forte $ bn d]+    c, d, e, f, g, a, b, +    cs, ds, es, fs, gs, as, bs,+    cf, df, ef, ff, gf, af, bf,++    -- * Scales+    eqt, pyth, +    hind, hindFs, hindGb++    -- * Examples+    -- | Little example of usage:+    --+    -- > import Temporal.Music.Western.P12+    -- >+    -- > res :: Score ()+    -- > res = stretch 0.2 $ chord [+    -- >            qn $ line [c, c, bn g, e, dbn f],+    -- >            low $ line [c, c, d, low a]]+)+where++import Temporal.Music(Score, temp, note, Step)+import Temporal.Music.Scales(eqt, pyth, hind, hindFs, hindGb)++import Temporal.Music.Western++-- | Constructs 'Score' with one note. 'Scale' is set to equal+-- tempered scale (from 'c1').+tone :: Step -> Score (Note a)+tone = note ++c, d, e, f, g, a, b, +    cs, ds, es, fs, gs, as, bs,+    cf, df, ef, ff, gf, af, bf :: Score (Note a)++c    = tone 0+cs   = tone 1+d    = tone 2+ds   = tone 3+e    = tone 4+f    = tone 5+fs   = tone 6+g    = tone 7+gs   = tone 8+a    = tone 9+as   = tone 10+b    = tone 11++bs   = c+es   = f++cf   = b+df   = cs+ef   = ds+ff   = e+gf   = fs+af   = gs+bf   = as+
+ src/Temporal/Music/Western/P13.hs view
@@ -0,0 +1,56 @@+-- | Bohlen-Pierce tones+module Temporal.Music.Western.P13(+        module Temporal.Music.Western,+        tone,+        -- * Tones+        c, cs, cf, d, ds, df, e, es, ef,+        f, fs, ff, g, gs, gf, h, hs, hf, +        j, js, jf, a, as, af, b, bs, bf,++        -- * Scales+        eqBP, justBP+)    +where++import Temporal.Music(Score, temp, setScale, c1, note)+import Temporal.Music.Western+import Temporal.Music.Scales(eqBP, justBP)++c, cs, cf, d, ds, df, e, es, ef,+    f, fs, ff, g, gs, gf, h, hs, hf, +    j, js, jf, a, as, af, b, bs, bf :: Score (Note a)++-- | Constructs 'Score' with one note. 'Scale' is set to equal+-- tempered Bohlen-Pierce scale (from 'c1').+tone :: Step -> Score (Note a)+tone = setScale (eqBP c1) . note ++c  = tone 0+cs = tone 1 +d  = tone 2 +e  = tone 3+f  = tone 4+fs = tone 5+g  = tone 6+h  = tone 7+hs = tone 8+j  = tone 9+a  = tone 10+as = tone 11+b  = tone 12++cf = b+ds = e+df = cs+es = f+ef = d+ff = e+gs = h+gf = fs+hf = g+js = a+jf = hs+af = j++bf = as+bs = c 
− src/Temporal/Music/Western/TwelveTone.hs
@@ -1,175 +0,0 @@-module Temporal.Music.Western.TwelveTone(-    -- * 12-tones-    -- | Chromatic scales-          -    -- ** Tones-    Chromatic(..),-    c, d, e, f, g, a, b, -    cs, ds, es, fs, gs, as, bs,-    cf, df, ef, ff, gf, af, bf,--    -- ** Scales-    eqt, pyth, -    hind, hindFs, hindGb,-    -- * Intervals-    -    -- ** pure intervals as factors-    pureOctave, pureFifth, pureForth, pureMajorThird,-        pureMinorThird, pureWholeTone, pureHalfTone, pureMajorSixth,-        pureMinorSixth, pureMajorSeventh, pureMinorSeventh, --    -- ** in steps for 12 tone scale-    -    majorSeventh, minorSeventh, majorSixth, minorSixth,-        fifth, tritone, forth, majorThird, -        minorThird, wholeTone, halfTone --    )-where--import Temporal.Music.Notation.Seg(Seg)---import Temporal.Music.Notation.Seg(Seg, IntSeg(..), N5, N7)-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)---- | 12-tone scale. Default scale defined in 'Pch' class --- is equal temperament.-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)---- tones--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--{---- | 5-tone scale. Default scale defined in 'Pch' class --- is minor pentatonic on equal temerament.-newtype Pentatonic = Pentatonic { -    runPentatonic :: IntSeg N5 -    } deriving (Show, Eq, Bounded)--instance Enum Pentatonic where-    toEnum = Pentatonic . toEnum-    fromEnum = fromEnum . runPentatonic--instance Seg Pentatonic--instance Pch Pentatonic where-    pitch = Pitch (minor5 $ eqt 0 c1)-    --p0, p1, p2, p3, p4 :: Tone Pentatonic--p0 = pn 0-p1 = pn 1-p2 = pn 2-p3 = pn 3-p4 = pn 4--pn :: Int -> Tone Pentatonic-pn = tone . Pentatonic . IntSeg-- --- | 7-tone scale. Default scale defined in 'Pch' class--- is C major on equal temperament.-newtype Diatonic = Diatonic { -    runDiatonic :: IntSeg N7 -    } deriving (Show, Eq, Bounded)--instance Enum Diatonic where-    toEnum = Diatonic . toEnum-    fromEnum = fromEnum . runDiatonic--instance Seg Diatonic--instance Pch Diatonic where-    pitch = Pitch (major $ eqt 0 c1)--d0, d1, d2, d3, d4, d5, d6 :: Tone Diatonic--d0 = dn 0-d1 = dn 1-d2 = dn 2-d3 = dn 3-d4 = dn 4-d5 = dn 5-d6 = dn 6--dn :: Int -> Tone Diatonic-dn = tone . Diatonic . IntSeg--}------------------------------------------------------------- intervals--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-
temporal-music-notation-western.cabal view
@@ -1,5 +1,5 @@ Name:          temporal-music-notation-western-Version:       0.1.6+Version:       0.2 Cabal-Version: >= 1.2 License:       BSD3 License-file:  LICENSE@@ -17,9 +17,9 @@ Library   Build-Depends:         base >= 4, base < 5,-        temporal-music-notation >= 0.1.6+        temporal-music-notation >= 0.2   Hs-Source-Dirs:      src/   Exposed-Modules:         Temporal.Music.Western-        Temporal.Music.Western.TwelveTone-        Temporal.Music.Western.BohlenPierce+        Temporal.Music.Western.P12+        Temporal.Music.Western.P13