On Wed, May 8, 2024 at 6:41 AM Kris Van Bruwaene <kr...@yahoo.co.uk> wrote:
> Is there a simple solution for putting a tie between staves of a > pianostaff? I need to tie a note of the lower voice on the upper staff to a > note of the upper voice on the lower staff. I found this on StackExchange: > https://music.stackexchange.com/questions/74383/lilypond-ties-across-staves > but it's five years old and seems rather difficult to implement. > I use version 2.24.2 on Debian. > As far as I know, there is no easy way to do this. The StackExchange answer is the way I'd do it. It involves two ideas: changing staves and temporary voices. I use staff changes so much I always have this setup for my LilyPond code: %%% \version "2.24.3" % Put somewhere near the top of the file, or in an include file staffUp = \change Staff = "upper" staffDown = \change Staff = "lower" % Create rightHand and leftHand variables rightHand = \relative { c''2 \staffDown \voiceOne c, \staffUp c'1 } leftHand = \relative { \clef bass c2 \voiceTwo c c1 } % Label the two staves upper and lower \score { \new PianoStaff << \new Staff = "upper" \rightHand \new Staff = "lower" \leftHand >> } %%% The other part is knowing how to create temporary voices in LilyPond. The way used in the StackExchange example looks like this: << { % music here } \\ { % music here } >> The idea is that one voice will overlap the other as the two voices will render simultaneously. Putting these two ideas together gives you the ability to tie across staves. If the tie does not look the way you want it to, you can control its shape with the shape command, which looks like this: \shape #'((0 . 0) (0 . 0) (0 . 0) (0 . 0)) Tie So it is complex, but hopefully this has been instructive for you. -- Knute Snortum