lilypond-user
[Top][All Lists]
Advanced

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

Re: vertical spacing of rests


From: Peter Selinger
Subject: Re: vertical spacing of rests
Date: Sat, 22 Aug 2015 22:25:01 -0300 (ADT)

Klaus,

your code snippet does not work correctly if some of the rests are
dotted (see attached for the output). It's a bit of a mystery to me
why this happens. 

-- Peter

%----------------------------------------
\version "2.19.25"

centerRests = {
  \override Rest.staff-position = #0
}

\new Staff <<
  \new Voice
  \relative c'' {
    \voiceOne
    \centerRests
    r  c  r  d | r2. e4
  }
  \new Voice
  \relative c'' {
    \voiceTwo
    \centerRests
    r4 a8 a8 r4 b8 b8 | r2. c4
  }
>>
%----------------------------------------



Klaus Blum wrote:
> 
> Peter Selinger wrote
> > Is there a global way to turn off
> > vertical spacing for rests in a context, i.e., some command whose
> > effect would be to make notes behave as with \voiceOne and rests
> > behave as with \oneVoice?
> 
> Hi Peter, 
> 
> yes, there is:
>      \override Rest.staff-position = #0
> but you have to apply it once for every voice.
> 
> Cheers, 
> Klaus
> 
> 
> %-------------------------------------------------
> \version "2.19.25"
> 
> centerRests = {
>   \override Rest.staff-position = #0
> }
> 
> \new Staff <<
>   \new Voice
>   \relative c'' {
>     \voiceOne  % you don't need a pair of braces here
>     \centerRests
>     r  c  r  d
>   }
>   \new Voice
>   \relative c'' {
>     \voiceTwo
>     \centerRests
>     r4 a8 a8 r4 b8 b8
>   }
> >>
> %-------------------------------------------------
> 
> 
> 
> 
> --
> View this message in context: 
> http://lilypond.1069038.n5.nabble.com/vertical-spacing-of-rests-tp179947p179950.html
> Sent from the User mailing list archive at Nabble.com.
> 
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 

Attachment: rests1.pdf
Description: PDF document, version 1.4


reply via email to

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