mezzo-0.1.0.0: Typesafe music composition

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

Mezzo.Compose.Types

Contents

Description

Types used by the composition library.

Synopsis

Duration type synonyms

type Whole = 32 Source #

Whole note duration.

type Half = 16 Source #

Half note duration.

type Quarter = 8 Source #

Quarter note duration.

type Eighth = 4 Source #

Eighth note duration.

type Sixteenth = 2 Source #

Sixteenth note duration.

type ThirtySecond = 1 Source #

Thirty-second note duration.

Melody

data Melody :: forall l. Partiture 1 l -> Nat -> Type where Source #

Single-voice melody: gives an easy way to input notes and rests of different lengths.

Constructors

Melody :: Melody (End :-- None) Quarter

Start a new melody. If the first note duration is not specified ('(:|)' is used), the default duration is a quarter.

(:|) :: (MelConstraints ms (FromRoot r d), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r d) d infixl 5

Add a note with the same duration as the previous one.

(:<<<) :: (MelConstraints ms (FromRoot r ThirtySecond), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r ThirtySecond) ThirtySecond infixl 5

Add a thirty-second note.

(:<<) :: (MelConstraints ms (FromRoot r Sixteenth), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r Sixteenth) Sixteenth infixl 5

Add a sixteenth note.

(:<) :: (MelConstraints ms (FromRoot r Eighth), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r Eighth) Eighth infixl 5

Add an eighth note.

(:^) :: (MelConstraints ms (FromRoot r Quarter), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r Quarter) Quarter infixl 5

Add a quarter note.

(:>) :: (MelConstraints ms (FromRoot r Half), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r Half) Half infixl 5

Add a half note.

(:>>) :: (MelConstraints ms (FromRoot r Whole), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r Whole) Whole infixl 5

Add a whole note.

(:<<.) :: (MelConstraints ms (FromRoot r (Dot Sixteenth)), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r (Dot Sixteenth)) (Dot Sixteenth) infixl 5

Add a dotted sixteenth note.

(:<.) :: (MelConstraints ms (FromRoot r (Dot Eighth)), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r (Dot Eighth)) (Dot Eighth) infixl 5

Add a dotted eighth note.

(:^.) :: (MelConstraints ms (FromRoot r (Dot Quarter)), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r (Dot Quarter)) (Dot Quarter) infixl 5

Add a dotted quarter note.

(:>.) :: (MelConstraints ms (FromRoot r (Dot Half)), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r (Dot Half)) (Dot Half) infixl 5

Add a dotted half note.

(:>>.) :: (MelConstraints ms (FromRoot r (Dot Whole)), IntRep r, Primitive d) => Melody ms d -> RootS r -> Melody (ms +|+ FromRoot r (Dot Whole)) (Dot Whole) infixl 5

Add a dotted whole note.

(:~|) :: (MelConstraints ms (FromSilence d), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence d) d infixl 5

Add a rest with the same duration as the previous one.

(:~<<<) :: (MelConstraints ms (FromSilence ThirtySecond), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence ThirtySecond) ThirtySecond infixl 5

Add a thirty-second rest.

(:~<<) :: (MelConstraints ms (FromSilence Sixteenth), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence Sixteenth) Sixteenth infixl 5

Add a sixteenth rest.

(:~<) :: (MelConstraints ms (FromSilence Eighth), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence Eighth) Eighth infixl 5

Add an eighth rest.

(:~^) :: (MelConstraints ms (FromSilence Quarter), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence Quarter) Quarter infixl 5

Add a quarter rest.

(:~>) :: (MelConstraints ms (FromSilence Half), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence Half) Half infixl 5

Add a half rest.

(:~>>) :: (MelConstraints ms (FromSilence Whole), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence Whole) Whole infixl 5

Add a whole rest.

(:~<<.) :: (MelConstraints ms (FromSilence (Dot Sixteenth)), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence (Dot Sixteenth)) (Dot Sixteenth) infixl 5

Add a dotted sixteenth rest.

(:~<.) :: (MelConstraints ms (FromSilence (Dot Eighth)), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence (Dot Eighth)) (Dot Eighth) infixl 5

Add a dotted eighth rest.

(:~^.) :: (MelConstraints ms (FromSilence (Dot Quarter)), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence (Dot Quarter)) (Dot Quarter) infixl 5

Add a dotted quarter rest.

(:~>.) :: (MelConstraints ms (FromSilence (Dot Half)), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence (Dot Half)) (Dot Half) infixl 5

Add a dotted half rest.

(:~>>.) :: (MelConstraints ms (FromSilence (Dot Whole)), Primitive d) => Melody ms d -> RestS -> Melody (ms +|+ FromSilence (Dot Whole)) (Dot Whole) infixl 5

Add a dotted whole rest.