| Copyright | (c) Hans Hoglund 2012-2014 |
|---|---|
| License | BSD-style |
| Maintainer | hans@hanshoglund.se |
| Stability | experimental |
| Portability | non-portable (TF,GNTD) |
| Safe Haskell | None |
| Language | Haskell2010 |
Music.Time.Note
Contents
Description
Note type
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)
(viewvalue) .transforms =transforms . (viewvalue)
Instances
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.