lilypond-user
[Top][All Lists]
Advanced

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

Re: Stanza (or similar) at the end of a line?


From: Matthew Collett
Subject: Re: Stanza (or similar) at the end of a line?
Date: Thu, 17 Jan 2013 11:11:45 +1300

On 17/01/2013, at 5:54 am, Eluze <address@hidden> wrote:

> so I added the relevant definitions from gregorian.ly:
> 
> #(define (add-prefix-to-lyrics prefix music)
>   (let ((found? #f))
>     (map-some-music
>      (lambda (m)
>       (if found? m
>           (and (music-is-of-type? m 'lyric-event)
>                (begin
>                  (set! (ly:music-property m 'text)
>                        (string-append prefix (ly:music-property m 'text)))
>                  (set! found? #t)
>                  m))))
>      music)))
> responsum = #(define-music-function (parser location music) (ly:music?)
>   (add-prefix-to-lyrics "℟" music))
> 
> the responsum as defined in that function is prefixed to a syllable but
> Matthew wants it at the end.
> 
> here I added an invisible note and dummy text:
> 
>  \new Staff <<
>    \new Voice = "sopranos" \relative f {
>      \cadenzaOn 
>      a'1 b4 a \bar "|" g2 a
>      \hideNotes g64                                  % <--
>      \bar "||"
>    }
>    \new Lyrics \lyricsto "sopranos" {
>      \set stanza = "1."
>      one two three four five \responsum ""    % <--
>    }
>>> 
> 
> is there a straighter way?

As I said in my reply to David, the \responsum from gregorian.ly is a red 
herring.  But using \hidenotes is an effective hack that hadn't occurred to me:

\version "2.16"
\header { tagline = ##f }
\layout {
  \context { \Staff \remove "Time_signature_engraver" }
  \context { \Lyrics \override LyricText #'self-alignment-X = #left }
  ragged-last = ##f
}
responsum = \markup{ \bold \fontsize #-1 "℟." }
\score { 
  \new Staff << \clef treble \new Voice = "sopranos" \relative f { \cadenzaOn 
a'1 b4 a \bar "|" g2 a \hideNotes a64 \bar "||"}
    \new Lyrics \lyricsto "sopranos" { \set stanza = "1." "This is just one" 
verse of ma -- ny. \responsum } >>
}

produces

Attachment: Responsum_test.pdf
Description: Adobe PDF document


which is usable (though even further right would still be better).

Using extra-offset instead of Y-offset for the mark is also a possible one-off 
fix, but I think requires too much fine tuning of the offset parameter to be a 
good general solution.

Thanks for the suggestions,
Matthew  

reply via email to

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