lilypond-user
[Top][All Lists]
Advanced

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

Re: ottava spanner terminates at the end of the note, not the end of the


From: Aaron Hill
Subject: Re: ottava spanner terminates at the end of the note, not the end of the bar
Date: Fri, 13 May 2022 21:21:11 -0700

On 2022-05-13 8:28 pm, Kenneth Wolcott wrote:
  The ottava spanner terminates at the end of the note, not at the end
of the bar.

  How to change this?

  Screenshots attached.

Consider the following:

%%%%
\version "2.22.0"

\relative c'' {
  % Be careful not to stop the ottava too soon.
  \ottava 1 c4 e g f8 d | c2. \ottava 0 r4

  % This encompasses the rest as well but is still a little too short.
  \ottava 1 c4 e g f8 d | c2. r4 \ottava 0
  c8 d b c~ c2

  % This would be nice...
  % \override Staff.OttavaBracket.to-barline = ##t
  % ...but it would appear OttavaBracket is not a
  % line-spanner-interface, where to-barline lives.

  % A manual adjustment is possible:
  \once \offset shorten-pair #'(0 . -1) Staff.OttavaBracket
  \ottava 1 c4 e g f8 d | c2. r4 \ottava 0
  c8 d b c~ c2
  \bar "|."
}
%%%%

Assuming you only have a few of these you need to manage, the manual offset might be sufficient to let you move onto other things in your score. But you will need to review these if you make any changes that affect the measure length. An automated approach might be possible, but really I think OttavaBracket should support to-barline. Something to submit to the bug mailing list I guess.

----

Was almost about to hit send, but then I thought... what if you hid the OttavaBracket but used a TextSpanner in its place?

%%%%
\relative c'' {
  \once \hide Staff.OttavaBracket
  \ottava 1

  c4 -\tweak to-barline ##t
     -\tweak dash-fraction #0.3
     -\tweak dash-period #1
     -\tweak bound-details.left.text
       \markup \vcenter \bold 8
     -\tweak bound-details.right.stencil
       #(make-line-stencil 0.1 0 0 0 -0.8)
     \startTextSpan
    e g f8 d

  | c2. r4 \ottava 0
  c8\stopTextSpan d b c~ c2
}
%%%%

Hmm... maybe not. That is a lot of tweaks, and I do not think I matched the original OttavaBracket well enough.


-- Aaron Hill



reply via email to

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