]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.0.1
authorfred <fred>
Sun, 24 Mar 2002 20:12:43 +0000 (20:12 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:12:43 +0000 (20:12 +0000)
52 files changed:
lily/bar-engraver.cc [new file with mode: 0644]
lily/beam-engraver.cc [new file with mode: 0644]
lily/collision-engraver.cc [new file with mode: 0644]
lily/head-engraver.cc [new file with mode: 0644]
lily/include/bar-align-engraver.hh [new file with mode: 0644]
lily/include/bar-column-engraver.hh [new file with mode: 0644]
lily/include/bar-engraver.hh [new file with mode: 0644]
lily/include/bar-number-engraver.hh [new file with mode: 0644]
lily/include/beam-engraver.hh [new file with mode: 0644]
lily/include/clef-engraver.hh [new file with mode: 0644]
lily/include/collision-engraver.hh [new file with mode: 0644]
lily/include/dynamic-engraver.hh [new file with mode: 0644]
lily/include/font-size-engraver.hh [new file with mode: 0644]
lily/include/head-engraver.hh [new file with mode: 0644]
lily/include/line-group-group-engraver.hh [new file with mode: 0644]
lily/include/local-key-engraver.hh [new file with mode: 0644]
lily/include/pitch-squash-engraver.hh [new file with mode: 0644]
lily/include/plet-swallow-engraver.hh
lily/include/priority-halign-engraver.hh [new file with mode: 0644]
lily/include/rest-collision-engraver.hh [new file with mode: 0644]
lily/include/rest-engraver.hh [new file with mode: 0644]
lily/include/score-engraver.hh [new file with mode: 0644]
lily/include/score-priority-engraver.hh [new file with mode: 0644]
lily/include/script-engraver.hh [new file with mode: 0644]
lily/include/separating-line-group-engraver.hh [new file with mode: 0644]
lily/include/slur-engraver.hh [new file with mode: 0644]
lily/include/span-score-bar-engraver.hh [new file with mode: 0644]
lily/include/staff-sym-engraver.hh [new file with mode: 0644]
lily/include/stem-engraver.hh [new file with mode: 0644]
lily/include/swallow-engraver.hh [new file with mode: 0644]
lily/include/tie-engraver.hh [new file with mode: 0644]
lily/include/ties-engraver.hh [new file with mode: 0644]
lily/include/time-signature-engraver.hh [new file with mode: 0644]
lily/include/timing-engraver.hh [new file with mode: 0644]
lily/include/type-swallow-trans.hh
lily/include/vertical-align-engraver.hh [new file with mode: 0644]
lily/line-group-group-engraver.cc [new file with mode: 0644]
lily/paper-def.cc
lily/pitch-squash-engraver.cc [new file with mode: 0644]
lily/priority-halign-engraver.cc [new file with mode: 0644]
lily/rest-collision-engraver.cc [new file with mode: 0644]
lily/rest-engraver.cc [new file with mode: 0644]
lily/score-priority-engraver.cc [new file with mode: 0644]
lily/script-engraver.cc [new file with mode: 0644]
lily/separating-line-group-engraver.cc [new file with mode: 0644]
lily/staff-sym-engraver.cc [new file with mode: 0644]
lily/stem-engraver.cc [new file with mode: 0644]
lily/swallow-engraver.cc [new file with mode: 0644]
lily/ties-engraver.cc [new file with mode: 0644]
lily/time-description.cc
make/Makefile
stepmake/make/Makefile [new file with mode: 0644]

diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc
new file mode 100644 (file)
index 0000000..7ed4bad
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+  bar-reg.cc -- implement Bar_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "bar-engraver.hh"
+#include "bar.hh"
+#include "musical-request.hh"
+#include "multi-measure-rest.hh"
+#include "command-request.hh"
+#include "time-description.hh"
+#include "engraver-group.hh"
+
+Bar_engraver::Bar_engraver()
+{
+  bar_p_ =0;
+  do_post_move_processing();
+}
+
+bool
+Bar_engraver::do_try_request (Request*r_l)
+{
+  Command_req* c_l = r_l->access_Command_req ();
+  if (!c_l|| !c_l->access_Bar_req ()) 
+    return false;
+  Bar_req  * b= c_l->access_Bar_req ();
+  if (bar_req_l_ && bar_req_l_->equal_b (b))
+    return false;
+  
+  bar_req_l_ = b;
+
+  return true;
+}
+
+void
+Bar_engraver::create_bar ()
+{
+  if (!bar_p_)
+    {
+      bar_p_ = new Bar;
+      bar_p_->break_priority_i_  = 0;
+      announce_element (Score_element_info (bar_p_, bar_req_l_));
+    }
+}
+
+
+void 
+Bar_engraver::do_creation_processing ()
+{
+  create_bar ();
+  bar_p_->type_str_ = "";
+}
+
+void
+Bar_engraver::do_removal_processing ()
+{
+  if (bar_p_) 
+    {
+      typeset_element (bar_p_);
+      bar_p_ =0;
+    }
+}
+
+void
+Bar_engraver::do_process_requests()
+{  
+  if (bar_req_l_) 
+    {
+      if (!bar_p_)
+       create_bar ();    
+
+      bar_p_->type_str_ = bar_req_l_->type_str_;
+    }
+  else 
+    {
+      Time_description const *time = get_staff_info().time_C_;
+      if (time && !time->whole_in_measure_) 
+       create_bar ();
+    }
+  
+  if (!bar_p_)
+    {
+      Break_req r;
+      r.penalty_i_ = Break_req::DISALLOW;
+      daddy_grav_l ()->try_request (&r);
+    }
+}
+
+
+void 
+Bar_engraver::do_pre_move_processing()
+{
+  if (bar_p_) 
+    {
+      typeset_element (bar_p_);
+      bar_p_ =0;
+    }
+}
+
+void
+Bar_engraver::do_post_move_processing()
+{
+  bar_req_l_ = 0;
+}
+
+
+IMPLEMENT_IS_TYPE_B1(Bar_engraver,Engraver);
+ADD_THIS_TRANSLATOR(Bar_engraver);
+
+
diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc
new file mode 100644 (file)
index 0000000..6ef0ba0
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+  beam-grav.cc -- implement Beam_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+#include "duration-convert.hh"
+#include "time-description.hh"
+#include "beam-engraver.hh"
+#include "stem.hh"
+#include "beam.hh"
+#include "musical-request.hh"
+#include "grouping.hh"
+#include "p-col.hh"
+#include "warn.hh"
+
+Beam_engraver::Beam_engraver()
+{
+  span_reqs_drul_[LEFT] = span_reqs_drul_[RIGHT] =0;
+  beam_p_ =0;
+  current_grouping_p_ =0;
+}
+
+bool
+Beam_engraver::do_try_request(Request*r)
+{
+  Musical_req* mus_l = r->access_Musical_req ();
+  if (!mus_l)
+    return false;
+
+  Beam_req* b = mus_l->access_Beam_req ();
+  if (!b)
+    return false;
+
+  if (bool (beam_p_) == bool (b->spantype == Span_req::START))
+    return false;
+
+  Direction d = (!beam_p_) ? LEFT : RIGHT;
+  if (span_reqs_drul_[d] && !span_reqs_drul_[d]->equal_b (mus_l))
+    return false;
+
+  span_reqs_drul_[d] = b;
+  return true;
+}
+
+void
+Beam_engraver::do_process_requests()
+{
+  if (beam_p_ || !span_reqs_drul_[LEFT])
+    return;
+
+  current_grouping_p_ = new Rhythmic_grouping;
+  beam_p_ = new Beam;
+
+  Scalar prop = get_property ("beamslopedamping");
+  if (prop.isnum_b ()) 
+    beam_p_->damping_i_ = prop;
+
+  prop = get_property ("beamquantisation");
+  if (prop.isnum_b ()) 
+    beam_p_->quantisation_ = (Beam::Quantisation)(int)prop;
+  announce_element (Score_element_info (beam_p_, span_reqs_drul_[LEFT]));
+}
+
+void
+Beam_engraver::do_pre_move_processing()
+{
+  if (!beam_p_ || !span_reqs_drul_[RIGHT]) 
+    return;
+
+  Rhythmic_grouping const * rg_C = get_staff_info().rhythmic_C_;
+  rg_C->extend (current_grouping_p_->interval());
+  beam_p_->set_grouping (*rg_C, *current_grouping_p_);
+  typeset_element (beam_p_);
+  beam_p_ = 0;
+
+  delete current_grouping_p_;
+  current_grouping_p_ = 0;
+
+  span_reqs_drul_[RIGHT] = span_reqs_drul_[LEFT] = 0;
+}
+
+void
+Beam_engraver::do_removal_processing()
+{
+  if (beam_p_)
+    {
+      span_reqs_drul_[LEFT]->warning (_("unterminated beam"));
+      typeset_element (beam_p_);
+      beam_p_ =0;
+    }
+}
+
+
+void
+Beam_engraver::acknowledge_element (Score_element_info i)
+{
+  if (!beam_p_ || !i.elem_l_->is_type_b (Stem::static_name ()))
+    return;
+
+  Stem* s = (Stem*)i.elem_l_->access_Item ();
+  if (!i.req_l_ || !i.req_l_->access_Musical_req () || !i.req_l_->access_Musical_req ()->access_Rhythmic_req ())
+    {
+      ::warning ( _("Stem must have Rhythmic structure."));
+      return;
+    }
+
+  Rhythmic_req *rhythmic_req = i.req_l_->access_Musical_req ()->access_Rhythmic_req ();
+  if (rhythmic_req->duration_.durlog_i_<= 2)
+    {
+      rhythmic_req->warning (_ ("stem doesn't fit in beam"));
+      return;
+    }
+
+  /*
+    TODO: do something sensible if it doesn't fit in the beam.
+   */
+  Moment start = get_staff_info().time_C_->whole_in_measure_;
+
+  if (!current_grouping_p_->child_fit_b (start))
+    {
+      String s (_("please fix me") + ": " 
+       + _f ("stem at %s doesn't fit in beam", now_moment ().str ()));
+      if (i.req_l_)
+       i.req_l_->warning(s);
+      else 
+       warning (s);
+    }
+  else
+    {
+      current_grouping_p_->add_child (start, rhythmic_req->duration ());
+      s->flag_i_ = rhythmic_req->duration_.durlog_i_;
+      beam_p_->add_stem (s);
+    }
+}
+IMPLEMENT_IS_TYPE_B1(Beam_engraver, Engraver);
+ADD_THIS_TRANSLATOR(Beam_engraver);
diff --git a/lily/collision-engraver.cc b/lily/collision-engraver.cc
new file mode 100644 (file)
index 0000000..be5ab22
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+  collision-reg.cc -- implement Collision_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "note-column.hh"
+#include "collision-engraver.hh"
+#include "collision.hh"
+
+void
+Collision_engraver::process_acknowledged ()
+{
+   
+  if (col_p_ || note_column_l_arr_.size () < 2)
+      return ;
+  if (!col_p_) 
+    {
+      col_p_ = new Collision;
+      announce_element (Score_element_info (col_p_,0));
+    }
+  for (int i=0; i< note_column_l_arr_.size (); i++)
+    col_p_->add_column (note_column_l_arr_[i]);
+}
+
+void
+Collision_engraver::acknowledge_element (Score_element_info i)
+{
+  if (i.elem_l_->is_type_b (Note_column::static_name ()))
+    {
+      Note_column * c = (Note_column*) i.elem_l_->access_Item ();
+      if (c->rest_b ())
+       return ;
+
+      note_column_l_arr_.push (c);
+    }
+}
+
+void
+Collision_engraver::do_pre_move_processing()
+{
+  if (col_p_) 
+    {
+      typeset_element (col_p_);
+      col_p_ =0;
+    }
+  note_column_l_arr_.clear ();
+}
+
+Collision_engraver::Collision_engraver()
+{
+  col_p_ =0;
+}
+
+
+IMPLEMENT_IS_TYPE_B1(Collision_engraver,Engraver);
+ADD_THIS_TRANSLATOR(Collision_engraver);
diff --git a/lily/head-engraver.cc b/lily/head-engraver.cc
new file mode 100644 (file)
index 0000000..c8c5e79
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+  head-grav.cc -- part of GNU LilyPond
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "note-head.hh"
+#include "head-engraver.hh"
+#include "paper-def.hh"
+#include "musical-request.hh"
+#include "dots.hh"
+
+Note_head_engraver::Note_head_engraver()
+{
+  dot_p_=0;
+  note_p_ = 0;
+  note_req_l_ =0;
+}
+
+bool
+Note_head_engraver::do_try_request (Request *req_l) 
+{
+  if (note_req_l_)
+    return false;
+  
+  if (!(req_l->access_Musical_req () && req_l->access_Musical_req ()->access_Note_req ()))
+
+    return false;
+  
+  note_req_l_=req_l->access_Musical_req ()->access_Rhythmic_req ();
+  return true;
+}
+
+void
+Note_head_engraver::do_process_requests()
+{
+  if (!note_req_l_ || note_p_)
+    return;
+  
+  note_p_  = new Note_head;
+  note_p_->balltype_i_ = note_req_l_->duration_.durlog_i_;
+  note_p_->dots_i_ = note_req_l_->duration_.dots_i_;
+  if (note_p_->dots_i_)
+    {
+      dot_p_ = new Dots;
+      note_p_->dots_l_ = dot_p_;
+      announce_element (Score_element_info (dot_p_,0));
+    }
+  
+  note_p_->position_i_ = note_req_l_->access_Note_req ()->pitch_.steps ();
+
+  
+  Score_element_info itinf (note_p_,note_req_l_);
+  announce_element (itinf);
+}
+void
+Note_head_engraver::do_pre_move_processing()
+{
+  if (note_p_) 
+    {
+      typeset_element (note_p_);
+      note_p_ = 0;
+    }
+  if (dot_p_)
+    {
+      typeset_element (dot_p_);
+      dot_p_ =0;
+    }
+}
+void
+Note_head_engraver::do_post_move_processing()
+{
+  note_req_l_ = 0;
+}
+
+
+IMPLEMENT_IS_TYPE_B1(Note_head_engraver,Engraver);
+ADD_THIS_TRANSLATOR(Note_head_engraver);
diff --git a/lily/include/bar-align-engraver.hh b/lily/include/bar-align-engraver.hh
new file mode 100644 (file)
index 0000000..a0ff903
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+  bar-align-engraver.hh -- declare 
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef BAR_ALIGN_GRAV_HH
+#define BAR_ALIGN_GRAV_HH
+
+#endif // BAR_ALIGN_GRAV_HH
diff --git a/lily/include/bar-column-engraver.hh b/lily/include/bar-column-engraver.hh
new file mode 100644 (file)
index 0000000..1c186b6
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  bar-column-engraver.hh -- declare Bar_column_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef BAR_COLUMN_GRAV_HH
+#define BAR_COLUMN_GRAV_HH
+
+#include "engraver.hh"
+#include "parray.hh"
+
+/// couple bars and appropriate scripts
+class Bar_column_engraver :public Engraver {
+  Bar_column *barcol_p_;
+  Link_array<Script>  script_l_arr_;
+  int break_priority_i_;
+
+  Bar *bar_l_;
+  void create_column ();
+protected:
+  virtual void acknowledge_element (Score_element_info);
+  virtual void process_acknowledged ();
+  virtual void do_pre_move_processing ();
+  virtual void do_creation_processing ();
+  virtual void do_process_requests ();
+  virtual void do_post_move_processing();
+public:
+  TRANSLATOR_CLONE(Bar_column_engraver);
+  Bar_column_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+
+#endif // BAR_COLUMN_GRAV_HH
diff --git a/lily/include/bar-engraver.hh b/lily/include/bar-engraver.hh
new file mode 100644 (file)
index 0000000..151adf2
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  bar-engraver.hh -- declare Bar_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef BARGRAV_HH
+#define BARGRAV_HH
+#include "engraver.hh"
+
+/**
+  generate bars. Either user ("|:"), or default (new measure)
+  */
+class Bar_engraver : public Engraver {
+  Bar_req * bar_req_l_;
+  Bar * bar_p_;
+
+  void create_bar ();
+public:
+  TRANSLATOR_CLONE(Bar_engraver);
+  Bar_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+
+     
+protected:
+  virtual void do_creation_processing ();
+  virtual void do_removal_processing ();
+  virtual bool do_try_request (Request *req_l);
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
+};
+
+#endif // BARGRAV_HH
diff --git a/lily/include/bar-number-engraver.hh b/lily/include/bar-number-engraver.hh
new file mode 100644 (file)
index 0000000..69caa55
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+  bar-number-engraver.hh -- declare Bar_number_grav
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef BAR_NUMBER_GRAV_HH
+#define BAR_NUMBER_GRAV_HH
+
+#include "engraver.hh"
+
+/**
+  catch bars, and put a number over them.
+ */
+class Bar_number_engraver : public Engraver {
+  Script * script_p_;
+protected:
+
+  void acknowledge_element (Score_element_info);
+  void do_pre_move_processing();
+public:
+  TRANSLATOR_CLONE(Bar_number_engraver);
+  Bar_number_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+#endif // BAR_NUMBER_GRAV_HH
diff --git a/lily/include/beam-engraver.hh b/lily/include/beam-engraver.hh
new file mode 100644 (file)
index 0000000..ccb96d1
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  beam-engraver.hh -- declare Beam_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef BEAM_GRAV_HH
+#define BEAM_GRAV_HH
+
+#include "engraver.hh"
+#include "drul-array.hh"
+
+/**
+  Generate a beam. Eats stems.
+ */
+class Beam_engraver : public Engraver
+{
+  Drul_array<Beam_req *> span_reqs_drul_;
+  Beam *beam_p_;
+  Rhythmic_grouping *current_grouping_p_;
+
+public:
+  TRANSLATOR_CLONE(Beam_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Beam_engraver();
+protected:
+  virtual void do_removal_processing();
+  virtual void do_process_requests();
+  virtual bool do_try_request (Request*);
+  virtual void acknowledge_element (Score_element_info);
+  virtual void do_pre_move_processing();
+};
+
+#endif // BEAM_GRAV_HH
diff --git a/lily/include/clef-engraver.hh b/lily/include/clef-engraver.hh
new file mode 100644 (file)
index 0000000..56c4fbc
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+  clef-engraver.hh -- declare Clef_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1996,  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef CLEF_GRAV_HH
+#define CLEF_GRAV_HH
+
+#include "scalar.hh"
+#include "array.hh"
+#include "engraver.hh"
+#include "direction.hh"
+
+/// where is c-0 in the staff?
+class Clef_engraver : public  Engraver {
+  Clef_item *clef_p_;
+  Clef_change_req * clef_req_l_;
+  void create_clef();
+  void read_req (Clef_change_req*);
+  bool set_type (String);
+protected:
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_removal_processing();
+  virtual void do_creation_processing();
+  virtual void do_post_move_processing();
+  virtual bool do_try_request (Request*);
+  virtual void acknowledge_element (Score_element_info);
+public:
+  TRANSLATOR_CLONE(Clef_engraver);
+  int c0_position_i_;
+  int clef_position_i_;
+  Direction octave_dir_;
+  String clef_type_str_;
+
+  /* ************** */
+   
+  Clef_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+   
+};
+#endif 
diff --git a/lily/include/collision-engraver.hh b/lily/include/collision-engraver.hh
new file mode 100644 (file)
index 0000000..d4a674f
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+  collision-engraver.hh -- declare Collision_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef COLLISION_GRAV_HH
+#define COLLISION_GRAV_HH
+
+#include "engraver.hh"
+
+class Collision_engraver : public Engraver {
+  Collision* col_p_;
+  Link_array<Note_column> note_column_l_arr_;
+
+protected:
+  virtual void acknowledge_element (Score_element_info);
+  virtual void process_acknowledged ();
+  virtual void do_pre_move_processing();
+public:
+  TRANSLATOR_CLONE(Collision_engraver);
+  Collision_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+#endif // COLLISION_GRAV_HH
diff --git a/lily/include/dynamic-engraver.hh b/lily/include/dynamic-engraver.hh
new file mode 100644 (file)
index 0000000..1c2a574
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+  dynamic-engraver.hh -- declare Dynamic_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef DYNAMIC_GRAV_HH
+#define DYNAMIC_GRAV_HH
+
+#include "engraver.hh"
+
+class Dynamic_engraver : public Engraver {
+  Direction dir_;
+  Text_item * dynamic_p_;
+  Crescendo * to_end_cresc_p_;
+  Crescendo * cresc_p_;
+  Span_dynamic_req * cresc_req_l_;
+  Array<Dynamic_req*> dynamic_req_l_arr_;
+  /* ************** */
+public:
+  TRANSLATOR_CLONE(Dynamic_engraver);
+  Dynamic_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+protected:
+  virtual void do_removal_processing ();
+  virtual void acknowledge_element (Score_element_info);
+  virtual bool do_try_request (Request *req_l);
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
+};
+
+#endif // DYNAMIC_GRAV_HH
diff --git a/lily/include/font-size-engraver.hh b/lily/include/font-size-engraver.hh
new file mode 100644 (file)
index 0000000..a108408
--- /dev/null
@@ -0,0 +1,27 @@
+/*   
+  font-size-engraver.hh -- declare Font_size_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef FONT_SIZE_GRAV_HH
+#define FONT_SIZE_GRAV_HH
+
+#include "engraver.hh"
+
+class Font_size_engraver : public Engraver {
+  int size_i_;
+protected:
+  virtual void acknowledge_element (Score_element_info);
+  virtual void  do_process_requests ();
+public:
+  Font_size_engraver ();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE (Font_size_engraver);
+};
+
+#endif /* FONT_SIZE_GRAV_HH */
+
diff --git a/lily/include/head-engraver.hh b/lily/include/head-engraver.hh
new file mode 100644 (file)
index 0000000..0890183
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  head-engraver.hh -- part of GNU LilyPond
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef HEADGRAV_HH
+#define HEADGRAV_HH
+#include "engraver.hh"
+
+/**
+  make balls and rests
+ */
+class Note_head_engraver : public Engraver {
+  Note_head* note_p_;
+  Dots * dot_p_;
+  Rhythmic_req * note_req_l_;
+    
+public:
+  TRANSLATOR_CLONE(Note_head_engraver);
+  Note_head_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+protected:
+  virtual bool do_try_request (Request *req_l) ;
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
+
+};
+
+
+#endif // HEADGRAV_HH
diff --git a/lily/include/line-group-group-engraver.hh b/lily/include/line-group-group-engraver.hh
new file mode 100644 (file)
index 0000000..c31fc75
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  line-group-engraver.hh -- declare Line_group_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef LINE_GROUP_GRAV_HH
+#define LINE_GROUP_GRAV_HH
+
+#include "engraver-group.hh"
+#include "lily-proto.hh"
+
+/**
+  Engravers put elements on the same or lowel level in a line
+  */
+class Line_group_engraver_group : public Engraver_group_engraver {
+protected:
+  Vertical_group_spanner *staffline_p_;   
+
+  virtual void create_line_spanner ();
+  virtual void do_creation_processing();
+  virtual void do_removal_processing();
+  virtual void typeset_element (Score_element*);
+virtual void do_announces ();
+
+public:
+  TRANSLATOR_CLONE(Line_group_engraver_group);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Line_group_engraver_group();
+};
+
+
+#endif // LINE_GROUP_GRAV_HH
+
diff --git a/lily/include/local-key-engraver.hh b/lily/include/local-key-engraver.hh
new file mode 100644 (file)
index 0000000..7599d08
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+  local-key-engraver.hh -- declare Local_key_engraver
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef LOCALKEYGRAV_HH
+#define LOCALKEYGRAV_HH
+
+#include "engraver.hh"
+#include "key.hh"
+#include "parray.hh"
+
+struct Local_key_engraver : Engraver {
+    Local_key_item *key_item_p_;
+protected:
+  TRANSLATOR_CLONE(Local_key_engraver);
+  virtual void do_process_requests();
+  virtual void acknowledge_element (Score_element_info);
+  virtual void do_pre_move_processing();
+  virtual void do_creation_processing ();
+  virtual void process_acknowledged ();
+public:
+  
+  Key local_key_;
+  Key const *key_C_;
+  Array<Note_req* > mel_l_arr_;
+  Array<Item* > support_l_arr_;
+  Link_array<Item  > forced_l_arr_;
+  Link_array<Item > tied_l_arr_;
+  Local_key_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+
+#endif // LOCALKEYGRAV_HH
diff --git a/lily/include/pitch-squash-engraver.hh b/lily/include/pitch-squash-engraver.hh
new file mode 100644 (file)
index 0000000..dbf432a
--- /dev/null
@@ -0,0 +1,24 @@
+/*   
+  pitch-squash-engraver.hh -- declare Pitch_squash_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef PITCH_SQUASH_GRAV_HH
+#define PITCH_SQUASH_GRAV_HH
+
+#include "engraver.hh"
+
+class Pitch_squash_engraver : public Engraver {
+public:
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE (Pitch_squash_engraver);
+  virtual void acknowledge_element (Score_element_info);
+  
+};
+
+#endif /* PITCH_SQUASH_GRAV_HH */
+
index 8dd6affd4ea2fadb9948b984924f57237d8eb848..0dbb142774a716bac806d05ed8cc1d9a7eb27ca4 100644 (file)
@@ -3,14 +3,14 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef PLET_SWALLOW_ENGRAVER_HH
 #define PLET_SWALLOW_ENGRAVER_HH
 
-#include "swallow-grav.hh"
+#include "swallow-engraver.hh"
 
 /**
   This engraver swallows plets silently.
diff --git a/lily/include/priority-halign-engraver.hh b/lily/include/priority-halign-engraver.hh
new file mode 100644 (file)
index 0000000..5d91ac4
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+  score-halign-engraver.hh -- declare Score_horizontal_align_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef FSCORE_HALIGN_GRAV_HH
+#define FSCORE_HALIGN_GRAV_HH
+
+#include "engraver.hh"
+
+class Priority_horizontal_align_engraver : public Engraver {
+  Break_align_item * halign_p_;
+public:
+  TRANSLATOR_CLONE(Priority_horizontal_align_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Priority_horizontal_align_engraver();
+protected:
+  virtual void acknowledge_element (Score_element_info);
+  virtual void do_pre_move_processing();
+};
+#endif // Priority_HALIGN_GRAV_HH
diff --git a/lily/include/rest-collision-engraver.hh b/lily/include/rest-collision-engraver.hh
new file mode 100644 (file)
index 0000000..c62c4e2
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+  rest-collision-engraver.hh -- declare Rest_collision_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef REST_COLLISION_GRAV_HH
+#define REST_COLLISION_GRAV_HH
+
+#include "array.hh"
+#include "engraver.hh"
+
+class Rest_collision_engraver : public Engraver {
+  Rest_collision* rest_collision_p_;
+
+  Link_array<Note_column> note_column_l_arr_;
+protected:
+  virtual void acknowledge_element (Score_element_info);
+  virtual void process_acknowledged ();
+  virtual void do_pre_move_processing();
+public:
+  TRANSLATOR_CLONE(Rest_collision_engraver);
+  Rest_collision_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+#endif // REST_COLLISION_GRAV_HH
diff --git a/lily/include/rest-engraver.hh b/lily/include/rest-engraver.hh
new file mode 100644 (file)
index 0000000..0081454
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+  rest-engraver.hh -- declare Engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 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_;
+  Dots * dot_p_;
+  Rest * rest_p_;
+protected:
+  virtual bool do_try_request (Request *);
+  virtual void do_pre_move_processing ();
+  virtual void do_post_move_processing ();
+  virtual void do_process_requests ();
+public:
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  TRANSLATOR_CLONE(Rest_engraver);
+  Rest_engraver ();
+};
+#endif // REST_GRAV_HH
diff --git a/lily/include/score-engraver.hh b/lily/include/score-engraver.hh
new file mode 100644 (file)
index 0000000..5d59fc0
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+  score-engraver.hh -- declare Score_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef SCORE_GRAV_HH
+#define SCORE_GRAV_HH
+
+#include "engraver-group.hh"
+#include "global-translator.hh"
+
+/**
+  Top level engraver. Puts elements into appropriate columns.
+ */
+class Score_engraver : 
+  public Engraver_group_engraver, public Global_translator 
+{
+  Line_of_score * scoreline_l_;
+  int break_penalty_i_;
+  int breaks_i_;
+
+  Link_array<Score_element> elem_p_arr_;
+    
+  Score_column* command_column_l_;
+  Score_column* musical_column_l_;
+    
+  void set_columns (Score_column*,Score_column*);
+  void typeset_all();
+    
+public:
+  TRANSLATOR_CLONE(Score_engraver);
+  Paper_score * pscore_p_;
+  DECLARE_MY_RUNTIME_TYPEINFO;
+
+  Score_engraver();
+  virtual Music_output *get_output_p ();  
+protected:   
+  virtual void prepare (Moment);
+  virtual void finish();
+  virtual void process();
+  virtual int depth_i() const { return Global_translator::depth_i ();}
+
+protected:
+  /* Engraver_group_engraver interface */
+  virtual Staff_info get_staff_info() const;
+  virtual bool do_try_request (Request*);
+  virtual void do_creation_processing();
+  virtual void do_removal_processing();
+  virtual void announce_element (Score_element_info);
+  virtual void do_announces();
+  virtual void typeset_element (Score_element*elem_p);
+  virtual void do_pre_move_processing();
+  virtual void do_add_processing ();
+};
+
+#endif // SCORE_GRAV_HH
diff --git a/lily/include/score-priority-engraver.hh b/lily/include/score-priority-engraver.hh
new file mode 100644 (file)
index 0000000..c682725
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+  score-align-engraver.hh -- declare Type_align_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef SCOREF_ALIGN_GRAV_HH
+#define SCOREF_ALIGN_GRAV_HH
+
+#include "engraver.hh"
+#include "assoc.hh"
+
+/**
+  Group  a number of items across staffs
+ */
+class Score_priority_engraver : public Engraver
+{
+  Assoc<int, Horizontal_group_item  *> align_p_assoc_;
+public:
+  TRANSLATOR_CLONE(Score_priority_engraver);
+  Score_priority_engraver ();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+protected:
+  virtual void acknowledge_element (Score_element_info);
+  virtual void do_pre_move_processing();
+};
+
+#endif // SCORE_ALIGN_GRAV_HH
diff --git a/lily/include/script-engraver.hh b/lily/include/script-engraver.hh
new file mode 100644 (file)
index 0000000..6e4ed01
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+  script-engraver.hh -- part of GNU LilyPond
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef SCRIPTGRAV_HH
+#define SCRIPTGRAV_HH
+
+#include "engraver.hh"
+
+
+class Script_engraver : public Engraver {
+  Array<Script *> script_p_arr_;
+  Array<Script_req *> script_req_l_arr_;
+
+public:
+  TRANSLATOR_CLONE(Script_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Script_engraver();
+protected:
+  virtual bool do_try_request (Request*);
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
+
+};
+
+#endif // SCRIPTGRAV_HH
diff --git a/lily/include/separating-line-group-engraver.hh b/lily/include/separating-line-group-engraver.hh
new file mode 100644 (file)
index 0000000..d9419a9
--- /dev/null
@@ -0,0 +1,34 @@
+/*   
+  separating-line-group-engraver.hh -- declare Separating_line_group_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef SEPARATING_LINE_GROUP_GRAV_HH
+#define SEPARATING_LINE_GROUP_GRAV_HH
+
+#include "engraver.hh"
+
+class Separating_line_group_engraver : public Engraver
+{
+protected:
+  Single_malt_grouping_item * break_malt_p_;
+  Single_malt_grouping_item* nobreak_malt_p_;
+  Separating_group_spanner * sep_span_p_;
+  
+  virtual void acknowledge_element (Score_element_info);
+  virtual void do_creation_processing ();
+  virtual void do_removal_processing ();
+  virtual void do_pre_move_processing ();
+public:
+  Separating_line_group_engraver ();
+  TRANSLATOR_CLONE (Separating_line_group_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+
+
+#endif /* SEPARATING_LINE_GROUP_GRAV_HH */
+
diff --git a/lily/include/slur-engraver.hh b/lily/include/slur-engraver.hh
new file mode 100644 (file)
index 0000000..75c21d0
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+  slur-engraver.hh -- declare Slur_engraver
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef SLURGRAV_HH
+#define SLURGRAV_HH
+
+#include "engraver.hh"
+
+class Slur_engraver :public Engraver {
+  Array<Slur_req*> requests_arr_;
+  Array<Slur_req*> new_slur_req_l_arr_;
+  Array<Slur *> slur_l_stack_;
+  Array<Slur*> end_slur_l_arr_;
+  Direction dir_;
+
+protected:
+  virtual bool do_try_request (Request*);
+  virtual void do_process_requests();
+  virtual void acknowledge_element (Score_element_info);
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing();
+  virtual void do_removal_processing ();
+
+public:
+  TRANSLATOR_CLONE(Slur_engraver);
+  Slur_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+
+#endif // SLURGRAV_HH
diff --git a/lily/include/span-score-bar-engraver.hh b/lily/include/span-score-bar-engraver.hh
new file mode 100644 (file)
index 0000000..f75b775
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+  span-score-bar-engraver.hh -- declare Span_score_bar_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef SPAN_SCORE_BAR_GRAV_HH
+#define SPAN_SCORE_BAR_GRAV_HH
+
+#include "span-bar-engraver.hh"
+
+/** 
+
+  Make the bars that Span the entire score line (system). A
+  Span_bar_engraver which generates a special bar.
+
+  */
+
+class Span_score_bar_engraver : public Span_bar_engraver 
+{
+public:
+  TRANSLATOR_CLONE (Span_score_bar_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  virtual Span_bar* get_span_bar_p () const;
+};
+
+/**
+  Please don't shoot the piano player
+ */
+class Piano_bar_engraver :  public Span_score_bar_engraver
+{
+public:
+  TRANSLATOR_CLONE (Piano_bar_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  virtual Span_bar * get_span_bar_p () const;
+};
+
+/**
+  
+ */
+class Staff_group_bar_engraver :  public Span_score_bar_engraver
+{
+public:
+  TRANSLATOR_CLONE (Staff_group_bar_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  virtual Span_bar * get_span_bar_p () const;
+  virtual void acknowledge_element (Score_element_info);
+};
+
+#endif // SPAN_SCORE_BAR_GRAV_HH
diff --git a/lily/include/staff-sym-engraver.hh b/lily/include/staff-sym-engraver.hh
new file mode 100644 (file)
index 0000000..0cc98d6
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+  staff-sym-engraver.hh -- declare Staff_sym_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef STAFF_SYM_GRAV_HH
+#define STAFF_SYM_GRAV_HH
+#include "engraver.hh"
+#include "moment.hh"
+
+/**
+  Manage the staff symbol.
+ */
+class Staff_sym_engraver : public Engraver { 
+    Staff_symbol *span_p_;
+public:
+  TRANSLATOR_CLONE(Staff_sym_engraver);
+  Staff_sym_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+protected:
+  virtual ~Staff_sym_engraver();
+  virtual void fill_staff_info (Staff_info&);
+  virtual void do_removal_processing();
+  virtual void do_creation_processing();
+       
+};
+#endif // STAFF_SYM_GRAV_HH
diff --git a/lily/include/stem-engraver.hh b/lily/include/stem-engraver.hh
new file mode 100644 (file)
index 0000000..2fa376c
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+  stem-engraver.hh -- declare Stem_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef STEM_GRAV_HH
+#define STEM_GRAV_HH
+
+#include "engraver.hh"
+
+/**
+  Make stems upon receiving noteheads.
+ */
+class Stem_engraver : public Engraver
+{
+  Direction dir_;
+  int default_abbrev_i_;
+  Stem *stem_p_;
+  Abbreviation *abbrev_p_;
+  Rhythmic_req *rhythmic_req_l_;
+  Abbreviation_req* abbrev_req_l_;
+protected:
+  virtual void do_creation_processing ();
+  virtual void acknowledge_element (Score_element_info);
+  virtual void do_pre_move_processing ();
+  virtual bool do_try_request (Request*);
+
+public:
+  TRANSLATOR_CLONE(Stem_engraver);
+  Stem_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+
+#endif // STEM_GRAV_HH
diff --git a/lily/include/swallow-engraver.hh b/lily/include/swallow-engraver.hh
new file mode 100644 (file)
index 0000000..d2ca31a
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+  swallow-engraver.hh -- declare Swallow_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef SWALLOW_GRAV_HH
+#define SWALLOW_GRAV_HH
+
+#include "engraver.hh"
+
+/**
+  This engraver swallows everything given to it silently. The purpose of
+  this is to prevent spurious "request junked" warnings.
+ */
+class Swallow_engraver : public Engraver {
+protected:
+  bool do_try_request (Request*) ;
+public:
+  TRANSLATOR_CLONE(Swallow_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+#endif // SWALLOW_GRAV_HH
diff --git a/lily/include/tie-engraver.hh b/lily/include/tie-engraver.hh
new file mode 100644 (file)
index 0000000..8c75363
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+  tie-engraver.hh -- declare Tie_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef TIE_GRAV_HH
+#define TIE_GRAV_HH
+
+#include "engraver.hh"
+
+
+/**
+   Make a (one) tie from a request.  To be used in conjunction  with
+   the Note_head_engraver.  Obsolete now that Thread context is junked.
+ */
+class Tie_engraver : public Engraver {
+  Tie * end_tie_p_;
+  Tie * tie_p_;
+  Moment end_mom_;
+  Tie_req * req_l_;
+  Direction dir_;
+  Tie_req *end_req_l_;
+  Melodic_req * end_melodic_req_l_;
+  Melodic_req  * melodic_req_l_;
+    
+protected:
+  virtual void do_removal_processing ();
+  virtual void acknowledge_element (Score_element_info);
+  virtual bool do_try_request (Request*);
+  virtual void do_process_requests();
+  virtual void do_post_move_processing();
+  virtual void do_pre_move_processing();
+public:
+  TRANSLATOR_CLONE(Tie_engraver);
+  Tie_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+
+#endif // TIE_GRAV_HH
diff --git a/lily/include/ties-engraver.hh b/lily/include/ties-engraver.hh
new file mode 100644 (file)
index 0000000..9ad8497
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+  tie-engraver.hh -- declare Ties_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef Ties_GRAV_HH
+#define Ties_GRAV_HH
+
+#include "engraver.hh"
+
+struct Head_melodic_tuple {
+  Melodic_req *mel_l_ ;
+  Note_head *head_l_;
+
+  Head_melodic_tuple ();
+  Head_melodic_tuple (Note_head*, Melodic_req*);
+  static int compare (Head_melodic_tuple const &, Head_melodic_tuple const &);
+};
+
+class Ties_engraver : public Engraver {
+  Link_array<Tie> end_tie_p_arr_;
+  Link_array<Tie> tie_p_arr_;
+
+  Tie_req *req_l_;
+  Tie_req *end_req_l_;
+  Array<Head_melodic_tuple> head_mel_tuple_arr_;
+  Array<Head_melodic_tuple> left_head_mel_tuple_arr_;  
+  int processed_ack_pass_i_;
+  
+  Link_array<Melodic_req *> end_melodic_req_l_arr_;
+  Link_array<Melodic_req *> melodic_req_l_arr_;
+    
+protected:
+  virtual void do_removal_processing ();
+  virtual void acknowledge_element (Score_element_info);
+  virtual bool do_try_request (Request*);
+  virtual void do_process_requests();
+  virtual void process_acknowledged ();
+  virtual void do_post_move_processing();
+  virtual void do_pre_move_processing();
+public:
+  TRANSLATOR_CLONE(Ties_engraver);
+  Ties_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+
+#endif // Ties_GRAV_HH
diff --git a/lily/include/time-signature-engraver.hh b/lily/include/time-signature-engraver.hh
new file mode 100644 (file)
index 0000000..4d4f1ed
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+  time_signature-engraver.hh -- declare  Time_signature_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef METERGRAV_HH
+#define METERGRAV_HH
+#include "engraver.hh"
+#include "time-description.hh"
+#include "grouping.hh"
+
+/**
+  generate time_signatures. 
+  */
+class Time_signature_engraver : public Engraver {
+protected:
+  virtual void do_process_requests();
+  virtual void do_pre_move_processing();
+public:
+  TRANSLATOR_CLONE(Time_signature_engraver);
+  Time_signature * time_signature_p_;
+
+  Time_signature_engraver();
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+#endif // METERGRAV_HH
diff --git a/lily/include/timing-engraver.hh b/lily/include/timing-engraver.hh
new file mode 100644 (file)
index 0000000..9e0012a
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+  timing-engraver.hh -- declare Timing_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef TIMING_GRAV_HH
+#define TIMING_GRAV_HH
+
+#include "timing-translator.hh"
+
+/**
+  Do time bookkeeping
+ */
+class Timing_engraver : public Timing_translator, public Engraver
+{   
+protected:
+  virtual void fill_staff_info (Staff_info&);
+  virtual Engraver * engraver_l () { return Engraver::engraver_l (); }
+public:
+  TRANSLATOR_CLONE(Timing_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+};
+
+#endif // TIMING_GRAV_HH
index 76208a06cfe45f2125b65eefd29f68d7eba2b088..53eb7ea04ab6d6cd9240e55101b6c69c6692a883 100644 (file)
@@ -1,9 +1,9 @@
 /*
-  type-swallow-grav.hh -- declare Type_swallow_translator
+  type-swallow-engraver.hh -- declare Type_swallow_translator
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
diff --git a/lily/include/vertical-align-engraver.hh b/lily/include/vertical-align-engraver.hh
new file mode 100644 (file)
index 0000000..0f6bd5f
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+  vertical-align-engraver.hh -- declare Vertical_align_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#ifndef VERTICAL_ALIGN_GRAV_HH
+#define VERTICAL_ALIGN_GRAV_HH
+
+#include "engraver.hh"
+
+class Vertical_align_engraver : public Engraver {
+  Vertical_align_spanner * valign_p_;
+    
+public:
+  TRANSLATOR_CLONE(Vertical_align_engraver);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Vertical_align_engraver();
+protected:
+  virtual void acknowledge_element (Score_element_info);
+  virtual void do_creation_processing();
+  virtual void do_removal_processing();
+};
+
+#endif // VERTICAL_ALIGN_GRAV_HH
diff --git a/lily/line-group-group-engraver.cc b/lily/line-group-group-engraver.cc
new file mode 100644 (file)
index 0000000..108e76c
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+  staff-gravs.cc -- implement Line_group_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "staff-sym.hh"
+#include "vertical-group-spanner.hh"
+#include "command-request.hh"
+#include "bar.hh"
+#include "debug.hh"
+#include "line-group-group-engraver.hh"
+#include "p-col.hh"
+
+Line_group_engraver_group::Line_group_engraver_group()
+{
+  staffline_p_ =0;
+}
+
+
+void
+Line_group_engraver_group::typeset_element (Score_element *elem)
+{
+  if (!elem->axis_group_l_a_[Y_AXIS])
+    staffline_p_->add_element (elem);
+  Engraver_group_engraver::typeset_element (elem);
+}
+
+
+void
+Line_group_engraver_group::do_removal_processing()
+{
+  Engraver_group_engraver::do_removal_processing ();
+
+  staffline_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
+  Engraver_group_engraver::typeset_element (staffline_p_);
+  staffline_p_ = 0;
+}
+
+void
+Line_group_engraver_group::do_creation_processing()
+{
+  create_line_spanner ();
+  staffline_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
+  
+  Engraver::announce_element (Score_element_info (staffline_p_,0));
+}
+
+void
+Line_group_engraver_group::create_line_spanner ()
+{
+  staffline_p_ = new Vertical_group_spanner ;
+}
+
+void
+Line_group_engraver_group::do_announces ()
+{
+  Engraver_group_engraver::do_announces ();
+}
+
+
+IMPLEMENT_IS_TYPE_B1(Line_group_engraver_group,Engraver_group_engraver);
+ADD_THIS_TRANSLATOR(Line_group_engraver_group);
+
index fc867d6ac4f2015847e6ae1bebc6976c96714a4a..aafc2319289b20daf1a1a56ba4ace96b4e4ead21 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include <math.h>
 #include "paper-def.hh"
 #include "debug.hh"
 #include "lookup.hh"
-#include "dimen.hh"
+#include "dimension.hh"
 #include "assoc-iter.hh"
-#include "score-grav.hh"
+#include "score-engraver.hh"
 #include "p-score.hh"
 #include "identifier.hh"
 #include "main.hh"
 #include "scope.hh"
-
+#include "assoc.hh"
+#include "assoc-iter.hh"
 
 Paper_def::Paper_def ()
 {
-  lookup_p_ = 0;
+  lookup_p_assoc_p_ = new Assoc<int, Lookup*>;
   scope_p_ = new Scope;
 }
 
 Paper_def::~Paper_def ()
 {
+  for (Assoc_iter<int, Lookup*> ai(*lookup_p_assoc_p_); ai.ok (); ai++)
+    {
+      delete ai.val ();
+    }
+  
   delete scope_p_;
-  delete lookup_p_;
+  delete lookup_p_assoc_p_;
 }
 
 Paper_def::Paper_def (Paper_def const&s)
   : Music_output_def (s)
 {
-  lookup_p_ = s.lookup_p_? new Lookup (*s.lookup_p_) : 0;
-  if (lookup_p_)
+  lookup_p_assoc_p_ = new Assoc<int, Lookup*>;
+  for (Assoc_iter<int, Lookup*> ai(*s.lookup_p_assoc_p_); ai.ok (); ai++)
     {
-      lookup_p_->paper_l_ = this;
+      Lookup * l=new Lookup (*ai.val ());
+      l->paper_l_ = this;
+      set_lookup (ai.key(), l);
     }
+  
   scope_p_ = new Scope (*s.scope_p_);
 }
 
@@ -49,11 +58,15 @@ Real
 Paper_def::get_var (String s) const
 {
   if (!scope_p_->elt_b (s))
-    error (_ ("unknown paper variable `")  + s+"'");
-  Real * p = scope_p_->elem (s)->real ();
-  Real r = *p;
-  delete p;
-  return r;
+    error (_f ("unknown paper variable: `%s\'", s));
+  Real * p = scope_p_->elem (s)->access_Real (false);
+  if (!p)
+    {
+      error (_ ("not a real variable"));
+      return 0.0;
+    }
+
+  return *p;
 }
 
 Interval
@@ -121,12 +134,14 @@ Paper_def::geometric_spacing (Moment d) const
 }
 
 void
-Paper_def::set (Lookup*l)
+Paper_def::set_lookup (int i, Lookup*l)
 {
-  assert (l != lookup_p_);
-  delete lookup_p_;
-  lookup_p_ = l;
-  lookup_p_->paper_l_ = this;
+  if (lookup_p_assoc_p_->elt_b (i))
+    {
+      delete lookup_p_assoc_p_->elem (i);
+    }
+  l ->paper_l_ = this;
+  (*lookup_p_assoc_p_)[i] = l;
 }
 
 Real
@@ -180,24 +195,26 @@ Paper_def::print () const
 #ifndef NPRINT
   Music_output_def::print ();
   DOUT << "Paper {";
-  if (lookup_p_)
-    lookup_p_->print ();
+
+  for (Assoc_iter<int, Lookup*> ai(*lookup_p_assoc_p_); ai.ok (); ai++)
+    {
+      DOUT << "Lookup: " << ai.key () ;
+      ai.val ()->print ();
+    }
+
   for (Assoc_iter<String,Identifier*> i (*scope_p_); i.ok (); i++)
     {
       DOUT << i.key () << "= ";
-//      i.val ()->print ();
-// urg
-      DOUT << i.val ()->str () << "\n";
+      DOUT << i.val ()->str () << '\n';
     }
   DOUT << "}\n";
 #endif
 }
 
 Lookup const *
-Paper_def::lookup_l ()
+Paper_def::lookup_l (int i) const
 {
-  assert (lookup_p_);
-  return lookup_p_;
+  return (*lookup_p_assoc_p_)[i];
 }
 
 IMPLEMENT_IS_TYPE_B1 (Paper_def, Music_output_def);
@@ -209,7 +226,7 @@ Paper_def::TeX_output_settings_str () const
   for (Assoc_iter<String,Identifier*> i (*scope_p_); i.ok (); i++)
     s += String ("\\def\\mudelapaper") + i.key () 
       + "{" + i.val ()->str () + "}\n";
-  s +=  lookup_p_->texsetting + "% (Tex id)\n";
+  s +=  *scope_p_->elem ("texsetting")->access_String ();
   return s;
 }
 
diff --git a/lily/pitch-squash-engraver.cc b/lily/pitch-squash-engraver.cc
new file mode 100644 (file)
index 0000000..026027e
--- /dev/null
@@ -0,0 +1,25 @@
+/*   
+  pitch-squash-grav.cc --  implement Pitch_squash_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "pitch-squash-engraver.hh"
+#include "note-head.hh"
+
+void
+Pitch_squash_engraver::acknowledge_element (Score_element_info i)
+{
+  if (i.elem_l_->is_type_b (Note_head::static_name ()))
+    {
+      Note_head * nl = (Note_head*)i.elem_l_->access_Item ();
+      nl->position_i_  =0;
+    }
+}
+
+ADD_THIS_TRANSLATOR (Pitch_squash_engraver);
+IMPLEMENT_IS_TYPE_B1(Pitch_squash_engraver, Engraver);
+
diff --git a/lily/priority-halign-engraver.cc b/lily/priority-halign-engraver.cc
new file mode 100644 (file)
index 0000000..60300b1
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+  score-halign-reg.cc -- implement Priority_horizontal_align_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "bar.hh"
+#include "break-align-item.hh"
+#include "priority-halign-engraver.hh"
+#include "score-priority-engraver.hh"
+
+Priority_horizontal_align_engraver::Priority_horizontal_align_engraver()
+{
+  halign_p_ =0;
+}
+
+void
+Priority_horizontal_align_engraver::do_pre_move_processing()
+{
+  if (halign_p_) 
+    {
+      typeset_element (halign_p_);
+      halign_p_ =0;
+    }
+}
+
+void
+Priority_horizontal_align_engraver::acknowledge_element (Score_element_info i)
+{
+  Engraver* reg = i.origin_grav_l_arr_[0];
+  if (reg->is_type_b (Score_priority_engraver::static_name()))
+    {
+      if (!halign_p_) 
+       {
+         halign_p_ = new Break_align_item;
+         halign_p_->breakable_b_ = true;
+         announce_element (Score_element_info (halign_p_,0));
+       }
+      Item * it = i.elem_l_->access_Item ();
+      if (it->break_priority_i_ == 0)
+       halign_p_->center_l_ = it;
+
+      halign_p_->add_item (it, it->break_priority_i_);
+    }
+}
+
+IMPLEMENT_IS_TYPE_B1(Priority_horizontal_align_engraver,Engraver);
+ADD_THIS_TRANSLATOR(Priority_horizontal_align_engraver);
diff --git a/lily/rest-collision-engraver.cc b/lily/rest-collision-engraver.cc
new file mode 100644 (file)
index 0000000..d139313
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+  rest-collision-reg.cc -- implement Rest_collision_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "debug.hh"
+#include "rest-collision.hh"
+#include "rest-collision-engraver.hh"
+#include "collision.hh"
+#include "note-column.hh"
+
+
+IMPLEMENT_IS_TYPE_B1(Rest_collision_engraver, Engraver);
+ADD_THIS_TRANSLATOR(Rest_collision_engraver);
+
+Rest_collision_engraver::Rest_collision_engraver()
+{
+  rest_collision_p_ =0;
+}
+
+void
+Rest_collision_engraver::process_acknowledged ()
+{
+  if (rest_collision_p_ ||   note_column_l_arr_.size () < 2)
+    return;
+
+  rest_collision_p_ = new Rest_collision;
+  announce_element (Score_element_info (rest_collision_p_, 0));
+  for (int i=0; i< note_column_l_arr_.size (); i++)
+    rest_collision_p_->add_column (note_column_l_arr_[i]);
+}
+
+void
+Rest_collision_engraver::acknowledge_element (Score_element_info i)
+{
+  if (i.elem_l_->is_type_b (Note_column::static_name()))
+    note_column_l_arr_.push ((Note_column*)i.elem_l_->access_Item ());
+}
+
+void
+Rest_collision_engraver::do_pre_move_processing()
+{
+  if (rest_collision_p_) 
+    {
+      typeset_element (rest_collision_p_);
+      rest_collision_p_ = 0;
+    }
+  note_column_l_arr_.clear ();
+}
diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc
new file mode 100644 (file)
index 0000000..96c40d7
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+  rest-grav.cc -- implement Rest_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "rest-engraver.hh"
+#include "musical-request.hh"
+#include "dots.hh"
+#include "rest.hh"
+/*
+  Should merge with Note_head_engraver
+ */
+Rest_engraver::Rest_engraver ()
+{
+  rest_req_l_ =0;
+  rest_p_ =0;
+  dot_p_ =0;
+}
+
+void
+Rest_engraver::do_post_move_processing ()
+{
+  rest_req_l_ =0;
+}
+
+void
+Rest_engraver::do_pre_move_processing ()
+{
+  if (rest_p_)
+    {
+      typeset_element (rest_p_);
+      rest_p_ =0;
+    }
+  if (dot_p_)
+    {
+      typeset_element (dot_p_);
+      dot_p_ =0;
+    }    
+}
+
+void
+Rest_engraver::do_process_requests ()
+{
+  if (rest_req_l_ && !rest_p_) 
+    {
+      rest_p_ = new Rest;
+      rest_p_->balltype_i_ = rest_req_l_->duration_.durlog_i_; 
+      rest_p_->dots_i_ = rest_req_l_->duration_.dots_i_;
+      if (rest_p_->dots_i_)
+       {
+         dot_p_ = new Dots;
+         rest_p_->dots_l_  =dot_p_;
+         announce_element (Score_element_info (dot_p_,0));
+       }
+      announce_element (Score_element_info (rest_p_, rest_req_l_));
+    }
+}
+
+bool
+Rest_engraver::do_try_request (Request *r)
+{
+  Musical_req *m = r->access_Musical_req ();
+  if (!m || !m->access_Rest_req ())
+    return false;
+
+  rest_req_l_ = m->access_Rest_req (); // ugh
+  return true;
+}
+
+IMPLEMENT_IS_TYPE_B1(Rest_engraver, Engraver);
+ADD_THIS_TRANSLATOR(Rest_engraver);
diff --git a/lily/score-priority-engraver.cc b/lily/score-priority-engraver.cc
new file mode 100644 (file)
index 0000000..ea9ae79
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+  score-align-reg.cc -- implement Score_priority_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+
+#include "horizontal-group-item.hh"
+#include "score-priority-engraver.hh"
+#include "item.hh"
+#include "assoc-iter.hh"
+#include "break-align-item.hh"
+
+
+Score_priority_engraver::Score_priority_engraver()
+{
+}
+
+void
+Score_priority_engraver::do_pre_move_processing()
+{
+  for (Assoc_iter<int, Horizontal_group_item*> i(align_p_assoc_); i.ok() ; i++)
+    {
+      if (i.val ())
+       {
+         typeset_element (i.val ());
+         i.val () = 0;
+       }
+    }
+  align_p_assoc_.clear ();
+}
+
+void
+Score_priority_engraver::acknowledge_element (Score_element_info inf)
+{
+  Item * item_l = inf.elem_l_->access_Item ();
+  if (item_l && item_l->breakable_b_ && !item_l->empty_b ())
+    {
+      /*
+       Don't try to eat up our (probable) parent.
+      */
+      if (inf.origin_grav_l_arr_.size () <= 1 &&
+         item_l->is_type_b (Break_align_item::static_name ()))
+       return; 
+
+      
+      int priority =item_l->break_priority_i_;
+      Horizontal_group_item * hg =0;
+      if (!align_p_assoc_.elt_b(priority))
+       {
+         hg = new Horizontal_group_item;
+         announce_element (Score_element_info (hg,0));
+         align_p_assoc_[priority] = hg;
+         hg->break_priority_i_ = priority;
+         hg->breakable_b_ = true;
+       }
+      else
+       hg = align_p_assoc_[priority];
+      
+      Score_element * unbound_elem = inf.elem_l_;
+
+      while (unbound_elem->axis_group_l_a_[X_AXIS])
+       {
+         /* We might have added inf.elem_l_ earlier because we added one
+            of its children.  We don't want to add ourselves to ourself
+         */
+         if (unbound_elem->axis_group_l_a_[X_AXIS] == hg)
+           return;
+         unbound_elem = unbound_elem->axis_group_l_a_[X_AXIS]->access_Score_element ();
+       }
+
+      hg->add_element (unbound_elem);
+    }
+}
+
+IMPLEMENT_IS_TYPE_B1(Score_priority_engraver, Engraver);
+ADD_THIS_TRANSLATOR(Score_priority_engraver);
diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc
new file mode 100644 (file)
index 0000000..435e312
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+  script-reg.cc -- implement Script_engraver
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "script-engraver.hh"
+#include "script.hh"
+#include "musical-request.hh"
+#include "stem.hh"
+#include "staff-sym.hh"
+#include "general-script-def.hh"
+#include "text-def.hh"
+
+
+Script_engraver::Script_engraver()
+{
+  do_post_move_processing();
+}
+
+bool
+Script_engraver::do_try_request (Request *r_l)
+{
+  if (!r_l->access_Musical_req () || ! r_l->access_Musical_req ()->access_Musical_script_req ())
+    return false ;
+  
+  for (int i=0; i < script_req_l_arr_.size(); i++) 
+    {
+      if (r_l->equal_b (script_req_l_arr_[i]))
+       return true;
+    }
+  script_req_l_arr_.push (r_l->access_Script_req ());
+  
+  return true;
+}
+
+void
+Script_engraver::do_process_requests()
+{
+  if (script_p_arr_.size ())
+    return ;
+  
+  for (int i=0; i < script_req_l_arr_.size(); i++)
+    {
+      Script_req* l=script_req_l_arr_[i];
+      Script *p =new Script;
+      p->dir_ = l->dir_;
+      p->specs_p_ = l->scriptdef_p_->clone ();
+      script_p_arr_.push (p);
+      announce_element (Score_element_info (p, l));
+    }
+}
+
+void
+Script_engraver::do_pre_move_processing()
+{
+  Staff_symbol* s_l = get_staff_info().staff_sym_l_;
+  for (int i=0; i < script_p_arr_.size(); i++) 
+    {
+      Script*script_p = script_p_arr_[i];
+      if (!script_p->specs_p_->inside_b())
+       script_p->add_support (s_l);
+
+      if (script_p->specs_p_->is_type_b (Text_def::static_name ()))
+       {
+         Text_def * td_l = (Text_def*)script_p->specs_p_;
+         Scalar style = get_property ("textstyle");
+         if (style.to_bool ())
+           {
+             td_l->style_str_= style;
+           }
+       }
+      typeset_element (script_p);
+    }
+  script_p_arr_.clear();
+}
+
+void
+Script_engraver::do_post_move_processing()
+{
+  script_req_l_arr_.clear();
+}
+
+
+IMPLEMENT_IS_TYPE_B1(Script_engraver,Engraver);
+ADD_THIS_TRANSLATOR(Script_engraver);
diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc
new file mode 100644 (file)
index 0000000..878bb1f
--- /dev/null
@@ -0,0 +1,77 @@
+/*   
+  separating-line-group-grav.cc --  implement Separating_line_group_engraver
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "separating-line-group-engraver.hh"
+#include "separating-group-spanner.hh"
+#include "single-malt-grouping-item.hh"
+#include "p-col.hh"
+
+Separating_line_group_engraver::Separating_line_group_engraver ()
+{
+  sep_span_p_ = 0;
+  break_malt_p_ = 0;
+  nobreak_malt_p_ =0;
+}
+
+void
+Separating_line_group_engraver::do_creation_processing ()
+{
+  sep_span_p_ = new Separating_group_spanner;
+  announce_element ( Score_element_info (sep_span_p_, 0));
+  sep_span_p_->set_bounds (LEFT, get_staff_info ().command_pcol_l ());
+}
+
+void
+Separating_line_group_engraver::do_removal_processing ()
+{
+  sep_span_p_->set_bounds (RIGHT, get_staff_info ().command_pcol_l ());
+  typeset_element (sep_span_p_);
+  sep_span_p_ =0;
+}
+
+void
+Separating_line_group_engraver::acknowledge_element (Score_element_info i)
+{
+  Item * it = i.elem_l_->access_Item ();
+  if (it && !it->axis_group_l_a_[X_AXIS])
+    {
+      Single_malt_grouping_item *&p_ref_ (it->breakable_b_ ?
+                                         break_malt_p_ : nobreak_malt_p_);
+
+      if (!p_ref_)
+       {
+         p_ref_ = new Single_malt_grouping_item;
+         p_ref_->breakable_b_ = it->breakable_b_;
+         announce_element (Score_element_info (p_ref_, 0));
+       }
+      p_ref_->add_item (it);
+    }
+}
+
+void
+Separating_line_group_engraver::do_pre_move_processing ()
+{
+  if (break_malt_p_)
+    {
+      sep_span_p_->add_spacing_unit (break_malt_p_);
+      
+      typeset_element (break_malt_p_);
+      break_malt_p_ =0;
+    }
+  if (nobreak_malt_p_)
+    {
+      sep_span_p_->add_spacing_unit (nobreak_malt_p_);
+      typeset_element (nobreak_malt_p_);
+      nobreak_malt_p_ =0;
+    }
+}
+
+
+IMPLEMENT_IS_TYPE_B1 (Separating_line_group_engraver, Engraver);
+ADD_THIS_TRANSLATOR( Separating_line_group_engraver);
diff --git a/lily/staff-sym-engraver.cc b/lily/staff-sym-engraver.cc
new file mode 100644 (file)
index 0000000..37bb31c
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+  staff-sym-reg.cc -- implement Staff_sym_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "staff-sym-engraver.hh"
+#include "staff-sym.hh"
+#include "score.hh"
+#include "p-col.hh"
+
+
+void
+Staff_sym_engraver::fill_staff_info (Staff_info&i)
+{
+  i.staff_sym_l_ = span_p_;
+}
+
+Staff_sym_engraver::~Staff_sym_engraver()
+{
+  assert (!span_p_);
+}
+
+Staff_sym_engraver::Staff_sym_engraver()
+{
+   span_p_ = 0;
+}
+
+void
+Staff_sym_engraver::do_creation_processing()
+{
+  span_p_ = new Staff_symbol;
+  span_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
+  announce_element (Score_element_info (span_p_, 0));
+}
+
+void
+Staff_sym_engraver::do_removal_processing()
+{
+  Scalar l (get_property ("nolines"));
+  if (l.isnum_b ())
+    {
+      span_p_->no_lines_i_ = l;
+    }
+
+  span_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
+  typeset_element (span_p_);
+  span_p_ =0;
+}
+
+
+
+IMPLEMENT_IS_TYPE_B1(Staff_sym_engraver,Engraver);
+ADD_THIS_TRANSLATOR(Staff_sym_engraver);
diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc
new file mode 100644 (file)
index 0000000..8fa6d56
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+  stem-grav.cc -- implement Stem_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "stem-engraver.hh"
+#include "note-head.hh"
+#include "stem.hh"
+#include "musical-request.hh"
+#include "duration-convert.hh"
+#include "misc.hh"
+#include "abbrev.hh"
+
+Stem_engraver::Stem_engraver()
+{
+  abbrev_req_l_ = 0;
+  stem_p_ = 0;
+  abbrev_p_ = 0;
+  default_abbrev_i_ = 16;
+  dir_ = CENTER;
+}
+
+void
+Stem_engraver::do_creation_processing ()
+{
+  Scalar prop = get_property ("abbrev");
+  if (prop.isnum_b ()) 
+    {
+      default_abbrev_i_  = prop;
+    }
+}
+
+void
+Stem_engraver::acknowledge_element(Score_element_info i)
+{
+  if (i.elem_l_->is_type_b (Rhythmic_head::static_name()))
+    {
+      Rhythmic_head *h  = (Rhythmic_head*) i.elem_l_->access_Item ();
+      if (!stem_p_) 
+       {
+         Rhythmic_req * r = i.req_l_->access_Musical_req ()->access_Rhythmic_req ();
+         stem_p_ = new Stem;
+         int durlog_i = r->duration_.durlog_i_;
+         stem_p_->flag_i_ = durlog_i;
+
+         
+         if (abbrev_req_l_)
+           {
+             /*
+               suggests typing of:
+                  c8:16 c: c: c:
+               hmm, which isn't so bad?
+             */
+             int t = abbrev_req_l_->type_i_;
+             if (!t)
+               t = default_abbrev_i_;
+             else
+               default_abbrev_i_ = t;
+
+             if (t)
+               {
+                 abbrev_p_ = new Abbreviation;
+                 announce_element (Score_element_info (abbrev_p_, abbrev_req_l_));
+                 abbrev_p_->abbrev_flags_i_ =intlog2 (t) - (durlog_i>? 2);
+               }
+           }
+
+         // must give the request, to preserve the rhythmic info.
+         announce_element (Score_element_info (stem_p_, r));
+       }
+      stem_p_->add_head (h);
+    }
+}
+
+void
+Stem_engraver::do_pre_move_processing()
+{
+  if (abbrev_p_)
+    {
+      abbrev_p_->set_stem (stem_p_);
+      typeset_element (abbrev_p_);
+      abbrev_p_ = 0;
+    }
+  if (stem_p_)
+    {
+      Scalar prop = get_property ("ydirection");
+      dir_ = prop.isnum_b () ? (Direction)int(prop) : CENTER;
+      if (dir_)
+       {
+         stem_p_->dir_ = dir_;
+         stem_p_->dir_forced_b_ = true;
+       }
+
+      typeset_element(stem_p_);
+      stem_p_ = 0;
+    }
+  abbrev_req_l_ = 0;
+}
+
+bool
+Stem_engraver::do_try_request (Request* r)
+{
+  Musical_req* mus_l = r->access_Musical_req ();
+  if (!mus_l)
+    return false;
+  
+  Abbreviation_req* a = mus_l->access_Abbreviation_req ();
+  if (!a)
+    return false;
+
+  abbrev_req_l_ = a;
+
+  return true;
+}
+
+IMPLEMENT_IS_TYPE_B1(Stem_engraver, Engraver);
+ADD_THIS_TRANSLATOR(Stem_engraver);
diff --git a/lily/swallow-engraver.cc b/lily/swallow-engraver.cc
new file mode 100644 (file)
index 0000000..20a5130
--- /dev/null
@@ -0,0 +1,19 @@
+/*
+  swallow-reg.cc -- implement Swallow_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+#include "swallow-engraver.hh"
+
+
+IMPLEMENT_IS_TYPE_B1(Swallow_engraver,Engraver);
+ADD_THIS_TRANSLATOR(Swallow_engraver);
+
+
+bool
+Swallow_engraver::do_try_request (Request*) 
+{
+  return true;
+}
diff --git a/lily/ties-engraver.cc b/lily/ties-engraver.cc
new file mode 100644 (file)
index 0000000..8f9aa39
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+  tie-reg.cc -- implement Ties_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "ties-engraver.hh"
+#include "tie.hh"
+#include "note-head.hh"
+#include "musical-request.hh"
+#include "music-list.hh"
+
+Ties_engraver::Ties_engraver()
+{
+  req_l_ = end_req_l_ =0;
+  processed_ack_pass_i_ = 0;
+  
+}
+
+void
+Ties_engraver::do_post_move_processing()
+{
+  processed_ack_pass_i_ =0;
+}
+
+bool
+Ties_engraver::do_try_request (Request*req)
+{
+  if (! req->access_Musical_req ())
+      return false;
+
+  Tie_req * r=  req->access_Musical_req ()->access_Tie_req ();
+  if (!r)
+    return false;
+  
+  req_l_ = r;
+  return true;
+}
+
+
+void
+Ties_engraver::acknowledge_element (Score_element_info i)
+{
+  if (!req_l_ && ! end_req_l_)
+    return;
+  if (i.elem_l_->is_type_b (Note_head::static_name ()))
+    {
+      Note_head * h = (Note_head*)i.elem_l_->access_Item ();
+      Melodic_req *m = i.req_l_->access_Musical_req ()->access_Melodic_req ();
+      
+      head_mel_tuple_arr_.push (Head_melodic_tuple (h, m));
+    }
+}
+
+void
+Ties_engraver::process_acknowledged ()
+{
+  if (!head_mel_tuple_arr_.size () || processed_ack_pass_i_ ++)
+    return;
+
+  head_mel_tuple_arr_.sort (Head_melodic_tuple::compare);
+  if (req_l_ && !tie_p_arr_.size ())
+    {
+      for (int i=0; i < head_mel_tuple_arr_.size (); i++)
+       {
+         Tie*  p = new Tie;
+         p->set_head (LEFT,head_mel_tuple_arr_[i].head_l_);
+         //      announce_element (Score_element_info (p, req_l_));
+         tie_p_arr_.push (p);
+       }
+    }
+
+  if (end_req_l_)
+    {
+      for (int i=0; i < end_tie_p_arr_.size (); i++)
+       {
+         int j = i;
+         if (j >= head_mel_tuple_arr_.size ())
+           {
+             left_head_mel_tuple_arr_[i].mel_l_->warning (_( "Can't find a note head at the right to attach Tie"));
+             j = head_mel_tuple_arr_.size () -1;
+           }
+         
+         Tie*p=end_tie_p_arr_[i];
+         p->set_head (RIGHT, head_mel_tuple_arr_[j].head_l_);
+         if (!Melodic_req::compare (*head_mel_tuple_arr_[j].mel_l_,
+                                    *left_head_mel_tuple_arr_[j].mel_l_))
+           p->same_pitch_b_ = true;
+         announce_element ( Score_element_info (p, end_req_l_));
+       }
+    }
+}
+
+
+void
+Ties_engraver::do_pre_move_processing()
+{
+  if (!head_mel_tuple_arr_.size ())
+    return;
+
+
+  for (int i =0; i < end_tie_p_arr_.size (); i++)
+    {
+      typeset_element (end_tie_p_arr_[i]);
+    }
+
+  end_tie_p_arr_ = tie_p_arr_;
+  left_head_mel_tuple_arr_ = head_mel_tuple_arr_;
+  end_req_l_ = req_l_;
+  
+  req_l_ =0;
+  head_mel_tuple_arr_.clear ();
+  tie_p_arr_.clear ();
+}
+
+void
+Ties_engraver::do_removal_processing ()
+{
+}
+
+void
+Ties_engraver::do_process_requests ()
+{}
+
+
+IMPLEMENT_IS_TYPE_B1(Ties_engraver,Engraver);
+ADD_THIS_TRANSLATOR(Ties_engraver);
+
+
+Head_melodic_tuple::Head_melodic_tuple ()
+{
+  head_l_ =0;
+  mel_l_ =0;
+}
+
+Head_melodic_tuple::Head_melodic_tuple (Note_head *h, Melodic_req*m)
+{
+  head_l_ = h;
+  mel_l_ = m;
+}
+
+int
+Head_melodic_tuple::compare (Head_melodic_tuple const&h1,
+                            Head_melodic_tuple const &h2)
+{
+  return Melodic_req::compare (*h1.mel_l_, *h2.mel_l_);
+}
index e2b87d0fee76569844243bc440729f3f7bc90faa..22ab2d9acc761770355926bb80694538e948e555 100644 (file)
@@ -3,23 +3,23 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "time-description.hh"
 #include "debug.hh"
 
 String
-Time_description::str() const
+Time_description::str () const
 {
   String s ("Time_description { ");
   if (cadenza_b_)
-       s+=String (" (cadenza) ");
-  s+= "at ";
-  s+=when_;
-  s+="\nmeter " + (whole_per_measure_/one_beat_).str () +":" +
+       s += String ("(") + _("cadenza") + ")";
+  s += "at ";
+  s += when_.str ();
+  s +="\ntime_signature " + (whole_per_measure_/one_beat_).str () +":" +
         (Rational (Rational (1)/one_beat_)).str ();
-  s+= "\nposition "+String (bars_i_) + ":"+ whole_in_measure_.str () +"\n}\n";
+  s += "\nposition " + to_str (bars_i_) + ":"+ whole_in_measure_.str () +"\n}\n";
   return s;
 }
 
@@ -27,7 +27,7 @@ void
 Time_description::print() const
 {
 #ifndef NPRINT
-  DOUT << str();
+  DOUT << str ();
 #endif
 }
 void
@@ -81,7 +81,7 @@ Time_description::add (Moment dt)
 }
 
 void
-Time_description::set_meter (int l, int o)
+Time_description::set_time_signature (int l, int o)
 {
   assert (o);
   one_beat_ = Rational (1)/Moment (o);
@@ -89,7 +89,7 @@ Time_description::set_meter (int l, int o)
 }
 
 bool
-Time_description::allow_meter_change_b()
+Time_description::allow_time_signature_change_b()
 {
   return!(whole_in_measure_);
 }
@@ -103,9 +103,9 @@ String
 Time_description::try_set_partial_str (Moment p) const
 {
   if (p<Rational (0))
-       return (_("Partial must be non-negative"));
+       return (_ ("partial measure must be non-negative"));
   if (p > whole_per_measure_)
-       return (_("Partial measure too large"));
+       return (_ ("partial measure too large"));
   return "";
 }
 
index 764fcc56620444f9283db49a64985bd7d6cad4c2..7514481657b33f857a991af23f987a2318ea7974 100644 (file)
@@ -1,62 +1,9 @@
-#
-# project  LilyPond -- the musical typesetter
-# title           zucht
 # file    make/Makefile 
-#
-# Copyright (c) 1997 by    
-#      Jan Nieuwenhuizen <jan@digicash.com>
-#      Han-Wen Nienhuys <hanwen@stack.nl>
-#              ...your sort order here, or how to comment-out a comment
 
-# subdir level:
-#
 depth = ..
-#
 
-# identify module:
-#
-SUBDIRS = 
+include $(depth)/make/Stepmake.make 
+BLURBS=BLURB COPERTINA FLAPTEKST
 
-# two outdir files are distributed, since they make sense to have without running 
-# configure and make.
-
-LSMENTRY=$(outdir)/lilypond.lsm
-RPMSPEC=$(outdir)/lilypond.spec 
-RPMRC=$(outdir)/rpmrc
-IN_FILES = $(wildcard *.in)
-EXTRA_DISTFILES = $(IN_FILES)
-OUT_DISTFILES= $(outdir)/lelievijver.lsm $(LSMENTRY) $(RPMSPEC)
-#
-
-# generic variables:
-#
-include ./$(depth)/make/Variables.make
-include ./$(depth)/make/Files.make 
-include ./$(depth)/make/Targets.make
-include ./$(depth)/make/Rules.make
-
-default: $(RPMSPEC) $(LSMENTRY) $(RPMRC)
-
-
-rpmdocs=BUGS TODO NEWS DEDICATION ANNOUNCE README
-rpmdvis=$(rpmmudocs:.doc=.dvi)
-rpmexamples= $(addprefix input/, $(notdir $(shell ls $(depth)/input/*.ly)))
-
-
-date = $(shell date '+%d%b%y'|tr a-z A-Z)
-sed-date=sed 's!@DATE@!${date}!g'
-sed-examples = sed 's!@EXAMPLE_LYS@!${rpmexamples} ${rpmmudocs}!g'
-sed-docs=sed 's!@TEXT_DOCS@!${rpmdocs}!g'
-sed-dottext=sed 's!@DOTTEXT@!${DOTTEXT}!g'
-sed-rootdir=sed 's!@LILYPOND_ROOTDIR@!${LILYPOND_ROOTDIR}!g'
-
-$(outdir)/%.spec: %.spec.in $(depth)/VERSION
-       cat $< | $(sed-version) | $(sed-docs) | $(sed-examples) \
-       | $(sed-dottext)> $@
-
-$(outdir)/%.lsm: %.lsm.in $(depth)/VERSION
-       cat $< | $(sed-version) | $(sed-date) > $@
-
-$(outdir)/%: %.in
-       cat $< | $(sed-rootdir) > $@
+include $(stepdir)/Makedir.shared.make
 
diff --git a/stepmake/make/Makefile b/stepmake/make/Makefile
new file mode 100644 (file)
index 0000000..719d05f
--- /dev/null
@@ -0,0 +1,9 @@
+# file    make/Makefile 
+
+depth = ..
+
+include $(depth)/make/Stepmake.make 
+BLURBS=BLURB # COPERTINA FLAPTEKST
+
+include $(stepdir)/Makedir.shared.make
+