- stem_ = new Item (get_property ("Stem"));
-
- stem_->set_grob_property ("duration-log", gh_int2scm (duration_log));
-
- if (tremolo_req_)
- {
- /*
- 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 = gh_scm2int (tremolo_req_->get_mus_property ("tremolo-type"));
- SCM f = get_property ("tremoloFlags");
- if (!requested_type && gh_number_p (f))
- requested_type = gh_scm2int (f);
- else
- daddy_trans_->set_property ("tremoloFlags", gh_int2scm (requested_type));
-
- int tremolo_flags = intlog2 (requested_type) - 2
- - (duration_log > 2 ? duration_log - 2 : 0);
- if (tremolo_flags <= 0)
- {
- tremolo_req_->origin()->warning (_("tremolo duration is too long"));
- tremolo_flags = 0;
- }
-
- if (tremolo_flags)
- {
- tremolo_ = new Item (get_property ("StemTremolo"));
- announce_grob(tremolo_, tremolo_req_->self_scm());
-
- /*
- The number of tremolo flags is the number of flags of
- the tremolo-type minus the number of flags of the note
- itself.
- */
- tremolo_->set_grob_property ("flag-count",
- gh_int2scm (tremolo_flags));
- tremolo_->set_parent (stem_, X_AXIS);
- }
- }
-
- /*
- We announce the cause of the head as cause of the stem.
- The stem needs a rhythmic structure to fit it into a beam. */
- announce_grob(stem_, i.music_cause ()->self_scm());