- stem_p_->set_elt_property ("duration-log", gh_int2scm (duration_log));
-
- if (tremolo_req_l_)
- {
- /*
- Stem tremolo is never applied to a note by default,
- is must me requested. But there is a default for the
- tremolo value:
-
- c4:8 c c:
-
- the first and last (quarter) note bothe get one tremolo flag.
- */
- int requested_type = tremolo_req_l_->type_i_;
- if (!requested_type)
- requested_type = default_tremolo_type_i_;
- else
- default_tremolo_type_i_ = requested_type;
-
- if (requested_type)
- {
- tremolo_p_ = new Item (get_property ("basicStemTremoloProperties"));
- Stem_tremolo::set_interface (tremolo_p_);
-
- announce_element (Score_element_info (tremolo_p_, tremolo_req_l_));
- /*
- The number of tremolo flags is the number of flags of
- the tremolo-type minus the number of flags of the note
- itself.
- */
- int tremolo_flags = intlog2 (requested_type) - 2
- - (duration_log > 2 ? duration_log - 2 : 0);
- if (tremolo_flags < 0)
- tremolo_flags = 0;
- tremolo_p_->set_elt_property ("tremolo-flags",
- gh_int2scm (tremolo_flags));
- }
- }
- announce_element (Score_element_info (stem_p_, r));
- }
-
- if (Stem::flag_i (stem_p_) != duration_log)
- {
- r->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 << Stem::flag_i (stem_p_)));