Safe Haskell | Safe-Inferred |
---|
Functions to handle tempo tracks.
Synopsis
- with_tempo :: Monoid a => Bool -> Maybe (ScoreTime.ScoreTime, ScoreTime.ScoreTime) -> Maybe TrackId -> Signal.Tempo -> Deriver a -> Deriver a
- with_absolute :: Monoid a => Bool -> Maybe (ScoreTime.ScoreTime, ScoreTime.ScoreTime) -> Maybe TrackId -> Signal.Tempo -> Deriver a -> Deriver a
- with_hybrid :: Monoid a => Bool -> Maybe (ScoreTime.ScoreTime, ScoreTime.ScoreTime) -> Maybe TrackId -> Signal.Tempo -> Deriver a -> Deriver a
Documentation
:: Monoid a | |
=> Bool | If this tempo track is the toplevel track, i.e. controls all other tracks in this block, then I noramlize to the block duration. See comment below. |
-> Maybe (ScoreTime.ScoreTime, ScoreTime.ScoreTime) | block start and end, used to normalize block duration to 0--1. If Nothing, don't normalize. |
-> Maybe TrackId | Needed to record this track in TrackWarps. It's optional because if there's no explicit tempo track there's an implicit tempo around the whole block, but the implicit one doesn't have a track of course. |
-> Signal.Tempo | |
-> Deriver a | |
-> Deriver a |
Warp a deriver with a tempo signal.
Tempo is the tempo signal, which is the standard musical definition of tempo: trackpos over time. Warp is the time warping that the tempo implies, which is the integral of (1/tempo).
with_absolute :: Monoid a => Bool -> Maybe (ScoreTime.ScoreTime, ScoreTime.ScoreTime) -> Maybe TrackId -> Signal.Tempo -> Deriver a -> Deriver a Source #
Warp the deriver to have the given tempo like with_tempo
, but override
the existing warp instead of composing with it.
This can be used to isolate the tempo from any tempo effects that may be going on.
with_hybrid :: Monoid a => Bool -> Maybe (ScoreTime.ScoreTime, ScoreTime.ScoreTime) -> Maybe TrackId -> Signal.Tempo -> Deriver a -> Deriver a Source #
This is like with_tempo
, but zero tempo segments are played in absolute
time. That is, they won't stretch along with the non-zero segments. This
means the output will always be at least as long as the absolute sections,
so a block call may extend past the end of its event.