lilypond-user
[Top][All Lists]
Advanced

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

Re: RhythmicStaff Multimeasure Rests


From: Neil Puttock
Subject: Re: RhythmicStaff Multimeasure Rests
Date: Tue, 9 Mar 2010 22:19:57 +0000

On 7 March 2010 22:21, Jay Anderson <address@hidden> wrote:
> On Fri, Mar 5, 2010 at 10:31 PM, Jay Anderson <address@hidden> wrote:
>> \version "2.13.15"
>> \new RhythmicStaff
>> {
>>  %\override Staff.MultiMeasureRest #'extra-offset = #'(0 . -1)
>>  R1
>> }
>
> Of course this doesn't quite work because all multi measure rests are
> moved and not just single whole measure rests.
>
> I've been messing with this:
>
> \override Staff.MultiMeasureRest #'extra-offset =
> #(lambda (grob)
>  '(0 . -1))
>
> I only want to return '(0 . -1) if the multi measure rest length is
> the same as the length of a full bar. To get at the measure length I
> need to do something like (ly:context-property context 'measureLength
> #f). How can I get at the context from a callback function like the
> one above? or is there a better way to move all full measure rests
> down?

Try

\override RhythmicStaff.MultiMeasureRest #'staff-position = #0.01

There's a nasty hack in ly:multi-measure-rest::print which changes the
position of single full-bar rests if staff-position = #0 to ensure the
default position is effectively staff-position = #2; setting it very
slightly off tricks the code so it doesn't perform the shift.

> It's interesting to me that in this example the whole rest in the last
> measure works correctly:

That's because it uses a different print function (ly:rest::print).

Regards,
Neil




reply via email to

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