Hi Carl,
Although the time signature looks like a fraction, it is not. A fraction has numbers in the
denominator and the numerator (and strictly speaking, a fraction properly has integers in the
numerator and denominator -- if they are not integers, it's a quotient, not a fraction, IIUC). And
the time signature has an integer in the "numerator" and a duration in the
"denominator".
I'm not sure it is worth the work to get semantically correct, but
semantically, \time 4/4 should not be a fraction of two integers; it should be
a pair of a count and a duration.
I think you are right that the notion of time signatures being
represented by formal fractions ("formal" meaning that 4/4 is not
identical to 2/2) is wrong and that one should talk about a count and a
duration. But it's an error with a huge tradition, not just in LilyPond,
but in talking about music in general. Everybody talks and writes of
"3/4 time" (and some people even write their time signatures with a
fraction line), and I'd be very surprised to hear someone say - very
correctly, admittedly - "what time signature? Ah, right, three crotchets
per bar". (I'm using the English names, because in the American and
German nomenclature, the difference is much more subtle: "Three
quarters" vs. "Three quarter notes".)
So, I very much think that LilyPond should continue to support formal
fractions of positive integers for time signature declarations. But your
argument provides additional incentive to also support time signature
declarations of the form (index? ly:duration?) and more generally
(index? ly:music?). Although it would be nice, from a user's
perspective, to do both using just the one \time command, I still doubt
that this would be feasible.
And if we had semantically correct time signature entry, Kieren's wish for a different display for
the duration would be relatively straightforward, although we would potentially have an
"isoduration" problem that is analogous to the "chord name semantics" problem
-- there is no difference in duration between 4~4 and 2, so we couldn't preserve 4~4. Similarly,
we could not tell the difference between 8.~8 and 8~8., although I can't imagine how the difference
between these two representations would be important; both represent a duration of 5 eighth-notes.
I think you mean 5 16ths? The difference might, for example, be in the
beat structure. I could imagine differences like 16[ 16] 16[ 16 16] vs.
16[ 16 16] 16[ 16], and also that beam subdivision might enter the
scene: There should be a difference between \time \kieren 1 { 8.~8 } and
\time \kieren 1 { 8. 8 } that I could imagine might just be
"disconnected groups" vs. "two groups with a single connecting beam", etc.
Lukas