Marc Hohl [Wed, 1 Aug 2012 19:15:46 +0000 (21:15 +0200)]
New bar line interface
* the input string of a bar line called by \bar "<bar string>" resembles the output one-by-one; a repeat sign is called by ":|."
* (define-bar-line ...) or \defineBarLine allows for new definitions. These functions have four arguments, namely
the bar line itself, the bar line used at the end of line, the bar line used at the begin of a new line and the span bar line.
* Annotations for barlines can be added to distinguish between two identical barlines with different break
apperance or span bar lines.
* To align span bars properly, the space character " " has a
special meaning. When it occurs, the width of the resembling glyph in the bar line definition is used.
* New glyphs can be added easily.
* Volta brackets take the bar line dimensions into account.
Julien Rioux [Fri, 5 Oct 2012 22:09:48 +0000 (18:09 -0400)]
convert-ly: Don't update \version when no rule is applied.
Note that this is not the same as what the existing -d
--diff-version-update command does. The behavior of convert-ly is
unchanged when rules are being applied, and -d is still used in the
same way. The change concerns itself only with the case that no rule
applies, because the version of the file is already up-to-date. In
this case, it used to be that the version in the file would be set to
version of the last rule, which would sometimes mean that the version
of the file upon output is lower than the version at input. This is
what we avoid in this patch.
David Kastrup [Wed, 3 Oct 2012 11:38:24 +0000 (13:38 +0200)]
Issue 2874: Provide an \undo function for turning overrides and sets into reverts and unsets
\undo\hideNotes is equivalent to \unHideNotes, \undo\easyHeadsOn to
\easyHeadsOff. While this can't undo reverts, it is useful for a lot
of overriding commands defined in ly/property-init.ly, and is also
useful in combination with \hide/\omit.
Trevor Daniels [Mon, 8 Oct 2012 22:33:49 +0000 (23:33 +0100)]
Doc: improve documentation of Bézier curves (2858)
- add \shape function
- show example of two curves being shaped
- show example of line-broken slur
- show example of S-shaped slur
- relegate setting absolute values to end
and give a more realistic example
- add ref from repeats section for simulating slurs
continuing into alternative blocks
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.