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 12:09:36 -0500

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?

Exactly!  Thanks so much.

The following is one of the examples from the file, with outside-staff-priority tweaks.  The order is preserved.

\relative c' {
  \override TextSpanner.outside-staff-padding = 2
  \override TextSpanner.thickness = 4
  \override TextSpanner.style = ##f
  a4
  -\tweak color #red
  \startTextSpan
  b c
  -\tweak color #darkred
  -\offset outside-staff-priority 1
  \startTextSpanOne
  d

  a4
  -\tweak color #magenta
  -\offset outside-staff-priority 2
  \startTextSpanTwo
  b c
  -\tweak style #'zigzag
  -\offset outside-staff-priority 3
  \startTextSpanThree
  d
  \break

  a4 b c d\stopTextSpanThree

  a4 b\stopTextSpanTwo
  c d\stopTextSpanOne
  a4 b c d\stopTextSpan

%%%%%

Naturally, it would be nice to do this without needing the extra tweaks.  outside-staff-priority could be altered behind-the-scenes, but that seems somehow...dishonest.  Though, of course, two spanner with priorities 350 and 351 would be unlikely to interfere with placement of other objects.

DN

reply via email to

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