packages feed

music-score 1.6 → 1.6.1

raw patch · 10 files changed

+195/−152 lines, 10 filesdep −QuickCheckdep ~HCodecs

Dependencies removed: QuickCheck

Dependency ranges changed: HCodecs

Files

music-score.cabal view
@@ -1,15 +1,15 @@ -name:               music-score-version:            1.6-cabal-version:      >= 1.10-author:             Hans Hoglund-maintainer:         Hans Hoglund-license:            BSD3-license-file:       COPYING-synopsis:           Musical score and part representation.-category:           Music-tested-with:        GHC-build-type:         Custom+name:                   music-score+version:                1.6.1+author:                 Hans Hoglund+maintainer:             Hans Hoglund+license:                BSD3+license-file:           COPYING+synopsis:               Musical score and part representation.+category:               Music+tested-with:            GHC+build-type:             Custom+cabal-version:          >= 1.10  description:      Musical time struture, voices, tracks and scores.@@ -17,106 +17,83 @@     This library is part of the Music Suite, see <http://music-suite.github.io>.  source-repository head-  type:             git-  location:         git://github.com/music-suite/music-score.git+  type:             	git+  location:         	git://github.com/music-suite/music-score.git    library                    -    build-depends: -        base                    >= 4 && < 5,-        QuickCheck              >= 1.2 && < 1.3,--        lens                    >= 4.0 && < 4.1,-        -- time,-        -- random,-        process,-        data-default,           -        containers,       -        comonad,-        NumInstances,-        -        profunctors,-        transformers,-        monadplus,-        void,-        semigroups,-        monoid-extras,-        nats,          -        semigroupoids,-        musicxml2 == 1.6,-        lilypond == 1.6,-        HCodecs,-        vector-space,-        vector-space-points     == 0.1.3,-        music-pitch-literal     == 1.6,-        music-dynamics-literal  == 1.6,-        prettify,-        parsec-        -- reenact--    hs-source-dirs: src-    default-language: Haskell2010-    exposed-modules:-        Data.PairMonad-        Control.Monad.Compose-        -        Music.Time-        Music.Time.Delayable-        Music.Time.Stretchable-        Music.Time.Onset-        Music.Time.Juxtapose-        Music.Time.Reverse-        Music.Time.Time-        Music.Time.Span-        Music.Time.Reactive-        Music.Time.Behavior--        Music.Score.Rhythm-        -        Music.Score--        Music.Score.Note-        Music.Score.Track-        Music.Score.Voice-        Music.Score.Score--        Music.Score.Combinators-        Music.Score.Convert-        Music.Score.Ties-        Music.Score.Part-        Music.Score.Chord-        -        Music.Score.Meta-        Music.Score.Meta.Annotations-        Music.Score.Meta.Attribution-        Music.Score.Meta.Barline-        Music.Score.Meta.Clef-        Music.Score.Meta.Fermata-        Music.Score.Meta.Key-        Music.Score.Meta.RehearsalMark-        Music.Score.Meta.Tempo-        Music.Score.Meta.Time-        Music.Score.Meta.Title-        -        Music.Score.Clef-        Music.Score.Pitch-        Music.Score.Articulation-        Music.Score.Dynamics-        Music.Score.Ornaments--        Music.Score.Export.Abc-        Music.Score.Export.Lilypond-        Music.Score.Export.MusicXml-        Music.Score.Export.Midi-        Music.Score.Import.Abc-        Music.Score.Import.Lilypond-        Music.Score.Import.Midi--        -- Need to expose these to allow GHCI development-        Music.Score.Util-        Music.Score.Export.Common-    other-modules:-        Music.Score.Instances-        --- executable "music-score-tests"---     hs-source-dirs: src test---     main-is: Main.hs+    build-depends: 		base				>= 4 && < 5,+                        lens				>= 4.0 && < 4.1,+                        process,+                        data-default,           +                        containers,       +                        comonad,+                        NumInstances,+                        profunctors,+                        transformers,+                        monadplus,+                        void,+                        semigroups,+                        monoid-extras,+                        nats,          +                        semigroupoids,+                        musicxml2 == 1.6,+                        lilypond == 1.6,+                        HCodecs                 >= 0.3 && < 0.4,+                        vector-space,+                        vector-space-points     == 0.1.3,+                        music-pitch-literal     == 1.6,+                        music-dynamics-literal  == 1.6,+                        prettify,+                        parsec+    exposed-modules:	Data.PairMonad+                        Control.Monad.Compose+                        Music.Time+                        Music.Time.Delayable+                        Music.Time.Stretchable+                        Music.Time.Onset+                        Music.Time.Juxtapose+                        Music.Time.Reverse+                        Music.Time.Time+                        Music.Time.Span+                        Music.Time.Reactive+                        Music.Time.Behavior+                        Music.Score.Rhythm+                        Music.Score+                        Music.Score.Note+                        Music.Score.Track+                        Music.Score.Voice+                        Music.Score.Score+                        Music.Score.Combinators+                        Music.Score.Convert+                        Music.Score.Ties+                        Music.Score.Part+                        Music.Score.Chord+                        Music.Score.Meta+                        Music.Score.Meta.Annotations+                        Music.Score.Meta.Attribution+                        Music.Score.Meta.Barline+                        Music.Score.Meta.Clef+                        Music.Score.Meta.Fermata+                        Music.Score.Meta.Key+                        Music.Score.Meta.RehearsalMark+                        Music.Score.Meta.Tempo+                        Music.Score.Meta.Time+                        Music.Score.Meta.Title+                        Music.Score.Clef+                        Music.Score.Pitch+                        Music.Score.Articulation+                        Music.Score.Dynamics+                        Music.Score.Ornaments+                        Music.Score.Export.Abc+                        Music.Score.Export.Lilypond+                        Music.Score.Export.MusicXml+                        Music.Score.Export.Midi+                        Music.Score.Import.Abc+                        Music.Score.Import.Lilypond+                        Music.Score.Import.Midi+                        -- Need to expose these to allow GHCI development+                        Music.Score.Util+                        Music.Score.Export.Common+    other-modules:      Music.Score.Instances+    hs-source-dirs: 	src+    default-language: 	Haskell2010
src/Music/Score/Export/Lilypond.hs view
@@ -124,8 +124,8 @@ instance Integral a => HasLilypond (Ratio a)    where   getLilypond d = getLilypond d . toInteger . round  instance HasLilypond Integer where-    getLilypond      d = (^*realToFrac (d*4)) . Lilypond.note  . spellLilypond . (+ 12)-    getLilypondChord d = (^*realToFrac (d*4)) . Lilypond.chord . fmap (spellLilypond . (+ 12))+    getLilypond      d = (^*realToFrac (d*4)) . Lilypond.note  . spellLilypond+    getLilypondChord d = (^*realToFrac (d*4)) . Lilypond.chord . fmap spellLilypond  instance HasLilypond a => HasLilypond (ChordT a) where     getLilypond d = getLilypondChord d . getChordT@@ -269,6 +269,7 @@             Score  -> lyScorePrefix          lyInlinePrefix = mempty                                        +++            "%%% Generated by music-score %%%\n"                       ++             "\\include \"lilypond-book-preamble.ly\"\n"                ++             "\\paper {\n"                                              ++             "  #(define dump-extents #t)\n"                            ++@@ -433,5 +434,5 @@     fromIntegral alt,     fromIntegral oct     )-    where (pc,alt,oct) = spellPitch p+    where (pc,alt,oct) = spellPitch (p + 72) 
src/Music/Score/Export/Midi.hs view
@@ -133,8 +133,8 @@  instance HasMidi (Integer, Integer) where     getMidi (p,v) = mempty-        |> return (Midi.NoteOn 0 (fromIntegral p) (fromIntegral v))-        |> return (Midi.NoteOff 0 (fromIntegral p) (fromIntegral v))+        |> return (Midi.NoteOn 0 (fromIntegral $ p + 60) (fromIntegral v))+        |> return (Midi.NoteOff 0 (fromIntegral $ p + 60) (fromIntegral v))  instance HasMidi Midi.Message               where   getMidi = return instance HasMidi Int                        where   getMidi = getMidi . toInteger
src/Music/Score/Export/MusicXml.hs view
@@ -344,5 +344,5 @@     if alt == 0 then Nothing else Just (fromIntegral alt),     fromIntegral oct     )-    where (pc,alt,oct) = spellPitch p+    where (pc,alt,oct) = spellPitch (p + 60) 
src/Music/Score/Instances.hs view
@@ -43,6 +43,8 @@  import           Music.Dynamics.Literal import           Music.Pitch.Literal+import           Music.Pitch.Augmentable+import           Music.Pitch.Alterable import           Music.Score.Articulation import           Music.Score.Chord import           Music.Score.Combinators@@ -440,19 +442,89 @@   +-------------------------------------------------------------------------------------+-- Literal instances+------------------------------------------------------------------------------------- +instance Alterable a => Alterable (Score a) where+    sharpen = fmap sharpen+    flatten = fmap flatten +instance Alterable a => Alterable (ChordT a) where+    sharpen = fmap sharpen+    flatten = fmap flatten +instance Alterable a => Alterable (DynamicT a) where+    sharpen = fmap sharpen+    flatten = fmap flatten +instance Alterable a => Alterable (SlideT a) where+    sharpen = fmap sharpen+    flatten = fmap flatten +instance Alterable a => Alterable (TieT a) where+    sharpen = fmap sharpen+    flatten = fmap flatten +instance Alterable a => Alterable (HarmonicT a) where+    sharpen = fmap sharpen+    flatten = fmap flatten +instance Alterable a => Alterable (ArticulationT a) where+    sharpen = fmap sharpen+    flatten = fmap flatten +instance Alterable a => Alterable (TextT a) where+    sharpen = fmap sharpen+    flatten = fmap flatten +instance Alterable a => Alterable (TremoloT a) where+    sharpen = fmap sharpen+    flatten = fmap flatten +instance Alterable a => Alterable (PartT n a) where+    sharpen = fmap sharpen+    flatten = fmap flatten +instance Augmentable a => Augmentable (Score a) where+    augment = fmap augment+    diminish = fmap diminish +instance Augmentable a => Augmentable (ChordT a) where+    augment = fmap augment+    diminish = fmap diminish +instance Augmentable a => Augmentable (DynamicT a) where+    augment = fmap augment+    diminish = fmap diminish++instance Augmentable a => Augmentable (SlideT a) where+    augment = fmap augment+    diminish = fmap diminish++instance Augmentable a => Augmentable (TieT a) where+    augment = fmap augment+    diminish = fmap diminish++instance Augmentable a => Augmentable (HarmonicT a) where+    augment = fmap augment+    diminish = fmap diminish++instance Augmentable a => Augmentable (ArticulationT a) where+    augment = fmap augment+    diminish = fmap diminish++instance Augmentable a => Augmentable (TextT a) where+    augment = fmap augment+    diminish = fmap diminish++instance Augmentable a => Augmentable (TremoloT a) where+    augment = fmap augment+    diminish = fmap diminish++instance Augmentable a => Augmentable (PartT n a) where+    augment = fmap augment+    diminish = fmap diminish   
src/Music/Score/Score.hs view
@@ -37,7 +37,7 @@         -- mkScore,         -- getScore,         mapScore,-        reifyScore,+        -- reifyScore,          mapWithSpan,         filterWithSpan,@@ -64,7 +64,7 @@ import           Data.AffineSpace import           Data.AffineSpace.Point import           Data.VectorSpace-import           Test.QuickCheck        (Arbitrary (..), Gen (..))+-- import           Test.QuickCheck        (Arbitrary (..), Gen (..))  import           Data.Default import           Data.Foldable          (Foldable)
src/Music/Score/Track.hs view
@@ -50,7 +50,7 @@ import qualified Data.Traversable       as T import           Data.Typeable import           Data.VectorSpace       hiding (Sum)-import           Test.QuickCheck        (Arbitrary (..), Gen (..))+-- import           Test.QuickCheck        (Arbitrary (..), Gen (..))  import           Music.Dynamics.Literal import           Music.Pitch.Literal
src/Music/Time/Behavior.hs view
@@ -31,13 +31,13 @@  module Music.Time.Behavior (         Behavior,-        constant,-        behavior,-        varying,-        varyingIn,+        -- constant,+        -- behavior,+        -- varying,+        -- varyingIn,         -- time,-        switchB,-        trimBeforeB,+        -- switchB,+        -- trimBeforeB,   ) where  import           Prelude                hiding (trimAfter)@@ -148,13 +148,13 @@  time :: Behavior Time time = behavior id--trimBeforeB :: Monoid a => Time -> Behavior a -> Behavior a-trimBeforeB t = _Wrapping' Behavior %~ trimBefore t--switchB :: Time -> Behavior a -> Behavior a -> Behavior a-switchB t ((^. _Wrapped') -> x) ((^. _Wrapped') -> y) = (^. _Unwrapped') $ switch t x y----+-- +-- trimBeforeB :: Monoid a => Time -> Behavior a -> Behavior a+-- trimBeforeB t = _Wrapping' Behavior %~ trimBefore t+-- +-- switchB :: Time -> Behavior a -> Behavior a -> Behavior a+-- switchB t ((^. _Wrapped') -> x) ((^. _Wrapped') -> y) = (^. _Unwrapped') $ switch t x y+-- +-- +-- +--                  
src/Music/Time/Reactive.hs view
@@ -40,23 +40,24 @@          -- * Create, isos etc (TODO)         initial,-        final,-        Future,-        Past,         updates,-        resets,         occs,+        -- final,+        -- Future,+        -- Past,+        -- resets,          -- * Predicates         isConstant,         isVariable,          -- * Combinators-        step,+        -- step,+         switch,         trim,-        trimBefore,-        trimAfter,+        -- trimBefore,+        -- trimAfter,          -- * Semantics         -- renderR,
src/Music/Time/Span.hs view
@@ -135,14 +135,6 @@ _range x = let (t, d) = _delta x     in (t, t .+^ d) --- | Map over the span as onset and duration.-mapDelta :: (Time -> Duration -> (Time, Duration)) -> Span -> Span-mapDelta f = delta %~ uncurry f---- | Map over the span as a time pair.-mapRange :: (Time -> Time -> (Time, Time)) -> Span -> Span-mapRange f = range %~ uncurry f- -- | -- View a span as onset and offset. --