David Kastrup [Sat, 23 Feb 2013 08:56:06 +0000 (09:56 +0100)]
Issue 3201: Don't initialize dim_cache_ array via constructor syntax
This is not valid C++ and not even a documented GCC extension. It is
probabably an oversight that GCC appears to be able to interpret this
in some manner.
Also creates a custom copy constructor for Dimension_cache for the
sole purpose of being able to initialize a Dimension_cache array
element-wise from a Dimension_cache array in the copy constructor of
Grob. C++ clearly is lacking in some departments.
David Kastrup [Mon, 25 Feb 2013 10:17:02 +0000 (11:17 +0100)]
Issue 2985: lilypond: Umlauts and other special characters incorrectly exported to PDF meta data
Since recent versions of GhostScript are more likely to get along with
UTF-16BE rather than ISO-8859-1 for PDF meta strings, we just escalate
straight from ASCII to UTF16-BE.
Mike Solomon [Wed, 20 Feb 2013 05:58:02 +0000 (06:58 +0100)]
Removes pure-print-callbacks list.
LilyPond currently hardcodes certain print functions as being able
to be evaluated as 'pure', meaning that they should not result in calls
to set_property, set_object, translate_axis or suicide. This means that,
for example, if one uses a custom stencil function, the Y-extent function
for the grob must be wrapped in an unpure-pure-container in order
to return a non-empty pure_height.
The reading of these hardcoded lists results in difficult-to-maintain code.
For example, several (but not all) flag modification functions are part of
this list, causing spacing inconsistencies in certain regtests.
Using unpure-pure-containers to signify all relationships between unpure and
pure functions and eliminating the lists of pure functions in
define-grobs.scm allows the code base to be more extensible, demanding the
elaboration of unpure-pure relationships in the property-setting phase
(either in define-grobs.scm or in an override) and not using hardcoded lists.
Inversely, this also prevents deep that can creep up when a function
signified as pure turns out not to be. For example, ly:note-head::print,
marked as pure, can be made unpure if its lookup of the style,
duration-log or glyph-name properties trigger vertical alignment
(which results in a call to translate_axis). Thus, users who wish to use
this function as an unpure function now can because it is no longer
hardcoded as pure.
David Kastrup [Fri, 15 Feb 2013 12:58:16 +0000 (13:58 +0100)]
Issue 3182: Defuse the obfuscated Scheme programming contest
This merely grepped for occurences of "reduce" and replaced most of
them (and possibly the close surroundings) with something saner. The
winner definitely has been in bar-line.scm. I have not touched the
occurences in stencil.scm since it would have been like putting
lipstick on a pig: the surroundings are even worse than the calls of
reduce.
David Kastrup [Fri, 15 Feb 2013 09:50:43 +0000 (10:50 +0100)]
Issue3181: Replace several misuses of eq? on numerical values
Numerical values don't carry identity, so (eq? 0 0) may or may not
evaluate to #t. Those need to be replaced by eqv? or, where both
items are guaranteed to be a number, = .
David Kastrup [Thu, 13 Dec 2012 15:57:22 +0000 (16:57 +0100)]
Let calc-{fingering,string-number,stroke-finger}::calc-text look at event 'text
This slightly increases the number of property lookups, and the same
function can be achieved using a tweak. However, it seems more
natural to attach any overriding text (in the case of non-standard
elements like thumbs or other) directly to the event in question.
David Kastrup [Thu, 7 Feb 2013 09:18:39 +0000 (10:18 +0100)]
Issue 754: don't transpose generic property-setting music commands
The actual issue was that
\transpose c e { \transposition bes ... }
created a Midi corresponding to an instrument using a transposition of
ges, leaving the Midi unchanged. Making the generic property-setting
commands (\set and \override) impervious to transposition will also
keep \transpose from tampering with user-set values.
This is particularly important since the pitch data type in LilyPond
is also being used for signifying intervals or pitch differences
rather than absolute pitches.
David Kastrup [Mon, 4 Feb 2013 15:38:12 +0000 (16:38 +0100)]
Issue 3153: Let music inside of #{ ... #} originate from @code{location} if set
In particular with regard to point-and-click, it has been a reoccuring
complaint that music originating from #{ ... #} has the #{ ... #}
environment as its origin. This patch will make such music originate
from @code{location} if set to a valid input location.
It would seem somewhat peculiar that #{ ... #} just grabs whatever
meaning @code{location} happens to have at the current lexical level
and runs with it. However, the same is already done for
@code{parser}, so it is not really out of line.
Adam Spiers [Mon, 14 Jan 2013 00:21:45 +0000 (00:21 +0000)]
fix handling of grace notes to shorten preceding tied notes correctly
In Note_performer::process_music(), when a grace note was encountered,
the immediately preceding Audio_note (or Audio_notes if the grace note
followed a chord) was/were shortened, but it failed to check whether the
Audio_note is part of a tie. Ensure that any note being shortened in
this way is the head of a tie, if it is part of a tie.
Mike Solomon [Sat, 26 Jan 2013 07:06:04 +0000 (08:06 +0100)]
Brings accidentals closer to chords on average.
Does this by giving placement priority to columns of multiple
accidentals. See accidental-grouping.ly.
Also allows Accidental_placement to be controlled at the voice level
via the accidentalGrouping property instead of necessitating
a change of context for the Accidental_engraver.