2016-02-18 21:34 GMT+01:00 Craig Dabelstein <craig.dabelst...@gmail.com>:
> Hi Lilyponders,
>
> On this same subject, is it possible to put the span of bar numbers below a
> multi bar rest e.g. below a 14-bar multi bar rest, have it print (centered)
> 1-14?

A hacky solution for one-time use:

\version "2.19.36"

\layout {
  \override Score.BarNumber.break-visibility = ##(#t #t #t)
}

fancyMultiMeasureRestNumber = {
  \applyOutput Voice.MultiMeasureRestNumber
  #(lambda (g c p)
    (let* ((currentBarNumber (ly:context-property c 'currentBarNumber))
           (mmr-length
             (ly:moment-main
               (ly:prob-property (ly:grob-property g 'cause) 'length))))
    (ly:grob-set-property! g 'text
     #{
       \markup
         \center-column {
           #(number->string mmr-length)
           %% value found by try and error
           \translate #'(0 . -7.5)
           \with-dimensions #empty-interval #empty-interval
           \halign #CENTER
           \line
           #(list (number->string currentBarNumber)
            " - "
            (number->string (1- (+ currentBarNumber mmr-length))))
         }
     #})))
  \compressFullBarRests
}

{
  c'1
  \fancyMultiMeasureRestNumber R1*14
  c'1
}

A cleaner one would likely need an engraver.

HTH,
  Harm

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to