bug-lilypond
[Top][All Lists]
Advanced

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

Re: Problem with compressible rests


From: Jean Abou Samra
Subject: Re: Problem with compressible rests
Date: Tue, 11 May 2021 23:42:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Le 11/05/2021 à 22:38, Edward Evans a écrit :

Hello

An obscure bug in Lilypond.

Notes whose length is unspecified take the length of the note or
rest before. This should apply to compressible rests but if the rest
before is the last of a number of compressible rests (R * ) the
following note is wrongly given the length of all the preceding bars
rest, not just the last. This sometimes creates extra blank bars and
makes the bar numbering wrong.

The attached test.ly (sorry it is so long) demonstrates.  It is based
on the first few bars of a piece which used the Test II situation. It
doesn't show in a multipart score and is easily missed in proof reading
if normal bar numbering at the beginning of the line is used.  As you
can imagine, it caused some confusion during rehearsal!

Hello,

Actually, this is not a bug but a misunderstanding.
R1*2 is not a shortcut for R1 R1. Observe the difference
on notes:

{
  c1*2
  c1 c1
}

The *n/d notation changes the duration of a note or rest
in a way that does not affect its typesetting.

For multi-measure rests, as many measures are filled as needed,
but the concept is still the same: 1*2 is the total duration to
be filled with multi-measure rests. You can notice it as soon as
you add a time signature change:

<<
  \new Staff {
    R1*2 % results in 3 printed multi-measure rests
  }
  \new Staff {
    c1
    \time 2/4
    c2 c2
  }
>>

What is happening in your test case is that the c note
takes the same duration as the preceding rest, which is
several measures. Your c~ is equivalent to c1*2~.

When you add \compressFullBarRests (in more recent versions
this was renamed to \compressEmptyMeasures for clarity), the
second measure, which is merely the continuation of the
previous one since the note is too long for a single measure,
is compressed into the first one. Hence the behavior of bar
numbers. This may become clearer to you if you add another
staff like this:

\version "2.22.0"

<<
  \new Staff {
    \time 4/4
    \override Score.BarNumber.break-visibility = ##(#t #t #t)
    \compressEmptyMeasures
    R1*2
    c'~
    c'8 c'16 c'16 c'16 c'16 c'16 c'16 c'16 c'16 c'16 c'16 c'16 c'16 c'16 c'16
  }
  \new Staff {
    R1*5
  }
>>

Lilypond is a superb piece of software.  It has taken me some time to
get to know it, and there are still many features that are mysterious,
but I have produced many beautiful scores and parts with it.  Many
thanks for your work in creating it.

Glad to hear it.

Best regards,
Jean





reply via email to

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