From: Urs Liska Date: Wed, 25 Nov 2015 12:44:27 +0000 (+0100) Subject: Issue 4664: Ensure one beam is left in subdivided beams X-Git-Tag: release/2.19.33-1~9^2~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=64e94922019fbcab30f80f06de2471331547b276;p=lilypond.git 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 --- 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); } } }