|
From: | Joseph Rushton Wakeling |
Subject: | Re: [proposal] easy triplets and tuplets - Draft 3 |
Date: | Mon, 08 Oct 2012 11:53:18 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20121003 Thunderbird/15.0.1 |
On 10/08/2012 01:03 AM, Reinhold Kainhofer wrote:
Actually, thinking of it, it would actually be quite simple to calculate the displayed fraction with durations from the given durations and the tuplet fraction (except that there is no way to distinguish 3:2 and 4:6). (m*dur1):(n*dur2) = tuplet fraction can be easily solved as m/n = (tuplet fraction)*dur2/dur1 and then reduced to minimal m and n. This could then be displayed as m{dur1}:n{dur2}
Do you need to reduce to minimal m and n? If you have m and n as given, then you can say, "OK, what's the total 'interior' duration of this tuplet divided by m, what's the total 'exterior' duration of this tuplet divided by n?"
In both cases that should come out as a "standard" note (1, 2, 4, 8, 16, ... or their dotted equivalents). If we take the simple case, it should be identical for both divisions, and you could throw a warning or error if it's not.
That probably covers most use-cases, since I don't think there's really a lot of m{dur1}:n{dur2} about in reality; m{dur1}:{dur2}, maybe.
[Prev in Thread] | Current Thread | [Next in Thread] |