TemporalElement

TemporalElement()

Any class that represents a structured period of time. For example: note durations, measures, beat cycles, gong cycles, and other units of time.

Any internally-consistent rhythmic/temporal system should be constructable using subclasses of TemporalElement and Duration.

The base contract is only that an element belongs to a TemporalSystem. How elements compare is the system’s business: systems whose elements reduce to a single number use Measurable, which supplies comparison, hashing and scaling from that number; systems whose elements do not (a chant notation, say) define their own comparison, or none.

>>> from openmusickit.systems.wsmn.temporal.symbols import quarter, four_four
>>> isinstance(quarter, TemporalElement), isinstance(four_four, TemporalElement)
(True, True)
>>> quarter.temporal_system is four_four.temporal_system
True

Attributes

Name Description
__slots__
temporal_system The TemporalSystem this element belongs to (for introspection and compatibility checks).