I'm trying to put custom text in voltas when engraving with Lilypond. The problem is not to add text, but to add it with the formatting I want. I am aware that a similar question was asked and answered ( Markup text inside second volta bracket ) but it doesn't answer my problem because the result is really ugly. It's what I already have, except the method is different; I tried it, so except if I did something wrong, it's not what I want.
What I have for now looks like :
The idea is that the text in the voltas would rather look like the text I put under the B and the C in the first two measures.
My code for now is :
%%%%%%%%%%
%% VERSION
%%%%%%%%%%
\version "2.20.0"
\paper {
#(include-special-characters)
}
%%%%%%%%%
%% LYRICS
%%%%%%%%%
singerLyrics = \lyricmode {
_ |
_ |
_ |
_ |
}
null = {
\time 4/4
}
%%%%%%%%%%%
%% PIANO UP
%%%%%%%%%%%
aaaa = _ \markup { \italic \teeny "Suite" }
bbbb = \tweak DynamicText.self-alignment-X #LEFT
#(make-dynamic-script
(markup
#:with-dimensions '(0 . 5) '(0 . 0) #:line
(#:normal-text #:italic #:teeny "Fin")))
pianoUpper = \relative c' {
\override DynamicLineSpanner.staff-padding = #3
\override BreathingSign.text = \markup {
\musicglyph #"scripts.caesura.straight"
}
\clef "treble"
\key f \major
\time 4/4
bes1 \bbbb
\set Score.repeatCommands = #'((volta "Suite"))
c \aaaa
\set Score.repeatCommands = #'((volta #f)) \bar "||"
\set Score.repeatCommands = #'((volta "Fin"))
d
\set Score.repeatCommands = #'((volta #f))
\bar "||"
e_"D.S. al Fine" \bar "S-S"
\break
}
%%%%%%%%%%%%
%% PIANO LOW
%%%%%%%%%%%%
pianoLower = \relative c {
\clef "bass"
\key f \major
}
%%%%%%%%
%% SCORE
%%%%%%%%
\score {
<<
\new PianoStaff <<
\new Staff = "upper" <<
\new Voice \pianoUpper
\new NullVoice = "singer" \null
>>
\new Lyrics \with { alignAboveContext = "upper" } \lyricsto singer \singerLyrics
\new Staff = "lower" \pianoLower
>>
>>
}
Any idea how to obtain that ?