[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Introduction Bracket glyphs
From: |
Thomas Morley |
Subject: |
Re: Introduction Bracket glyphs |
Date: |
Sun, 19 Jun 2016 12:16:57 +0200 |
Hi all,
2016-06-19 11:55 GMT+02:00 Andrew Bernard <address@hidden>:
> 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
- Re: Introduction Bracket glyphs, (continued)
- Re: Introduction Bracket glyphs, Pierre Perol-Schneider, 2016/06/19
- Re: Introduction Bracket glyphs, Andrew Bernard, 2016/06/19
- Re: Introduction Bracket glyphs, Malte Meyn, 2016/06/19
- Re: Introduction Bracket glyphs, Malte Meyn, 2016/06/19
- Re: Introduction Bracket glyphs, Urs Liska, 2016/06/19
- Re: Introduction Bracket glyphs, Malte Meyn, 2016/06/19
- Re: Introduction Bracket glyphs, Malte Meyn, 2016/06/19
- Re: Introduction Bracket glyphs, Urs Liska, 2016/06/19
- Re: Introduction Bracket glyphs, Pierre Perol-Schneider, 2016/06/19
- Re: Introduction Bracket glyphs, David Kastrup, 2016/06/19
- Re: Introduction Bracket glyphs,
Thomas Morley <=
- Re: Introduction Bracket glyphs, Pierre Perol-Schneider, 2016/06/19
Re: Introduction Bracket glyphs, Graham King, 2016/06/19
Re: Introduction Bracket glyphs, tisimst, 2016/06/19