]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4664: Ensure one beam is left in subdivided beams
authorUrs Liska <ul@openlilylib.org>
Wed, 25 Nov 2015 12:44:27 +0000 (13:44 +0100)
committerUrs Liska <ul@openlilylib.org>
Wed, 25 Nov 2015 15:14:26 +0000 (16:14 +0100)
Issue #4355 introduced the concept that in subdivided beams the
division beam should reflect the length of the subsequent group.

However, with groups equal to or longer than one quarter note this
resulted in *no* beam left.

This commit ensures that at least one beam is returned when a beam is
active and subdivideBeam = ##t

input/regression/beam-subdivide-quarter-notes.ly [new file with mode: 0644]
lily/beaming-pattern.cc

diff --git a/input/regression/beam-subdivide-quarter-notes.ly b/input/regression/beam-subdivide-quarter-notes.ly
new file mode 100644 (file)
index 0000000..af28282
--- /dev/null
@@ -0,0 +1,18 @@
+\version "2.19.32"
+
+\header {
+  
+  doctitle = "Beam subdivide over quarter notes"
+
+  texidoc = "Beam subdivisions should match the durations of the subdivided
+groups, as established by baseMoment.  However, if the groups are equal or
+longer than quarter notes, one beam should be left
+"
+
+}
+
+\relative c' {
+    \set baseMoment = #(ly:make-moment 1/4)
+    \set subdivideBeams = ##t
+    c16 [ c c c c c c c c c c c c c c c ]
+}
index f205df8d78a14014c0d23547e7afaf5601f6166c..a501c6ad378074f158a1d6fce4fb5aece16c14cc 100644 (file)
@@ -175,7 +175,7 @@ Beaming_pattern::beamify (Beaming_options const &options)
                                         infos_[i + non_flag_dir].count (-non_flag_dir)),
                                    infos_[i - non_flag_dir].count (non_flag_dir));
 
-            infos_[i].beam_count_drul_[non_flag_dir] = count;
+            infos_[i].beam_count_drul_[non_flag_dir] = max(count, 1);
           }
       }
 }