lilypond-user
[Top][All Lists]
Advanced

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

Re: centering text on a measure


From: Thomas Morley
Subject: Re: centering text on a measure
Date: Mon, 3 Oct 2011 17:08:37 +0200

2011/10/1 David Nalesnik <address@hidden>
The function in the attached file lets you specify multiple markers for a grob, so it can serve in multiple pairings (there can only be two which use the same tag).  The example in the file should show how this works.

Hope this can be useful in some way --

--David

Hi David,

setting 'markers to a list is a great idea and I've never got warnings or wrong output.

Your definition should be putted in the LSR as soon as it's updated to 2.14.

One tiny thing I noticed testing the code: It's possible to call 'markers from different voices and staffs, even if I use: \once \override Voice ...

One of my testings (without the definitions):

redln = \markup \with-color #red \draw-line #'(0 . 6)
blueln = \markup \with-color #blue \draw-line #'(0 . 15)

>\relative c' {
        \once \override Stem #'color = #red
        \once \override Stem #'markers = #'("x")
        \once \override Voice.TextScript #'extra-offset = #(center-between "x" -6)
        c'4-\redln  c c c
        d d
        \once \override Voice.TextScript #'extra-offset = #(center-between "y" -15)
        d-\blueln
        \once \override Stem #'color = #blue
        \once \override Stem #'markers = #'("y")
        d
}

two =
\relative c {
        c'4
        \once \override Stem #'color = #red
        \once \override Stem #'markers = #'("x")
        c c c
        d d d d
}

three =
\relative c' {
        c'4 c c c
        d d d d
}

four =
\relative c {
        c'4 c c c
        \once \override Stem #'color = #blue
        \once \override Stem #'markers = #'("y")
        d d d d
}
\score {
\new StaffGroup <<
    \new Staff <<
      \new Voice { \voiceOne \one }
      \new Voice { \voiceTwo \two }
    >>
    \new Staff <<
      \new Voice { \voiceOne \three }
      \new Voice { \voiceTwo \four }
    >>
>>
}

This might be a feature. Or is it a problem? I'm not sure.

Best,

  Harm



reply via email to

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