lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Minimal space between barline and next object


From: David Nalesnik
Subject: Re: Minimal space between barline and next object
Date: Fri, 27 Jan 2012 08:07:55 -0600

Hi again,

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]