[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add prefix to lyrics
From: |
Robert Clausecker |
Subject: |
Re: Add prefix to lyrics |
Date: |
Thu, 02 Sep 2010 19:32:28 +0800 |
Thank you for your response.
I just wanted to know, whether there is an easier way to archieve this?
Yours, Robert Clausecker
Am Donnerstag, den 02.09.2010, 01:06 +0100 schrieb Neil Puttock:
> On 31 August 2010 13:42, Robert Clausecker <address@hidden> wrote:
>
> > I want to write a small snippet for demonstration purposes, which
> > contains lyrics. The problem is, that the first measure of the cited
> > fragment is the second syllable of a word (Pro - phe - ten, the "Pro" is
> > missing). In order to increase the readability of this snippet, I wanted
> > to use a stanza to add this, eg:
> >
> > \set stanza = \markup {\medium Pro ‐}
> >
> > This works as expected, but unfortunately the dash "-" doesn't looks
> > like the dash which usually indicates a word-continuation (Entered
> > uding "--"). Does anybody know, how to get exactly this hyphen?
>
> If you're using 2.13 you can span a hyphen between the stanza and the
> first lyric syllable via a scheme engraver:
>
> \version "2.13.31"
>
> #(define (stanza-lyric-hyphen-engraver ctx)
> (let ((hyphen '()))
>
> `((initialize . ,(lambda (trans)
> ;; if 'stanza is set, make a hyphen before anything
> ;; else has happened
> (and (markup? (ly:context-property ctx 'stanza))
> (set! hyphen (ly:engraver-make-grob trans
> 'LyricHyphen
> '())))))
>
> (acknowledgers
> (lyric-syllable-interface
> . ,(lambda (trans grob source)
> ;; if a hyphen has been created, set the first
> ;; syllable acknowledged as its right bound
> (and (ly:spanner? hyphen)
> (ly:spanner-set-bound! hyphen RIGHT grob))))
>
> (stanza-number-interface
> . ,(lambda (trans grob source)
> ;; if a hyphen has been created, set the stanza
> ;; as its left bound
> (and (ly:spanner? hyphen)
> (ly:spanner-set-bound! hyphen LEFT grob)))))
>
> (stop-translation-timestep
> . ,(lambda (trans)
> ;; clear hyphen at end of first timestep
> (and hyphen
> (set! hyphen '())))))))
>
> <<
> \new Voice = melody \relative c' {
> c2 c
> }
> \new Lyrics \with {
> stanza = #"Pro"
> % make stanza look like a lyric syllable
> \override StanzaNumber #'font-size = #1
> \override StanzaNumber #'font-series = #'bold-narrow
> % tweak stanza position to match lyric spacing
> \override StanzaNumber #'X-offset = #-5.8
> \consists #stanza-lyric-hyphen-engraver
> }
> \lyricsto melody {
> phe -- ten
> }
> >>
>
> Cheers,
> Neil
- Re: Add prefix to lyrics, Neil Puttock, 2010/09/01
- Re: Add prefix to lyrics,
Robert Clausecker <=
- Re: Add prefix to lyrics, Kieren MacMillan, 2010/09/02
- Re: Add prefix to lyrics, Robert Clausecker, 2010/09/02
- Re: Add prefix to lyrics, Dmytro O. Redchuk, 2010/09/02
- Re: Add prefix to lyrics, Kieren MacMillan, 2010/09/02
- Re: Add prefix to lyrics, Alexander Kobel, 2010/09/02
- Re: Add prefix to lyrics, Dmytro O. Redchuk, 2010/09/02
- Re: Add prefix to lyrics, David Kastrup, 2010/09/02
- Re: Add prefix to lyrics, Alexander Kobel, 2010/09/02
- Re: Add prefix to lyrics, David Kastrup, 2010/09/02
- Re: Add prefix to lyrics, Alexander Kobel, 2010/09/02