clocks¶
- class AsyncClock¶
Bases:
BaseClock[AsyncClockCallback]An async clock.
-
async start(initial_time: float | None =
None, initial_offset: float =0.0, initial_measure: int =1, beats_per_minute: float | None =None, time_signature: tuple[int, int] | None =None) None¶
-
async start(initial_time: float | None =
- class AsyncOfflineClock¶
Bases:
AsyncClock-
at(initial_time: float | None =
None, initial_offset: float =0.0, initial_measure: int =1, beats_per_minute: float | None =None, time_signature: tuple[int, int] | None =None) AsyncGenerator[AsyncOfflineClock, None]¶
-
async start(initial_time: float | None =
None, initial_offset: float =0.0, initial_measure: int =1, beats_per_minute: float | None =None, time_signature: tuple[int, int] | None =None) None¶
-
at(initial_time: float | None =
- class BaseClock¶
Bases:
Generic[C]-
change(beats_per_minute: float | None =
None, time_signature: tuple[int, int] | None =None) int | None¶
-
cue(procedure: C, 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, *, args: Sequence[Any] | None =None, event_type: int =EventType.SCHEDULE, kwargs: dict[str, Any] | None =None) int¶
-
cue_change(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, *, beats_per_minute: float | 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, schedule_at: float =
0.0, *, args: Sequence[Any] | None =None, event_type: int =EventType.SCHEDULE, kwargs: dict[str, Any] | None =None, time_unit: TimeUnit =TimeUnit.BEATS) int¶
-
schedule_change(schedule_at: float =
0.0, *, beats_per_minute: float | None =None, time_signature: tuple[int, int] | None =None, time_unit: TimeUnit =TimeUnit.BEATS) int¶
-
change(beats_per_minute: float | None =
- 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.TimeUnit | None, args: tuple | None, kwargs: dict | None, procedure: supriya.clocks.AsyncClockCallback | supriya.clocks.ClockCallback)¶
Bases:
Command
- class CallbackEvent(event_id: int, event_type: int, seconds: float, measure: int | None, offset: float | None, procedure: supriya.clocks.AsyncClockCallback | supriya.clocks.ClockCallback, args: tuple | None, kwargs: dict | None, invocations: int)¶
Bases:
Event
- 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.TimeUnit | None, beats_per_minute: float | None, time_signature: tuple[int, int] | None)¶
Bases:
Command
- 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
- class Clock¶
Bases:
BaseClock[ClockCallback]A threaded clock.
-
start(initial_time: float | None =
None, initial_offset: float =0.0, initial_measure: int =1, beats_per_minute: float | None =None, time_signature: tuple[int, int] | None =None) None¶
-
start(initial_time: float | None =
- class ClockCallbackState(current_moment, desired_moment, event)¶
Bases:
NamedTuple
- class ClockState(beats_per_minute, initial_seconds, previous_measure, previous_offset, previous_seconds, previous_time_signature_change_offset, time_signature)¶
Bases:
NamedTuple
- 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.TimeUnit | None)¶
Bases:
Action
- class Event(event_id: int, event_type: int, seconds: float, measure: int | None, offset: float | None)¶
Bases:
Action
- class Moment(beats_per_minute: float, measure: int, measure_offset: float, offset: float, seconds: float, time_signature: tuple[int, int])¶
Bases:
object
- class OfflineClock¶
Bases:
BaseClock[ClockCallback]An offline clock.
-
at(initial_time: float | None =
None, initial_offset: float =0.0, initial_measure: int =1, beats_per_minute: float | None =None, time_signature: tuple[int, int] | None =None) Generator[OfflineClock, None, None]¶
-
start(initial_time: float | None =
None, initial_offset: float =0.0, initial_measure: int =1, beats_per_minute: float | None =None, time_signature: tuple[int, int] | None =None) None¶
-
at(initial_time: float | None =