[Top][All Lists]

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

Re: Issue 5251/1: set default restNumberThreshold = 1 (issue 353850043 b

From: lilypond
Subject: Re: Issue 5251/1: set default restNumberThreshold = 1 (issue 353850043 by address@hidden)
Date: Thu, 27 Dec 2018 06:35:18 -0800

Reviewers: thomasmorley651,
File Documentation/notation/rhythms.itely (right):
On 2018/12/27 12:56:57, thomasmorley651 wrote:
I tried to test your patch, but 'make' failed with error: file not found:
I had to exclude this lines to finish 'make'

Is there the _need_ to import lsr first?

Seems so.

If so, I think it should be part of the current patch in an own
commit. Imho,
it's good practise to have every issue's patch-set being able to stand

(See my next comment)
File Documentation/snippets/new/
\relative {
On 2018/12/27 12:56:57, thomasmorley651 wrote:
no need for \relative here

Oh, of course you’re right, I’ll change that.

Meanwhile I've approved this snippet in LSR (deleting \relative). So I
think there is any need to put it in Documentation/snippets/new as
It will be available after next lsr-import anyway.

I can’t find the snippet using the search function; why?

I followed James’s directions
that’s why I didn’t do the run.
File lily/ (right):
lily/ int t = scm_to_int (thres);
On 2018/12/27 12:56:57, thomasmorley651 wrote:
I don't think this is the correct way.

You’re right, I hadn’t considered \unset.

We want a fall-back-value if restNumberThreshold is unset. Only
setting it in is not sufficient, imho, because setting
will not create a reversible stack. Thus this example fails:

I didn’t know that, thanks for explanation.

Not sure if the old coding is the best way o provide such a fall-back,
C++-knowledge is close to zero, so I can't come up with a better

It isn’t, we have robust_scm2int for that; I’ll use it in the next patch
File ly/ (right):
ly/ restNumberThreshold = 1
Should we keep this even if we have a default value in IMHO: yes, because then it will be
listed in the IR.

Issue 5251/1: set default restNumberThreshold = 1
Issue 5251/2: add snippet for doc
Issue 5251/3: add snippet to NR

Please review this at

Affected files (+27, -3 lines):
  M Documentation/notation/rhythms.itely
  A Documentation/snippets/new/
  M lily/
  M ly/

Index: Documentation/notation/rhythms.itely
diff --git a/Documentation/notation/rhythms.itely b/Documentation/notation/rhythms.itely index f0d2954d28916f33ca729a3c055ae10377894c60..68706c4b9e71addf2c0fe47f8a90318d6040cdab 100644
--- a/Documentation/notation/rhythms.itely
+++ b/Documentation/notation/rhythms.itely
@@ -962,6 +962,9 @@ setting, resulting bar-check warnings may not be displayed.


Index: Documentation/snippets/new/
diff --git a/Documentation/snippets/new/ b/Documentation/snippets/new/
new file mode 100644
index 0000000000000000000000000000000000000000..7db6b0f9513ae9aac60be2a400937979e020fbcc
--- /dev/null
+++ b/Documentation/snippets/new/
@@ -0,0 +1,21 @@
+\version "2.18.2"
+\header {
+  lsrtags = "rhythms, preparing-parts"
+  texidoc = "
+Multi measure rests show their length by a number except for single
+measures. This can be changed by setting @code{restNumberThreshold}.
+  doctitle = "Numbering single measure rests"
+\relative {
+  \compressFullBarRests
+  R1 R1*10 R1*11 \bar "||"
+  \set restNumberThreshold = 0
+  R1 R1*10 R1*11 \bar "||"
+  \set restNumberThreshold = 10
+  R1 R1*10 R1*11
Index: lily/
diff --git a/lily/ b/lily/ index ff1e155abc1eaef3d4e8e0fc794425a22d32aa4c..e3f59e96552985101955dcc5bb4c69d59b49a700 100644
--- a/lily/
+++ b/lily/
@@ -183,9 +183,7 @@ Multi_measure_rest_engraver::set_measure_count (int n)
   if (scm_is_null (g->get_property ("text")))
       SCM thres = get_property ("restNumberThreshold");
-      int t = 1;
-      if (scm_is_number (thres))
-        t = scm_to_int (thres);
+      int t = scm_to_int (thres);

       if (n <= t)
         g->suicide ();
Index: ly/
diff --git a/ly/ b/ly/
index 325622a15c8a2b07e0d1fa84c707a3308c320809..a3f34c429562013b1b05880a1c802f4ada455a3e 100644
--- a/ly/
+++ b/ly/
@@ -268,6 +268,8 @@ multiple voices on the same staff."
   \consists "Tie_engraver"
   \consists "Tuplet_engraver"
   \consists "Instrument_switch_engraver"
+  restNumberThreshold = 1


reply via email to

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