lilypond-user
[Top][All Lists]
Advanced

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

Re: MultiMeasureRestNumber centered between staves


From: Tim McNamara
Subject: Re: MultiMeasureRestNumber centered between staves
Date: Wed, 27 Nov 2013 16:52:17 -0600

On Nov 26, 2013, at 2:17 PM, Daniel Rosen <address@hidden> wrote:

>> -----Original Message-----
>> From: Daniel Rosen
>> Sent: Saturday, November 23, 2013 9:54 AM
>> To: 'Ryan McClure'; address@hidden
>> Subject: RE: MultiMeasureRestNumber centered between staves
>> 
>> From: Ryan McClure [mailto:address@hidden
>> Sent: Friday, November 22, 2013 10:00 PM
>> To: address@hidden
>> Subject: Re: MultiMeasureRestNumber centered between staves
>> 
>>> I think that this may do the trick:
>>> 
>>> 
>>> \version "2.17.29"
>>> 
>>> \score {
>>> \new PianoStaff <<
>>> \new Staff {
>>> \compressFullBarRests
>>> \override MultiMeasureRest #'expand-limit = #1 \once \override
>>> MultiMeasureRestNumber #'transparent = ##t
>>> R1*9
>>> }
>>> \new Staff {
>>> \compressFullBarRests
>>> \override MultiMeasureRest #'expand-limit = #1 \once \override
>>> MultiMeasureRestNumber #'Y-offset = 3.5
>>> R1*9
>>> }
>>>>> 
>>> }
>>> 
>>> Essentially, this trick removes the "9" from the top staff by hiding it. The
>> bottom staff's "9" is moved up to the center of these > two staves. When
>> you use this, if it is not centered perfectly, change the Y-offset from 3.5 
>> to
>> whatever you need.
>>> 
>>> Let us know if this helps! :)
>> 
>> Eh. I appreciate the response, but it's not very elegant... I'd prefer it to 
>> be
>> more automatic. Does such a solution not exist?
>> 
>> DR
> 
> Bump.
> 
> DR

The number can be placed within the multimeasure rest in the middle of the 
stave rather than above or below the stave, if you like.  I think this looks 
much tidier.  I don't remember who created this and sent it to me:



#(define (whiteunder grob) (grob-interpret-markup grob 
  (markup #:vcenter #:whiteout #:pad-x 1 (ly:grob-property grob 'text))))

inlineMMRN = {
  \once \override Score.MultiMeasureRest #'layer = #-2
  \once \override Score.MultiMeasureRestNumber #'layer = #-1
  \once \override Score.MultiMeasureRestNumber #'Y-offset = #0
  \once \override Score.MultiMeasureRestNumber #'stencil = #whiteunder
}


music = {
  \override Score.MultiMeasureRest #'minimum-length = #20 
  \inlineMMRN R4*4 
}


Attachment: PastedGraphic-1.pdf
Description: Adobe PDF document


reply via email to

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