packages feed

temporal-music-notation 0.1.4 → 0.1.6

raw patch · 3 files changed

+18/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Temporal.Music.Notation.Score: eventMap :: (Event Dur a -> Event Dur b) -> Score a -> Score b

Files

src/Temporal/Music/Notation/Pitch.hs view
@@ -348,7 +348,7 @@  -- | gives scale multiplier scaleStep :: Scale -> Int -> Interval-scaleStep s x = (scaleOctave s ^ o) * scaleSteps s V.! n    +scaleStep s x = (scaleOctave s ^^ o) * scaleSteps s V.! n         where (o, n) = divMod (x - c0) $ scaleSize s           c0     = fst $ scaleBase s           
src/Temporal/Music/Notation/Score.hs view
@@ -23,7 +23,7 @@     pedal, pedalBy,     sustain, sustainBy,     -- ** Mappings-    tmap, dmap, tdmap, +    tmap, dmap, tdmap, eventMap,     -- * Rendering     Event(..),     EventList(..),    @@ -199,6 +199,21 @@ tdmap :: (Time -> Dur -> a -> b) -> Score a -> Score b tdmap = M.tdmap ++-- | General mapping. In the end all values of type 'Score' +-- are to be converted to 'EventList' wich is list of 'Event' s +-- and function 'eventMap' allows mapping on 'Score' subvalues as if +-- they are events already.+--+-- Warning : It is possible to change start time position with +-- 'eventMap' but it can lead to unexpected outcome when used +-- with 'slice' function. 'slice' operates on structure of +-- type 'Score' (how value was built with 'sequent', 'parallel'+-- or 'stretch' and other functions), but 'eventMap' operates +-- on 'Score' subvalues as if they are converted to 'Event' s +-- and some shifted events can slip through 'slice' 's fingers.+eventMap :: (Event Dur a -> Event Dur b) -> Score a -> Score b+eventMap = M.eventMap  -- | relative 'tmap'  --
temporal-music-notation.cabal view
@@ -1,5 +1,5 @@ Name:          temporal-music-notation-Version:       0.1.4+Version:       0.1.6 Cabal-Version: >= 1.2 License-file:  LICENSE License:       BSD3