The force-hshift property

We can now see how to apply the final corrections to the Chopin example introduced at the end of I’m hearing voices, which was left looking like this:

\new Staff \relative {
  \key aes \major
  <<
    { c''2 aes4. bes8 }
    \\
    { <ees, c>2 des }
    \\
    \\
    { aes'2 f4 fes }
  >> |
  <c ees aes c>1 |
}

[image of music]

The inner note of the first chord (i.e., the A-flat in the fourth Voice) need not be shifted away from the note column of the higher note, so we use \shiftOff.

In the second chord we prefer the F to line up with the A-flat and the lowest note to be positioned slightly right to avoid a collision of stems. We achieve this by setting force-hshift in the NoteColumn of the low D-flat to move it to the right by half a staff space, and setting force-hshift for the F to zero. Note that we use \once to avoid the settings propagating beyond the immediate musical moment, although in this small example the \once and the second \override in Voice four could be omitted. This would not be good practice.

Here’s the final result:

\new Staff \relative {
  \key aes \major
  <<
    { c''2 aes4. bes8 }
    \\
    { <ees, c>2 \once \override NoteColumn.force-hshift = 0.5 des }
    \\
    \\
    { \once \shiftOff aes'2 \once \shiftOff f4 fes }
  >> |
  <c ees aes c>1 |
}

[image of music]


LilyPond Learning Manual v2.25.14 (development-branch).