Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)

Derive.Tempo

Description

Functions to handle tempo tracks.

Synopsis

Documentation

Arguments

 :: 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).

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.

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.