Home
Random
Log in
Settings
About LilyPond wiki
LilyPond wiki
Search
Editing
Merging nested system start brackets
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Whilst staves can be grouped and nested using a variety of notations, such as <code>SystemStartSquare</code> or <code>SystemStartBrace</code> (which can be achieved automatically through the <code>systemStartDelimiterHierarchy</code> property), some editions of symphonic music use SystemStartBracket at different levels, which may result in unwanted collision between bracket tips. Here is a possible workaround, which masks the extraneous part of some bracket tips in order to give the impression that they merge with the lower-level bracket. <lilypond version="2.24"> %% If newer version like 2.25.xx are used, `normalize-color` needs to be applied. %% This should become the default once LSR moves to 2.26. #(define my-color (if (eqv? (second (ly:version)) 25) (normalize-color white) white)) maskUpperTip = #(lambda (grob) (let ((mask (ly:round-filled-box '(-1 . 1.25) '(-1.14 . 0) 0))) (ly:stencil-stack (ly:system-start-delimiter::print grob) Y UP (ly:make-stencil (list 'color my-color (ly:stencil-expr mask)))))) maskLowerTip = #(lambda (grob) (let ((mask (ly:round-filled-box '(-1 . 1.25) '(-0.0 . 1.14) 0))) (ly:stencil-stack (ly:system-start-delimiter::print grob) Y DOWN (ly:make-stencil (list 'color my-color (ly:stencil-expr mask)))))) \markup { \score { \new StaffGroup << \new StaffGroup \with { \override SystemStartBracket.extra-offset = #'(0.6 . 0) } << \new Staff { c'^\markup \rotate #-90 ":-(" } \new Staff { d' } >> \new Staff { e' } >> \layout {} } " " \score { \new StaffGroup << \new StaffGroup \with { \override SystemStartBracket.stencil = \maskUpperTip \override SystemStartBracket.extra-offset = #'(0.6 . 0) } << \new Staff { c'^\markup \rotate #-90 ":-)" } \new Staff { d' } >> \new Staff { e' } >> \layout {} } " " \score { \new StaffGroup << \new Staff { c'^\markup \rotate #-90 ":-)" } \new StaffGroup \with { \override SystemStartBracket.stencil = \maskLowerTip \override SystemStartBracket.extra-offset = #'(0.6 . 0) } << \new Staff { d' } \new Staff { e' } >> >> \layout {} } } </lilypond> [[Category:Simultaneous notes]] [[Category:Staff notation]] [[Category:Workaround]] [[Category:Snippet]]
Summary:
Please note that all contributions to LilyPond wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Meta:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)