clockblocks.utilities.set_rate_target
- clockblocks.utilities.set_rate_target(rate_target: float, when: ResolvableMoment, curve_shape: float = None, truncate: bool = True, align_to: ResolvableMoment = None) None[source]
Smoothly change the current clock’s rate to
rate_target(in beats per second), arriving atwhen. Forwards toset_rate_target()on the currently active clock. Raises NoActiveClockError if there is no active clock.- Parameters:
rate_target – the rate to arrive at, in beats per second.
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_rate_target().