mezzo-0.3.1.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 s (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 s (m :: Partiture n l) -> Int Source #

Get the numeric duration of a piece of music.

voices :: Music s m -> Int Source #

Get the number of voices in a piece of music.

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

Rest for the duration of the given music piece.

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

Add an empty voice to the piece of music.

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

Add two empty voices to the piece of music.

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

Add three empty voices to the piece of music.

pad4 :: (ValidHarm s m (FromSilence b), ValidHarm s (m +-+ FromSilence b) (FromSilence b), ValidHarm s ((m +-+ FromSilence b) +-+ FromSilence b) (FromSilence b), ValidHarm s (((m +-+ FromSilence b) +-+ FromSilence b) +-+ FromSilence b) (FromSilence b), Primitive b, ValidRest s b) => Music s (m :: Partiture (a - 4) b) -> Music s ((((m +-+ FromSilence b) +-+ FromSilence b) +-+ FromSilence b) +-+ FromSilence b :: Partiture a b) Source #

Add four empty voices to the piece of music.

Melody composition

start :: Primitive d => Melody s m d -> Music s m Source #

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

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

Alias for the start of the melody.

Textures

hom :: ValidHom s m a => Music s m -> Music s a -> Music s (m +-+ a) Source #

melAccomp :: (s ~ (Sig :: Signature t k r), ValidProg r t p, pm ~ FromProg p t, ValidHom s m pm, Primitive d) => Melody s m d -> InKey k (PhraseList p) -> Music s (m +-+ pm) Source #

Triplets

_triplet :: ValidTripl s d r1 r2 r3 => Dur d -> Root r1 -> Root r2 -> Root r3 -> Music s (FromTriplet d r1 r2 r3) Source #

Create a new triplet with three notes, with 2/3 of the specified duration each.

tripletW :: ValidTripl s Half r1 r2 r3 => RootS r1 -> RootS r2 -> RootS r3 -> Music s (FromTriplet Half r1 r2 r3) Source #

Create a new triplet lasting a whole note.

tripletH :: ValidTripl s Quarter r1 r2 r3 => RootS r1 -> RootS r2 -> RootS r3 -> Music s (FromTriplet Quarter r1 r2 r3) Source #

Create a new triplet lasting a half note.

tripletQ :: ValidTripl s Eighth r1 r2 r3 => RootS r1 -> RootS r2 -> RootS r3 -> Music s (FromTriplet Eighth r1 r2 r3) Source #

Create a new triplet lasting a quarter note.

tripletE :: ValidTripl s Sixteenth r1 r2 r3 => RootS r1 -> RootS r2 -> RootS r3 -> Music s (FromTriplet Sixteenth r1 r2 r3) Source #

Create a new triplet lasting an eighth note.

tripletS :: ValidTripl s ThirtySecond r1 r2 r3 => RootS r1 -> RootS r2 -> RootS r3 -> Music s (FromTriplet ThirtySecond r1 r2 r3) Source #

Create a new triplet lasting a sixteenth note.