MeterEvent

MeterEvent(duration: Duration | None = None, meter: Measurable | None = None)

Sets the meter (in WSMN, the time signature) for the material that follows.

A meter is a Measurable: a length of musical time that recurs, and against which the material is organized. In WSMN it is a TimeSignature, one bar with the numbers as printed; a bare TemporalUnit (three quarters), a CompoundTemporalUnit for an additive cycle (the vibhags of a tala, the strokes of a gong cycle), or any other Measurable of a system will do. Music whose time is not measured (chant) has no meter; None means undefined or undecided.

A meter does not place divisions: DivisionEvents do, wherever the author puts them, and a renderer that derives the missing ones from the meter warns where an explicit one disagrees.

>>> from openmusickit.systems.wsmn.temporal.symbols import four_four, two_two, quarter
>>> from openmusickit.values.time.duration import TemporalUnit
>>> MeterEvent(meter=four_four)
MeterEvent(meter=TimeSignature([TemporalUnit(4, MetricalDuration(1, 4))], ('4', '4')))
>>> MeterEvent(meter=TemporalUnit(3, quarter)).meter.rational_length
Fraction(3, 4)
>>> MeterEvent().meter is None
True

Events compare by their meters, and Measurables compare by length, so two events whose time signatures have the same length are equal:

>>> MeterEvent(meter=four_four) == MeterEvent(meter=two_two)
True

Attributes

Name Description
meta
id
duration
meter

Methods

Name Description
__setattr__
alter_duration

__setattr__

__setattr__(name: str, value: Any)

alter_duration

alter_duration(operation: Callable[[Duration, Any], Duration], operand: Any)