Hi Group,
I would like to align markups above my staff - I
checked the page regarding vertical spacing and found
"\override TextScript.outside-staff-padding = #3" but
this just raised all markups but still unaligned
\override TextScript.outside-staff-priority = ##f
didn't help either...
Any hints?
Best regards
Joei
Hi Joei.
Well, I don't know if this is the best way to do things,
but the way I've been dealing with this kind of thing is by
abusing the Dynamics context, using it to hold and align all
kinds of non-dynamic kinds of things. So, if I were doing it
your example would be something like:
\version "2.25.1"
\language "english"
music = \relative c'' {
\partial 2 f4\rest c4
a2 c4( f)
d4 d8 c b4 b
g2 b4( d)
c4 c8 b a4 c
c4 b8 a b4( c)
}
textMarkups = {
\partial 2 s4 s4-\markup entfernend
s1
s2 s4-\markup diminuendo s4
s2. s4-\markup poco
s2 s4-\markup a s4
s4 s4-\markup poco s2
}
\score {
<<
\new Dynamics \with {
\override
VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #4
}
{
\textMarkups
}
\new Staff {
\music
}
>>
}
The \override in the Dynamics context puts some extra
space between the Dynamics line (here, the text) and the
staff below it. Details in the docs at:
There's most likely any number of other ways to go about
this, with many of them probably better than this. One
drawback to this method being that you basically have to
enter the music twice - once as the notes for the staff and
once as the rhythm for the dynamics. But if it's a
relatively short piece that might not be too bad - most of
what I work with is pretty short so I don't mind doing it
this way.
But maybe this'll at least get you started.
Michael