Spell a length in beats as a chain of tied note values.
A length with a single spelling comes back as a one-element chain. Anything
else is broken into undotted values, longest first, and a value immediately
followed by its own half is then written as a dot instead: 5 beats reads as a
whole note tied to a quarter, and 1.9375 beats as a double-dotted quarter tied
to a dotted thirty-second. The dot is only written where it leaves the chain
in longest-first order, so 10 beats reads as two whole notes tied to a half
rather than as a whole note tied to a longer dotted whole. The chain knows
nothing of barlines or beat grouping — an engraver splits further at those —
and it uses no tuplets, so a length off the plain grid and with no single
spelling has no chain either.
The tied durations, longest first, summing to beats.
Throws
If beats is not positive, if the chain would exceed the generation
budget, or — as a NoSolutionError — if no chain of plain and dotted values
sums to it.
Spell a length in beats as a chain of tied note values.
A length with a single spelling comes back as a one-element chain. Anything else is broken into undotted values, longest first, and a value immediately followed by its own half is then written as a dot instead: 5 beats reads as a whole note tied to a quarter, and 1.9375 beats as a double-dotted quarter tied to a dotted thirty-second. The dot is only written where it leaves the chain in longest-first order, so 10 beats reads as two whole notes tied to a half rather than as a whole note tied to a longer dotted whole. The chain knows nothing of barlines or beat grouping — an engraver splits further at those — and it uses no tuplets, so a length off the plain grid and with no single spelling has no chain either.