Hi Mark,

Am 27.11.22 um 04:01 schrieb Mark Mathias:
Using \rest, I can place rests from each of two voices on a staff on top of each other without interference, thereby allowing use of the material from each voice in separate scores elsewhere without editing. Cf:

    To explicitly specify a rest’s vertical position, write a note
    followed by |\rest|. A rest of the duration of the note will be
    placed at the staff position where the note would appear. This
    allows for precise manual formatting of polyphonic music, since
    the automatic rest collision formatter will not move these rests.


The problem is that if the rests are dotted, the automatic rest collision formatter forces the dots to be moved even though the rests stay in place:

\version "2.22.2"
\relative c'' {
  <<
  b2.\rest
  \\
  b2.\rest
  >>
  }

Perhaps I'm doing something wrong? Or maybe it's a bug?

You might do

\version "2.22.2"

\relative c'' {
  <<
    b2.\rest
    \\
    \once\omit Dots
    b2.\rest
  >>
}

but there's a probably better way: Namely, we now have the Merge_rests_engraver. So you can do:

\version "2.22.2"

\layout {
  \context {
    \Staff
    \consists Merge_rests_engraver
  }
}

{
  <<
    \relative {
    r2. d''8 e
    f4 r r8 e d e
    c4 r
    }
  \\ \relative {
    r2. b'8 c
    d4 r b a8 b
    c4 r
  }
  >>
}

See also https://lilypond.org/doc/v2.23/Documentation/notation/multiple-voices.html#merging-rests

Lukas

Reply via email to