neoscore.western.meter

class neoscore.western.meter.Meter[source]

Bases: object

A time signature graphical meter comprising two lists of glyphs.

Users are recommended to use the Meter.numeric() constructor, which provides a convenient way to create standard meters. The direct constructor is mostly useful for writing more exotic meters, supporting arbitrary glyphs.

If only a single line of text is needed for the meter (as with the common time “C”), it should go in upper_text_glyph_names and lower_text_glyph_names should be left empty.

upper_text_glyph_names: List[str]
lower_text_glyph_names: List[str]
classmethod numeric(upper: Union[int | List[int]], lower: int) Meter[source]

Create a meter with upper and lower numbers.

The upper number can be a single number, or a list of them.

Lists of numbers will be treated as additive time signatures where each upper number is joined by a plus sign. This is useful for time signatures like [3 + 2 + 3] / 8.

classmethod from_def(meter_def: MeterDef) Meter[source]
__init__(upper_text_glyph_names: List[str], lower_text_glyph_names: List[str]) None
neoscore.western.meter.MeterDef

Shorthand for Meter.

Either a Meter, or an argument tuple for Meter.numeric.

alias of Union[Meter, Tuple[Union[int, List[int]], int]]