Portability | non-portable (TF,GNTD) |
---|---|
Stability | experimental |
Maintainer | hans@hanshoglund.se |
Safe Haskell | None |
Provides the Track
type.
Track type
A track is a list of events with explicit onset.
Track is a Monoid
under parallel composition. mempty
is the empty track
and mappend
interleaves values.
Track is a Monad
. return
creates a track containing a single value at time
zero, and >>=
transforms the values of a track, allowing the addition and
removal of values relative to the time of the value. Perhaps more intuitively,
join
delays each inner track to start at the offset of an outer track, then
removes the intermediate structure.
let t = Track [(0, 65),(1, 66)] t >>= \x -> Track [(0, 'a'), (10, toEnum x)] ==> Track {getTrack = [ (0.0, 'a'), (1.0, 'a'), (10.0, 'A'), (11.0, 'B') ]}
Track is an instance of VectorSpace
using parallel composition as addition,
and time scaling as scalar multiplication.
Monad Track | |
Functor Track | |
Typeable1 Track | |
MonadPlus Track | |
Applicative Track | |
Foldable Track | |
Traversable Track | |
Alternative Track | |
Eq a => Eq (Track a) | |
Ord a => Ord (Track a) | |
Show a => Show (Track a) | |
Monoid (Track a) | |
Semigroup (Track a) | |
Wrapped (Track a) | |
IsDynamics a => IsDynamics (Track a) | |
IsPitch a => IsPitch (Track a) | |
IsInterval a => IsInterval (Track a) | |
Delayable (Track a) | |
Stretchable (Track a) | |
HasOnset (Track a) | |
(HasSetPitch a b, Transformable (Pitch (Track a)), Transformable (Pitch (Track b))) => HasSetPitch (Track a) (Track b) |