- class (Num t, Ord t, Fractional t) => Dur t
- class Dur t => Temporal t a where
- class Dur t => Stretchable t a where
- stretch :: t -> a -> a
- class ToMaybe m where
- class Dur t => TemporalFunctor t f where
- tmap :: (t -> a -> b) -> f a -> f b
- class Reversible a where
- reverse :: a -> a
- class Temporal t a => Sliceable t a where
- cut :: (Reversible a, Sliceable t a) => t -> t -> a -> a
- class Construct m where
- prim :: a -> m a
- class Arrangeable a where
- class Controlable c a where
- control :: c -> a -> a
- sequent :: Arrangeable a => [a] -> a
- parallel :: Arrangeable a => [a] -> a
- loop :: Arrangeable a => Int -> a -> a
- delay :: (Temporal t a, Arrangeable a) => t -> a -> a
- temp :: (Construct m, Temporal t (m a), Stretchable t (m a)) => t -> a -> m a
- data Media c a
- fold :: (a -> b) -> (b -> b -> b) -> (b -> b -> b) -> (c -> b -> b) -> Media c a -> b
- fromMedia :: Arrangeable b => (a -> b) -> (c -> b -> b) -> Media c a -> b
- type Event t a = (t, t, a)
- data EventList t a = EventList t [Event t a]
- mapEvent :: Dur t => (a -> b) -> Event t a -> Event t b
- toEvent :: (Temporal t (m a), ToMaybe m) => m a -> EventList t a
- toEventList :: (Temporal t (m a), ToMaybe m) => (c -> EventList t a -> EventList t a) -> Media c (m a) -> EventList t a
- data Dur t => MediaUnit t c a = MediaUnit t (Media c (Unit t a))
- unMediaUnit :: Dur t => MediaUnit t c a -> Media c (Unit t a)
- foldU :: Dur t => (t -> a -> b) -> (b -> b -> b) -> (b -> b -> b) -> (c -> b -> b) -> MediaUnit t c a -> Maybe b
- fromMediaUnit :: Dur t => (c -> EventList t a -> EventList t a) -> MediaUnit t c a -> EventList t a
- data Dur t => Unit t a = Unit t (Maybe a)
Time classes
class Dur t => Stretchable t a whereSource
Stretching values by given time-factor
Dur t => Stretchable t (Unit t a) | |
(Dur t, Stretchable t a) => Stretchable t (EventList t a) | |
Stretchable t a => Stretchable t (Media c a) | |
Dur t => Stretchable t (MediaUnit t c a) |
class Dur t => TemporalFunctor t f whereSource
temporal map
Dur t => TemporalFunctor t (Unit t) | |
Dur t => TemporalFunctor t (EventList t) | |
Dur t => TemporalFunctor t (MediaUnit t c) |
Transformers
class Reversible a whereSource
Dur t => Reversible (Unit t a) | |
Reversible a => Reversible (Media c a) | |
Dur t => Reversible (MediaUnit t c a) |
class Temporal t a => Sliceable t a whereSource
extracting parts, minimal complete definition: slice
.
:: t | |
-> t | |
-> a | |
-> a |
|
cut :: (Reversible a, Sliceable t a) => t -> t -> a -> aSource
mixing slice and reverse.
cut t0 t1 v
- if t1 < t0
reverses result of slice
Structure
constructor for generic structures
class Arrangeable a whereSource
composing structures in sequent and parallel ways
Dur t => Arrangeable (EventList t a) | |
Arrangeable (Media c a) | |
Dur t => Arrangeable (MediaUnit t c a) |
class Controlable c a whereSource
modifer
Dur t => Controlable () (EventList t a) | |
Controlable c (Media c a) | |
Dur t => Controlable c (MediaUnit t c a) |
sequent :: Arrangeable a => [a] -> aSource
parallel :: Arrangeable a => [a] -> aSource
loop :: Arrangeable a => Int -> a -> aSource
delay :: (Temporal t a, Arrangeable a) => t -> a -> aSource
temp :: (Construct m, Temporal t (m a), Stretchable t (m a)) => t -> a -> m aSource
constructs generic temporal structure m a
form time t
and initial value a
Media
Data type to represent temporal media
Prim a | single value |
(Media c a) :+: (Media c a) | sequential composition |
(Media c a) :=: (Media c a) | parallel composition |
Control c (Media c a) | specific environment modifier |
Controlable c (Media c a) | |
Sliceable t a => Sliceable t (Media c a) | |
Stretchable t a => Stretchable t (Media c a) | |
Temporal t a => Temporal t (Media c a) | |
Monad (Media c) | |
Functor (Media c) | |
Applicative (Media c) | |
Construct (Media c) | |
(Eq c, Eq a) => Eq (Media c a) | |
(Show c, Show a) => Show (Media c a) | |
Arrangeable (Media c a) | |
Reversible a => Reversible (Media c a) |
fromMedia :: Arrangeable b => (a -> b) -> (c -> b -> b) -> Media c a -> bSource
Simple interperetation
Event list
list of events with given total time
Dur t => TemporalFunctor t (EventList t) | |
Dur t => Controlable () (EventList t a) | |
(Dur t, Stretchable t a) => Stretchable t (EventList t a) | |
Dur t => Temporal t (EventList t a) | |
Dur t => Functor (EventList t) | |
Dur t => Construct (EventList t) | |
(Eq t, Eq a) => Eq (EventList t a) | |
(Show t, Show a) => Show (EventList t a) | |
Dur t => Arrangeable (EventList t a) |
toEventList :: (Temporal t (m a), ToMaybe m) => (c -> EventList t a -> EventList t a) -> Media c (m a) -> EventList t aSource
converting to EventList
toEventList
mapps generic temporal value (m a)
that can be
represented with (t, Maybe a)
to EventList
Unit Temporal Media
data Dur t => MediaUnit t c a Source
Media with explicit time
Value is unit (undividable, invariant to reverse and time stretching)
O(1) dur
Dur t => TemporalFunctor t (MediaUnit t c) | |
Dur t => Controlable c (MediaUnit t c a) | |
Dur t => Sliceable t (MediaUnit t c a) | |
Dur t => Stretchable t (MediaUnit t c a) | |
Dur t => Temporal t (MediaUnit t c a) | |
Dur t => Monad (MediaUnit t c) | |
Dur t => Functor (MediaUnit t c) | |
Dur t => Applicative (MediaUnit t c) | |
Dur t => Construct (MediaUnit t c) | |
Dur t => Arrangeable (MediaUnit t c a) | |
Dur t => Reversible (MediaUnit t c a) |
foldU :: Dur t => (t -> a -> b) -> (b -> b -> b) -> (b -> b -> b) -> (c -> b -> b) -> MediaUnit t c a -> Maybe bSource
fold
replica for MediaUnit
fromMediaUnit :: Dur t => (c -> EventList t a -> EventList t a) -> MediaUnit t c a -> EventList t aSource
unit values that can happen and lasts for some time
Dur t => TemporalFunctor t (Unit t) | |
Dur t => Sliceable t (Unit t a) | |
Dur t => Stretchable t (Unit t a) | |
Dur t => Temporal t (Unit t a) | |
Dur t => Monad (Unit t) | |
Dur t => Functor (Unit t) | |
Dur t => Applicative (Unit t) | |
Dur t => Construct (Unit t) | |
Dur t => ToMaybe (Unit t) | |
(Eq a, Dur t) => Eq (Unit t a) | |
(Show a, Dur t) => Show (Unit t a) | |
Dur t => Reversible (Unit t a) |