music-score-1.6.2: Musical score and part representation.

Portabilitynon-portable (TF,GNTD)
Stabilityexperimental
Maintainerhans@hanshoglund.se
Safe HaskellNone

Music.Time.Reactive

Contents

Description

Reactive values, or piecewise functions of time.

Similar to Conal's definition in http://conal.net/blog/posts/reactive-normal-form, but defined in negative time as well. Its semantics function is either occs &&& ? or initial &&& updates, where intial is the value from negative infinity to the first update.

TODO integrate better in the library

Synopsis

Documentation

Create, isos etc (TODO)

initial :: Reactive a -> aSource

Get the initial value.

updates :: Reactive a -> [Future a]Source

Get the time of all updates and the value switched to at this point.

occs :: Reactive a -> [Time]Source

Get the time of all updatese.

Predicates

Combinators

switch :: Time -> Reactive a -> Reactive a -> Reactive aSource

switch t a b behaves as a before time t, then as b.

trim :: Monoid a => Span -> Reactive a -> Reactive aSource

Replace everthing outside the given span by mempty.

Semantics