I'm trying to typeset the glissando shown below using Lilypond:

enter image description here

There are examples in the docs but they weren't helpful.

My code:

\version "2.24.0"

upper = \relative{
\clef treble
\key c \major
\time 5/4
\override VoiceFollower.style = #'zigzag 
<c'' e fis a>2.\glissando
\change Staff = "lower"
<a,,, a'>4
\change Staff = "upper"

lower = \relative{
\clef bass
\key c \major
\time 5/4
<a c e>2. \skip 4 r4

\score {\new PianoStaff <<
  \new Staff = "upper" \upper
  \new Staff = "lower" \lower
\layout {}
\midi { }

gives me:

enter image description here

How do I fix this?

1 Answer 1


To accomplish this, set the \glissandoMap, which tells LilyPond which note within each chord to connect via the glissando line.

From the LilyPond documentation (link below):

A glissando can connect notes in chords. If anything other than a direct one-to-one pairing of the notes in the two chords is required the connections between the notes are defined by setting \glissandoMap, where the notes of a chord are assumed to be numbered from zero in the order in which they appear in the input ‘.ly’ file.

In the specific case here, add
\set glissandoMap = #'((3 . 1))
after the VoiceFollower setting.

For more on \glissandoMap see 1.3.3 Expressive marks as lines: Glissando in the LilyPond documentation.

  • thanks, is there also a way to include a two-beat rest symbol for the treble staff (like in my screenshot)? Or is it better notation to have a one-beat rest at the end? Commented Dec 30, 2022 at 22:30
  • @MedullaOblongata Just as r2 after changing back to the upper staff, below the closing bracket.
    – Aaron
    Commented Dec 30, 2022 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.