lilypond-user
[Top][All Lists]
Advanced

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

Re: Bar numbers on lines beginning with a partial measure


From: Aaron Hill
Subject: Re: Bar numbers on lines beginning with a partial measure
Date: Sun, 06 Feb 2022 02:49:53 -0800

On 2022-02-06 1:37 am, Jean Abou Samra wrote:
Are you aware of the options to print a parenthesized bar number at
the start of the line if it's the continuation of a measure? See
input/regression/bar-number-visibility-* (sadly missing documentation
at the moment). I don't have an opinion on whether that is better
practice or not than what you suggest. It is, at any rate, what Gould
recommends (Behind Bars p. 490).

Thanks, Jean. first-bar-number-invisible-save-broken-bars is one of the undocumented options that seems almost perfect.

At first glance, though, the parenthesized numbers stand out too much. Thankfully, the parenthesization logic is within robust-bar-number-function, which is easily adaptable as Scheme code. Some quick testing with the \parenthesize markup command looks better than relying on the glyphs of the number font which are a little too wide.

;;;;
;; ...preamble from robust-bar-number-function...
  (let*
   ((number-and-power (get-number-and-power 0 0))
    (begin-measure (= 0 (ly:moment-main-numerator measure-pos)))
    (text (string-append (number->string barnum)
(make-letter "" (car number-and-power) (cdr number-and-power)))))
  (if begin-measure text
   (markup #:override '(line-thickness . 0.05)
           #:override '(padding . 0.05)
           #:override '(width . 0.2)
           #:parenthesize #:smaller text))))
;;;;

I will have to try this for awhile to see if I like it better than labelling the first full measure. It is interesting that all bar numbers would be consistently aligned on the left margin, so that might prove useful.


-- Aaron Hill



reply via email to

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