lilypond-user
[Top][All Lists]
Advanced

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

Re: Shift up OttavaBracket


From: Aaron Hill
Subject: Re: Shift up OttavaBracket
Date: Sun, 12 Jan 2020 16:56:33 -0800
User-agent: Roundcube Webmail/1.3.8

If you want to move the bracket upwards based on its final position after accounting for other objects such as the slur, then extra-offset seems the way to go.

Otherwise, you can manually do the work that \offset Y-offset would have done if you need to use 2.18.2.

%%%%
\version "2.18.2"
test = { \ottava #1 c'''' c'''' c'''' \ottava #0 c'''
         \ottava #1 c''''( c'''' c'''' \ottava #0 c''') }
{
  \test

  % \offset Y-offset 2 Staff.OttavaBracket
  \override Staff.OttavaBracket.Y-offset =
    #(let ((offset (lambda (n) (+ 2 n))))
       (ly:make-unpure-pure-container
         (lambda (grob) (offset
           (ly:side-position-interface::y-aligned-side grob)))
         (lambda (grob start end) (offset
           (ly:side-position-interface::pure-y-aligned-side
              grob start end)))))
  \test
  \revert Staff.OttavaBracket.Y-offset

  \override Staff.OttavaBracket.extra-offset = #'(0 . 2)
  \test
}
%%%%


-- Aaron Hill



reply via email to

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