module Mezzo.Compose.Types
(
Whole
, Half
, Quarter
, Eighth
, Sixteenth
, ThirtySecond
, Melody (..)
)
where
import Mezzo.Model
import Mezzo.Model.Prim
import Mezzo.Compose.Builder
import Data.Kind
import GHC.TypeLits
infixl 5 :|
infixl 5 :<<<
infixl 5 :<<
infixl 5 :<
infixl 5 :^
infixl 5 :>
infixl 5 :>>
infixl 5 :<<.
infixl 5 :<.
infixl 5 :^.
infixl 5 :>.
infixl 5 :>>.
infixl 5 :~|
infixl 5 :~<<<
infixl 5 :~<<
infixl 5 :~<
infixl 5 :~^
infixl 5 :~>
infixl 5 :~>>
infixl 5 :~<<.
infixl 5 :~<.
infixl 5 :~^.
infixl 5 :~>.
infixl 5 :~>>.
type Whole = 32
type Half = 16
type Quarter = 8
type Eighth = 4
type Sixteenth = 2
type ThirtySecond = 1
data Melody :: forall l t k r. Signature t k r -> Partiture 1 l -> Nat -> Type where
Melody :: Melody s (End :-- None) Quarter
(:|) :: (ValidMel s ms (FromRoot r d), IntRep r, Primitive d, ValidNote s r d)
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r d) d
(:<<<) :: (ValidMel s ms (FromRoot r ThirtySecond), IntRep r, Primitive d, ValidNote s r ThirtySecond)
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r ThirtySecond) ThirtySecond
(:<<) :: (ValidMel s ms (FromRoot r Sixteenth), IntRep r, Primitive d, ValidNote s r Sixteenth)
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r Sixteenth) Sixteenth
(:<) :: (ValidMel s ms (FromRoot r Eighth), IntRep r, Primitive d, ValidNote s r Eighth)
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r Eighth) Eighth
(:^) :: (ValidMel s ms (FromRoot r Quarter), IntRep r, Primitive d, ValidNote s r Quarter)
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r Quarter) Quarter
(:>) :: (ValidMel s ms (FromRoot r Half), IntRep r, Primitive d, ValidNote s r Half)
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r Half) Half
(:>>) :: (ValidMel s ms (FromRoot r Whole), IntRep r, Primitive d, ValidNote s r Whole)
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r Whole) Whole
(:<<.) :: (ValidMel s ms (FromRoot r (Dot Sixteenth)), IntRep r, Primitive d, ValidNote s r (Dot Sixteenth))
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r (Dot Sixteenth)) (Dot Sixteenth)
(:<.) :: (ValidMel s ms (FromRoot r (Dot Eighth)), IntRep r, Primitive d, ValidNote s r (Dot Eighth))
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r (Dot Eighth)) (Dot Eighth)
(:^.) :: (ValidMel s ms (FromRoot r (Dot Quarter)), IntRep r, Primitive d, ValidNote s r (Dot Quarter))
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r (Dot Quarter)) (Dot Quarter)
(:>.) :: (ValidMel s ms (FromRoot r (Dot Half)), IntRep r, Primitive d, ValidNote s r (Dot Half))
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r (Dot Half)) (Dot Half)
(:>>.) :: (ValidMel s ms (FromRoot r (Dot Whole)), IntRep r, Primitive d, ValidNote s r (Dot Whole))
=> Melody s ms d -> RootS r -> Melody s (ms +|+ FromRoot r (Dot Whole)) (Dot Whole)
(:~|) :: (ValidMel s ms (FromSilence d), Primitive d, ValidRest s d)
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence d) d
(:~<<<) :: (ValidMel s ms (FromSilence ThirtySecond), Primitive d, ValidRest s ThirtySecond)
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence ThirtySecond) ThirtySecond
(:~<<) :: (ValidMel s ms (FromSilence Sixteenth), Primitive d, ValidRest s Sixteenth)
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence Sixteenth) Sixteenth
(:~<) :: (ValidMel s ms (FromSilence Eighth), Primitive d, ValidRest s Eighth)
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence Eighth) Eighth
(:~^) :: (ValidMel s ms (FromSilence Quarter), Primitive d, ValidRest s Quarter)
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence Quarter) Quarter
(:~>) :: (ValidMel s ms (FromSilence Half), Primitive d, ValidRest s Half)
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence Half) Half
(:~>>) :: (ValidMel s ms (FromSilence Whole), Primitive d, ValidRest s Whole)
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence Whole) Whole
(:~<<.) :: (ValidMel s ms (FromSilence (Dot Sixteenth)), Primitive d, ValidRest s (Dot Sixteenth))
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence (Dot Sixteenth)) (Dot Sixteenth)
(:~<.) :: (ValidMel s ms (FromSilence (Dot Eighth)), Primitive d, ValidRest s (Dot Eighth))
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence (Dot Eighth)) (Dot Eighth)
(:~^.) :: (ValidMel s ms (FromSilence (Dot Quarter)), Primitive d, ValidRest s (Dot Quarter))
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence (Dot Quarter)) (Dot Quarter)
(:~>.) :: (ValidMel s ms (FromSilence (Dot Half)), Primitive d, ValidRest s (Dot Half))
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence (Dot Half)) (Dot Half)
(:~>>.) :: (ValidMel s ms (FromSilence (Dot Whole)), Primitive d, ValidRest s (Dot Whole))
=> Melody s ms d -> RestS -> Melody s (ms +|+ FromSilence (Dot Whole)) (Dot Whole)