Hi all, 2016-06-19 11:55 GMT+02:00 Andrew Bernard <andrew.bern...@gmail.com>: > Hi Pierre, > > You beat me to it. :-) I would agree with the shape of this solution. Having > searched the LSR for something similar, don’t you think it would make a good > candidate for the LSR in fact? These types of brackets are very useful in > general.
There is http://lsr.di.unimi.it/LSR/Item?id=843 (which could be rewritten in a more simple way, though) In general, in the LSR-snippet the brackets are defined using \path, Pierre combines \draw-line. Both is tedious, so I defined a markup-command doing this, see below. Also, both are going for a text-spanner, with the disadvantage not being able to position the brackets over a bar-line other then by moving them, with the need to find the values by try and error. And as soon as the layout changes the values must be reworked... Thus I refused to define a Spanner, but used RehearsalMark. Ofcourse equal vertical position over the Staff can't be warranted anymore, which may be an issue sometimes. More comments inline. \version "2.18.2" #(define-markup-command (draw-connected-line layout props pts)(list?) #:properties ((thickness 0.1)) " A line connecting points Draws a line connecting points from @var{pts}. Curves are possible. @var{thickness} may be customized using an override. @lilypond[verbatim,quote] \\markup \\draw-connected-line #'((1 1) (2 0) (3 1) (4 0) (1.9 -2.1 2.1 -2.1 0 0)) @end lilypond" (make-connected-path-stencil pts thickness 1 1 #f #f)) openBracket = \markup \draw-connected-line #'((-1 0) (-1 -2)) closeBracket = \markup \draw-connected-line #'((1 0) (1 -2)) %% openBracket/closeBracket are used as RehearsalMarks to ensure positioning %% over bar-lines. Sometimes with the need to insert \bar "" %% The RehearsalMark.self-alignment-X needs to be tweaked to get best %% visual output. bracketStart = { \once \override Score.RehearsalMark.self-alignment-X = #LEFT \mark \openBracket } bracketStop = { \once \override Score.RehearsalMark.self-alignment-X = #RIGHT \mark \closeBracket } \relative c'' { \time 3/4 \key d \major \bar "" \bracketStart a2 fis4 a2 fis4 a( g) b e,2 r4 \bracketStop r2. } Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user