+ String type_str;
+ if (test_mom.num () != 1)
+ type_str = to_str (test_mom.num ());
+ if (test_mom.den () != 1)
+ type_str = type_str + "_" + to_str (test_mom.den ());
+
+ /*
+ URG
+
+ FIXME: SHOULD USE ALIST
+
+ */
+
+ /*
+ Determine end moment for auto beaming (and begin, mostly 0==anywhere)
+ In order of increasing priority:
+
+ i. every beat <den>
+ ii. time<num>_<den>beamAutoEnd
+ iii. time<num>_<den>beamAutoEnd<type>
+ iv. beamAutoEnd
+ v. beamAutoEnd<type>
+
+
+ Rationale:
+
+ [to be defined in config file]
+ i. easy catch-all rule
+ ii. exceptions for time signature
+ iii. exceptions for time signature, for specific duration type
+
+ [user override]
+ iv. generic override
+ v. override for specific duration type
+
+ The user overrides should be required for common cases.
+ */
+
+ /*
+ first guess: begin beam at any position
+ */
+ Moment begin_mom (0);
+ /*
+ first guess: end beam at end of beat
+ */
+ SCM one (get_property ("beatLength"));
+
+ Moment end_mom;
+ if (unsmob_moment (one))
+ end_mom = *unsmob_moment (one);
+
+ /*
+ second guess: property generic time exception
+ */
+ SCM begin = get_property ((time_str + "beamAutoBegin").ch_C());
+ if (unsmob_moment (begin))
+ begin_mom = * unsmob_moment (begin);
+
+ SCM end = get_property ((time_str + "beamAutoEnd").ch_C());
+ if (unsmob_moment (end))
+ end_mom = * unsmob_moment (end);
+
+ /*
+ third guess: property time exception, specific for duration type
+ */
+ if (type_str.length_i ())
+ {
+ SCM end_mult = get_property ((time_str + "beamAutoEnd" + type_str).ch_C());
+ if (unsmob_moment (end_mult))
+ end_mom = * unsmob_moment (end_mult);
+
+ SCM begin_mult = get_property ((time_str + "beamAutoBegin" + type_str).ch_C());
+ if (unsmob_moment (begin_mult))
+ begin_mom = * unsmob_moment (begin_mult);
+ }
+
+ /*
+ fourth guess [user override]: property plain generic
+ */
+ begin = get_property ("beamAutoBegin");
+ if (unsmob_moment (begin))
+ begin_mom = * unsmob_moment (begin);
+
+
+
+ end = get_property ("beamAutoEnd");
+ if (unsmob_moment (end))
+ end_mom = * unsmob_moment (end);
+
+ /*
+ fifth guess [user override]: property plain, specific for duration type
+ */
+ if (type_str.length_i ())