clockblocks.utilities.apply_tempo_envelope

clockblocks.utilities.apply_tempo_envelope(envelope: TempoEnvelope, truncate: bool = True, loop: bool = False) → None[source]

Append a ready-made TempoEnvelope onto the current clock’s tempo curve. This is the way to loop a tempo shape (a TempoEnvelope is defined over beats, so it loops unambiguously). Forwards to apply_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 with stop_tempo_loop_or_function().