--- /dev/null
+\header {
+
+ texidoc = "Beam subdivisions should match the durations of the subdivided
+groups, as established by baseMoment."
+ }
+
+\version "2.19.19"
+
+\layout {
+ ragged-right = ##t
+}
+
+{
+ \set subdivideBeams = ##t
+ \set baseMoment = #(ly:make-moment 1 4)
+ c''32[^\markup{"baseMoment 1/4"} c'' c'' c'' c'' c'' c'' c'']
+ \set baseMoment = #(ly:make-moment 1 8)
+ c''32[^\markup{"baseMoment 1/8"} c'' c'' c'' c'' c'' c'' c'']
+ \set baseMoment = #(ly:make-moment 1 16)
+ c''32^\markup{"baseMoment 1/16"}[ c'' c'' c'' c'' c'' c'' c'']
+ \set baseMoment = #(ly:make-moment 1 32)
+ c''64^\markup{"baseMoment 1/32"}[ \repeat unfold 14 {c''64} c''64]
+}
+
#include "context.hh"
#include "beaming-pattern.hh"
+#include "misc.hh"
/*
Represents a stem belonging to a beam. Sometimes (for example, if the stem
if (non_flag_dir)
{
int importance = infos_[i + 1].rhythmic_importance_;
- int count = (importance < 0 && options.subdivide_beams_)
- ? 1 : min (min (infos_[i].count (non_flag_dir),
+ int start_dur = intlog2(infos_[i+1].start_moment_.main_part_.den());
+ int count = (importance < 0 && options.subdivide_beams_)
+ ? max(start_dur,3)-2 // 1/8 note has one beam
+ : min (min (infos_[i].count (non_flag_dir),
infos_[i + non_flag_dir].count (-non_flag_dir)),
infos_[i - non_flag_dir].count (non_flag_dir));