Expand description
Time signatures: bar length, beat count, beat length and beat division.
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, and so
does this: a meter carries the four sequences music21 hangs off one — the
display, the beats, the beams and the accents — and answers from them.
TimeSignature::beams_for beams a run of notes against the beam
sequence, and the weights come off the accent sequence, so a caller who
sets them reads their own back. The partition rule is music21’s
_setDefaultBeatPartitions, verified
against upstream by the meter_parity fixture.
Re-exports§
pub use sequence::MeterTerminal;pub use sequence::OffsetAlign;
Modules§
- sequence
- How a bar divides: music21’s
MeterTerminalandMeterSequence.
Structs§
- Beamed
Note - One of a run of notes to be beamed: where it sits in the bar, how long it lasts, what it is written as, and whether it sounds.
- Time
Signature - A time signature, such as
4/4or6/8.
Enums§
- Beat
Division - How the beat of a meter subdivides.
Functions§
- best_
time_ signature - The time signature that fits what a measure holds: music21’s
bestTimeSignature. - snapped_
fraction - A fractional beat read as the fraction it suggests: music21’s
addFloatPrecision, which snaps a third, two thirds, a sixth or five sixths written as decimals onto the fraction itself.