Measure spanner: Difference between revisions
Appearance
Import snippet from LSR |
mNo edit summary |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
Measure spanners are an alternate way to print annotated brackets. As opposed to horizontal brackets, they extend between two bar lines rather than two notes. The text is displayed in the center of the bracket. | Measure spanners are an alternate way to print annotated brackets. As opposed to horizontal brackets, they extend between two bar lines rather than two notes. The text is displayed in the center of the bracket. | ||
<lilypond version="2.24 | <lilypond version="2.24"> | ||
\layout { | \layout { | ||
\context { | \context { | ||
| Line 27: | Line 25: | ||
\key d \minor | \key d \minor | ||
\tweak text "Subject" | \tweak text "Subject" | ||
\tweak direction #DOWN | |||
\startMeasureSpanner | |||
\tuplet 3/2 8 { | \tuplet 3/2 8 { | ||
d16[ e f] g[ f e] f[ g a] bes[ a g] | d16[ e f] g[ f e] f[ g a] bes[ a g] | ||
| Line 36: | Line 34: | ||
\stopMeasureSpanner | \stopMeasureSpanner | ||
\tweak text "Counter-subject" | \tweak text "Counter-subject" | ||
\tweak direction #DOWN | |||
\startMeasureSpanner | |||
f8 e a r r16 b, c d e fis g e | f8 e a r r16 b, c d e fis g e | ||
a gis a b c fis, b a gis e a4 g8 | a gis a b c fis, b a gis e a4 g8 | ||
| Line 45: | Line 43: | ||
</lilypond> | </lilypond> | ||
[[Category:Contexts and engravers]] | |||
[[Category:Editorial annotations]] | [[Category:Editorial annotations]] | ||
[[Category:Included in the official documentation]] | [[Category:Included in the official documentation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 12:22, 12 December 2025
Measure spanners are an alternate way to print annotated brackets. As opposed to horizontal brackets, they extend between two bar lines rather than two notes. The text is displayed in the center of the bracket.
\version "2.24"
\layout {
\context {
\Staff
\consists Measure_spanner_engraver
}
}
<<
\new Staff \relative c'' {
\key d \minor
R1*2
\tweak text "Answer"
\startMeasureSpanner
\tuplet 3/2 8 {
a16[ b c] d[ c b] c[ d e] f[ e d]
}
e8 a gis g
fis f e d~ d c b e
\stopMeasureSpanner
}
\new Staff \relative c' {
\key d \minor
\tweak text "Subject"
\tweak direction #DOWN
\startMeasureSpanner
\tuplet 3/2 8 {
d16[ e f] g[ f e] f[ g a] bes[ a g]
}
a8 d cis c
b bes a g~ g f e a
\stopMeasureSpanner
\tweak text "Counter-subject"
\tweak direction #DOWN
\startMeasureSpanner
f8 e a r r16 b, c d e fis g e
a gis a b c fis, b a gis e a4 g8
\stopMeasureSpanner
}
>>