Am 23.11.2015 um 09:57 schrieb Simon Albrecht: > On 23.11.2015 09:49, Urs Liska wrote: >> Just to finish this thread up (apart from the opened issue) I'll report >> how I finally dealt with the issue in my score. >> >> It turns out that >> \override SpacingSpanner.uniform-stretching = ##t >> is what I need to make the overall appearance of the score much better >> than default. This completely suppresses the optical spacing of the >> semiquavers but that is much less an issue than the default look. >> >> However, this leads to a number of cases where the last semiquaver of a >> beat is too close to the next item (see first >> attachment for an example). I found that >> \once \override NoteHead.extra-spacing-width = #'(0 . 2) >> seems the way to work around this for an individual instance (see second >> attachment). >> >> In order to make that manageable I wrote the following function (using >> the edition-engraver) >> >> extraSpace = >> #(define-void-function (extra-space measure beat)((pair?) integer? >> integer?) >> (let* ((semiquaver (- (* beat 4) 1)) >> (measurepos (cons semiquaver 16)) >> (space (or extra-space (cons 0 2)))) >> #{ \editionMod fullscore #measure #measurepos the.swan.Staff.B >> \once \override NoteHead.extra-spacing-width = #space #})) > > I like staying in Scheme for such things, which David K. recently made > possible: > (editionMod 'fullscore measure measurepos '(the swan Staff B) > (once (propertyOverride '(NoteHead extra-spacing-width) space))) > >> >> which allows me to simply write >> \extraSpace 3 3 >> to apply the tweak to beat 3 in measure 3 >> or >> \extraSpace #'(0 . 5) 3 6 >> to apply the tweak to beat 6 in measure 3, but with a custom value. >> >> To make that even more manageable I wrote the wrapper function >> >> extraSpaces = >> #(define-void-function (spaces)(list?) >> (for-each >> (lambda (space) >> #{ \extraSpace #(car space) #(cdr space) #}) > > (extraSpace (car space) (cdr space)), consequently. > Nice, isn’t it? >
Indeed, thank you for pointing me to that. I had taken notice of this improvement but obviously didn't internalize sufficiently so I didn't realize I can do it like this. Urs >> spaces)) >> >> which now allows me to write >> >> \extraSpaces #'((3 . 3) >> (3 . 6)) >> >> etc. > > Yours, Simon _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond