Safe Haskell | None |
---|---|
Language | Haskell98 |
- fromMelody :: (C time, Floating time, RealFrac time) => T () -> Padded time T
- fancyPaddedPerformanceFromMusic :: (Ord note, C time, RealFrac time) => T note -> Padded time Double note
- type NodeId = Int
- type NodeIdGen a = T NodeId a
- type T time = T time (NodeId, Maybe (time, T))
- eventsFromNotes :: C time => Padded time T -> NodeIdGen (T time)
- eventsFromNotesEither :: C time => Padded time T -> NodeIdGen (T time)
- eventsFromNotesQueue :: C time => Padded time T -> NodeIdGen (T time)
- eventsFromNotesQueueAux :: C time => T time NodeId -> Padded time T -> NodeIdGen (T time)
- eventsFromNotesEitherAux :: C time => T time (Either NodeId (Event time T)) -> NodeIdGen (T time)
- instrStartNodeId :: NodeId
- fixNodeIds :: NodeIdGen a -> a
- fromMusic :: (Ord note, C time, RealFrac time) => FromNote time note -> T note -> NodeIdGen (T time)
- fromRhythmicMusicWithAttributes :: (Ord drum, Ord instr, C time, Floating time, RealFrac time) => ToSound drum -> ToSound instr -> T drum instr -> NodeIdGen (T time)
Documentation
fancyPaddedPerformanceFromMusic :: (Ord note, C time, RealFrac time) => T note -> Padded time Double note Source
eventsFromNotesQueueAux :: C time => T time NodeId -> Padded time T -> NodeIdGen (T time) Source
This variant does not need a list of Either
s,
instead it uses two separate lists for start and stop events.
We would like to use a standard datatype for priority queues,
however it must be efficient to remove the first element
which means that the time stamp of all following elements must be decreased.
Since we have no such data structure, we simply use a TimeList.
But then again, without the Either
list,
we have to merge the queue of stop events and the list of start events manually.
This makes the implementation less beautiful.
eventsFromNotesEitherAux :: C time => T time (Either NodeId (Event time T)) -> NodeIdGen (T time) Source
fixNodeIds :: NodeIdGen a -> a Source