Hi Colin,

> How did this situation come about?

The need for granular control of all graphical elements in a score, I would 
assume.

> Surely the hyphens in the lyrics are part of the LyricText.

Not really… they are part of the PRESENTATION of the lyric text (a.k.a. 
LyricText). They are, however, part of the Lyrics — and that may be what you’re 
alluding to.

> Why is the color of the hyphens a separate override?

The same reason as holds for LyricExtender as well: text, hyphen, and extender 
are all different parts of the presentation of lyrics (see second line in the 
attached snippet). Note also that this distinction holds for ANY override 
(extra-offset, transparent, etc.).

Now… More to your implicit point: there probably SHOULD be some syntactic sugar 
which would override all aspects of Lyrics in a single setting, e.g.

    \override Lyrics.color = #red
    \override Lyrics.extra-offset = #’(0 . 2)
    etc.

This can be done easily with a music function (e.g., snippet below)… but 
there’s probably a better, more comprehensive, and less fragile (read: more 
future-proof) way, with perhaps an interface similar to the pseudo-code above.

Hope this helps!
Kieren.

%%%  SNIPPET BEGINS
\version "2.19.46"

\paper {
  ragged-right = ##f
  indent = 0
  system-system-spacing.padding = #18
}

lyrEOBegin =
  #(define-music-function (parser location xo) (pair?)
    #{
      \temporary \override LyricText.extra-offset = $xo
      \temporary \override LyricHyphen.extra-offset = $xo
      \temporary \override LyricExtender.extra-offset = $xo
    #})

lyrEOEnd = {
  \revert LyricText.extra-offset
  \revert LyricHyphen.extra-offset
  \revert LyricExtender.extra-offset
}

eo-test-notes = {
  \omit Score.TimeSignature
  \time 3/4
  c'4 d'( e')
  f'4( g') a'
  b'2 g'4
  c''2. \break
}

eo-test-lyrics = \lyricmode {
  Test -- ing, __ test -- ing, one, two, three!
  \temporary \override LyricText.extra-offset = #'(0 . 2)
  Test -- ing, __ test -- ing, one, two, three!
  \revert LyricText.extra-offset
  \lyrEOBegin #'(0 . 2)
  Test -- ing, __ test -- ing, one, two, three!
  \lyrEOEnd
  Test -- ing, __ test -- ing, one, two, three!
}

\score {
  <<
    \new Staff \new Voice { \repeat unfold 4 \eo-test-notes \bar "|." }
    \addlyrics \eo-test-lyrics
  >>
}
%%%  SNIPPET ENDS
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to