lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Markup with long notes spacing


From: Aaron Hill
Subject: Re: Markup with long notes spacing
Date: Sun, 24 Oct 2021 17:36:00 -0700
User-agent: Roundcube Webmail/1.4.9

On 2021-10-24 2:44 pm, Erika Pirnes wrote:
Again, the issue is that using textLengthOn works well with score, but
in the individual parts either the short notes get stretched weirdly
(if I use textLengthOn with those) or markups above long notes are
positioned on top of each other (if I don't use textLengthOn with
those, or sometimes even if I do).

Ah, I see what the problem is now. A customized version of \textLengthOn seems to work:

%%%%
\version "2.18.2"

rit = \markup {\italic "rit." }
atempo = \markup {\italic "a tempo" }

tempos = {
% Modified logic from \textLengthOn...
% * extra-spacing-width gets a larger right-side value
%   so that \atempo and \rit sit a little further apart.
% * extra-spacing-height is tweaked to minimize impact
%   on the eighth notes spacing while still encouraging
%   TextScripts to sit side-by-side.
\override TextScript.extra-spacing-width = #'(0 . 1.5)
\override TextScript.extra-spacing-height = #'(1 . 1)

% Helps vertically align TextScript baselines, as the
% default allows \rit to sit too close to the staff
% since it does not contain any descenders.
\override TextScript.staff-padding = #1

s2^\atempo
s2^\rit
s2^\atempo
s2^\rit
}

notes = \relative c'{
c2. d8 b
c2. g8 b
}

othernotes = \relative c'{
e8 f g a g2 c2 b
}

\score {
  <<
  \new Staff << \tempos \notes >>
  \new Staff {\othernotes}
  >>
}

\score {
\new Staff << \tempos \notes >>
}

\score {
\new Staff << \tempos \othernotes >>
}
%%%%


-- Aaron Hill



reply via email to

[Prev in Thread] Current Thread [Next in Thread]