lilypond-user
[Top][All Lists]
Advanced

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

Re: multiple TextSpanners per voice


From: David Nalesnik
Subject: Re: multiple TextSpanners per voice
Date: Fri, 2 Oct 2015 17:49:15 -0500



On Fri, Oct 2, 2015 at 12:09 PM, David Nalesnik <address@hidden> wrote:
David,

On Fri, Oct 2, 2015 at 11:26 AM, David Kastrup <address@hidden> wrote:
David Nalesnik <address@hidden> writes:

> Hi all,
>
> I'm experimenting with a way to support multiple text spanners in a single
> voice, using the 'spanner-id property which already enables multiple slurs
> and phrasing slurs.
>
> The attached code works--until the spanners cross a line break.  Then the
> order of the spanners is reversed.  I've experimented with different start
> and end points of the spanners, reversing lists within the engraver--no
> change.
>
> The second example shows that tweaks can mess up this reversed ordering
> even further.
>
> Does anyone know what is happening here?  I really have no idea :(

Sounds like room-saving stacking of elements with equal
outside-staff-priority (?).  Perhaps distribute ascending priorities?


Horizontal_bracket_engraver achieves correct ordering of nested brackets through the side-position-interface array 'side-position-elements.  Brackets closer to the staff are added to the support of brackets further away.  However, this only works because 'outside-staff-priority is set to #f by default.  As soon as you set it to a numerical value, chaos ensues: the initial ordering is flipped AND the brackets flip orientation across line breaks.  (See attached images.)

Try this code:

\version "2.19.27"

\new Staff {
  \override HorizontalBracket.direction = #UP
  \override HorizontalBracket.thickness = 4
  c
  -\tweak color #red 
  \startGroup
  -\tweak color #green
  \startGroup d
  -\tweak color #blue
  \startGroup
  e f
  \break
  c d e f
  c\stopGroup d\stopGroup e d\stopGroup
  \bar "||"
  \override HorizontalBracket.outside-staff-priority = 100
  c
  -\tweak color #red 
  \startGroup
  -\tweak color #green
  \startGroup d
  -\tweak color #blue
  \startGroup
  e f
  \break
  c d e f
}

\layout {
  \context {
    \Voice
    \consists #"Horizontal_bracket_engraver"
  }
}

%%%%%%%%%%%%%

This must be a bug...

BTW, correct ordering is achieved with the TextSpanner code if the same approach is taken: any spanner in force is added to the 'side-support-elements of a new spanner.  Again, this works only if 'outside-staff-priority is set to #f.

DN

Attachment: horizontal-bracket-bug.png
Description: PNG image


reply via email to

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