From 64e94922019fbcab30f80f06de2471331547b276 Mon Sep 17 00:00:00 2001 From: Urs Liska Date: Wed, 25 Nov 2015 13:44:27 +0100 Subject: [PATCH] Issue 4664: Ensure one beam is left in subdivided beams 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 --- .../regression/beam-subdivide-quarter-notes.ly | 18 ++++++++++++++++++ lily/beaming-pattern.cc | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 input/regression/beam-subdivide-quarter-notes.ly diff --git a/input/regression/beam-subdivide-quarter-notes.ly b/input/regression/beam-subdivide-quarter-notes.ly new file mode 100644 index 0000000000..af28282aca --- /dev/null +++ b/input/regression/beam-subdivide-quarter-notes.ly @@ -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 ] +} diff --git a/lily/beaming-pattern.cc b/lily/beaming-pattern.cc index f205df8d78..a501c6ad37 100644 --- a/lily/beaming-pattern.cc +++ b/lily/beaming-pattern.cc @@ -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); } } } -- 2.39.5