lilypond-user
[Top][All Lists]
Advanced

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

Re: vertical spacing of rests


From: Thomas Morley
Subject: Re: vertical spacing of rests
Date: Sun, 23 Aug 2015 00:37:41 +0200

2015-08-23 0:01 GMT+02:00 Peter Selinger <address@hidden>:
> Hello again,
>
> this is a true newbie question. I am trying to engrave two polyphonic
> voices on a single staff. Since the two voices have all their rests in
> common, I only want to typeset each rest once, so I use spacer rests
> in the second voice. Still the vertical spacing is such that all the
> rests are put near the top of the staff. I would like them to appear
> in their "normal" positions.
>
> From the manual, I know two ways to do this. Solution 1 is to enclose
> each rest between \oneVoice and \voiceOne, forcing standard vertical
> spacing:
>
>   \version "2.19.25"
>
>   \new Staff <<
>     \new Voice \relative c'' {
>       \voiceOne {
>         \oneVoice r \voiceOne c \oneVoice r \voiceOne d
>         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>       }
>     }
>     \new Voice \relative c'' {
>       \voiceTwo {
>         s4 a8 a8 s4 b8 b8
>       }
>     }
>   >>
>
> Solution 2 is to specify an explicit vertical position for each rest.
>
>   \version "2.19.25"
>
>   \new Staff <<
>     \new Voice \relative c'' {
>       \voiceOne {
>         b4\rest c b\rest \voiceOne d
>         %%%%%%%%%%%%%%%%%%%%%%%%%%%%
>       }
>     }
>     \new Voice \relative c'' {
>       \voiceTwo {
>         s4 a8 a8 s4 b8 b8
>       }
>     }
>   >>
>
> Neither solution is particularly elegant, as they both require every
> rest to be marked up individually. 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?
>
> Thanks, -- Peter



Some more possibilities:

  \new Staff <<
    \new Voice \relative c'' {
      \voiceOne {
          %% \voiceOne sets Rest.direction to 1, revert it
          \revert Rest.direction
          %% specify staff-position
          \override Rest.staff-position = #0
        r
        c
        r
        d
      }
    }
    \new Voice \relative c'' {
      \voiceTwo {
        s4 a8 a8 s4 b8 b8
      }
    }
  >>

or use
http://lsr.di.unimi.it/LSR/Item?id=336
or
http://www.mail-archive.com/lilypond-user%40gnu.org/msg69645.html
which works for MultiMeasureRests as well.


HTH,
  Harm



reply via email to

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