lilypond-user
[Top][All Lists]
Advanced

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

Change the Y-offset of a ballon markup


From: Pierre Perol-Schneider
Subject: Change the Y-offset of a ballon markup
Date: Sun, 29 Mar 2015 13:32:53 +0200

Hi,

Guitar scores show sometimes a pedal sign to indicate that a specific note should be damped.
It sounds more logical to me that this sign could be coded as a balloon and not with some heavy graphic or 'TextSpanner' coding.

So far, here's what I did:

\version "2.18.2"
   
    \new Staff {
      <<
        \new Voice = "Up" \relative e'' {
          \voiceOne
          e8 fis g e fis4. e8  |
          <b dis>2
        }
        \new Voice = "Down" \with { \consists "Balloon_engraver" }
          \relative c {
             \voiceTwo
             \override BalloonTextItem.annotation-balloon = ##f
             <e-\balloonText #'(6 . -1)
                \markup
                \override #'(baseline-skip . 1.3)
                \center-column {
                  \fontsize #-4 \circle\number "6"
                  \vspace #.07
                  \musicglyph #"pedal.*" 
                  \concat {
                    \fontsize #-3 "("
                    \hspace #.3
                    \raise #0.3 \finger "p"
                    \fontsize #-3 ")"
                  }
                }
                g'b>2
             <d'-\balloonText #'(8 . -1)
                 \markup
                 \override #'(baseline-skip . 1.3)
                 \center-column {
                   \musicglyph #"pedal.*" 
                   \concat {
                     \fontsize #-3 "("
                     \hspace #.3
                     \raise #0.3 \finger "p"
                     \fontsize #-3 ")"
                   }
                 }
                 a' d>
        }
      >>
    }


However, I still need to be able to adapt the markup Y-offset without moving the spanner, or to direct the balloon spanner right end to the center of the markup.
Do someone has an idea how to get that ?

Thanks in advance,
Pierre



reply via email to

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