[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Multi-rest with automatic bar number before and after it
From: |
Thomas Morley |
Subject: |
Re: Multi-rest with automatic bar number before and after it |
Date: |
Thu, 18 Feb 2016 23:10:33 +0100 |
2016-02-18 21:34 GMT+01:00 Craig Dabelstein <address@hidden>:
> 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
- Multi-rest with automatic bar number before and after it, Menu Jacques, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, Simon Albrecht, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, Menu Jacques, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, Craig Dabelstein, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, Simon Albrecht, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it,
Thomas Morley <=
- Re: Multi-rest with automatic bar number before and after it, Kieren MacMillan, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, tisimst, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, Thomas Morley, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, Craig Dabelstein, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, tisimst, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, Kieren MacMillan, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, Craig Dabelstein, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, Thomas Morley, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, Craig Dabelstein, 2016/02/18
- Re: Multi-rest with automatic bar number before and after it, Craig Dabelstein, 2016/02/18