\begin{code}
module Music.Analysis.Abstract.Annotation where
import Music.Analysis.PF ((><), p1)
import Music.Analysis.Base (Text, Number)
import Music.Analysis.Abstract.Settings (Settings)
import Music.Analysis.Abstract.Motive
import Music.Analysis.Abstract.Melodic
import Music.Analysis.Abstract.Rhythm
import Music.Analysis.Abstract.Notations
import Music.Analysis.Abstract.Instruments as Instruments
import Data.Maybe (Maybe)
import Data.Function (id, (.))
import Data.Bool (Bool)
import Prelude ()
\end{code}
Development of Recursive and powerfull Annotation.
It still at alpha version.
\begin{code}
type A = Text
type Annot =
([((((MelodicNode, A),(RhythmNode, A)),Bool),
[((NotationPosition,NotationInfo),A)])],A)
type AnnotationNode = [(Maybe Number, Text)]
type MultiAnnotationNode = (MultiInstrumentNode, AnnotationNode)
type AnnotationAbsolute = (MultiInstrumentAbsolute, AnnotationNode)
type AnnotationRelative = (MultiInstrumentRelative, AnnotationNode)
settings :: Settings
settings = Instruments.settings
\end{code}
\begin{code}
transpose :: Number -> Motive AnnotationAbsolute -> Motive AnnotationAbsolute
transpose n =
joinMotivePair . ((Instruments.transpose n) >< id) . splitMotivePair
tempo :: Number -> Motive AnnotationAbsolute -> Motive AnnotationAbsolute
tempo n = joinMotivePair . ((Instruments.tempo n) >< id) . splitMotivePair
duration :: Motive MultiAnnotationNode -> [Number]
duration = Instruments.duration . p1 . splitMotivePair
reverse :: Motive MultiAnnotationNode -> Motive MultiAnnotationNode
reverse = joinMotivePair . (Instruments.reverse >< id) . splitMotivePair
absolute :: Motive AnnotationRelative -> Motive AnnotationAbsolute
absolute = joinMotivePair . (Instruments.absolute >< id) . splitMotivePair
relative :: Motive AnnotationAbsolute -> Motive AnnotationRelative
relative = joinMotivePair . (Instruments.relative >< id) . splitMotivePair
\end{code}