hts-0.14: Haskell Music Typesetting

Safe HaskellSafe-Inferred

Music.Typesetting.Literal

Contents

Synopsis

Functions for writing music by hand.

annotate_first :: (a -> x -> x) -> a -> [x] -> [x]Source

Apply function to first element of list.

 annotate_first (+) 9 [1,2,3] == [10,2,3]

annotate_except_last :: (a -> x -> x) -> a -> [x] -> [x]Source

Apply function to all but the last element of list.

 annotate_except_last (+) 7 [1,2,3] == [8,9,3]

annotate_middle :: (a -> x -> x) -> a -> [x] -> [x]Source

Apply function to middle elements of list.

 annotate_middle (+) 9 [1,2,3,4] == [1,11,12,4]
 annotate_middle (+) 9 [1,4] == [1,4]

annotate_last :: (a -> x -> x) -> a -> [x] -> [x]Source

Apply function to last element of list.

 annotate_last (+) 7 [1,2,3] == [1,2,10]

annotate_bracket :: (a -> x -> x) -> (a, a) -> [x] -> [x]Source

Apply function to first and last elements of list.

 annotate_bracket (+) (9,7) [1,2,3] == [10,2,10]

n_annotate_tie_endpoints :: ([N_Annotation], [N_Annotation]) -> Note -> NoteSource

Apply annotations to the start and end points of each tied note.

(&.) :: Measure -> M_Annotation -> MeasureSource

Infix variant of m_annotate with reverse argument order.

Parts, groups etc.

voices :: [[Measure]] -> [Measure]Source

Merge parallel voices

Interop

from_d_annotation :: D_Annotation -> N_AnnotationSource

Translate from D_Annotation to N_Annotation. Note: does not necessarily translate Begin_Tuplet correctly.