2

Sorry fot the confused title, i don't know how to write my question in english.

Basically I'm trying to write this on Lilypond,

and until now i managed to get this

How can I tie the notes on the lower staff?

This is the source code of the file

\version "2.20.0"
\language "espanol"

\score{
  \new PianoStaff <<
    \new Staff = "up" {
      \relative do{
      \clef G
      \time 4/4
      \numericTimeSignature

      s1
      \set tieWaitForNote = ##t
      \grace {
    \change Staff = "down"
    fa,16~ [ re'~ fa~ si~
    \change Staff = "up"
    re~ fa~ si~ re~ si'~] }

    \crossStaff { <re,, fa si re si'>1 }
  }
}

  \new Staff = "down" {
    \relative do,{
      \clef F
      \time 4/4
      \numericTimeSignature

      s1
      \crossStaff { <fa re' fa si>1 }
    }
}

  >>
  \layout{
    \context{
      \PianoStaff
      \consists #Span_stem_engraver
    }
  }
}

I'm new in stackoverflow so I can't post pictures.

Thanks for the help.

2 Answers2

3

The Span_stem_engraver is of no help here. This solution adds five hidden grace notes in the "up" staff, tied to the chord. I have rewritten some details from your example for a more standard (and minimal) code.

\score{
  \new PianoStaff <<
    \new Staff = "up"  {
      {
        \set tieWaitForNote = ##t
        \hideNotes
        \grace { s16 s s s d'~[ f'~ b'~ d''~ b''~] }
        \unHideNotes
        <d' f' b' d'' b''>1
      }
    }

    \new Staff = "down"  {
      {
        \clef bass
        \set tieWaitForNote = ##t
        \grace {
          \voiceTwo f,16~ [ d f~ b~ 
          \change Staff = "up"
          d' f' b' d'' b'' ] }
        \change Staff ="down"
        <f, d f b>1
      }
    }
  >>
}

Example result

Paco Vila
  • 131
  • 1
0

I am not sure if this is the ideal solution, but here is a working example. Basically I removed the ties from the first notes of your grace notes, and I duplicated them in the bottom staff, hid their stems and beams so that only the noteheads show and tied them to the chord. The added chunk in the bottom staff is surrounded by some %%%%%%% so you can spot it more easily.

\version "2.20.0"
\language "espanol"

\score{
  \new PianoStaff <<
    \new Staff = "up" {
      \relative do{
      \clef G
      \time 4/4
      \numericTimeSignature

      s1
      \set tieWaitForNote = ##t
      \grace {
        \change Staff = "down"
          fa,16 [ re' fa si
        \change Staff = "up"
        re~ fa~ si~ re~ si'~] }

    \crossStaff { <re,, fa si re si'>1 }
  }
}

  \new Staff = "down" {
    \relative do,{
      \clef F
      \time 4/4
      \numericTimeSignature

      s1

      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \set tieWaitForNote = ##t
      \grace {
        \stemDown
        \omit Stem
        \omit Beam
        fa16~ re'~ fa~ si~ s s s s s
      }
      \stemNeutral
      \undo \omit Stem
      \undo \omit Beam
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

      \crossStaff { <fa, re' fa si>1 }
    }
}

  >>
  \layout{
    \context{
      \PianoStaff
      \consists #Span_stem_engraver
    }
  }
}
gilbertohasnofb
  • 1,984
  • 16
  • 28
  • 1
    Yes, this is the idiomatic solution. Add \voiceTwo on the visible notes in the "up" Staff to get stems down, not in the hidden ones. Also, you can use \hideNotes / \unHideNotes instead, which hides all but keeps ties. I'll put this on another similar response if you don't mind. – Paco Vila Apr 26 '20 at 17:22