lilypond-user
[Top][All Lists]
Advanced

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

Re: SOLVED: going backwards in time


From: Adam James Wilson
Subject: Re: SOLVED: going backwards in time
Date: Fri, 5 Sep 2008 17:14:00 -0700

Hi Han-Wen,

Thanks for the reply.  The example I sent was actually a quite simplified version of what I'm attempting to do; there is a real possibility that in my actual scores I will cause the 64-bit 'long long' numbers to overflow as well.  As you mentioned yourself before, I think the airtight solution is to use rationals or arbitrary precision.

How badly would such an overhaul complicate memory management?  Isn't much of this taken care of automatically in GUILE?

I'm willing to sponsor someone to put in the fix, whatever it takes to get my music to render.  I've invested a couple of years now into lily; it is really the only game in town that comes close to allowing me to do what I want.

Best regards,
Adam

On Fri, Sep 5, 2008 at 4:37 PM, Han-Wen Nienhuys <address@hidden> wrote:
I think the easiest approach is to simply move to 'long long' for the
rational class. We could start using GUILE's rationals, but it will
complicate memory management, so I think it's not worth the trouble.

Anyone for a patch?

On Thu, Sep 4, 2008 at 6:01 PM, Adam James Wilson
<address@hidden> wrote:
> It looks like I'm going down a road of rhythmic complexity that breaks
> Lilypond rendering in the absence of arbitrary precision arithmetic.
> Han-Wen: would it be possible for me to sponsor a move to arbitrary
> precision arithmetic?  As you say, GUILE does support this option, and it
> would be possible to select it with some sort of flag so that other users
> wouldn't take the performance hit.  Such a fix would be necessary for me to
> use Lilypond to fully render my scores (I can render only a few pages at the
> moment).
> My scores typically require things like the example below, which breaks with
> an "unterminated beam" error, and I *think* it is exceeding 32-bit precision
> (I'm assuming that Lily is using lowest common multiple of denominators to
> deal with resolution):
> \version "2.11.56"
> \layout {
> \context { \Score
> \override NonMusicalPaperColumn #'line-break-permission = ##f
> \override NonMusicalPaperColumn #'page-break-permission = ##f
> \override SpacingSpanner #'uniform-stretching = ##t
> \override SpacingSpanner #'strict-note-spacing = ##t
> proportionalNotationDuration = #(ly:make-moment 1 20)
> ragged-right = ##t
> }
> \context { \Voice
> \remove Forbid_line_break_engraver
> \override Beam #'breakable = ##t
> }
> }
> \new Staff {
> <<
> \new Voice {
> \time 4/1
> c'2.*2351/3696
> \scaleDurations #'(495 . 4336) {
> d'8*11[ \bar "|" \break d'8*100 d'8*100]
> }
> e'1*827949/8012928
> \bar "|"
> \time 3/8
> c'4.
> }
>>>
> }
> %{
> warning: unterminated beam d'8*11[ \bar "|" \break d'8*100 d'8*100]
> [a=3696, b=34688 (denom. of 495/4366*211/8), c=8012928, d=8]
> gcf(a,b,c,d) = 8
> lcm(a,b,c,d) = 1027312242130944
> 32-bit precision maxes out at 4.3 billion (less than the lcm above)
> 64-bit is more like 18.4 quintillion
> %}





reply via email to

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