[Top][All Lists]

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

Re: Irregularity in horizontal spacing

From: Simon Albrecht
Subject: Re: Irregularity in horizontal spacing
Date: Mon, 23 Nov 2015 09:57:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

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

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
     \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?)
     (lambda (space)
       #{ \extraSpace #(car space) #(cdr space) #})

(extraSpace (car space) (cdr space)), consequently.
Nice, isn’t it?


which now allows me to write

\extraSpaces #'((3 . 3)
                 (3 . 6))


Yours, Simon

reply via email to

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