lilypond

How to tie notes at different time points into a chord?


I am trying to tie notes that are in sequence into a single chord (effectively simulating a slow arpegio):

{
  \clef bass
  r8
  <<
    \relative c {
      <<
        \autoBeamOff \tieDown
        {cis8~ cis4~ cis8}
        {s32 e16.~ e4~ e8} 
        {s16 fisis16~ fisis4~ fisis8} 
        {s16. ais32~ ais4~ ais8}
        {s8 cis4 cis8}
      >>
    }
    \\
    \relative c{
      \mergeDifferentlyDottedOn cis32[ e fisis ais]
    }
  >>
}

The red ties are missing in Lilypond (2.19) enter image description here


Solution

  • The command you are looking for is \set tieWaitForNote = ##t. This is how it looks with your example:

    {
      \clef bass
      r8
      <<
        \relative c {
          <<
            \set tieWaitForNote = ##t
            \autoBeamOff \tieDown
            {cis8~ cis4~ cis8}
            {s32 e16.~ e4~ e8} 
            {s16 fisis16~ fisis4~ fisis8} 
            {s16. ais32~ ais4~ ais8}
            {s8 cis4 cis8}
          >>
        }
        \\
        \relative c{
          \mergeDifferentlyDottedOn cis32[ e fisis ais]
        }
      >>
    }
    

    Producing:

    enter image description here

    You might also want to use \tieNeutral for the chord and also set a minimum-length so that the top tie looks better:

    {
      \clef bass
      r8
      <<
        \relative c {
          <<
            \set tieWaitForNote = ##t
            \autoBeamOff \tieDown
            {cis8~ cis4~ cis8}
            {s32 e16.~ e4~ e8} 
            {s16 fisis16~ fisis4~ fisis8} 
            {s16. 
             \override Staff.Tie.minimum-length = #5.2
             ais32~ ais4~ ais8}
            {s8 \tieNeutral cis4 cis8}
          >>
        }
        \\
        \relative c{
          \mergeDifferentlyDottedOn cis32[ e fisis ais]
        }
      >>
    }
    

    Producing:

    enter image description here