temporal-media-0.6.1: data types for temporal media

Safe HaskellSafe-Inferred
LanguageHaskell98

Temporal.Class

Synopsis

Documentation

type family DurOf a :: * Source

Duration for the given type.

Instances

type DurOf (Track t a) = t 

class Duration a where Source

Calculates duration.

Methods

dur :: a -> DurOf a Source

Instances

Duration (Track t a) 

class Melody a where Source

Minimal complete definition

Nothing

Methods

mel :: [a] -> a Source

Sequent composition for a list of values (melody).

(+:+) :: a -> a -> a Source

Sequent composition. Play first track then second.

Instances

(Num t, IfB t, OrdB t) => Melody (Track t a) 

class Harmony a where Source

Minimal complete definition

Nothing

Methods

har :: [a] -> a Source

Parallel composition for a list of values (harmony).

(=:=) :: a -> a -> a Source

Parallel composition. Play two tracks simultaneously.

Instances

(Num t, IfB t, OrdB t) => Harmony (Track t a) 

class (Melody a, Harmony a) => Compose a Source

Instances

(Num t, IfB t, OrdB t) => Compose (Track t a) 

loopBy :: Melody a => Int -> a -> a Source

Repeats the given audio segment several times.

melMap :: Melody b => (a -> b) -> [a] -> b Source

Transforms a sequence and then applies a mel.

harMap :: Harmony b => (a -> b) -> [a] -> b Source

Transforms a sequence and then applies a har.

class Delay a where Source

Methods

del :: DurOf a -> a -> a Source

Delays the sound source by the given duration.

Instances

Num t => Delay (Track t a)

Delays all events by given duration.

(+|) :: Delay a => DurOf a -> a -> a Source

Infix del function.

class Rest a where Source

Methods

rest :: DurOf a -> a Source

Instances

(Num t, IfB t, OrdB t) => Rest (Track t a)

Empty track that lasts for some time.

class Stretch a where Source

Methods

str :: DurOf a -> a -> a Source

Delays the sound source by the given duration factor.

Instances

Num t => Stretch (Track t a)

Stretches track in time domain.

(*|) :: Stretch a => DurOf a -> a -> a Source

Infix str function.

class Limit a where Source

Methods

lim :: DurOf a -> a -> a Source

Limits the duration of the sound source.

class Loop a where Source

Methods

loop :: a -> a Source

Loops over the sound