lilypond-devel
[Top][All Lists]
Advanced

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

Re: 'avoid-slur proposals


From: Neil Puttock
Subject: Re: 'avoid-slur proposals
Date: Mon, 13 Apr 2009 19:35:31 +0100

2009/4/11 Mark Polesky <address@hidden>:
>
> Neil Puttock wrote:
>> >   Why does Slur have an 'avoid-slur property?
>> So they avoid phrasing slurs.
>>
>> \relative c' {
>>   \override Slur #'avoid-slur = #'outside
>>   c\( d( e) f\)
>> }
>
> Okay, but the semantics are contradictory. One could think
> of the command in your example in two different ways:
> Adjust the slur to keep the slur outside the phrasing-slur.
> -or-
> Adjust the slur to keep the phrasing-slur inside the slur.

You can see why avoid-slur is accompanied by `ugh'. ;)

It's the former meaning; you have to imagine avoid-slur actually means
avoid-(phrasing-)slur.

> Neither is reflected with the current syntax. Either of
> these (non-functioning) commands would be clearer:
> \override Slur #'avoid-phrasing-slur = #'outside

Adding avoid-phrasing-slur would mean duplicating all the slur
avoidance code just for the sake of a different name.

> \override PhrasingSlur #'avoid-slur = #'inside

No.  The acknowledged object (Slur) does the avoidance.  Since it's
fair to assume that phrasing slurs always encompass slurs, there's no
reason for the Slur_engraver to acknowledge phrasing slurs.

> As a kludge, we could add an exception clause to the
> docstring, but ideally that's the wrong solution IMO.
>
> Lastly, this construct is also semantically lacking:
>  \override Staff.Clef #'avoid-slurs = ##f
> It's really the slur that's avoiding the clef. This
> would be more intuitive:
> \override Slur #'ignore-clefs = ##t(default would be #f)
> ...but that would be a terrible idea, because you'd want
> 'ignore-time-signatures, 'ignore-key-signatures, etc...

I agree it's not ideal, but it probably arises from the fact that the
avoid-slur infrastructure was already in place when the non-musical
avoidance code was added;  I imagine it was much easier to rely on the
existing code to do the avoidance work, rather than implementing an
additional framework just for clefs, time signatures and key
signatures.

> Maybe something like this would be ideal:
> \override Slur #'avoid-list =
>  #'(clef key-signature time-signature ...)
> Maybe not exactly that, but something like it? And then
> you could do the same thing for Tie andPhrasingSlur.

That list would get very long if it included the grobs which are
currently acknowledged. :)  It would probably only work as a context
property, otherwise you couldn't be sure that avoidance code has
access to the grobs which need avoiding.

>> > 2. add a choice: 'ignore
>> Sounds like a good idea, and only requires one extra
>> line of code...
>
> Don't let me stop you! (:

Why the sad face?  I'm waiting for your patch to the IR for 'avoid-slur. :)

>> > 4. implement 'avoid-ties and 'avoid-phrasing-slurs?
>> Judging by the number of `ugh' comments related to
>> avoid-slur in the source, extending the same behaviour
> < to ties is probably undesirable (though it would be
>> good if they avoided clefs and time signatures).
>
> Only if the user could choose.

Oh, definitely; you could imagine the typesetting horrors if the
avoidance were as broken as the current behaviour over line breaks.

Regards,
Neil




reply via email to

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