[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatic setting custom bar lines
From: |
Thomas Morley |
Subject: |
Re: Automatic setting custom bar lines |
Date: |
Mon, 13 Feb 2012 01:54:57 +0100 |
Hi again,
perhaps you may want to use:
\version "2.14.2"
%\version "2.15.29"
CustomDefaultBarLineEngraver =
#(lambda (context)
(let ((glyph "|"))
`((acknowledgers
(bar-line-interface .
,(lambda (engraver grob source-engraver)
(if (equal? glyph (ly:grob-property grob 'glyph))
(set! (ly:grob-property grob 'bar-extent) '(0 . 2))
#f)))))))
\new Staff \relative c'' {
% If you don't want to put it in \layout use it like:
c1 \bar "" c1 c c \bar ":|:" \break
c1 c1 \bar "||" c c \bar ":|:" \break
\repeat volta 2 {
c1 c1 c c \bar ":|:" } \break
c1 \bar ":|S|:" c1 \bar "S" c \bar "|."
}
\layout {
\context {
\Staff
\consists #CustomDefaultBarLineEngraver
}
}
This is my very first custom-scheme-engraver. I'd appreciate if
someone more experienced could have a look on it.
Thanks,
Harm