Hi everybody,

does anyone know how to make the LyricExtender ignore/skip one or more syllables? I.e. the extender line should *not* stop at the next syllable:

(preview image)

For the above picture, I've used a workaround:

% -------------------------------------------------------
\version "2.18.2"

\relative c' {c2 d e f g a}

\addlyrics { a b _ c d e }

\addlyrics {
  \override LyricExtender.extra-offset = #'(0 . 2.8)
  _ \markup{ \transparent ". "}  __ _ _ _  }
% -------------------------------------------------------

As you can see, the extender lines are produced by a second stanza, which can be pretty annoying.
It would be great to have something like
\addlyrics { a b \extend #3  _ c d e }

Does anyone know some Scheme magic to achieve this?

Cheers,
Klaus

P.S.: This would be helpful for Functional harmony stuff... see attachment.




\version "2.18.2"

#(set-default-paper-size "a4")
#(set-global-staff-size 18)

\paper {
  line-width    = 170\mm
  left-margin   = 20\mm
  top-margin    = 20\mm
  bottom-margin = 20\mm
  indent = 0
  ragged-last-bottom = ##t
  ragged-bottom = ##f  
  ragged-right = ##f  
}

\header {
  tagline = ##f
}

#(define-markup-command (strikeout layout props letter)
   (markup?)
   (interpret-markup layout props
     #{  
       \markup{
         \concat {	
           \override #'(baseline-skip . 0.4)
           \left-column {
             $letter
             \with-dimensions #'(-0.0 . 0.0) #'(0 . 0)
             \translate-scaled #'(-0.4 . 0.4)
             \with-dimensions #'(-0.0 . 0.0) #'(0 . 0)
             \draw-line #'(2.4 . 1.7)
           }	
         }
       }
     #}))

#(define-markup-command (double layout props letter)
   (markup?)
   (interpret-markup layout props
     #{  
       \markup{
         \concat {	
           \override #'(baseline-skip . 0.4)
           \left-column {
             $letter
             \with-dimensions #'(-0.4 . 0.6) #'(0 . 0)
             $letter
           }	
         }
       }
     #}))

#(define-markup-command (Funktionssymbol layout props Funktionsbuchstabe Sopranton Basston OptA OptB OptC OptD OptE Abstand)
   (markup? markup? markup? markup? markup? markup? markup? markup? markup?)
   (interpret-markup layout props
     #{  
       \markup{
         \concat {	
           \override #'(baseline-skip . 1.4)
           \center-column {
             \override #`(direction . ,UP) 
             \override #'(baseline-skip . 2.0)
             \dir-column { 
               \halign #CENTER
               $Funktionsbuchstabe
               \tiny
               \halign #CENTER
               $Sopranton
             }
             \tiny
             $Basston
           }			
           \tiny 
           \override #`(direction . ,UP) 
           \override #'(baseline-skip . 0.8) 
           \dir-column { 
             " "
             {   \override #`(direction . ,UP) 
                 \override #'(baseline-skip . 1.3)
                 \dir-column { $OptA  $OptB $OptC $OptD $OptE }
             }    
           }
           $Abstand
         }
       }
     #}))


klammerAuf = { \set stanza = \markup {\normal-text \magnify #1.1 " ("} }


% ---------------------------------------------------------------
% ----- Voices: soprano, alto, tenor
% ---------------------------------------------------------------

global  = { \key c \major  \time 4/4}

sopranmel = \relative c'' { 
  \clef treble 
  \stemUp
  \global
  e4 e e( d)
  c4 d d2
  d4 e8 d c4 c
  d8( c) <b g>4 c2\fermata
  
}

altmel = \relative c'' { 
  \clef treble 
  \stemDown
  \global
  c4 bes a2
  a4 c c( b)
  b2 g4 a
  a4 \hideNotes g8 s \unHideNotes g2
}

tenormel = \relative c' { 
  \clef treble 
  \stemDown
  \global
  g'4 g f2 
  d4 a' a( g)
  e2 e4 f
  d4 d8( f) e2
}



% ---------------------------------------------------------------
% ----- hidden bass voice (for containing the "lyrics")
% ---------------------------------------------------------------
bassmelhidden = 
\relative c { 
  \clef bass 
  \stemDown
  \global
  \hideNotes 
  \override NoteHead.color = #red
  \override NoteColumn #'ignore-collision = ##t
  f,4 cis'4 d d
  f4 fis4 g g
  gis4 gis8 gis bes4 a8 g
  fis8 fis g8 g c,2
}

% ---------------------------------------------------------------
% ----- bass voice to be displayed
% ---------------------------------------------------------------
bassmelshown = \relative c { 
  \clef bass 
  \stemNeutral
  \global
  %    \hideNotes 
  c4 cis4 d2
  f4 fis4 g2
  gis2 bes4 a8 g
  fis4 g4 c,2
  %    \unHideNotes
}

% ---------------------------------------------------------------
% ----- "lyrics" stanza 1: Symbols for functional harmony
% ---------------------------------------------------------------
lyr = \lyricmode {
  \override LyricText.self-alignment-X = #LEFT
  \override LyricExtender.left-padding = #-0.5
  \override LyricExtender.extra-offset = #'(0 . 0.5)
  
  % Funktionsbuchstabe Sopranton Basston OptA OptB OptC OptD OptE Füllstring

  \set stanza = #"C-Dur:"
  \markup \Funktionssymbol "T" "3" ""  "" "" "" "" ""   ""
  \klammerAuf 
  \markup \Funktionssymbol \strikeout "D" "" "3"  "7" "9>" "" "" ""   ")"
  \markup \Funktionssymbol "Sp" "" ""  "9" "" "" "" ""   "" 
  \markup \Funktionssymbol "" "" ""  "8" "" "" "" ""   ""
  \markup \Funktionssymbol "S" "" ""  "5" "6" "" "" ""   ""
  \klammerAuf
  \markup \Funktionssymbol "D" "" "3"  "7" "" "" "" ""   ")"
  \markup \Funktionssymbol "D" "" ""  "2" "4" "" "" ""   ""
  \markup \Funktionssymbol "" "" ""  "1" "3" "" "" ""   ""
  \klammerAuf
  \markup \Funktionssymbol "D" "" "3"  " " "7" "" "" ""   ""
  \markup \Funktionssymbol "" "" ""  "-" "8" "" "" ""   ""
  \markup \Funktionssymbol "" "" ""  "-" "7" "" "" ""   " )[Tp]"
  \klammerAuf
  \markup \Funktionssymbol "D" "" "7"  "" "" "" "" ""   ")"
  \markup \Funktionssymbol "S" "" "3"  "" "" "" "" ""   ""
  \markup \Funktionssymbol " " "" "2"  "" "" "" "" ""   ""
  \markup \Funktionssymbol \double "D" "" "3"  "8" "" "" "" ""   ""
  \markup \Funktionssymbol "" "" ""  "7" "" "" "" ""   ""
  \markup \Funktionssymbol "D" "" ""  "5" "" "" "" ""   ""
  \markup \Funktionssymbol "" "" ""  "7" "" "" "" ""   ""
  \markup \Funktionssymbol "T" "" ""  "" "" "" "" ""   ""
}


% ---------------------------------------------------------------
% ----- "lyrics" stanza 2: Extender lines
% ---------------------------------------------------------------
lyrExt = \lyricmode {
  \override LyricText.self-alignment-X = #LEFT
  \override LyricExtender.extra-offset = #'(0 . 3.3)
  \override LyricText.extra-offset = #'(0 . 3.3)
  \markup { \transparent "." }
  _  \markup {\transparent "....." } __ _ "" _ \markup { \transparent "..." } __ _  
  \markup { \transparent "..." } __ _ _ ""  
  \markup { \transparent "..." } __ _ \markup {\transparent  "...." } __ _ 
  \markup { \transparent "..." } __ _
}


\score {
  \new GrandStaff <<
    \new Staff = upper  
    \with { printPartCombineTexts = ##f }
    {
      <<
        \sopranmel \\
        \partcombine \altmel \tenormel
      >>
    }
    \new Staff = lower 
    \new Voice = "bassstimmeSichtbar" 
    \with { printPartCombineTexts = ##f }
    {
      <<
        \bassmelshown
        \new Voice = "bassstimme" {\shiftOff  \bassmelhidden}
        \new Lyrics \lyricsto "bassstimme" \lyr
        \new Lyrics \lyricsto "bassstimme" \lyrExt
      >>
    }
  >>
}

Attachment: Functional harmony.pdf
Description: Adobe PDF document

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to