Hi Paul, Alexander et. al!

I need to be very short as a rehearsal is waiting.

I'd advocate to keep minimum-length.
I also need some way to force an extender and to inhibit extender generation.
Forcing an individual extender should overrule a general inhibition of 
extenders.
Details can be hidden by some music functions ... but there's not time to 
generate
a patch now.

Have a look at the attached ly and the generated pdf ... and comment on the
chosen names and syntax. It should be self-explanatory.

cu,
 Knut

\version "2.19.53"

\paper {
  #(set-paper-size "a4")
  ragged-right = ##f 
  left-margin = 1\cm
  line-width = 19\cm
  top-margin = 1\cm
  bottom-margin = 1\cm
  ragged-bottom = ##f
  ragged-last-bottom = ##f
}

\pointAndClickOff

#(set-global-staff-size 16)

\markup { "automatic extenders, minimum-length 7 "} 
<<
    { c''1 2 ~ 2 2 4 ~ 4 4 8 ~ 8 8  16 ~ 16 4 1  \bar "|." }
    \addlyrics { \noExtenderLimit #7  \repeat unfold 5 {  foo -- bar }}
>>

\markup { "automatic extenders, minimum-length 3.5 "} 
<<
    { c''1 2 ~ 2 2 4 ~ 4 4 8 ~ 8 8  16 ~ 16 4 1  \bar "|." }
    \addlyrics { \noExtenderLimit #3.5 \repeat unfold 5 {  foo -- bar }}
>>

\markup { "automatic extenders, minimum-length 1 "} 
<<
    { c''1 2 ~ 2 2 4 ~ 4 4 8 ~ 8 8  16 ~ 16 4 1  \bar "|." }
    \addlyrics { \noExtenderLimit #1 \repeat unfold 5 {  foo -- bar }}
>>

\markup { "automatic extenders, mixed manual and automatic melismata, extender on last note forced to length 5"} 
<<
    { \autoBeamOff c''2 2 4\( 4 4 4\) 4 4 4\( 4( 4) 8[ 8] 8\) 16\(\melisma 16\melismaEnd 4\) 1 \bar "|." }
    \addlyrics { \noExtenderLimit #8 foo -- _ bar _ _ _ foo -- _ bar _ _ _  foo -- _ \forceExtenderTo #5 bar }
>>

\markup { "automatic extenders, mixed manual and automatic melismata, first extender shortened, extender on last note forced "} 
<<
    { \autoBeamOff c''2 2 4\( 4 4 4\) 4 4 4\( 4( 4) 8[ 8] 8\) 16\(\melisma 16\melismaEnd 4\) 1 \bar "|." }
    \addlyrics { \noExtenderLimit #8
        foo -- _ \forceExtender bar _ "" _  foo -- _ bar _ _ _  foo -- _ \forceExtender bar _ _ _ }
>>

\markup { "Issue 1006 revisited, last extender forced and tweaked to the left, minimum-length 2 "} 
\score { 
  <<
    \new Staff \relative c'' { 
      \time 2/1
      \repeat volta 2 {
        r4 g4 d'2. a4 bes2~
        bes  a2 g1~
      }
      \alternative{
       { g2 fis4 e fis1 d'1 c2 bes}
       { g\repeatTie fis4 e fis1 }
      }
      \bar "|."
    }
    \addlyrics {
       \noExtenderLimit #2
        of Prin -- ces all _ _ the _ flow’r. Who took a-
       \earlyExtender #-4 the _ flow’r.
    }
  >>
}

\markup { "Issue 1006 revisited, last extender forced and tweaked to the left, minimum-length 1 "} 
\score { 
  <<
    \new Staff \relative c'' { 
      \time 2/1
      \repeat volta 2 {
        r4 g4 d'2. a4 bes2~
        bes  a2 g1~
      }
      \alternative{
       { g2 fis4 e fis1 d'1 c2 bes}
       { g\repeatTie fis4 e fis1 }
      }
      \bar "|."
    }
    \addlyrics {
       \noExtenderLimit #1
        of Prin -- ces all _ _ the _ flow’r. Who took a-
       \earlyExtender #-4  the _ flow’r.
    }
  >>
}

\markup{Here our melisma detection fails. We need to override. }
\score {
  <<
    \new Voice = "singleVoice" {
        \relative {
	      a'4 a a a
	      \repeat volta 3 { b4 b b b }
          c4 c c c
	   }
    }
    \new Lyrics \lyricsto "singleVoice" {
      Not re -- peat -- ed.
      <<
        { The first time words.	}
        \new Lyrics { \set associatedVoice = "singleVoice"  Sec -- ond time \noExtender words. }
        \new Lyrics { \set associatedVoice = "singleVoice"  The third time \noExtender words. }
      >>
      The end sec -- tion.
    }
  >>
}

\markup {There should be no extender from volta 1 to volta 2 but a short extender starting at volta 2}
\score {
  <<
    \new Staff {
      \time 2/4
      \new Voice = "melody" {
        \relative {
          \set melismaBusyProperties = #'()
          \repeat volta 2 { b'4 b ~}
          \alternative { { b b } { b \repeatTie c } }
          \unset melismaBusyProperties
          c4 c
        }
      }
    }
    \new Lyrics {
      \lyricsto "melody" {
        \repeat volta 2 { Here's a __ }
        \alternative {
          { \skip 1 verse }
          { \earlyExtender #-4  sec -- }
        }
        ond one.
      }
    }
  >>
}

\markup {Best solution to that problem ...}
\score {
  <<
    \new Staff {
      \time 2/4
      \new Voice = "melody" {
        \relative {
          \repeat volta 2 { b'4 b ~}
          \alternative { { b b } { b \repeatTie c } }
          c4 c
        }
      }
    }
    \new Lyrics {
      \lyricsto "melody" {
        Here's a verse. "" ""
      }
    }
    \new Lyrics {
      \lyricsto "melody" {
          Here's \shortenExtender#6 one "" \earlyExtender #-6  more to sing.
      }
    }
  >>
}

\layout {
}

Attachment: lyrextest.pdf
Description: Adobe PDF document

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

Reply via email to