]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.67 release/1.3.67
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 30 Jun 2000 10:49:35 +0000 (12:49 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 30 Jun 2000 10:49:35 +0000 (12:49 +0200)
===========

* Use callbacks for augmentation dot positioning.

* Removed types Note_head and Rest

* Cleanup of slur.cc: use common reference points in a sane manner.

1.3

59 files changed:
CHANGES
VERSION
lily/auto-beam-engraver.cc
lily/beam-engraver.cc
lily/breathing-sign-engraver.cc
lily/breathing-sign.cc
lily/chord-tremolo-engraver.cc
lily/clef-engraver.cc
lily/collision.cc
lily/dot-column.cc
lily/dots.cc
lily/dynamic-engraver.cc
lily/grace-position-engraver.cc
lily/include/breathing-sign-engraver.hh [deleted file]
lily/include/dot-column.hh
lily/include/dots.hh
lily/include/multi-measure-rest.hh
lily/include/note-column.hh
lily/include/note-head.hh
lily/include/note-heads-engraver.hh [deleted file]
lily/include/rest-engraver.hh [deleted file]
lily/include/rest.hh
lily/include/rhythmic-head.hh
lily/include/slur.hh
lily/include/staff-symbol-referencer.hh
lily/include/stem.hh
lily/include/tie.hh
lily/include/tuplet-spanner.hh
lily/include/volta-spanner.hh
lily/line-number-engraver.cc
lily/local-key-engraver.cc
lily/local-key-item.cc
lily/multi-measure-rest.cc
lily/note-column.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/piano-pedal-engraver.cc
lily/pitch-squash-engraver.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/rhythmic-column-engraver.cc
lily/rhythmic-head.cc
lily/score-element.cc
lily/slur.cc
lily/staff-symbol-referencer.cc
lily/stem-engraver.cc
lily/stem.cc
lily/text-engraver.cc
lily/text-item.cc
lily/tie-column.cc
lily/tie-engraver.cc
lily/tie.cc
lily/tuplet-spanner.cc
lily/volta-spanner.cc
ly/engraver.ly
make/out/lilypond.lsm
make/out/lilypond.spec
scm/slur.scm

diff --git a/CHANGES b/CHANGES
index 8fa5208be214475d53fc96b0f8205415d058f8a3..f14c1d313c772d4ca595b6e24beace9e4b4118e8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,16 @@
-1.3.65.mb1
-==========
+1.3.66.hwn1
+===========
+
+* Use callbacks for augmentation dot positioning.
 
-* Corrected text sizes in paper*.ly
+* Removed types Note_head and Rest
+
+* Cleanup of slur.cc: use common reference points in a sane manner.
+
+1.3.66
+======
 
+* Corrected text sizes in paper*.ly (Mats Bengtsson)
 
 1.3.65.uu1
 ==========
diff --git a/VERSION b/VERSION
index 4e0c3d5167a16ede8460e00acd6c82b744c9df3c..7f7efbb39e5111c25dbabb1e85fec6e9e70dd5dd 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=66
+PATCH_LEVEL=67
 MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
index 7e939e7c8e4ce4976b744087ec5f56558628bab7..1d88248b40a21fe50a316334860607a5612d5f30 100644 (file)
@@ -314,7 +314,7 @@ Auto_beam_engraver::acknowledge_element (Score_element_info info)
        {
          end_beam ();
        }
-      else if (Rest* rest_l = dynamic_cast<Rest *> (info.elem_l_))
+      else if (to_boolean (info.elem_l_->get_elt_property ("rest-interface")))
        {
          end_beam ();
        }
index c037c00923be70e8c641466f7b2595db769b69de..61fbd4997e8e514136c1246d7c25312f97886261 100644 (file)
@@ -183,16 +183,16 @@ Beam_engraver::acknowledge_element (Score_element_info info)
 {
   if (beam_p_)
     {
-      if (Rest* r = dynamic_cast<Rest* > (info.elem_l_))
+      if (to_boolean (info.elem_l_->get_elt_property("rest-interface")))
        {
-         r->add_offset_callback (Beam::rest_collision_callback, Y_AXIS);
+         info.elem_l_->add_offset_callback (Beam::rest_collision_callback, Y_AXIS);
        }
-      else if (Stem* stem_l = dynamic_cast<Stem *> (info.elem_l_))
+      else if (to_boolean (info.elem_l_->get_elt_property ("stem-interface")))
        {
+         Stem *stem_l = dynamic_cast<Stem*> (info.elem_l_);
          if (stem_l->beam_l ())
            return;
 
-
          bool stem_grace = stem_l->get_elt_property ("grace") == SCM_BOOL_T;
 
          SCM wg =get_property ("weAreGraceContext");
index f72e5b2b9716a68f6d2c6e92c31296bea76a7011..151fbbff79a917432a22d905880da57d64aa2797 100644 (file)
@@ -14,14 +14,30 @@ TODO:
 */
 
 #include "staff-symbol-referencer.hh"
-#include "breathing-sign-engraver.hh"
 #include "breathing-sign.hh"
 #include "musical-request.hh"
 #include "command-request.hh"
 #include "engraver-group-engraver.hh"
-#include "note-head.hh"
 #include "local-key-item.hh"
+#include "engraver.hh"
+#include "command-request.hh"
+
+class Breathing_sign_engraver : public Engraver {
+public:
+  Breathing_sign_engraver();
+  VIRTUAL_COPY_CONS(Translator);
+  
+protected:
+  virtual bool do_try_music (Music *req_l);
+  virtual void do_process_music();
+
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
 
+private:
+  Breathing_sign_req * breathing_sign_req_l_;
+  Breathing_sign * breathing_sign_p_;
+};
 
 Breathing_sign_engraver::Breathing_sign_engraver()
 {
index c8a7a0c1a2f14db0065b734d9997c14c525fbd0c..cc743c5a28be79faf0d74f243bc12c716c18c650 100644 (file)
@@ -49,7 +49,7 @@ GLUE_SCORE_ELEMENT(Breathing_sign,after_line_breaking);
 SCM
 Breathing_sign::member_after_line_breaking ()
 {
-  Real space = staff_symbol_referencer (this).staff_space();
+  Real space = Staff_symbol_referencer_interface (this).staff_space();
   Direction d = Directional_element_interface (this). get ();
   if (!d)
     {
index 5ab38f6f853025be68c40af6dc1c1282e7f1617a..3445d1277e27a466fd0ee789419bec1ea80d8b23 100644 (file)
@@ -11,7 +11,7 @@
 #include "beam.hh"
 #include "repeated-music.hh"
 #include "stem.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "engraver-group-engraver.hh"
 #include "musical-request.hh"
 #include "warn.hh"
@@ -171,9 +171,9 @@ Chord_tremolo_engraver::acknowledge_element (Score_element_info info)
                ::warning (s);
            }
        }
-      if (Note_head *nh = dynamic_cast<Note_head*> (info.elem_l_))
+      if (to_boolean (info.elem_l_->get_elt_property ("note-head-interface")))
        {
-         nh->set_elt_property ("duration-log", gh_int2scm (intlog2 (note_head_i_)));
+         info.elem_l_->set_elt_property ("duration-log", gh_int2scm (intlog2 (note_head_i_)));
        }
     }
 }
index 616e4c55f6d8353c9d2b14731437ef9f2400d3bb..def1a6262200431376c7c954fb1d1ea41d993712 100644 (file)
@@ -16,7 +16,7 @@
 #include "debug.hh"
 #include "command-request.hh"
 #include "timing-translator.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "key-item.hh"
 #include "local-key-item.hh"
 #include "array.hh"
@@ -133,7 +133,7 @@ Clef_engraver::acknowledge_element (Score_element_info info)
   Item * it_l =dynamic_cast <Item *> (info.elem_l_);
   if (it_l)
     {
-      if (dynamic_cast<Note_head*>(it_l)
+      if (to_boolean (it_l->get_elt_property("note-head-interface"))
          || dynamic_cast<Local_key_item*> (it_l))
        {
          Staff_symbol_referencer_interface si (it_l);
index 01cb443dd5f98346cff51a25300d94e213b33e53..9cedc344799fd404ccfa8c23f0ec0c5ecb910677 100644 (file)
@@ -8,7 +8,7 @@
 #include "debug.hh"
 #include "collision.hh"
 #include "note-column.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "paper-def.hh"
 #include "axis-group-interface.hh"
 #include "item.hh"
@@ -164,8 +164,8 @@ Collision::automatic_shift (Score_element *me)
       /*
        TODO.
        */
-      Note_head * nu_l= cu_l->first_head();
-      Note_head * nd_l = cd_l->first_head();
+      Rhythmic_head * nu_l= cu_l->first_head();
+      Rhythmic_head * nd_l = cd_l->first_head();
       
       int downpos = Note_column::head_positions_interval (cd_l)[BIGGER];
       int uppos = Note_column::head_positions_interval (cu_l)[SMALLER];      
index ce660a24a287549ae3550f090d78dd96468d3b8c..a725998bcfc69462404eeaef29d9addd9a95bf88 100644 (file)
 #include "axis-group-interface.hh"
 
 
-// todo: dots and elements duplicate each other.
-void
-Dot_column::add_dots (Item *d)
-{
-  Pointer_group_interface gi (this, "dots");
-  gi.add_element (d);
-
-  add_dependency (d);
-  Axis_group_interface (this).add_element (d);
-}
 
 void
 Dot_column::add_head (Rhythmic_head *r)
@@ -34,12 +24,20 @@ Dot_column::add_head (Rhythmic_head *r)
     return ;
 
   Side_position_interface (this).add_support (r);
-  add_dots (r->dots_l ());
+  Item * d = r->dots_l ();
+  if (d)
+    {
+      Pointer_group_interface gi (this, "dots");
+      gi.add_element (d);
+      
+      d->add_offset_callback (force_shift_callback , Y_AXIS);
+      Axis_group_interface (this).add_element (d);
+    }
 }
 
 
 int
-Dot_column::compare (Item * const &d1, Item * const &d2)
+Dot_column::compare (Score_element * const &d1, Score_element * const &d2)
 {
   Staff_symbol_referencer_interface s1(d1);
   Staff_symbol_referencer_interface s2(d2);  
@@ -51,8 +49,7 @@ Dot_column::compare (Item * const &d1, Item * const &d2)
 Dot_column::Dot_column (SCM s)
   : Item (s)
 {
-  Pointer_group_interface gi (this, "dots");
-  gi.set_interface ();
+  this->set_elt_pointer  ("dots", SCM_EOL);
   Directional_element_interface (this).set (RIGHT);
   
   Axis_group_interface (this).set_interface ();
@@ -75,11 +72,27 @@ Dot_column::Dot_column (SCM s)
    Should be smarter.
  */
 
-GLUE_SCORE_ELEMENT(Dot_column,after_line_breaking);
+
+Real
+Dot_column::force_shift_callback (Score_element const * dot, Axis a)
+{
+  assert (a == Y_AXIS);
+  Score_element * me = dot->parent_l (X_AXIS);
+  SCM dots = me->get_elt_pointer ("dots");
+  do_shifts (dots);
+  return 0.0;
+}
+
 SCM
-Dot_column::member_after_line_breaking ()
+Dot_column::do_shifts (SCM l)
 {
-  Link_array<Item> dots = Pointer_group_interface__extract_elements (this, (Item*)0 , "dots"); 
+  Link_array<Score_element> dots;
+  while (gh_pair_p (l))
+    {
+      dots.push (unsmob_element (gh_car (l)));
+      l = gh_cdr (l);
+    }
+  
   dots.sort (Dot_column::compare);
   
   if (dots.size () < 2)
@@ -103,8 +116,7 @@ Dot_column::member_after_line_breaking ()
     }
 
   if (!conflicts)
-  return SCM_UNDEFINED;
-
+    return SCM_UNDEFINED;
   
   int  middle = s.center ();
   /*
@@ -116,7 +128,8 @@ Dot_column::member_after_line_breaking ()
 
   for (int i=0; i < dots.size (); pos += 2, i++)
     {
-      staff_symbol_referencer (dots[i]).set_position(pos);
+      Score_element * d = dots[i];
+      Staff_symbol_referencer_interface (d).set_position(pos);
     }
 
   return SCM_UNDEFINED;
index ccd29ae3b61a04843be48771f2eb31a665dac3d3..6a037d9f803d83504700db58d2871e042e0a14f8 100644 (file)
 #include "staff-symbol-referencer.hh"
 #include "directional-element-interface.hh"
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Dots,after_line_breaking);
 
-SCM
-Dots::after_line_breaking (SCM smob)
+Real
+Dots::quantised_position_callback (Score_element const* me, Axis a)
 {
-  Item * p = dynamic_cast<Item*> (unsmob_element (smob));
-  
-  SCM d= p->get_elt_property ("dot-count");
+  assert (a == Y_AXIS);
+    
+  SCM d= me->get_elt_property ("dot-count");
   if (gh_number_p (d) && gh_scm2int (d))
     {
-      if (!Directional_element_interface (p).get ())
-       Directional_element_interface (p).set (UP);
+      if (!Directional_element_interface (me).get ())
+       Directional_element_interface (me).set (UP);
 
-      Staff_symbol_referencer_interface si (p);
+      Staff_symbol_referencer_interface si (me);
       int pos = int (si.position_f ());
       if (!(pos % 2))
-       si.set_position (pos  + Directional_element_interface (p).get ());
+       return si.staff_space () / 2.0 * Directional_element_interface (me).get ();
     }
 
-  return SCM_UNDEFINED;
+  return  0.0;
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Dots,brew_molecule);
 
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Dots,brew_molecule);
 SCM  
 Dots::brew_molecule (SCM d)
 {
index 739f03f7ebcd57870c948bbb499ca327454fe754..8224b1f6f6939f39d2691f2c9764fd4b213ea6d9 100644 (file)
@@ -19,7 +19,7 @@
 #include "side-position-interface.hh"
 #include "engraver.hh"
 #include "stem.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "group-interface.hh"
 #include "directional-element-interface.hh"
 #include "staff-symbol-referencer.hh"
index bbfa5392de8bce06005e1a4f1f0d6611a996b2b4..bdf58af7e8eca864923b783e016450e6f9e9235a 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "engraver.hh"
 #include "grace-align-item.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "local-key-item.hh"
 #include "paper-column.hh"
 #include "dimension-cache.hh"
@@ -46,10 +46,10 @@ Grace_position_engraver::acknowledge_element (Score_element_info i)
     {
       align_l_ = g;
     }
-  else if (Note_head * n = dynamic_cast <Note_head*> (i.elem_l_))
+  else if (to_boolean (i.elem_l_->get_elt_property ("note-head-interface")))
     {
-      if (!to_boolean (n->get_elt_property ("grace")))
-       support_.push (n);
+      if (!to_boolean (i.elem_l_->get_elt_property ("grace")))
+       support_.push (dynamic_cast<Item*> (i.elem_l_));
     }
   else if (Local_key_item*it = dynamic_cast<Local_key_item*>(i.elem_l_))
     {
diff --git a/lily/include/breathing-sign-engraver.hh b/lily/include/breathing-sign-engraver.hh
deleted file mode 100644 (file)
index ef0fa89..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-  breathing-sign-engraver.hh -- declare Breathing_Sign_engraver
-
-  Copyright (C) 1999 Michael Krause
-
-  written for the GNU LilyPond music typesetter
-
-*/
-
-#ifndef BREATHING_SIGN_ENGRAVER_HH
-#define BREATHING_SIGN_ENGRAVER_HH
-
-#include "engraver.hh"
-#include "command-request.hh"
-#include "breathing-sign.hh"
-
-class Breathing_sign_engraver : public Engraver {
-public:
-  Breathing_sign_engraver();
-  VIRTUAL_COPY_CONS(Translator);
-  
-protected:
-  virtual bool do_try_music (Music *req_l);
-  virtual void do_process_music();
-
-  virtual void do_pre_move_processing();
-  virtual void do_post_move_processing();
-
-private:
-  Breathing_sign_req * breathing_sign_req_l_;
-  Breathing_sign * breathing_sign_p_;
-};
-
-#endif // BREATHING_SIGN_ENGRAVER_HH
index 0a71a1466d580c83e0141b9e16faeef55ca14e8e..e812875e99da32328b45a0b9064f39c88e173fd6 100644 (file)
  */
 class Dot_column : public Item
 {
-  static int compare (Item * const&,Item * const&);
-  void add_dots (Item*);
+  static int compare (Score_element * const&,Score_element * const&);
 public:
   VIRTUAL_COPY_CONS (Score_element);
   void add_head (Rhythmic_head*);
   Dot_column (SCM);
-
-
-  SCM member_after_line_breaking ();
-  static SCM after_line_breaking (SCM);
+  
+  static Real force_shift_callback (Score_element const* , Axis);
+  static SCM do_shifts (SCM dotlist);
 };
 #endif // DOT_COLUMN_HH
index 3333cd26b78d4e26fa36f9e14661391bd0ed55dd..21be4f774761090e2192a6c3018d7eee061edd8b 100644 (file)
@@ -27,7 +27,7 @@
 class Dots                     // interface
 {
 public:
-  static SCM after_line_breaking (SCM);
+  static Real quantised_position_callback(Score_element const*, Axis);
   static SCM brew_molecule (SCM);
 };
 
index 50ab957bb359c47bcca821949b48cc7c246fdc01..6a9b31be68849afe5153751286d24f122d61d21f 100644 (file)
@@ -26,7 +26,6 @@ public:
   SCM member_brew_molecule () const;
   VIRTUAL_COPY_CONS (Score_element);
 
-  virtual void do_add_processing ();
   SCM member_after_line_breaking ();
   static SCM after_line_breaking (SCM);
   virtual Array<Rod> get_rods () const;
index dc6d665f774ce275bd0fdc0d3957c72d2b042000..ddd691232d46ca9f94a10d95a33312c38e183c38 100644 (file)
@@ -34,7 +34,7 @@ public:
   static Slice head_positions_interval(Score_element* me) ;
   static Direction static_dir (Score_element*);
   void translate_rests(int dy);
-  Note_head * first_head ()const;
+  Rhythmic_head * first_head ()const;
   Interval rest_dim ()const ;
   Note_column (SCM);
   void set_stem (Score_element*);
index 272ed3da9521488112f45ba36e758a74ea0ac40f..b945d3a28a88d5d953a0f7f7e1aa1b8616284e35 100644 (file)
@@ -7,7 +7,8 @@
 #ifndef NOTEHEAD_HH
 #define NOTEHEAD_HH
 
-#include "rhythmic-head.hh"
+#include "lily-guile.hh"
+#include "molecule.hh"
 
 /** ball at the end of the stem. Takes care of:
 
 
   */
 
-class Note_head : public Rhythmic_head
+class Note_head 
 {
 public:
-  static int compare (Note_head * const &a, Note_head *const &b) ;
- static SCM brew_molecule (SCM);
-  
-
-  Molecule ledger_line (Interval) const;
-  Note_head (SCM);
-
-  SCM member_before_line_breaking ();
-  static SCM before_line_breaking (SCM);
-  SCM member_brew_molecule() const;
+  static SCM brew_molecule (SCM);
+  static Molecule ledger_line (Interval, Score_element*) ;
 };
 #endif // NOTEHEAD_HH
 
diff --git a/lily/include/note-heads-engraver.hh b/lily/include/note-heads-engraver.hh
deleted file mode 100644 (file)
index bbe8e02..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-  head-engraver.hh -- part of GNU LilyPond
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef HEADSGRAV_HH
-#define HEADSGRAV_HH
-#include "engraver.hh"
-#include "pqueue.hh"
-
-/**
-  make balls and rests
- */
-class Note_heads_engraver : public Engraver {
-  Link_array<Note_head> note_p_arr_;
-  Link_array<Item> dot_p_arr_;
-  Link_array<Note_req> note_req_l_arr_;
-  Moment note_end_mom_;
-public:
-  VIRTUAL_COPY_CONS(Translator);
-  Note_heads_engraver();
-  
-protected:
-  virtual bool do_try_music (Music *req_l) ;
-  virtual void do_process_music();
-  virtual void do_pre_move_processing();
-};
-
-
-#endif // HEADSGRAV_HH
diff --git a/lily/include/rest-engraver.hh b/lily/include/rest-engraver.hh
deleted file mode 100644 (file)
index af57152..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-  rest-engraver.hh -- declare Engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef REST_GRAV_HH
-#define REST_GRAV_HH
-
-#include "engraver.hh"
-
-class Rest_engraver : public Engraver
-{
-  Rest_req *rest_req_l_;
-  Item * dot_p_;
-  Rest * rest_p_;
-protected:
-  virtual bool do_try_music (Music *);
-  virtual void do_pre_move_processing ();
-  virtual void do_post_move_processing ();
-  virtual void do_process_music ();
-public:
-  
-  VIRTUAL_COPY_CONS(Translator);
-  Rest_engraver ();
-};
-#endif // REST_GRAV_HH
index db36065f0ce919bbaca019f445d17540b321f2de..dc3706005b86c85bbf6237581e9be047252e92d8 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef REST_HH
 #define REST_HH
 
-#include "rhythmic-head.hh"
+#include "lily-guile.hh"
 
 /**
    A pause.
 
    style -- string specifying glyph style
  */
-class  Rest : public Rhythmic_head
+class  Rest
 {
 public:
-  SCM member_after_line_breaking ();
   static SCM after_line_breaking (SCM);
-  SCM member_brew_molecule () const;
-
-   static SCM brew_molecule (SCM);
-  
-Rest (SCM s);
+  static SCM brew_molecule (SCM);
 };
 #endif // REST_HH
index 33e7bb279b6baa5e8c688b168201eb32c79f6868..cb005547144729ea89215de96e8e794a7fda530b 100644 (file)
@@ -30,7 +30,7 @@ public:
   VIRTUAL_COPY_CONS(Rhythmic_head);
   int balltype_i () const;
 
-  void add_dots (Item *);
+  void set_dots (Item *);
   Stem * stem_l () const;
   Item * dots_l () const;
   int dot_count () const;
index 3176d4b6bbc848d429b536bc37be57881e3e8b9f..e37761e8a5e0ef78a5f7b8a21b9f06704a3e49b6 100644 (file)
@@ -23,21 +23,20 @@ public:
  static SCM brew_molecule (SCM);
   
   SCM member_brew_molecule () const;
-  virtual Array<Offset> get_encompass_offset_arr () const;
+  Array<Offset> get_encompass_offset_arr () const;
   Bezier get_curve () const;
 
-  virtual Direction get_default_dir () const;
+  Direction get_default_dir () const;
   SCM member_after_line_breaking ();
   static SCM after_line_breaking (SCM);
-  virtual void do_add_processing ();
   Array<Rod> get_rods () const;
-  Offset get_attachment (Direction dir) const;
+  Offset get_attachment (Direction dir, Score_element**common) const;
 
 private:  
   void de_uglyfy (Slur_bezier_bow* bb, Real default_height);
   void set_extremities ();
   void set_control_points ();
-  Offset encompass_offset (Note_column const* )const;
+  Offset encompass_offset (Score_element *col,Score_element**common)const;
 };
 
 #endif // SLUR_HH
index 20311c8abb53fcd4f280b5a360e6d9d845fd7be0..9734cf17afb7d77378ee67837b99745e85eae328 100644 (file)
@@ -40,9 +40,5 @@ public:
 };
 
 int compare_position (Score_element *const&,Score_element *const&); 
-
-
-Staff_symbol_referencer_interface staff_symbol_referencer  (Score_element const*);
-
 #endif /* STAFF_SYMBOL_REFERENCER_HH */
 
index 24e0630c76d748a7937a238c3284d6da07e273c9..ed0f619d0fdf5d4b77b5e2af18171a07717d6fe1 100644 (file)
@@ -57,8 +57,8 @@ public:
     our beam, for aligning abbrev flags
    */
   Beam* beam_l () const;
-  Note_head * first_head () const;
-  Drul_array<Note_head*> extremal_heads () const;
+  Rhythmic_head * first_head () const;
+  Drul_array<Rhythmic_head*> extremal_heads () const;
 
   Score_element * support_head () const;
   Stem (SCM);
index bf6f386fc4f86293723845660f7197faca006c10..92a2b24719eb6b4efe76ae54b1895aff79150de8 100644 (file)
@@ -23,16 +23,12 @@ public:
   void set_head (Direction, Item*head_l);
   VIRTUAL_COPY_CONS(Score_element);
 
-  Note_head* head (Direction) const;
+  Rhythmic_head* head (Direction) const;
   Real position_f () const;
-   static SCM brew_molecule (SCM);
-  
-
-  virtual Direction get_default_dir() const;
-
-
+  static SCM brew_molecule (SCM);
+  Direction get_default_dir() const;
   SCM member_brew_molecule () const;
-  virtual Array<Offset> get_encompass_offset_arr () const;
+  Array<Offset> get_encompass_offset_arr () const;
   Bezier get_curve () const;
 
   /*
index 42019434b7ca9fa573f543db5b46a75bf595e8cd..90496b424e674df3809c895fa417941db9fc32f3 100644 (file)
@@ -34,8 +34,8 @@ public:
   SCM member_brew_molecule () const;
   VIRTUAL_COPY_CONS(Score_element);
 
-  virtual void do_add_processing ();
-  virtual Direction get_default_dir () const;
+
+  Direction get_default_dir () const;
 };
 
 #endif // Tuplet_spanner_HH
index ede918a767e5ed8c8044eba767c7a4e6b2a09a77..ba28f37e6a10d54b37989db30dd80bc7755190af 100644 (file)
@@ -23,7 +23,7 @@ public:
   SCM member_brew_molecule () const;
   VIRTUAL_COPY_CONS (Score_element);
 
-  virtual void do_add_processing ();
+
   SCM member_after_line_breaking ();
   static SCM after_line_breaking (SCM);
 };
index 2c235080e31cc76b2dee5cd7cc9c29705f0094cc..dc08a787a9989eeb7d6b3fa37bf7737bbf5eeda0 100644 (file)
@@ -10,7 +10,7 @@
 #include "engraver.hh"
 #include "item.hh"
 #include "side-position-interface.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "stem.hh"
 
 /**
@@ -49,12 +49,12 @@ Line_number_engraver::process_acknowledged ()
 void
 Line_number_engraver::acknowledge_element (Score_element_info inf)
 {
-  if (dynamic_cast<Note_head*> (inf.elem_l_))
+  if (to_boolean (inf.elem_l_->get_elt_property ("note-head-interface")))
     {
       interesting_.push (inf);
       support_.push (inf.elem_l_);
     }
-  if (dynamic_cast<Stem*> (inf.elem_l_))
+  else if (to_boolean (inf.elem_l_->get_elt_property ("stem-interface")))
     {
       support_.push (inf.elem_l_);
     }
index 55dd16c0b4fbf0f9d99fa27b161be53e377dee0d..9fcde99872787e0bb7492586bd5f083da5222c9e 100644 (file)
@@ -9,7 +9,7 @@
 #include "local-key-item.hh"
 #include "key-item.hh"
 #include "tie.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "timing-translator.hh"
 #include "engraver-group-engraver.hh"
 #include "grace-align-item.hh"
@@ -100,7 +100,7 @@ Local_key_engraver::process_acknowledged ()
                  key_item_p_ = new Local_key_item (get_property ("basicLocalKeyProperties"));
                  Side_position_interface (key_item_p_).set_axis (X_AXIS);
                  Side_position_interface (key_item_p_).set_direction (LEFT);
-                 staff_symbol_referencer(key_item_p_).set_interface ();
+                 Staff_symbol_referencer_interface (key_item_p_).set_interface ();
                         
                  announce_element (Score_element_info (key_item_p_, 0));
                }
@@ -193,7 +193,7 @@ Local_key_engraver::acknowledge_element (Score_element_info info)
       grace_align_l_ = gai;
     }
   Note_req * note_l =  dynamic_cast <Note_req *> (info.req_l_);
-  Note_head * note_head = dynamic_cast<Note_head *> (info.elem_l_);
+  Rhythmic_head * note_head = dynamic_cast<Rhythmic_head *> (info.elem_l_);
 
   if (he_gr != selfgr)
     return;
index 0c1ec92137f530c59e871a16897203a891785fc0..2dd00710957a86f9414448c92be645025c89f9a9 100644 (file)
@@ -11,7 +11,7 @@
 #include "lookup.hh"
 #include "paper-def.hh"
 #include "musical-request.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "misc.hh"
 
 void
index 27dfeebf5c8657f65798a30f8a356609980e990b..97d1401c17ae56e16e61396e7f8f8f4a1dde88a5 100644 (file)
@@ -38,7 +38,7 @@ SCM
 Multi_measure_rest::member_brew_molecule () const
 {
   Real staff_space
-    = staff_symbol_referencer (this).staff_space ();
+    = Staff_symbol_referencer_interface (this).staff_space ();
 
   Interval sp_iv;
   Direction d = LEFT;
@@ -140,32 +140,6 @@ Multi_measure_rest::member_brew_molecule () const
   UGH. JUNKME elt prop "columns" isn't really needed. 
  */
 
-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"));
-                                   
-      set_bound (LEFT, column_arr[0 >? column_arr.size () - 2]);
-      set_bound (RIGHT, column_arr.top ());
-    }
-#endif
-  // set columns to SCM_EOL?
-}
-  
-GLUE_SCORE_ELEMENT(Multi_measure_rest,after_line_breaking);
-SCM
-Multi_measure_rest::member_after_line_breaking ()
-{
-  if (!gh_pair_p (get_elt_pointer ("columns")))
-    {
-      suicide ();
-    }
-
-  return SCM_UNDEFINED;
-}
 
 
  
index 613a9bae8254dde8bf1387cb0d11ba65b9092ead..2d20c48a190229032bb98897a24f6bccb28794ea 100644 (file)
@@ -142,7 +142,7 @@ Note_column::rest_dim () const
   return r->extent (Y_AXIS);
 }
 
-Note_head*
+Rhythmic_head*
 Note_column::first_head () const
 {
   Stem * st = stem_l ();
index 5c4e1b690578a8c0e3c8c62e529915da425ebd9e..c072d2f461b505c0e3a9c03bd761efa85d8f38e5 100644 (file)
   build a ledger line for small pieces.
  */
 Molecule
-Note_head::ledger_line (Interval xwid) const
+Note_head::ledger_line (Interval xwid, Score_element *me) 
 {
   Drul_array<Molecule> endings;
-  endings[LEFT] = lookup_l()->afm_find ("noteheads-ledgerending");
+  endings[LEFT] = me->lookup_l()->afm_find ("noteheads-ledgerending");
   Molecule *e = &endings[LEFT];
   endings[RIGHT] = *e;
   
@@ -52,34 +52,15 @@ Note_head::ledger_line (Interval xwid) const
 }
 
 
-GLUE_SCORE_ELEMENT(Note_head,before_line_breaking);
-SCM
-Note_head::member_before_line_breaking ()
-{
-  // 8 ball looks the same as 4 ball:
-  
-  if (balltype_i () > 2)
-    set_elt_property ("duration-log", gh_int2scm (2));
-
-  if (Item *d = dots_l ())
-    { // move into Rhythmic_head?
-      Staff_symbol_referencer_interface si (d);
-      Staff_symbol_referencer_interface me (this);      
-      
-      si.set_position(int (me.position_f ()));
-    }
-
-  return SCM_UNDEFINED;
-}
-
 
 
-GLUE_SCORE_ELEMENT(Note_head,brew_molecule);
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Note_head,brew_molecule);
 
 SCM
-Note_head::member_brew_molecule () const 
+Note_head::brew_molecule (SCM smob)  
 {
-  Staff_symbol_referencer_interface si (this);
+  Score_element *me = unsmob_element (smob);
+  Staff_symbol_referencer_interface si (me);
   
   Real inter_f = si.staff_space ()/2;
   int sz = si.line_count ()-1;
@@ -88,15 +69,15 @@ Note_head::member_brew_molecule () const
     ? 0
     : (abs((int)p) - sz) /2;
 
-  SCM style  = get_elt_property ("style");
+  SCM style  = me->get_elt_property ("style");
   if (style == SCM_UNDEFINED)
     {
       style = ly_symbol2scm("default");
     }
   
-  Molecule out = lookup_l()->afm_find (String ("noteheads-") + 
+  Molecule out = me->lookup_l()->afm_find (String ("noteheads-") + 
                ly_scm2string (scm_eval (gh_list (ly_symbol2scm("find-notehead-symbol"),
-                                                 gh_int2scm(balltype_i ()),
+                                                 me->get_elt_property ("duration-log"),
                                                  ly_quote_scm(style),
                                                  SCM_UNDEFINED))));
 
@@ -106,7 +87,7 @@ Note_head::member_brew_molecule () const
       Interval hd = out.extent (X_AXIS);
       Real hw = hd.length ()/4;
       Molecule ledger (ledger_line  (Interval (hd[LEFT] - hw,
-                                              hd[RIGHT] + hw)));
+                                              hd[RIGHT] + hw), me));
       
 
       ledger.set_empty (true);
@@ -122,10 +103,3 @@ Note_head::member_brew_molecule () const
     }
   return out.create_scheme();
 }
-
-
-Note_head::Note_head (SCM s)
-  : Rhythmic_head (s)
-{
-  
-}
index c12f28df1144a663b816d967720882e2d140461a..fa72a59e2f55a6779d4b9f3382854987d849fed5 100644 (file)
@@ -4,13 +4,38 @@
   (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "note-head.hh"
-#include "note-heads-engraver.hh"
+#include "rhythmic-head.hh"
+#include "engraver.hh"
 #include "paper-def.hh"
 #include "musical-request.hh"
 #include "dots.hh"
 #include "dot-column.hh"
 #include "staff-symbol-referencer.hh"
+#include "engraver.hh"
+#include "pqueue.hh"
+
+/**
+  make balls and rests
+ */
+class Note_heads_engraver : public Engraver
+{
+  Link_array<Rhythmic_head> note_p_arr_;
+  Link_array<Item> dot_p_arr_;
+  Link_array<Note_req> note_req_l_arr_;
+  Moment note_end_mom_;
+public:
+  VIRTUAL_COPY_CONS(Translator);
+  Note_heads_engraver();
+  
+protected:
+  virtual bool do_try_music (Music *req_l) ;
+  virtual void do_process_music();
+  virtual void do_pre_move_processing();
+};
+
+
+
+
 
 Note_heads_engraver::Note_heads_engraver()
 {
@@ -60,7 +85,7 @@ Note_heads_engraver::do_process_music()
   
   for (int i=0; i < note_req_l_arr_.size (); i++)
     {
-      Note_head *note_p  = new Note_head (get_property ("basicNoteHeadProperties"));
+      Rhythmic_head *note_p  = new Rhythmic_head (get_property ("basicNoteHeadProperties"));
       
       Staff_symbol_referencer_interface si (note_p);
       si.set_interface ();
@@ -73,17 +98,19 @@ Note_heads_engraver::do_process_music()
 
       if (note_req_l->duration_.dots_i_)
        {
-          Item * d = new Item (get_property ("basicDotsProperties"));
+         Item * d = new Item (get_property ("basicDotsProperties"));
 
          Staff_symbol_referencer_interface sd (d);
          sd.set_interface ();
          
-         note_p->add_dots (d);
+         note_p->set_dots (d);
          
          if (note_req_l->duration_.dots_i_
              != gh_scm2int (d->get_elt_property ("dot-count")))
            d->set_elt_property ("dot-count", gh_int2scm (note_req_l->duration_.dots_i_));
-         
+
+         d->set_parent (note_p, Y_AXIS);
+         d->add_offset_callback (Dots::quantised_position_callback, Y_AXIS);
          announce_element (Score_element_info (d,0));
          dot_p_arr_.push (d);
        }
index 8f43379ba51bede70572e67fd85c967d54e9e04e..2058358a9ee0dc511ffcaae718287dffe510c19b 100644 (file)
@@ -12,7 +12,7 @@
 #include "item.hh"
 #include "lookup.hh"
 #include "lily-guile.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "stem.hh"
 #include "side-position-interface.hh"
 #include "staff-symbol-referencer.hh"
@@ -111,7 +111,7 @@ Piano_pedal_engraver::acknowledge_element (Score_element_info info)
     {
       if (p->item_p_)
        {
-         if (Note_head* n = dynamic_cast<Note_head*> (info.elem_l_))
+         if (Rhythmic_head* n = dynamic_cast<Rhythmic_head*> (info.elem_l_))
            {
              Side_position_interface st (p->item_p_);
              st.add_support (n);
index 21774fb3af887d3d29dc0fb013428a9005ab7da4..fbe88a330090db0677dc5c4f24c4880199abd755 100644 (file)
@@ -9,14 +9,14 @@
 #include "staff-symbol-referencer.hh"
 
 #include "pitch-squash-engraver.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 
 void
 Pitch_squash_engraver::acknowledge_element (Score_element_info i)
 {
-  if (Note_head *nh = dynamic_cast<Note_head *> (i.elem_l_))
+  if (to_boolean (i.elem_l_->get_elt_property ("note-head-interface")))
     {
-      Staff_symbol_referencer_interface (nh).set_position(0);
+      Staff_symbol_referencer_interface (i.elem_l_).set_position(0);
     }
 }
 
index 69f1ff0eed4e832dfb3455b3e5d9e7c88bdac5f1..2a38b27d2ba391b1bf294eb6ba68d5f0609bcfc9 100644 (file)
@@ -5,13 +5,14 @@
 
   (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
+
 #include <math.h>              // ceil.
 
 #include "debug.hh"
 #include "rest-collision.hh"
 #include "note-column.hh"
 #include "stem.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "paper-def.hh"
 #include "rest.hh"
 #include "group-interface.hh"
index 96f34bfe961eab776a46db7a0f52970f130870f4..ccc80a3f82de05f2f6fe3916280e4cb485cf3aae 100644 (file)
@@ -6,10 +6,27 @@
   (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 #include "staff-symbol-referencer.hh"
-#include "rest-engraver.hh"
 #include "musical-request.hh"
 #include "dots.hh"
-#include "rest.hh"
+#include "rhythmic-head.hh"
+#include "engraver.hh"
+
+class Rest_engraver : public Engraver
+{
+  Rest_req *rest_req_l_;
+  Item * dot_p_;
+  Rhythmic_head * rest_p_;
+protected:
+  virtual bool do_try_music (Music *);
+  virtual void do_pre_move_processing ();
+  virtual void do_post_move_processing ();
+  virtual void do_process_music ();
+public:
+  
+  VIRTUAL_COPY_CONS(Translator);
+  Rest_engraver ();
+};
+
 
 /*
   Should merge with Note_head_engraver
@@ -47,7 +64,7 @@ Rest_engraver::do_process_music ()
 {
   if (rest_req_l_ && !rest_p_) 
     {
-      rest_p_ = new Rest (get_property ("basicRestProperties"));
+      rest_p_ = new Rhythmic_head (get_property ("basicRestProperties"));
       Staff_symbol_referencer_interface si (rest_p_);
       si.set_interface ();
       
@@ -61,7 +78,9 @@ Rest_engraver::do_process_music ()
          Staff_symbol_referencer_interface si (dot_p_);
          si.set_interface ();
          
-         rest_p_->add_dots (dot_p_);
+         rest_p_->set_dots (dot_p_);
+         dot_p_->set_parent (rest_p_, Y_AXIS);
+         dot_p_->add_offset_callback (Dots::quantised_position_callback, Y_AXIS);
          dot_p_->set_elt_property ("dot-count",
                                    gh_int2scm (rest_req_l_->duration_.dots_i_));
          announce_element (Score_element_info (dot_p_,0));
index f76968aaa01d7f42a67efac6a0b34709c351c1fc..a8264b0ef67d4582570ee69fd5abe4f6b37f454f 100644 (file)
 #include "staff-symbol-referencer.hh"
 
 // -> offset callback
-GLUE_SCORE_ELEMENT(Rest,after_line_breaking);
+MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Rest,after_line_breaking);
 SCM
-Rest::member_after_line_breaking ()
+Rest::after_line_breaking (SCM smob)
 {
-  if (balltype_i () == 0)
+  Score_element *me = unsmob_element (smob);
+  int bt = gh_scm2int (me->get_elt_property ("duration-log"));
+  if (bt == 0)
     {
-      Staff_symbol_referencer_interface si (this);
-      si.set_position (si.position_f () + 2);
+      Staff_symbol_referencer_interface si (me);
+      me->translate_axis (si.staff_space() , Y_AXIS);
     }
-  Item * d = dots_l ();
-  if (d && balltype_i () > 4) // UGH.
+
+  Score_element * d = unsmob_element (me->get_elt_pointer ("dot"));
+  if (d && bt > 4) // UGH.
     {
-      /*
-       UGH. 
-       */
-      staff_symbol_referencer (d)
-       .set_position ((balltype_i () == 7) ? 4 : 3);
+      d->set_elt_property ("staff-position",
+                          gh_int2scm ((bt == 7) ? 4 : 3));
     }
 
   return SCM_UNDEFINED;
@@ -39,7 +39,6 @@ Rest::member_after_line_breaking ()
 
 
 MAKE_SCHEME_SCORE_ELEMENT_CALLBACK(Rest,brew_molecule)
-
 SCM 
 Rest::brew_molecule (SCM smob) 
 {
@@ -69,10 +68,3 @@ Rest::brew_molecule (SCM smob)
   return sc-> lookup_l ()->afm_find (idx).create_scheme();
 }
 
-
-
-Rest::Rest (SCM s)
-  : Rhythmic_head (s)
-{
-}
-
index 06a67569ccd2950c3ccee833e4d72e218aeafd2d..dba6143faaac850313e3a107105a8368f78beb85 100644 (file)
@@ -9,7 +9,7 @@
 #include "dimension-cache.hh"
 #include "slur.hh"
 #include "engraver.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "stem.hh"
 #include "note-column.hh"
 #include "dot-column.hh"
index 76a2d698a0c3c9147cea9ff09f5208d4858909b2..b443e3d6122383736d047da334b16d73c536295c 100644 (file)
@@ -46,27 +46,11 @@ Rhythmic_head::dot_count () const
   return dots_l ()
     ? gh_scm2int (dots_l ()->get_elt_property ("dot-count")) : 0;
 }
-  
-GLUE_SCORE_ELEMENT(Rhythmic_head,after_line_breaking);
-SCM
-Rhythmic_head::member_after_line_breaking ()
-{
-  if (Item *d = dots_l ())
-    {
-      Staff_symbol_referencer_interface si (d);
-      Staff_symbol_referencer_interface me (d);      
-      si.set_position(int (me.position_f ()));
-    }
-
-  return SCM_UNDEFINED;
-}
-
 
 void
-Rhythmic_head::add_dots (Item *dot_l)
+Rhythmic_head::set_dots (Item *dot_l)
 {
   set_elt_pointer ("dot", dot_l->self_scm_);
-  dot_l->add_dependency (this);  
 }
 
 
index 0761c5e51ec93857e7906091c4f9623fa011181d..5e929206f41e8093d5c256f4f06613bd54de4cf9 100644 (file)
@@ -789,16 +789,42 @@ Score_element::ly_get_elt_property (SCM elt, SCM sym)
 }
 
 
+void
+Score_element::discretionary_processing()
+{
+}
+
+
+SCM
+spanner_get_bound (SCM slur, SCM dir)
+{
+  return dynamic_cast<Spanner*> (unsmob_element (slur))->get_bound (to_dir (dir))->self_scm_;
+}
+
+SCM
+score_element_get_pointer (SCM se, SCM name)
+{
+  SCM s = scm_assq (name, unsmob_element (se)->pointer_alist_);
+  return (s == SCM_BOOL_F) ? SCM_UNDEFINED : gh_cdr (s); 
+}
+
+SCM
+score_element_get_property (SCM se, SCM name)
+{
+  SCM s = scm_assq (name, unsmob_element (se)->property_alist_);
+  return (s == SCM_BOOL_F) ? SCM_UNDEFINED : gh_cdr (s); 
+}
+
+
 static void
 init_functions ()
 {
   scm_make_gsubr ("ly-get-elt-property", 2, 0, 0, (SCM(*)(...))Score_element::ly_get_elt_property);
   scm_make_gsubr ("ly-set-elt-property", 3, 0, 0, (SCM(*)(...))Score_element::ly_set_elt_property);
+  scm_make_gsubr ("ly-get-elt-pointer", 2 , 0, 0,  
+                 (SCM(*)(...)) score_element_get_pointer);
+  scm_make_gsubr ("ly-get-spanner-bound", 2 , 0, 0,  
+                 (SCM(*)(...)) spanner_get_bound);
 }
-
 ADD_SCM_INIT_FUNC(scoreelt, init_functions);
 
-void
-Score_element::discretionary_processing()
-{
-}
index 260e2cecc922dfb101a49a1871a5a8a8e671f021..04d44e7ad9ed736a20149f78786a1a6d59be5a4f 100644 (file)
@@ -102,36 +102,24 @@ Slur::get_default_dir () const
   return d;
 }
 
-void
-Slur::do_add_processing ()
-{
-#if 0
-  Link_array<Note_column> encompass_arr =
-    Pointer_group_interface__extract_elements (this, (Note_column*)0, "note-columns");
 
-  if (encompass_arr.size ())
-    {
-      set_bound (LEFT, encompass_arr[0]);    
-      if (encompass_arr.size () > 1)
-       set_bound (RIGHT, encompass_arr.top ());
-    }
-#endif
-}
 
 
 
 Offset
-Slur::encompass_offset (Note_column const* col) const
+Slur::encompass_offset (Score_element* col,
+                       Score_element **common) const
 {
   Offset o;
-  Stem* stem_l = col->stem_l ();
+  Score_element* stem_l = unsmob_element (col->get_elt_pointer ("stem"));
+  
   Direction dir = Directional_element_interface (this).get ();
   
   if (!stem_l)
     {
       warning (_ ("Slur over rest?"));
-      o[X_AXIS] = col->relative_coordinate (0, X_AXIS);
-      o[Y_AXIS] = col->relative_coordinate (0, Y_AXIS);
+      o[X_AXIS] = col->relative_coordinate (common[X_AXIS], X_AXIS);
+      o[Y_AXIS] = col->relative_coordinate (common[Y_AXIS], Y_AXIS);
       return o;  
     }
   Direction stem_dir = Directional_element_interface (stem_l).get ();
@@ -146,11 +134,11 @@ Slur::encompass_offset (Note_column const* col) const
   if ((stem_dir == dir)
       && !stem_l->extent (Y_AXIS).empty_b ())
     {
-      o[Y_AXIS] = stem_l->relative_coordinate (0, Y_AXIS);
+      o[Y_AXIS] = stem_l->relative_coordinate (common[Y_AXIS], Y_AXIS); // iuhg
     }
   else
     {
-      o[Y_AXIS] = col->relative_coordinate (0, Y_AXIS);
+      o[Y_AXIS] = col->relative_coordinate (common[Y_AXIS], Y_AXIS);   // ugh
     }
 
   /*
@@ -170,39 +158,6 @@ Slur::member_after_line_breaking ()
   return SCM_UNDEFINED;
 } 
 
-SCM
-slur_get_bound (SCM slur, SCM dir)
-{
-  return ((Slur*)unsmob_element (slur))->get_bound (to_dir (dir))->self_scm_;
-}
-
-SCM
-score_element_get_pointer (SCM se, SCM name)
-{
-  SCM s = scm_assq (name, unsmob_element (se)->pointer_alist_);
-  return (s == SCM_BOOL_F) ? SCM_UNDEFINED : gh_cdr (s); 
-}
-
-SCM
-score_element_get_property (SCM se, SCM name)
-{
-  SCM s = scm_assq (name, unsmob_element (se)->property_alist_);
-  return (s == SCM_BOOL_F) ? SCM_UNDEFINED : gh_cdr (s); 
-}
-
-void
-init_score_elts ()
-{
-  scm_make_gsubr ("get-pointer", 2 , 0, 0,  
-                 (SCM(*)(...)) score_element_get_pointer);
-  scm_make_gsubr ("get-property", 2 , 0, 0,  
-                 (SCM(*)(...)) score_element_get_property);
-  scm_make_gsubr ("get-bound", 2 , 0, 0,  
-                 (SCM(*)(...)) slur_get_bound);
-}
-
-ADD_SCM_INIT_FUNC (score_elt, init_score_elts);
-
 void
 Slur::set_extremities ()
 {
@@ -234,7 +189,8 @@ Slur::set_extremities ()
 }
 
 Offset
-Slur::get_attachment (Direction dir) const
+Slur::get_attachment (Direction dir,
+                     Score_element **common) const
 {
   SCM s = get_elt_property ("attachment");
   SCM a = dir == LEFT ? gh_car (s) : gh_cdr (s);
@@ -242,6 +198,8 @@ Slur::get_attachment (Direction dir) const
   Real ss = Staff_symbol_referencer_interface (this).staff_space ();
   Real hs = ss / 2.0;
   Offset o;
+
+  
   if (Note_column* n = dynamic_cast<Note_column*> (get_bound (dir)))
     {
       if (Stem* st = dynamic_cast<Stem*> (n->stem_l ()))
@@ -282,7 +240,7 @@ Slur::get_attachment (Direction dir) const
              SCM other_a = dir == LEFT ? gh_cdr (s) : gh_car (s);
              if (ly_symbol2string (other_a) != "loose-end")
                {
-                 o = Offset (0, get_attachment (-dir)[Y_AXIS]);
+                 o = Offset (0, get_attachment (-dir, common)[Y_AXIS]);
                }
            }
 
@@ -301,28 +259,48 @@ Slur::get_attachment (Direction dir) const
        }
     }
 
-    if (str != "loose-end")
-      o += Offset (0, get_bound (dir)->relative_coordinate (0, Y_AXIS)
-                - relative_coordinate (0, Y_AXIS));
-    
+
+  /*
+    What if get_bound () is not a note-column?
+   */
+  if (str != "loose-end"
+      && get_bound (dir)->common_refpoint (common[Y_AXIS], Y_AXIS) == common[Y_AXIS])
+    {      
+      o[Y_AXIS] += get_bound (dir)->relative_coordinate (common[Y_AXIS], Y_AXIS) 
+       - relative_coordinate (common[Y_AXIS], Y_AXIS);
+    }
   return o;
 }
 
 Array<Offset>
 Slur::get_encompass_offset_arr () const
 {
-  Link_array<Note_column> encompass_arr =
-    Pointer_group_interface__extract_elements (this, (Note_column*)0, "note-columns");
+  SCM eltlist = get_elt_pointer ("note-columns");
+  Score_element *common[] = {common_refpoint (eltlist,X_AXIS),
+                            common_refpoint (eltlist,Y_AXIS)};
+
+
+  common[X_AXIS] = common[X_AXIS]->common_refpoint (get_bound (RIGHT), X_AXIS);
+  common[X_AXIS] = common[X_AXIS]->common_refpoint (get_bound (LEFT), X_AXIS);
+  
+  Link_array<Score_element>  encompass_arr;
+  while (gh_pair_p (eltlist))
+    {
+      encompass_arr.push (unsmob_element (gh_car (eltlist)));      
+      eltlist =gh_cdr (eltlist);
+    }
+  encompass_arr.reverse ();
+
   
   Array<Offset> offset_arr;
 
-  Offset origin (relative_coordinate (0, X_AXIS),
-                relative_coordinate (0, Y_AXIS));
+  Offset origin (relative_coordinate (common[X_AXIS], X_AXIS),
+                relative_coordinate (common[Y_AXIS], Y_AXIS)); 
 
   int first = 1;
   int last = encompass_arr.size () - 2;
 
-  offset_arr.push (get_attachment (LEFT));
+  offset_arr.push (get_attachment (LEFT, common));
 
   /*
     left is broken edge
@@ -331,8 +309,11 @@ Slur::get_encompass_offset_arr () const
   if (encompass_arr[0] != get_bound (LEFT))
     {
       first--;
-      offset_arr[0][Y_AXIS] -= encompass_arr[0]->relative_coordinate (0, Y_AXIS)
-       - relative_coordinate (0, Y_AXIS);
+
+      // ?
+      offset_arr[0][Y_AXIS] -=
+       encompass_arr[0]->relative_coordinate (common[Y_AXIS], Y_AXIS) 
+       - relative_coordinate (common[Y_AXIS], Y_AXIS); 
     }
 
   /*
@@ -345,16 +326,16 @@ Slur::get_encompass_offset_arr () const
 
   for (int i = first; i <= last; i++)
     {
-      Offset o (encompass_offset (encompass_arr[i]));
+      Offset o (encompass_offset (encompass_arr[i], common));
       offset_arr.push (o - origin);
     }
 
-  offset_arr.push (Offset (spanner_length (), 0) + get_attachment (RIGHT));
+  offset_arr.push (Offset (spanner_length (), 0) + get_attachment (RIGHT,common));
 
   if (encompass_arr[0] != get_bound (LEFT))
     {
-      offset_arr.top ()[Y_AXIS] -= encompass_arr.top ()->relative_coordinate (0, Y_AXIS)
-       - relative_coordinate (0, Y_AXIS);
+      offset_arr.top ()[Y_AXIS] -= encompass_arr.top ()->relative_coordinate (common[Y_AXIS], Y_AXIS) 
+       - relative_coordinate (common[Y_AXIS], Y_AXIS);
     }
 
   return offset_arr;
index ba6d15a7d8b75a838164a87960442bcf0c85be49..ca3c938ed85733ebf423d246035af23056143841 100644 (file)
@@ -99,7 +99,7 @@ Staff_symbol_referencer_interface::callback (Score_element const* sc,Axis )
   Real off =0.0;
   if (gh_number_p (pos))
     {
-      Real space = staff_symbol_referencer (sc).staff_space ();
+      Real space = Staff_symbol_referencer_interface (sc).staff_space ();
       off = gh_scm2double (pos) * space/2.0;
     }
 
@@ -145,11 +145,6 @@ Staff_symbol_referencer_interface::set_position (Real p)
   elt_l_->add_offset_callback (callback, Y_AXIS);
 }
 
-Staff_symbol_referencer_interface
-staff_symbol_referencer (Score_element const*e)
-{
-  return e;                    // gee, I'm so smart!
-}
 
 int
 compare_position (Score_element *const  &a, Score_element * const &b)
index 18c6669187ceb3255a62da854e1f2c19dd8be49c..0deb53ab44b0b2c8a972a4f9cf499dabe584ca84 100644 (file)
@@ -7,7 +7,7 @@
 */
 
 #include "staff-symbol-referencer.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "stem.hh"
 #include "musical-request.hh"
 #include "misc.hh"
index e8fe8b4647e08653252add2ce91dceb65a097141..694be6fde2e9667b81c4a75e8edcdeec936dc92d 100644 (file)
@@ -15,7 +15,7 @@
 #include "stem.hh"
 #include "debug.hh"
 #include "paper-def.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "lookup.hh"
 #include "molecule.hh"
 #include "paper-column.hh"
@@ -61,10 +61,10 @@ Stem::head_positions () const
     }
 
   
-  Drul_array<Note_head*> e (extremal_heads ());
+  Drul_array<Rhythmic_head*> e (extremal_heads ());
 
-  return Interval (staff_symbol_referencer (e[DOWN]).position_f (),
-                  staff_symbol_referencer( e[UP]).position_f ()); 
+  return Interval (Staff_symbol_referencer_interface (e[DOWN]).position_f (),
+                  Staff_symbol_referencer_interface ( e[UP]).position_f ()); 
 }
 
 
@@ -159,7 +159,7 @@ Stem::heads_i ()const
 /*
   The note head which forms one end of the stem.  
  */
-Note_head*
+Rhythmic_head*
 Stem::first_head () const
 {
   return extremal_heads ()[-get_direction ()];
@@ -168,7 +168,7 @@ Stem::first_head () const
 /*
   START is part where stem reaches `last' head. 
  */
-Drul_array<Note_head*>
+Drul_array<Rhythmic_head*>
 Stem::extremal_heads () const
 {
   const int inf = 1000000;
@@ -176,12 +176,12 @@ Stem::extremal_heads () const
   extpos[DOWN] = inf;
   extpos[UP] = -inf;  
   
-  Drul_array<Note_head *> exthead;
+  Drul_array<Rhythmic_head *> exthead;
   exthead[LEFT] = exthead[RIGHT] =0;
   
   for (SCM s = get_elt_pointer ("heads"); gh_pair_p (s); s = gh_cdr (s))
     {
-      Note_head * n = dynamic_cast<Note_head*> (unsmob_element (gh_car (s)));
+      Rhythmic_head * n = dynamic_cast<Rhythmic_head*> (unsmob_element (gh_car (s)));
       Staff_symbol_referencer_interface si (n);
       
       int p = int(si.position_f ());
@@ -205,12 +205,9 @@ Stem::add_head (Rhythmic_head *n)
   n->set_elt_pointer ("stem", this->self_scm_);
   n->add_dependency (this);
 
-  if (Note_head *nh = dynamic_cast<Note_head *> (n))
+  if (to_boolean (n->get_elt_property ("note-head-interface")))
     {
-      Pointer_group_interface gi (this);
-      gi.name_ = "heads";
-
-      gi.add_element (n);
+      Pointer_group_interface (this, "heads").add_element (n);
     }
   else
     {
@@ -232,7 +229,7 @@ Stem::invisible_b () const
   /*
     UGH. Who determines balltype for stem?
    */
-  Note_head * nh = dynamic_cast<Note_head*> (support_head ());
+  Rhythmic_head * nh = dynamic_cast<Rhythmic_head*> (support_head ());
   return !(heads_i () && nh->balltype_i () >= 1);
 }
 
@@ -476,7 +473,7 @@ Stem::member_brew_molecule () const
   Interval stem_y(y1,y2);
   stem_y.unite (Interval (y2,y1));
 
-  Real dy = staff_symbol_referencer (this).staff_space ()/2.0;
+  Real dy = Staff_symbol_referencer_interface (this).staff_space ()/2.0;
   Real head_wid = 0;
   if (support_head ())
     head_wid = support_head ()->extent (X_AXIS).length ();
@@ -506,7 +503,7 @@ Stem::off_callback (Score_element const* se, Axis)
   Stem *st = dynamic_cast<Stem*> ((Score_element*)se);
 
   Real r=0;
-  if (Note_head * f = st->first_head ())
+  if (Rhythmic_head * f = st->first_head ())
     {
       Interval head_wid(0, f->extent (X_AXIS).length ());
 
index 3611f59dcc3da87a46a0d325d63a5db490097c93..7e2a394326808504c1a69f031e409a6f7ea1ba86 100644 (file)
@@ -12,7 +12,7 @@
 #include "side-position-interface.hh"
 #include "item.hh"
 #include "musical-request.hh"
-#include "note-head.hh"
+
 #include "stem.hh"
 #include "staff-symbol.hh"
 
@@ -24,7 +24,6 @@ class Text_engraver : public Engraver
   Link_array<Text_script_req> reqs_;
   Link_array<Item> texts_;
 public:
-
   VIRTUAL_COPY_CONS(Translator);
 protected:
   virtual bool do_try_music (Music* m);
@@ -48,20 +47,20 @@ Text_engraver::do_try_music (Music *m)
 
 
 void
-Text_engraver::acknowledge_element (Score_element_info i)
+Text_engraver::acknowledge_element (Score_element_info inf)
 {
-  if (Note_head *n = dynamic_cast<Note_head*> (i.elem_l_))
+  if (to_boolean (inf.elem_l_->get_elt_property ("note-head-interface")))
     {
       for (int i=0; i < texts_.size (); i++)
        {
          Side_position_interface st (texts_[i]);
-         st.add_support (n);
+         st.add_support (inf.elem_l_);
          if (st.get_axis( ) == X_AXIS
              && !texts_[i]->parent_l (Y_AXIS))
-           texts_[i]->set_parent (n, Y_AXIS);
+           texts_[i]->set_parent (inf.elem_l_, Y_AXIS);
        }
     }
-  if (Stem *n = dynamic_cast<Stem*> (i.elem_l_))
+  if (Stem *n = dynamic_cast<Stem*> (inf.elem_l_))
     {
       for (int i=0; i < texts_.size (); i++)
        {
index 777706f0bff1e0f9ae84995471be70aa3cd8d699..84a006243daf7f0a90053dc2a229d6c247f48031 100644 (file)
@@ -39,7 +39,7 @@ Text_item::brew_molecule (SCM sm)
       Molecule m;
       m.set_empty (false);
       mol.add_at_edge (X_AXIS, RIGHT, m, gh_scm2double (space)*
-                      staff_symbol_referencer  (s).staff_space ());
+                      Staff_symbol_referencer_interface (s).staff_space ());
     }
   return mol.create_scheme (); 
 }
index a1910eeabc4c69e7426a5c1cfb11b3102527377c..63e3d2a465e13460b590976671086c9e7daf7aa7 100644 (file)
@@ -11,7 +11,7 @@
 #include "group-interface.hh"
 #include "tie.hh"
 #include "directional-element-interface.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 
 Tie_column::Tie_column (SCM s)
   : Spanner (s)
index 6d07edd4532458478b203a3c6352f15ec96ca607..020779e4827586206e986ea58c96dcfecd6e7271 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "tie-engraver.hh"
 #include "command-request.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "musical-request.hh"
 #include "tie.hh"
 #include "translator-group.hh"
 
 struct CHead_melodic_tuple {
   Melodic_req *req_l_ ;
-  Note_head *head_l_;
+  Rhythmic_head *head_l_;
   Moment end_;
   CHead_melodic_tuple ();
-  CHead_melodic_tuple (Note_head*, Melodic_req*, Moment);
+  CHead_melodic_tuple (Rhythmic_head*, Melodic_req*, Moment);
   static int pitch_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);
   static int time_compare (CHead_melodic_tuple const &, CHead_melodic_tuple const &);  
 };
@@ -100,7 +100,7 @@ Tie_engraver::set_melisma (bool m)
 void
 Tie_engraver::acknowledge_element (Score_element_info i)
 {
-  if (Note_head *nh = dynamic_cast<Note_head *> (i.elem_l_))
+  if (Rhythmic_head *nh = dynamic_cast<Rhythmic_head *> (i.elem_l_))
     {
       Note_req * m = dynamic_cast<Note_req* > (i.req_l_);
       if (!m)
@@ -250,7 +250,7 @@ CHead_melodic_tuple::CHead_melodic_tuple ()
   end_ = 0;
 }
 
-CHead_melodic_tuple::CHead_melodic_tuple (Note_head *h, Melodic_req*m, Moment mom)
+CHead_melodic_tuple::CHead_melodic_tuple (Rhythmic_head *h, Melodic_req*m, Moment mom)
 {
   head_l_ = h;
   req_l_ = m;
index 02dd922b2daa39e73e5835a0d7849b01fe22b9d9..e777a74fba696cb586a6b4580f07bba0732ab92c 100644 (file)
@@ -10,7 +10,7 @@
 #include "lookup.hh"
 #include "paper-def.hh"
 #include "tie.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "bezier.hh"
 #include "paper-column.hh"
 #include "debug.hh"
@@ -39,21 +39,21 @@ Tie::Tie(SCM s)
 
 }
 
-Note_head* 
+Rhythmic_head* 
 Tie::head (Direction d) const
 {
   SCM c = get_elt_pointer ("heads");
   c = index_cell (c, d);
 
-  return dynamic_cast<Note_head*> (unsmob_element (c));  
+  return dynamic_cast<Rhythmic_head*> (unsmob_element (c));  
 }
 
 Real
 Tie::position_f () const
 {
   return head (LEFT)
-    ? staff_symbol_referencer (head (LEFT)).position_f ()
-    : staff_symbol_referencer (head (RIGHT)).position_f () ;  
+    ? Staff_symbol_referencer_interface (head (LEFT)).position_f ()
+    : Staff_symbol_referencer_interface (head (RIGHT)).position_f () ;  
 }
 
 
@@ -84,7 +84,7 @@ Tie::do_add_processing()
     warning (_ ("lonely tie"));
 
   Direction d = LEFT;
-  Drul_array<Note_head *> new_head_drul;
+  Drul_array<Rhythmic_head *> new_head_drul;
   new_head_drul[LEFT] = head(LEFT);
   new_head_drul[RIGHT] = head(RIGHT);  
   do {
@@ -110,7 +110,7 @@ Tie::member_after_line_breaking ()
   if (!Directional_element_interface (this).get ())
     Directional_element_interface (this).set (get_default_dir ());
   
-  Real staff_space = staff_symbol_referencer (this).staff_space ();
+  Real staff_space = Staff_symbol_referencer_interface (this).staff_space ();
   Real half_space = staff_space / 2;
   Real x_gap_f = paper_l ()->get_var ("tie_x_gap");
   Real y_gap_f = paper_l ()->get_var ("tie_y_gap");
@@ -220,7 +220,7 @@ Tie::get_curve () const
   Direction d (Directional_element_interface (this).get ());
   Bezier_bow b (get_encompass_offset_arr (), d);
 
-  Real staff_space = staff_symbol_referencer (this).staff_space ();
+  Real staff_space = Staff_symbol_referencer_interface (this).staff_space ();
   Real h_inf = paper_l ()->get_var ("tie_height_limit_factor") * staff_space;
   Real r_0 = paper_l ()->get_var ("tie_ratio");
 
index 0f9badfc34e5f97723c4d9173c212988219409e6..3acb6c68f3432e037cbd3e392e453a5265f98595 100644 (file)
@@ -114,21 +114,7 @@ Tuplet_spanner::member_brew_molecule () const
     }
   return mol.create_scheme();
 }
-  
-void
-Tuplet_spanner::do_add_processing ()
-{
-#if 0
-  if (gh_pair_p (get_elt_pointer ("columns")))
-    {
-      Link_array<Note_column> column_arr=
-       Pointer_group_interface__extract_elements (this, (Note_column*)0, "columns");
-      
-      set_bound (LEFT, column_arr[0]);
-      set_bound (RIGHT, column_arr.top ());  
-    }
-#endif
-}
+
 
 
 
index bf7eb05c05dc22dce7cf3469c66352146d132cf1..6e99afdb84463b06c135632dd5557904b9110326 100644 (file)
@@ -93,21 +93,7 @@ Volta_spanner::member_brew_molecule () const
   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");
 
-  if (bar_arr.size ())
-    {
-      set_bound (LEFT, bar_arr[0]);
-      set_bound (RIGHT, bar_arr.top ());  
-    }
-#endif
-}
 
 GLUE_SCORE_ELEMENT(Volta_spanner,after_line_breaking);
 SCM
index 2fff02a9f84715b1ef63dfad99e47f69986fc198..cb548ddceda9acc52fdd25df12dfb01dbfae882f 100644 (file)
@@ -461,11 +461,10 @@ ScoreContext = \translator {
                (molecule-callback . ,Crescendo::brew_molecule)
        )
        basicDotColumnProperties = #`(
-               (after-line-breaking-callback . ,Dot_column::after_line_breaking)
+               (dot-column-interface . #t)
        )
        basicDotsProperties = #`(
                (molecule-callback . ,Dots::brew_molecule)
-               (after-line-breaking-callback . ,Dots::after_line_breaking)
                (dot-count . 1)
                (dots-interface . #t)
        )
@@ -525,7 +524,7 @@ ScoreContext = \translator {
        basicMultiMeasureRestProperties = #`(
                (molecule-callback . ,Multi_measure_rest::brew_molecule)
                (staff-position . 0)
-               (after-line-breaking-callback . ,Multi_measure_rest::after_line_breaking)
+
        )
        basicNoteColumnProperties = #`(
                (axes 0 1)
@@ -533,8 +532,6 @@ ScoreContext = \translator {
        basicNoteHeadProperties = #`(
                (note-head-interface . #t)
                (molecule-callback . ,Note_head::brew_molecule)
-               (before-line-breaking-callback . ,Note_head::before_line_breaking)
-               (after-line-breaking-callback . ,Rhythmic_head::after_line_breaking)
        )
        basicNoteNameProperties = #`(
                (molecule-callback . ,Text_item::brew_molecule)
@@ -557,7 +554,6 @@ ScoreContext = \translator {
        basicRestProperties = #`(
                (rest-interface . #t)   
                (molecule-callback . ,Rest::brew_molecule)
-               (after-line-breaking-callback . ,Rhythmic_head::after_line_breaking)
                (minimum-beam-collision-distance . 1.5)
        )
        
@@ -611,6 +607,7 @@ ScoreContext = \translator {
        basicStemProperties = #`(
                (before-line-breaking-callback . ,Stem::before_line_breaking)
                (molecule-callback . ,Stem::brew_molecule)
+               (stem-interface . #t)
        )
        staffSymbolBasicProperties = #`(
                (molecule-callback . ,Staff_symbol::brew_molecule)
index 4bb845b7e0557235081b7063ac035b5f0196a9e9..00ee1d42b00ac55509614acd540c004138213106 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.66
-Entered-date: 29JUN00
+Version: 1.3.67
+Entered-date: 30JUN00
 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.66.tar.gz 
+       1000k lilypond-1.3.67.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.66.tar.gz 
+       1000k lilypond-1.3.67.tar.gz 
 Copying-policy: GPL
 End
index 107f9ff03113bc851be04259ad671abc8ff10634..0f23a1b61b099309d7d7733f10fb6abbc8e888bb 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.3.66
+Version: 1.3.67
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.66.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.67.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif
index 58a1b2b99f316141b4cddac78c9ecc67dba72dde..540ce7ac7f3a21307a600e575b74fd689b768cc9 100644 (file)
@@ -1,12 +1,12 @@
 
 (define (attached-to-stem slur dir)
-  (let* ((note-columns (get-pointer slur 'note-columns))
+  (let* ((note-columns (ly-get-elt-pointer slur 'note-columns))
         (col (if (= dir 1) (car note-columns) (car (reverse note-columns))))
-        (stem (get-pointer col 'stem)))
+        (stem (ly-get-elt-pointer col 'stem)))
     (and
-     (eq? col (get-bound slur dir))
+     (eq? col (ly-get-spanner-bound slur dir))
      stem
-     (get-pointer stem 'heads))))
+     (ly-get-elt-pointer stem 'heads))))
 
 
 ;; Slur-extremity-rules is a list of rules.  Each rule is a pair 
 
 (define slur-extremity-rules
   (list
-    (cons (lambda (slur dir)
-       ;; urg, code dup
-       (let* ((note-columns (get-pointer slur 'note-columns))
-        (col (if (= dir 1) (car note-columns) (car (reverse note-columns))))
-        (stem (get-pointer col 'stem)))
-        (and stem
-             (not (= (get-property slur 'direction) 
-                     (get-property stem 'direction))))))  'head)
+   (cons (lambda (slur dir)
+          ;; urg, code dup
+          (let* ((note-columns (ly-get-elt-pointer slur 'note-columns))
+                 (col (if (= dir 1) (car note-columns) (car (reverse note-columns))))
+                 (stem (ly-get-elt-pointer col 'stem)))
+            (and stem
+                 (not (= (ly-get-elt-property slur 'direction) 
+                         (ly-get-elt-property stem 'direction))))))  'head)
 
-    (cons (lambda (slur dir)
-           ;; if attached-to-stem
-           (and (attached-to-stem slur dir)
-                ;; and got beam
-                ;; urg, code dup
-                (let* ((note-columns (get-pointer slur 'note-columns))
-                       (col (if (= dir 1) (car note-columns) (car (reverse note-columns))))
-                       (stem (get-pointer col 'stem)))
-                  (and stem
-                       (get-pointer stem 'beam)
-                       ;; and beam on same side as slur
-                       (let ((beaming (get-property stem 'beaming)))
-                         (if (pair? beaming)
-                             (<= 1
-                                 (if (= dir -1) (car beaming) (cdr beaming)))
-                             #f))))))
-         'stem)
+   (cons (lambda (slur dir)
+          ;; if attached-to-stem
+          (and (attached-to-stem slur dir)
+               ;; and got beam
+               ;; urg, code dup
+               (let* ((note-columns (ly-get-elt-pointer slur 'note-columns))
+                      (col (if (= dir 1) (car note-columns) (car (reverse note-columns))))
+                      (stem (ly-get-elt-pointer col 'stem)))
+                 (and stem
+                      (ly-get-elt-pointer stem 'beam)
+                      ;; and beam on same side as slur
+                      (let ((beaming (ly-get-elt-property stem 'beaming)))
+                        (if (pair? beaming)
+                            (<= 1
+                                (if (= dir -1) (car beaming) (cdr beaming)))
+                            #f))))))
+        'stem)
 
-    (cons (lambda (slur dir) (not (attached-to-stem slur dir)))  'loose-end)
+   (cons (lambda (slur dir) (not (attached-to-stem slur dir)))  'loose-end)
 
-    ;; default case, attach to head
-    (cons (lambda (x y) #t)  'head)
-    ))
+   ;; default case, attach to head
+   (cons (lambda (x y) #t)  'head)
+   ))
 
 
 ;; This list defines the offsets for each type of attachment.