clockblocks.tempo_envelope

Module defining the TempoEnvelope class for describing a time-varying tempo, the TempoHistory class, which adds to that a tracking of the current beat and time, and the MetricPhaseTarget class, which specifies a goal arrival point within the beat (or meter) cycle.

Classes

EnvelopeLoopInfo(env, length_in_beats, ...)

Internal bookkeeping for a tempo envelope set to loop: the envelope being repeated plus the running beat/time extents needed to keep appending copies as the clock advances.

FunctionFollowInfo(func, next_domain_start, ...)

Internal bookkeeping for a tempo curve that follows a user function: the function itself plus the state needed to keep extending the envelope to approximate it as the clock advances.

TempoEnvelope([levels, durations, ...])

A subclass of Envelope that is specifically designed for representing changing tempo curves.

TempoHistory([levels, durations, ...])

Subclass of TempoEnvelope that keeps track of a current beat and time, and provides functionality for moving forward a certain number of beats or seconds, and/or setting tempo target(s) to reach in the future.

Functions

tempo_modification(fn)

Decorator applied to methods of TempoEnvelope that change the curve and therefore could mess up any cached beat/time relationships.