2012/1/27 David Nalesnik
<address@hidden>
I'm new to the Scheme engraver thing, but I've written one which appears to work, at least with my minimal example. Basically, it finds the first note-column in a measure and adds extra space to the preceding bar line if there is no accidental. (It will also add space if there is a rest there, but that could be easily fixed if it's a problem.)
An immediate correction... I see that there was no reason for my engraver to acknowledge note-columns:
addSpace =
#(lambda (context)
(let ((bar-line '())
(accidental #f))
`((acknowledgers
(bar-line-interface
. ,(lambda (engraver grob source-engraver)
(set! bar-line grob)))
(accidental-interface
. ,(lambda (engraver grob source-engraver)
(set! accidental #t))))
(stop-translation-timestep
. ,(lambda (trans)
(if (null? bar-line)
'()
(if (not accidental)
(set! (ly:grob-property bar-line 'extra-spacing-width) '(0 . 1))))
(set! bar-line '())
(set! accidental #f))))))
-David