hold
Functionhold(
states: State | list[State],
at: float | list[float] | None = None,
duration: float | None = None
) -> list[KeyState]
Hold at state(s) for a duration, centered at 'at'.
Creates two identical keystates bracketing each hold period.
Parameters
-
states - State to hold, or list of states.
-
at - Center time of the hold, or list of times (same length as states).
-
duration - Total duration of each hold.
Examples
# Single state hold
.segment(hold(s, at=0.5, duration=0.1))
# Expands to keystates at t=0.45 and t=0.55
# Multiple states with different times
.segment(hold([s1, s2, s3], at=[0.2, 0.5, 0.8], duration=0.1))
# Expands to 6 keystates (2 per state)