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 |
- module Music.Time.Transform
- class HasDuration a where
- duration :: (Transformable a, HasDuration a) => Lens' a Duration
- stretchTo :: (Transformable a, HasDuration a) => Duration -> a -> a
Documentation
module Music.Time.Transform
The HasDuration class
class HasDuration a where Source
Nothing
HasDuration Span | |
HasDuration Time | |
HasDuration Duration | |
(HasPosition a, HasDuration a) => HasDuration [a] | |
HasDuration a => HasDuration (Sum a) | |
HasDuration a => HasDuration (Product a) | |
HasDuration a => HasDuration (Min a) | |
HasDuration a => HasDuration (Max a) | |
(HasPosition a, HasDuration a) => HasDuration (Bound a) | |
HasDuration a => HasDuration (AddMeta a) | |
HasDuration (Stretched a) | |
HasDuration (Voice a) | |
HasDuration (Delayed a) | |
HasDuration (Chord a) | |
HasDuration (Track a) | |
HasDuration (Note a) | |
HasDuration (Score a) | |
HasDuration (Future a) | |
HasDuration (Past a) | |
HasDuration (Rhythm a) | |
(HasDuration a, HasDuration b) => HasDuration (Either a b) | |
HasDuration a => HasDuration (a, b) | |
HasDuration b => HasDuration (a, b, c) |
Absolute duration
duration :: (Transformable a, HasDuration a) => Lens' a Duration Source
Access the duration.
stretchTo :: (Transformable a, HasDuration a) => Duration -> a -> a Source
Stretch a value to have the given duration.