Skip to main content

Module meter

Module meter 

Source
Expand description

Minimal MIDI import/export helpers. Time signatures, ported from music21’s meter package.

TimeSignature covers the part of music21’s meter handling that is a pure function of the numerator and denominator: how long a bar is, how many beats it carries, how long each beat is, and how that beat subdivides.

music21 derives all of this from a MeterSequence partition tree that also drives beaming, display sequences and accent weighting. Only the partition result is ported here — the tree’s other consumers have no counterpart in this crate yet, and building the tree to read one number back off it would be the transliterated machinery the repository guidance warns against. The partition rule itself is music21’s _setDefaultBeatPartitions, verified against upstream by the meter_parity fixture.

Structs§

TimeSignature
A time signature, such as 4/4 or 6/8.

Enums§

BeatDivision
How the beat of a meter subdivides.