-2006-09-15 Han-Wen Nienhuys <hanwen@lilypond.org>
+2006-09-16 Han-Wen Nienhuys <hanwen@lilypond.org>
- * stepmake/aclocal.m4: use -D_GLIBCXX_DEBUG if optimize not set.
+ * lily/rest-collision.cc (calc_positioning_done): fix whole/half
+ step positioning for note/rest combinations.
+
+ * input/regression/rest-note-collision.ly: new file.
+
+ * scm/define-grobs.scm (all-grob-descriptions): add
+ springs-and-rods
+
+ * flower/include/std-vector.hh: switch off again.
+
+ * VERSION (PATCH_LEVEL): bump to 2.9.18
+
+ * flower/include/std-string.hh: idem.
+
+ * flower/include/std-vector.hh (_GLIBCXX_DEBUG): set if NDEBUG not set.
2006-09-15 Mats Bengtsson <mabe@drongo.s3.kth.se>
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=9
-PATCH_LEVEL=17
+PATCH_LEVEL=18
MY_PATCH_LEVEL=
#include "compare.hh"
+#if 0
+/*
+ leads to dubious crashes - libstdc++ bug?
+ */
+#ifndef NDEBUG
+#define _GLIBCXX_DEBUG 1
+#endif
+#endif
+
#include <string>
using namespace std;
#ifndef STD_VECTOR_HH
#define STD_VECTOR_HH
+#if 0
+
+/*
+ leads to dubious crashes - libstdc++ bug?
+*/
+#ifndef NDEBUG
+#define _GLIBCXX_DEBUG 1
+#endif
+#endif
+
#include <algorithm> /* find, reverse, sort */
#include <functional> /* unary_function */
#include <cassert>
vector<string>
string_split (string str, char c)
{
- vector<string> a;
ssize i = str.find (c);
+
+ vector<string> a;
while (i != NPOS)
{
string s = str.substr (0, i);
--- /dev/null
+
+\header {
+
+ texidoc = "In rest-note collisions, the rest moves in discrete
+ steps, and inside the staff, it moves in whole staff spaces."
+
+ }
+
+
+\version "2.9.18"
+\new Staff {
+
+ <<
+ \relative c'' {
+ f e d c b a g f e d c
+ }
+ \\
+ {
+ r4 r r r r r r r r r r
+ }
+ >>
+ <<
+ {
+ r4 r r r r r r r r r r
+ }
+ \\
+ \relative c'' {
+ f e d c b a g f e d c
+ }
+ >>
+}
{
string dir = dirs[i];
if (!FcConfigAppFontAddDir (font_config_global, (FcChar8 *)dir.c_str ()))
- error (_f ("adding font directory: %s", dir.c_str ()));
+ error (_f ("failed adding font directory: %s", dir.c_str ()));
else if (be_verbose_global)
message (_f ("adding font directory: %s", dir.c_str ()));
}
ADD_INTERFACE (Note_column, "note-column-interface",
"Stem and noteheads combined",
- "arpeggio note-heads rest-collision rest horizontal-shift stem accidentals force-hshift");
+
+ /* properties */
+ "accidentals "
+ "arpeggio "
+ "force-hshift "
+ "horizontal-shift "
+ "note-heads "
+ "rest "
+ "rest-collision "
+ "stem "
+ );
for (vsize i = rests.size (); !rcol && i--;)
if (Note_column::dir (rests[i]))
{
- dir = Note_column::dir (rests[i]);
rcol = rests[i];
+ dir = Note_column::dir (rcol);
}
if (!rcol)
return SCM_UNSPECIFIED;
+ Grob *rest = Note_column::get_rest (rcol);
Grob *common = common_refpoint_of_array (notes, rcol, Y_AXIS);
Interval restdim = rcol->extent (common, Y_AXIS);
for (vsize i = 0; i < notes.size (); i++)
notedim.unite (notes[i]->extent (common, Y_AXIS));
- Real dist
- = minimum_dist + dir * max (notedim[dir] - restdim[-dir], 0.0);
+ Real y = dir * max (0.0,
+ -dir * restdim[-dir] + dir * notedim[dir] + minimum_dist);
+
int stafflines = Staff_symbol_referencer::line_count (me);
if (!stafflines)
{
}
// move discretely by half spaces.
- int discrete_dist = int (ceil (dist / (0.5 * staff_space)));
+ int discrete_y = dir * int (ceil (y / (0.5 * dir * staff_space)));
// move by whole spaces inside the staff.
- if (discrete_dist < stafflines + 1)
- discrete_dist = int (ceil (discrete_dist / 2.0) * 2.0);
+ if (fabs (Staff_symbol_referencer::get_position (rest)
+ + discrete_y) < stafflines + 1)
+ {
+ discrete_y = dir * int (ceil (dir * discrete_y / 2.0) * 2.0);
+ }
- Note_column::translate_rests (rcol, dir * discrete_dist);
+ Note_column::translate_rests (rcol, discrete_y);
}
return SCM_UNSPECIFIED;
}
(Tie
. (
(control-points . ,ly:tie::calc-control-points)
+ (springs-and-rods . ,ly:spacing-spanner::set-springs)
(avoid-slur . inside)
(direction . ,ly:tie::calc-direction)
(stencil . ,ly:tie::print)
(define (try-solo type start-idx current-idx)
"Find a maximum stretch that can be marked as solo. Only set
-the mark when there are no spanners active."
+the mark when there are no spanners active.
+
+ return next idx to analyse.
+"
(if (< current-idx (vector-length result))
(let* ((now-state (vector-ref result current-idx))
(solo-state (current-voice-state now-state (if (equal? type 'solo1) 1 2)))
current-idx)
((and
(null? (span-state solo-state)))
+
;;
;; This includes rests. This isn't a problem: long rests
;; will be shared with the silent voice, and be marked
AC_DEFINE(NDEBUG)
DEFINES="$DEFINES -DNDEBUG"
OPTIMIZE=" -O2 -finline-functions"
- else
- DEFINES="$DEFINES -D_GLIBCXX_DEBUG"
fi
if test $profile_b = yes; then