lilypond-user
[Top][All Lists]
Advanced

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

Re: How to get irrational tuplets inside a regular meter like 9/8


From: David Kastrup
Subject: Re: How to get irrational tuplets inside a regular meter like 9/8
Date: Wed, 09 Nov 2016 00:45:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

mclaren <address@hidden> writes:

> Whatever Lilypond is doing internally, there's some arbitrary limit to the
> numbers it uses. Time signatures above some large value cause a crash. Too
> many tuplets of too many different kinds causes Lilypond to crash. 
>
> There's no reason for that. None whatever.

Since you know how it is done right, your patches are awaited eagerly.

> A competent programmer would not impose some arbitrary limit on
> internal number values, other than floating point overflow, or 64-bit
> integer limits. It seems safe to say that a 64-bit integer is going to
> allow any time signature a user might conceivably need.

Reality check: LilyPond does use 64bit numbers for the constituents of
its rational numbers.  Its rational numbers were conceived before Guile
gained its own "arbitrary" precision arithmetic.

Its just that 64bit numbers are exhausted pretty fast if you start
adding numbers with unrelated denominators.

Your "it seems safe to say" statement is exactly underlying LilyPond's
implementation.

> Instead, when you get to time signature above a few thousand, Lilypond
> crashes and gives an error.

Above a few thousand _what_?  LilyPond does not have a problem with such
time signatures, but if you keep adding material with _different_
denominators into it, the resulting fraction elements and/or the
intermediate results when manipulating them exceed the 64bit range.

> That's stupid, because adding broken tuplets inside a measure quickly
> increases the time signature. A quick Fermi estimate shows that if you
> use prime number tuplets, you're going to get a time signature roughly
> on the order of whatever prime number you're using factorial times a
> few thousand.  Since 10 factor is more than a mllion, using tuplets
> from (say) 3 through 23 is going to give you a time signature in the
> ballpark of 23*19*17*13*11*7*5*3 times several thousand.  That value
> is ~ 111,546,435*10,000, or slightly over a trillion. Anyone who knows
> anything about how broken tuplets work will recognize instantly that
> when you've got 7 or 8 or 10 prime numbers, finding the lowest common
> denominator is going to produce large numbers very quickly. That's 3rd
> grade arithmetic. Didn't the programmers who worked on Lilypond's
> internal ever pass 3rd grade arithmetic?

You mean, the programmers implementing exactly the reasoning you give
yourself?

> The point is that whatever Lilypond is doing internally, on a computer
> with 64 bit integers, there is absolutely no reason whatsoever to
> arbitrarily limit Lilypond to some small internal value such that the
> program crashes when you try to enter a time signature above a few
> thousand. That's ridiculous.

Uh, do you understand what fractions are?  Basically you are ranting at
your own statements here and it looks silly.

> Reality check: programmers are ont in the business of telling
> composers how they should compose. Programmers should be in the
> business of getting the computer to represent the kinds of notatoins
> that musicians use.

You still don't understand.  There are not two different classes of
people working on or with LilyPond.  Stuff that people (who usually are
both musicians and programmers to various degree) want to do they might
do.

Your rants make for really piss-poor motivational material however.
I actually happen to have a (pretty stale) branch where I started
replacing the use of the home-brewn rationals in musical moments with
Guile's "arbitrary" precision ones.  I can send it to you and you can
try to continue working on it.  It is a whole lot of work, though, and
integrating it with garbage collection is not going to be small feat.

There are a lot of things in LilyPond that have not been implemented
because nobody could be found who cared enough to go through with it.
If it is important to you and you don't feel up to do it yourself, you
may want to set a bounty on that feature.  However, for a large-scale
task like that, an amount that would be alone motivation enough to do it
will not exactly be small.  And your communication style does not
exactly provide additional motivation or an incentive to pool resources
with you.

You are so much more smart than everybody else, so why don't you do it
yourself?

-- 
David Kastrup



reply via email to

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