| Copyright | (c) Hans Hoglund 2012-2014 |
|---|---|
| License | BSD-style |
| Maintainer | hans@hanshoglund.se |
| Stability | experimental |
| Portability | non-portable (TF,GNTD) |
| Safe Haskell | None |
| Language | Haskell2010 |
Music.Time.Stretched
Contents
Description
- data Stretched a
- stretched :: Iso (Duration, a) (Duration, b) (Stretched a) (Stretched b)
- stretchedValue :: (Transformable a, Transformable b) => Lens (Stretched a) (Stretched b) a b
Stretched type
A Stretched value has a known duration, but no position.
Placing a value inside Stretched makes it invariant under delay, however the inner
value can still be delayed using .fmap delay
Instances
Construction
stretched :: Iso (Duration, a) (Duration, b) (Stretched a) (Stretched b) Source
View a stretched value as a pair of the original value and a stretch factor.
stretchedValue :: (Transformable a, Transformable b) => Lens (Stretched a) (Stretched b) a b Source
View a stretched value as a pair of the original value and the transformation (and vice versa).