--- /dev/null
+\version "2.7.39"
+\header {
+ texidoc =
+
+ "If @code{merge-differently-headed} is enabled, then
+open note heads may be merged with black noteheads, but only
+if the black note heads are from 8th or shorter notes.
+"
+
+}
+
+\layout { ragged-right= ##t }
+
+
+\context Staff \relative c'' <<
+ {
+ \override Staff.NoteCollision #'merge-differently-headed = ##t
+ c2 c8 c4.
+ c2
+ }\\
+ {
+ c8 c4. c2
+ c4
+ }
+>>
if (!Note_column::get_stem (cu) || !Note_column::get_stem (cd))
return;
+ Drul_array<Grob*> stems (Note_column::get_stem (cd),
+ Note_column::get_stem (cu));
+
Grob *nu = Note_column::first_head (cu);
Grob *nd = Note_column::first_head (cd);
/* Should never merge quarter and half notes, as this would make
them indistinguishable. */
if (merge_possible
- && ((Rhythmic_head::duration_log (nu) == 1
- && Rhythmic_head::duration_log (nd) == 2)
- || (Rhythmic_head::duration_log (nu) == 2
- && Rhythmic_head::duration_log (nd) == 1)))
+ && ((Stem::duration_log (stems[UP]) == 1
+ && Stem::duration_log (stems[DOWN]) == 2)
+ || (Stem::duration_log (stems[UP]) == 2
+ && Stem::duration_log (stems[DOWN]) == 1)))
merge_possible = false;
/*
/* properties */
"merge-differently-dotted "
"merge-differently-headed "
- "positioning-done");
+ "positioning-done ");