Positioning segno and coda (with line break): Difference between revisions
Appearance
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series |
mNo edit summary |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
If you want to place an exiting segno sign and add text like “D.S. al Coda” next to it where usually the staff lines are you can use this snippet. The coda will resume in a new line. There is a variation documented in this snippet, where the coda will remain on the same line. | If you want to place an exiting segno sign and add text like “D.S. al Coda” next to it where usually the staff lines are you can use this snippet. The coda will resume in a new line. There is a variation documented in this snippet, where the coda will remain on the same line. | ||
<lilypond version="2.24" | <lilypond version="2.24"> | ||
\relative c'' { | |||
c4 c c c | c c c c | | |||
\repeat segno 2 { | |||
c4 c c c | c c c c | | |||
\alternative { | |||
\volta 1 { | |||
c4 c c c | c c c c | | |||
% If you don't use \break at Coda, use \noBreak here | |||
% and after \bar "" below. | |||
\noBreak | |||
\section % double bar line | |||
\cadenzaOn % pause bar count | |||
\stopStaff % remove staff lines | |||
% Increasing the unfold counter will expand the staff-free space | |||
\repeat unfold 4 { | |||
s1 | |||
\bar "" | |||
} | } | ||
% Place JumpScript where the staff would normally be. | |||
\once \override Score.JumpScript.outside-staff-priority = ##f | |||
\once \override Score.JumpScript.Y-offset = 0 | |||
\startStaff % resume bar count | |||
\cadenzaOff % show staff lines again | |||
} | } | ||
} | } | ||
} | } | ||
\sectionLabel "Coda" | |||
% Show Coda on a new line | |||
\break | |||
\repeat unfold 6 { c4 c c c } | |||
\fine | |||
} | } | ||
</lilypond> | </lilypond> | ||
[[Category:Breaks]] | |||
[[Category:Repeats]] | [[Category:Repeats]] | ||
[[Category:Symbols and glyphs]] | [[Category:Symbols and glyphs]] | ||
[[Category:Workaround]] | [[Category:Workaround]] | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 12:44, 9 December 2025
If you want to place an exiting segno sign and add text like “D.S. al Coda” next to it where usually the staff lines are you can use this snippet. The coda will resume in a new line. There is a variation documented in this snippet, where the coda will remain on the same line.
\version "2.24"
\relative c'' {
c4 c c c | c c c c |
\repeat segno 2 {
c4 c c c | c c c c |
\alternative {
\volta 1 {
c4 c c c | c c c c |
% If you don't use \break at Coda, use \noBreak here
% and after \bar "" below.
\noBreak
\section % double bar line
\cadenzaOn % pause bar count
\stopStaff % remove staff lines
% Increasing the unfold counter will expand the staff-free space
\repeat unfold 4 {
s1
\bar ""
}
% Place JumpScript where the staff would normally be.
\once \override Score.JumpScript.outside-staff-priority = ##f
\once \override Score.JumpScript.Y-offset = 0
\startStaff % resume bar count
\cadenzaOff % show staff lines again
}
}
}
\sectionLabel "Coda"
% Show Coda on a new line
\break
\repeat unfold 6 { c4 c c c }
\fine
}