* lily/slur.cc: add quant-score.
* input/regression/slur-staccato.ly (texidoc): remove
* make/lilypond.redhat.spec.in (Group): remove musedata2ly
+2004-08-29 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * input/regression/slur-stem-broken.ly: remove.
+
+ * lily/slur.cc: add quant-score.
+
+ * input/regression/slur-staccato.ly (texidoc): remove
+
+ * make/lilypond.redhat.spec.in (Group): remove musedata2ly
+
2004-08-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
* lily/include/bezier-bow.hh: remove.
2004-08-27 Graham Percival <gperlist@shaw.ca>
- * Documentation/user/introduction.itely: add note about the "example templates"
- section of the manual, and remove link to input/template/
+ * Documentation/user/introduction.itely: add note about the
+ "example templates" section of the manual, and remove link to
+ input/template/
2004-08-27 Juergen Reuter <reuter@ipd.uka.de>
@itemize @bullet
+@item The automatic staff changer, which is invoked with
+@code{\autochange}, now creates the @code{up} and @code{down} staff
+automatically, and uses bass clef for the bottom staff.
+
@item There is now support for putting two slurs on chords, both above
and below. This is switched on with the @code{doubleSlurs} property.
}
\relative c''{
- \override Slur #'after-line-breaking-callback = #New_slur::after_line_breaking
- \override Slur #'print-function = #New_slur::print
- \override Slur #'height = ##f
-
e1( \break a,)
\time 2/4
e'2( \break a,)(\break
+++ /dev/null
-
-\version "2.3.4"
-\header {
-texidoc="An extra offset may be added between a slur and staccato(s)."
-}
-
-\paper { raggedright = ##t}
-
-\score {
- \context Staff \relative c'' {
- \override Slur
- #'attachment-offset = #'((0 . 1) . (0 . 1))
- a-.( g-. a)-.
- \override Slur
- #'attachment-offset = #'((0 . 1.5) . (0 . 1.5))
- b-.( a-. b)-.
- }
-}
+++ /dev/null
-
-\version "2.3.4"
-\header {
-texidoc="Trend of broken slur with user-overridden stem attachment should also
-follow the same vertical direction it would have had in unbroken state."
-}
-\score {
- \relative c' {
- \override Slur #'attachment = #'(stem . stem)
- f( c' c c \break
- c c c \stemUp c)
- }
- \paper {
- linewidth=40*\staffspace
- }
-}
-
#include "hairpin.hh"
#include "interval.hh"
#include "item.hh"
-#include "new-slur.hh"
+#include "slur.hh"
#include "note-column.hh"
#include "paper-column.hh"
#include "script-interface.hh"
/* creats*/ "DynamicLineSpanner DynamicText Hairpin TextSpanner",
/* accepts */ "absolute-dynamic-event crescendo-event decrescendo-event",
-/* acks */ "note-column-interface script-interface new-slur-interface",
+/* acks */ "note-column-interface script-interface slur-interface",
/* reads */ "",
/* write */ "");
+++ /dev/null
-/*
- new-slur.hh -- declare New_slur
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
-*/
-
-#ifndef NEW_SLUR_HH
-#define NEW_SLUR_HH
-
-#include "lily-proto.hh"
-#include "lily-guile.hh"
-
-#define DEBUG_SLUR_QUANTING 1
-
-class New_slur
-{
-public:
- static void add_column (Grob *me, Grob *col);
- static void add_extra_encompass (Grob *me, Grob *col);
- DECLARE_SCHEME_CALLBACK (print, (SCM));
- DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
- DECLARE_SCHEME_CALLBACK (height, (SCM,SCM));
- DECLARE_SCHEME_CALLBACK (outside_slur_callback, (SCM,SCM));
- static bool has_interface (Grob *);
- static Bezier get_curve (Grob*me);
-};
-
-// zught
-Direction get_slur_dir (Grob *slur);
-
-#endif /* NEW_SLUR_HH */
-
+++ /dev/null
-/*
- slur-bezier-bow.hh -- declare Slur_bezier_bow
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2000--2004 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef SLUR_BEZIER_BOW_HH
-#define SLUR_BEZIER_BOW_HH
-
-#include "bezier-bow.hh"
-
-class Slur_bezier_bow
-{
- Array<Offset> encompass_;
-
- void to_canonical_form ();
- Direction dir_;
- Real alpha_;
- Offset origin_;
- Real h_inf_, r_0_;
-
-public:
-
- /**
- The canonical bezier.
- */
- Bezier curve_;
-
- Slur_bezier_bow (Array<Offset> encompass, Direction dir,
- Real hinf, Real r0);
- Bezier get_bezier () const;
-
- void minimise_enclosed_area (Real beauty, SCM props);
- Real fit_factor () const;
- void blow_fit ();
- Real get_enclosed_area () const;
-private:
- Array<Real> area_x_gradientses (Real area);
-};
-
-#endif /* SLUR_BEZIER_BOW_HH */
--- /dev/null
+/*
+ slur.hh -- declare Slur
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+*/
+
+#ifndef NEW_SLUR_HH
+#define NEW_SLUR_HH
+
+#include "lily-proto.hh"
+#include "lily-guile.hh"
+
+#define DEBUG_SLUR_QUANTING 1
+
+class Slur
+{
+public:
+ static void add_column (Grob *me, Grob *col);
+ static void add_extra_encompass (Grob *me, Grob *col);
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
+ DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
+ DECLARE_SCHEME_CALLBACK (height, (SCM,SCM));
+ DECLARE_SCHEME_CALLBACK (outside_slur_callback, (SCM,SCM));
+ static bool has_interface (Grob *);
+ static Bezier get_curve (Grob*me);
+};
+
+#endif /* NEW_SLUR_HH */
+
#include "directional-element-interface.hh"
#include "engraver.hh"
#include "event.hh"
-#include "new-slur.hh"
+#include "slur.hh"
#include "note-column.hh"
#include "spanner.hh"
#include "tie.hh"
#include "directional-element-interface.hh"
#include "engraver.hh"
#include "event.hh"
-#include "new-slur.hh"
+#include "slur.hh"
#include "note-column.hh"
#include "paper-column.hh"
#include "rhythmic-head.hh"
/* descr */ "Handles note scripted articulations.",
/* creats*/ "Script",
/* accepts */ "script-event articulation-event",
-/* acks */ "stem-interface rhythmic-head-interface\
- new-slur-interface note-column-interface",
+/* acks */ "stem-interface rhythmic-head-interface "
+ "slur-interface note-column-interface",
/* reads */ "scriptDefinitions",
/* write */ "");
*/
#include "event.hh"
-#include "new-slur.hh"
+#include "slur.hh"
#include "note-column.hh"
#include "context.hh"
#include "directional-element-interface.hh"
if (Note_column::has_interface (info.grob_))
{
for (int i = slurs_.size (); i--; )
- New_slur::add_column (slurs_[i], e);
+ Slur::add_column (slurs_[i], e);
for (int i = end_slurs_.size (); i-- ; )
- New_slur::add_column (end_slurs_[i], e);
+ Slur::add_column (end_slurs_[i], e);
}
else
{
|| to_boolean (inside))
{
for (int i = slurs_.size (); i--; )
- New_slur::add_extra_encompass (slurs_[i], e);
+ Slur::add_extra_encompass (slurs_[i], e);
for (int i = end_slurs_.size (); i--; )
- New_slur::add_extra_encompass (end_slurs_[i], e);
+ Slur::add_extra_encompass (end_slurs_[i], e);
}
else if (inside == SCM_BOOL_F)
{
if (slur)
{
- e->add_offset_callback (New_slur::outside_slur_callback_proc, Y_AXIS);
+ e->add_offset_callback (Slur::outside_slur_callback_proc, Y_AXIS);
e->set_property ("slur", slur->self_scm());
}
}
#include "group-interface.hh"
#include "libc-extension.hh"
#include "lily-guile.hh"
-#include "new-slur.hh"
+#include "slur.hh"
#include "note-column.hh"
#include "output-def.hh"
#include "pitch.hh"
return d;
}
-Direction
-get_slur_dir (Grob *slur)
-{
- Direction d = get_grob_direction (slur);
- if (d == CENTER)
- d = get_default_dir (slur);
- return d;
-}
-MAKE_SCHEME_CALLBACK (New_slur, after_line_breaking,1);
+
+MAKE_SCHEME_CALLBACK (Slur, after_line_breaking,1);
SCM
-New_slur::after_line_breaking (SCM smob)
+Slur::after_line_breaking (SCM smob)
{
Spanner *me = dynamic_cast<Spanner*> (unsmob_grob (smob));
if (!scm_ilength (me->get_property ("note-columns")))
for (int i = encompasses.size (); i--; )
{
- if (New_slur::has_interface (encompasses[i]))
+ if (Slur::has_interface (encompasses[i]))
{
Grob * small_slur = encompasses[i];
- Bezier b = New_slur::get_curve (small_slur);
+ Bezier b = Slur::get_curve (small_slur);
Offset z = b.curve_point (0.5);
z += Offset (small_slur->relative_coordinate (common[X_AXIS], X_AXIS),
#include <math.h>
+#include "beam.hh"
#include "bezier.hh"
-#include "new-slur.hh"
-#include "main.hh"
-#include "font-interface.hh"
-#include "text-item.hh"
#include "directional-element-interface.hh"
+#include "font-interface.hh"
#include "group-interface.hh"
#include "lily-guile.hh"
#include "lookup.hh"
+#include "main.hh"
#include "note-column.hh"
#include "output-def.hh"
#include "rod.hh"
+#include "slur.hh"
#include "spanner.hh"
#include "staff-symbol-referencer.hh"
#include "staff-symbol.hh"
#include "stem.hh"
#include "stencil.hh"
+#include "text-item.hh"
#include "warn.hh"
-#include "beam.hh"
-MAKE_SCHEME_CALLBACK (New_slur, height, 2);
+MAKE_SCHEME_CALLBACK (Slur, height, 2);
SCM
-New_slur::height (SCM smob, SCM ax)
+Slur::height (SCM smob, SCM ax)
{
Axis a = (Axis)ly_scm2int (ax);
Grob *me = unsmob_grob (smob);
/*
Ugh should have dash-length + dash-period
*/
-MAKE_SCHEME_CALLBACK (New_slur, print,1);
+MAKE_SCHEME_CALLBACK (Slur, print,1);
SCM
-New_slur::print (SCM smob)
+Slur::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
if (!scm_ilength (me->get_property ("note-columns")))
Bezier
-New_slur::get_curve (Grob*me)
+Slur::get_curve (Grob*me)
{
Bezier b;
int i = 0;
}
void
-New_slur::add_column (Grob*me, Grob*n)
+Slur::add_column (Grob*me, Grob*n)
{
Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-columns"), n);
add_bound_item (dynamic_cast<Spanner*> (me), dynamic_cast<Item*> (n));
void
-New_slur::add_extra_encompass (Grob*me, Grob*n)
+Slur::add_extra_encompass (Grob*me, Grob*n)
{
Pointer_group_interface::add_grob (me, ly_symbol2scm ("encompass-objects"), n);
}
-MAKE_SCHEME_CALLBACK (New_slur, outside_slur_callback, 2);
+MAKE_SCHEME_CALLBACK (Slur, outside_slur_callback, 2);
SCM
-New_slur::outside_slur_callback (SCM grob, SCM axis)
+Slur::outside_slur_callback (SCM grob, SCM axis)
{
Grob *script = unsmob_grob (grob);
Axis a = Axis (ly_scm2int (axis));
Grob *cx = script->common_refpoint (slur, X_AXIS);
Grob *cy = script->common_refpoint (slur, Y_AXIS);
- Bezier curve = New_slur::get_curve (slur);
+ Bezier curve = Slur::get_curve (slur);
curve.translate (Offset (slur->relative_coordinate (cx, X_AXIS),
slur->relative_coordinate (cy, Y_AXIS)));
}
-ADD_INTERFACE (New_slur, "new-slur-interface",
+ADD_INTERFACE (Slur, "slur-interface",
"A slur",
- "excentricity encompass-objects control-points dashed slur-details direction height-limit note-columns ratio thickness");
+ "quant-score excentricity encompass-objects control-points dashed slur-details direction height-limit note-columns ratio thickness");
%{_bindir}/midi2ly
%{_bindir}/lilypond-book
%{_bindir}/mup2ly
-%{_bindir}/musedata2ly
%doc THANKS
%doc COPYING
%{_mandir}/man1/lilypond.1.gz
%{_mandir}/man1/midi2ly.1.gz
%{_mandir}/man1/lilypond-book.1.gz
-%{_mandir}/man1/musedata2ly.1.gz
%{_mandir}/man1/mup2ly.1.gz
%{_datadir}/lilypond/@TOPLEVEL_VERSION@/
(PhrasingSlur
. ((slur-details . ,default-slur-details)
- (print-function . ,New_slur::print)
+ (print-function . ,Slur::print)
(thickness . 1.2)
(spacing-procedure . ,Spanner::set_spacing_rods)
(minimum-length . 1.5)
- (after-line-breaking-callback . ,New_slur::after_line_breaking)
- (Y-extent-callback . ,New_slur::height)
+ (after-line-breaking-callback . ,Slur::after_line_breaking)
+ (Y-extent-callback . ,Slur::height)
(height-limit . 2.0)
(ratio . 0.333)
- (meta . ((interfaces . (slur-interface new-slur-interface spanner-interface))))
+ (meta . ((interfaces . (slur-interface spanner-interface))))
))
(NonMusicalPaperColumn
(Slur
. ((slur-details . ,default-slur-details)
- (print-function . ,New_slur::print)
+ (print-function . ,Slur::print)
(thickness . 1.2)
(spacing-procedure . ,Spanner::set_spacing_rods)
(minimum-length . 1.5)
- (after-line-breaking-callback . ,New_slur::after_line_breaking)
- (Y-extent-callback . ,New_slur::height)
+ (after-line-breaking-callback . ,Slur::after_line_breaking)
+ (Y-extent-callback . ,Slur::height)
; Slur::height)
(height-limit . 2.0)
(ratio . 0.25)
- (meta . ((interfaces . (slur-interface new-slur-interface spanner-interface))))
+ (meta . ((interfaces . (slur-interface spanner-interface))))
))
(SpacingSpanner
; (bla (display name))
(ifaces (map lookup-interface (cdr (assoc 'interfaces meta))))
(ifacedoc (map (lambda (iface)
- (ref-ify (symbol->string (car iface)))
- )
+ (if (pair? iface)
+ (ref-ify (symbol->string (car iface)))
+ (error (format "Error making doc of ~s" name))))
(reverse ifaces)))
(engravers (filter
(lambda (x) (engraver-makes-grob? name x)) all-engravers-list))
Separating_group_spanner::set_spacing_rods
Side_position_interface::aligned_on_support_refpoints
Side_position_interface::aligned_side
- New_slur::after_line_breaking
- New_slur::height
- New_slur::print
+ Slur::after_line_breaking
+ Slur::height
+ Slur::print
Spacing_spanner::set_springs
Span_bar::before_line_breaking
Span_bar::get_bar_size
;;;;
;;;; (c) 2000--2004 Jan Nieuwenhuizen <janneke@gnu.org>
;;;;
-
-(define (attached-to-stem slur dir)
- (let* ((note-columns (ly:grob-property slur 'note-columns))
- (col (if (= dir RIGHT)
- (car note-columns)
- (car (last-pair note-columns))))
- (stem (ly:grob-property col 'stem)))
- (and
- (eq? col (ly:spanner-get-bound slur dir))
- ;(ly:grob? stem)
- ;(pair? (ly:grob-property stem 'heads))
-
- )))
-
-
-;;
-;; Currently, we have attachments:
-;;
-;; 'head 'along-side-stem 'stem 'loose-end
-;;
-(define (calc-slur-extremity slur dir)
- (let* ((note-columns (ly:grob-property slur 'note-columns))
- (col (if (= dir 1)
- (car note-columns)
- (car (last-pair note-columns))))
- (stem (ly:grob-property col 'stem))
- (beaming (if (and (ly:grob? stem)
- (ly:grob? (ly:grob-property stem 'beam)))
- (ly:grob-property stem 'beaming)
- '(() . ())))
- (one-side-beaming (if (= dir RIGHT)
- (car beaming)
- (cdr beaming)))
-
- )
-
- (cond
- ((< (length note-columns) 1) 'head)
- ((not (attached-to-stem slur dir))
-
- 'loose-end)
- ((and stem
- (not (equal? (ly:grob-property slur 'direction)
- (ly:grob-property stem 'direction)))) 'head)
- ((and (memq (ly:spanner-get-bound slur dir)
- (ly:grob-property slur 'note-columns))
- (ly:grob? stem)
-
- ;; slur would go under beam for 'head
- (> (length one-side-beaming ) 0)
- ;; and beam on same side as slur
- (equal?
- (ly:grob-property stem 'direction)
- (ly:grob-property slur 'direction))
- )
- 'stem)
- ((not (attached-to-stem slur dir))
- 'loose-end)
- (else
- 'head))
- ))
-
-
-;; This list defines the offsets for each type of attachment.
-;; The format of each element is
-;; (attachment stem-dir*dir slur-dir*dir)
-;; Different attachments have different default points:
-;;
-;; head: Default position is centered in X, on outer side of head Y
-;; along-side-stem: Default position is on stem X, on outer side of head Y
-;; stem: Default position is on stem X, at stem end Y
-(define default-slur-extremity-offset-alist
- '(
- ((head 1 1) . (-0.25 . 0.75))
- ((head 1 -1) . (-0.25 . 0.75))
- ((head -1 1) . (-0.25 . 0.75))
- ((head -1 -1) . (-0.85 . 0.75))
-
- ((stem 1 1) . (-0.125 . 0.5))
- ((stem -1 -1) . (-0.125 . 0.5))
-
- ((loose-end 1 1) . (-0.4 . 0))
- ((loose-end 1 -1) . (-0.4 . 0))
- ((loose-end -1 -1) . (-4 . 0))
- ((loose-end -1 1) . (-4 . 0))
- ))
-
-;; This is a bit of a hack: slurs and phrasing slurs
-;; attaching at the same note must not collide.
-;; However, slurs (and phrasing slurs) should look
-;; at scripts and eachother.
-(define default-phrasing-slur-extremity-offset-alist
- '(
- ((head 1 1) . (-0.25 . 1.25))
- ((head 1 -1) . (-0.25 . 1.25))
- ((head -1 1) . (-0.25 . 1.25))
- ((head -1 -1) . (-0.85 . 1.25))
-
- ((stem 1 1) . (-0.25 . 1.5))
- ((stem -1 -1) . (-0.25 . 1.5))
-
- ((loose-end 1 1) . (-0.4 . 0))
- ((loose-end 1 -1) . (-0.4 . 0))
- ((loose-end -1 -1) . (-4 . 0))
- ((loose-end -1 1) . (-4 . 0))
- ))
-
+ ;
; this is put into the slur-details property of Slur and PhrasingSlur
(define default-slur-details
'((region-size . 4)