Also: your tie needs to end in the same voice it started. \new Voice and the <<\\>> construct both create other voices. If you remove \new Voice = “melody” from your first attempt it will work, as the last note of the tie is then in the same voice as the first.
> 25 jan. 2024 kl. 00:37 skrev Mark Stephen Mrotek <carsonm...@ca.rr.com>: > > > Butter, > > Use > \repeatTie > See > https://lilypond.org/doc/v2.22/Documentation/notation/long-repeats#normal-repeats > > Mark > > From: lilypond-user-bounces+carsonmark=ca.rr....@gnu.org > <lilypond-user-bounces+carsonmark=ca.rr....@gnu.org> On Behalf Of Butter Cream > Sent: Wednesday, January 24, 2024 1:29 PM > To: lilypond-user@gnu.org > Subject: Ties across voices; tried two methods > > Hi ponders, I have a piece of music with alternative ending. The last measure > prior to the alternative is a single voice has a tied note to both endings. > I'v e tried two methods but both methods produce similar error: {with no tie} > Any help would be appreciated. > > *.ly:100:42: warning: unterminated tie > <g d'>4 <g' d'>8 <g c>~ <g c>4 r8 bes > ~ | % m19 > > [16][16] > > > I've tried both these methods: > <g d'>4 <g' d'>8 <g c>~ <g c>4 r8 bes~ | % m19 <-Last measure single > voice > } <- end of repeat Volta 2 > \alternative { > % method one using \new Voice > { \new Voice = "melody" { > << { \voiceOne bes8 g4 g8~ g2 } > \new Voice { \voiceTwo <d f>2 <c e>2 } > >> \oneVoice > } | <g d'>4 r r2 | % m > } > { { \new Voice = "melody" { > << { \voiceOne bes'8 g4 g8~ g2 } > \new Voice { \voiceTwo <d f>2 <c e>2 } > >> \oneVoice > } | % m > } <b d'>4 r r2 | } > } > } > > \alternative { > % method two using \\ > { << { bes8 g4 g8~ g2 } \\ { <d f>2 <c e>2 } >> | <g d'>4 r r2 | } > { << { bes8 g4 g8~ g2 } \\ { <d f>2 <c e>2 } >> | <b d'>4 r r2 | } > } > > produces this. with notes not tied. > <image001.png> > > Thank you.