mezzo-0.2.0.0: Typesafe music composition

Copyright(c) Dima Szamozvancev
LicenseMIT
Maintainerds709@cam.ac.uk
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Mezzo.Compose.Combine

Contents

Description

Properties and combinators for Music values.

Synopsis

Music properties and padding

musicDur :: Primitive l => Music (m :: Partiture n l) -> Dur l Source #

Get the duration of a piece of music.

durToInt :: Primitive d => Dur d -> Int Source #

Convert a duration to an integer.

duration :: Primitive l => Music (m :: Partiture n l) -> Int Source #

Get the numeric duration of a piece of music.

voices :: Music m -> Int Source #

Get the number of voices in a piece of music.

restWhile :: Primitive l => Music (m :: Partiture n l) -> Music (FromSilence l) Source #

Rest for the duration of the given music piece.

pad :: (HarmConstraints m (FromSilence b), Primitive b) => Music (m :: Partiture (a - 1) b) -> Music (m +-+ FromSilence b :: Partiture a b) Source #

Add an empty voice to the piece of music.

pad2 :: (HarmConstraints m (FromSilence b), HarmConstraints (m +-+ FromSilence b) (FromSilence b), Primitive b) => Music (m :: Partiture (a - 2) b) -> Music ((m +-+ FromSilence b) +-+ FromSilence b :: Partiture a b) Source #

Add two empty voices to the piece of music.

pad3 :: (HarmConstraints m (FromSilence b), HarmConstraints (m +-+ FromSilence b) (FromSilence b), HarmConstraints ((m +-+ FromSilence b) +-+ FromSilence b) (FromSilence b), Primitive b) => Music (m :: Partiture (a - 3) b) -> Music (((m +-+ FromSilence b) +-+ FromSilence b) +-+ FromSilence b :: Partiture a b) Source #

Add three empty voices to the piece of music.

Melody composition

play :: Primitive d => Melody m d -> Music m Source #

Convert a melody (a sequence of notes and rests) to Music.

melody :: Melody (End :-- None) Quarter Source #

Alias for the start of the melody.