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

Contents

Description

 

Synopsis

Event type

data Event a Source

A Event is a value transformed to appear in some Span. Like Span, it is an instance of Transformable.

Instances

Monad Event 
Functor Event 
Applicative Event 
Foldable Event 
Traversable Event 
Comonad Event 
Eq a => Eq (Event a) 
Floating a => Floating (Event a) 
Fractional a => Fractional (Event a) 
Num a => Num (Event a) 
Ord a => Ord (Event a) 
Real a => Real (Event a) 
RealFrac a => RealFrac (Event a) 
(Show a, Transformable a) => Show (Event a) 
IsString a => IsString (Event a) 
Wrapped (Event a) 
IsPitch a => IsPitch (Event a) 
IsInterval a => IsInterval (Event a) 
IsDynamics a => IsDynamics (Event a) 
ToJSON a => ToJSON (Event a) 
FromJSON a => FromJSON (Event a) 
Transformable (Event a) 
HasDuration (Event a) 
HasPosition (Event a) 
Rewrapped (Event a) (Event b) 
HasParts a b => HasParts (Event a) (Event b) 
HasPart a b => HasPart (Event a) (Event b) 
HasPitches a b => HasPitches (Event a) (Event b) 
HasPitch a b => HasPitch (Event a) (Event b) 
HasDynamics a b => HasDynamics (Event a) (Event b) 
HasDynamic a b => HasDynamic (Event a) (Event b) 
HasArticulations a b => HasArticulations (Event a) (Event b) 
HasArticulation a b => HasArticulation (Event a) (Event b) 
Typeable (* -> *) Event 
type SetPart g (Event a) = Event (SetPart g a) 
type SetPitch b (Event a) = Event (SetPitch b a) 
type SetDynamic b (Event a) = Event (SetDynamic b a) 
type SetArticulation g (Event a) = Event (SetArticulation g a) 
type Unwrapped (Event a) = (Span, a) 
type Part (Event a) = Part a 
type Pitch (Event a) = Pitch a 
type Dynamic (Event a) = Dynamic a 
type Articulation (Event a) = Articulation a 

Construction

event :: Iso (Span, a) (Span, b) (Event a) (Event b) Source

View a event as a pair of the original value and the transformation (and vice versa).

eventee :: (Transformable a, Transformable b) => Lens (Event a) (Event b) a b Source

View the value in the event.

spanEvent :: Iso' Span (Event ()) Source

Event as a span with a trivial value.

triple :: Iso (Event a) (Event b) (Time, Duration, a) (Time, Duration, b) Source

View a event as a (time, duration, value) triple.