+void
+Accidental_engraver::create_accidental (Accidental_entry *entry,
+ bool restore_natural,
+ bool cautionary)
+{
+ Stream_event *note = entry->melodic_;
+ Grob *support = entry->head_;
+ bool as_suggestion = to_boolean (entry->origin_->get_property ("suggestAccidentals"));
+ Grob *a = 0;
+ if (as_suggestion)
+ a = make_suggested_accidental (note, support, entry->origin_engraver_);
+ else
+ a = make_standard_accidental (note, support, entry->origin_engraver_, cautionary);
+
+ if (restore_natural)
+ {
+ if (to_boolean (get_property ("extraNatural")))
+ a->set_property ("restore-first", SCM_BOOL_T);
+ }
+
+ entry->accidental_ = a;
+}
+
+Grob *
+Accidental_engraver::make_standard_accidental (Stream_event * /* note */,
+ Grob *note_head,
+ Engraver *trans,
+ bool cautionary)
+{
+ /*
+ We construct the accidentals at the originating Voice
+ level, so that we get the property settings for
+ Accidental from the respective Voice.
+ */
+ Grob *a = 0;
+ if (cautionary)
+ a = trans->make_item ("AccidentalCautionary", note_head->self_scm ());
+ else
+ a = trans->make_item ("Accidental", note_head->self_scm ());
+
+ /*
+ We add the accidentals to the support of the arpeggio,
+ so it is put left of the accidentals.
+ */
+ for (vsize i = 0; i < left_objects_.size (); i++)
+ {
+ if (left_objects_[i]->get_property ("side-axis") == scm_from_int (X_AXIS))
+ Side_position_interface::add_support (left_objects_[i], a);
+ }
+
+ for (vsize i = 0; i < right_objects_.size (); i++)
+ Side_position_interface::add_support (a, right_objects_[i]);
+
+ a->set_parent (note_head, Y_AXIS);
+
+ if (!accidental_placement_)
+ accidental_placement_ = make_item ("AccidentalPlacement",
+ a->self_scm ());
+ Accidental_placement::add_accidental (accidental_placement_, a);
+
+ note_head->set_object ("accidental-grob", a->self_scm ());
+
+ return a;
+}
+
+Grob *
+Accidental_engraver::make_suggested_accidental (Stream_event * /* note */,
+ Grob *note_head,
+ Engraver *trans)
+{
+ Grob *a = trans->make_item ("AccidentalSuggestion", note_head->self_scm ());