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.Time.Transform

Contents

Description

 

Synopsis

Documentation

The Transformable class

class Transformable a where Source

Class of values that can be transformed (i.e. scaled and moved) in time.

Methods

transform :: Span -> a -> a Source

Instances

Transformable Bool 
Transformable Char 
Transformable Double 
Transformable Float 
Transformable Int 
Transformable Integer 
Transformable Ordering 
Transformable () 
Transformable Span 
Transformable Time 
Transformable Duration 
Transformable Meta 
Transformable Attribute 
Transformable ArticulationNotation 
Transformable DynamicNotation 
Transformable a => Transformable [a] 
Transformable a => Transformable (Ratio a) 
Transformable a => Transformable (Sum a) 
Transformable a => Transformable (Product a) 
Transformable a => Transformable (Maybe a) 
(Ord a, Transformable a) => Transformable (Set a) 
Transformable a => Transformable (Seq a) 
Transformable a => Transformable (Option a) 
Transformable a => Transformable (Last a) 
Transformable a => Transformable (Ctxt a) 
Transformable (NoReverse a) 
Transformable (Note a) 
Transformable (Voice a) 
Transformable a => Transformable (Placed a) 
Transformable a => Transformable (Track a) 
Transformable a => Transformable (AddMeta a) 
Transformable (Event a) 
Transformable (Score a) 
Transformable v => Transformable (Aligned v) 
Transformable (Behavior a) 
Transformable (Reactive a) 
Transformable a => Transformable (Average a) 
Transformable a => Transformable (TieT a) 
Transformable (Rhythm a) 
Transformable a => Transformable (SlideT a) 
Transformable a => Transformable (TextT a) 
Transformable a => Transformable (HarmonicT a) 
Transformable a => Transformable (TremoloT a) 
Transformable a => Transformable (ColorT a) 
(Transformable a, Transformable b) => Transformable (a -> b) 
Transformable a => Transformable (b, a) 
(Ord k, Transformable a) => Transformable (Map k a) 
(Monoid b, Transformable a) => Transformable (Couple b a) 
Transformable a => Transformable (PartT n a) 
Transformable a => Transformable (DynamicT n a) 
Transformable a => Transformable (ArticulationT n a) 

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

delaying :: Duration -> Span Source

A transformation that moves a value forward in time.

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

Moves a value backward in time. Equnitvalent to stretch . negate.

stretch :: Transformable a => Duration -> a -> a Source

Stretches (augments) a value by the given factor.

compress :: Transformable a => Duration -> a -> a Source

Compresses (diminishes) a score. Equnitvalent to stretch . recip.

(|*) :: 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.