music-score-1.7.2: 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.Time.Stretched

Contents

Description

 

Synopsis

Stretched type

data Stretched a Source

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

Monad Stretched 
Functor Stretched 
Applicative Stretched 
Foldable Stretched 
Traversable Stretched 
Eq a => Eq (Stretched a) 
Floating a => Floating (Stretched a) 
Fractional a => Fractional (Stretched a) 
Num a => Num (Stretched a) 
Ord a => Ord (Stretched a) 
Real a => Real (Stretched a) 
RealFrac a => RealFrac (Stretched a) 
(Show a, Transformable a) => Show (Stretched a) 
IsString a => IsString (Stretched a) 
Wrapped (Stretched a) 
IsDynamics a => IsDynamics (Stretched a) 
IsPitch a => IsPitch (Stretched a) 
IsInterval a => IsInterval (Stretched a) 
Transformable (Stretched a) 
HasDuration (Stretched a) 
Splittable a => Splittable (Stretched a) 
Reversible (Stretched a) 
HasSlide a => HasSlide (Stretched a) 
HasText a => HasText (Stretched a) 
Rewrapped (Stretched a) (Stretched b) 
HasPitches a b => HasPitches (Stretched a) (Stretched b) 
HasPitch a b => HasPitch (Stretched a) (Stretched b) 
HasDynamics a b => HasDynamics (Stretched a) (Stretched b) 
HasDynamic a b => HasDynamic (Stretched a) (Stretched b) 
HasArticulations a b => HasArticulations (Stretched a) (Stretched b) 
HasArticulation a b => HasArticulation (Stretched a) (Stretched b) 
Cons (Voice a) (Voice b) (Stretched a) (Stretched b) 
Snoc (Voice a) (Voice b) (Stretched a) (Stretched b) 
Typeable (* -> *) Stretched 
type SetPitch b (Stretched a) = Stretched (SetPitch b a) 
type SetDynamic b (Stretched a) = Stretched (SetDynamic b a) 
type SetArticulation g (Stretched a) = Stretched (SetArticulation g a) 
type Unwrapped (Stretched a) = (Duration, a) 
type Pitch (Stretched a) = Pitch a 
type Dynamic (Stretched a) = Dynamic a 
type Articulation (Stretched a) = Articulation a 

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).