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.Types
- class Transformable a where
- transformed :: (Transformable a, Transformable b) => Span -> Iso a b a b
- delaying :: Duration -> Span
- undelaying :: Duration -> Span
- stretching :: Duration -> Span
- compressing :: Duration -> Span
- delay :: Transformable a => Duration -> a -> a
- undelay :: Transformable a => Duration -> a -> a
- stretch :: Transformable a => Duration -> a -> a
- compress :: Transformable a => Duration -> a -> a
- (|*) :: Transformable a => a -> Duration -> a
- (*|) :: Transformable a => Duration -> a -> a
- (|/) :: Transformable a => a -> Duration -> a
Documentation
module Music.Time.Types
The Transformable class
class Transformable a where Source
Class of values that can be transformed (i.e. scaled and moved) in time.
transformed :: (Transformable a, Transformable b) => Span -> Iso a b a b Source
View the given value in the context of the given transformation.
Specific transformations
Transformations
undelaying :: Duration -> Span Source
A transformation that moves a value backward in time.
stretching :: Duration -> Span Source
A transformation that stretches (augments) a value by the given factor.
compressing :: Duration -> Span Source
A transformation that compresses (diminishes) a value by the given factor.
Transforming values
delay :: Transformable a => Duration -> a -> a Source
Moves a value forward in time.
undelay :: Transformable a => Duration -> a -> a Source
stretch :: Transformable a => Duration -> a -> a Source
Stretches (augments) a value by the given factor.
compress :: Transformable a => Duration -> a -> a Source
(|*) :: Transformable a => a -> Duration -> a infixl 7 Source
Infix version of stretch
.
(*|) :: Transformable a => Duration -> a -> a infixr 7 Source
Infix version of stretch
.
(|/) :: Transformable a => a -> Duration -> a infixr 7 Source
Infix version of compress
.