pub fn quarter_length_to_tuplet(
quarter_length: FloatType,
max_to_return: usize,
) -> Vec<Tuplet>Expand description
The tuplets a length can be written as, shortest note value first:
music21’s quarterLengthToTuplet, stopping after max_to_return of
them.
The search walks the note values from shortest to longest and, for each, tries every tuplet numerator and every count of them that fits. Order is what decides the answer: two thirds of a quarter matches a quarter in a triplet before it matches anything longer, which is why music21 calls it a quarter triplet and not two eighth triplets. Dotted tuplets are found; nested ones and four in the time of three are not, the latter being a dotted note.