lilypond-learning: The right-padding property
The ‘right-padding’ property
............................
The ‘right-padding’ property affects the spacing between the accidental
and the note to which it applies. It is not often required, but the
default spacing may be wrong for certain special accidental glyphs or
combination of glyphs used in some microtonal music. These have to be
entered by overriding the accidental stencil with a markup containing
the desired symbol(s), like this:
sesquisharp = \markup { \sesquisharp }
\relative c'' {
c4
% This prints a sesquisharp but the spacing is too small
\once \override Accidental.stencil = #ly:text-interface::print
\once \override Accidental.text = #sesquisharp
cis4 c
% This improves the spacing
\once \override Score.AccidentalPlacement.right-padding = #0.6
\once \override Accidental.stencil = #ly:text-interface::print
\once \override Accidental.text = #sesquisharp
cis4 |
}
[image src="" alt="[image of music]" text="image of music" ]
This necessarily uses an override for the accidental stencil which will
not be covered until later. The stencil type must be a procedure, here
changed to print the contents of the ‘text’ property of ‘Accidental’,
which itself is set to be a sesquisharp sign. This sign is then moved
further away from the note head by overriding ‘right-padding’.