lilypond-user
[Top][All Lists]
Advanced

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

Re: Lyric separator


From: Benjamin Bloomfield
Subject: Re: Lyric separator
Date: Thu, 19 Sep 2013 10:31:37 -0400

I'm still struggling to figure out how to override the markup of the first syllable in each system.  I have figured out a callback that can add the underscore to the syllable, but I need to figure out how to know if the syllable is the first in its system.  Does anyone know how to do this?

Here's what I have adding the horizontal line to every syllable:

\version "2.16.1"
#(define (my-callback grob)
  (let* (
      (text (ly:grob-property-data grob 'text))
    )
      (display text) (display "\n")
        ;(ly:grob-set-property! grob 'self-alignment-X '-1)
        ; (ly:grob-set-property! grob 'extra-offset '(-4 . 0))
         (ly:grob-set-property! grob 'text #{ \markup \combine #text \translate #'(1.6 . -0.5) \draw-line #'(-4 . 0) #})
         (ly:grob-set-property! grob 'stencil (lyric-text::print grob))
  )
)
melody = \repeat unfold 16 g'4
lyr = \lyricmode {
        \repeat unfold 16 sol
}
\score {
        \new Staff <<
                \new Voice = "voice" {
                        \melody
                }
                \new Lyrics \with {
                        \override LyricText #'after-line-breaking = #my-callback
                } \lyricsto "voice" \lyr
        >>
}
\paper {
        indent = 0
        line-width = 5.5\cm
}

Thanks,

Benjamin Bloomfield 


On Wed, Sep 18, 2013 at 1:22 PM, Kieren MacMillan <address@hidden> wrote:
Hi Benjamin,

> I think this is perfect, except that it only appears at the beginning of the first system.  Is there any way to get Lilypond to add the same markup to the first syllable of each subsequent system?

I'm sure there is!  =)

Maybe something in this thread can help you:
http://lists.gnu.org/archive/html/lilypond-user/2013-05/msg00688.html

Best,
Kieren.


reply via email to

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