+ // half notes and quarter notes all have compatible stems.
+ // Longas are done differently (oops?), so we can't unify
+ // them with the other stemmed notes.
+ if (ds == 1)
+ ds = 2;
+ if (dc == 1)
+ dc = 2;
+ // whole notes and brevis both have no stems
+ if (ds == -1)
+ ds = 0;
+ if (dc == -1)
+ dc = 0;
+
+ if (ds != dc)
+ {
+ gi.event_cause ()->origin ()->warning (_f ("adding note head to incompatible stem (type = %d/%d)",
+ ds < 0 ? 1 << -ds : 1,
+ ds > 0 ? 1 << ds : 1));
+ gi.event_cause ()->origin ()->warning (_ ("maybe input should specify polyphonic voices"));
+ }
+
+ Stem::add_head (stem_, gi.grob ());
+
+ if (Stem::is_normal_stem (stem_)
+ && Stem::duration_log (stem_) > 2)
+ {
+ Item *flag = make_item ("Flag", stem_->self_scm ());
+ flag->set_parent (stem_, X_AXIS);
+ stem_->set_object ("flag", flag->self_scm ());
+ maybe_flags_.push_back (flag);