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

Contents

Description

 

Synopsis

Note type

data Note a Source

A Note is a value with an onset and and offset in time. It is an instance of Transformable.

You can use value to apply a function in the context of the transformation, i.e.

over value (* line) (delay 2 $ return line)
(view value) . transform s = transform s . (view value)

Instances

Monad Note 
Functor Note 
Applicative Note 
Foldable Note 
Traversable Note 
Comonad Note 
Eq a => Eq (Note a) 
(Show a, Transformable a) => Show (Note a) 
IsString a => IsString (Note a) 
Wrapped (Note a) 
IsDynamics a => IsDynamics (Note a) 
IsPitch a => IsPitch (Note a) 
IsInterval a => IsInterval (Note a) 
Transformable (Note a) 
HasDuration (Note a) 
HasPosition (Note a) 
Splittable a => Splittable (Note a) 
Reversible (Note a) 
Rewrapped (Note a) (Note b) 
HasParts a b => HasParts (Note a) (Note b) 
HasPart a b => HasPart (Note a) (Note b) 
HasPitches a b => HasPitches (Note a) (Note b) 
HasPitch a b => HasPitch (Note a) (Note b) 
HasDynamics a b => HasDynamics (Note a) (Note b) 
HasDynamic a b => HasDynamic (Note a) (Note b) 
HasArticulations a b => HasArticulations (Note a) (Note b) 
HasArticulation a b => HasArticulation (Note a) (Note b) 
Typeable (* -> *) Note 
type SetPart g (Note a) = Note (SetPart g a) 
type SetPitch b (Note a) = Note (SetPitch b a) 
type SetDynamic b (Note a) = Note (SetDynamic b a) 
type SetArticulation g (Note a) = Note (SetArticulation g a) 
type Unwrapped (Note a) = (Span, a) 
type Part (Note a) = Part a 
type Pitch (Note a) = Pitch a 
type Dynamic (Note a) = Dynamic a 
type Articulation (Note a) = Articulation a 

Construction

note :: Iso (Span, a) (Span, b) (Note a) (Note b) Source

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

event :: Iso (Note a) (Note b) (Time, Duration, a) (Time, Duration, b) Source

View a note as an events, i.e. a time-duration-value triplet.

noteValue :: (Transformable a, Transformable b) => Lens (Note a) (Note b) a b Source

View the value in the note.