Safe Haskell | Safe-Inferred |
---|
Re-export the core deriver library. Most calls should import this module rather than the lower level ones.
Synopsis
- module Derive.Deriver.Monad
- module Derive.Deriver.Lib
- class Time a where
- get_environ :: Deriver Environ
- get_ui_state :: (State -> a) -> Deriver a
- get_ui_config :: (Config -> a) -> Deriver a
- get_track :: TrackId -> Deriver Track
- get_block :: BlockId -> Deriver Block
- eval_ui :: Stack => StateId a -> Deriver a
- in_real_time :: Deriver a -> Deriver a
- at :: ScoreTime -> Deriver a -> Deriver a
- stretch :: ScoreTime -> Deriver a -> Deriver a
- place :: ScoreTime -> ScoreTime -> Deriver a -> Deriver a
- block_logical_range :: BlockId -> Deriver (TrackTime, TrackTime)
Documentation
module Derive.Deriver.Monad
module Derive.Deriver.Lib
Times are types that can be converted to RealTime and ScoreTime.
real :: a -> Deriver RealTime Source #
score :: a -> Deriver ScoreTime Source #
to_duration :: a -> Duration Source #
Instances
Time Duration Source # | |
Time DefaultReal Source # | |
Defined in Derive.Typecheck real :: DefaultReal -> Deriver RealTime Source # score :: DefaultReal -> Deriver ScoreTime Source # to_duration :: DefaultReal -> Duration Source # | |
Time DefaultScore Source # | |
Defined in Derive.Typecheck real :: DefaultScore -> Deriver RealTime Source # score :: DefaultScore -> Deriver ScoreTime Source # to_duration :: DefaultScore -> Duration Source # | |
Time RealTime Source # | |
Time ScoreTime Source # | |
get_ui_state :: (State -> a) -> Deriver a Source #
get_ui_config :: (Config -> a) -> Deriver a Source #
get_track :: TrackId -> Deriver Track Source #
Because Deriver is not a UiStateMonad.
TODO I suppose it could be, but then I'd be tempted to make a ReadOnlyUiStateMonad. And I'd have to merge the exceptions. Or just rethrow, right?
eval_ui :: Stack => StateId a -> Deriver a Source #
Evaluate a Ui.M computation, rethrowing any errors.
in_real_time :: Deriver a -> Deriver a Source #
block_logical_range :: BlockId -> Deriver (TrackTime, TrackTime) Source #
Sub-derived blocks are stretched according to their length, and this function defines the length of a block. This is therefore the logical duration of the block, which may be shorter or lorger than the end of the last event, or the ruler.