Nick Payne <nick.pa...@internode.on.net> writes: > On 19/01/13 18:04, Mark Stephen Mrotek wrote: > > Hello: > > From the manual: > > \relative c' { > > \time 2/4 > > \set tupletSpannerDuration = #(ly:make-moment 1 4) > > \times 2/3 { c8 c c c c c } > > } > > I understand everything except how the “1” and “4” relate to > the notation. > > > Have a look at the section of the documentation on time administration > (http://lilypond.org/doc/v2.17/Documentation/notation/special-rhythmic- > concerns#time-administration): "ly:make-moment n m constructs a > duration of n/m of a whole note. For example, ly:make-moment 1 8 is an > eighth note duration and ly:make-moment 7 16 is the duration of seven > sixteenths notes." > > BTW, both #(ly:make-moment 1 4) and #(ly:make-moment 1/4) are valid, > and both forms can be found in the documentation (see > http://lilypond.org/doc/v2.17/Documentation/learning/types-of-properties) > for examples of the second.
Probably because I wrote that. > Is one form preferred over the other? If so, maybe that should be > consistently used throughout the documentation. The rational form is pretty new. There actually was one previous occurence of (ly:make-moment 0 0) in the part combiner, and by a combination of shoestring and magic it actually managed to do the intended thing, more by accident than anything else. The change was commit 9d1653ba738b9a9d6cf1ff4502f875988f632503 Author: David Kastrup <d...@gnu.org> Date: Mon Jul 23 12:25:26 2012 +0200 Issue 2692: Let ly:make-moment accept rationals for main and grace timing For compatibility reasons, it remains possible to write two numbers specifying numerator and denominator instead of the rationals. These forms cannot be mixed, and the two-argument form is disambiguated by the sign of the second argument: if it is positive, it can only be a denominator and not a grace timing. so it already was done in 2.15.42 (huh, would have thought it was 2.17 material). However, there has been no systematic attempt of making the other code and the documentation follow suit. I actually am a bit surprised since I distinctly remember juggling with some convert-ly patterns, but it would seem that I never got around to finishing the change. At any rate, due to its better mnemonic value (and the availability of ly:moment-main and ly:moment-grace also from around that time), I think we should preferably aim for the rational form. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user