| Portability | non-portable (TF,GNTD) |
|---|---|
| Stability | experimental |
| Maintainer | hans@hanshoglund.se |
| Safe Haskell | None |
Music.Time.Onset
Description
- class HasDuration s where
- class HasOnset s where
- class HasOffset s where
- class HasPreOnset s where
- class HasPostOnset s where
- class HasPostOffset s where
- postOffset :: s a -> Time s
- durationDefault :: (AffineSpace (Time s), HasOffset s, HasOnset s) => s a -> Duration s
- onsetDefault :: (AffineSpace (Time s), HasOffset s, HasDuration s) => s a -> Time s
- offsetDefault :: (AffineSpace (Time s), HasOnset s, HasDuration s) => s a -> Time s
- newtype AddOffset t s a = AddOffset (t, s a)
Documentation
class HasDuration s whereSource
Instances
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
class HasPreOnset s whereSource
class HasPostOnset s whereSource
class HasPostOffset s whereSource
Methods
postOffset :: s a -> Time sSource
Defaults
durationDefault :: (AffineSpace (Time s), HasOffset s, HasOnset s) => s a -> Duration sSource
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
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) |