lilypond-user
[Top][All Lists]
Advanced

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

Control which voice if shifted left


From: Knute Snortum
Subject: Control which voice if shifted left
Date: Sat, 13 Jun 2015 15:10:24 +0000

Hello LilyPonders,

I have a piece where I want the lower right-hand voice to be shifted left whenever the chord is too crowded, but instead the default is for it to be shifted right.  The snippet below shows how I could use force-hshift on the notes I want shifted; the second measure is the default.

The piece is fairly short so I can put in all the hshifts by hand but I'm wondering if there is a way to tell the voice, Just left shift instead of right shift.

\version "2.19.21"
\language "english"

forceHShift = \once \override NoteColumn.force-hshift = -1.75

highVoice = \relative {
  s4 <b d>8 ( <cs e> <ds fs>4 ) |
  s4 <b d?>8 ( <cs e> <ds fs>4 ) |
}

upperMiddle = \relative {
  s4 \forceHShift a8 as \forceHShift c4 |
  s4 a?8 as c4 |
}

lowerMiddle = \relative {
  s2. * 2 |
}

lowVoice = \relative {
  g2-> r4 |
  g2-> r4 |
}

global = {
  \key c \major
  \time 3/4
}

upper = {
  \global
  \clef treble
  <<
    \new Voice { \voiceOne \highVoice }
    \new Voice { \voiceTwo \upperMiddle }
  >>
}

lower = {
  \global
  \clef bass
  <<
    \new Voice { \voiceThree \lowerMiddle }
    \new Voice { \voiceFour \lowVoice }
  >>
}

\score {
  \new PianoStaff <<
    \new Staff = "upper" \upper
    \new Staff = "lower" \lower
  >>
  \layout { 
    \context {
      \Score
      \hide BarLine
      \hide SpanBar
    }
    \context {
      \Staff
      \remove "Time_signature_engraver"
    }
  } 
}


reply via email to

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