David Kastrup [Sun, 29 Jul 2012 14:05:10 +0000 (16:05 +0200)]
Unify the lexer's idea of words and commands across all modes.
A "word" (a string recognized even when not quoted) and a "command"
(something starting with \ and followed by letters and other folderol,
indicating a Scheme control sequence or similar) get the same syntax
in all modes:
A "word" is a sequence of alphabetic characters possibly containing
single dashes or underlines inside (not at the beginning or end).
David Kastrup [Mon, 30 Jul 2012 16:10:13 +0000 (18:10 +0200)]
Issue 2705: Parse music inside of output definitions in "notes" mode.
This makes \midi { \tempo 4. = 120 } work properly (without parsing
4. as a REAL token).
The next token after music will in rare circumstances be scanned still
in the lexer's "notes" mode. This could be problematic because of the
currently different word syntax of "notes" and "INITIAL" mode
(cf. issue 2702).
David Kastrup [Fri, 27 Jul 2012 18:38:15 +0000 (20:38 +0200)]
Issue 1650: merge multiple header specifications.
Books get initialized from $defaultheader, this is what toplevel \header will
set, and scores and bookparts are initialized empty so that they will end up
combined with their respective (possibly implicit) books.
When other MIDI midi events (such as an instrument change) occur
simultaneously with note(s), they should be placed in the MIDI file
before the note-on events, otherwise there is no way to (reliably)
affect the first note in a score.
David Kastrup [Mon, 23 Jul 2012 10:25:26 +0000 (12:25 +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.
David Kastrup [Thu, 19 Jul 2012 09:11:35 +0000 (11:11 +0200)]
reopened Issue 2584: please make partcombine merge slurs
This refrains from referencing a slur grob's direction field (often
inconclusive and not representative of the input), instead referencing
the direction of the causing event.
David Nalesnik [Tue, 17 Jul 2012 22:17:59 +0000 (17:17 -0500)]
Function for overriding broken spanners
The music function \alterBroken is intended to facilitate overrides
applied independently to the pieces of broken spanners--one of the
perennial difficulties faced by users of LilyPond (addressed in
Extending 2.6:"Difficult Tweaks"). The function aims at generalization
by allowing the user to specify the name of the spanner and the property
to be overridden.
The function will override unbroken spanners, but it will ignore
non-spanners with a warning.
The function calls \override and may be prefaced by \once (or followed by
a \revert of the relevant property).
David Kastrup [Thu, 28 Jun 2012 23:48:11 +0000 (01:48 +0200)]
Issue 2671: Provide functions ly:moment-main and ly:moment-grace
Those will usually be more convenient than using ly:moment-*-numerator
and ly:moment-*-denominator.
Also, (/ (ly:moment-*-numerator ...) (ly:moment-*-denominator ...))
can't deal with infinite moment components. This could theoretically
be amended by letting (ly:moment-*-denominator ...) resolve to
_inexact_ zero (in which case the division turns out ±inf.0), but that
is all rather hand-wavy and flimsy. Being able to access the
components directly is more straightforward.
David Kastrup [Sat, 14 Jul 2012 09:19:59 +0000 (11:19 +0200)]
Issue 2661: parser.yy: remove `fraction'
Previously the parser recognized fractions as well as the lexer. The effect
was that in certain contexts it was possible to use spaces around the slash.
This necessitated lookahead in parsing and is not apparently used anywhere.
It also does not help in making the input look consistent.
David Kastrup [Thu, 12 Jul 2012 11:16:30 +0000 (13:16 +0200)]
Rewrite incipit snippet using #{ ... #} in preference to Scheme
Using #{ ... #} extensively both illustrates better what is actually
happening LilyPond-wise as well as giving a better feeling about the
available power of #{ ... #} for replacing Scheme code.