clockblocks.utilities.set_beat_length_target
- clockblocks.utilities.set_beat_length_target(beat_length_target: float, when: ResolvableMoment, curve_shape: float = None, truncate: bool = True, align_to: ResolvableMoment = None) None[source]
Smoothly change the current clock’s beat length to
beat_length_target(in seconds per beat), arriving atwhen. Forwards toset_beat_length_target()on the currently active clock. Raises NoActiveClockError if there is no active clock.- Parameters:
beat_length_target – the beat length to arrive at, in seconds per beat.
when – when the target is reached, as a
MomentorMetricPhaseTarget.curve_shape – the bend of the transition:
0is linear,> 0changes late,< 0early.truncate – if
True, discard any tempo curve already scheduled past the current beat first.align_to – optional; solve the curvature to land the free axis on a phase or coordinate. See
set_beat_length_target().