lilypond-devel
[Top][All Lists]

## grace timing

 From: Han-Wen Nienhuys Subject: grace timing Date: Mon, 11 Oct 2004 21:04:21 +0200

```address@hidden writes:
> the beat; it feels strange that the beginning of a beat in some sense is
> negative sometimes (though it's just infinitesimally). I have an idea of
> another timing system that would feel more logical: We could use a metric
> similar to the following (in terms of non-standard analysis).
>
> time:  0       0+w-w*w*3/8 0+w-w*w*2/8 0+w-w*w*1/8  0+w  1/4+w  1/2      1/2+w
> {    | \clef G \grace {c8[ d           e]}          e4   d      \clef F  c }
>
> , where w is a fix, positive, infinitesimal number. Does this make any sense?
>
> Basically, each moment in time would be on the form (Q + w - w*w*P), where Q
> is a nonnegative rational and P is either a nonnegative rational or 1/w.
>
> (I think I suggested something similar earlier, but didn't get any
> feedback..
>
> does it sound sensible to use this kind of system?

No, not yet. What happens with

c4 \grace { c8 \clef bass c8 }   c4

When does the clef start?

Except for having the beat-start be a separate moment, I think that
your system is equivalent with the current code, but shifted by an
amount w.  In what sense does it solve the current problems?

If you want to wrestle with this, then take a look at

input/test/grace-nest-*

The hairy thing is that you have a Sequential_iterator that just sees

{ <music> <music> <music> <music> }

where <music> can be arbitrary.

It's easy when <music> is always either a grace note or a normal one,
but what do you do when <music> itself is sequential?  In other words,
how do you make sure that given

<< { \grace c16 c4 }
{ c4 \grace c16 }
{(+) c4 {(*) \grace g16 c4 } c4 }
>>

the call

Music_iterator::process (1/4 - G1/16)

will do the g16, without the iterator for (+) looking inside the
sequential music marked by (*)

--
Han-Wen Nienhuys   |   address@hidden   |   http://www.xs4all.nl/~hanwen

```