David Kastrup [Mon, 1 Oct 2012 12:15:17 +0000 (14:15 +0200)]
Issue 2872: Provide define-session and define-session-public commands
Also moves the session logic into lily.scm instead of init.ly
A session corresponds to one .ly file on the LilyPond command line;
sessions are supposed to be processed independently in one LilyPond
run.
define-session will declare a variable that has its value recorded at
the start of the first session and reinstated at the start of each
following sessions. This is automatically the case for every variable
defined in variables in the parser module established while loading
ly/declarations-init.ly. However, not every changeable information
handled in the .scm parts of LilyPond can easily or reasonably be
stored in the parser module. define-session (and
define-session-public) provide a way to get the same semantics for
variables defined in the Scheme parts of LilyPond.
David Kastrup [Wed, 26 Sep 2012 13:06:56 +0000 (15:06 +0200)]
Issue 2859: Provide \hide and \omit functions for transparent and void glyphs
Both functions take either a grob name to override, or a music
expression to tweak (that is, the type of the argument decides whether
this results in an override or a tweak).
\hide sets #'transparent for the affected grob to ##t,
\omit sets #'stencil for the affected grob to ##f.
Example uses are
\new Voice \with { \omit StringNumber } { c'\4 }
{ <c' \hide g'~> g' }
David Kastrup [Sun, 30 Sep 2012 00:21:00 +0000 (02:21 +0200)]
Issue 2869: Regularize lyrics lexer mode
That makes lyrics mode rather similar to markup mode regarding how
words are formed. {} are never considered part of words unless
enclosed in quotes. Unquoted words do not contain whitespace, braces,
quotes, backslashes, numbers or Scheme expressions. In addition, they
cannot start with * . = and | since that would mess with duration,
assignment and barcheck syntax. This removes some remaining
TeX-oriented cruft in the lexer. The set of word-non-starters might
need revisiting, but at least the regtests seem to pass.
Add examples of
- connecting notes across staves
- connecting notes in chords
- adding timing marks and expressions to long glissandi
- making glissandi breakable
(Based on original work by
Tiresia GIUNO <tiresiag@googlemail.com>,
a patch by Werner LEMBERG <wl@gnu.org> and
advice from Benkő Pál <benko.pal@gmail.com>)
David Kastrup [Fri, 14 Sep 2012 05:53:10 +0000 (07:53 +0200)]
Eliminate MARKUP_IDENTIFIER and MARKUPLIST_IDENTIFIER
Those and their LYRIC variants are no longer generated by the lexer.
Instead, SCM_IDENTIFIER takes over their function. One advantage is
that standard Scheme strings and lists of strings (including the empty
list!) are no longer receiving special syntactic status when used as
identifier.
David Kastrup [Sun, 16 Sep 2012 20:04:07 +0000 (22:04 +0200)]
Issue 2717: Implement \single for converting overrides to tweaks
\single, like \once, can be applied to music consisting of one or more
overrides. It translates such an override set, for example
\easyHeadsOn, into a tweak on the following music item, so you can use
it like
{ < \single\easyHeadsOn c' g' >2 q }
inside of a chord and have it only affect a single notehead of the
chord when \once\easyHeadsOn would affect all noteheads.
In that manner, most overrides defined in ly/property-init.ly
are made available as tweaks.
David Kastrup [Mon, 24 Sep 2012 09:59:42 +0000 (11:59 +0200)]
Issue 2856: Get along with use of grob-property instead of grob-property-path in overrides
LilyPond uses a willy-nilly mixture of grob-property and
grob-property-path when generating overrides programmatically (the
parser only uses grob-property-path). Several override-reinterpreting
commands and functionalities were not prepared to deal with this.
A STRING_IDENTIFIER always was a special case of a MARKUP_IDENTIFIER
without being treated equally at top level. That led to craziness
like
xxx=\markup "test"
\xxx
being invalid, while
xxx=\markup \italic "test"
\xxx
was valid code. This change just removes the STRING_IDENTIFIER
category altogether. Where it was used previously, MARKUP_IDENTIFIER
is accepted now syntactically, and where the semantics indeed require
a plain string, an error is generated explicitly in the action instead
of leaving it to the parser to complain about bad grammar.
David Kastrup [Fri, 21 Sep 2012 10:49:23 +0000 (12:49 +0200)]
Issue 2853: Set up indent-tabs-mode for Emacs in lexer.ll and parser.yy
indent-tabs-mode has been switched off for C++ files generally via
directory-local variables when editing with Emacs.
However, for lack of working better indentation modes that cooperate
well with Bison and Flex files, lexer.ll and parser.yy are using a
tab-based indentation style oriented on the Linux kernel indentation
style. In order to not cause an even greater inconsistent mess, local
file variables are used for switching tab-based indentation back on in
those files when editing them with Emacs.
Ian Hulin [Tue, 18 Sep 2012 00:04:57 +0000 (01:04 +0100)]
Issue 2758. ly_module_lookup caused deprecation warnings with Guile V2.06.
The V2.17.0 definition of ly_module_lookup in module-scheme.cc uses two
functions, scm_sym2var and scm_module_lookup_closure, which issue
deprecation warnings in Guile V2.06. A call to the new Guile API function,
scm_module_variable, provides the functionality for both deprecated
routines, but has not been back-ported to Guile V1.8.
This patch adds a conditionally-compiled block when running with a Guile
version < V2.0, so that Guile V1 will the existing undocumented API calls
in ly_module_lookup, but Guile V2 will use API call scm_module_variable.
Ian Hulin [Sun, 16 Sep 2012 21:10:13 +0000 (22:10 +0100)]
Issue 2758. ly_module_lookup caused deprecation warnings with Guile V2.06.
The V2.17.0 definition of ly_module_lookup in module-scheme.cc uses two
functions, scm_sym2var and scm_module_lookup_closure, which issue
deprecation warnings in Guile V2.06. A call to the new Guile API function,
scm_module_variable, provides the functionality for both deprecated
routines, but has not been back-ported to Guile V1.8.
This patch adds a conditionally-compiled block when running with a Guile
version < V2.0, so that Guile V1 will not use the deprecated scm_ calls
in ly_module_lookup, and Guile V2 will use API call scm_module_variable.
Benkő Pál [Fri, 7 Sep 2012 18:51:51 +0000 (20:51 +0200)]
redesign dot placement of repeat sign
refines6239ab9f01fcb31fbd6d5f7e81a98a7f58e663bf in that allow both
dots in the same space only as last resort (for two-line staves or for
exotic staves where all outer spaces are too narrow or asymmetric);
put no lower limit on the space required between dot and staffline.
an important example is TabStaff, which, for the present purposes, is
equivalent to a Staff with line-count 6 and staff-space 1.5.
Benkő Pál [Fri, 7 Sep 2012 17:39:21 +0000 (19:39 +0200)]
new regtests for dots of a repeat sign
- test default tablature
- test set-global-staff-size and layout-set-staff-size combinations
in default and extreme circumstances to make sure that real world
usage is not hindered
Mike Solomon [Wed, 12 Sep 2012 05:59:38 +0000 (07:59 +0200)]
Allows the user to override the text property of ChordName
Checks to see if the user has set text and, if so, does not call
set_property in the engraver.
Compares contents of markups to determine chord equality, allowing
successive overridden chords with the same markup content to be
identified as equal.
Mike Solomon [Mon, 10 Sep 2012 07:17:28 +0000 (09:17 +0200)]
Better approximations for cross-staff slurs
SlurStub grobs are used to approximate the vertical skylines of
cross staff slurs by using control points generated by pure heights
instead of heights. Depending on how far off the actual translations are
from the minimal translations, these control points will be more or less
viable. A SlurStub is generated for every VerticalAxisGroup on which
a slur has encompass objects and only those residing on the extremal
UP and DOWN vertical axis groups get vertical skylines.
Mike Solomon [Mon, 10 Sep 2012 06:53:09 +0000 (08:53 +0200)]
Avoids script-tie collisions
Ties are now issued at their correct beginning time step and
are suicided if they are ultimately unused. This allows the
Script_engraver to acknowledge them at the correct timestep and
register them as supports for the side-position-interface.
David Kastrup [Sat, 8 Sep 2012 15:31:14 +0000 (17:31 +0200)]
When printing a context def, include the source location.
This is a supplement to make the printing of "parser objects should be
dead" messages more useful. Adding the source location of an undead
context def makes the problem far easier to identify.
David Kastrup [Sat, 8 Sep 2012 14:40:39 +0000 (16:40 +0200)]
Issue 2754 cleanup: Only complain once about any undead object
Embarrassingly, commit 2ea3798f3473a7dd02b85ac311aa9b8de4938c3c only
implemented the requisite fix in one place. This replicates the code
for avoiding duplicate error messages at the second call place of
ly:parsed-undead-list! in lily.scm.
Mike Solomon [Tue, 4 Sep 2012 22:52:19 +0000 (00:52 +0200)]
LedgerLineSpanner included in vertical skylines of VerticalAxisGroup.
An elements grob array was erroneously being created for the
LedgerLinesSpanner. This has been eliminated, which now means that its
stencil can be used to calculate its vertical skylines.
Keith OHara [Wed, 29 Aug 2012 19:47:47 +0000 (12:47 -0700)]
grob-property.cc: outdated comment
Callbacks do not, in practice, return SCM_UNSPECIFIED after
setting the property they were called with, and an assert()
added later with commit 635bff94 severely restricts doing so.
Trevor Daniels [Wed, 29 Aug 2012 10:13:44 +0000 (11:13 +0100)]
Doc: NR 3.2.1: clarify titles and \header blocks (2652)
- drop use of "title blocks"
- make headings consistent
- explain the two titling areas
- explain the four positions for \header blocks and their
hierarchy
- clarify text in several places
Mike Solomon [Fri, 31 Aug 2012 07:27:17 +0000 (09:27 +0200)]
Uses a heuristic to determine if chord tremolos collide with accidentals.
This heuristic makes several assumptions about when a chord tremolo
will collide with accidentals. It must be between whole notes, it
must be in the staff, and it must be an ascending major third or lower.
The heuristic is entirely contained in Beam::whole_note_close_chord_tremolo,
which should be modified if other cases involving chord tremolos arise.