Hi Jakob, 2012/2/13 jakob lund <jakob.be...@gmail.com>: > 13. feb. 2012 01.54 skrev Thomas Morley <thomasmorle...@googlemail.com>: >> 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. > > > This is very nice! A while ago I was trying to shorten every _other_ > bar line shorter, but couldn't figure out how to do it automatically. > With "your" technique it's easy to extract the bar number from > "context": > > CustomOtherBarLineEngraver = > #(lambda (context) > (let ((glyph "|")) > `((acknowledgers > (bar-line-interface . > ,(lambda (engraver grob source-engraver) > (let ((oddbar (remainder (ly:context-property context > 'currentBarNumber) 2))) > (if (and (eq? oddbar 0) > (equal? glyph (ly:grob-property grob 'glyph))) > (set! (ly:grob-property grob 'bar-extent) '(-1 . 1)) > #f)))))))) > > I suppose the code could be parameterized in order to make it more > generally useful... > > Cheers > Jakob.
thanks for your reply! I will try to learn more and improve my skills. :) Best, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user