clockblocks.utilities.apply_tempo_envelope
- clockblocks.utilities.apply_tempo_envelope(envelope: TempoEnvelope, truncate: bool = True, loop: bool = False) None[source]
Append a ready-made
TempoEnvelopeonto the current clock’s tempo curve. This is the way to loop a tempo shape (aTempoEnvelopeis defined over beats, so it loops unambiguously). Forwards toapply_tempo_envelope(); acts on the currently active clock. Raises NoActiveClockError if there is no active clock.- Parameters:
envelope – the tempo envelope to apply (under the hood a beat-length-over-beats curve).
truncate – if
True, discard any tempo curve already scheduled past the current beat first.loop – if
True, repeat the envelope indefinitely until stopped withstop_tempo_loop_or_function().