7

I have a PianoStaff with two voices on the right hand. The lower voice with eighths is spread across the staves with \autochange and the additional pitch parameter nicely controls the turning point.

However, the beam of the eighth notes is placed below the left hand staff which doesn't look very nicely.

1]

There are similar questions about this topic here but they didn't help me with the issue. I strongly prefer \autochange as manual changes can become somewhat tedious. How can I put the beam between the staves as indicated in blue?

Here's the code:

\version "2.19.83"
\score {
  \new PianoStaff
  <<
    \new Staff = "up" {
      << 
        {
          \relative c' { \clef bass <g b d>2 <g b> }
        }
        \\
        {
          \autochange b, { d8 g, d g, d g, d g, }
        }
      >>
    }
    \new Staff = "down" {
      \clef bass
      \new Voice {
        \relative c, { g1 }
      }
    }
  >>
}
2

1 Answer 1

5

You need to restore the default stem direction with \revert Stem.direction because the notes are in a voice that has set the stem direction to DOWN. Use this:

\version "2.19.83"
\score {
  \new PianoStaff
  <<
    \new Staff = "up" {
      << 
        {
          \relative c' { \clef bass <g b d>2 <g b> }
        }
        \\
        {
          \revert Stem.direction                      % <--- added
          \autochange b, { d8 g, d g, d g, d g, }
        }
      >>
    }
    \new Staff = "down" {
      \clef bass
      \new Voice {
        \relative c, { g1 }
      }
    }
  >>
}

Resulting in:

enter image description here

2
  • Can this be done with version 2.18.2? Your code doesn't work for me. Apr 16, 2020 at 3:24
  • 1
    @PedroG.Mattos The command I added should also work in version 2.18.2. The above example does not work because of the \autochange command, which only accepts an additional argument to define the turning point in older versions of LilyPond. So, I think, you should ask a new question with your example. Apr 19, 2020 at 17:19

Your Answer

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

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