clockblocks.utilities.set_rate_targets
- clockblocks.utilities.set_rate_targets(rate_targets: Sequence[float], whens: Sequence[ResolvableMoment], curve_shapes: Sequence[float] = None, truncate: bool = True, align_to: ResolvableMoment | Sequence[ResolvableMoment | None] = None) None[source]
Set several rate targets at once, building a multi-segment tempo curve on the current clock. Forwards to
set_rate_targets(); acts on the currently active clock. Raises NoActiveClockError if there is no active clock.- Parameters:
rate_targets – the rate to arrive at for each segment, in beats per second.
whens – the arrival moment for each target (same length as
rate_targets).curve_shapes – optional per-segment curve shapes (same length), or
Nonefor all-linear.truncate – if
True, discard any tempo curve already scheduled past the current beat first.align_to – optional; align whole runs of segments to a phase/coordinate. See
set_beat_length_targets().