music-score-1.9.0: Musical score and part representation.

Copyright(c) Hans Hoglund 2012-2014
LicenseBSD-style
Maintainerhans@hanshoglund.se
Stabilityexperimental
Portabilitynon-portable (TF,GNTD)
Safe HaskellNone
LanguageHaskell2010

Music.Score.Dynamics

Contents

Description

Provides functions for manipulating dynamics.

Synopsis

Dynamic type functions

type family Dynamic s :: * Source

Dynamics type.

Instances

type Dynamic Bool = Bool 
type Dynamic Char = Char 
type Dynamic Double = Double 
type Dynamic Float = Float 
type Dynamic Int = Int 
type Dynamic Integer = Integer 
type Dynamic Ordering = Ordering 
type Dynamic () = () 
type Dynamic DynamicNotation = DynamicNotation 
type Dynamic [a] = Dynamic a 
type Dynamic (Maybe a) = Dynamic a 
type Dynamic (Note a) = Dynamic a 
type Dynamic (Voice a) = Dynamic a 
type Dynamic (Placed a) = Dynamic a 
type Dynamic (Track a) = Dynamic a 
type Dynamic (Event a) = Dynamic a 
type Dynamic (Score a) = Dynamic a 
type Dynamic (Aligned a) = Dynamic a 
type Dynamic (Behavior a) = Behavior a 
type Dynamic (TieT a) = Dynamic a 
type Dynamic (SlideT a) = Dynamic a 
type Dynamic (TextT a) = Dynamic a 
type Dynamic (HarmonicT a) = Dynamic a 
type Dynamic (TremoloT a) = Dynamic a 
type Dynamic (ColorT a) = Dynamic a 
type Dynamic (Either c a) = Dynamic a 
type Dynamic (c, a) = Dynamic a 
type Dynamic (Couple c a) = Dynamic a 
type Dynamic (PartT p a) = Dynamic a 
type Dynamic (DynamicT p a) = p 
type Dynamic (ArticulationT p a) = Dynamic a 
type Dynamic (a, b, c) = (a, b, c) 

type family SetDynamic b s :: * Source

Dynamic type.

Instances

type SetDynamic a Double = a 
type SetDynamic a Float = a 
type SetDynamic a Integer = a 
type SetDynamic a Int = a 
type SetDynamic a Char = a 
type SetDynamic a Ordering = a 
type SetDynamic a Bool = a 
type SetDynamic a () = a 
type SetDynamic g (SlideT a) = SlideT (SetDynamic g a) 
type SetDynamic g (TieT a) = TieT (SetDynamic g a) 
type SetDynamic g (HarmonicT a) = HarmonicT (SetDynamic g a) 
type SetDynamic g (TextT a) = TextT (SetDynamic g a) 
type SetDynamic b (Behavior a) = b 
type SetDynamic b (Aligned a) = Aligned (SetDynamic b a) 
type SetDynamic b (Score a) = Score (SetDynamic b a) 
type SetDynamic b (Track a) = Track (SetDynamic b a) 
type SetDynamic b (Voice a) = Voice (SetDynamic b a) 
type SetDynamic b (Note a) = Note (SetDynamic b a) 
type SetDynamic b (Placed a) = Placed (SetDynamic b a) 
type SetDynamic b (Event a) = Event (SetDynamic b a) 
type SetDynamic b (Maybe a) = Maybe (SetDynamic b a) 
type SetDynamic b [a] = [SetDynamic b a] 
type SetDynamic g (TremoloT a) = TremoloT (SetDynamic g a) 
type SetDynamic g (ColorT a) = ColorT (SetDynamic g a) 
type SetDynamic p' (DynamicT p a) = DynamicT p' a 
type SetDynamic g (Couple c a) = Couple c (SetDynamic g a) 
type SetDynamic b (Either c a) = Either c (SetDynamic b a) 
type SetDynamic b (c, a) = (c, SetDynamic b a) 
type SetDynamic b (ArticulationT p a) = ArticulationT p (SetDynamic b a) 
type SetDynamic b (PartT p a) = PartT p (SetDynamic b a) 
type SetDynamic g (a, b, c) = g 

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

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.

Methods

dynamics :: Traversal s t (Dynamic s) (Dynamic t) Source

Access all dynamics.

Instances

(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Bool a) Bool) => HasDynamics Bool a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Char a) Char) => HasDynamics Char a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Double a) Double) => HasDynamics Double a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Float a) Float) => HasDynamics Float a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Int a) Int) => HasDynamics Int a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Integer a) Integer) => HasDynamics Integer a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Ordering a) Ordering) => HasDynamics Ordering a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic () a) ()) => HasDynamics () a 
(Transformable a, Transformable b, (~) * b (Dynamic b), (~) * (SetDynamic (Behavior a) b) (Behavior a)) => HasDynamics (Behavior a) b 
HasDynamics a b => HasDynamics [a] [b] 
HasDynamics a b => HasDynamics (Maybe a) (Maybe b) 
HasDynamics a b => HasDynamics (Note a) (Note b) 
HasDynamics a b => HasDynamics (Voice a) (Voice b) 
HasDynamics a b => HasDynamics (Placed a) (Placed b) 
HasDynamics a b => HasDynamics (Track a) (Track b) 
HasDynamics a b => HasDynamics (Event a) (Event b) 
HasDynamics a b => HasDynamics (Score a) (Score b) 
HasDynamics a b => HasDynamics (Aligned a) (Aligned b) 
HasDynamics a b => HasDynamics (TieT a) (TieT b) 
HasDynamics a b => HasDynamics (SlideT a) (SlideT b) 
HasDynamics a b => HasDynamics (TextT a) (TextT b) 
HasDynamics a b => HasDynamics (HarmonicT a) (HarmonicT b) 
HasDynamics a b => HasDynamics (TremoloT a) (TremoloT b) 
HasDynamics a b => HasDynamics (ColorT a) (ColorT b) 
HasDynamics a b => HasDynamics (Either c a) (Either c b) 
HasDynamics a b => HasDynamics (c, a) (c, b) 
HasDynamics a b => HasDynamics (Couple c a) (Couple c b) 
HasDynamics a b => HasDynamics (PartT p a) (PartT p b) 
(Transformable p, Transformable p') => HasDynamics (DynamicT p a) (DynamicT p' a) 
HasDynamics a b => HasDynamics (ArticulationT p a) (ArticulationT p b) 

class HasDynamics s t => HasDynamic s t where Source

Class of types that provide a single dynamic.

Methods

dynamic :: Lens s t (Dynamic s) (Dynamic t) Source

Access a single dynamic.

Instances

(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Bool a) Bool) => HasDynamic Bool a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Char a) Char) => HasDynamic Char a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Double a) Double) => HasDynamic Double a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Float a) Float) => HasDynamic Float a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Int a) Int) => HasDynamic Int a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Integer a) Integer) => HasDynamic Integer a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic Ordering a) Ordering) => HasDynamic Ordering a 
(Transformable a, (~) * a (Dynamic a), (~) * (SetDynamic () a) ()) => HasDynamic () a 
(Transformable a, Transformable b, (~) * b (Dynamic b), (~) * (SetDynamic (Behavior a) b) (Behavior a)) => HasDynamic (Behavior a) b 
HasDynamic a b => HasDynamic (Note a) (Note b) 
HasDynamic a b => HasDynamic (Placed a) (Placed b) 
HasDynamic a b => HasDynamic (Event a) (Event b) 
HasDynamic a b => HasDynamic (TieT a) (TieT b) 
HasDynamic a b => HasDynamic (SlideT a) (SlideT b) 
HasDynamic a b => HasDynamic (TextT a) (TextT b) 
HasDynamic a b => HasDynamic (HarmonicT a) (HarmonicT b) 
HasDynamic a b => HasDynamic (TremoloT a) (TremoloT b) 
HasDynamic a b => HasDynamic (ColorT a) (ColorT b) 
HasDynamic a b => HasDynamic (c, a) (c, b) 
HasDynamic a b => HasDynamic (Couple c a) (Couple c b) 
HasDynamic a b => HasDynamic (PartT p a) (PartT p b) 
(Transformable p, Transformable p') => HasDynamic (DynamicT p a) (DynamicT p' a) 
HasDynamic a b => HasDynamic (ArticulationT p a) (ArticulationT p b) 

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 Level a = Diff (Dynamic a) Source

Associated interval type.

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.

compressor Source

Arguments

:: Attenuable a 
=> Dynamic a

Threshold

-> Scalar (Level a)

Ratio

-> a 
-> a 

newtype DynamicT n a Source

Constructors

DynamicT 

Fields

getDynamicT :: (n, a)
 

Instances

HasBackendNote NoteList a => HasBackendNote NoteList (DynamicT b a) 
(Real d, HasBackendNote Midi a) => HasBackendNote Midi (DynamicT d a) 
HasBackendNote SuperCollider a => HasBackendNote SuperCollider (DynamicT b a) 
HasBackendNote Lilypond a => HasBackendNote Lilypond (DynamicT DynamicNotation a) 
HasBackendNote MusicXml a => HasBackendNote MusicXml (DynamicT DynamicNotation a) 
Monoid n => Monad (DynamicT n) 
Functor (DynamicT n) 
Monoid n => Applicative (DynamicT n) 
Comonad (DynamicT n) 
(Monoid n, Bounded a) => Bounded (DynamicT n a) 
(Monoid n, Enum a) => Enum (DynamicT n a) 
(Eq n, Eq a) => Eq (DynamicT n a) 
(Monoid n, Floating a) => Floating (DynamicT n a) 
(Monoid n, Fractional a) => Fractional (DynamicT n a) 
(Monoid n, Num a) => Num (DynamicT n a) 
(Ord n, Ord a) => Ord (DynamicT n a) 
(Show n, Show a) => Show (DynamicT n a) 
(Monoid n, Monoid a) => Monoid (DynamicT n a) 
Wrapped (DynamicT p a) 
(Semigroup n, Semigroup a) => Semigroup (DynamicT n a) 
(IsPitch a, Monoid n) => IsPitch (DynamicT n a) 
(IsInterval a, Monoid n) => IsInterval (DynamicT n a) 
(IsDynamics n, Monoid a) => IsDynamics (DynamicT n a) 
Transformable a => Transformable (DynamicT n a) 
Reversible a => Reversible (DynamicT p a) 
Alterable a => Alterable (DynamicT n a) 
Augmentable a => Augmentable (DynamicT n a) 
(Tiable n, Tiable a) => Tiable (DynamicT n a) 
Typeable (* -> * -> *) DynamicT 
Rewrapped (DynamicT p a) (DynamicT p' b) 
HasPitches a b => HasPitches (DynamicT p a) (DynamicT p b) 
HasPitch a b => HasPitch (DynamicT p a) (DynamicT p b) 
(Transformable p, Transformable p') => HasDynamics (DynamicT p a) (DynamicT p' a) 
(Transformable p, Transformable p') => HasDynamic (DynamicT p a) (DynamicT p' a) 
type SetPitch b (DynamicT p a) = DynamicT p (SetPitch b a) 
type SetDynamic p' (DynamicT p a) = DynamicT p' a 
type Unwrapped (DynamicT p a) = (p, a) 
type Pitch (DynamicT p a) = Pitch a 
type Dynamic (DynamicT p a) = p 

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