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

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

Music.Score.Ties

Contents

Description

Provides a representation for tied notes, and a way to split a single note into a pair of tied notes.

Synopsis

Tiable class

class Tiable a whereSource

Class of types that can be tied. Ties are added to a score by splitting a single note into two and annotating them with a begin tie and end tie mark respectively.

Minimal definition: toTied, or both beginTie and endTie.

Methods

beginTie :: a -> aSource

Modify a note to be the first note in a tied note pair.

endTie :: a -> aSource

Modify a note to be the second note in a tied note pair.

toTied :: a -> (a, a)Source

Split a single note into a pair of tied notes.

The first returned element should have the original onset and the second element should have the original offset. Formally

 (onset . fst . toTied) a = onset a
 (offset . snd . toTied) a = offset a

newtype TieT a Source

Constructors

TieT 

Fields

getTieT :: ((Any, Any), a)
 

Splitting tied notes in scores

splitTiesVoice :: Tiable a => Voice a -> Voice aSource

Split all notes that cross a barlines into a pair of tied notes.

splitTiesVoiceAt :: Tiable a => [Duration] -> Voice a -> [Voice a]Source

Split all voice into bars, using the given bar durations. Music that does not fit into the given durations is discarded.

Notes that cross a barlines are split into tied notes.