lilypond-user
[Top][All Lists]
Advanced

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

Re: Rest is in the wrong place


From: Knute Snortum
Subject: Re: Rest is in the wrong place
Date: Tue, 13 Oct 2020 05:42:31 -0700

Thanks Aaron Hill, your comments are helpful as always.

Although I was able to see the code working with the override in a
minimum example, I couldn't get the override to work in the whole
piece.  I may try to find a MWE of the problem, or I may just use the
g4*1/2 solution.

Here's a skeleton of the piece:

%%% Start
global = {
  ...
}

rightHand = \relative c'' {
  \global
  ...
}

leftHand = \relative c' {
  \global
  ...
}

\score {
  \new PianoStaff
  <<
    \new Staff = "upper" \rightHand
    \new Staff = "lower" \leftHand
  >>
}
%%% End

I tried putting the override in global, in rightHand, and right before
the measure with the rest too high.  The rest position did not change
in any of those.  Is there a better place to put the override?

---
Knute Snortum
(via Gmail)

On Mon, Oct 12, 2020 at 5:23 PM Aaron Hill <lilypond@hillvisions.com> wrote:
>
> On 2020-10-12 3:39 pm, Knute Snortum wrote:
> > Hi again.
> >
> > I have a piece that I'm engraving and I have run into this problem:
> > the 16th note rest is too high:
> >
> > %%% Start
> > \version "2.20.0"
> >
> > \relative c'' {
> >   << { c8[ r16 c] d4 b } \\ { g4 fis f } >>
> > }
> > %%% End
> >
> > I know that I can tweak the position of the rest, but I have many bars
> > with this problem and I don't want to tweak them all. Is here a better
> > way to go about this?  Am I doing something wrong, or a lease not in
> > an optimum way?
>
> Looks like RestCollision is shifting the rest upward to avoid the g4 in
> the lower voice.  Why the g4 is being considered might be a bug.
>
> Try this for comparison:
>
> %%%%
> \version "2.20.0"
>
> \fixed c'' { \time 3/4
>    % Works.  Nothing to avoid.
>    { \voiceOne c8[ r16 c] d4 b, }
>    % Does not work.  g4 is "too close".
>    << { c8[ r16 c] d4 b, } \\ { g,4 fis, f, } >>
>    % Works.  g4*1/2 is not considered for collision.
>    << { c8[ r16 c] d4 b, } \\ { g,4*1/2 s fis,4 f, } >>
>    % Works.  Reduced constraint allows original position.
>    \override Staff.RestCollision.minimum-distance = #0.4
>    << { c8[ r16 c] d4 b, } \\ { g,4 fis, f, } >>
> }
> %%%%
>
> Changing minimum-distance might be your best option to avoid needing to
> manually adjust and/or specify the staff-position for rests.
>
>
> -- Aaron Hill



reply via email to

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