lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using force-hshift to create a cross-staff chord


From: Knute Snortum
Subject: Using force-hshift to create a cross-staff chord
Date: Sat, 18 Jul 2015 16:52:13 -0700

I have a situation where I'm creating cross-staff chords.  All is well until the melody note is the same as the top chord note.  LilyPond (correctly) shifts the chord to the right, but now the note in the lower staff doesn't create a cross-staff chord.  I thought the answer would be to force-hshift the lower note but it doesn't seem to "move".

In the example below, the problem is in beat 2 of the first measure.  I've tried force-hshifting the other notes but I haven't been able to get it working.

\version "2.19.23"
\language "english"

\score {
  \new PianoStaff <<
    \new Staff {
      \clef treble 
      <<
        \new Voice {
          \voiceOne 
          \relative {
            g'4 f4 ~ f2 ~ |
            f1 |
          }
        }
        \new Voice {
          \voiceTwo
          \relative {
            \crossStaff {
              s4 <c' f>2 q4 |
              s4 <c f>2 q4 |
            }
          }
        }
      >>
    }
    \new Staff {
      \clef bass
      <<
        \new Voice {
          \voiceTwo
          \relative {
            \crossStaff { 
              a4\rest \once \override NoteColumn.force-hshift = 1 a2 a4 |
              a4\rest a2 a4 |
            }
          }
        }
        \new Voice {
          \voiceFour
          \relative {
            f,1 |
            f1 |
          }
        }
      >>
    }
  >>
  \layout {
    \context {
      \PianoStaff
      \consists #Span_stem_engraver
    }
  }
}

Knute Snortum
(via Gmail)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]