Skip to main content

Module tools

Module tools 

Source
Expand description

music21’s meter.tools: reading meters written as text, and the ways music21 conventionally divides a meter.

A meter is written 3/8, slow 6/8, 3/8+2/8 or 3+2/8, the last sharing one denominator among the numerators before it. The division options are what super::MeterTerminal::partition_options chooses among, in music21’s order of preference.

Structs§

SlashMeter
A meter read from text: music21’s MeterTerminalTuple.

Enums§

MeterDivision
How a meter’s beat is felt, from the word written before it: music21’s MeterDivision.
SlashError
Why a meter written as text could not be read, each the exception music21 raises, with its message.

Constants§

VALID_DENOMINATORS
The denominators music21 will write a meter in, in order: music21’s validDenominators.

Functions§

additive_multiples
Even groupings in the bar’s own note value: music21’s divisionOptionsAdditiveMultiples, which reads 6/4 as 3/4+3/4.
additive_multiples_downward
A single unit split into smaller ones: music21’s divisionOptionsAdditiveMultiplesDownward, which only ever applies where the numerator is one.
additive_multiples_halved
The bar halved, and halved again while it stays even: music21’s divisionOptionsAdditiveMultiplesEvenDivision. A 4/4 bar reads 1/2+1/2, written in the note value a half of it actually is.
additive_multiples_upward
One unit at a time, then twice as many half as long: music21’s divisionOptionsAdditiveMultiplesUpward, which stops at sixteen parts or at the numerator where that is larger.
division_options_algo
The ways music21 divides a meter, in the order it prefers them, each once: music21’s divisionOptionsAlgo.
division_options_preset
The divisions music21 keeps by hand because no rule produces them: only the two extra readings of a five.
fraction_sum
The sum of ratios, not reduced, so that 3/8 + 3/8 is 6/8: music21’s fractionSum. Unlike denominators meet at their least common multiple, and nothing at all sums to 0/1.
fraction_to_slash_mixed
Ratios as a meter writes them, numerators run together where neighbours share a denominator: music21’s fractionToSlashMixed.
fractions_downward
The same ratio in longer notes, while it stays whole: music21’s divisionOptionsFractionsDownward.
fractions_upward
The same ratio in shorter notes, while the denominator allows: music21’s divisionOptionsFractionsUpward.
proportion_to_fraction
The fraction with a denominator of at most sixteen nearest a proportion: music21’s proportionToFraction. None for a value that is not finite.
slash_compound_to_fraction
A compound meter as the ratio of each of its parts, leaving out a part that is not one: music21’s slashCompoundToFraction.
slash_mixed_to_fraction
A meter written with or without a denominator on each part as the ratio of each part, and whether any numerator borrowed the next denominator, as in 3+2/8: music21’s slashMixedToFraction.
slash_to_tuple
One meter read from text, with the word before it that says how its beat is felt: music21’s slashToTuple.