+ return mol;
+}
+
+
+MAKE_SCHEME_CALLBACK (Stem_tremolo,brew_molecule,1);
+SCM
+Stem_tremolo::brew_molecule (SCM grob)
+{
+ Grob *me = unsmob_grob (grob);
+ Grob *stem = unsmob_grob (me->get_grob_property ("stem"));
+ Grob *beam = Stem::get_beam (stem);
+ Direction stemdir = Stem::get_direction (stem);
+ Real beam_translation = beam ? Beam::get_beam_translation (beam) : 0.81;
+
+ Molecule mol = raw_molecule (me);
+ Interval mol_ext = mol.extent (Y_AXIS);
+ Real ss = Staff_symbol_referencer::staff_space (me);
+
+ // ugh, rather calc from Stem_tremolo_req
+ int beam_count = (beam) ? (Stem::beam_multiplicity (stem).length ()+ 1): 0;
+
+ /*
+ TODO.
+ */
+
+
+ Real beamthickness = 0.0;
+ SCM sbt = (beam) ? beam->get_grob_property ("thickness") : SCM_EOL ;
+ if (gh_number_p (sbt))
+ {
+ beamthickness = gh_scm2double (sbt) * ss;
+ }
+
+ Real end_y
+ = Stem::stem_end_position (stem) *ss/2
+ - stemdir * (beam_count * beamthickness
+ + ((beam_count -1) >? 0) * beam_translation);
+
+ /*
+ the 0.33 ss is to compensate for the size of the note head
+ */
+ Real chord_start_y = Stem::chord_start_y (stem) +
+ 0.33 * ss * stemdir;
+
+ Real padding = beam_translation;
+
+ /*
+ if there is a flag, just above/below the notehead.
+ if there is not enough space, center on remaining space,
+ else one beamspace away from stem end.
+ */
+ if (!beam && Stem::duration_log (stem) >= 3)