bug-lilypond
[Top][All Lists]

## Re: grace synchronization

 From: Hans Aberg Subject: Re: grace synchronization Date: Sat, 27 Aug 2011 01:31:43 +0200

```On 27 Aug 2011, at 00:51, Reinhold Kainhofer wrote:

> On Fr., 26. Aug. 2011 23:32:39 CEST, David Kastrup <address@hidden> wrote:
>
>> I checked around, and Rationals (which are used for time) have a
>> representation of -inf.   I think it would be a good start if the default
>> grace time component (namely when no grace is present) was not set to 0,
>> but to -inf, meaning everything comes before graces.   Except those
>> things that are actually preceded by graces.
>
> Sounds reasonable.
> But of course, then we run into the opposite problem: What if one voice has a
> time sig between the grace and the note (grace moment 0), while another voice
> has the corresponding time sig before the note without any grace (i.e.-inf)...

If you have a series of negative infinitesimal values before each event, with
preferences of the sort "always put this before that", ordinals might be used
to describe it. Formally using pairs (r, x), where r is a Rational, and x an
ordinal. See
http://en.wikipedia.org/wiki/Ordinal_number

You would only a small subset of the ordinal, enough to express those
preferences. Then x = 0, the first ordinal, would be the time of the note, or
last thing to output. Higher ordinals would be infinitesimal times before that.

Hans

```