Portability | non-portable (TF,GNTD) |
---|---|
Stability | experimental |
Maintainer | hans@hanshoglund.se |
Safe Haskell | None |
- data Title
- denoteTitle :: Title -> Title
- getTitle :: Title -> [String]
- getTitleAt :: Title -> Int -> Maybe String
- title :: (HasMeta a, HasPart' a, HasOnset a, HasOffset a) => Title -> a -> a
- titleDuring :: (HasMeta a, HasPart' a) => Span -> Title -> a -> a
- subtitle :: (HasMeta a, HasPart' a, HasOnset a, HasOffset a) => Title -> a -> a
- subtitleDuring :: (HasMeta a, HasPart' a) => Span -> Title -> a -> a
- subsubtitle :: (HasMeta a, HasPart' a, HasOnset a, HasOffset a) => Title -> a -> a
- subsubtitleDuring :: (HasMeta a, HasPart' a) => Span -> Title -> a -> a
- withTitle :: (Title -> Score a -> Score a) -> Score a -> Score a
Title type
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.