lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 787 in lilypond: script stack order fails with 2 more notes


From: Neil Puttock
Subject: Re: Issue 787 in lilypond: script stack order fails with 2 more notes
Date: Wed, 2 Dec 2009 23:18:03 +0000

2009/12/2 Carl Sorensen <address@hidden>:

> Oh, I had misunderstood.  Actually, according to gdb, the \turn has a
> script-priority of 0.

Oops, of course, since it's the only Script in the stack.

>
>>
>>> Does this mean we need to establish the outside-staff-priority for *all*
>>> scripts?
>>
>> No, since some aren't outside staff objects.  We could add
>> script-priority defaults for all scripts, but I don't think even
>> that's necessary if we can explain the behaviour properly in the docs.
>
> In order to do the proper explanation, it seems to me we need to be clear on
> three things:
>
> 1) Stacking priority depends on outside-staff-priority if it's present
> 2) If not, it depends on script-priority

Agreed.

> In the NR, I can find 1.3.1 Articulations and ornamentations, which appear
> to be Script or TextScript objects (I'm not sure how to decide which -- both
> are cross-referenced to the IR).

All articulations are Script objects; markup and bare strings are TextScripts.

> In the IR, Scripts have neither a staff-priority nor an
> outside-staff-priority listed.  But it does list the grob-interface, which
> has outside-staff-priority property.

The majority of Scripts rely on the Script_engraver to set
script-priority, but there are a few cases where an explicit setting
is required (I guess the main example here would be staccato, which
must always be glued to the notehead, no matter what else is added),
so they're set in script.scm (and modified slightly in the engraver).

The engraver sets the priority in make_script_from_event (), which
runs through the list of articulations (ignoring direction).  If
there's no default, it gives the script a value based on its index in
the scripts_ vector (which effectively means starting from 0, working
up through the acknowledged grobs); otherwise it's (script-priority +
index).

So for the following example, we'd expect the priorities to be (0, 2001),

c4\turn \trill

whereas flipping the order results in (2000, 1).

I think there's an exception if the scripts are inside a chord: then
they're lumped together with fingerings/string numbers and the
indexing is only applied if there's no default script-priority.

>
> Also in the IR, TextScripts have outside-staff-priority of 450 and
> script-priority of 200.

I think the outside-staff-priority is fixed in this case, but the
script-priority starts at 200 and follows the same procedure as
detailed above.

Regards,
Neil




reply via email to

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