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 |
Provides functions for manipulating dynamics.
- type family Dynamic s :: *
- type family SetDynamic b s :: *
- type DynamicLensLaws' s t a b = (Dynamic (SetDynamic a s) ~ a, SetDynamic (Dynamic t) s ~ t, SetDynamic a (SetDynamic b s) ~ SetDynamic a s)
- type DynamicLensLaws s t = DynamicLensLaws' s t (Dynamic s) (Dynamic t)
- class (Transformable (Dynamic s), Transformable (Dynamic t), DynamicLensLaws s t) => HasDynamics s t where
- class HasDynamics s t => HasDynamic s t where
- type HasDynamics' a = HasDynamics a a
- type HasDynamic' a = HasDynamic a a
- dynamic' :: (HasDynamic s t, s ~ t) => Lens' s (Dynamic s)
- dynamics' :: (HasDynamics s t, s ~ t) => Traversal' s (Dynamic s)
- type Level a = Diff (Dynamic a)
- type Attenuable a = (HasDynamics a a, VectorSpace (Level a), AffineSpace (Dynamic a), IsDynamics (Dynamic a))
- louder :: Attenuable a => Level a -> a -> a
- softer :: Attenuable a => Level a -> a -> a
- level :: Attenuable a => Dynamic a -> a -> a
- compressor :: Attenuable a => Dynamic a -> Scalar (Level a) -> a -> a
- fadeIn :: (HasPosition a, Transformable a, HasDynamics' a, Dynamic a ~ Behavior c, Fractional c) => Duration -> a -> a
- fadeOut :: (HasPosition a, Transformable a, HasDynamics' a, Dynamic a ~ Behavior c, Fractional c) => Duration -> a -> a
- newtype DynamicT n a = DynamicT {
- getDynamicT :: (n, a)
- vdynamic :: (HasDynamic a a, HasDynamic a b) => Lens (Voice a) (Voice b) (Voice (Dynamic a)) (Voice (Dynamic b))
- addDynCon :: (HasPhrases s t a b, HasDynamic a a, HasDynamic a b, Dynamic a ~ d, Dynamic b ~ Ctxt d) => s -> t
Dynamic type functions
type family Dynamic s :: * Source
Dynamics type.
type family SetDynamic b s :: * Source
Dynamic type.
type DynamicLensLaws' s t a b = (Dynamic (SetDynamic a s) ~ a, SetDynamic (Dynamic t) s ~ t, SetDynamic a (SetDynamic b s) ~ SetDynamic a s) Source
type DynamicLensLaws s t = DynamicLensLaws' s t (Dynamic s) (Dynamic t) Source
Accessing dynamics
class (Transformable (Dynamic s), Transformable (Dynamic t), DynamicLensLaws s t) => HasDynamics s t where Source
Class of types that provide a dynamic traversal.
class HasDynamics s t => HasDynamic s t where Source
Class of types that provide a single dynamic.
type HasDynamics' a = HasDynamics a a Source
type HasDynamic' a = HasDynamic a a Source
dynamic' :: (HasDynamic s t, s ~ t) => Lens' s (Dynamic s) Source
Access a single dynamic.
dynamics' :: (HasDynamics s t, s ~ t) => Traversal' s (Dynamic s) Source
Access all dynamics.
Manipulating dynamics
type Attenuable a = (HasDynamics a a, VectorSpace (Level a), AffineSpace (Dynamic a), IsDynamics (Dynamic a)) Source
Class of types that can be transposed.
louder :: Attenuable a => Level a -> a -> a Source
Transpose up.
softer :: Attenuable a => Level a -> a -> a Source
Transpose down.
level :: Attenuable a => Dynamic a -> a -> a Source
Transpose down.
:: Attenuable a | |
=> Dynamic a | Threshold |
-> Scalar (Level a) | Ratio |
-> a | |
-> a |
fadeIn :: (HasPosition a, Transformable a, HasDynamics' a, Dynamic a ~ Behavior c, Fractional c) => Duration -> a -> a Source
Fade in.
fadeOut :: (HasPosition a, Transformable a, HasDynamics' a, Dynamic a ~ Behavior c, Fractional c) => Duration -> a -> a Source
Fade in.
DynamicT | |
|
Context
vdynamic :: (HasDynamic a a, HasDynamic a b) => Lens (Voice a) (Voice b) (Voice (Dynamic a)) (Voice (Dynamic b)) Source
View just the dynamices in a voice.
addDynCon :: (HasPhrases s t a b, HasDynamic a a, HasDynamic a b, Dynamic a ~ d, Dynamic b ~ Ctxt d) => s -> t Source