+ if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+ moment = * unsmob_moment (ly_cdr (m));
+
+ /* third guess: property time exception, specific for duration type */
+ m = gh_assoc (gh_append3 (function, type, time), settings);
+ if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+ moment = * unsmob_moment (ly_cdr (m));
+
+ /* fourth guess [user override]: property plain generic */
+ m = gh_assoc (gh_append3 (function, wild, wild), settings);
+ if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+ moment = * unsmob_moment (ly_cdr (m));
+
+ /* fifth guess [user override]: property plain, specific for duration type */
+ m = gh_assoc (gh_append3 (function, type, wild), settings);
+ if (m != SCM_BOOL_F && unsmob_moment (ly_cdr (m)))
+ moment = * unsmob_moment (ly_cdr (m));
+
+ Rational r;
+ if (moment.to_bool ())
+ {
+ /* Ugh? measurePosition can be negative, when \partial
+ We may have to fix this elsewhere (timing translator)
+ r = unsmob_moment (get_property ("measurePosition"))->mod_rat (moment);
+ */
+ Moment pos = * unsmob_moment (get_property ("measurePosition"));
+ if (pos < Moment (0))
+ {
+ Moment length = * unsmob_moment (get_property ("measureLength"));
+ pos = length - pos;
+ }
+ r = pos.main_part_.mod_rat (moment.main_part_);
+ }
+ else
+ {
+ if (dir == START)
+ /* if undefined, starting is ok */
+ r = 0;
+ else
+ /* but ending is not */
+ r = 1;
+ }
+ return !r;
+}