Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Derive.Tempo

Description

Functions to handle tempo tracks.

Synopsis

# Documentation

Extend the last sample of a tempo track signal to the end of the track. This is required because Signal.integrate needs to generate samples to the end of the track, ultimately because Signal.compose doesn't resample its arguments.

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