5.5.2 Within-staff objects

We have already seen how the commands \voiceXXX affect the direction of slurs, ties, fingering, and everything else that depends on the direction of the stems – see Explicitly instantiating voices. These commands are essential when writing polyphonic music to permit interweaving melodic lines to be distinguished. But occasionally it may be necessary to override this automatic behavior. This can be done for whole sections of music or even for an individual note. The property that controls this behavior is the direction property of each layout object. We first explain what this does, and then introduce a number of ready-made commands which avoid you having to code explicit overrides for the more common modifications.

Some layout objects like slurs and ties curve, bend, or point either up or down; others like stems and flags also move to the right or left when they point up or down. This is controlled automatically when direction is set.

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