Skip to main content

quarter_length_to_non_power_of_2_tuplet

Function quarter_length_to_non_power_of_2_tuplet 

Source
pub fn quarter_length_to_non_power_of_2_tuplet(
    quarter_length: FloatType,
) -> Option<(Tuplet, DurationType, u32)>
Expand description

The one enormous tuplet music21 falls back on for a length no tie of written values reaches: its quarterLengthToNonPowerOf2Tuplet.

Any length can be written as a single note inside a strange enough tuplet — 53/25 of a quarter is a whole note in a tuplet of a hundred in the time of fifty-three — and music21 tries that before it calls a length inexpressible. The answer is the tuplet together with the note value and dots written inside it, or nothing for a length that defeats even that.