temporal-media-0.6.3: data types for temporal media

Safe HaskellSafe
LanguageHaskell98

Temporal.Class

Synopsis

Documentation

type family DurOf a :: * Source #

Duration for the given type.

Instances

type DurOf (Track t a) Source # 
type DurOf (Track t a) = t

class Duration a where Source #

Calculates duration.

Minimal complete definition

dur

Methods

dur :: a -> DurOf a Source #

Instances

Duration (Track t a) Source # 

Methods

dur :: Track t a -> DurOf (Track t a) Source #

class Melody a where Source #

Minimal complete definition

mel | (+:+)

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) Source # 

Methods

mel :: [Track t a] -> Track t a Source #

(+:+) :: Track t a -> Track t a -> Track t a Source #

class Harmony a where Source #

Minimal complete definition

har | (=:=)

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) Source # 

Methods

har :: [Track t a] -> Track t a Source #

(=:=) :: Track t a -> Track t a -> Track t a Source #

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

Instances

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

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 #

Minimal complete definition

del

Methods

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

Delays the sound source by the given duration.

Instances

Num t => Delay (Track t a) Source #

Delays all events by given duration.

Methods

del :: DurOf (Track t a) -> Track t a -> Track t a Source #

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

Infix del function.

class Rest a where Source #

Minimal complete definition

rest

Methods

rest :: DurOf a -> a Source #

Instances

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

Empty track that lasts for some time.

Methods

rest :: DurOf (Track t a) -> Track t a Source #

class Stretch a where Source #

Minimal complete definition

str

Methods

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

Delays the sound source by the given duration factor.

Instances

Num t => Stretch (Track t a) Source #

Stretches track in time domain.

Methods

str :: DurOf (Track t a) -> Track t a -> Track t a Source #

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

Infix str function.

class Limit a where Source #

Minimal complete definition

lim

Methods

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

Limits the duration of the sound source.

class Loop a where Source #

Minimal complete definition

loop

Methods

loop :: a -> a Source #

Loops over the sound