lilypond-learning: The staff-padding property
The ‘staff-padding’ property
............................
‘staff-padding’ can be used to align objects such as dynamics along a
baseline at a fixed distance from the staff, when no other notation
forces them further from the staff. It is not a property of
‘DynamicText’ but of ‘DynamicLineSpanner’. This is because the baseline
should apply equally to *all* dynamics, including those created as
extended spanners. So this is the way to align the dynamic marks in the
example taken from the previous section:
\override DynamicLineSpanner.staff-padding = #3
a4\f b\mf a\p b\mp
[image src="" alt="[image of music]" text="image of music" ]