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

Copyright(c) Hans Hoglund 2012-2014
Portabilitynon-portable (TF,GNTD)
Safe HaskellNone






data Aligned v Source

Aligned places a vector-like object in space, by fixing a local duration interpolating the vector to a specific point in time. The aligned value must be an instance of HasDuration, with view duration providing the size of the vector.

This is analogous to alignment in a graphical program. To align something at onset, midpoint or offset, use 0, 0.5 or 1 as the local duration value.

aligned :: Time -> LocalDuration -> v -> Aligned v Source

Align the given value so that its local duration occurs at the given time.

renderAligned :: HasDuration a => (Span -> a -> b) -> Aligned a -> b Source

renderAlignedVoice :: Aligned (Voice a) -> Score a Source

Convert an aligned voice to a score.

renderAlignedNote :: Aligned (Note a) -> Event a Source

Convert an aligned note to an event.

renderAlignedDuration :: Aligned Duration -> Span Source

Convert an aligned duration to a span.