music-score-1.6: Musical score and part representation.

Portabilitynon-portable (TF,GNTD)
Stabilityexperimental
Maintainerhans@hanshoglund.se
Safe HaskellNone

Music.Score.Score

Contents

Description

Provides the Score type.

Synopsis

Score type

notes :: Iso (Score a) (Score b) [Note a] [Note b]Source

TODO not a real iso, must be lens (meta)

events :: Iso (Score a) (Score b) [(Time, Duration, a)] [(Time, Duration, b)]Source

TODO not a real iso, must be lens (meta)

mapScore :: (Note a -> b) -> Score a -> Score bSource

Map with the associated time span.

reifyScore :: Score a -> Score (Note a)Source

Group each occurence with its associated time span.

Note: This may or may not be what you expect. Each note is not repositioned to start at sunit, so this holds

 fmap extract . reifyScore = id

while

 join . fmap (noteToScore) . reifyScore /= id

mapWithSpan :: (Span -> a -> b) -> Score a -> Score bSource

Map over the events in a score.

filterWithSpan :: (Span -> a -> Bool) -> Score a -> Score aSource

Filter the events in a score.

mapFilterWithSpan :: (Span -> a -> Maybe b) -> Score a -> Score bSource

Efficient combination of mapEvents and filterEvents.

mapEvents :: (Time -> Duration -> a -> b) -> Score a -> Score bSource

Map over the events in a score.

filterEvents :: (Time -> Duration -> a -> Bool) -> Score a -> Score aSource

Filter the events in a score.

mapFilterEvents :: (Time -> Duration -> a -> Maybe b) -> Score a -> Score bSource

Efficient combination of mapEvents and filterEvents.