- Moment one_beat = *unsmob_moment( get_property ("beatLength"));
-
- int num = *unsmob_moment (get_property("measureLength")) / one_beat;
- int den = one_beat.den_i ();
-
- String time_str = String ("time") + to_str (num) + "_" + to_str (den);
-
- 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 ())