From 01d84d552854fb399bd0e819502c6c2db2a1b214 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 8 Dec 1999 01:07:11 +0100 Subject: [PATCH] release: 1.3.10 --- CHANGES | 11 +-- DEDICATION | 2 +- VERSION | 4 +- lily/align-element.cc | 3 +- lily/auto-beam-engraver.cc | 2 +- lily/axis-group-element.cc | 4 +- lily/beam.cc | 6 +- lily/break-align-engraver.cc | 4 +- lily/break-align-item.cc | 8 +- lily/collision.cc | 51 +++++++----- lily/crescendo.cc | 2 +- lily/dot-column-engraver.cc | 2 +- lily/dot-column.cc | 46 +++++------ lily/extender-spanner.cc | 2 +- lily/graphical-axis-group.cc | 0 lily/graphical-element.cc | 0 lily/group-interface.cc | 10 +-- lily/hyphen-spanner.cc | 2 +- lily/include/axis-group-element.hh | 3 - lily/include/collision.hh | 4 +- lily/include/dot-column.hh | 6 +- lily/include/graphical-axis-group.hh | 0 lily/include/group-interface.hh | 6 +- lily/include/multi-measure-rest.hh | 3 - lily/include/note-column.hh | 11 +-- lily/include/rest-collision.hh | 11 +-- lily/include/rest.hh | 2 +- lily/include/rhythmic-head.hh | 11 +-- lily/include/score-element.hh | 6 +- lily/include/script-column.hh | 5 +- lily/include/slur.hh | 3 - lily/include/span-bar.hh | 2 - lily/include/stem-staff-side.hh | 1 - lily/include/stem.hh | 5 +- lily/include/tie.hh | 4 +- lily/include/tuplet-spanner.hh | 4 - lily/include/volta-spanner.hh | 3 - lily/item.cc | 41 ---------- lily/line-of-score.cc | 5 +- lily/local-key-engraver.cc | 2 +- lily/multi-measure-rest-engraver.cc | 2 +- lily/multi-measure-rest.cc | 34 ++++---- lily/note-column.cc | 116 ++++++++++++++++----------- lily/note-head.cc | 5 +- lily/note-heads-engraver.cc | 2 +- lily/paper-score.cc | 2 +- lily/rest-collision.cc | 73 ++++++++--------- lily/rest-engraver.cc | 2 +- lily/rest.cc | 8 +- lily/rhythmic-head.cc | 32 ++++---- lily/score-element.cc | 114 +++++++++----------------- lily/script-column.cc | 23 ++++-- lily/separating-group-spanner.cc | 14 ++-- lily/slur.cc | 93 +++++++++++---------- lily/spacing-spanner.cc | 6 +- lily/span-bar.cc | 34 +++++--- lily/spanner.cc | 43 ++++------ lily/staff-side.cc | 25 +++--- lily/staff-symbol-referencer.cc | 5 +- lily/stem-engraver.cc | 2 +- lily/stem-tremolo.cc | 8 +- lily/stem.cc | 93 +++++++++++---------- lily/tie.cc | 67 +++++++++------- lily/tuplet-spanner.cc | 111 +++++++++++++------------ lily/volta-spanner.cc | 60 ++++++++------ make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- 67 files changed, 617 insertions(+), 666 deletions(-) delete mode 100644 lily/graphical-axis-group.cc delete mode 100644 lily/graphical-element.cc delete mode 100644 lily/include/graphical-axis-group.hh diff --git a/CHANGES b/CHANGES index bcb9d4b971..6742e3945c 100644 --- a/CHANGES +++ b/CHANGES @@ -5,15 +5,8 @@ pl 9.hwn1 - junk Score_element::do_{width,height}: set callbacks directly. - merge Score_element, Graphical_element - merge Axis_group_element, Graphical_axis_group - - junk pointer fields from - * Single_malt_grouping_item - * Separating_group_spanner - * Stem_tremolo - * Hara_kiri_vertical_group_spanner - * Stem - * Axis_group_element - * Align_element - * Beam + - junk pointer fields fromScore_element derived classes + - junk obsolete do_substitute_dependency code. ********** diff --git a/DEDICATION b/DEDICATION index 5ce61d6331..03d11e0b40 100644 --- a/DEDICATION +++ b/DEDICATION @@ -21,7 +21,7 @@ Eva, Roos, Judith, Tim, and, of course, Wendy! Of course, our other friends in the `Eindhovens Jongeren Ensemble' -(http://www.cs.uu.nl/~hanwen/eje/) cannot go unmentioned either. +cannot go unmentioned either. --- * --- diff --git a/VERSION b/VERSION index fe652d9364..978773045b 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=9 -MY_PATCH_LEVEL=hwn2 +PATCH_LEVEL=10 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/lily/align-element.cc b/lily/align-element.cc index 2297ddd017..4134d8e3e2 100644 --- a/lily/align-element.cc +++ b/lily/align-element.cc @@ -64,8 +64,7 @@ Align_element::do_side_processing () Real where_f=0; Real center_f = 0.0; SCM scenter = get_elt_property ("center-element"); - Score_element *center_elt = (SMOB_IS_TYPE_B(Score_element,scenter)) - ? SMOB_TO_TYPE(Score_element,scenter) : 0; + Score_element *center_elt = unsmob_element (scenter); for (int i=0 ; i < elems.size(); i++) { diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 6e1e805b3d..81e7cf94b8 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -327,7 +327,7 @@ Auto_beam_engraver::acknowledge_element (Score_element_info info) /* Don't (start) auto-beam over empty stems; skips or rests */ - if (!stem_l->head_l_arr_.size ()) + if (!stem_l->first_head ()) { if (stem_l_arr_p_) end_beam (); diff --git a/lily/axis-group-element.cc b/lily/axis-group-element.cc index 306d9d481b..5992ea4614 100644 --- a/lily/axis-group-element.cc +++ b/lily/axis-group-element.cc @@ -27,7 +27,7 @@ Axis_group_element::elem_l_arr () const for (SCM s = get_elt_property ("elements"); gh_pair_p (s); s = gh_cdr (s)) { SCM e=gh_car (s); - r.push (dynamic_cast(SMOB_TO_TYPE (Score_element, e))); + r.push (unsmob_element (e)); } return r; @@ -85,7 +85,7 @@ Axis_group_element::extent_callback (Dimension_cache const *c) for (SCM s = me->get_elt_property ("elements"); gh_pair_p (s); s = gh_cdr (s)) { SCM e=gh_car (s); - Score_element * se = dynamic_cast(SMOB_TO_TYPE (Score_element, e)); + Score_element * se = SMOB_TO_TYPE (Score_element, e); Interval dims = se->extent (a); if (!dims.empty_b ()) diff --git a/lily/beam.cc b/lily/beam.cc index 10e1355d02..0335ff7256 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -59,7 +59,7 @@ Beam::stem (int i)const int Beam::stem_count ()const { - Group_interface gi (this); + Group_interface gi (this, "stems"); return gi.count (); } @@ -67,7 +67,7 @@ Beam::stem_count ()const void Beam::add_stem (Stem*s) { - Group_interface gi (this); + Group_interface gi (this, "stems"); gi.add_element (s); s->add_dependency (this); @@ -728,7 +728,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const // UGH Real nw_f; - if (!here->head_l_arr_.size ()) + if (!here->first_head ()) nw_f = 0; else if (here->type_i ()== 1) nw_f = paper_l ()->get_var ("wholewidth"); diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index 20909e5b03..f735fe9e8c 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -32,7 +32,7 @@ ADD_THIS_TRANSLATOR(Break_align_engraver); void Break_align_engraver::add_column (SCM smob) { - Score_element * e = SMOB_TO_TYPE (Score_element, smob); + Score_element * e = unsmob_element (smob); align_l_->add_element (e); typeset_element (e); } @@ -105,7 +105,7 @@ Break_align_engraver::acknowledge_element (Score_element_info inf) Axis_group_item * group = 0; if (s != SCM_BOOL_F) { - Score_element *e = SMOB_TO_TYPE(Score_element, gh_cdr(s)); + Score_element *e = unsmob_element (gh_cdr(s)); group = dynamic_cast (e); } else diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index e4c518834c..c4b6963bbc 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -33,11 +33,13 @@ Break_align_item::do_pre_processing() Real interline= paper_l ()->get_var ("interline"); Link_array elems; - for (int i=0; i < elem_l_arr_.size(); i++) + Link_array all_elems (elem_l_arr ()); + + for (int i=0; i < all_elems.size(); i++) { - Interval y = elem_l_arr_[i]->extent(axis ()); + Interval y = all_elems[i]->extent(axis ()); if (!y.empty_b()) - elems.push (dynamic_cast (elem_l_arr_[i])); + elems.push (dynamic_cast (all_elems[i])); } if (!elems.size ()) diff --git a/lily/collision.cc b/lily/collision.cc index 48148c21ef..f1691792c6 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -11,8 +11,6 @@ #include "note-head.hh" #include "paper-def.hh" -#include "tuple.hh" - Collision::Collision() { set_axes (X_AXIS, Y_AXIS); @@ -21,17 +19,20 @@ Collision::Collision() void Collision::add_column (Note_column* ncol_l) { - clash_l_arr_.push (ncol_l); add_element (ncol_l); add_dependency (ncol_l); } +/* + UGH. junk Shift_tup . + */ + void Collision::do_pre_processing() { Array autos (automatic_shift ()); Array hand (forced_shift ()); - Link_array done; + Link_array done; Real wid = paper_l ()->get_var ("collision_note_width"); for (int i=0; i < hand.size (); i++) @@ -60,10 +61,15 @@ Collision::automatic_shift () Drul_array > shifts; Array tups; - - for (int i=0; i < clash_l_arr_.size(); i++) + + SCM s = get_elt_property ("elements"); + for (; gh_pair_p (s); s = gh_cdr (s)) { - clash_groups[clash_l_arr_[i]->dir ()].push (clash_l_arr_[i]); + SCM car = gh_car (s); + + Score_element * se = unsmob_element (car); + if (Note_column * col = dynamic_cast (se)) + clash_groups[col->dir ()].push (col); } @@ -134,8 +140,16 @@ Collision::automatic_shift () { Note_column *cu_l =clash_groups[UP][0]; Note_column *cd_l =clash_groups[DOWN][0]; - Note_head * nu_l= cu_l->head_l_arr_[0]; - Note_head * nd_l = cd_l->head_l_arr_.top(); + + + /* + TODO. + */ + Note_head * nu_l= cu_l->first_head(); // cu_l->head_l_arr_[0]; + Note_head * nd_l = cd_l->first_head(); // cd_l->head_l_arr_.top(); + + + int downpos = cd_l->head_positions_interval ()[BIGGER]; int uppos = cu_l->head_positions_interval ()[SMALLER]; @@ -174,26 +188,19 @@ Collision::forced_shift () { Array tups; - for (int i=0; i < clash_l_arr_.size (); i++) + SCM s = get_elt_property ("elements"); + for (; gh_pair_p (s); s = gh_cdr (s)) { - SCM force = clash_l_arr_[i]->remove_elt_property ("force-hshift"); + Score_element * se = unsmob_element ( gh_car (s)); + + SCM force = se->remove_elt_property ("force-hshift"); if (force != SCM_UNDEFINED) { - tups. push (Shift_tup (clash_l_arr_[i], gh_scm2double (force))); + tups. push (Shift_tup (se, gh_scm2double (force))); } } return tups; } -void -Collision::do_substitute_element_pointer (Score_element*o_l,Score_element*n_l) -{ - if (o_l) - { - clash_l_arr_.substitute (dynamic_cast (o_l), - dynamic_cast (n_l)); - - } -} diff --git a/lily/crescendo.cc b/lily/crescendo.cc index b8ab2137fa..ccd2e91b80 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -23,7 +23,7 @@ Crescendo::Crescendo () Molecule Crescendo::get_symbol () const { - Real w_dim = extent (X_AXIS).length () - get_broken_left_end_align (); + Real w_dim = spanner_length()- get_broken_left_end_align (); Real absdyn_dim = paper_l ()-> get_var ("crescendo_shorten"); if (dyn_b_drul_[LEFT]) { diff --git a/lily/dot-column-engraver.cc b/lily/dot-column-engraver.cc index ece651bc9a..ccf70320b4 100644 --- a/lily/dot-column-engraver.cc +++ b/lily/dot-column-engraver.cc @@ -34,7 +34,7 @@ Dot_column_engraver::acknowledge_element (Score_element_info info) if (!h) return; - if (!h->dots_l_) + if (!h->dots_l ()) return; if (!dotcol_p_) diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 5ca15e946d..730228eeec 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -9,11 +9,14 @@ #include "dots.hh" #include "dot-column.hh" #include "rhythmic-head.hh" +#include "group-interface.hh" void Dot_column::add_dots (Dots *d) { - dot_l_arr_.push (d); + Group_interface gi (this, "dots"); + gi.add_element (d); + add_dependency (d); add_element (d); } @@ -21,20 +24,13 @@ Dot_column::add_dots (Dots *d) void Dot_column::add_head (Rhythmic_head *r) { - if (!r->dots_l_) + if (!r->dots_l ()) return ; add_support (r); - add_dots (r->dots_l_); + add_dots (r->dots_l ()); } -void -Dot_column::do_substitute_element_pointer (Score_element*o,Score_element*n) -{ - Note_head_side::do_substitute_element_pointer (o,n); - if (Dots * d = dynamic_cast (o)) - dot_l_arr_.substitute (d, dynamic_cast (n)); -} int Dot_column::compare (Dots * const &d1, Dots * const &d2) @@ -42,15 +38,12 @@ Dot_column::compare (Dots * const &d1, Dots * const &d2) return int (d1->position_f () - d2->position_f ()); } -void -Dot_column::do_pre_processing () -{ - dot_l_arr_.sort (Dot_column::compare); - Note_head_side::do_pre_processing (); -} Dot_column::Dot_column () { + Group_interface gi (this, "dots"); + gi.set_interface (); + set_direction (RIGHT); set_axes(X_AXIS,X_AXIS); } @@ -73,21 +66,24 @@ Dot_column::Dot_column () void Dot_column::do_post_processing () { - if (dot_l_arr_.size () < 2) + Link_array dots = Group_interface__extract_elements (this, (Dots*)0 , "dots"); + dots.sort (Dot_column::compare); + + if (dots.size () < 2) return; Slice s; s.set_empty (); Array taken_posns; int conflicts = 0; - for (int i=0; i < dot_l_arr_.size (); i++) + for (int i=0; i < dots.size (); i++) { for (int j=0; j < taken_posns.size (); j++) - if (taken_posns[j] == (int) dot_l_arr_[i]->position_f ()) + if (taken_posns[j] == (int) dots[i]->position_f ()) conflicts++; - taken_posns.push ((int)dot_l_arr_[i]->position_f ()); - s.unite (Slice ((int)dot_l_arr_[i]->position_f (), - (int)dot_l_arr_[i]->position_f ())); + taken_posns.push ((int)dots[i]->position_f ()); + s.unite (Slice ((int)dots[i]->position_f (), + (int)dots[i]->position_f ())); } if (!conflicts) @@ -97,12 +93,12 @@ Dot_column::do_post_processing () /* +1 -> off by one */ - int pos = middle - dot_l_arr_.size () + 1; + int pos = middle - dots.size () + 1; if (!(pos % 2)) pos ++; // center () rounds down. - for (int i=0; i set_position(pos); + dots[i]->set_position(pos); } } diff --git a/lily/extender-spanner.cc b/lily/extender-spanner.cc index b9f4f487b5..a9eb6640c5 100644 --- a/lily/extender-spanner.cc +++ b/lily/extender-spanner.cc @@ -35,7 +35,7 @@ Extender_spanner::do_brew_molecule_p () const { Molecule* mol_p = new Molecule; - Real w = extent (X_AXIS).length (); + Real w = spanner_length (); w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]); Real h = paper_l ()->get_var ("extender_height"); diff --git a/lily/graphical-axis-group.cc b/lily/graphical-axis-group.cc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/graphical-element.cc b/lily/graphical-element.cc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/group-interface.cc b/lily/group-interface.cc index b91d50e936..e9b79eeb19 100644 --- a/lily/group-interface.cc +++ b/lily/group-interface.cc @@ -9,16 +9,16 @@ #include "group-interface.hh" #include "score-element.hh" -Group_interface::Group_interface (Score_element* e) +Group_interface::Group_interface (Score_element const* e) { - elt_l_ = e; + elt_l_ = (Score_element*)e; name_ = "elements"; } -Group_interface::Group_interface (Score_element *e, String s) +Group_interface::Group_interface (Score_element const *e, String s) { - elt_l_ =e; + elt_l_ =(Score_element*)e; name_ = s; } bool @@ -40,7 +40,7 @@ Group_interface::add_element (Score_element*p) int Group_interface::count () { - return scm_ilength (elt_l_->get_elt_property ("name")); + return scm_ilength (elt_l_->get_elt_property (name_)); } void diff --git a/lily/hyphen-spanner.cc b/lily/hyphen-spanner.cc index 411ab3670d..ebb02d18d4 100644 --- a/lily/hyphen-spanner.cc +++ b/lily/hyphen-spanner.cc @@ -35,7 +35,7 @@ Hyphen_spanner::do_brew_molecule_p () const { Molecule* mol_p = new Molecule; - Real w = extent (X_AXIS).length (); + Real w = spanner_length (); w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]); diff --git a/lily/include/axis-group-element.hh b/lily/include/axis-group-element.hh index d2ea0b96ea..270bcdb03e 100644 --- a/lily/include/axis-group-element.hh +++ b/lily/include/axis-group-element.hh @@ -19,8 +19,6 @@ */ class Axis_group_element : public virtual Score_element { - Link_array extra_elems_; - /// modify fields of E for removal. void do_remove (Score_element*e); void purge_extra (); @@ -38,7 +36,6 @@ protected: public: // keep array in order. bool ordered_b_; - Link_array elem_l_arr_; Axis axes_[2]; Interval my_extent (Axis) const; diff --git a/lily/include/collision.hh b/lily/include/collision.hh index c0d51b35aa..a1ee164ff0 100644 --- a/lily/include/collision.hh +++ b/lily/include/collision.hh @@ -14,7 +14,7 @@ #include "tuple.hh" -typedef Tuple Shift_tup; +typedef Tuple Shift_tup; /** Resolve conflicts between various Note_columns (chords). @@ -29,10 +29,8 @@ protected: Array automatic_shift (); Array forced_shift (); - virtual void do_substitute_element_pointer (Score_element*,Score_element*); virtual void do_pre_processing(); public: - Link_array clash_l_arr_; void add_column (Note_column*ncol_l); Collision(); diff --git a/lily/include/dot-column.hh b/lily/include/dot-column.hh index 3562441c8a..0389f51685 100644 --- a/lily/include/dot-column.hh +++ b/lily/include/dot-column.hh @@ -18,18 +18,14 @@ */ class Dot_column : public Axis_group_item, public Note_head_side { - Link_array dot_l_arr_; static int compare (Dots * const&,Dots * const&); + void add_dots (Dots*); public: VIRTUAL_COPY_CONS (Score_element); void add_head (Rhythmic_head*); - void add_dots (Dots*); Dot_column (); protected: - - virtual void do_pre_processing (); virtual void do_post_processing (); - virtual void do_substitute_element_pointer (Score_element *o, Score_element*n); }; #endif // DOT_COLUMN_HH diff --git a/lily/include/graphical-axis-group.hh b/lily/include/graphical-axis-group.hh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/include/group-interface.hh b/lily/include/group-interface.hh index 06c20b10a3..289ba913ba 100644 --- a/lily/include/group-interface.hh +++ b/lily/include/group-interface.hh @@ -20,8 +20,8 @@ struct Group_interface Score_element * elt_l_; String name_; public: - Group_interface (Score_element*); - Group_interface (Score_element*, String); + Group_interface (Score_element const*); + Group_interface (Score_element const*, String); int count (); bool supports_interface_b (); void set_interface (); @@ -34,7 +34,7 @@ public: */ template Link_array -Group_interface__extract_elements (Score_element *elt, T *, String name) +Group_interface__extract_elements (Score_element const *elt, T *, String name) { Link_array arr; diff --git a/lily/include/multi-measure-rest.hh b/lily/include/multi-measure-rest.hh index 45fc8dddce..23cea928fd 100644 --- a/lily/include/multi-measure-rest.hh +++ b/lily/include/multi-measure-rest.hh @@ -20,8 +20,6 @@ public: int measures_i_; void add_column (Item*); - Link_array column_arr_; - protected: virtual Molecule *do_brew_molecule_p () const; VIRTUAL_COPY_CONS (Score_element); @@ -30,7 +28,6 @@ protected: virtual void do_post_processing (); virtual void do_print () const; virtual Array get_rods () const; - virtual void do_substitute_element_pointer (Score_element*,Score_element*); }; #endif /* MULTI_MEASURE_REST_HH */ diff --git a/lily/include/note-column.hh b/lily/include/note-column.hh index e8fe19a0b1..1738e427e2 100644 --- a/lily/include/note-column.hh +++ b/lily/include/note-column.hh @@ -18,8 +18,6 @@ class Note_column : public Axis_group_item { protected: virtual void do_post_processing () ; - virtual void do_print () const; - virtual void do_substitute_element_pointer (Score_element*,Score_element*); public: static int shift_compare (Note_column *const &, Note_column*const&); @@ -30,22 +28,21 @@ public: JUNKME. */ Direction dir () const; - Stem* stem_l_; - Link_array head_l_arr_; - Link_array rest_l_arr_; Interval_t head_positions_interval() const; // Interval width () const; void translate_rests(int dy); - + Note_head * first_head ()const; + Interval rest_dim ()const ; Note_column (); void set_stem (Stem*); void set_dotcol (Dot_column*); void add_head (Rhythmic_head*); bool rest_b () const; - void sort (); + + Stem *stem_l()const; }; #endif // NOTE_COLUMN_HH diff --git a/lily/include/rest-collision.hh b/lily/include/rest-collision.hh index 2e1150d651..e500c2aa12 100644 --- a/lily/include/rest-collision.hh +++ b/lily/include/rest-collision.hh @@ -14,15 +14,12 @@ #include "item.hh" class Rest_collision : public Item { - Link_array rest_l_arr_; - Link_array ncol_l_arr_; public: - void add_column (Note_column*); + void add_column (Note_column*); + Interval rest_dim () const; - Rest_collision(); + Rest_collision(); protected: - virtual void do_pre_processing(); - virtual void do_print() const; - virtual void do_substitute_element_pointer (Score_element*,Score_element*); + virtual void do_pre_processing(); }; #endif // REST_COLLISION_HH diff --git a/lily/include/rest.hh b/lily/include/rest.hh index 39b6bb2b20..8614789684 100644 --- a/lily/include/rest.hh +++ b/lily/include/rest.hh @@ -15,7 +15,7 @@ class Rest : public Rhythmic_head { public: - void add_dots (Dots*); + protected: virtual void do_add_processing (); virtual void do_post_processing (); diff --git a/lily/include/rhythmic-head.hh b/lily/include/rhythmic-head.hh index 25d63ecd14..58063bd501 100644 --- a/lily/include/rhythmic-head.hh +++ b/lily/include/rhythmic-head.hh @@ -15,20 +15,21 @@ class Rhythmic_head : public Item, public Staff_symbol_referencer { -public: - Stem * stem_l_; Dots * dots_l_; - int balltype_i_; + Stem * stem_l_; +public: + + int balltype_i_; void add_dots (Dots *); Rhythmic_head (); - + Stem * stem_l ()const; + Dots * dots_l ()const; int dots_i ()const; protected: virtual void do_post_processing (); virtual void do_print () const; - virtual void do_substitute_element_pointer (Score_element*,Score_element*); }; #endif // RHYTHMIC_HEAD_HH diff --git a/lily/include/score-element.hh b/lily/include/score-element.hh index ed4bc4ba8d..f5a26a030f 100644 --- a/lily/include/score-element.hh +++ b/lily/include/score-element.hh @@ -82,8 +82,6 @@ public: void add_processing (); - void substitute_dependency (Score_element*,Score_element*); - void remove_dependency (Score_element*); /** add a dependency. It may be the 0 pointer, in which case, it is ignored. */ @@ -103,6 +101,8 @@ public: void calculate_dependencies (int final, int busy, Score_element_method_pointer funcptr); static SCM handle_broken_smobs (SCM, SCM criterion); + void recurse_into_smobs (SCM s, void (Score_element::*meth_ptr)()); + virtual Score_element *find_broken_piece (Line_of_score*) const; protected: @@ -134,7 +134,6 @@ protected: /// do calculations after determining horizontal spacing virtual void do_post_processing (); - virtual void do_substitute_element_pointer (Score_element * , Score_element *); virtual void do_break_processing (); virtual Link_array get_extra_dependencies () const; @@ -188,6 +187,7 @@ public: void fixup_refpoint (); }; +Score_element * unsmob_element (SCM); diff --git a/lily/include/script-column.hh b/lily/include/script-column.hh index 366a4f7f18..4f6e2bca81 100644 --- a/lily/include/script-column.hh +++ b/lily/include/script-column.hh @@ -14,11 +14,8 @@ class Script_column : public Item { - /** - Array of objects that are placed by staffsides - */ - Link_array staff_sided_item_l_arr_; public: + Script_column(); void add_staff_sided (Item*); protected: virtual void do_pre_processing (); diff --git a/lily/include/slur.hh b/lily/include/slur.hh index 2fb4b5ede4..4bc355db51 100644 --- a/lily/include/slur.hh +++ b/lily/include/slur.hh @@ -23,8 +23,6 @@ public: void add_column (Note_column*); - Link_array encompass_arr_; - protected: virtual Array get_encompass_offset_arr () const; @@ -32,7 +30,6 @@ protected: virtual void do_post_processing (); virtual void do_add_processing (); virtual void do_pre_processing (); - virtual void do_substitute_element_pointer (Score_element*, Score_element*); Array get_rods () const; }; diff --git a/lily/include/span-bar.hh b/lily/include/span-bar.hh index dad0191da4..6d6e01c1a2 100644 --- a/lily/include/span-bar.hh +++ b/lily/include/span-bar.hh @@ -23,7 +23,6 @@ */ class Span_bar : public Bar { - Link_array spanning_l_arr_; Interval get_spanned_interval () const; public: Span_bar(); @@ -39,7 +38,6 @@ protected: virtual void do_pre_processing(); virtual void do_post_processing(); - virtual void do_substitute_element_pointer (Score_element*,Score_element*); virtual Molecule * do_brew_molecule_p() const; }; diff --git a/lily/include/stem-staff-side.hh b/lily/include/stem-staff-side.hh index 10dd3b5e52..7e649c96ec 100644 --- a/lily/include/stem-staff-side.hh +++ b/lily/include/stem-staff-side.hh @@ -36,7 +36,6 @@ protected: virtual Direction get_default_direction ()const; virtual void do_pre_processing (); virtual void do_post_processing (); - virtual void do_substitute_element_pointer (Score_element*o,Score_element*e); }; #endif /* Stem_STAFF_SIDE_HH */ diff --git a/lily/include/stem.hh b/lily/include/stem.hh index 9fad0e51db..3f1b583565 100644 --- a/lily/include/stem.hh +++ b/lily/include/stem.hh @@ -53,8 +53,6 @@ class Stem : public Item, public Staff_symbol_referencer, public: - Link_array head_l_arr_; - Link_array rest_l_arr_; /// log of the duration. Eg. 4 -> 16th note -> 2 flags int flag_i_; @@ -64,6 +62,7 @@ public: our beam, for aligning abbrev flags */ Beam* beam_l () const; + Note_head * first_head () const; Drul_array beams_i_drul_; Stem (); @@ -98,7 +97,7 @@ public: protected: Molecule flag () const; - virtual void do_substitute_element_pointer (Score_element*,Score_element*); + virtual void do_pre_processing(); static Interval dim_callback (Dimension_cache const*); virtual Molecule* do_brew_molecule_p() const; diff --git a/lily/include/tie.hh b/lily/include/tie.hh index cb6eb72ebf..a89088ab8a 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -23,12 +23,12 @@ public: void set_head (Direction, Note_head*head_l); VIRTUAL_COPY_CONS(Score_element); - Drul_array head_l_drul_; + Note_head* head (Direction) const; protected: virtual void do_add_processing (); virtual void do_post_processing (); virtual Direction get_default_dir() const; - virtual void do_substitute_element_pointer (Score_element*,Score_element*); + virtual Array get_rods () const; Array get_controls () const; diff --git a/lily/include/tuplet-spanner.hh b/lily/include/tuplet-spanner.hh index 2faa3bcd48..2fd0a5ff16 100644 --- a/lily/include/tuplet-spanner.hh +++ b/lily/include/tuplet-spanner.hh @@ -31,15 +31,11 @@ public: bool parallel_beam_b_; protected: - Link_array beam_l_arr_; - Link_array column_arr_; - virtual Molecule* do_brew_molecule_p () const; VIRTUAL_COPY_CONS(Score_element); virtual void do_add_processing (); virtual void do_post_processing (); virtual Direction get_default_dir () const; - virtual void do_substitute_element_pointer (Score_element*,Score_element*); }; #endif // Tuplet_spanner_HH diff --git a/lily/include/volta-spanner.hh b/lily/include/volta-spanner.hh index e3f30af740..0ef810209f 100644 --- a/lily/include/volta-spanner.hh +++ b/lily/include/volta-spanner.hh @@ -22,8 +22,6 @@ public: void add_bar (Bar*); String number_str_; - Link_array bar_arr_; - Link_array note_column_arr_; bool last_b_; @@ -34,7 +32,6 @@ protected: virtual void do_add_processing (); static Interval dim_callback (Dimension_cache const*); virtual void do_post_processing (); - virtual void do_substitute_element_pointer (Score_element*,Score_element*); }; #endif // VOLTA_SPANNER_HH diff --git a/lily/item.cc b/lily/item.cc index 283010a4bd..fc082e4166 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -188,47 +188,6 @@ Item::Item (Item const &s) broken_to_drul_[LEFT] = broken_to_drul_[RIGHT] =0; } -#if 0 -void -Item::handle_prebroken_dependents () -{ - Item * parent = dynamic_cast (parent_l (X_AXIS)); - if (breakable_b () && parent) - { - if(!(broken_to_drul_[LEFT] || broken_to_drul_[RIGHT])) - do_break (); - - Direction d = LEFT; - do - { - Item * broken_self = find_broken_piece (d); - Item * broken_parent = parent->find_broken_piece (d); - - broken_self->set_parent (broken_parent, X_AXIS); - - /* - ugh. Should do this is after breaking? - */ - if (!broken_self->parent_l (Y_AXIS)) - { - Score_element * yparent =dynamic_cast(parent_l (Y_AXIS)); - Item *yparenti = dynamic_cast (yparent); - Item *broken_yparent = yparenti ? - yparenti->find_broken_piece (d) : 0; - - if (!yparent) - programming_error ("Vertical refpoint lost!"); - else if (yparenti) - { - broken_self->set_parent (broken_yparent, Y_AXIS); - } - } - } - while ((flip (&d))!=LEFT); - } -} -#endif - Direction Item::break_status_dir () const { diff --git a/lily/line-of-score.cc b/lily/line-of-score.cc index 8d004831cd..5fb4931a2a 100644 --- a/lily/line-of-score.cc +++ b/lily/line-of-score.cc @@ -17,6 +17,7 @@ Line_of_score::Line_of_score() { + set_elt_property ("columns", SCM_EOL); set_axes (Y_AXIS,X_AXIS); } @@ -51,8 +52,8 @@ Line_of_score::break_into_pieces (Array const &breaking) line_l->set_bounds(RIGHT,c.top ()); for (int j=0; j < c.size(); j++) { - c[i]->translate_axis (breaking[i].config_[j],X_AXIS); - c[i]->line_l_ = line_l; + c[j]->translate_axis (breaking[i].config_[j],X_AXIS); + c[j]->line_l_ = line_l; } broken_into_l_arr_.push (line_l); diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index a78a19b681..beff1c9148 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -166,7 +166,7 @@ Local_key_engraver::acknowledge_element (Score_element_info info) } else if (Tie * tie_l = dynamic_cast (info.elem_l_)) { - tied_l_arr_.push (tie_l-> head_l_drul_[RIGHT]); + tied_l_arr_.push (tie_l->head (RIGHT)); } } diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index cd6efa3172..609cf8c720 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -95,7 +95,7 @@ Multi_measure_rest_engraver::do_pre_move_processing () if (mmrest_p_ && (now >= rest_moments_[START]) && !time->measure_position () - && (mmrest_p_->column_arr_.size () >= 2)) + && (scm_ilength (mmrest_p_->get_elt_property ("columns")) >= 2)) { typeset_element (mmrest_p_); /* diff --git a/lily/multi-measure-rest.cc b/lily/multi-measure-rest.cc index 8dbfec3c83..d69333940f 100644 --- a/lily/multi-measure-rest.cc +++ b/lily/multi-measure-rest.cc @@ -16,11 +16,13 @@ #include "rest.hh" #include "molecule.hh" #include "misc.hh" - +#include "group-interface.hh" +#include "stem.hh" Multi_measure_rest::Multi_measure_rest () { measures_i_ = 0; + set_elt_property ("columns", SCM_EOL); } void @@ -99,7 +101,7 @@ Multi_measure_rest::do_brew_molecule_p () const } else if (measures_i_ > 1) { - Molecule s ( lookup_l ()->text ("number", to_str (measures_i_), paper_l ())); + Molecule s (lookup_l ()->text ("number", to_str (measures_i_), paper_l ())); s.align_to (X_AXIS, CENTER); s.translate_axis (3.0 * interline_f, Y_AXIS); mol_p->add_molecule (s); @@ -108,36 +110,38 @@ Multi_measure_rest::do_brew_molecule_p () const return mol_p; } +/* + UGH. JUNKME elt prop "columns" isn't really needed. + */ + void Multi_measure_rest::do_add_processing () { - if (column_arr_.size ()) + if (gh_pair_p (get_elt_property ("columns"))) { - set_bounds (LEFT, column_arr_[0 >? column_arr_.size () - 2]); - set_bounds (RIGHT, column_arr_[column_arr_.size () - 1]); + Link_array column_arr (Group_interface__extract_elements (this, (Item*)0, "columns")); + + set_bounds (LEFT, column_arr[0 >? column_arr.size () - 2]); + set_bounds (RIGHT, column_arr.top ()); } } void Multi_measure_rest::do_post_processing () { - if (!column_arr_.size ()) + if (!gh_pair_p (get_elt_property ("columns"))) set_elt_property ("transparent", SCM_BOOL_T); } -void -Multi_measure_rest::do_substitute_element_pointer (Score_element* o, Score_element* n) -{ - Staff_symbol_referencer::do_substitute_element_pointer (o,n); - if (Item* c = dynamic_cast (o)) - column_arr_.substitute (c, dynamic_cast (n)); -} - + void Multi_measure_rest::add_column (Item* c) { - column_arr_.push (c); + Group_interface gi (this, "columns"); + gi.add_element (c); + + add_dependency (c); } diff --git a/lily/note-column.cc b/lily/note-column.cc index 844ad7701a..21740f4513 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -13,11 +13,14 @@ #include "rest.hh" #include "debug.hh" #include "paper-def.hh" +#include "group-interface.hh" bool Note_column::rest_b () const { - return rest_l_arr_.size (); + SCM r = get_elt_property ("rests"); + + return gh_pair_p (r); } int @@ -33,15 +36,19 @@ Note_column::shift_compare (Note_column *const &p1, Note_column*const&p2) Note_column::Note_column() { + set_elt_property ("rests", SCM_EOL); + set_elt_property ("note-heads", SCM_EOL); set_axes (X_AXIS, Y_AXIS); - stem_l_ = 0; } -void -Note_column::sort() +Stem * +Note_column::stem_l () const { - head_l_arr_.sort (Note_head::compare); + SCM s = get_elt_property ("stem"); + return dynamic_cast (unsmob_element (s)); + } + Slice Note_column::head_positions_interval() const @@ -49,9 +56,13 @@ Note_column::head_positions_interval() const Slice iv; iv.set_empty (); - for (int i=0; i position_f ()); + Score_element *se = unsmob_element (gh_car (h)); + + int j = int (dynamic_cast (se)->position_f ()); iv.unite (Slice (j,j)); } return iv; @@ -60,9 +71,9 @@ Note_column::head_positions_interval() const Direction Note_column::dir () const { - if (stem_l_) - return stem_l_->get_direction (); - else if (head_l_arr_.size ()) + if (stem_l ()) + return stem_l ()->get_direction (); + else if (gh_pair_p (get_elt_property ("note-heads"))) return (Direction)sign (head_positions_interval().center ()); programming_error ("Note column without heads and stem!"); @@ -73,42 +84,26 @@ Note_column::dir () const void Note_column::set_stem (Stem * stem_l) { - stem_l_ = stem_l; + set_elt_property ("stem", stem_l->self_scm_); + add_dependency (stem_l); add_element (stem_l); } -void -Note_column::do_substitute_element_pointer (Score_element*o, Score_element*n) -{ - if (stem_l_ == o) - { - stem_l_ = n ? dynamic_cast (n):0; - } - if (dynamic_cast (o)) - { - head_l_arr_.substitute (dynamic_cast (o), - (n)? dynamic_cast (n) : 0); - } - - if (dynamic_cast (o)) - { - rest_l_arr_.substitute (dynamic_cast (o), - (n)? dynamic_cast (n) : 0); - } -} void Note_column::add_head (Rhythmic_head *h) { if (Rest*r=dynamic_cast (h)) { - rest_l_arr_.push (r); + Group_interface gi (this, "rests"); + gi.add_element (h); } if (Note_head *nh=dynamic_cast (h)) { - head_l_arr_.push (nh); + Group_interface gi (this, "note-heads"); + gi.add_element (nh); } add_element (h); } @@ -120,20 +115,17 @@ void Note_column::translate_rests (int dy_i) { invalidate_cache (Y_AXIS); - for (int i=0; i < rest_l_arr_.size(); i++) - rest_l_arr_[i]->translate_axis (dy_i * rest_l_arr_[i]->staff_line_leading_f ()/2.0, - Y_AXIS); -} -void -Note_column::do_print() const -{ -#ifndef NPRINT - DEBUG_OUT << "rests: " << rest_l_arr_.size() << ", "; - DEBUG_OUT << "heads: " << head_l_arr_.size(); -#endif + SCM s = get_elt_property ("rests"); + for (; gh_pair_p (s); s = gh_cdr (s)) + { + Score_element * se = unsmob_element ( gh_car (s)); + Staff_symbol_referencer *str = dynamic_cast (se); + se->translate_axis (dy_i * str->staff_line_leading_f ()/2.0, Y_AXIS); + } } + void Note_column::set_dotcol (Dot_column *d) { @@ -154,18 +146,22 @@ Note_column::set_dotcol (Dot_column *d) void Note_column::do_post_processing () { - if (!stem_l_ || !rest_b ()) + if (!stem_l () || !rest_b ()) return; - Beam * b = stem_l_->beam_l (); + Beam * b = stem_l ()->beam_l (); if (!b || !b->stem_count ()) return; /* ugh. Should be done by beam. */ - Direction d = stem_l_->get_direction (); - Real beamy = (stem_l_->hpos_f () - b->stem(0)->hpos_f ()) * b->slope_f_ + b->left_y_; + Direction d = stem_l ()->get_direction (); + Real beamy = (stem_l ()->hpos_f () - b->stem(0)->hpos_f ()) * b->slope_f_ + b->left_y_; + + SCM s = get_elt_property ("rests"); + Score_element * se = unsmob_element (gh_car (s)); + Staff_symbol_referencer *str = dynamic_cast (se); - Real staff_space = rest_l_arr_[0]->staff_line_leading_f (); + Real staff_space = str->staff_line_leading_f (); Real rest_dim = extent (Y_AXIS)[d]*2.0 /staff_space ; Real minimum_dist @@ -173,7 +169,7 @@ Note_column::do_post_processing () Real dist = minimum_dist + -d * (beamy - rest_dim) >? 0; - int stafflines = rest_l_arr_[0]->lines_i (); + int stafflines = str->lines_i (); // move discretely by half spaces. int discrete_dist = int (ceil (dist )); @@ -185,3 +181,25 @@ Note_column::do_post_processing () translate_rests (-d * discrete_dist); } + +Interval +Note_column::rest_dim () const +{ + Interval restdim; + SCM s = get_elt_property ("rests"); + for (; gh_pair_p (s); s = gh_cdr (s)) + { + Score_element * sc = unsmob_element ( gh_car (s)); + restdim.unite (sc->extent (Y_AXIS)); + } + + return restdim; +} + +Note_head* +Note_column::first_head () const +{ + Stem * st = stem_l (); + return st? st->first_head (): 0; + +} diff --git a/lily/note-head.cc b/lily/note-head.cc index 4a631d0515..17bc7d6b30 100644 --- a/lily/note-head.cc +++ b/lily/note-head.cc @@ -13,7 +13,6 @@ #include "lookup.hh" #include "molecule.hh" #include "musical-request.hh" -#include "stem.hh" #include "dimension-cache.hh" void @@ -52,8 +51,8 @@ Note_head::do_pre_processing () if (balltype_i_ > 2 || type == "harmonic" || type == "cross") balltype_i_ = 2; - if (dots_l_) // move into Rhythmic_head? - dots_l_->set_position(int (position_f ())); + if (dots_l ()) // move into Rhythmic_head? + dots_l ()->set_position(int (position_f ())); } diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 1f817347bf..c1bfea9317 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -68,7 +68,7 @@ Note_heads_engraver::do_process_requests() if (note_req_l->duration_.dots_i_) { Dots * d = new Dots; - note_p->dots_l_ = d; + note_p->add_dots (d); d->dots_i_ = note_req_l->duration_.dots_i_; announce_element (Score_element_info (d,0)); dot_p_arr_.push (d); diff --git a/lily/paper-score.cc b/lily/paper-score.cc index 4a78ff3fb3..960dffd675 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -213,7 +213,7 @@ Paper_score::fixup_refpoints () SCM e = gh_car (s); if (SMOB_IS_TYPE_B(Score_element, e)) { - Score_element * se = SMOB_TO_TYPE (Score_element,e ); + Score_element * se = unsmob_element (e); se->fixup_refpoint (); } } diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index 0b065747bb..8dd85f8a4b 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -14,20 +14,30 @@ #include "collision.hh" #include "paper-def.hh" #include "rest.hh" +#include "group-interface.hh" void Rest_collision::add_column (Note_column *nc_l) { add_dependency (nc_l); + Group_interface gi (this); if (nc_l->rest_b ()) - rest_l_arr_.push (nc_l); + gi.name_ = "rests"; else - ncol_l_arr_.push (nc_l); + gi.name_ = "notes"; + + gi.add_element (nc_l); } void Rest_collision::do_pre_processing() { + Link_array rest_l_arr = + Group_interface__extract_elements (this, (Note_column*) 0, "rests"); + Link_array ncol_l_arr = + Group_interface__extract_elements (this, (Note_column*) 0, "notes"); + + /* handle rest-rest and rest-note collisions @@ -38,49 +48,50 @@ Rest_collision::do_pre_processing() */ // no rests to collide - if (!rest_l_arr_.size()) + if (!rest_l_arr.size()) return; // no partners to collide with - if (rest_l_arr_.size() + ncol_l_arr_.size () < 2) + if (rest_l_arr.size() + ncol_l_arr.size () < 2) return; // meisjes met meisjes - if (!ncol_l_arr_.size()) + if (!ncol_l_arr.size()) { /* UGH. Should get dims from table. Should have minimum dist. */ - int dy = rest_l_arr_.size() > 2 ? 6 : 4; + int dy = rest_l_arr.size() > 2 ? 6 : 4; - rest_l_arr_[0]->translate_rests (rest_l_arr_[0]->dir () *dy); - rest_l_arr_.top()->translate_rests (rest_l_arr_.top ()->dir ()* dy); + rest_l_arr[0]->translate_rests (rest_l_arr[0]->dir () *dy); + rest_l_arr.top()->translate_rests (rest_l_arr.top ()->dir ()* dy); } // meisjes met jongetjes else { - if (rest_l_arr_.size () > 1) + if (rest_l_arr.size () > 1) { warning (_("too many colliding rests")); } - if (ncol_l_arr_.size () > 1) + if (ncol_l_arr.size () > 1) { warning (_("too many notes for rest collision")); } - Note_column * rcol = rest_l_arr_[0]; + Note_column * rcol = rest_l_arr[0]; // try to be opposite of noteheads. - Direction dir = - ncol_l_arr_[0]->dir(); - - Interval restdim; - for (int i=0; i < rcol->rest_l_arr_.size(); i++) - restdim.unite (rcol->rest_l_arr_[i]->extent (Y_AXIS)); + Direction dir = - ncol_l_arr[0]->dir(); + Interval restdim = rcol->rest_dim (); if (restdim.empty_b ()) return; // staff ref'd? - Real staff_space = rcol->rest_l_arr_[0]->staff_line_leading_f (); + Real staff_space = paper_l()->get_var ("interline"); + + /* FIXME + staff_space = rcol->rest_l_arr[0]->staff_line_leading_f (); + */ Real internote_f = staff_space/2; Real minimum_dist = paper_l ()->get_var ("restcollision_minimum_dist") * internote_f; @@ -89,9 +100,9 @@ Rest_collision::do_pre_processing() assumption: ref points are the same. */ Interval notedim; - for (int i = 0; i < ncol_l_arr_.size(); i++) + for (int i = 0; i < ncol_l_arr.size(); i++) { - notedim.unite (ncol_l_arr_[i]->extent (Y_AXIS)); + notedim.unite (ncol_l_arr[i]->extent (Y_AXIS)); } Interval inter (notedim); @@ -101,7 +112,8 @@ Rest_collision::do_pre_processing() minimum_dist + dir * (notedim[dir] - restdim[-dir]) >? 0; - int stafflines = rcol->rest_l_arr_[0]->lines_i (); + // FIXME + int stafflines = 5; // rcol->rest_l_arr[0]->lines_i (); // move discretely by half spaces. @@ -115,28 +127,11 @@ Rest_collision::do_pre_processing() } } -void -Rest_collision::do_print() const -{ -#ifndef NPRINT - DEBUG_OUT << "rests: " << rest_l_arr_.size() << ", "; - DEBUG_OUT << "cols: " << ncol_l_arr_.size(); -#endif -} - -void -Rest_collision::do_substitute_element_pointer (Score_element*o,Score_element*n) -{ - if (Note_column *onl = dynamic_cast (o)) - { - Note_column *n_l = n?dynamic_cast (n):0; - rest_l_arr_.substitute (onl, n_l); - ncol_l_arr_.substitute (onl, n_l); - } -} Rest_collision::Rest_collision() { + set_elt_property ("rests", SCM_EOL); + set_elt_property ("notes", SCM_EOL); set_elt_property ("transparent", SCM_BOOL_T); set_empty (X_AXIS); set_empty (Y_AXIS); diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index dde03daa1c..93b182591f 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -52,7 +52,7 @@ Rest_engraver::do_process_requests () if (rest_req_l_->duration_.dots_i_) { dot_p_ = new Dots; - rest_p_->dots_l_ =dot_p_; + rest_p_->add_dots (dot_p_); dot_p_->dots_i_ = rest_req_l_->duration_.dots_i_; announce_element (Score_element_info (dot_p_,0)); } diff --git a/lily/rest.cc b/lily/rest.cc index fbfbdb5ff1..10455405f8 100644 --- a/lily/rest.cc +++ b/lily/rest.cc @@ -1,5 +1,5 @@ /* - rest.cc -- implement Rest + rest.cc -- implement Rest source file of the GNU LilyPond music typesetter @@ -27,16 +27,16 @@ void Rest::do_post_processing () { Rhythmic_head::do_post_processing (); - if (dots_l_ + if (dots_l () && balltype_i_ > 4) // UGH. { /* UGH. */ if (balltype_i_ == 7) - dots_l_->set_position (4); + dots_l ()->set_position (4); else - dots_l_->set_position (3); + dots_l ()->set_position (3); } } diff --git a/lily/rhythmic-head.cc b/lily/rhythmic-head.cc index 0698b0c3cf..171c93cb7b 100644 --- a/lily/rhythmic-head.cc +++ b/lily/rhythmic-head.cc @@ -18,19 +18,32 @@ #include "stem.hh" +Dots* +Rhythmic_head::dots_l () const +{ + SCM s = get_elt_property ("dot"); + return dynamic_cast (unsmob_element (s)); +} + +Stem* +Rhythmic_head::stem_l () const +{ + SCM s = get_elt_property ("stem"); + return dynamic_cast (unsmob_element (s)); +} int Rhythmic_head::dots_i () const { - return dots_l_ ? dots_l_->dots_i_ : 0; + return dots_l () ? dots_l ()->dots_i_ : 0; } void Rhythmic_head::do_post_processing () { - if (dots_l_) + if (dots_l ()) { - dots_l_->set_position(int (position_f ())); + dots_l ()->set_position(int (position_f ())); } } @@ -38,26 +51,15 @@ Rhythmic_head::do_post_processing () void Rhythmic_head::add_dots (Dots *dot_l) { - dots_l_ = dot_l; + set_elt_property ("dot", dot_l->self_scm_); dot_l->add_dependency (this); } Rhythmic_head::Rhythmic_head () { - dots_l_ =0; balltype_i_ =0; - stem_l_ =0; } -void -Rhythmic_head::do_substitute_element_pointer (Score_element*o,Score_element*n) -{ - Staff_symbol_referencer::do_substitute_element_pointer (o,n); - if (o == dots_l_) - dots_l_ = dynamic_cast (n) ; - else if (o == stem_l_) - stem_l_ = dynamic_cast(n); -} void diff --git a/lily/score-element.cc b/lily/score-element.cc index e8b5154c81..45fbc03ed6 100644 --- a/lily/score-element.cc +++ b/lily/score-element.cc @@ -85,8 +85,6 @@ Score_element::Score_element (Score_element const&s) pscore_l_ = s.pscore_l_; smobify_self (); - - } Score_element::~Score_element() @@ -324,10 +322,6 @@ Score_element::do_add_processing() { } -void -Score_element::do_substitute_element_pointer (Score_element*,Score_element*) -{ -} Molecule* @@ -358,12 +352,7 @@ Score_element::add_dependency (Score_element*e) programming_error ("Null dependency added"); } -void -Score_element::substitute_dependency (Score_element* old, Score_element* new_l) -{ - do_substitute_element_pointer (old,new_l); - old->do_substitute_element_pointer (this, 0); -} + /** @@ -373,10 +362,9 @@ Score_element::substitute_dependency (Score_element* old, Score_element* new_l) SCM Score_element::handle_broken_smobs (SCM s, SCM criterion) { - if (SMOB_IS_TYPE_B (Score_element, s)) + Score_element *sc = unsmob_element ( s); + if (sc) { - Score_element *sc = SMOB_TO_TYPE (Score_element, s); - if (criterion == SCM_UNDEFINED) return SCM_UNDEFINED; else if (gh_number_p (criterion)) @@ -391,7 +379,7 @@ Score_element::handle_broken_smobs (SCM s, SCM criterion) } else { - Score_element * ln = SMOB_TO_TYPE (Score_element, criterion); + Score_element * ln = unsmob_element ( criterion); Line_of_score * line = dynamic_cast (ln); Score_element * br =0; Line_of_score * dep_line = sc->line_l (); @@ -412,18 +400,44 @@ Score_element::handle_broken_smobs (SCM s, SCM criterion) gh_set_car_x (s, handle_broken_smobs (gh_car (s), criterion)); gh_set_cdr_x (s, handle_broken_smobs (gh_cdr (s), criterion)); - if (gh_car (s) == SCM_UNDEFINED) + if (gh_car (s) == SCM_UNDEFINED && gh_list_p (gh_cdr(s))) return gh_cdr (s); } return s; } +void +Score_element::recurse_into_smobs (SCM s, void (Score_element::*meth_ptr)()) +{ + Score_element * sc = unsmob_element ( s); + if (sc) + { + (sc->*meth_ptr) (); + } + else if (gh_pair_p (s)) + { + recurse_into_smobs (gh_car (s), meth_ptr); + recurse_into_smobs (gh_cdr (s), meth_ptr); + } +} + void Score_element::handle_broken_dependencies() { Line_of_score *line = line_l(); + + SCM rec = get_elt_property ("handle-broken-deps"); + if (gh_boolean_p (rec) && gh_scm2bool (rec)) + return; + + set_elt_property ("handle-broken-deps", SCM_BOOL_T); element_property_alist_ = handle_broken_smobs (element_property_alist_, line ? line->self_scm_ : SCM_UNDEFINED); + + + recurse_into_smobs (element_property_alist_, + &Score_element::handle_broken_dependencies); + if (!line) return; @@ -436,7 +450,6 @@ Score_element::handle_broken_dependencies() if (elt->line_l() != line) { Score_element * broken = elt->find_broken_piece (line); - substitute_dependency (elt, broken); elt = broken ; } if (elt) @@ -458,49 +471,9 @@ Score_element::handle_prebroken_dependencies() = handle_broken_smobs (element_property_alist_, gh_int2scm (i->break_status_dir ())); } - - Link_array old_arr, new_arr; - - for (int i=0; i < dependency_size(); i++) - { - Score_element * elt = dependency (i); - Item *it_l = dynamic_cast (elt); - if (it_l && it_l->broken_original_b ()) - if (Item *me = dynamic_cast (this) ) - { - Score_element *new_l = it_l->find_broken_piece (me->break_status_dir ()); - if (new_l != elt) - { - new_arr.push (new_l); - old_arr.push (elt); - } - } - else - { - Direction d = LEFT; - do { - old_arr.push (0); - new_arr.push (it_l->find_broken_piece (d)); - } while (flip(&d)!= LEFT); - } - } - - for (int i=0; i < old_arr.size(); i++) - if (old_arr[i]) - substitute_dependency (old_arr[i], new_arr[i]); } -#if 0 -void -Score_element::handle_prebroken_dependents() -{ -} -void -Score_element::handle_broken_dependents() -{ -} -#endif @@ -546,21 +519,7 @@ Score_element::print_smob (SCM s, SCM port, scm_print_state *) scm_puts ("#name (), port); -#if 0 - for (SCM s = sc->element_property_alist_; gh_pair_p (s); s = gh_cdr (s)) - { - scm_display (gh_caar(s), port); - SCM val = gh_cdar(s); - if (SMOB_IS_TYPE_B (Score_element, val)) - { - scm_puts ("#<:", port); - scm_puts ((SMOB_TO_TYPE(Score_element,val))->name(), port); - scm_puts (">", port); - } - else - scm_display (val, port); - } -#endif + // scm_puts (" properties = ", port); // scm_display (sc->element_property_alist_, port); scm_puts (" >", port); @@ -622,7 +581,14 @@ Score_element::extent (Axis a) const return d->get_dim (); } - +Score_element* +unsmob_element (SCM s) +{ + if (SMOB_IS_TYPE_B (Score_element, s)) + return SMOB_TO_TYPE(Score_element,s); + else + return 0; +} /* diff --git a/lily/script-column.cc b/lily/script-column.cc index 19983c4f93..d9da8bc789 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -9,7 +9,7 @@ #include "script-column.hh" #include "staff-side.hh" #include "dimension-cache.hh" - +#include "group-interface.hh" void Script_column::add_staff_sided (Item *i) @@ -18,10 +18,18 @@ Script_column::add_staff_sided (Item *i) if (p == SCM_UNDEFINED) return; - staff_sided_item_l_arr_.push (i); + + Group_interface gi (this, "scripts"); + gi.add_element (i); + add_dependency (i); } +Script_column::Script_column () +{ + set_elt_property ("scripts", SCM_EOL); +} + static int staff_side_compare (Item * const &i1, Item * const &i2) @@ -36,11 +44,14 @@ void Script_column::do_pre_processing () { Drul_array > arrs; - - for (int i=0; i < staff_sided_item_l_arr_.size (); i++) + Link_array staff_sided + = Group_interface__extract_elements (this, (Item*)0, "scripts"); + + + for (int i=0; i < staff_sided.size (); i++) { - Side_position_interface st (staff_sided_item_l_arr_[i]); - arrs[st.get_direction ()].push (staff_sided_item_l_arr_[i]); + Side_position_interface st (staff_sided[i]); + arrs[st.get_direction ()].push (staff_sided[i]); } Direction d = DOWN; diff --git a/lily/separating-group-spanner.cc b/lily/separating-group-spanner.cc index 4da73f8dbc..4a3d0ccaa2 100644 --- a/lily/separating-group-spanner.cc +++ b/lily/separating-group-spanner.cc @@ -40,17 +40,17 @@ Separating_group_spanner::get_rods () const for (SCM s = get_elt_property ("elements"); gh_pair_p (s) && gh_pair_p (gh_cdr (s)); s = gh_cdr (s)) { SCM elt = gh_car (s); - if (!SMOB_IS_TYPE_B(Score_element, elt)) - continue; - SCM next_elt = gh_cadr (s); - if (!SMOB_IS_TYPE_B(Score_element, next_elt)) - continue; - Single_malt_grouping_item *l = dynamic_cast (SMOB_TO_TYPE(Score_element, elt)); + Single_malt_grouping_item *l = dynamic_cast (unsmob_element (elt)); + Single_malt_grouping_item *r = dynamic_cast (unsmob_element ( next_elt)); + + if (!r || !l) + continue; + Single_malt_grouping_item *lb = dynamic_cast(l->find_broken_piece (RIGHT)); - Single_malt_grouping_item *r = dynamic_cast (SMOB_TO_TYPE(Score_element, next_elt)); + Single_malt_grouping_item *rb = dynamic_cast(r->find_broken_piece (LEFT)); diff --git a/lily/slur.cc b/lily/slur.cc index 45e74b09df..aff1365a27 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -13,8 +13,8 @@ * broken slur should have uniform trend */ +#include "group-interface.hh" #include "slur.hh" - #include "lookup.hh" #include "paper-def.hh" #include "note-column.hh" @@ -26,19 +26,22 @@ #include "bezier.hh" #include "main.hh" #include "cross-staff.hh" +#include "group-interface.hh" Slur::Slur () { + set_elt_property ("note-columns", SCM_EOL); } void Slur::add_column (Note_column*n) { - if (!n->head_l_arr_.size ()) + if (!gh_pair_p (n->get_elt_property ("note-heads"))) warning (_ ("Putting slur over rest. Ignoring.")); else { - encompass_arr_.push (n); + Group_interface gi (this, "note-columns"); + gi.add_element (n); add_dependency (n); } } @@ -46,10 +49,13 @@ Slur::add_column (Note_column*n) Direction Slur::get_default_dir () const { + Link_array encompass_arr = + Group_interface__extract_elements (this, (Note_column*)0, "note-columns"); + Direction d = DOWN; - for (int i=0; i < encompass_arr_.size (); i ++) + for (int i=0; i < encompass_arr.size (); i ++) { - if (encompass_arr_[i]->dir () < 0) + if (encompass_arr[i]->dir () < 0) { d = UP; break; @@ -61,9 +67,11 @@ Slur::get_default_dir () const void Slur::do_add_processing () { - set_bounds (LEFT, encompass_arr_[0]); - if (encompass_arr_.size () > 1) - set_bounds (RIGHT, encompass_arr_.top ()); + Link_array encompass_arr = + Group_interface__extract_elements (this, (Note_column*)0, "note-columns"); + set_bounds (LEFT, encompass_arr[0]); + if (encompass_arr.size () > 1) + set_bounds (RIGHT, encompass_arr.top ()); } void @@ -72,18 +80,6 @@ Slur::do_pre_processing () // don't set directions } -void -Slur::do_substitute_element_pointer (Score_element*o, Score_element*n) -{ - int i; - while ((i = encompass_arr_.find_i (dynamic_cast (o))) >=0) - { - if (n) - encompass_arr_[i] = dynamic_cast (n); - else - encompass_arr_.del (i); - } -} static int Note_column_compare (Note_column *const&n1 , Note_column* const&n2) @@ -96,7 +92,7 @@ Offset Slur::encompass_offset (Note_column const* col) const { Offset o; - Stem* stem_l = col->stem_l_; + Stem* stem_l = col->stem_l (); if (!stem_l) { warning (_ ("Slur over rest?")); @@ -139,7 +135,10 @@ Slur::encompass_offset (Note_column const* col) const void Slur::do_post_processing () { - encompass_arr_.sort (Note_column_compare); + Link_array encompass_arr = + Group_interface__extract_elements (this, (Note_column*)0, "note-columns"); + + encompass_arr.sort (Note_column_compare); if (!get_direction ()) set_direction (get_default_dir ()); @@ -161,8 +160,8 @@ Slur::do_post_processing () Real y_gap_f = paper_l ()->get_var ("slur_y_gap"); Drul_array note_column_drul; - note_column_drul[LEFT] = encompass_arr_[0]; - note_column_drul[RIGHT] = encompass_arr_.top (); + note_column_drul[LEFT] = encompass_arr[0]; + note_column_drul[RIGHT] = encompass_arr.top (); bool fix_broken_b = false; Direction d = LEFT; @@ -170,10 +169,10 @@ Slur::do_post_processing () { dx_f_drul_[d] = dy_f_drul_[d] = 0; if ((note_column_drul[d] == spanned_drul_[d]) - && note_column_drul[d]->head_l_arr_.size () - && (note_column_drul[d]->stem_l_)) + && note_column_drul[d]->first_head () + && (note_column_drul[d]->stem_l ())) { - Stem* stem_l = note_column_drul[d]->stem_l_; + Stem* stem_l = note_column_drul[d]->stem_l (); /* side directly attached to note head; no beam getting in the way @@ -244,15 +243,15 @@ Slur::do_post_processing () while (flip (&d) != LEFT); int cross_count = cross_staff_count (); - bool interstaff_b = (0 < cross_count) && (cross_count < encompass_arr_.size ()); + bool interstaff_b = (0 < cross_count) && (cross_count < encompass_arr.size ()); Drul_array info_drul; Drul_array interstaff_interval; do { - info_drul[d] = encompass_offset (encompass_arr_.boundary (d, 0)); - interstaff_interval[d] = calc_interstaff_dist (encompass_arr_.boundary (d,0), + info_drul[d] = encompass_offset (encompass_arr.boundary (d, 0)); + interstaff_interval[d] = calc_interstaff_dist (encompass_arr.boundary (d,0), this); } while (flip (&d) != LEFT); @@ -261,7 +260,7 @@ Slur::do_post_processing () if (fix_broken_b) { - Direction d = (encompass_arr_.top () != spanned_drul_[RIGHT]) ? + Direction d = (encompass_arr.top () != spanned_drul_[RIGHT]) ? RIGHT : LEFT; dy_f_drul_[d] = info_drul[d][Y_AXIS]; if (!interstaff_b) @@ -368,19 +367,19 @@ Slur::do_post_processing () { Note_column * nc = note_column_drul[d]; if (nc == spanned_drul_[d] - && nc->stem_l_ - && nc->stem_l_->get_direction () == get_direction () - && abs (nc->stem_l_->extent (Y_AXIS)[get_direction ()] + && nc->stem_l () + && nc->stem_l ()->get_direction () == get_direction () + && abs (nc->stem_l ()->extent (Y_AXIS)[get_direction ()] - dy_f_drul_[d] + (d == LEFT ? 0 : interstaff_f)) <= snap_f) { /* prepare to attach to stem-end */ - snapx_f_drul[d] = nc->stem_l_->hpos_f () + snapx_f_drul[d] = nc->stem_l ()->hpos_f () - spanned_drul_[d]->relative_coordinate (0, X_AXIS); - snapy_f_drul[d] = nc->stem_l_->extent (Y_AXIS)[get_direction ()] + snapy_f_drul[d] = nc->stem_l ()->extent (Y_AXIS)[get_direction ()] + interstaff_interval[d] + get_direction () * 2 * y_gap_f; @@ -431,11 +430,14 @@ Slur::do_post_processing () int Slur::cross_staff_count ()const { + Link_array encompass_arr = + Group_interface__extract_elements (this, (Note_column*)0, "note-columns"); + int k=0; - for (int i = 0; i < encompass_arr_.size (); i++) + for (int i = 0; i < encompass_arr.size (); i++) { - if (calc_interstaff_dist (encompass_arr_[i], this)) + if (calc_interstaff_dist (encompass_arr[i], this)) k++; } return k; @@ -445,6 +447,9 @@ Slur::cross_staff_count ()const Array Slur::get_encompass_offset_arr () const { + Link_array encompass_arr = + Group_interface__extract_elements (this, (Note_column*)0, "note-columns"); + Array offset_arr; #if 0 /* @@ -459,7 +464,7 @@ Slur::get_encompass_offset_arr () const Offset origin (relative_coordinate (0, X_AXIS), 0); int first = 1; - int last = encompass_arr_.size () - 2; + int last = encompass_arr.size () - 2; offset_arr.push (Offset (dx_f_drul_[LEFT], dy_f_drul_[LEFT])); @@ -468,11 +473,11 @@ Slur::get_encompass_offset_arr () const */ int cross_count = cross_staff_count (); - bool cross_b = cross_count && cross_count < encompass_arr_.size (); - if (encompass_arr_[0] != spanned_drul_[LEFT]) + bool cross_b = cross_count && cross_count < encompass_arr.size (); + if (encompass_arr[0] != spanned_drul_[LEFT]) { first--; - Real is = calc_interstaff_dist (encompass_arr_[0], this); + Real is = calc_interstaff_dist (encompass_arr[0], this); if (cross_b) offset_arr[0][Y_AXIS] += is; } @@ -480,14 +485,14 @@ Slur::get_encompass_offset_arr () const /* right is broken edge */ - if (encompass_arr_.top () != spanned_drul_[RIGHT]) + if (encompass_arr.top () != spanned_drul_[RIGHT]) { last++; } for (int i = first; i <= last; i++) { - Offset o (encompass_offset (encompass_arr_[i])); + Offset o (encompass_offset (encompass_arr[i])); offset_arr.push (o - origin); } diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index 69632b2af8..ab8d82ae4a 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -59,7 +59,7 @@ Spacing_spanner::do_measure (Link_array cols) const Array meas_springs; Real non_musical_space_strength = paper_l ()->get_var ("breakable_column_space_strength"); - for (int i= 0; i < cols.size (); i++) + for (int i= 0; i < cols.size () - 1; i++) { Item * l = cols[i]; Item * r = cols[i+1]; @@ -291,8 +291,8 @@ Spacing_spanner::get_springs () const Link_array measure; for (SCM s = last_col; gh_pair_p (s); s = gh_cdr (s)) { - SCM elt = gh_car (s); - Score_column* sc = dynamic_cast (SMOB_TO_TYPE (Score_column, elt)); + Score_element * elt = unsmob_element (gh_car (s)); + Score_column* sc = dynamic_cast (elt); measure.push (sc); if (sc->breakable_b ()) { diff --git a/lily/span-bar.cc b/lily/span-bar.cc index 34c9f39ea1..2f43cd985f 100644 --- a/lily/span-bar.cc +++ b/lily/span-bar.cc @@ -13,18 +13,16 @@ #include "molecule.hh" #include "align-element.hh" #include "warn.hh" +#include "group-interface.hh" + void Span_bar::add_bar (Score_element*b) { - spanning_l_arr_.push (b); - add_dependency (b); -} + Group_interface gi (this); + gi.add_element (b); -void -Span_bar::do_substitute_element_pointer (Score_element*o, Score_element*n) -{ - spanning_l_arr_.unordered_substitute (o, n); + add_dependency (b); } @@ -59,7 +57,7 @@ Span_bar::do_post_processing () void Span_bar::evaluate_empty () { - if (spanning_l_arr_.size () < 1) + if (!gh_pair_p (get_elt_property ("elements"))) { set_elt_property ("transparent", SCM_BOOL_T); set_empty (X_AXIS); @@ -90,13 +88,23 @@ Span_bar::get_spanned_interval () const { Interval y_int; - for (int i=0; i < spanning_l_arr_.size (); i++) + for (SCM s = get_elt_property ("elements"); gh_pair_p (s); s = gh_cdr (s)) { - Score_element*common = common_refpoint (spanning_l_arr_[i], Y_AXIS); - Real y = spanning_l_arr_[i]->relative_coordinate (common, Y_AXIS) - - relative_coordinate (common, Y_AXIS); + Score_element *bar = unsmob_element ( gh_car (s)); + + if (!bar) + continue; + + Score_element*common = common_refpoint (bar, Y_AXIS); + + Interval iv (bar->extent(Y_AXIS)); + if (!iv.empty_b ()) + { + Real y = bar->relative_coordinate (common, Y_AXIS) + - relative_coordinate (common, Y_AXIS); - y_int.unite (y + spanning_l_arr_[i]->extent(Y_AXIS)); + y_int.unite (y + iv); + } } return y_int; } diff --git a/lily/spanner.cc b/lily/spanner.cc index 9aeaaab407..dd3d24ead3 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -15,6 +15,7 @@ #include "paper-outputter.hh" #include "score-column.hh" #include "line-of-score.hh" +#include "break-align-item.hh" void Spanner::break_into_pieces () @@ -201,30 +202,6 @@ Spanner::do_space_processing () } } -#if 0 -/* - UGH. - */ -void -Spanner::handle_broken_dependents () -{ - Spanner *unbrok = dynamic_cast (original_l_); - if (!unbrok || parent_l(Y_AXIS)) - return; - - Spanner *refpoint = dynamic_cast (unbrok->parent_l (Y_AXIS)); - - if (refpoint) - { - Score_element * broken_refpoint = refpoint->find_broken_piece (line_l ()); - if (broken_refpoint) - set_parent (broken_refpoint,Y_AXIS); - else - programming_error ("Spanner y -refpoint lost."); - } -} -#endif - /* If this is a broken spanner, return the amount the left end is to be shifted horizontally so that the spanner starts after the initial @@ -234,8 +211,6 @@ Spanner::handle_broken_dependents () Real Spanner::get_broken_left_end_align () const { - int i; - Score_column *sc = dynamic_cast (spanned_drul_[LEFT]->column_l()); // Relevant only if left span point is first column in line @@ -244,13 +219,23 @@ Spanner::get_broken_left_end_align () const { // We could possibly return the right edge of the whole Score_column here, // but we do a full search for the Break_align_item. - for(i = 0; i < sc->elem_l_arr_.size (); i++) + + /* + In fact that doesn't make a difference, since the Score_column + is likely to contain only a Break_align_item. + */ +#if 0 + for(SCM s = sc->get_elt_property ("elements"); gh_pair_p (s); + s = gh_cdr (s)) { - if(0 == strcmp (classname (sc->elem_l_arr_[i]), "Break_align_item")) + Score_element *e = SMOB_TO_TYPE (Score_element, gh_car (s)); + if(dynamic_cast (e)) { - return sc->elem_l_arr_[i]->extent (X_AXIS) [RIGHT]; + return e->extent (X_AXIS) [RIGHT]; } } +#endif + return sc->extent (X_AXIS)[RIGHT]; } return 0.0; diff --git a/lily/staff-side.cc b/lily/staff-side.cc index 20440aa923..068ff7b2c2 100644 --- a/lily/staff-side.cc +++ b/lily/staff-side.cc @@ -45,10 +45,9 @@ Side_position_interface::get_direction () const } SCM other_elt = elt_l_->get_elt_property ("direction-source"); - if (SMOB_IS_TYPE_B (Score_element, other_elt)) + Score_element * e = unsmob_element(other_elt); + if (e) { - Score_element * e = SMOB_TO_TYPE(Score_element,other_elt); - return relative_dir * Side_position_interface (e).get_direction (); } @@ -69,25 +68,23 @@ Side_position_interface::side_position (Dimension_cache const * c) SCM support = me->get_elt_property ("side-support"); for (SCM s = support; s != SCM_EOL; s = gh_cdr (s)) { - if (!SMOB_IS_TYPE_B (Score_element, gh_car (s))) - continue; - - Score_element * e = SMOB_TO_TYPE(Score_element, gh_car (s)); - common = common->common_refpoint (e, axis); + Score_element * e = unsmob_element ( gh_car (s)); + if (e) + common = common->common_refpoint (e, axis); } for (SCM s = support; s != SCM_EOL; s = gh_cdr (s)) { - if (!SMOB_IS_TYPE_B (Score_element, gh_car (s))) - continue; - Score_element * e = SMOB_TO_TYPE(Score_element, gh_car (s)); - Real coord = e->relative_coordinate (common, axis); + Score_element * e = unsmob_element ( gh_car (s)); + if (e) + { + Real coord = e->relative_coordinate (common, axis); - dim.unite (coord + e->extent (axis)); + dim.unite (coord + e->extent (axis)); + } } - if (dim.empty_b ()) { dim = Interval(0,0); diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc index d07dbea01a..f2532f0d43 100644 --- a/lily/staff-symbol-referencer.cc +++ b/lily/staff-symbol-referencer.cc @@ -31,10 +31,7 @@ Staff_symbol* Staff_symbol_referencer::staff_symbol_l () const { SCM st = get_elt_property ("staff-symbol"); - if (SMOB_IS_TYPE_B (Score_element, st)) - return dynamic_cast (SMOB_TO_TYPE (Score_element,st)); - else - return 0; + return dynamic_cast (unsmob_element(st)); } Real diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index dd5ddb1c8a..cdb819767c 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -40,7 +40,7 @@ Stem_engraver::acknowledge_element(Score_element_info i) { if (Rhythmic_head * h = dynamic_cast (i.elem_l_)) { - if (h->stem_l_) + if (h->stem_l ()) return; Rhythmic_req * r = dynamic_cast (i.req_l_); diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc index 24f1405b5b..d55cd55272 100644 --- a/lily/stem-tremolo.cc +++ b/lily/stem-tremolo.cc @@ -32,12 +32,8 @@ Stem * Stem_tremolo::stem_l ()const { SCM s = get_elt_property ("stem"); - if (SMOB_IS_TYPE_B (Score_element, s)) - { - return dynamic_cast (SMOB_TO_TYPE (Score_element,s)); - } - else - return 0; + + return dynamic_cast ( unsmob_element (s)); } Interval diff --git a/lily/stem.cc b/lily/stem.cc index 74ac9349ae..1edd92bc53 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -18,6 +18,7 @@ #include "misc.hh" #include "beam.hh" #include "rest.hh" +#include "group-interface.hh" Stem::Stem () { @@ -34,15 +35,18 @@ Stem::head_positions () const trigger FP exceptions on FreeBSD. Fix: do not return infinity */ - if (!head_l_arr_.size ()) + if (!first_head ()) { return Interval_t (100,-100); } + Link_array head_l_arr = + Group_interface__extract_elements (this, (Note_head*)0, "heads"); + Interval_t r; - for (int i =0; i < head_l_arr_.size (); i++) + for (int i =0; i < head_l_arr.size (); i++) { - int p = (int)head_l_arr_[i]->position_f (); + int p = (int)head_l_arr[i]->position_f (); r[BIGGER] = r[BIGGER] >? p; r[SMALLER] = r[SMALLER] balltype_i_; + + return first_head ()->balltype_i_; +} + +Note_head* +Stem::first_head () const +{ + SCM h =get_elt_property ("heads"); + if (!gh_pair_p (h)) + return 0; + + Score_element * sc = unsmob_element (gh_car (h)); + + return dynamic_cast (sc); } void Stem::add_head (Rhythmic_head *n) { - n->stem_l_ = this; + n->set_elt_property ("stem", this->self_scm_); n->add_dependency (this); // ? + + + Group_interface gi (this); if (Note_head *nh = dynamic_cast (n)) - { - head_l_arr_.push (nh); - } - else if (Rest *r = dynamic_cast (n)) - { - rest_l_arr_.push (r); - } + gi.name_ = "heads"; + else + gi.name_ = "rests"; + + gi.add_element (n); } bool Stem::invisible_b () const { - return (!head_l_arr_.size () || - head_l_arr_[0]->balltype_i_ <= 0); + return !(first_head () && first_head()->balltype_i_ >= 1); } int @@ -196,32 +213,37 @@ Stem::set_default_extents () void Stem::set_noteheads () { - if (!head_l_arr_.size ()) + if (!first_head ()) return; - head_l_arr_.sort (Note_head::compare); + + + Link_array head_l_arr = + Group_interface__extract_elements (this, (Note_head*)0, "heads"); + + head_l_arr.sort (Note_head::compare); if (get_direction () < 0) - head_l_arr_.reverse (); + head_l_arr.reverse (); - Note_head * beginhead = head_l_arr_[0]; + Note_head * beginhead = first_head (); beginhead->set_elt_property ("extremal", SCM_BOOL_T); - if (beginhead != head_l_arr_.top ()) - head_l_arr_.top ()->set_elt_property ("extremal", SCM_BOOL_T); + if (beginhead != head_l_arr.top ()) + head_l_arr.top ()->set_elt_property ("extremal", SCM_BOOL_T); int parity=1; int lastpos = int (beginhead->position_f ()); - for (int i=1; i < head_l_arr_.size (); i ++) + for (int i=1; i < head_l_arr.size (); i ++) { - int dy =abs (lastpos- (int)head_l_arr_[i]->position_f ()); + int dy =abs (lastpos- (int)head_l_arr[i]->position_f ()); if (dy <= 1) { if (parity) - head_l_arr_[i]->flip_around_stem (get_direction ()); + head_l_arr[i]->flip_around_stem (get_direction ()); parity = !parity; } else parity = 1; - lastpos = int (head_l_arr_[i]->position_f ()); + lastpos = int (head_l_arr[i]->position_f ()); } } @@ -318,8 +340,8 @@ Stem::do_brew_molecule_p () const Real dy = staff_line_leading_f ()/2.0; Real head_wid = 0; - if (head_l_arr_.size ()) - head_wid = head_l_arr_[0]->extent (X_AXIS).length (); + if (first_head ()) + head_wid = first_head ()->extent (X_AXIS).length (); stem_y[Direction(-get_direction ())] += get_direction () * head_wid * tan(ANGLE)/(2*dy); if (!invisible_b ()) @@ -338,7 +360,7 @@ Stem::do_brew_molecule_p () const mol_p->add_molecule (fl); } - if (head_l_arr_.size()) + if (first_head ()) { mol_p->translate_axis (note_delta_f (), X_AXIS); } @@ -349,9 +371,9 @@ Real Stem::note_delta_f () const { Real r=0; - if (head_l_arr_.size()) + if (first_head ()) { - Interval head_wid(0, head_l_arr_[0]->extent (X_AXIS).length ()); + Interval head_wid(0, first_head()->extent (X_AXIS).length ()); Real rule_thick = paper_l ()->get_var ("stemthickness"); Interval stem_wid(-rule_thick/2, rule_thick/2); @@ -369,21 +391,10 @@ Stem::hpos_f () const return note_delta_f () + Item::hpos_f (); } -void -Stem::do_substitute_element_pointer (Score_element*o,Score_element*n) -{ - if (Note_head*h=dynamic_cast (o)) - head_l_arr_.substitute (h, dynamic_cast(n)); - if (Rest *r=dynamic_cast (o)) - rest_l_arr_.substitute (r, dynamic_cast(n)); -} Beam* Stem::beam_l ()const { SCM b= get_elt_property ("beam"); - if (SMOB_IS_TYPE_B(Score_element, b)) - return dynamic_cast (SMOB_TO_TYPE(Score_element,b)); - else - return 0; + return dynamic_cast (unsmob_element (b)); } diff --git a/lily/tie.cc b/lily/tie.cc index af2c6fb1a5..6959854d0f 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -11,14 +11,20 @@ #include "note-head.hh" #include "paper-column.hh" #include "debug.hh" +#include "group-interface.hh" + void Tie::set_head (Direction d, Note_head * head_l) { - assert (!head_l_drul_[d]); - head_l_drul_[d] = head_l; + assert (!head (d)); + if (d == LEFT) + gh_set_car_x (get_elt_property ("heads"), head_l->self_scm_ ); + else if (d == LEFT) + gh_set_cdr_x (get_elt_property ("heads"), head_l->self_scm_ ); + set_bounds (d, head_l); add_dependency (head_l); @@ -26,8 +32,16 @@ Tie::set_head (Direction d, Note_head * head_l) Tie::Tie() { - head_l_drul_[RIGHT] =0; - head_l_drul_[LEFT] =0; + set_elt_property ("heads", gh_cons (SCM_EOL, SCM_EOL)); +} + +Note_head* +Tie::head (Direction d) const +{ + SCM c = get_elt_property ("heads"); + c = index_cell (c, d); + + return dynamic_cast (unsmob_element (c)); } @@ -37,8 +51,8 @@ Tie::Tie() Direction Tie::get_default_dir () const { - int m = int (head_l_drul_[LEFT]->position_f () - + head_l_drul_[RIGHT]->position_f ()) /2; + int m = int (head (LEFT)->position_f () + + head (RIGHT)->position_f ()) /2; /* If dir is not determined: inverse of stem: down @@ -51,22 +65,26 @@ Tie::get_default_dir () const void Tie::do_add_processing() { - if (!(head_l_drul_[LEFT] && head_l_drul_[RIGHT])) + if (!(head (LEFT) && head (RIGHT))) warning (_ ("lonely tie")); Direction d = LEFT; - Drul_array new_head_drul = head_l_drul_; + Drul_array new_head_drul; + new_head_drul[LEFT] = head(LEFT); + new_head_drul[RIGHT] = head(RIGHT); do { - if (!head_l_drul_[d]) - new_head_drul[d] = head_l_drul_[(Direction)-d]; + if (!head (d)) + new_head_drul[d] = head((Direction)-d); } while (flip(&d) != LEFT); - head_l_drul_ = new_head_drul; + + gh_set_car_x (get_elt_property ("heads"), new_head_drul[LEFT]->self_scm_ ); + gh_set_cdr_x (get_elt_property ("heads"), new_head_drul[RIGHT]->self_scm_ ); } void Tie::do_post_processing() { - assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]); + assert (head (LEFT) || head (RIGHT)); Real interline_f = paper_l ()->get_var ("interline"); Real internote_f = interline_f / 2; @@ -91,13 +109,13 @@ Tie::do_post_processing() Direction d = LEFT; do { - Real head_width_f = head_l_drul_[d] - ? head_l_drul_[d]->extent (X_AXIS).length () + Real head_width_f = head (d) + ? head (d)->extent (X_AXIS).length () : 0; /* side attached to outer (upper or lower) notehead of chord */ - if (head_l_drul_[d] + if (head (d) /* a~a~a; @@ -107,7 +125,7 @@ Tie::do_post_processing() Getting scared a bit by score-element's comment: // is this a good idea? */ - && (head_l_drul_[d]->get_elt_property ("extremal") + && (head (d)->get_elt_property ("extremal") != SCM_UNDEFINED)) { if (d == LEFT) @@ -125,8 +143,8 @@ Tie::do_post_processing() #else - if (head_l_drul_[LEFT]) - dx_f_drul_[LEFT] = head_l_drul_[LEFT]->extent (X_AXIS).length (); + if (head (LEFT)) + dx_f_drul_[LEFT] = head (LEFT)->extent (X_AXIS).length (); else dx_f_drul_[LEFT] = get_broken_left_end_align (); dx_f_drul_[LEFT] += x_gap_f; @@ -149,8 +167,8 @@ Tie::do_post_processing() for smal slurs */ - Real ypos = head_l_drul_[LEFT] ? head_l_drul_[LEFT]->position_f () - : head_l_drul_[RIGHT]->position_f (); + Real ypos = head (LEFT) ? head (LEFT)->position_f () + : head (RIGHT)->position_f (); Real y_f = internote_f * ypos; int ypos_i = int (ypos); @@ -173,15 +191,6 @@ Tie::do_post_processing() dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = y_f; } -void -Tie::do_substitute_element_pointer (Score_element*o, Score_element*n) -{ - Note_head *new_l = n ? dynamic_cast (n) : 0; - if (dynamic_cast (o) == head_l_drul_[LEFT]) - head_l_drul_[LEFT] = new_l; - else if (dynamic_cast (o) == head_l_drul_[RIGHT]) - head_l_drul_[RIGHT] = new_l; -} Array diff --git a/lily/tuplet-spanner.cc b/lily/tuplet-spanner.cc index 7fed879b85..3b9565ce11 100644 --- a/lily/tuplet-spanner.cc +++ b/lily/tuplet-spanner.cc @@ -17,6 +17,8 @@ #include "stem.hh" #include "note-column.hh" #include "dimensions.hh" +#include "group-interface.hh" + Tuplet_spanner::Tuplet_spanner () @@ -25,6 +27,8 @@ Tuplet_spanner::Tuplet_spanner () -> GUILE */ parallel_beam_b_ = false; + set_elt_property ("beams", SCM_EOL); + set_elt_property ("columns", SCM_EOL); } /* @@ -58,77 +62,78 @@ Tuplet_spanner::do_brew_molecule_p () const (value == 2 && !parallel_beam_b_)); } - if (column_arr_.size ()){ - Real ncw = column_arr_.top ()->extent (X_AXIS).length (); - Real w = extent (X_AXIS).length () + ncw; - Molecule num (lookup_l ()->text ("italic", - number_str_, paper_l ())); - num.align_to (X_AXIS, CENTER); - num.translate_axis (w/2, X_AXIS); - Real interline = paper_l ()->get_var ("interline"); - Real dy = column_arr_.top ()->extent (Y_AXIS) [get_direction ()] - - column_arr_[0]->extent (Y_AXIS) [get_direction ()]; - num.align_to (Y_AXIS, CENTER); - num.translate_axis (get_direction () * interline, Y_AXIS); + if (gh_pair_p (get_elt_property ("columns"))) + { + Link_array column_arr= + Group_interface__extract_elements (this, (Note_column*)0, "columns"); + + Real ncw = column_arr.top ()->extent(X_AXIS).length (); + Real w = spanner_length () + ncw; + Molecule num (lookup_l ()->text ("italic", + number_str_, paper_l ())); + num.align_to (X_AXIS, CENTER); + num.translate_axis (w/2, X_AXIS); + Real interline = paper_l ()->get_var ("interline"); + Real dy = column_arr.top ()->extent (Y_AXIS) [get_direction ()] + - column_arr[0]->extent (Y_AXIS) [get_direction ()]; + num.align_to (Y_AXIS, CENTER); + num.translate_axis (get_direction () * interline, Y_AXIS); - num.translate_axis (dy/2, Y_AXIS); + num.translate_axis (dy/2, Y_AXIS); - Real thick = paper_l ()->get_var ("tuplet_thick"); - if (bracket_visibility) - { - Real gap = paper_l () -> get_var ("tuplet_spanner_gap"); + Real thick = paper_l ()->get_var ("tuplet_thick"); + if (bracket_visibility) + { + Real gap = paper_l () -> get_var ("tuplet_spanner_gap"); - mol_p->add_molecule (lookup_l ()->tuplet_bracket (dy, w, thick, gap, interline, get_direction ())); - } - - if (number_visibility) - { - mol_p->add_molecule (num); - } - mol_p->translate_axis (get_direction () * interline, Y_AXIS); - } + mol_p->add_molecule (lookup_l ()->tuplet_bracket (dy, w, thick, gap, interline, get_direction ())); + } + + if (number_visibility) + { + mol_p->add_molecule (num); + } + mol_p->translate_axis (get_direction () * interline, Y_AXIS); + } return mol_p; } void Tuplet_spanner::do_add_processing () { - if (column_arr_.size ()) + if (gh_pair_p (get_elt_property ("columns"))) { - set_bounds (LEFT, column_arr_[0]); - set_bounds (RIGHT, column_arr_.top ()); + Link_array column_arr= + Group_interface__extract_elements (this, (Note_column*)0, "columns"); + + set_bounds (LEFT, column_arr[0]); + set_bounds (RIGHT, column_arr.top ()); } } void Tuplet_spanner::do_post_processing () { - if (column_arr_.size()) - translate_axis (column_arr_[0]->extent (Y_AXIS)[get_direction ()], Y_AXIS); + Link_array column_arr= + Group_interface__extract_elements (this, (Note_column*)0, "columns"); + + + if (column_arr.size()) + translate_axis (column_arr[0]->extent (Y_AXIS)[get_direction ()], Y_AXIS); - if (beam_l_arr_.size () == 1) + + if (scm_ilength (get_elt_property ("beams")) == 1) { - Beam * beam_l = beam_l_arr_[0]; + SCM bs = get_elt_property ("beams"); + Score_element *b = unsmob_element (gh_car (bs)); + Beam * beam_l = dynamic_cast (b); if (!broken_b () && spanned_drul_[LEFT]->column_l () == beam_l->spanned_drul_[LEFT]->column_l () && spanned_drul_[RIGHT]->column_l () == beam_l->spanned_drul_[RIGHT]->column_l ()) parallel_beam_b_ = true; } - - // if (column_arr_.size () == 1) - // bracket_visibility_b_ = false; } -void -Tuplet_spanner::do_substitute_element_pointer (Score_element* o, Score_element* n) -{ - if (Note_column *onc = dynamic_cast (o)) - column_arr_.substitute (onc, dynamic_cast (n)); - else if (Beam * b = dynamic_cast (o)) - { - beam_l_arr_.substitute (b, dynamic_cast (n)); - } -} Direction Tuplet_spanner::get_default_dir () const @@ -141,14 +146,17 @@ Tuplet_spanner::get_default_dir () const return d; } - for (int i=0; i < column_arr_.size (); i ++) + for (SCM s = get_elt_property ("columns"); gh_pair_p (s); s = gh_cdr (s)) { - if (column_arr_[i]->dir () < 0) + Score_element * sc = unsmob_element (gh_car (s)); + Note_column * nc = dynamic_cast (sc); + if (nc->dir () < 0) { d = DOWN; break; } } + return d; } @@ -156,13 +164,16 @@ void Tuplet_spanner::add_beam (Beam *b) { add_dependency (b); - beam_l_arr_.push (b); + Group_interface gi (this, "beams"); + gi.add_element (b); } void Tuplet_spanner::add_column (Note_column*n) { - column_arr_.push (n); + Group_interface gi (this, "columns"); + gi.add_element (n); + add_dependency (n); } diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index f1e641b782..ac0973f9e5 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -18,12 +18,14 @@ #include "volta-spanner.hh" #include "stem.hh" #include "dimension-cache.hh" -#include "pointer.tcc" +#include "group-interface.hh" Volta_spanner::Volta_spanner () { last_b_ = false; dim_cache_ [Y_AXIS]->set_callback (dim_callback); + set_elt_property ("bars", SCM_EOL); + set_elt_property ("note-columns", SCM_EOL); } Molecule* @@ -31,8 +33,15 @@ Volta_spanner::do_brew_molecule_p () const { Molecule* mol_p = new Molecule; - if (!bar_arr_.size ()) + Link_array bar_arr + = Group_interface__extract_elements (this, (Bar*)0, "bars"); + + if (!bar_arr.size ()) return mol_p; + + Link_array note_column_arr + = Group_interface__extract_elements (this, (Bar*)0, "note-columns"); + bool no_vertical_start = false; bool no_vertical_end = last_b_; @@ -41,7 +50,7 @@ Volta_spanner::do_brew_molecule_p () const no_vertical_start = true; if (orig_span && (orig_span->broken_into_l_arr_.top () != (Spanner*)this)) no_vertical_end = true; - if (bar_arr_.top ()->type_str_.length_i () > 1) + if (bar_arr.top ()->type_str_.length_i () > 1) no_vertical_end = false; Real interline_f = paper_l ()->get_var ("interline"); @@ -49,18 +58,18 @@ Volta_spanner::do_brew_molecule_p () const Real t = paper_l ()->get_var ("volta_thick"); Real dx = internote_f; - Real w = extent (X_AXIS).length () - dx - get_broken_left_end_align (); + Real w = spanner_length() - dx - get_broken_left_end_align (); Real h = paper_l()->get_var ("volta_spanner_height"); Molecule volta (lookup_l ()->volta (h, w, t, no_vertical_start, no_vertical_end)); Molecule num (lookup_l ()->text ("volta", number_str_, paper_l ())); - Real dy = bar_arr_.top ()->extent (Y_AXIS) [UP] > - bar_arr_[0]->extent (Y_AXIS) [UP]; + Real dy = bar_arr.top ()->extent (Y_AXIS) [UP] > + bar_arr[0]->extent (Y_AXIS) [UP]; dy += 2 * h; - for (int i = 0; i < note_column_arr_.size (); i++) - dy = dy >? note_column_arr_[i]->extent (Y_AXIS)[BIGGER]; + for (int i = 0; i < note_column_arr.size (); i++) + dy = dy >? note_column_arr[i]->extent (Y_AXIS)[BIGGER]; dy -= h; Molecule two (lookup_l ()->text ("number", "2", paper_l ())); @@ -77,10 +86,14 @@ Volta_spanner::do_brew_molecule_p () const void Volta_spanner::do_add_processing () { - if (bar_arr_.size ()) + + Link_array bar_arr + = Group_interface__extract_elements (this, (Bar*)0, "bars"); + + if (bar_arr.size ()) { - set_bounds (LEFT, bar_arr_[0]); - set_bounds (RIGHT, bar_arr_.top ()); + set_bounds (LEFT, bar_arr[0]); + set_bounds (RIGHT, bar_arr.top ()); } } @@ -104,31 +117,32 @@ Volta_spanner::dim_callback (Dimension_cache const *c) void Volta_spanner::do_post_processing () { - if (bar_arr_.size()) - translate_axis (bar_arr_[0]->extent (Y_AXIS)[UP], Y_AXIS); + + Link_array bar_arr + = Group_interface__extract_elements (this, (Bar*)0, "bars"); + + if (bar_arr.size()) + translate_axis (bar_arr[0]->extent (Y_AXIS)[UP], Y_AXIS); translate_axis (get_broken_left_end_align (), X_AXIS); } -void -Volta_spanner::do_substitute_element_pointer (Score_element* o, Score_element* n) -{ - if (Note_column* c = dynamic_cast (o)) - note_column_arr_.substitute (c, dynamic_cast (n)); - else if (Bar* c = dynamic_cast (o)) - bar_arr_.substitute (c, dynamic_cast (n)); -} + void Volta_spanner::add_bar (Bar* c) { - bar_arr_.push (c); + Group_interface gi(this, "bars"); + gi.add_element (c); + add_dependency (c); } void Volta_spanner::add_column (Note_column* c) { - note_column_arr_.push (c); + Group_interface gi(this, "note-columns"); + gi.add_element (c); + add_dependency (c); } diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 9663028c13..373b9359dd 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.9 -Entered-date: 02DEC99 +Version: 1.3.10 +Entered-date: 08DEC99 Description: Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.3.9.tar.gz + 1000k lilypond-1.3.10.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.9.tar.gz + 1000k lilypond-1.3.10.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index 51cb9ffde0..63cc2657f1 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.3.9 +Version: 1.3.10 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.9.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.10.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # get Packager from (undocumented?) ~/.rpmmacros! -- 2.39.2