Safe Haskell | None |
---|
- type StrictTime = Integer
- type LazyTime = T Integer
- type Filter event = State (T StrictTime [event])
- getSlice :: (event -> Maybe a) -> Filter event (T StrictTime [a])
- type Channel = Channel
- type Controller = Controller
- type Pitch = Pitch
- type Velocity = Velocity
- type Program = Program
- getControllerEvents :: C event => Channel -> Controller -> Filter event (T StrictTime [Int])
- data NoteBoundary a
- = NoteBoundary Pitch Velocity a
- | AllNotesOff
- data Note = Note Program Pitch Velocity LazyTime
- case_ :: Maybe a -> (a -> b) -> Maybe b
- getNoteEvents :: C event => Channel -> Filter event (T StrictTime [Either Program (NoteBoundary Bool)])
- checkNoteEvent :: C event => Channel -> event -> Maybe (Either Program (NoteBoundary Bool))
- embedPrograms :: Program -> T StrictTime [Either Program (NoteBoundary Bool)] -> T StrictTime [NoteBoundary (Maybe Program)]
- embedProgramState :: Either Program (NoteBoundary Bool) -> State Program (Maybe (NoteBoundary (Maybe Program)))
- matchNoteEvents :: T StrictTime [NoteBoundary (Maybe Program)] -> T StrictTime [Note]
- matchNoteEventsCore :: (noteBnd -> Maybe (noteBnd -> Bool, LazyTime -> Note)) -> T StrictTime [noteBnd] -> T StrictTime [Note]
- durationRemove :: C time => (body -> Bool) -> T time [body] -> (T time, T time [body])
- durationRemoveTB :: C time => (body -> Bool) -> T time [body] -> (T time, T time [body])
- makeInstrumentArray :: [instr] -> Array Program instr
- getInstrumentFromArray :: Array Program instr -> Program -> Program -> instr
Documentation
type StrictTime = IntegerSource
event filters
type Filter event = State (T StrictTime [event])Source
getSlice :: (event -> Maybe a) -> Filter event (T StrictTime [a])Source
We turn the strict time values into lazy ones according to the breaks by our beat. However for the laziness breaks we ignore the events that are filtered out. That is we loose laziness granularity but hopefully gain efficiency by larger blocks.
type Controller = ControllerSource
getControllerEvents :: C event => Channel -> Controller -> Filter event (T StrictTime [Int])Source
data NoteBoundary a Source
Eq a => Eq (NoteBoundary a) | |
Show a => Show (NoteBoundary a) |
getNoteEvents :: C event => Channel -> Filter event (T StrictTime [Either Program (NoteBoundary Bool)])Source
checkNoteEvent :: C event => Channel -> event -> Maybe (Either Program (NoteBoundary Bool))Source
embedPrograms :: Program -> T StrictTime [Either Program (NoteBoundary Bool)] -> T StrictTime [NoteBoundary (Maybe Program)]Source
embedProgramState :: Either Program (NoteBoundary Bool) -> State Program (Maybe (NoteBoundary (Maybe Program)))Source
matchNoteEvents :: T StrictTime [NoteBoundary (Maybe Program)] -> T StrictTime [Note]Source
matchNoteEventsCore :: (noteBnd -> Maybe (noteBnd -> Bool, LazyTime -> Note)) -> T StrictTime [noteBnd] -> T StrictTime [Note]Source
durationRemove :: C time => (body -> Bool) -> T time [body] -> (T time, T time [body])Source
Search for specific event, return its time stamp and remove it.
makeInstrumentArray :: [instr] -> Array Program instrSource