TODO:
take some y-position (chord/beam/nearest?) into account
- scmify forced-fraction */
+ scmify forced-fraction
+
+ TODO:
+
+ why is shorten stored in beam, and not directly in stem?
+
+*/
void
Beam::set_stem_shorten (Grob *m)
{
/*
TODO:
+
- Make all demerits customisable
- - One sensible check per demerit
+
+ - One sensible check per demerit (what's this --hwn)
+
- Add demerits for quants per se, as to forbid a specific quant
entirely
- */
+
+*/
MAKE_SCHEME_CALLBACK (Beam, quanting, 1);
SCM
Beam::quanting (SCM smob)
-/*
-
-TODO:
-use filter and standard list functions.
-
-*/
int
Beam::visible_stem_count (Grob *me)
{
return me->has_interface (ly_symbol2scm ("beam-interface"));
}
+
+ADD_INTERFACE (Beam, "beam-interface",
+ "A beam.
+
+#'thickness= weight of beams, in staffspace
+
+
+We take the least squares line through the ideal-length stems, and
+then damp that using
+
+ damped = tanh (slope)
+
+this gives an unquantized left and right position for the beam end.
+Then we take all combinations of quantings near these left and right
+positions, and give them a score (according to how close they are to
+the ideal slope, how close the result is to the ideal stems, etc.). We
+take the best scoring combination.
+
+",
+ "concaveness-threshold dir-function quant-score auto-knee-gap gap chord-tremolo beamed-stem-shorten shorten least-squares-dy direction damping flag-width-function neutral-direction positions thickness");
+