Hi Shevek, 2012/2/9 Xavier Scheuer <[email protected]>: > On 9 February 2012 04:50, Shevek <[email protected]> wrote: >> >> I'm used to seeing repeat barlines with "wings" (like in the picture I've >> attached). Is there a way to do this in Lilypond? >> >> http://old.nabble.com/file/p33290846/reapetbarsci9.png > > Yeah, that would be nice. > You call it "wings" I think I call them "big ears", don't know why! ;D > > I can't remind somebody doing such request and find nothing related on > the LSR, in the doc or within the mailing lists archive, sorry. > > I think you could ask for it as a new feature request on the tracker, > that would be one thing at least. > > Cheers, > Xavier > > -- > Xavier Scheuer <[email protected]> > > _______________________________________________ > lilypond-user mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/lilypond-user
this was discussed in the german forum some time ago: http://www.lilypondforum.de/index.php?topic=879.0 We developed the attached work-around. BTW in output-lib.scm you can find "brace" and "bracket" in the bar-glyph-alist. AFAIK they aren't used anywhere. So any work-around has to fiddle about the line-breaks. HTH, Harm P.S. Please note that the file uses 2.12.3.
\version "2.12.3"
\layout {
indent = 10
short-indent = 10
}
\paper {
ragged-right =##f
}
#(define-markup-command (lthskip layout props amount) (number?)
;; lthskip = "line-thickness skip"
(let ((l-th (ly:output-def-lookup layout 'line-thickness)))
(ly:make-stencil "" (cons 0 (* amount l-th)) '(0 . 0) )))
#(define my-bar-glyph-alist
'((":|:" . (":|" . "|:"))))
#(define (my-bar-line::calc-glyph-name grob)
(let* (
; inlined this from lily-library.scm, since it isn't public
(index-cell (lambda (cell dir)
(if (equal? dir 1)
(cdr cell)
(car cell))))
(glyph (ly:grob-property grob 'glyph))
(dir (ly:item-break-dir grob))
(result (assoc glyph my-bar-glyph-alist))
(glyph-name (if (= dir CENTER)
glyph
(if (and result (string? (index-cell (cdr result) dir)))
(index-cell (cdr result) -1)
#f)))
)
glyph-name))
#(define (rotate-at-line-begin g)
"Rotate an item, but only at the start of the line."
(if (and (ly:item? g)
(equal? (ly:item-break-dir g) RIGHT))
(ly:grob-set-property! g 'rotation (list 180 0 0))
))
startRepeatBracket = {
\once \override Staff.BarLine #'stencil =
#(lambda (grob)
(ly:stencil-add
(ly:stencil-combine-at-edge
(ly:bar-line::print grob)
Y UP
(grob-interpret-markup grob (markup
#:musicglyph "brackettips.up"))
-0.1 0)
(ly:stencil-combine-at-edge
(ly:bar-line::print grob)
Y DOWN
(grob-interpret-markup grob (markup
#:musicglyph "brackettips.down"))
-0.1 0)))
\bar "|:"
}
stopRepeatBracket = {
\once \override Staff.BarLine #'stencil =
#(lambda (grob)
(ly:stencil-add
(ly:stencil-combine-at-edge
(ly:bar-line::print grob)
Y UP
(grob-interpret-markup grob (markup
#:concat (
#:lthskip 6
#:right-align
#:rotate 180
#:musicglyph "brackettips.down" )))
-0.1 0)
(ly:stencil-combine-at-edge
(ly:bar-line::print grob)
Y DOWN
(grob-interpret-markup grob (markup
#:concat (
#:lthskip 6
#:right-align
#:rotate 180
#:musicglyph "brackettips.up" )))
-0.1 0)))
\bar ":|"
}
combinedRepeatBracket = {
\once \override Staff.BarLine #'stencil =
#(lambda (grob)
(ly:stencil-add
(ly:stencil-combine-at-edge
(ly:bar-line::print grob)
Y UP
(grob-interpret-markup grob (markup
#:concat (
#:lthskip 3
#:concat (
#:right-align
#:vcenter
#:rotate 180 #:musicglyph "brackettips.down"
#:lthskip 3
#:vcenter
#:musicglyph "brackettips.up"))))
-0.1 0)
(ly:stencil-combine-at-edge
(ly:bar-line::print grob)
Y DOWN
(grob-interpret-markup grob (markup
#:concat (
#:lthskip 3
#:concat (
#:right-align
#:vcenter
#:rotate 180 #:musicglyph "brackettips.up"
#:lthskip 3
#:vcenter
#:musicglyph "brackettips.down"))))
-0.1 0)))
\bar ":|:"
}
Break = {
\once\override Staff.BarLine #'glyph-name = #my-bar-line::calc-glyph-name
\once\override Staff.BarLine #'after-line-breaking = #rotate-at-line-begin
\bar ":|:"
\break
}
%------------------------- Test ------------------------------------------------
%#(set-global-staff-size 11.22) %% smallest recommended staff size
#(set-global-staff-size 20) %% default staff size
% #(set-global-staff-size 35.2) %% largest recommended staff size
\score {
\relative c' {
\key cis\major
\mark\markup { \with-color #red \fontsize #'3 "Beispiel I" }
\grace s4
\startRepeatBracket
b'1
\stopRepeatBracket
\Break
\time 2/2
e
\stopRepeatBracket
\bar "|."
}
\layout {
ragged-right = ##t
}
}
\relative c' {
%\key cis\major
%\override Staff.BarLine #'thick-thickness = #8 schlecht!
%\override Staff.BarLine #'kern = #8 schlecht!
%\override Staff.BarLine #'thin-kern = #8 schlecht!
% \override Staff.BarLine #'bar-size = #8 klappt!
% \override Staff.BarLine #'hair-thickness = #8 klappt!
\mark\markup { \with-color #red \fontsize #'3 "Beispiel II" }
\grace s4
\startRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
des1 \stopRepeatBracket \Break
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
des1 \stopRepeatBracket \Break
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \combinedRepeatBracket
c1 \stopRepeatBracket
}
%{
Quellen:
http://www.lilypondforum.de/index.php?topic=578.msg3212#msg3212 define-markup-command lthskip
http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00307.html define my-bar-glyph-alist
define (my-bar-line::calc-glyph-name grob)
/scm/output-lib.scm define rotate-at-line-begin
%}
<<attachment: barlineOmegaBild.png>>
_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
