lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use fractions rather than Scheme pairs for \scaleDuration, timeSigna


From: dak
Subject: Re: Use fractions rather than Scheme pairs for \scaleDuration, timeSignatureFraction et al (issue 6200068)
Date: Sun, 13 May 2012 05:57:27 +0000

Reviewers: Keith,


http://codereview.appspot.com/6200068/diff/2001/Documentation/notation/rhythms.itely
File Documentation/notation/rhythms.itely (right):

http://codereview.appspot.com/6200068/diff/2001/Documentation/notation/rhythms.itely#newcode331
Documentation/notation/rhythms.itely:331: a4*2/3 gis a
On 2012/05/13 02:43:23, Keith wrote:
Oh yes.  You had asked who were "some people" who use this
construction.  It's
not just me this time; I also see it in other people's scores on
mutopiaproject.

I'll admit that I used it to avoid the Lisp syntax in \scaleDurations
#'(2 . 3)

\scaleDurations 2/3 would have worked from version 2.15.17 on (fractions
in function arguments).  The necessity of parser changes to allow for
fractions in property initializations caught me on the wrong foot: I
would have imagined the first patch set to work already.  This was
supposed to be just a documentation change.

http://codereview.appspot.com/6200068/diff/2001/Documentation/snippets/new/changing-time-signatures-inside-a-polymetric-section-using--scaledurations.ly
File
Documentation/snippets/new/changing-time-signatures-inside-a-polymetric-section-using--scaledurations.ly
(right):

http://codereview.appspot.com/6200068/diff/2001/Documentation/snippets/new/changing-time-signatures-inside-a-polymetric-section-using--scaledurations.ly#newcode25
Documentation/snippets/new/changing-time-signatures-inside-a-polymetric-section-using--scaledurations.ly:25:
\scaleDurations 8/5 {
On 2012/05/13 02:43:23, Keith wrote:
Somehow, this worked before the patch.  Not a problem, just an
observation.

Yup.  As I said: 2.15.17 for function arguments (that's when \times 2/3
... became a regular function instead of a reserved word in the parser).

http://codereview.appspot.com/6200068/diff/2001/lily/lexer.ll
File lily/lexer.ll (right):

http://codereview.appspot.com/6200068/diff/2001/lily/lexer.ll#newcode487
lily/lexer.ll:487: {FRACTION}   {
On 2012/05/13 02:43:23, Keith wrote:
Stupid question, but I can't figure it out.  Can we remove this
pattern from the
rules for individual starting states, now that it is matched globally
?

I have not tried it.  We have separate rules for unsigned, possibly
because 3.5 can means something else in some modes.  One should probably
make sure that in special situations, like figured bass or chordmode,
the global parser change does not cause trouble.

I have not really given it any thought yet, relying on the regtests to
tell me if I was hitting on the syntax of existing constructs.

If one tried simplifying this, one should make sure that rules still
back up.

Description:
Use fractions rather than Scheme pairs for \scaleDuration,
timeSignatureFraction et al

Please review this at http://codereview.appspot.com/6200068/

Affected files:
  M Documentation/ly-examples/aucun-snippet.ly
  M Documentation/notation/rhythms.itely
A Documentation/snippets/new/changing-time-signatures-inside-a-polymetric-section-using--scaledurations.ly
  M input/regression/chord-tremolo-scaled-durations.ly
  M input/regression/time-signature-settings-by-staff.ly
  M lily/lexer.ll
  M lily/parser.yy
  M ly/engraver-init.ly
  M ly/performer-init.ly





reply via email to

[Prev in Thread] Current Thread [Next in Thread]