]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.65 release/1.3.65
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 26 Jun 2000 21:22:49 +0000 (23:22 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 26 Jun 2000 21:22:49 +0000 (23:22 +0200)
==========

* Bugfix: translate volta spanner at start of line.

* Changed directional_element() calls to instantiations
of Directional_element_interface.

* Removed Dynamic_line_spanner, and cleaned up Dynamic_engraver.

* Removed Staff_info type. Information about columns is now transferred
via currentMusicalColumn and currentCommandColumn.

1.3.64.j

61 files changed:
CHANGES
Documentation/regression-test.tely
VERSION
input/test/beam-chord.ly
input/test/beams.ly
input/test/broken.ly
input/test/hara-kiri-switch.ly
input/test/lyrics.ly
input/test/sleur.ly
input/test/slur-dash.ly
input/test/slur-symmetry-2.ly
input/test/slur-symmetry-3.ly
input/test/thumb.ly
input/test/vertical-text.ly
lily/align-note-column-engraver.cc
lily/axis-group-engraver.cc
lily/beam.cc
lily/breathing-sign.cc
lily/chord-tremolo-engraver.cc
lily/direction.cc [deleted file]
lily/directional-element-interface.cc
lily/dot-column.cc
lily/dots.cc
lily/dynamic-engraver.cc
lily/engraver-group-engraver.cc
lily/engraver.cc
lily/extender-engraver.cc
lily/grace-align-item.cc
lily/grace-position-engraver.cc
lily/hyphen-engraver.cc
lily/include/directional-element-interface.hh
lily/include/dynamic-line-interface.hh [new file with mode: 0644]
lily/include/engraver-group-engraver.hh
lily/include/engraver.hh
lily/include/extender-spanner.hh [deleted file]
lily/include/grace-align-item.hh
lily/include/hara-kiri-vertical-group-spanner.hh [deleted file]
lily/include/key-engraver.hh [deleted file]
lily/include/score-engraver.hh
lily/include/spanner.hh
lily/include/staff-info.hh
lily/line-group-group-engraver.cc
lily/multi-measure-rest.cc
lily/score-engraver.cc
lily/separating-line-group-engraver.cc
lily/slur.cc
lily/spacing-engraver.cc
lily/spanner.cc
lily/staff-info.cc
lily/staff-symbol-engraver.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/system-start-delimiter-engraver.cc
lily/tie-column.cc
lily/tie.cc
lily/tuplet-spanner.cc
lily/vertical-align-engraver.cc
lily/volta-spanner.cc
ly/engraver.ly
make/out/lilypond.lsm
make/out/lilypond.spec

diff --git a/CHANGES b/CHANGES
index 5892454adf4acc716e1aff04fbb4d070792de6b1..48da8c0b8d44b1fc8be3f4695d2b35b6e752f38f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,16 @@
-1.3.64.jcn3
-============
+1.3.64.uu1
+==========
+
+* Bugfix: translate volta spanner at start of line.
+
+* Changed directional_element() calls to instantiations
+of Directional_element_interface.
+
+* Removed Dynamic_line_spanner, and cleaned up Dynamic_engraver.
+
+* Removed Staff_info type. Information about columns is now transferred
+via currentMusicalColumn and currentCommandColumn.
 
-* Fixed non-broken interstaff slurs.
 
 1.3.64.jcn2
 ============
@@ -13,18 +22,15 @@ slurBeginAttachment slurEndAttachment, values: 'head 'stem
 * Fixed slur attachment positions, added missing rule and use simple
 default starting positions for attachments.
 
+* Started rewrite of slur ending code, interstaff slurs are broken for
+now.
 
-1.3.63.jcn1
-============
-* Started grand redo of slur endings, interstaff slurs are broken for now.
-
-* Fixed download url.
+* Fixed download URL of the webpage.
 
-* Moved direction.cc to flower.
+* Moved direction.cc to flower/.
 
-1.3.63.uu1
-==========
+1.3.64
+======
 
 * Lyrics centered on notehead.
 
index 661be6f850b8c247f5864171298e642b30309395..51cc4d1460f073d1d0fc635e655af67188bdf33c 100644 (file)
@@ -101,6 +101,11 @@ not be on staff lines.
 
 @mudelafile{staccato-pos.ly}
 
+Dynamics appear below or above the staff.  If multiple dynamics are
+linked with (de)crescendi, they should be on the same line.
+
+@mudelafile{dyn-line.ly}
+
 @section Chord names
 
 Chord names are generated from a list pitches, and are customisable
diff --git a/VERSION b/VERSION
index e6b8fc902b0c5b785af113eb44f2e3b6e9264ba3..3f4a9599f7d0be8211cf57fa8ed94f3aabed1a6e 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=64
-MY_PATCH_LEVEL=jcn3
+PATCH_LEVEL=65
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 87e04d39d7ae9e10b7686e9cea983961f61ca845..79617a51b54d7f7f84c81f0c045c8b5f80596fc7 100644 (file)
@@ -12,7 +12,7 @@
                [c <c e,>]
        }
        \paper{
-               castingalgorithm = \Wordwrap;
+
                linewidth = 60.0\mm;
        }
 }
index fff0213aa83f47f6c4a4e60f8da907f89e80c4bc..5d6666095c57302607c87b6f9f737d77f9d84063 100644 (file)
@@ -67,7 +67,7 @@ TestedFeatures =       "beams and beamflags";
        >
 
        \paper{
-               castingalgorithm = \Wordwrap;
+
        }
 }
 
index 656a96ec381a3d71590c1e4e8b2cb56302dbf640..b8d98bd2fdd70071ef1206d421ae40fd68441e6e 100644 (file)
@@ -38,7 +38,7 @@ broken = \notes\transpose c''{
              indent = 0.0\pt;
                %for broken!
                linewidth= 30.\mm;
-               castingalgorithm = \Wordwrap;
+
        }
 }
 
index 920aabbdac8d55cab764d604bce543ab32adc4ba..72b338371b33157ddb7c23905391a0c1bf5a7db1 100644 (file)
@@ -42,7 +42,7 @@ grandstaff = \context GrandStaff = one <
        \grandstaff
        \paper{
                linewidth=80.0\mm;
-               castingalgorithm = \Wordwrap;
+
                \translator { \VoiceContext noAutoBeaming = "1"; }
                \translator { \HaraKiriStaffContext }
                \translator { \OrchestralScoreContext skipBars = 1; }
index 8086e1eb1ab66bc0e1853654a5d21fbfe0d80aae..c7b9e5da7e618751017d0aa81791b698dc460e5d 100644 (file)
@@ -61,6 +61,6 @@ $melodic_staff = \context Staff = mel <
                \$quite_long_lyrics_staff       
        >
        \paper{
-%              castingalgorithm = \Wordwrap;   
+
        }
 }
index 2df0f6f404555a5dcb8429f60dab1cdb6015d7ad..1fd9d90ef7ff51193b75f2b8d825a1168d329172 100644 (file)
@@ -190,7 +190,6 @@ clipping = \notes\transpose c'{
              indent = 0.0\pt;
                %for broken!
                % linewidth= 30.\mm;
-               castingalgorithm = \Wordwrap;
        }
 }
 
index e47e3eb6ba955bf8fac2f0611625fc7eab0f7626..2f5eb48317415c62d192df2436410a21c4d754e9 100644 (file)
@@ -16,7 +16,7 @@
              indent = 0.0\pt;
                %for broken!
                % linewidth= 30.\mm;
-               castingalgorithm = \Wordwrap;
+
        }
 }
 
index 93c2df18257b1ea1274e0b744f12343c8667f51c..ef86eedfd119a8f7ce5c06b2652e1ea9f00a3814 100644 (file)
@@ -10,7 +10,7 @@ title="symmetry";
                [g,( e, )c' c]
        }
        \paper{
-               castingalgorithm = \Wordwrap;
+
                linewidth = 50.0\mm;
        }
 }
index 4811a63d4cb83b51a2a025b3eb629f22b3828d4a..23a0a3903be264e590bd785ba0364d6e318cf866 100644 (file)
@@ -9,7 +9,7 @@ title="symmetry";
                [d''8( f )a, d'] r2
        }
        \paper{
-               castingalgorithm = \Wordwrap;
+
                linewidth = 50.0\mm;
        }
 }
index 14e1e1197d1e356084140f19048b65fb57fdb263..1e65b44730ee34777339857c77e4f37177ac1483 100644 (file)
@@ -15,7 +15,7 @@
        }
        \paper{ 
                linewidth = 80.\mm; 
-               castingalgorithm = \Wordwrap;
+
        }
 }
 
index 57de581d51511adf0b7e20e97458306943a57a2b..299a81f7504e96f82f9f1cf3df4e3d0b160bd77d 100644 (file)
@@ -11,7 +11,7 @@
                } 
        >
        \paper{
-               castingalgorithm = \Wordwrap;
+
        }
 }
 
index 74d165a141f7fb6270a374f4c846c34e8663302a..f346fb9191a36e914465c550327512e29941c502 100644 (file)
@@ -60,7 +60,7 @@ Align_note_column_engraver::do_removal_processing ()
   if (isdir_b (al))
     {
       Direction d = to_dir (al);
-      directional_element (align_item_p_).set (d);
+      Directional_element_interface (align_item_p_).set (d);
     }
   
   typeset_element (align_item_p_);
index 25b16bba20969d46cdcbb2cd26c6ca16d56f5a47..f5266ecdd43b1836d03916ce4ebf26ddc63e9d22 100644 (file)
@@ -25,7 +25,7 @@ Axis_group_engraver::do_creation_processing ()
   Axis_group_interface (staffline_p_).set_interface ();
   Axis_group_interface (staffline_p_).set_axes (Y_AXIS, Y_AXIS);
 
-  Item *  it = get_staff_info().command_pcol_l ();
+  Score_element *  it = unsmob_element (get_property ("currentCommandColumn"));
   Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_);  
   staffline_p_->set_bound(LEFT,it);
 
@@ -61,7 +61,7 @@ Axis_group_engraver::do_removal_processing ()
       && gh_number_p (gh_cdr (dims)))
     staffline_p_->set_elt_property ("extra-extent-Y", dims);
 
-  Item *  it = get_staff_info().command_pcol_l ();
+Score_element *  it = unsmob_element (get_property ("currentCommandColumn"));
 
   Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_);  
   staffline_p_->set_bound(RIGHT,it);
index 08173a742f8b9d194b0a1659810ddcd26bed85d4..322655fe7417e077554200041baf7808fa436d27 100644 (file)
@@ -53,10 +53,7 @@ Beam::add_stem (Stem*s)
   assert (!s->beam_l ());
   s->set_elt_pointer ("beam", self_scm_);
 
-  if (!get_bound (LEFT))
-    set_bound (LEFT,s);
-  else
-    set_bound (RIGHT,s);
+  add_bound_item (this, s);
 }
 
 int
@@ -92,8 +89,8 @@ Beam::member_before_line_breaking ()
 
     }
 
-  if (!directional_element (this).get ())
-    directional_element (this).set (get_default_dir ());
+  if (!Directional_element_interface (this).get ())
+    Directional_element_interface (this).set (get_default_dir ());
 
   auto_knees ();
   set_stem_directions ();
@@ -117,7 +114,7 @@ Beam::get_default_dir () const
   for (int i=0; i <stem_count (); i++)
     do { // HUH -- waar slaat dit op?
       Stem *s = stem (i);
-      Direction sd = directional_element (s).get ();
+      Direction sd = Directional_element_interface (s).get ();
       int current = sd ? (1 + d * sd)/2
        : s->get_center_distance ((Direction)-d);
 
@@ -155,13 +152,13 @@ Beam::get_default_dir () const
 void
 Beam::set_stem_directions ()
 {
-  Direction d = directional_element (this).get ();
+  Direction d = Directional_element_interface (this).get ();
   for (int i=0; i <stem_count (); i++)
     {
       Stem *s = stem (i);
       SCM force = s->remove_elt_property ("dir-forced");
       if (!gh_boolean_p (force) || !gh_scm2bool (force))
-       directional_element (s).set (d);
+       Directional_element_interface (s).set (d);
     }
 } 
 
@@ -185,7 +182,7 @@ Beam::auto_knee (String gap_str, bool interstaff_b)
   bool knee_b = false;
   int knee_y = 0;
   SCM gap = get_elt_property (gap_str);
-  Direction d = directional_element (this).get ();
+  Direction d = Directional_element_interface (this).get ();
   
   if (gh_number_p (gap))
     {
@@ -212,10 +209,13 @@ Beam::auto_knee (String gap_str, bool interstaff_b)
     {
       for (int i=0; i < stem_count (); i++)
         {
+         Item *s = stem(i);      
          int y = (int)(stem (i)->head_positions()[d])
-           + (int)calc_interstaff_dist (stem (i), this);
-         directional_element (stem (i)).set (y < knee_y ? UP : DOWN);
-         stem (i)->set_elt_property ("dir-forced", SCM_BOOL_T);
+           + (int)calc_interstaff_dist (s, this);
+
+
+         Directional_element_interface (s).set (y < knee_y ? UP : DOWN);
+         s->set_elt_property ("dir-forced", SCM_BOOL_T);
        }
     }
   return knee_b;
@@ -291,8 +291,8 @@ Beam::member_after_line_breaking ()
   /*
     until here, we used only stem_info, which acts as if dir=up
    */
-  y *= directional_element (this).get ();
-  dy *= directional_element (this).get ();
+  y *= Directional_element_interface (this).get ();
+  dy *= Directional_element_interface (this).get ();
 
   Staff_symbol_referencer_interface st (this);
   Real half_space = st.staff_space () / 2;
@@ -330,7 +330,7 @@ Beam::member_after_line_breaking ()
          */
          int quant_dir = 0;
          if (abs (y_shift) > half_space / 2)
-           quant_dir = sign (y_shift) * directional_element (this).get ();
+           quant_dir = sign (y_shift) * Directional_element_interface (this).get ();
          y = quantise_y_f (y, dy, quant_dir);
        }
     }
@@ -441,8 +441,8 @@ Beam::calc_stem_y_f (Stem* s, Real y, Real dy) const
   Real stem_y = (dy && dx ? (s->relative_coordinate (0, X_AXIS) - x0) / dx * dy : 0) + y;
 
   /* knee */
-   Direction dir  = directional_element(this).get ();
-   Direction sdir = directional_element (s).get ();
+   Direction dir  = Directional_element_interface(this).get ();
+   Direction sdir = Directional_element_interface (s).get ();
    
     /* knee */
    if (dir!= sdir)
@@ -456,7 +456,7 @@ Beam::calc_stem_y_f (Stem* s, Real y, Real dy) const
       // huh, why not for first visible?
       if (//(s != first_visible_stem ()) &&
          me.staff_symbol_l () != last.staff_symbol_l ())
-       stem_y += directional_element (this).get ()
+       stem_y += Directional_element_interface (this).get ()
          * (beam_multiplicity - stem_multiplicity) * interbeam_f;
     }
   return stem_y;
@@ -467,7 +467,7 @@ Beam::check_stem_length_f (Real y, Real dy) const
 {
   Real shorten = 0;
   Real lengthen = 0;
-  Direction dir = directional_element (this).get ();
+  Direction dir = Directional_element_interface (this).get ();
   
   for (int i=0; i < stem_count (); i++)
     {
@@ -571,7 +571,7 @@ Beam::quantise_y_f (Real y, Real dy, int quant_dir)
   if (a.size () <= 1)
     return y;
 
-  Real up_y = directional_element (this).get () * y;
+  Real up_y = Directional_element_interface (this).get () * y;
   Interval iv = quantise_iv (a, up_y/staff_space) * staff_space;
 
   Real q = up_y - iv[SMALLER] <= iv[BIGGER] - up_y 
@@ -579,7 +579,7 @@ Beam::quantise_y_f (Real y, Real dy, int quant_dir)
   if (quant_dir)
     q = iv[(Direction)quant_dir];
 
-  return q * directional_element (this).get ();
+  return q * Directional_element_interface (this).get ();
 }
 
 void
@@ -644,7 +644,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
     nw_f = paper_l ()->get_var ("quartwidth");
 
 
-  Direction dir = directional_element (this).get ();
+  Direction dir = Directional_element_interface (this).get ();
   
   /* half beams extending to the left. */
   if (prev)
index 6c337642d1fa21efbb0ff64c57735a3e0f80265a..c8a7a0c1a2f14db0065b734d9997c14c525fbd0c 100644 (file)
@@ -50,11 +50,11 @@ SCM
 Breathing_sign::member_after_line_breaking ()
 {
   Real space = staff_symbol_referencer (this).staff_space();
-  Direction d = directional_element (this). get ();
+  Direction d = Directional_element_interface (this). get ();
   if (!d)
     {
       d = UP;
-      directional_element(this).set (d);
+      Directional_element_interface (this).set (d);
     }
 
   translate_axis(2.0 * space * d, Y_AXIS);
index 86707e1d8fc067b8635837d0cbeb20757c00bea5..5ab38f6f853025be68c40af6dc1c1282e7f1617a 100644 (file)
@@ -142,7 +142,7 @@ Chord_tremolo_engraver::acknowledge_element (Score_element_info info)
            It's amazing Mike:
            
              Stem:: type_i () ->first_head ()->get_direction () ->
-                     directional_element (me).set (d);
+                     Directional_element_interface (me).set (d);
 
 
              don't understand this comment.
diff --git a/lily/direction.cc b/lily/direction.cc
deleted file mode 100644 (file)
index e69de29..0000000
index 4cc5ebb52f1ae2a3b416ab01fd7e72ece015df41..e34eea308ad05731d36beaf7eda4d6097d902c51 100644 (file)
@@ -40,9 +40,3 @@ Directional_element_interface::set (Direction d)
 {
   elt_l_->set_elt_property ("direction", gh_int2scm (d));
 }
-
-Directional_element_interface
-directional_element (Score_element const*s)
-{
-  return s;
-}
index 1caf93797849862849291611f95fec7c5be9508f..f3d3fccf3fe255ed018c18359f6ea5487e7aaf37 100644 (file)
@@ -53,7 +53,7 @@ Dot_column::Dot_column (SCM s)
 {
   Pointer_group_interface gi (this, "dots");
   gi.set_interface ();
-  directional_element (this).set (RIGHT);
+  Directional_element_interface (this).set (RIGHT);
   
   Axis_group_interface (this).set_interface ();
   Axis_group_interface (this).set_axes(X_AXIS,X_AXIS);
index 9dc8c8b75b97067de064041ef749d43c07caa2d3..edd64f01445d4d92eb1af5ec4821a530d7b1b68d 100644 (file)
@@ -25,13 +25,13 @@ Dots::member_after_line_breaking ()
   SCM d= get_elt_property ("dot-count");
   if (gh_number_p (d) && gh_scm2int (d))
     {
-      if (!directional_element (this).get ())
-       directional_element (this).set (UP);
+      if (!Directional_element_interface (this).get ())
+       Directional_element_interface (this).set (UP);
 
       Staff_symbol_referencer_interface si (this);
       int p = int (si.position_f ());
       if (!(p % 2))
-       si.set_position (p  + directional_element (this).get ());
+       si.set_position (p  + Directional_element_interface (this).get ());
     }
 
     return SCM_UNDEFINED;
index 7c643490dd245e51f491bf2fb3081d417c2de758..739f03f7ebcd57870c948bbb499ca327454fe754 100644 (file)
 /*
   TODO:
 
-  * direction of text-dynamic-request if not equalt to direction
-  of line-spanner
-
-  * FIXME: this has gotten a bit too hairy.
- */
-
-class Dynamic_line_spanner : public Spanner
-{
-public:
-  Dynamic_line_spanner (SCM);
-  VIRTUAL_COPY_CONS(Score_element);
-  void add_column (Note_column*);
-  void add_element (Score_element*);
-};
-
-Dynamic_line_spanner::Dynamic_line_spanner (SCM s)
-  : Spanner (s)
-{
-  Side_position_interface (this).set_axis (Y_AXIS);
-  Axis_group_interface (this).set_interface ();
-  Axis_group_interface (this).set_axes (X_AXIS, Y_AXIS);
-}
-
-void
-Dynamic_line_spanner::add_column (Note_column* n)
-{
-  if (!get_bound (LEFT))
-    set_bound (LEFT, n);
-  else
-    set_bound (RIGHT, n);
-
-  add_dependency (n);
-}
-
-
-void
-Dynamic_line_spanner::add_element (Score_element* e)
-{
-  e->set_parent (this, Y_AXIS);
-  Axis_group_interface (this).add_element (e); 
-}
+  * direction of text-dynamic-request if not equal to direction of
+  line-spanner
+*/
 
 /**
    print text & hairpin dynamics.
@@ -82,25 +44,23 @@ class Dynamic_engraver : public Engraver
   Crescendo * cresc_p_;
 
   Text_script_req* text_req_l_;
-  Span_req * span_start_req_l_;
-  Drul_array<Span_req*> span_req_l_drul_;
+  
+  Span_req * current_cresc_req_;
+  Drul_array<Span_req*> accepted_spanreqs_drul_;
 
-  Dynamic_line_spanner* line_spanner_;
-  Dynamic_line_spanner* finished_line_spanner_;
-  Moment last_request_mom_;
+  Spanner* line_spanner_;
+  Spanner* finished_line_spanner_;
 
-  Array<Note_column*> pending_column_arr_;
+  Link_array<Note_column> pending_column_arr_;
   Link_array<Score_element> pending_element_arr_;
   
-  void  typeset_all ();
+  void typeset_all ();
 
 public:
   VIRTUAL_COPY_CONS(Translator);
   Dynamic_engraver ();
   
 protected:
-  void announce_element (Score_element_info);
-  
   virtual void do_removal_processing ();
   virtual void acknowledge_element (Score_element_info);
   virtual bool do_try_music (Music *req_l);
@@ -111,14 +71,6 @@ protected:
 
 ADD_THIS_TRANSLATOR (Dynamic_engraver);
 
-void
-Dynamic_engraver::announce_element (Score_element_info i)
-{
-  Group_interface (i.elem_l_, "interfaces").add_thing (ly_symbol2scm ("dynamic"));
-  
-  Engraver::announce_element (i);
-}
-
 
 Dynamic_engraver::Dynamic_engraver ()
 {
@@ -126,20 +78,20 @@ Dynamic_engraver::Dynamic_engraver ()
   finished_cresc_p_ = 0;
   line_spanner_ = 0;
   finished_line_spanner_ = 0;
-  span_start_req_l_ = 0;
+  current_cresc_req_ = 0;
   cresc_p_ =0;
 
   text_req_l_ = 0;
-  span_req_l_drul_[START] = 0;
-  span_req_l_drul_[STOP] = 0;
+  accepted_spanreqs_drul_[START] = 0;
+  accepted_spanreqs_drul_[STOP] = 0;
 }
 
 void
 Dynamic_engraver::do_post_move_processing ()
 {
   text_req_l_ = 0;
-  span_req_l_drul_[START] = 0;
-  span_req_l_drul_[STOP] = 0;
+  accepted_spanreqs_drul_[START] = 0;
+  accepted_spanreqs_drul_[STOP] = 0;
 }
 
 bool
@@ -158,7 +110,7 @@ Dynamic_engraver::do_try_music (Music * m)
       if ((s->span_type_str_ == "crescendo"
           || s->span_type_str_ == "decrescendo"))
        {
-         span_req_l_drul_[s->span_dir_] = s;
+         accepted_spanreqs_drul_[s->span_dir_] = s;
          return true;
        }
     }
@@ -168,39 +120,36 @@ Dynamic_engraver::do_try_music (Music * m)
 void
 Dynamic_engraver::do_process_music ()
 {
-  if ((span_req_l_drul_[START] || span_req_l_drul_[STOP] || text_req_l_)
-      && !line_spanner_
-      && pending_element_arr_.size ())
+  if (accepted_spanreqs_drul_[START] || accepted_spanreqs_drul_[STOP] || text_req_l_)
+    
     {
-      line_spanner_ = new Dynamic_line_spanner (get_property ("basicDynamicLineSpannerProperties"));
-      for (int i = 0; i < pending_column_arr_.size (); i++)
-       line_spanner_->add_column (pending_column_arr_[i]);
-      pending_column_arr_.clear ();
-      announce_element (Score_element_info
-                       (line_spanner_,
-                        text_req_l_ ? text_req_l_ : span_req_l_drul_[START]));
+      if (!line_spanner_)
+       {
+         line_spanner_ = new Spanner (get_property ("basicDynamicLineSpannerProperties"));
 
-    }
+         Side_position_interface (line_spanner_).set_axis (Y_AXIS);
+         Axis_group_interface (line_spanner_).set_interface ();
+         Axis_group_interface (line_spanner_).set_axes (Y_AXIS, Y_AXIS);
+         announce_element (Score_element_info
+                           (line_spanner_,
+                            text_req_l_ ? text_req_l_ : accepted_spanreqs_drul_[START]));
 
-  if (line_spanner_ && pending_element_arr_.size ())
-    {
-      for (int i = 0; i < pending_element_arr_.size (); i++)
-       line_spanner_->add_element (pending_element_arr_[i]);
-      pending_element_arr_.clear ();
+       }
     }
 
   /*
-    TODO: This should be optionised:
-      * break when group of dynamic requests ends
-      * break now  (only if no cresc. in progress)
-      * continue through piece */
-  if (span_req_l_drul_[START] || span_req_l_drul_[STOP] || text_req_l_)
+    TODO: should finish and create new spanner if vertical dyn-direction is changed.
+   */
+  else if (!accepted_spanreqs_drul_[START] && !text_req_l_)
     {
-      last_request_mom_ = now_mom ();
+      finished_line_spanner_ = line_spanner_;
+      line_spanner_ = 0;
     }
-  else
-    {
-      /*
+
+       /*
+       todo: resurrect  dynamic{direction, padding,minimumspace}
+       */
+       /*
        During a (de)crescendo, pending request will not be cleared,
        and a line-spanner will always be created, as \< \! are already
        two requests.
@@ -208,7 +157,7 @@ Dynamic_engraver::do_process_music ()
        Maybe always creating a line-spanner for a (de)crescendo (see
        below) is not a good idea:
 
-            a\< b\p \!c
+           a\< b\p \!c
 
        the \p will be centred on the line-spanner, and thus clash
        with the hairpin.  When axis-group code is in place, the \p
@@ -216,47 +165,8 @@ Dynamic_engraver::do_process_music ()
 
        Urg, but line-spanner must always have at least same duration
        as (de)crecsendo, b.o. line-breaking.
-       */
-      if (now_mom () > last_request_mom_ && !span_start_req_l_)
-       {
-         for (int i = 0; i < pending_element_arr_.size (); i++)
-           {
-             Score_element* e = pending_element_arr_[i];
-             Side_position_interface (e).set_axis (Y_AXIS);
-             Side_position_interface (e).add_staff_support ();
-
-             /*
-               UGH UGH 
-             */
-             Direction d = directional_element (e).get ();
-             if (!d)
-               {
-                 SCM s = get_property ("dynamicDirection");
-                 if (!isdir_b (s))
-                   s = get_property ("verticalDirection");
-                 if (isdir_b (s))
-                   d = to_dir (s);
-                 directional_element (e).set (d);
-               }
-         
-             SCM s = get_property ("dynamicPadding");
-             if (gh_number_p (s))
-               e->set_elt_property ("padding", s);
-             s = get_property ("dynamicMinimumSpace");
-             if (gh_number_p (s))
-               e->set_elt_property ("minimum-space", s);
-           }
-         pending_element_arr_.clear ();
-         if (line_spanner_)
-           {
-             for (int i = 0; i < pending_column_arr_.size (); i++)
-               line_spanner_->add_column (pending_column_arr_[i]);
-             pending_column_arr_.clear ();
-             finished_line_spanner_ = line_spanner_;
-             line_spanner_ = 0;
-           }
-       }
-    } 
+       */
+
 
   if (text_req_l_)
     {
@@ -265,59 +175,60 @@ Dynamic_engraver::do_process_music ()
       text_p_ = new Item (get_property ("basicDynamicTextProperties"));
       text_p_->set_elt_property ("text", ly_str02scm (loud.ch_C ()));
       if (Direction d=text_req_l_->get_direction ())
-       directional_element (text_p_).set (d);
-      pending_element_arr_.push (text_p_);
+       Directional_element_interface (line_spanner_).set (d);
+
+      Axis_group_interface (line_spanner_).add_element (text_p_);
 
       text_p_->add_offset_callback (Side_position_interface::aligned_on_self,
                                    Y_AXIS);
       announce_element (Score_element_info (text_p_, text_req_l_));
     }
 
-  if (span_req_l_drul_[STOP])
+  if (accepted_spanreqs_drul_[STOP])
     {
       if (!cresc_p_)
        {
-         span_req_l_drul_[STOP]->warning
+         accepted_spanreqs_drul_[STOP]->warning
            (_ ("can't find start of (de)crescendo"));
        }
       else
        {
          assert (!finished_cresc_p_);
-         cresc_p_->set_bound (RIGHT, get_staff_info ().musical_pcol_l ());
+         cresc_p_->set_bound (RIGHT, unsmob_element (get_property ("currentMusicalColumn")));
          finished_cresc_p_ = cresc_p_;
          cresc_p_ = 0;
-         span_start_req_l_ = 0;
+         current_cresc_req_ = 0;
        }
     }
 
-  if (span_req_l_drul_[START])
+  if (accepted_spanreqs_drul_[START])
     {
-      if (span_start_req_l_)
+      if (current_cresc_req_)
        {
-         span_req_l_drul_[START]->warning
-           (span_start_req_l_->span_dir_ == 1
+         accepted_spanreqs_drul_[START]->warning
+           (current_cresc_req_->span_dir_ == 1
             ?
             _ ("already have a crescendo")
             : _ ("already have a decrescendo"));
        }
       else
        {
-         span_start_req_l_ = span_req_l_drul_[START];
+         current_cresc_req_ = accepted_spanreqs_drul_[START];
          cresc_p_  = new Crescendo (get_property ("basicCrescendoProperties"));
          cresc_p_->set_elt_property
            ("grow-direction",
-            gh_int2scm ((span_req_l_drul_[START]->span_type_str_ == "crescendo")
+            gh_int2scm ((accepted_spanreqs_drul_[START]->span_type_str_ == "crescendo")
                         ? BIGGER : SMALLER));
              
-         SCM s = get_property ((span_req_l_drul_[START]->span_type_str_ + "Text").ch_C());
+         SCM s = get_property ((accepted_spanreqs_drul_[START]->span_type_str_ + "Text").ch_C());
          if (gh_string_p (s))
            {
              cresc_p_->set_elt_property ("start-text", s);
-             daddy_trans_l_->set_property (span_req_l_drul_[START]->span_type_str_
+             daddy_trans_l_->set_property (accepted_spanreqs_drul_[START]->span_type_str_
                                            + "Text", SCM_UNDEFINED);
            }
 
-         s = get_property ((span_req_l_drul_[START]->span_type_str_ + "Spanner").ch_C());
+         s = get_property ((accepted_spanreqs_drul_[START]->span_type_str_ + "Spanner").ch_C());
 
 
          /*
@@ -326,11 +237,11 @@ Dynamic_engraver::do_process_music ()
          if (gh_string_p (s)) //&& ly_scm2string (s) != "hairpin")
            {
              cresc_p_->set_elt_property ("spanner", s);
-             daddy_trans_l_->set_property (span_req_l_drul_[START]->span_type_str_
+             daddy_trans_l_->set_property (accepted_spanreqs_drul_[START]->span_type_str_
                                            + "Spanner", SCM_UNDEFINED);
            }
 
-         cresc_p_->set_bound (LEFT, get_staff_info ().musical_pcol_l ());
+         cresc_p_->set_bound (LEFT, unsmob_element (get_property ("currentMusicalColumn")));
 
 
          /* 
@@ -348,7 +259,7 @@ Dynamic_engraver::do_process_music ()
              it is not a special symbol, like Crescendo.
          */
 
-            
+         
          if (text_p_)
            {
              index_set_cell (cresc_p_->get_elt_property ("dynamic-drul"),
@@ -357,11 +268,12 @@ Dynamic_engraver::do_process_music ()
                index_set_cell (finished_cresc_p_->get_elt_property ("dynamic-drul"),
                                RIGHT, SCM_BOOL_T);
            }
-         pending_element_arr_.push (cresc_p_);
+
+         Axis_group_interface (line_spanner_).add_element (cresc_p_);
          cresc_p_->set_elt_property ("self-alignment-Y", gh_int2scm (0));
          cresc_p_->add_offset_callback
            (Side_position_interface::aligned_on_self, Y_AXIS);
-         announce_element (Score_element_info (cresc_p_, span_req_l_drul_[START]));
+         announce_element (Score_element_info (cresc_p_, accepted_spanreqs_drul_[START]));
        }
     }
 }
@@ -375,19 +287,19 @@ Dynamic_engraver::do_pre_move_processing ()
 void
 Dynamic_engraver::do_removal_processing ()
 {
+  typeset_all ();
+  
   if (cresc_p_)
     {
       typeset_element (cresc_p_ );
-      span_start_req_l_->warning (_ ("unterminated (de)crescendo"));
-      cresc_p_ =0;
+      finished_cresc_p_ = cresc_p_;
+      current_cresc_req_->warning (_ ("unterminated (de)crescendo"));
     }
-  typeset_all ();
   if (line_spanner_)
     {
-      Side_position_interface (line_spanner_).add_staff_support ();
-      typeset_element (line_spanner_);
-      line_spanner_ = 0;
+      finished_line_spanner_ = line_spanner_;
     }
+  typeset_all ();
 }
 
 void
@@ -407,6 +319,18 @@ Dynamic_engraver::typeset_all ()
   if (finished_line_spanner_)
     {
       Side_position_interface (finished_line_spanner_).add_staff_support ();
+
+      if (!finished_line_spanner_->get_bound (LEFT))
+       {
+         Score_element * cmc
+           = unsmob_element (get_property ("currentMusicalColumn"));
+         finished_line_spanner_->set_bound (LEFT, cmc);
+       }
+      if (!finished_line_spanner_->get_bound (RIGHT))
+       finished_line_spanner_->set_bound (RIGHT,
+                                          finished_line_spanner_->get_bound (LEFT));
+      
+      
       typeset_element (finished_line_spanner_);
       finished_line_spanner_ = 0;
     }
@@ -420,11 +344,7 @@ Dynamic_engraver::acknowledge_element (Score_element_info i)
       if (line_spanner_)
        {
          Side_position_interface (line_spanner_).add_support (n);
-         line_spanner_->add_column (n);
-       }
-      else
-       {
-         pending_column_arr_.push (n);
+         add_bound_item (line_spanner_,n);
        }
     }
 }
index f33939c62a80f1127596699aef8cd907588a514e..a3e71087cdf75aeb20ea0820fc25b286db9d48f9 100644 (file)
@@ -68,12 +68,7 @@ Engraver_group_engraver::do_announces()
 }
 
 
-Staff_info
-Engraver_group_engraver::get_staff_info() const
-{
-  Staff_info inf = Engraver::get_staff_info();
-  return inf;
-}
+
 
 
 
index 8ae01f77b6b0e53471d312ee3274665f9298907c..49e8dd82597d414f6228d3eedb3958e087a0dc93 100644 (file)
 #include "score-element.hh"
 #include "group-interface.hh"
 
-void
-Engraver::fill_staff_info (Staff_info&)
-{
-  
-}
 
 void
 Engraver::announce_element (Score_element_info i)
@@ -47,20 +42,6 @@ Engraver::paper_l () const
   return dynamic_cast<Paper_def*>(output_def_l_);
 }
 
-
-Staff_info
-Engraver::get_staff_info() const
-{
-  if (daddy_grav_l())
-    return daddy_grav_l()->get_staff_info();
-  Staff_info info;
-  return info;
-}
-
-
-
-
-
 Engraver_group_engraver*
 Engraver::daddy_grav_l () const
 {
index 8fc391ea0e8de693e8071454485366876c0d59fb..6e9f20a8727bbe8f62c6460ea76cb3b8a4e20701 100644 (file)
@@ -96,7 +96,7 @@ Extender_engraver::do_removal_processing ()
   if (extender_p_)
     {
       req_l_->warning (_ ("unterminated extender"));
-      extender_p_->set_bound(RIGHT, get_staff_info ().command_pcol_l ());
+      extender_p_->set_bound(RIGHT, unsmob_element (get_property ("currentCommandColumn")));
     }
 }
 
index e4467a9e3fe1bb0a6fe6d2af12f18fcdf9362cac..6a6f432ccff08bf7f791ad9d815706ad3f31714c 100644 (file)
@@ -41,8 +41,4 @@ Grace_align_item::member_before_line_breaking ()
 }
 
 
-void
-Grace_align_item::do_add_processing ()
-{
-}
 
index 170d7b0350fb43eb7af6ff1c4bd72ed7881dc555..bbfa5392de8bce06005e1a4f1f0d6611a996b2b4 100644 (file)
@@ -96,7 +96,7 @@ Grace_position_engraver::do_pre_move_processing ()
       Axis_group_interface (last_musical_col_l_).add_element (align_l_);
     }
 
-  last_musical_col_l_ = get_staff_info ().musical_pcol_l ();
+  last_musical_col_l_ = dynamic_cast<Paper_column*>( unsmob_element (get_property ("currentMusicalColumn")));
 }
 
 void
index 62341082df9547a3b3e70dbfc2d8a1d418748df1..204995b4b067e6f674cea8a8a72b029c2612405d 100644 (file)
@@ -89,7 +89,7 @@ Hyphen_engraver::do_removal_processing ()
   if (hyphen_p_)
     {
       req_l_->warning (_ ("unterminated hyphen"));
-      hyphen_p_->set_bound(RIGHT, get_staff_info ().command_pcol_l ());
+      hyphen_p_->set_bound(RIGHT, unsmob_element (get_property ("currentCommandColumn")));
     }
 }
 
index 9fa0e0692dbe365b6b59abf17f0849cb681d8551..d3e6434529c801fa47a37627ce64349c22cb5166 100644 (file)
@@ -25,7 +25,6 @@ public:
   // bool set_interface ();
 };
 
-Directional_element_interface directional_element (Score_element const*);
 
 #endif /* DIRECTIONAL_ELEMENT_HH */
 
diff --git a/lily/include/dynamic-line-interface.hh b/lily/include/dynamic-line-interface.hh
new file mode 100644 (file)
index 0000000..e69de29
index f531ca4508dfa7fc6f7365c9472ab34379576031..dffbfd18ef389d88f712e91202a46e450503b185 100644 (file)
@@ -30,7 +30,6 @@ protected:
 public:
   VIRTUAL_COPY_CONS(Translator);
     
-  virtual Staff_info get_staff_info() const;
   virtual void do_announces();
   virtual void announce_element (Score_element_info);
 };
index 04a73eaf1bff2ed11444d0b8142bb6fa9564a137..2fb91ecbfb01d005e20435ce57924ea7c6d24e2e 100644 (file)
@@ -55,13 +55,6 @@ protected:
     Announce element. Default: pass on to daddy. Utility
     */
   virtual void announce_element (Score_element_info);
-   
-  /**
-    Get information on the staff. Default: ask daddy.
-    */
-  virtual Staff_info get_staff_info() const;
-  virtual void fill_staff_info (Staff_info&);
-
 public:
   VIRTUAL_COPY_CONS(Translator);
   Engraver_group_engraver * daddy_grav_l() const;
diff --git a/lily/include/extender-spanner.hh b/lily/include/extender-spanner.hh
deleted file mode 100644 (file)
index 65296f8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-#error
index 301178afd3481e458d91274afd663c0876bedda2..25764b2256b9fe1f211fdcd920f76b149e3d314c 100644 (file)
@@ -19,7 +19,7 @@ public:
   VIRTUAL_COPY_CONS (Score_element);
   Grace_align_item (SCM);
 
-  virtual void do_add_processing ();
+
   SCM member_before_line_breaking ();
   static SCM before_line_breaking (SCM);
 };
diff --git a/lily/include/hara-kiri-vertical-group-spanner.hh b/lily/include/hara-kiri-vertical-group-spanner.hh
deleted file mode 100644 (file)
index 65296f8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-
-#error
diff --git a/lily/include/key-engraver.hh b/lily/include/key-engraver.hh
deleted file mode 100644 (file)
index 0b1be33..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  key-engraver.hh -- declare Key_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef KEYGRAV_HH
-#define KEYGRAV_HH
-#error
-#endif // KEYGRAV_HH
index 669a301f4a59d747d227c69f9ca24c1ebb940938..70a7e304104b6ab0ace81a352094554204381b86 100644 (file)
@@ -45,7 +45,7 @@ protected:
 
 protected:
   /* Engraver_group_engraver interface */
-  virtual Staff_info get_staff_info() const;
+
   virtual bool do_try_music (Music*);
   virtual void do_creation_processing();
   virtual void do_removal_processing();
index 9fb7f0bed6e5054cacede858a7f752f31f3e91c6..3241e2790858df5840580535db41f4fcc6a9a56e 100644 (file)
@@ -60,4 +60,9 @@ protected:
   virtual void do_break_processing ();
   virtual Line_of_score*line_l () const;
 };
+
+
+void add_bound_item (Spanner*, Item* n);
+
+
 #endif
index d41b391357d0fd2125eb024d67b73cd356d0c873..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,28 +0,0 @@
-/*
-  staff-info.hh -- declare Staff_info
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef STAFF_INFO_HH
-#define STAFF_INFO_HH
-
-#include "lily-proto.hh"
-
-/** struct to pass staff info along a Engraver hierarchy.
-
-    JUNKME.
- */
-struct Staff_info {
-  Paper_column *musical_l_;
-  Paper_column *command_l_;
-
-  Paper_column * command_pcol_l();
-  Paper_column * musical_pcol_l();
-  Staff_info();
-};
-
-#endif // STAFF_INFO_HH
index 202d8ff3287f7c81ad97d9d87ce9d2772e6cdc53..c6e6f7c58dcdc05836325bb70c90dac250f72c9b 100644 (file)
@@ -34,7 +34,8 @@ void
 Line_group_engraver_group::do_removal_processing()
 {
   Engraver_group_engraver::do_removal_processing ();
-  Item *  it = get_staff_info().command_pcol_l ();
+  Score_element *  it
+    = unsmob_element (get_property (ly_symbol2scm ("currentCommandColumn")));
 
   Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_);  
   staffline_p_->set_bound(RIGHT,it);
@@ -46,7 +47,8 @@ void
 Line_group_engraver_group::do_creation_processing()
 {
   create_line_spanner ();
-  Item *  it = get_staff_info().command_pcol_l ();  
+  Score_element *  it
+    = unsmob_element (get_property (ly_symbol2scm ("currentCommandColumn"))); 
   staffline_p_->set_bound(LEFT,it);
   Pointer_group_interface (it, "bounded-by-me").add_element (staffline_p_);
   
index bf8a009f4552bc2af8852edbc6b1fb06d26312db..27dfeebf5c8657f65798a30f8a356609980e990b 100644 (file)
@@ -143,6 +143,7 @@ Multi_measure_rest::member_brew_molecule () const
 void
 Multi_measure_rest::do_add_processing ()
 {
+#if 0
   if (gh_pair_p (get_elt_pointer ("columns")))
     {
       Link_array<Item> column_arr (Pointer_group_interface__extract_elements (this, (Item*)0, "columns"));
@@ -150,7 +151,7 @@ Multi_measure_rest::do_add_processing ()
       set_bound (LEFT, column_arr[0 >? column_arr.size () - 2]);
       set_bound (RIGHT, column_arr.top ());
     }
-
+#endif
   // set columns to SCM_EOL?
 }
   
@@ -174,6 +175,7 @@ Multi_measure_rest::add_column (Item* c)
   Pointer_group_interface gi (this, "columns");
   gi.add_element (c);
 
+  add_bound_item (this, c);
   
   add_dependency (c);
 }
index e9e530f2e84bcc84efe42b9b9f17c0690d57531b..c8933e03969c4f661bd27af6263f0a9b65529ed7 100644 (file)
@@ -200,17 +200,11 @@ Score_engraver::set_columns (Paper_column *new_command_l,
       if (news[i])
        *current[i] = news[i];
     }
-}
-
-Staff_info
-Score_engraver::get_staff_info() const
-{
-  Staff_info inf = Engraver_group_engraver::get_staff_info();
 
-  inf.command_l_ = command_column_l_;
-  inf.musical_l_ = musical_column_l_;
-  
-  return inf;
+  if (new_musical_l)
+    set_property ("currentMusicalColumn", new_musical_l->self_scm_);
+  if (new_command_l)
+    set_property ("currentCommandColumn", new_command_l->self_scm_);  
 }
 
 Music_output*
index 4abc0d3aafa1cfa28e6aa28f97a36efb5ae0c0f7..a46608d0ab18c928013f5706acdde44f98473830 100644 (file)
@@ -25,13 +25,13 @@ Separating_line_group_engraver::do_creation_processing ()
 {
   sep_span_p_ = new Separating_group_spanner (SCM_EOL);
   announce_element (Score_element_info (sep_span_p_, 0));
-  sep_span_p_->set_bound (LEFT, get_staff_info ().command_pcol_l ());
+  sep_span_p_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn")));
 }
 
 void
 Separating_line_group_engraver::do_removal_processing ()
 {
-  sep_span_p_->set_bound (RIGHT, get_staff_info ().command_pcol_l ());
+  sep_span_p_->set_bound (RIGHT, unsmob_element (get_property ("currentCommandColumn")));
   typeset_element (sep_span_p_);
   sep_span_p_ =0;
 }
index 43235b758b9f02e525bfca8cbdc4938e523fbeec..05ff6477eafef83fbbf80becce13cd5acf83393e 100644 (file)
@@ -50,6 +50,8 @@ Slur::add_column (Note_column*n)
       Pointer_group_interface (this, "note-columns").add_element (n);
       add_dependency (n);
     }
+
+  add_bound_item (this, n);
 }
 
 void
@@ -103,6 +105,7 @@ Slur::get_default_dir () const
 void
 Slur::do_add_processing ()
 {
+#if 0
   Link_array<Note_column> encompass_arr =
     Pointer_group_interface__extract_elements (this, (Note_column*)0, "note-columns");
 
@@ -112,6 +115,7 @@ Slur::do_add_processing ()
       if (encompass_arr.size () > 1)
        set_bound (RIGHT, encompass_arr.top ());
     }
+#endif
 }
 
 
@@ -121,7 +125,7 @@ Slur::encompass_offset (Note_column const* col) const
 {
   Offset o;
   Stem* stem_l = col->stem_l ();
-  Direction dir = directional_element (this).get ();
+  Direction dir = Directional_element_interface (this).get ();
   
   if (!stem_l)
     {
@@ -130,7 +134,7 @@ Slur::encompass_offset (Note_column const* col) const
       o[Y_AXIS] = col->extent (Y_AXIS)[dir];
       return o;  
     }
-  Direction stem_dir = directional_element (stem_l).get ();
+  Direction stem_dir = Directional_element_interface (stem_l).get ();
   o[X_AXIS] = stem_l->relative_coordinate (0, X_AXIS);
 
   /*
@@ -203,8 +207,8 @@ ADD_SCM_INIT_FUNC (score_elt, init_score_elts);
 void
 Slur::set_extremities ()
 {
-  if (!directional_element (this).get ())
-    directional_element (this).set (get_default_dir ());
+  if (!Directional_element_interface (this).get ())
+    Directional_element_interface (this).set (get_default_dir ());
 
   Direction dir = LEFT;
   do 
@@ -252,7 +256,7 @@ Slur::get_attachment (Direction dir) const
                Default position is centered in X, on outer side of head Y
               */
              o += Offset (0.5 * n->extent (X_AXIS).length (),
-                          0.5 * ss * directional_element (this).get ());
+                          0.5 * ss * Directional_element_interface (this).get ());
            }
          else if (str == "alongside-stem")
            {
@@ -262,7 +266,7 @@ Slur::get_attachment (Direction dir) const
               */
              o += Offset (n->extent (X_AXIS).length ()
                           * (1 + st->get_direction ()),
-                          0.5 * ss * directional_element (this).get ());
+                          0.5 * ss * Directional_element_interface (this).get ());
            }
          else if (str == "stem")
            {
@@ -289,7 +293,7 @@ Slur::get_attachment (Direction dir) const
          SCM l = scm_assoc
            (scm_listify (a,
                          gh_int2scm (st->get_direction () * dir),
-                         gh_int2scm (directional_element (this).get () * dir),
+                         gh_int2scm (Directional_element_interface (this).get () * dir),
                          SCM_UNDEFINED),
             scm_eval (ly_symbol2scm ("slur-extremity-offset-alist")));
          
@@ -415,7 +419,7 @@ Slur::member_brew_molecule () const
   if (gh_number_p (d))
     a = lookup_l ()->dashed_slur (one, thick, thick * gh_scm2double (d));
   else
-    a = lookup_l ()->slur (one, directional_element (this).get () * thick, thick);
+    a = lookup_l ()->slur (one, Directional_element_interface (this).get () * thick, thick);
 
   return a.create_scheme();
 }
@@ -424,7 +428,7 @@ void
 Slur::set_control_points ()
 {
   Slur_bezier_bow bb (get_encompass_offset_arr (),
-                     directional_element (this).get ());
+                     Directional_element_interface (this).get ());
 
   Real staff_space = Staff_symbol_referencer_interface (this).staff_space ();
   Real h_inf = paper_l ()->get_var ("slur_height_limit_factor") * staff_space;
@@ -471,8 +475,7 @@ Slur::get_curve () const
   Bezier b;
   int i = 0;
 
-  // URGURG?
-  if (!directional_element (this).get ()
+  if (!Directional_element_interface (this).get ()
       || ! gh_symbol_p (index_cell (get_elt_property ("attachment"), LEFT)))
     ((Slur*)this)->set_extremities ();
   
@@ -487,7 +490,7 @@ Slur::get_curve () const
     }
   
   Array<Offset> enc (get_encompass_offset_arr ());
-  Direction dir = directional_element (this).get ();
+  Direction dir = Directional_element_interface (this).get ();
   
   Real x1 = enc[0][X_AXIS];
   Real x2 = enc.top ()[X_AXIS];
index 8146b7267678e57d4d3c62e8199d18d5314076c2..0f26e7ca16c17c2949835f847d1afb113f2e4a2f 100644 (file)
@@ -35,15 +35,14 @@ void
 Spacing_engraver::do_creation_processing ()
 {
   spacing_p_  =new Spacing_spanner (SCM_EOL);
-  spacing_p_->set_bound (LEFT, get_staff_info ().command_pcol_l ());  
+  spacing_p_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn")));  
   announce_element (Score_element_info (spacing_p_, 0));
 }
 
 void
 Spacing_engraver::do_removal_processing ()
 {
-  Paper_column * p = get_staff_info ().command_pcol_l ();
-
+  Score_element * p = unsmob_element (get_property ("currentCommandColumn"));
   spacing_p_->set_bound (RIGHT, p);
   typeset_element (spacing_p_);
   spacing_p_ =0;
@@ -95,7 +94,7 @@ Spacing_engraver::do_pre_move_processing ()
   shortest_playing = shortest_playing <? starter;
   
   Paper_column * sc
-    = dynamic_cast<Paper_column*> (get_staff_info ().musical_pcol_l ());
+    = dynamic_cast<Paper_column*> (unsmob_element (get_property ("currentMusicalColumn")));
 
   SCM sh = smobify (new Moment (shortest_playing));
   SCM st = smobify (new Moment (starter));
index 711eaddf41d3f19d3d02d2a71bec4ebfc0ce866f..806365bc8edf7cd77102ac618e9948f9018e13fa 100644 (file)
@@ -30,12 +30,6 @@ Spanner::do_break_processing ()
   if (!left || !right)
     return;
   
-  if  (left == right)
-    {
-      warning (_f ("Spanner `%s' has equal left and right spanpoints",
-                  classname (this)));
-    }
-
   /*
     Check if our parent in X-direction spans equally wide
     or wider than we do.
@@ -175,11 +169,6 @@ Spanner::set_bound(Direction d, Score_element*s)
     {
       set_parent (i, X_AXIS);
     }
-  
-  if (spanned_drul_[Direction(-d)] == spanned_drul_[d]
-       && i)
-    warning (_f ("Spanner `%s' has equal left and right spanpoints",
-                classname (this)));
 }
 
 
@@ -314,3 +303,11 @@ Spanner::do_derived_mark ()
   while (flip (&d) != LEFT);
 }
 
+void
+add_bound_item (Spanner* sp, Item*it)
+{
+  if (!sp->get_bound (LEFT))
+    sp->set_bound (LEFT, it);
+  else
+    sp->set_bound (RIGHT, it);
+}
index 10b63d8645ba66657db5e525767c5557302d698d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,32 +0,0 @@
-/*
-  staff-info.cc -- implement Staff_info
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "proto.hh"
-
-#include "staff-info.hh"
-#include "paper-column.hh"
-
-Staff_info::Staff_info()
-{
-  command_l_ =0;
-  musical_l_ =0;
-}
-
-
-Paper_column*
-Staff_info::command_pcol_l()
-{
-  return command_l_;
-}
-
-Paper_column*
-Staff_info::musical_pcol_l()
-{
-  return musical_l_;
-}
-
index e5bc48cd622a82126bd16bcbd6be411fdcb2fe08..6440a5941436b863de259e868c27321f87c6111c 100644 (file)
@@ -47,7 +47,7 @@ void
 Staff_symbol_engraver::do_creation_processing()
 {
   span_p_ = new Staff_symbol (get_property ("staffSymbolBasicProperties"));
-  span_p_->set_bound(LEFT,get_staff_info().command_pcol_l ());
+  span_p_->set_bound(LEFT,unsmob_element (get_property ("currentCommandColumn")));
 
   announce_element (Score_element_info (span_p_, 0));
 }
@@ -63,7 +63,7 @@ Staff_symbol_engraver::do_removal_processing()
   if (gh_number_p (n))
     span_p_->set_elt_property ("line-count", n);
 
-  span_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ());
+  span_p_->set_bound(RIGHT,unsmob_element (get_property ("currentCommandColumn")));
   typeset_element (span_p_);
   span_p_ =0;
 }
index a209a04a633e9d0e44ada2c213e802c58139faf1..0d26fcd52a52604f4db37607d9e9b9f21a673b9c 100644 (file)
@@ -105,7 +105,7 @@ Stem_tremolo::member_brew_molecule () const
       int beams_i = stem->beam_count(RIGHT) >? stem->beam_count (LEFT);
       mol.translate (Offset(stem->relative_coordinate (0, X_AXIS) - relative_coordinate (0, X_AXIS),
                            stem->stem_end_position () * ss / 2 - 
-                           directional_element (beam).get () * beams_i * interbeam_f));
+                           Directional_element_interface (beam).get () * beams_i * interbeam_f));
     }
   else
     {  
index e1b53608c82bf03420f1756dc4bc643e4319a36c..ab18bcd9b1167eeab7b9e7156628bac05c466893 100644 (file)
@@ -95,14 +95,14 @@ Stem::stem_end_position () const
 Direction
 Stem::get_direction () const
 {
-  Direction d = directional_element (this).get ();
+  Direction d = Directional_element_interface (this).get ();
 
   if (!d)
     {
        Stem * me = (Stem*) this;
        d = get_default_dir ();
        // urg, AAARGH!
-       directional_element (me).set (d);
+       Directional_element_interface (me).set (d);
     }
   return d ;
 }
@@ -301,7 +301,7 @@ Stem::get_default_stem_end_position () const
   if (!dir)
     {
       dir = get_default_dir ();
-      directional_element (this).set (dir);
+      Directional_element_interface (this).set (dir);
     }
   
   /* 
@@ -533,7 +533,7 @@ Stem::calc_stem_info () const
 {
   assert (beam_l ());
 
-  Direction beam_dir = directional_element (beam_l ()).get ();
+  Direction beam_dir = Directional_element_interface (beam_l ()).get ();
   if (!beam_dir)
     {
       programming_error ("Beam dir not set.");
@@ -575,7 +575,7 @@ Stem::calc_stem_info () const
 
   Real stem_length =  a[multiplicity <? (a.size () - 1)] * staff_space;
 
-  if (!beam_dir || (beam_dir == directional_element (this).get ()))
+  if (!beam_dir || (beam_dir == Directional_element_interface (this).get ()))
     /* normal beamed stem */
     {
       if (multiplicity)
index 4841e19a48c914951e11e4e90daacbb1101b1231..10efe0c7d8a046885ca98c8fd6e12cbe9e196d9e 100644 (file)
@@ -65,7 +65,7 @@ void
 System_start_delimiter_engraver::do_creation_processing()
 {
   delim_ = new System_start_delimiter (get_property ("basicSystemStartDelimiterProperties"));
-  delim_->set_bound (LEFT, get_staff_info ().command_pcol_l ());
+  delim_->set_bound (LEFT, unsmob_element (get_property ("currentCommandColumn")));
 
   /*
     You can't override the glyph using \property, you must do it in
@@ -88,7 +88,7 @@ System_start_delimiter_engraver::do_removal_processing ()
   if (gh_number_p (collapse))
     delim_->set_elt_property ("collapse-height", collapse);
       
-  delim_->set_bound (RIGHT, get_staff_info ().command_pcol_l ());
+  delim_->set_bound (RIGHT, unsmob_element (get_property ("currentCommandColumn")));
   typeset_element (delim_);
 }
 
index 08e242bb6180db35b2852b196d56b6e9b07fe608..a1910eeabc4c69e7426a5c1cfb11b3102527377c 100644 (file)
@@ -55,37 +55,45 @@ tie_compare (Tie* const & s1,
 void
 Tie_column::set_directions ()
 {
-  Link_array<Tie> s =
+  Link_array<Tie> ties =
     Pointer_group_interface__extract_elements (this, (Tie*)0, "ties");
 
 
-  Direction d = directional_element (this).get ();
+  Direction d = Directional_element_interface (this).get ();
 
   if (d)
     {
-      for (int i = s.size (); i--;)
-       directional_element (s[i]).set (d);
+      for (int i = ties.size (); i--;)
+       {
+         Tie * t = ties[i];
+         Directional_element_interface (t).set (d);
+       }
       return;
     }
   
-  if (s.size () == 1)
+  if (ties.size () == 1)
     {
-      directional_element (s[0]).set (s[0]->get_default_dir ());
+      Tie * t = ties[0];      
+      Directional_element_interface (t).set (t->get_default_dir ());
       return;
     }
   
-  s.sort (tie_compare);
-  directional_element (s[0]).set (DOWN);
-  s.del (0);
-  directional_element (s.pop ()).set (UP);
+  ties.sort (tie_compare);
+  Directional_element_interface tie0(ties[0]);
+  tie0.set (DOWN);
+  ties.del (0);
+  
+  Directional_element_interface tietop(ties.pop ());
+  tietop.set (UP);
 
-  for (int i=s.size(); i--; )
+  for (int i=ties.size(); i--; )
     {
-      Real p = s[i]->position_f ();
+      Tie * t = ties[i];
+      Real p = t->position_f ();
       Direction d = (Direction) sign (p);
       if (!d)
        d = UP;
-      directional_element (s[i]).set (d);
+      Directional_element_interface (t).set (d);
     }
   
 }
index ed3d2be69b4e4cc189473831caa193496502680c..02dd922b2daa39e73e5835a0d7849b01fe22b9d9 100644 (file)
@@ -66,13 +66,17 @@ Tie::get_default_dir () const
   Stem * sl =  head(LEFT) ? head (LEFT)->stem_l () :0;
   Stem * sr =  head(RIGHT) ? head (RIGHT)->stem_l () :0;  
 
-  if (sl && directional_element (sl).get () == UP
-      && sr && directional_element (sr).get () == UP)
+  if (sl && Directional_element_interface (sl).get () == UP
+      && sr && Directional_element_interface (sr).get () == UP)
     return DOWN;
   else
     return UP;
 }
 
+/*
+  fixme  must  use spanned drul from heads elt property
+ */
+
 void
 Tie::do_add_processing()
 {
@@ -103,8 +107,8 @@ Tie::member_after_line_breaking ()
       return SCM_UNDEFINED;
     }
 
-  if (!directional_element (this).get ())
-    directional_element (this).set (get_default_dir ());
+  if (!Directional_element_interface (this).get ())
+    Directional_element_interface (this).set (get_default_dir ());
   
   Real staff_space = staff_symbol_referencer (this).staff_space ();
   Real half_space = staff_space / 2;
@@ -154,7 +158,7 @@ Tie::member_after_line_breaking ()
   int ypos_i = int (ypos);
  
   Real dx_f = extent (X_AXIS).length () + dx_f_drul_[RIGHT] - dx_f_drul_[LEFT];
-  Direction dir = directional_element (this).get();
+  Direction dir = Directional_element_interface (this).get();
   if (dx_f < paper_l ()->get_var ("tie_staffspace_length"))
     {
       if (abs (ypos_i) % 2)
@@ -203,7 +207,7 @@ Tie::member_brew_molecule () const
   if (gh_number_p (d))
     a = lookup_l ()->dashed_slur (one, thick, gh_scm2int (d));
   else
-    a = lookup_l ()->slur (one, directional_element (this).get () * thick, thick);
+    a = lookup_l ()->slur (one, Directional_element_interface (this).get () * thick, thick);
   
   return a.create_scheme(); 
 }
@@ -213,7 +217,7 @@ Tie::member_brew_molecule () const
 Bezier
 Tie::get_curve () const
 {
-  Direction d (directional_element (this).get ());
+  Direction d (Directional_element_interface (this).get ());
   Bezier_bow b (get_encompass_offset_arr (), d);
 
   Real staff_space = staff_symbol_referencer (this).staff_space ();
index 5779209b150b1400c125ce706238c58829a9ae48..0f9badfc34e5f97723c4d9173c212988219409e6 100644 (file)
@@ -73,7 +73,7 @@ Tuplet_spanner::member_brew_molecule () const
 
 
       Real staff_space = paper_l ()->get_var ("interline");
-      Direction dir = directional_element (this).get ();
+      Direction dir = Directional_element_interface (this).get ();
       Real dy = gh_scm2double (get_elt_property ("delta-y"));
       SCM number = get_elt_property ("text");
       if (gh_string_p (number) && number_visibility)
@@ -118,6 +118,7 @@ Tuplet_spanner::member_brew_molecule () const
 void
 Tuplet_spanner::do_add_processing ()
 {
+#if 0
   if (gh_pair_p (get_elt_pointer ("columns")))
     {
       Link_array<Note_column> column_arr=
@@ -126,6 +127,7 @@ Tuplet_spanner::do_add_processing ()
       set_bound (LEFT, column_arr[0]);
       set_bound (RIGHT, column_arr.top ());  
     }
+#endif
 }
 
 
@@ -142,7 +144,7 @@ Tuplet_spanner::calc_position_and_height (Real *offset, Real * dy) const
 
   Score_element * common = common_refpoint (get_elt_pointer ("columns"), Y_AXIS);
   
-  Direction d = directional_element (this).get ();
+  Direction d = Directional_element_interface (this).get ();
 
   /*
     Use outer non-rest columns to determine slope
@@ -197,7 +199,7 @@ Tuplet_spanner::calc_dy (Real * dy) const
     Pointer_group_interface__extract_elements (this, (Note_column*)0, "columns");
 
  
-  Direction d = directional_element (this).get ();
+  Direction d = Directional_element_interface (this).get ();
   *dy = column_arr.top ()->extent (Y_AXIS) [d]
     - column_arr[0]->extent (Y_AXIS) [d];
 }
@@ -215,11 +217,11 @@ Tuplet_spanner::member_after_line_breaking ()
       return SCM_UNDEFINED;
     }
 
-  Direction d = directional_element (this).get ();
+  Direction d = Directional_element_interface (this).get ();
   if (!d)
     {
       d = get_default_dir ();
-      directional_element (this).set (d);
+      Directional_element_interface (this).set (d);
 
     }
   Real dy, offset;
@@ -286,6 +288,8 @@ Tuplet_spanner::add_column (Note_column*n)
   gi.add_element (n);
 
   add_dependency (n);
+
+  add_bound_item (this, n);
 }
 
 
index 0a9c31929462fc8a5f3c3f92ad8e206e989a1c84..261c7956d7584dc607bb2959277ddd3532f54e34 100644 (file)
@@ -43,7 +43,7 @@ Vertical_align_engraver::do_creation_processing()
   valign_p_->set_elt_property ("stacking-dir",
                               gh_int2scm (DOWN));
   
-  valign_p_->set_bound(LEFT,get_staff_info().command_pcol_l ());
+  valign_p_->set_bound(LEFT,unsmob_element (get_property ("currentCommandColumn")));
   announce_element (Score_element_info (valign_p_ , 0));
 }
 
@@ -61,7 +61,7 @@ Vertical_align_engraver::do_removal_processing()
     valign_p_->set_elt_property ("threshold",
                                 gh_cons (min,max));
   }
-  valign_p_->set_bound(RIGHT,get_staff_info().command_pcol_l ());
+  valign_p_->set_bound(RIGHT,unsmob_element (get_property ("currentCommandColumn")));
   typeset_element (valign_p_);
   valign_p_ =0;
 }
index cb9400bbca44716b491eb1d7d45ca4b9f91b18a1..bf7eb05c05dc22dce7cf3469c66352146d132cf1 100644 (file)
@@ -27,7 +27,7 @@ Volta_spanner::Volta_spanner (SCM s)
 {
   set_elt_pointer ("bars", SCM_EOL);
   Side_position_interface (this).set_axis (Y_AXIS);
-  directional_element (this).set (UP);
+  Directional_element_interface (this).set (UP);
 }
 
 
@@ -46,13 +46,12 @@ GLUE_SCORE_ELEMENT(Volta_spanner,brew_molecule);
 SCM
 Volta_spanner::member_brew_molecule () const
 {
-  Molecule  mol;
-
+  
   Link_array<Bar> bar_arr
     = Pointer_group_interface__extract_elements (this, (Bar*)0, "bars");
 
   if (!bar_arr.size ())
-    return mol.create_scheme();
+    return SCM_EOL;
 
   bool no_vertical_start = false;
   bool no_vertical_end = to_boolean (get_elt_property ("last-volta"));
@@ -70,10 +69,8 @@ Volta_spanner::member_brew_molecule () const
 
   Real staff_space = paper_l ()->get_var ("interline");
   Real half_space = staff_space / 2;
-
-  Real w = spanner_length ()
-  - get_broken_left_end_align ()
-    - half_space;
+  Real left = get_broken_left_end_align ();
+  Real w = spanner_length () - left - half_space;
   Real h = paper_l()->get_var ("volta_spanner_height");
   Real t = paper_l ()->get_var ("volta_thick");
 
@@ -86,21 +83,21 @@ Volta_spanner::member_brew_molecule () const
                     SCM_UNDEFINED));
 
   Box b (Interval (0, w), Interval (0, h));
-  Molecule volta (b, at);
-  mol.add_molecule (volta);
-  
+  Molecule  mol (b, at);
   Molecule num (lookup_l ()->text ("volta",
                                   ly_scm2string (get_elt_property("text")),
                                   paper_l ()));
 
   mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
                   - staff_space);
+  mol.translate_axis (left, X_AXIS);
   return mol.create_scheme();
 }
   
 void
 Volta_spanner::do_add_processing ()
 {
+#if 0
   Link_array<Bar> bar_arr
     = Pointer_group_interface__extract_elements (this, (Bar*)0, "bars");
 
@@ -109,6 +106,7 @@ Volta_spanner::do_add_processing ()
       set_bound (LEFT, bar_arr[0]);
       set_bound (RIGHT, bar_arr.top ());  
     }
+#endif
 }
 
 GLUE_SCORE_ELEMENT(Volta_spanner,after_line_breaking);
@@ -127,6 +125,8 @@ Volta_spanner::add_bar  (Bar* b)
 
   Side_position_interface (this).add_support (b);
   add_dependency (b);
+
+  add_bound_item (this, b); 
 }
 
 void
index bb2152aa10a18e17c35e723bb6167f6068a65646..079ebe69e9a8da60c843fa636a64e89105de16c5 100644 (file)
@@ -470,17 +470,19 @@ ScoreContext = \translator {
                (dot-count . 1) 
        )
        basicDynamicLineSpannerProperties = #`(
-
+               (dynamic-interface . #t)
+               (axes . ( 1))
        )
        basicDynamicTextProperties       = # `(
                (style . "dynamic")
+               (dynamic-interface . #t)
                (molecule-callback . ,Text_item::brew_molecule)
                (script-priority . 100)
                (self-alignment-Y . 0)
        )
        leftEdgeBasicProperties = #`(
-         (break-align-symbol . Left_edge_item)
-         (breakable . #t)
+               (break-align-symbol . Left_edge_item)
+               (breakable . #t)
        )
        basicGraceAlignItemProperties = #`(
                (axes . (0))
index 10f97e1f0ffcc93358345253a5c325789dc47db9..87363e72cd36672c56df39cb9279d8f6eb132d8a 100644 (file)
@@ -1,6 +1,6 @@
 Begin3
 Title: LilyPond
-Version: 1.3.64
+Version: 1.3.65
 Entered-date: 26JUN00
 Description: 
 Keywords: music notation typesetting midi fonts engraving
@@ -8,8 +8,8 @@ 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.64.tar.gz 
+       1000k lilypond-1.3.65.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.64.tar.gz 
+       1000k lilypond-1.3.65.tar.gz 
 Copying-policy: GPL
 End
index a504ef1ab66e98f857b0c66a4a644fd5871ec16d..ecfa2003dfe739fb433266a0eaded6a55adf2b4b 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.3.64
+Version: 1.3.65
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.64.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.65.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif