For the optional argument of \afterGrace, there would be some incentive
in case of a duration to interpret it as a duration rather than as a
scale factor.  That would, however, make this different from either what
\afterGraceFraction accepts, or what its name insinuates.  Also it would
make the predicate scale? be an inadequate description of what the
argument's type is which would functionally be
non-duration-scale-or-duration? which of course has the exact same
implementation.
Correction: a duration (as opposed to a music-length) is _not_ permitted
by scale? but a non-negative exact rational number is (which 4 qualifies
as).

duration-or-scale? would be possible in theory but would create too much
ambiguity for things like 2 .

But is it really desirable to make it easy to use afterGrace factors >= 1? (We warn about them, but only if the factor is > 1. To be honest, I'm wary about the factor = 1 case...)

Obviously it's impossible to allow both i) the OP's syntax (use a naked duration as main note) _and_ ii) durations as afterGrace offsets.

At the moment we have neither. But one of them should be possible:

For i), limit afterGraceFractions to proper fractions (< 1)
For ii), distinguish factors from durations (offsets) by being < 1 or integers >= 1. (In the latter case, warn if the length of the duration exceeds the length of the main note.)

Lukas


Reply via email to