hold

Function
hold(
    states: Union[State, List[State]],
    at: Union[float, List[float], NoneType] = None,
    duration: Optional[float] = None
) -> List[KeyState]

Hold at state(s) for a duration, centered at 'at'.

Creates two identical keystates bracketing each hold period.

Parameters

state
State to hold, or list of states
at
Center time of the hold, or list of times (same length as states)
dur
Total duration of each hold

Returns

List of KeyState objects

Examples

# Single state hold
    .segment(hold(s, at=0.5, dur=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], dur=0.1))
    # Expands to 6 keystates (2 per state)