lilypond-devel
[Top][All Lists]
Advanced

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

Re: PATCH: Refactor script-column.cc for improved reading and fewer line


From: Carl Sorensen
Subject: Re: PATCH: Refactor script-column.cc for improved reading and fewer lines
Date: Sat, 5 Dec 2009 07:38:58 -0700



On 12/5/09 2:56 AM, "Trevor Daniels" <address@hidden> wrote:

> 
> 
> Carl Sorensen wrote Friday, December 04, 2009 6:53 PM
> 
>> On 12/4/09 9:24 AM, "David Kastrup" <address@hidden> wrote:
>> 
>> 
>>> Could you describe in simple words what the behavior is supposed
>>> to
>>> achieve?  If you do that, I promise to submit some simple code
>>> that does
>>> that.
>>> 
>> 
>> Take three text_scripts, all with outside_staff_priority of 450,
>> and with
>> script_priorities of 201, 202, 203.
>> 
>> Convert them to three text_scripts with outside_staff_priorities
>> of 450,
>> 451, 452, so that the script_priority is moved to outside_staff
>> priority.
> 
> What would happen if there was a TextScript at the same
> moment with an 'outside-staff-priority of 451, set by
> the user?

The only way to have a TextScript at the same moment with an
'outside-staff-priority of 451 is to use \tweak for the particular
'outside-staff-priority, e.g.

c4^"1"^"2"\tweak #'outside-staff-priority #451 ^"3"

If \tweak is not done, all TextScripts at that moment will have the same
outside-staff-priority, and script-priority will determine the relative
ordering of the TextScripts.

Anybody who wants to do this can deal with the consequences; this would be
an advanced user.  If you're going to get into \tweaks, you need to be
prepared to deal with the complexity of LilyPond.

A look at your table in the learning manual shows that the different
outside-staff-priority values vary by 50.  So if we had 51 TextScripts, then
the outside-staff-priority would have an issue.  But if we had 51
TextScripts, then I'm fairly certain that there would be lots of issues.

But in the interest of the simplest code that provides the desired
functionality, I've changed the code to have the outside-staff-priorities in
the above example be 450, 450.1, 450.2.

Of course, the question could now be phrased "What happens if a user set an
'outside-staff-priority of 450.2?"

Thanks,

Carl





reply via email to

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