Le 03/09/2021 à 20:52, Kenneth Wolcott a écrit :
Hi;

   I am engraving some music that has a "poco rit." embedded inside a hairpin.

   See attached image.

   How do I do that in Lilypond?

   I'm using Lilypond 2.22.0

Thanks,
Ken Wolcott


Try this:

\version "2.22.1"

\relative {
  % Make sure the hairpin will be drawn below the text
  % (this can depend on unrelated circumstances).
  \once \override Hairpin.layer = -2
  a'4--->\>
  % Set distance from the staff.
  \once \override TextScript.Y-offset = -2
  % Prevent the hairpin from moving away to avoid the text.
  \once \override TextScript.vertical-skylines = ##f
  % Print a white background around the text.
  \once \override TextScript.whiteout = 10
  % Make sure the text is above the hairpin but below other grobs
  % (such as the slur).
  \once \override TextScript.layer = -1
  a8(_\markup \italic "poco rit." bes a g f4)\fermata\!
}

Take a look at
http://lilypond.org/doc/v2.22/Documentation/notation/visibility-of-objects#painting-objects-white

Best,
Jean


Reply via email to