lilypond-learning: The positions property

 
 The ‘positions’ property
 ........................
 
 The ‘positions’ property allows the vertical position and hence the
 slope of tuplets, slurs, phrasing slurs and beams to be controlled
 manually.
 
    Here’s an example in which the phrasing slur and slur collide:
 
      a8 \( ( a'16 ) a \)
      [image src="" alt="[image of music]" text="image of music"]
 
 One possibility would be to move the two ends of the phrasing slur
 higher.  We can try setting the left end to 2.5 staff-spaces above the
 centre line and the right end to 4.5 above, and LilyPond will select the
 phrasing slur from the candidates it has found with its end points
 closest to these:
 
      \once \override PhrasingSlur.positions = #'(2.5 . 4.5)
      a8 \( ( a'16 ) a \)
      [image src="" alt="[image of music]" text="image of music"]
 
    This is an improvement, but why not lower the right end of the slur a
 little?  If you try it you’ll find it can’t be done in this way.  That’s
 because there are no candidate slurs lower than the one already
 selected, and in this case the ‘positions’ property has no effect.
 However, ties, slurs and phrasing slurs _can_ be positioned and shaped
 very precisely when necessary.  To learn how to do this, see See
 (lilypond-notation)Modifying ties and slurs.
 
    Here’s a further example.  We see that the beams collide with the
 ties:
 
      {
        \time 4/2
        <<
          { c'1 ~ c'2. e'8 f' }
          \\
          { e''8 e'' e'' e''  e'' e'' e'' e''  f''2 g'' }
        >>
        <<
          { c'1 ~ c'2. e'8 f' }
          \\
          { e''8 e'' e'' e''  e'' e'' e'' e''  f''2 g'' }
        >>
      }
      [image src="" alt="[image of music]" text="image of music"]
 
 This can be resolved by manually moving both ends of the beam up from
 their position at 1.81 staff-spaces below the center line to, say, 1:
 
      {
        \time 4/2
        <<
          { c'1 ~ c'2. e'8 f' }
          \\
          {
            \override Beam.positions = #'(-1 . -1)
            e''8 e'' e'' e''  e'' e'' e'' e''  f''2 g''
          }
        >>
        <<
          { c'1 ~ c'2. e'8 f' }
          \\
          { e''8 e'' e'' e''  e'' e'' e'' e''  f''2 g'' }
        >>
      }
      [image src="" alt="[image of music]" text="image of music"]
 
 Note that the override continues to apply in the first voice of the
 second measure of eighth notes, but not to any of the beams in the
 second voice.