# Rewrite durations of selected music based on given fraction

• Jun 12, 2024 - 02:35

Been discussed before to some extent (a long time ago: https://musescore.org/en/node/72716), and obviously partly available via "paste half/double durations", but I'd like a more explicit feature that allows me to select a range of music (including time signatures/tempos etc.) and specify a fraction by which to multiple all durations. That fraction could be 1/2 or 1/3 or 3/2 etc.
So I could, in principle, select a range of music at q=100 in 4/4 and specify "rewrite at 2/3 of all duration" which would:
a) change the tempo to q=67
b) change the time signatures to 3/4
c) change all non-tuplet notes to 4:3 tuplets, and any existing triplets to non-tuplets (e.g. a measure with 3 1/2 notes in a 3:2 tuplet would become 3 1/4 notes).

Though a more likely scenario is, for instance, to select music written in 12/8 and convert to 2/3s of all durations such that the result is:
a) 4/4 with q=100 (assuming it was dotted quarter [q.] = 100, previously)
b) all undotted notes become triplets
c) all dotted notes have their dots removed

Note that b) and c) assume nothing silly like dotted notes occurring across the beat, but the existing "regroup rhythms" logic ensures this anyway. So if I happened to write (in 12/8), 1/4 note, dotted 1/4, 1/8 note, it would rewrite it as two pairs of "triplet 1/4 note 1/8 note", with a tie between them.

Presumably it wouldn't be legal in most cases to do things like "multiply by 5/7", though if the time signature were a multiple of 7 it's quite possible!
And if you chose, say, "multiply by 1/7" but selected less than 7 measures, it would presumably have to pad out the rest of the tuplet with rests.
Note that 1/7 the time signature would not change - but e.g. if the first measure were 2/4, then the first 14 1/4 notes would have to be compressed into a 7:4 tuplet into a 2/4 measure. Then you'd move on to the next chunk etc.

I'd be fine if this could be readily done by a plug-in, but I think it's worth considering including as native functionality.