symusic.factory.TimeUnitFactory

class TimeUnitFactory[source]

Bases: object

User-facing dispatcher for the nanobind symusic.core time unit singletons.

The factory caches Tick/Quarter/Second instances, exposes them via properties, and normalizes both string inputs and already-instantiated units through the __call__ helper so downstream APIs can accept flexible values without duplicating validation logic.

__init__() None[source]

Methods

__init__()

from_str(ttype)

Attributes

from_str(ttype: str) TimeUnit[source]
property quarter: Quarter
property second: Second
property tick: Tick