lilypond-devel
[Top][All Lists]
Advanced

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

Re: add property label-alignments to OttavaBracket (issue 575330043 by a


From: lilypond
Subject: Re: add property label-alignments to OttavaBracket (issue 575330043 by address@hidden)
Date: Sat, 23 Nov 2019 03:18:10 -0800

On 2019/11/22 12:56:00, Malte Meyn wrote:
I just managed to do the same thing for VoltaBrackets but that did
need some
code duplication so maybe there should be a new function in some
interface for
that alignment … I’ll have a look at this in the next few days.

For Spanners with only one label like OttavaBracket or VoltaBracket this
would work.

All sorts of piano pedal spanners have no label as part of the spanner
grob (PianoPedalBracket) but a separate grob (SostenutoPedal,
SustainPedal, UnaCordaPedal). Why?

And then there are some Spanners which can have labels on both sides
(left and right) like TextSpanner and DynamicTextSpanner. These have the
subproperties bound-details.(left|right).stencil-align-dir-y that take
only one number.

I would suggest to:
• add the label-alignments property to all spanners with exactly one
label
• think about all those different piano pedal grobs, whether they are
needed, and how alignment could be done between the label grob and the
line grob
• rename stencil-align-dir-y to label-alignments and let it take a pair
of numbers (is this good, to have a top-level property for some grobs
with the same name as a subproperty for others?)

Here you can see the current situation:

\version "2.21.0"

\relative {
  \override DynamicTextSpanner.color = #blue
  \override DynamicTextSpanner.bound-details.left.text = "foo"
  \override DynamicTextSpanner.bound-details.left.stencil-align-dir-y =
#UP
  \override DynamicTextSpanner.bound-details.right.text = "bar"

  \set Staff.pedalSustainStyle = #'mixed
  \override Staff.SostenutoPedal.color = #green
  \override Staff.SustainPedal.color = #red
  \override Staff.PianoPedalBracket.color = #magenta

  % no effect:
  \override Staff.SustainPedal.bound-details.left.text = "foo"
  \override Staff.SustainPedal.bound-details.left.stencil-align-dir-y =
#UP
  \override Staff.SustainPedal.bound-details.right.text = "bar"

  c'\cresc\sostenutoOn\sustainOn
  d e f g\!\sostenutoOff\sustainOff
}

https://codereview.appspot.com/575330043/

reply via email to

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