Home
Random
Log in
Settings
About LilyPond wiki
LilyPond wiki
Search
Editing
Draw a bracket spanning multiple staves
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!
This snippet shows how to draw a bracket around objects on different staves. Syntax is <pre> ^\markup\openBracket #width #height</pre> and <pre> ^\markup\closeBracket #width #height</pre> <lilypond version="2.24" full> %% http://lsr.di.unimi.it/LSR/Item?id=957 %=> http://lilypond-french-users.1298960.n2.nabble.com/Imprimer-un-crochet-debut-et-un-crochet-fin-sur-un-systeme-de-portees-tc7581854.html % modified by P.P.Schneider on January 2016. % => http://www.lilypondforum.de/index.php?topic=434.msg11931#msg11931 %%% SNIPPET: %%% \header { tagline = ##f } #(define-markup-command (openBracket layout props height) (number?) (interpret-markup layout props (markup #:line (#:with-dimensions (cons 0 0) (cons 0 0) (#:path 0.25 (list (list (quote moveto) 0 0) (list (quote lineto) -1 0) (list (quote lineto) -1 (* height -1)) (list (quote lineto) 0 (* height -1)))))))) #(define-markup-command (closeBracket layout props height) (number?) (interpret-markup layout props (markup #:line (#:with-dimensions (cons 0 0) (cons 0 0) (#:path 0.25 (list (list (quote moveto) 1.3 0) (list (quote lineto) 2.3 0) (list (quote lineto) 2.3 (* height -1)) (list (quote lineto) 1.3 (* height -1)))))))) \new PianoStaff << \new Staff \relative c'' { a^\markup\openBracket #14 c'^\markup\closeBracket #16.5 } \new Staff { \clef F c' c' } >> %LSR prevent clipping \markup \vspace #1 %%% SNIPET END %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% OLD %%%% %{ %%% by P.P.Schneider on November 2014. #(define-markup-command (flip layout props myGrob) (markup?) (interpret-markup layout props (markup #:concat (#:null #:scale (cons -1 1) #:line (myGrob))))) #(define-markup-command (crochet layout props myBracketHeight) (number?) (interpret-markup layout props (markup #:line (#:with-dimensions (cons -1 0) (cons 0 2) (#:path 0.25 (list (list (quote moveto) 0 1.5) (list (quote lineto) -2 1.5) (list (quote lineto) -2 (* myBracketHeight -1)) (list (quote lineto) 0 (* myBracketHeight -1)))))))) global = { \key b\minor \time 3/4 \set Score.currentBarNumber = #243 \bar "" \mark\markup\box "M" } \score { << \new Voice = "Baryton" { \global \clef F <>^\markup\crochet #30 _\markup\tiny { \override #'(baseline-skip . 2)\center-column { "Suggested" "cut at" "bar 275*" } } r4 r c' c'-\tweak X-offset #1 ^\markup\flip\crochet #32 c' s } \new Lyrics \lyricsto "Baryton" { I } \new Lyrics \lyricsto "Baryton" { \markup\italic So } \new PianoStaff << \new Staff { \global g''4.( a''8) fis''4-. fis'' fis'' s } \new Staff { \global \clef F << { r4 <c' d'> q c' c' s } \\ { a2. d } >> } >> >> \layout { ragged-right = ##f \context { \Score \omit TimeSignature } } } %} </lilypond> [[Category:Editorial annotations]] [[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)