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

Copyright(c) Hans Hoglund 2012-2014
LicenseBSD-style
Maintainerhans@hanshoglund.se
Stabilityexperimental
Portabilitynon-portable (TF,GNTD)
Safe HaskellNone
LanguageHaskell2010

Music.Score.Meta.Title

Contents

Description

Provides various forms of title, subtitle etc. and related meta-data.

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 -> Title Source

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 String Source

Extract the title of the given level. Semantic function.

Adding titles to scores

title :: (HasMeta a, HasPosition a) => Title -> a -> a Source

Set title of the given score.

titleDuring :: HasMeta a => Span -> Title -> a -> a Source

Set title of the given part of a score.

subtitle :: (HasMeta a, HasPosition a) => Title -> a -> a Source

Set subtitle of the given score.

subtitleDuring :: HasMeta a => Span -> Title -> a -> a Source

Set subtitle of the given part of a score.

subsubtitle :: (HasMeta a, HasPosition a) => Title -> a -> a Source

Set subsubtitle of the given score.

subsubtitleDuring :: HasMeta a => Span -> Title -> a -> a Source

Set subsubtitle of the given part of a score.

Extracting titles

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

Extract the title in from the given score.