lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with scaled durations


From: Oscar Dub
Subject: Re: Problem with scaled durations
Date: Fri, 4 Jan 2013 03:19:36 +0000

Interesting, thanks David!

I think we're agreed that this was a slightly synthetic scenario. In the 
project where I discovered the issue I've worked around the problem by limiting 
the scope of the possible note durations as you. I now using multiples of a 
very small base duration rather than the long nasty rationals – all's good on 
that front.

From a user perspective, I thought it might be nice for the compiler to send 
out some kind of error or warning message. Currently there's no sign of 
anything wrong except the final output. Is this valid enough an issue to be 
worth a quick bug report?

Cheers,

O.

On 2 Jan 2013, at 23:42, David Kastrup <address@hidden> wrote:

> Oscar Dub <address@hidden> writes:
> 
>> Hi everyone,
>> 
>> There appears to be an issue with long lists of differently scaled LilyPond 
>> notes where they fail to display, but leave no trace of a problem in the log 
>> (example below). I'm having difficulty condensing the issue into something 
>> simple enough to send to the bug list, but maybe someone with more insight 
>> into how LilyPond calculates time intervals internally can help out.
>> 
>> I thought the problem had something to do with using too many different 
>> denominators in the fractions used by the scale syntax. To test this idea 
>> out, I made a script generating notes scaled by multipliers from 1/1 to 1/n 
>> (output for n=30 shown below).
>> 
>> Running my file, LilyPond only manages to render up to note 18.
> 
> You calculate 1/4*(1 + 1/2 + 1/3 + 1/4 ... + 1/18)
> 
> If we take a look at the result, it is 14274301:16336320.  Now
> multiplying with 1/(4*19) gives 751279:65345280 and the intermediate
> calculation has a denominator of 1241560320 before coming to shortest
> terms, which is above 2^30.
> 
> Guile rationals can deal with arbitrary precision, but LilyPond has its
> own idea of rational numbers.
> 
> Just try to use numbers that actually add up to somewhat saner values.
> 
> -- 
> David Kastrup
> 
> 
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

[Prev in Thread] Current Thread [Next in Thread]