/*
Note head that determines hshift for upstems
- */
+
+ WARNING: triggers direction
+*/
Grob*
Stem::support_head (Grob*me)
{
/*
The note head which forms one end of the stem.
- */
+
+ WARNING: triggers direction
+*/
Grob*
Stem::first_head (Grob*me)
{
bool
Stem::invisible_b (Grob*me)
{
- return ! (head_count (me) && Note_head::get_balltype (support_head (me)) >= 1);
+ return ! (head_count (me)
+ && gh_scm2int (me->get_grob_property ("duration-log")) >= 1);
}
Direction
}
else
{
- me->remove_grob_property ("molecule-callback");
+ me->set_grob_property ("molecule-callback", SCM_EOL);
}
return SCM_UNSPECIFIED;
Real half_space = staff_space / 2;
Grob * beam = get_beam (me);
- int beam_count = beam_multiplicity(me).length()+1;
+ int beam_count = Beam::get_direction_beam_count (beam, mydir);
Real beam_translation= Beam::get_beam_translation (beam);
Real thick = gh_scm2double (beam->get_grob_property ("thickness"));
Real note_start = chord_start_y (me);
SCM grace_prop = me->get_grob_property ("grace");
bool grace_b = to_boolean (grace_prop);
- SCM bml = robust_list_ref ( beam_count ,
+ SCM bml = robust_list_ref ( beam_count - 1,
me->get_grob_property ("beamed-minimum-lengths"));
Real minimum_length = gh_scm2double(bml)*staff_space;
- SCM bl = robust_list_ref ( beam_count ,
+ SCM bl = robust_list_ref ( beam_count - 1,
me->get_grob_property ("beamed-lengths"));
Real stem_length = gh_scm2double(bl) * staff_space;
stem goes to center of beam, hence 0.5
*/
Real beam_lengthen = beam_translation* (beam_count - 1)
- + ((beam_count > 0) ? thick : 0) - 0.5 * thick;
+ + 0.5 * thick;
Real shortest_y = note_start + minimum_length + beam_lengthen;
Real ideal_y = stem_length + note_start + beam_lengthen;
ADD_INTERFACE (Stem,"stem-interface",
"A stem",
- "up-to-staff avoid-note-head adjust-if-on-staffline thickness stem-info beamed-lengths beamed-minimum-lengths lengths beam stem-shorten duration-log beaming neutral-direction stem-end-position support-head note-heads direction length style no-stem-extend flag-style dir-forced");
+ "up-to-staff avoid-note-head adjust-if-on-staffline thickness stem-info beamed-lengths beamed-minimum-lengths lengths beam stem-shorten duration-log beaming neutral-direction stem-end-position support-head note-heads direction length style no-stem-extend flag-style");