+pl 60.jcn2
+ - moved creation of $BUILDDIR/share/locale into set-lily.sh
+ - slur slope change constraints when snapping
+ - slur height damping based on bow height
+ - don't typeset unfinished (auto) beams
+
pl 60.jcn1
- interstaff slur tuning
- added some regtests
. * Rewrite \rhythm to be during interpreting.
. * move \version check to lexer.ll
. * junk delayed spanner breaking.
+. * core dump on broken (de)crescendo
+. * align left edge of broken (de)cresc/slur/tie/tuplet/volta
. * check dangling_scm_sym working.
. * spacing of accidentals
. * key restorations & repeats
. * deps for ly2dvi
. * indent = 0.0 with linewidth=-1.0
. * collisions & accidentals.
-. * auto-beaming in input/test/spacing.ly:
-Non-finished auto-beams (consider_end_and_begin didn't decide to
-end beam), that get typeset in removal_processing (eg: end of a piece)
-Huh, snap niks van: gewone beam gaat wel goed. hoe kan abe nu
-invloed hebben op beam-creatie, stopt toch gewoon stokken in?
. * music ending in grace notes.
. * PostScript
. * half notes in pfa
. * Duration
. * clef engraver
. * parser
+. * Bezier
.* BUGS
. * [c8. c16 c16 c16] in 6/8 timesig.
MAJOR_VERSION=1
MINOR_VERSION=1
PATCH_LEVEL=60
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
rm -rf $prefix/share/lilypond
showln -sf $sources/lilypond $prefix/share/lilypond
+
+BUILDDIR=`pwd`
+LOCALES="it nl"
+for i in $LOCALES; do
+ dir=$BUILDDIR/share/locale/$i/LC_MESSAGES
+ if test ! -x $dir ; then
+ mkdir -p $dir
+ fi
+ rm -f $dir/lilypond.mo
+ showln -sf $BUILDDIR/po/out/$i.mo $dir/lilypond.mo
+done
+rm -f afm; showln -sf $BUILDDIR/mf/out afm
+rm -f tfm; showln -sf $BUILDDIR/mf/out tfm
+if test "x$TEX_TFMDIR" = "x" ; then
+ CMR10=`kpsewhich tfm cmr10.tfm`
+ TEX_TFMDIR=`dirname $CMR10`
+fi
+rm -f cmtfm; showln -sf $TEX_TFMDIR $BUILDDIR/cmtfm
+
+
if [ -f ../.gdbinit ];
then
showln -f ../.gdbinit .
AC_CHECK_SEARCH_RESULT($YODL2TEXINFO, yodl,
You should install Yodl 1.30.2 or newer)
-AC_MSG_CHECKING(links for running from sourcetree)
-LILYPONDPREFIX=$absolute_builddir
-LOCALES="it nl"
-for i in $LOCALES; do
- dir=$LILYPONDPREFIX/share/locale/$i/LC_MESSAGES
- if test ! -x $dir ; then
- mkdir -p $dir
- fi
- rm -f $dir/lilypond.mo
- ln -sf $LILYPONDPREFIX/po/out/$i.mo $dir/lilypond.mo
-done
-rm -f afm; ln -sf $LILYPONDPREFIX/mf/out afm
-rm -f tfm; ln -sf $LILYPONDPREFIX/mf/out tfm
-rm -f cmtfm; ln -sf $TEX_TFMDIR cmtfm
-AC_MSG_RESULT(ok)
-
AC_STEPMAKE_END
SMALLER=-1,
BIGGER=1,
START = -1,
- STOP = 1
+ STOP = 1,
+ X=1,
+ Y=-1,
};
inline Direction
-
-%JAN: Dit is een autobiem bug.
-\score {
- \notes \transpose c'' \context Voice { c8 c16 c32 c64 }
- }
-
-
--- /dev/null
+% spanners start at line start
+\score{
+ \notes\relative c''{
+ % broken cresc dumps core
+ c2\< c4 \times 2/3 { c( c c }
+ c4 c )\!c c
+ }
+ \paper{
+ linewidth=30.\mm;
+ }
+}
void
Auto_beam_engraver::do_removal_processing ()
{
- if (stem_l_arr_p_)
- end_beam ();
+ /* finished beams may be typeset */
typeset_beam ();
+ /* but unfinished may need another announce/acknoledge pass */
+ if (stem_l_arr_p_)
+ junk_beam ();
}
bool
#define BEZIER_BOW_DOUT cerr
#endif
+
+/*
+ [TODO]
+
+ * better names, esp. for all calc_foo functions
+ * blow_fit vs calc_default (Real) and calc_f (Real)
+ * exact height / tangent calculation
+
+ */
+
void
Curve::flipy ()
{
calc_controls ();
+ /*
+ duh, this is crude (control-points)
+ perhaps it's even better to check the amount of blow_fit ()
+ */
+ for (int i=0; i < control_.size (); i++)
+ {
+ Real y = control_[i][Y_AXIS];
+ curve_extent_drul_[Y].unite (Interval (y, y));
+ Real x = control_[i][X_AXIS];
+ curve_extent_drul_[X].unite (Interval (x, x));
+ }
+
print ();
transform_back ();
#ifndef NPRINT
if (i && !calc_clipping ())
return;
+ /*
+ why do we always recalc from 0?
+ shouldn't calc_f () be used (too), rather than blow_fit () (only)?
+ */
calc_default (0);
calc_bezier ();
return Offset (dx / 2, dy);
}
-
-
/*
Ugh. Control points are too crude measures.
*/
return iv;
}
+Drul_array<Interval>
+Bow::curve_extent_drul () const
+{
+ Bezier_bow b (paper_l ());
+ b.set (get_encompass_offset_arr (), dir_);
+ b.calc ();
+ return b.curve_extent_drul_;
+}
Array<Offset>
Bow::get_controls () const
#include "real.hh"
#include "curve.hh"
+#include "drul-array.hh"
+#include "interval.hh"
/**
Simple bezier curve
Real alpha_;
Offset origin_;
Curve return_;
+ Drul_array<Interval> curve_extent_drul_;
};
Array<Offset> get_controls () const;
virtual Array<Offset> get_encompass_offset_arr () const;
virtual Interval do_height () const;
+ Drul_array<Interval> curve_extent_drul () const;
Drul_array<Real> dy_f_drul_;
Drul_array<Real> dx_f_drul_;
String lily_locale_dir;
String name (PACKAGE);
name.to_lower ();
+
+ /*
+ urg; what *do* we want with $LILYPONDPREFIX, DIR_DATADIR and $prefix/share
+ handy for multiple source-dir runs, though...
+ */
if (!prefix_directory.empty_b())
{
lily_locale_dir = prefix_directory + "/share/locale";
*/
else
{
- dx_f_drul_[d] -= d * x_gap_f;
+ /*
+ need break-align too. what about other spanners?
+ */
+ if (d == LEFT)
+ dx_f_drul_[d] = spanned_drul_[LEFT]->extent (X_AXIS).length ();
+
/*
broken: should get y from other piece, so that slur
continues up/down trend
Real height_damp_f;
Real slope_damp_f;
Real snap_f;
+ Real snap_max_dy_f;
if (!interstaff_b)
{
height_damp_f = paper_l ()->get_var ("slur_height_damping");
slope_damp_f = paper_l ()->get_var ("slur_slope_damping");
snap_f = paper_l ()->get_var ("slur_snap_to_stem");
+ snap_max_dy_f = paper_l ()->get_var ("slur_snap_max_slope_change");
}
else
{
height_damp_f = paper_l ()->get_var ("slur_interstaff_height_damping");
slope_damp_f = paper_l ()->get_var ("slur_interstaff_slope_damping");
snap_f = paper_l ()->get_var ("slur_interstaff_snap_to_stem");
+ snap_max_dy_f = paper_l ()->get_var ("slur_interstaff_snap_max_slope_change");
}
Real ratio_f;
*/
for (int i = 0; i < 3; i++)
{
- Real height_f = do_height ().length ();
+ Drul_array<Interval> curve_xy_drul = curve_extent_drul ();
+ Real height_f = curve_xy_drul[Y].length ();
+ Real width_f = curve_xy_drul[X].length ();
+
dy_f = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
- ratio_f = abs (height_f / dx_f);
+ ratio_f = abs (height_f / width_f);
if (ratio_f > height_damp_f)
{
Direction d = (Direction)(- dir_ * (sign (dy_f)));
if (!d)
d = LEFT;
/* take third step */
- Real damp_f = (ratio_f - height_damp_f) * dx_f / 3;
+ Real damp_f = (ratio_f - height_damp_f) * width_f / 3;
/*
if y positions at about the same height, correct both ends
*/
/*
If, after correcting, we're close to stem-end...
*/
+ Drul_array<Real> snapy_f_drul;
+ snapy_f_drul[LEFT] = snapy_f_drul[RIGHT] = 0;
+ Drul_array<Real> snapx_f_drul;
+ snapx_f_drul[LEFT] = snapx_f_drul[RIGHT] = 0;
do
{
if ((note_column_drul[d] == spanned_drul_[d])
<= snap_f))
{
/*
- attach to stem-end
+ prepare to attach to stem-end
*/
Stem* stem_l = note_column_drul[d]->stem_l_;
- dx_f_drul_[d] = stem_l->hpos_f ()
+ snapx_f_drul[d] = stem_l->hpos_f ()
- spanned_drul_[d]->absolute_coordinate (X_AXIS);
- dy_f_drul_[d] = stem_l->extent (Y_AXIS)[dir_];
- dy_f_drul_[d] += info_drul[d].interstaff_f_;
- dy_f_drul_[d] += dir_ * 2 * y_gap_f;
+ snapy_f_drul[d] = stem_l->extent (Y_AXIS)[dir_];
+ snapy_f_drul[d] += info_drul[d].interstaff_f_;
+ snapy_f_drul[d] += dir_ * 2 * y_gap_f;
}
}
while (flip (&d) != LEFT);
+
+ /*
+ only use snapped positions if sign (dy) will not change
+ and dy doesn't change too much
+ */
+ if (snapy_f_drul[LEFT] && snapy_f_drul[RIGHT]
+ && ((sign (snapy_f_drul[RIGHT] - snapy_f_drul[LEFT]) == sign (dy_f)))
+ && (!dy_f || (abs (snapy_f_drul[RIGHT] - snapy_f_drul[LEFT] - dy_f)
+ < abs (dy_f * snap_max_dy_f))))
+ {
+ do
+ {
+ dy_f_drul_[d] = snapy_f_drul[d];
+ dx_f_drul_[d] = snapx_f_drul[d];
+ }
+ while (flip (&d) != LEFT);
+
+ }
+ else if (snapy_f_drul[LEFT]
+ && ((sign (dy_f_drul_[RIGHT] - snapy_f_drul[LEFT]) == sign (dy_f)))
+ && (!dy_f || (abs (dy_f_drul_[RIGHT] - snapy_f_drul[LEFT] - dy_f)
+ < abs (dy_f * snap_max_dy_f))))
+ {
+ Direction d = LEFT;
+ dy_f_drul_[d] = snapy_f_drul[d];
+ dx_f_drul_[d] = snapx_f_drul[d];
+ }
+ else if (snapy_f_drul[RIGHT]
+ && ((sign (snapy_f_drul[RIGHT] - dy_f_drul_[LEFT]) == sign (dy_f)))
+ && (!dy_f || (abs (snapy_f_drul[RIGHT] - dy_f_drul_[LEFT] - dy_f)
+ < abs (dy_f * snap_max_dy_f))))
+ {
+ Direction d = RIGHT;
+ dy_f_drul_[d] = snapy_f_drul[d];
+ dx_f_drul_[d] = snapx_f_drul[d];
+ }
}
Array<Offset>
slur_x_minimum = 3.0 * \interline;
% slope damping: keep dy/dx < slur_slope_damping
-slur_slope_damping = 0.35;
-slur_interstaff_slope_damping = 0.5;
+slur_slope_damping = 0.3;
+slur_interstaff_slope_damping = 0.6;
% height damping: keep h/dx < slur_height_damping
-slur_height_damping = 0.45;
-slur_interstaff_height_damping = 0.7;
+slur_height_damping = 0.5;
+slur_interstaff_height_damping = 0.5;
% snap to stem if slur ends closer to stem than
-slur_snap_to_stem = 1.5 * \interline;
+slur_snap_to_stem = 1.75 * \interline;
slur_interstaff_snap_to_stem = 2.5 * \interline;
+% maximum dy change allowed by snapping
+slur_snap_max_slope_change = 0.5;
+slur_interstaff_snap_max_slope_change = 0.5;
+
tie_x_minimum = \slur_x_minimum;
#
# and create links to here, if necessary
#
-if [ ! -r $sources ]; then
- (cd ..; ln -s `pwd` $sources)
-fi
-#
sourcetree=`basename \`pwd\``
(cd ..; rm -f $package 2>&1 > /dev/null)
(cd ..; ln -s $sourcetree $package)
#
+if [ ! -r $sources ]; then
+ (cd ..; ln -s `pwd` $sources)
+fi
+#
mkdir -p $prefix/bin
result=`echo $PATH | grep "$HOME/usr/bin"`
if [ "x$result" = "x" ];then