Ties over repeat boundaries

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Ties over repeat boundaries

Stephan Schöll
Hello again

I'm having problems with ties over the repeat bar lines when adding lyrics.

First let's look at the melody alone - without lyrics:
The tie over the repeat bar line between the two volta spanners is wrong.
When we add the lyrics, somehow unpredictable things happen:
* repeat barlines and volta spanners get messed up
* the first g in the 2nd volta alternative (bar 4) is missing the
melisma line from "eight___"

Questions:
* How should I fix the tie(s)?
* How should I best align the lyrics?
* Is the tie problem similar to the glissando challenges in
http://lilypond.org/doc/v2.19/Documentation/notation/expressive-marks-as-lines?
8-#

I still hope for a "standard default solution" - without too much
manual/ugly tweaking ;-)

Thanks in advance for your kind support!
Best regards
Stephan

...and yes, it's part of my current real-life score copying exercise.

{code}
\version "2.19.83"

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

\header {
  title = "Ties over repeat boundaries"
  subtitle = "...with lyrics - volta spanner warning..."
}

myMelody = \relative c' {
  \global
  c4 d e f8 g8~ |
  \repeat volta 2 {
    g4 g g c8 g~
  }
  \alternative {
    {
      g4  r r d8 g~ |
    }
    {
      g4 r c4\accent r4 |
    }
  }
  \bar "|."

}

myLyrics = \lyricmode {
  One, two, three, four,
  \repeat volta 2 {
    five, __ six, sev -- en, eight __
  }
  \alternative {
    {
       a -- five
    }
    {
      yeah!
    }
  }
}

\score {
  \new Staff {
    \new Voice {
      \myMelody
    }
    \addlyrics {
      \myLyrics
    }
  }
}

{code}

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Ties over repeat boundaries

Thomas Morley-2
Am Sa., 4. Mai 2019 um 23:39 Uhr schrieb [hidden email] <[hidden email]>:
>
> Hello again
>
> I'm having problems with ties over the repeat bar lines when adding lyrics.
>
> First let's look at the melody alone - without lyrics:
> The tie over the repeat bar line between the two volta spanners is wrong.

Yep.
It's a known limitation, in
http://lilypond.org/doc/v2.19/Documentation/notation-big-page#repeats
look for
"Ties may be added to a second ending:"

LilyPond can't tie notes in alternative endings back to the start of the repeat.

This is due to how LilyPond processes repeat-alternative.
See this minimal:

\displayMusic \repeat volta 2 { b1 } \alternative { b~ bes }

You will get in terminal:

(make-music
  'VoltaRepeatedMusic
  'elements
  (list (make-music
          'NoteEvent
          'articulations
          (list (make-music (quote TieEvent)))
          'duration
          (ly:make-duration 0)
          'pitch
          (ly:make-pitch -1 6))
        (make-music
          'NoteEvent
          'pitch
          (ly:make-pitch -1 6 -1/2)
          'duration
          (ly:make-duration 0)))
  'repeat-count
  2
  'element
  (make-music
    'SequentialMusic
    'elements
    (list (make-music
            'NoteEvent
            'duration
            (ly:make-duration 0)
            'pitch
            (ly:make-pitch -1 6)))))

Disregarding all the subtleties and simplifying in pseudo-code this reads:
(
  ;; alternative endings of repeat
  (list note-alt1-with-tie note-alt2)
  ;; repeat starts with
  (list note-1))

LilyPond always reads from left to right, so above Tie will try to
connect note-alt1-with-tie and note-alt2.
This is never what we would want and fails frequently ofcourse.

This limitation was discussed already, but is currently not solved.
Which is a pity because
\unfoldRepeats \repeat volta 2 { b1 } \alternative { b~ b }
works fine. And the workarounds will disturb it.

Part of the workaround is mentioned in the linked section of the NR.
For the other parts see below.

> When we add the lyrics, somehow unpredictable things happen:
> * repeat barlines and volta spanners get messed up

Here
http://lists.gnu.org/archive/html/lilypond-user/2019-05/msg00062.html
I wrote \repeat - \alternative could be removed from lyrics.
I'd better written they _should_ be removed.

> * the first g in the 2nd volta alternative (bar 4) is missing the
> melisma line from "eight___"

A consequence of the Tie-problem.

>
> Questions:
> * How should I fix the tie(s)?

Current workaround is to use \repeatTie and \laissezVibrer

> * How should I best align the lyrics?

Remove \repeat \alternative from lyrics.
To get the LyricExtender in second alternative, enter something
invisible and move it until it looks fine, see below.

> * Is the tie problem similar to the glissando challenges in
> http://lilypond.org/doc/v2.19/Documentation/notation/expressive-marks-as-lines?
> 8-#

Yep, it's the same problem.
The proposed glissando-workaround would work with Ties as well.
Though, would make for unneeded complex code. \repeatTie and
\laissezVibrer is simpler.
If it does not work sufficiently you may resort to the glissando-workaround.

>
> I still hope for a "standard default solution" - without too much
> manual/ugly tweaking ;-)

Here my proposal:

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

\header {
  title = "Ties over repeat boundaries"
}

myMelody = \relative c' {
  \global
  c4 d e f8 g8~ |
  \repeat volta 2 {
    g4 g g c8 g~
  }
  \alternative {
    {
      g4  r r d8 g\laissezVibrer |
    }
    {
      g4\repeatTie r c4\accent r4 |
    }
  }
  \bar "|."
}


myLyrics = \lyricmode {
  One, two, three, four, five, __
  six, sev -- en, eight __ a -- five
  \tweak X-offset #-0.3 \markup \null  __
  yeah!
}

\score {
  <<
  \new Staff \new Voice = "mel" \myMelody
  \new Lyrics \lyricsto "mel" \myLyrics
  >>
}


HTH,
  Harm

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Ties over repeat boundaries

Stephan Schöll
Thomas

Thanks for your in-depth explanations. They help me understanding
lilypond more and more.

Your tips lead me to an absolutely satisfying result:
* Use \repeatTie and \laissezVibrer - clean code, comprehensible score
* Lyrics without \repeat / \alternative (in fact: not relevant in the
context of rehearsal midi output with \unfoldReapeats)
* \tweak X-offset #-0.3 \markup \null  __

Regards
Stephan

Am 05.05.2019 um 12:24 schrieb Thomas Morley:

> Am Sa., 4. Mai 2019 um 23:39 Uhr schrieb [hidden email] <[hidden email]>:
>>
>> Hello again
>>
>> I'm having problems with ties over the repeat bar lines when adding lyrics.
>>
>> First let's look at the melody alone - without lyrics:
>> The tie over the repeat bar line between the two volta spanners is wrong.
>
> Yep.
> It's a known limitation, in
> http://lilypond.org/doc/v2.19/Documentation/notation-big-page#repeats
> look for
> "Ties may be added to a second ending:"
>
> LilyPond can't tie notes in alternative endings back to the start of the repeat.
>
> This is due to how LilyPond processes repeat-alternative.
> See this minimal:
>
> \displayMusic \repeat volta 2 { b1 } \alternative { b~ bes }
>
> You will get in terminal:
>
> (make-music
>   'VoltaRepeatedMusic
>   'elements
>   (list (make-music
>           'NoteEvent
>           'articulations
>           (list (make-music (quote TieEvent)))
>           'duration
>           (ly:make-duration 0)
>           'pitch
>           (ly:make-pitch -1 6))
>         (make-music
>           'NoteEvent
>           'pitch
>           (ly:make-pitch -1 6 -1/2)
>           'duration
>           (ly:make-duration 0)))
>   'repeat-count
>   2
>   'element
>   (make-music
>     'SequentialMusic
>     'elements
>     (list (make-music
>             'NoteEvent
>             'duration
>             (ly:make-duration 0)
>             'pitch
>             (ly:make-pitch -1 6)))))
>
> Disregarding all the subtleties and simplifying in pseudo-code this reads:
> (
>   ;; alternative endings of repeat
>   (list note-alt1-with-tie note-alt2)
>   ;; repeat starts with
>   (list note-1))
>
> LilyPond always reads from left to right, so above Tie will try to
> connect note-alt1-with-tie and note-alt2.
> This is never what we would want and fails frequently ofcourse.
>
> This limitation was discussed already, but is currently not solved.
> Which is a pity because
> \unfoldRepeats \repeat volta 2 { b1 } \alternative { b~ b }
> works fine. And the workarounds will disturb it.
>
> Part of the workaround is mentioned in the linked section of the NR.
> For the other parts see below.
>
>> When we add the lyrics, somehow unpredictable things happen:
>> * repeat barlines and volta spanners get messed up
>
> Here
> http://lists.gnu.org/archive/html/lilypond-user/2019-05/msg00062.html
> I wrote \repeat - \alternative could be removed from lyrics.
> I'd better written they _should_ be removed.
>
>> * the first g in the 2nd volta alternative (bar 4) is missing the
>> melisma line from "eight___"
>
> A consequence of the Tie-problem.
>
>>
>> Questions:
>> * How should I fix the tie(s)?
>
> Current workaround is to use \repeatTie and \laissezVibrer
>
>> * How should I best align the lyrics?
>
> Remove \repeat \alternative from lyrics.
> To get the LyricExtender in second alternative, enter something
> invisible and move it until it looks fine, see below.
>
>> * Is the tie problem similar to the glissando challenges in
>> http://lilypond.org/doc/v2.19/Documentation/notation/expressive-marks-as-lines?
>> 8-#
>
> Yep, it's the same problem.
> The proposed glissando-workaround would work with Ties as well.
> Though, would make for unneeded complex code. \repeatTie and
> \laissezVibrer is simpler.
> If it does not work sufficiently you may resort to the glissando-workaround.
>
>>
>> I still hope for a "standard default solution" - without too much
>> manual/ugly tweaking ;-)
>
> Here my proposal:
>
> global = {
>   \key c \major
>   \time 4/4
> }
>
> \header {
>   title = "Ties over repeat boundaries"
> }
>
> myMelody = \relative c' {
>   \global
>   c4 d e f8 g8~ |
>   \repeat volta 2 {
>     g4 g g c8 g~
>   }
>   \alternative {
>     {
>       g4  r r d8 g\laissezVibrer |
>     }
>     {
>       g4\repeatTie r c4\accent r4 |
>     }
>   }
>   \bar "|."
> }
>
>
> myLyrics = \lyricmode {
>   One, two, three, four, five, __
>   six, sev -- en, eight __ a -- five
>   \tweak X-offset #-0.3 \markup \null  __
>   yeah!
> }
>
> \score {
>   <<
>   \new Staff \new Voice = "mel" \myMelody
>   \new Lyrics \lyricsto "mel" \myLyrics
>   >>
> }
>
>
> HTH,
>   Harm
>

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