core

class Action(event_id: int, event_type: int)

Bases: object

__replace__(**changes)
class AsyncClockCallback(*args, **kwargs)

Bases: Protocol

__call__(context: ClockContext, *args: Any, **kwargs: Any) Awaitable[float | tuple[float, TimeUnit] | None] | float | tuple[float, TimeUnit] | None

Call self as a function.

class BaseClock

Bases: Generic[C]

cancel(event_id: int) Action | None
change(beats_per_minute: float | None = None, time_signature: tuple[int, int] | None = None) int | None
cue(procedure: C, *, args: Sequence[Any] | None = None, event_type: int = EventType.SCHEDULE, kwargs: dict[str, Any] | None = None, quantization: '8M' | '4M' | '2M' | '1M' | '1/2' | '1/2T' | '1/4' | '1/4T' | '1/8' | '1/8T' | '1/16' | '1/16T' | '1/32' | '1/32T' | '1/64' | '1/64T' | '1/128' | None = None) int
cue_change(*, beats_per_minute: float | None = None, quantization: '8M' | '4M' | '2M' | '1M' | '1/2' | '1/2T' | '1/4' | '1/4T' | '1/8' | '1/8T' | '1/16' | '1/16T' | '1/32' | '1/32T' | '1/64' | '1/64T' | '1/128' | None = None, time_signature: tuple[int, int] | None = None) int
reschedule(event_id: int, *, schedule_at: float = 0.0, time_unit: TimeUnit = TimeUnit.BEATS) int | None
schedule(procedure: C, *, args: Sequence[Any] | None = None, event_type: int = EventType.SCHEDULE, kwargs: dict[str, Any] | None = None, schedule_at: float = 0.0, time_unit: TimeUnit = TimeUnit.BEATS) int
schedule_change(*, beats_per_minute: float | None = None, schedule_at: float = 0.0, time_signature: tuple[int, int] | None = None, time_unit: TimeUnit = TimeUnit.BEATS) int
property beats_per_minute : float
property is_running : bool
property name : str | None
property slop : float
property time_signature : tuple[int, int]
class CallbackCommand(event_id: int, event_type: int, quantization: '8M' | '4M' | '2M' | '1M' | '1/2' | '1/2T' | '1/4' | '1/4T' | '1/8' | '1/8T' | '1/16' | '1/16T' | '1/32' | '1/32T' | '1/64' | '1/64T' | '1/128' | None, schedule_at: float, time_unit: supriya.clocks.core.TimeUnit | None, args: tuple | None, kwargs: dict | None, procedure: supriya.clocks.core.AsyncClockCallback | supriya.clocks.core.ClockCallback)

Bases: Command

__replace__(**changes)
class CallbackEvent(event_id: int, event_type: int, seconds: float, measure: int | None, offset: float | None, procedure: supriya.clocks.core.AsyncClockCallback | supriya.clocks.core.ClockCallback, args: tuple | None, kwargs: dict | None, invocations: int)

Bases: Event

__replace__(**changes)
class ChangeCommand(event_id: int, event_type: int, quantization: '8M' | '4M' | '2M' | '1M' | '1/2' | '1/2T' | '1/4' | '1/4T' | '1/8' | '1/8T' | '1/16' | '1/16T' | '1/32' | '1/32T' | '1/64' | '1/64T' | '1/128' | None, schedule_at: float, time_unit: supriya.clocks.core.TimeUnit | None, beats_per_minute: float | None, time_signature: tuple[int, int] | None)

Bases: Command

__replace__(**changes)
class ChangeEvent(event_id: int, event_type: int, seconds: float, measure: int | None, offset: float | None, beats_per_minute: float | None, time_signature: tuple[int, int] | None)

Bases: Event

__replace__(**changes)
class ClockCallback(*args, **kwargs)

Bases: Protocol

__call__(context: ClockContext, *args: Any, **kwargs: Any) float | tuple[float, TimeUnit] | None

Call self as a function.

class ClockContext(current_moment, desired_moment, event)

Bases: NamedTuple

__replace__(**kwds)

Return a new ClockContext object replacing specified fields with new values

class ClockState(beats_per_minute, initial_seconds, previous_measure, previous_offset, previous_seconds, previous_time_signature_change_offset, time_signature)

Bases: NamedTuple

__replace__(**kwds)

Return a new ClockState object replacing specified fields with new values

class Command(event_id: int, event_type: int, quantization: '8M' | '4M' | '2M' | '1M' | '1/2' | '1/2T' | '1/4' | '1/4T' | '1/8' | '1/8T' | '1/16' | '1/16T' | '1/32' | '1/32T' | '1/64' | '1/64T' | '1/128' | None, schedule_at: float, time_unit: supriya.clocks.core.TimeUnit | None)

Bases: Action

__replace__(**changes)
class Event(event_id: int, event_type: int, seconds: float, measure: int | None, offset: float | None)

Bases: Action

__ge__(other)

Return a >= b. Computed by @total_ordering from (not a < b).

__gt__(other)

Return a > b. Computed by @total_ordering from (not a < b) and (a != b).

__le__(other)

Return a <= b. Computed by @total_ordering from (a < b) or (a == b).

__lt__(other: object) bool

Return self<value.

__replace__(**changes)
class EventType(*values)

Bases: IntEnum

__format__(format_spec, /)

Convert to a string according to format_spec.

CHANGE = 0
SCHEDULE = 1
class Moment(beats_per_minute: float, measure: int, measure_offset: float, offset: float, seconds: float, time_signature: tuple[int, int])

Bases: object

__replace__(**changes)
class TimeUnit(*values)

Bases: IntEnum

__format__(format_spec, /)

Convert to a string according to format_spec.

BEATS = 0
MEASURES = 2
SECONDS = 1