lilypond-user
[Top][All Lists]
Advanced

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

Re: Centering markup between staves


From: Simon Albrecht
Subject: Re: Centering markup between staves
Date: Fri, 25 Sep 2015 14:31:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 25.09.2015 14:29, Robert Clausecker wrote:
Here’s a really nice version which uses the Stanza_number_engraver
(normally used in Lyrics contexts) to place the clavier indication
before the moment for which it applies. Besides, this fortunately
ensures perfect alignment with the dynamic following.
Also, the \general-align markup command helped simplify the code.

%%%%%%%%%%%%%%%
\version "2.19.27"
regR = \markup \general-align #Y #0 {
    \normal-text { R }
    \override #'(font-encoding . fetaBraces) \lookup #"brace60"
}

\score {
    \new PianoStaff <<
      \new Staff \relative c' {
        c4 d e f |
        g a b c |
      }
      \new Dynamics \with {
        \override DynamicText.self-alignment-Y = 0
        %\override TextScript.self-alignment-Y = 0
        \consists Stanza_number_engraver
      } {
        \set stanza = \regR s1\p
      }
      \new Staff \relative c {
        c4 d e f |
        g a b c |
      }
    >>
}
%%%%%%%%%%%%%
I hope this also work in more complicated situations.
This looks nice, but unfortunately I don't think it's going to help in
my situation. These marks denote register changes in an organ score
and appear quite often (about every 20 bars or so).

Of course.

  Each such mark
needs to be perfectly centered between the staves.

Perfect centering is currently difficult – see <http://sourceforge.net/p/testlilyissues/issues/1127/>. You’re likely going to need to tweak Y-offset or even extra-offset.

  I believe a Stanza
number can only be placed at the beginning of the score (with one
stanza number per stanza), but I might be mistaken here.

\set stanza can be used at any time in the score, so no problem there.

Yours, Simon



reply via email to

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