[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 21:37:30 -0700 (PDT) |
Paul Morris wrote
> Sent it too soon... here's a revised version that's a little simpler,
> more concise.
And another one, now with dot-positions supplied as an argument. -Paul
\version "2.18.2"
#(define ((make-custom-colon-bar-line dot-positions) 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 indicate 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"))
(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 '(-1 1)))
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\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
}
c,1
\bar ".|:"
d4 e f g
\bar ":|."
}
}
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/Customizing-the-position-of-the-dots-in-repeat-bar-lines-tp161666p161677.html
Sent from the User mailing list archive at Nabble.com.