[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Customizing the position of the dots in repeat bar lines
From: |
Paul Morris |
Subject: |
Re: Customizing the position of the dots in repeat bar lines |
Date: |
Sun, 20 Apr 2014 11:19:22 -0700 (PDT) |
Sent it too soon... here's a revised version that's a little simpler, more
concise.
-Paul
\version "2.18.2"
#(define (make-custom-colon-bar-line grob extent)
"Draw repeat dots, placed at @var{dot-positions}.
The coordinates of @var{dot-positions} are equivalent to
those of StaffSymbol.line-positions, a dot-position of X
and a line-position of X will appear at the same vertical position."
(let* ((staff-space (ly:staff-symbol-staff-space grob))
(dot (ly:font-get-glyph (ly:grob-default-font grob) "dots.dot"))
(dot-positions '(-1 1))
(stencil empty-stencil))
(for-each
(lambda (dp)
(set! stencil (ly:stencil-add stencil
(ly:stencil-translate-axis dot (* dp (/ staff-space
2)) Y))))
dot-positions)
stencil))
% comment out this line to see the difference:
#(add-bar-glyph-print-procedure ":" make-custom-colon-bar-line)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\new Staff \with {
\override StaffSymbol.line-positions = #'(-4 -2 2 4)
\override StaffSymbol.staff-space = #1.1
} {
\relative f' {
c1
\repeat volta 2 {
d4 e f g
}
}
}
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Customizing-the-position-of-the-dots-in-repeat-bar-lines-tp161666p161668.html
Sent from the User mailing list archive at Nabble.com.