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

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

Music.Time.Onset

Contents

Description

 

Synopsis

Documentation

class HasDuration s whereSource

Methods

duration :: s a -> Duration sSource

class HasOnset s whereSource

Class of types with a position in time.

Onset and offset are logical start and stop time, i.e. the preferred beginning and end of the sound, not o the the time of the attack and damp actions on an instrument,

If a type has an instance for both HasOnset and HasDuration, the following laws should hold:

 duration a = offset a - onset a
 offset a >= onset a

implying

 duration a >= 0

Methods

onset :: s a -> Time sSource

  Get the onset of the given value.

Instances

class HasOffset s whereSource

Methods

offset :: s a -> Time sSource

  Get the offset of the given value.

class HasPreOnset s whereSource

Methods

preOnset :: s a -> Time sSource

class HasPostOnset s whereSource

Methods

postOnset :: s a -> Time sSource

class HasPostOffset s whereSource

Methods

postOffset :: s a -> Time sSource

Defaults

durationDefault :: (AffineSpace (Time s), HasOffset s, HasOnset s) => s a -> Duration sSource

Given HasOnset and HasOffset instances, this function implements duration.

onsetDefault :: (AffineSpace (Time s), HasOffset s, HasDuration s) => s a -> Time sSource

Given HasDuration and HasOffset instances, this function implements onset.

offsetDefault :: (AffineSpace (Time s), HasOnset s, HasDuration s) => s a -> Time sSource

Given HasOnset and HasOnset instances, this function implements offset.

Wrappers

newtype AddOffset t s a Source

Constructors

AddOffset (t, s a) 

Instances

(Delayable a, ~ * t (Time a)) => Delayable (AddOffset t a) 
(Stretchable a, ~ * t (Time a)) => Stretchable (AddOffset t a) 
HasOffset (AddOffset t s) 
(HasOnset a, ~ * t (Time a)) => HasOnset (AddOffset t a) 
(Transformable a, ~ * t (Time a)) => Transformable (AddOffset t a) 
(Transformable1 a, ~ * t (Time a)) => Transformable1 (AddOffset t a)