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

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

Music.Score.Meta.Title

Contents

Description

 

Synopsis

Title type

data Title Source

A title is a sequence of String values, representing the name of a work or part of a work. An arbitrary depth of title sections can be used.

Title is an instance of IsString and can be used with the OverloadedStrings extension as follows:

 title  "Le Nozze di Figaro"

 subtitle "Atto primo"
 subsubtitle "Scena I"
 subsubtitle "Scena II"
 ...

 subtitle "Atto secundo"
 ...

Creating and modifying

denoteTitle :: Title -> TitleSource

Denote a title to a lower level, i.e title becomes subtitle, subtitle becomes subsubtitle etc.

getTitle :: Title -> [String]Source

Extract the title as a descending list of title levels (i.e. title, subtitle, subsubtitle...).

getTitleAt :: Title -> Int -> Maybe StringSource

Extract the title of the given level. Semantic function.

Adding titles to scores

title :: (HasMeta a, HasPart' a, HasOnset a, HasOffset a) => Title -> a -> aSource

Set title of the given score.

titleDuring :: (HasMeta a, HasPart' a) => Span -> Title -> a -> aSource

Set title of the given part of a score.

subtitle :: (HasMeta a, HasPart' a, HasOnset a, HasOffset a) => Title -> a -> aSource

Set subtitle of the given score.

subtitleDuring :: (HasMeta a, HasPart' a) => Span -> Title -> a -> aSource

Set subtitle of the given part of a score.

subsubtitle :: (HasMeta a, HasPart' a, HasOnset a, HasOffset a) => Title -> a -> aSource

Set subsubtitle of the given score.

subsubtitleDuring :: (HasMeta a, HasPart' a) => Span -> Title -> a -> aSource

Set subsubtitle of the given part of a score.

Extracting titles

withTitle :: (Title -> Score a -> Score a) -> Score a -> Score aSource

Extract the title in from the given score.