haskore-0.2.0.3: The Haskore Computer Music System

Safe Haskell | None

Haskore.Performance

# Documentation

type T time dyn note = T time (Event time dyn note)Source

type Padded time dyn note = T time (Event time dyn note)Source

data Event time dyn note Source

Constructors

Event |

Fields

eventDur :: time
eventDynamics :: dyn
eventTranspose :: Relative
eventNote :: note

Instances

(Eq time, Eq dyn, Eq note) => Eq (Event time dyn note) |
(Ord time, Ord dyn, Ord note) => Ord (Event time dyn note) |
(Show time, Show dyn, Show note) => Show (Event time dyn note) |

fromMusic :: (C time, RealFrac time, Ord dyn, Fractional dyn, Ord note) => PlayerMap time dyn note -> Context time dyn note -> T note -> T time dyn noteSource

type PlayerMap time dyn note = PlayerName -> Player time dyn noteSource

data Context time dyn note Source

Constructors

Context |

Fields

contextDur :: time
contextPlayer :: Player time dyn note
contextTranspose :: Relative
contextDynamics :: dyn

Instances

(Show time, Show dyn) => Show (Context time dyn note) |

type UpdateContext time dyn note a = (a -> a) -> Context time dyn note -> Context time dyn noteSource

updatePlayer :: UpdateContext time dyn note (Player time dyn note)Source

updateDur :: UpdateContext time dyn note timeSource

updateTranspose :: UpdateContext time dyn note Relative Source

updateDynamics :: UpdateContext time dyn note dynSource

paddedFromMusic :: (C time, RealFrac time, Ord dyn, Fractional dyn, Ord note) => PlayerMap time dyn note -> Context time dyn note -> T note -> Padded time dyn noteSource

type PaddedWithRests time dyn note = T time (Maybe (Event time dyn note))Source

type Monad time dyn note = Reader (Context time dyn note) (PaddedWithRests time dyn note, time)Source

sequenceReader :: [Reader r a] -> Reader r [a]Source

combine :: ([performance] -> performance, [time] -> time) -> [Reader r (performance, time)] -> Reader r (performance, time)Source

monadFromMusic :: (C time, RealFrac time, Ord dyn, Fractional dyn, Ord note) => PlayerMap time dyn note -> T note -> Monad time dyn noteSource

data Player time dyn note Source

Constructors

PlayerCons |

Fields

name :: PlayerName
playNote :: NoteFun time dyn note
interpretPhrase :: PhraseFun time dyn note
notatePlayer :: NotateFun

Instances

(Show time, Show dyn) => Show (Player time dyn note) |

type NoteFun time dyn note = Context time dyn note -> Dur -> note -> T time dyn noteSource

type PhraseFun time dyn note = PhraseAttribute -> Monad time dyn note -> Monad time dyn noteSource

type NotateFun = ()Source