]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.37 release/1.3.37
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 20 Mar 2000 12:53:27 +0000 (13:53 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 20 Mar 2000 12:53:27 +0000 (13:53 +0100)
===========

* Abstract Align_element into Align_interface. Removed
Axis_align_{item,spanner}, Align_element, Super_element, all multiple
inheritance in the backend.

* new Gade score, INSTALL.texi fixes (thanks, Mats)

* Removed Item::hpos_f (), Score_element::{get,set}_real ()

* comments detailing properties for Axis_group_interface,
Side_position_interface, Score_element, Item and Spanner

1.3.36.j

91 files changed:
CHANGES
Documentation/topdocs/INSTALL.texi
Documentation/user/properties.itely
INSTALL.txt
VERSION
input/test/bb.ly [deleted file]
lily/align-element.cc [deleted file]
lily/align-interface.cc [new file with mode: 0644]
lily/align-note-column-engraver.cc
lily/audio-item.cc
lily/axis-align-item.cc [deleted file]
lily/axis-align-spanner.cc [deleted file]
lily/axis-group-engraver.cc
lily/axis-group-interface.cc
lily/axis-group-item.cc [deleted file]
lily/axis-group-spanner.cc [deleted file]
lily/base-span-bar-engraver.cc
lily/beam.cc
lily/break-align-engraver.cc
lily/break-align-item.cc
lily/collision.cc
lily/cross-staff.cc
lily/dot-column.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/grace-align-item.cc
lily/grace-position-engraver.cc
lily/graphical-lisp-element.cc [deleted file]
lily/hara-kiri-engraver.cc
lily/hara-kiri-vertical-group-spanner.cc
lily/include/align-element.hh [deleted file]
lily/include/align-interface.hh [new file with mode: 0644]
lily/include/atom.hh [deleted file]
lily/include/audio-item.hh
lily/include/axis-align-item.hh [deleted file]
lily/include/axis-align-spanner.hh [deleted file]
lily/include/axis-group-engraver.hh
lily/include/axis-group-interface.hh
lily/include/axis-group-item.hh
lily/include/axis-group-spanner.hh
lily/include/break-align-item.hh
lily/include/collision.hh
lily/include/context-specced-music.hh
lily/include/dot-column.hh
lily/include/dummy.icc [deleted file]
lily/include/grace-align-item.hh
lily/include/group-interface.hh
lily/include/hara-kiri-engraver.hh
lily/include/hara-kiri-vertical-group-spanner.hh
lily/include/head-column.hh [deleted file]
lily/include/item.hh
lily/include/lily-proto.hh
lily/include/line-group-group-engraver.hh
lily/include/line-of-score.hh
lily/include/note-column.hh
lily/include/paper-column.hh
lily/include/priority-halign-engraver.hh
lily/include/rest-column-engraver.hh [deleted file]
lily/include/rest-column.hh [deleted file]
lily/include/score-element.hh
lily/include/side-position-interface.hh
lily/include/span-bar.hh
lily/include/spanner.hh
lily/include/super-element.hh
lily/include/todo-performer.hh [deleted file]
lily/include/vertical-align-engraver.hh [deleted file]
lily/item.cc
lily/line-group-group-engraver.cc
lily/line-of-score.cc
lily/midi-item.cc
lily/note-column.cc
lily/paper-column.cc
lily/score-element.cc
lily/score-engraver.cc
lily/side-position-interface.cc
lily/slur.cc
lily/span-bar.cc
lily/span-dynamic-performer.cc
lily/spanner.cc
lily/stem-tremolo.cc
lily/super-element.cc [deleted file]
lily/tuplet-spanner.cc
lily/vertical-align-engraver.cc
make/out/lilypond.lsm
make/out/lilypond.spec
mutopia/Coriolan/coriolan-paper.ly
mutopia/Coriolan/coriolan-part-paper.ly
po/lilypond.pot
po/nl.po
scm/midi.scm
scripts/convert-mudela.py

diff --git a/CHANGES b/CHANGES
index 830ce5a2885d1678e43ac6ccb5288e7af02bcd64..4b4c02e51040532eec2bcb5f9252478964fc0b2d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,14 +1,17 @@
-1.3.36.jcn4
+
+1.3.36.hwn1
 ===========
 
-* Added instrument-equaliser for MIDI output, see scm/midi.scm, and
-  properties midiMinimumVolume, midiMaximumVolume, ranges [0,1].
+* Abstract Align_element into Align_interface. Removed
+Axis_align_{item,spanner}, Align_element, Super_element, all multiple
+inheritance in the backend.
 
-* Changed absolute midi volume settings into factor of full scale.
+* new Gade score, INSTALL.texi fixes (thanks, Mats)
 
-* Fixed another dynamic-line-spanner bug, it gets hairy.
+* Removed Item::hpos_f (), Score_element::{get,set}_real ()
 
-* Added warning for spanners with dubiously narrow parents.
+* comments detailing properties for Axis_group_interface,
+Side_position_interface, Score_element, Item and Spanner
 
 1.3.36.jcn3
 ===========
 
 * Bugfix: line-spanner lasts always full duration of (de)crescendi.
 
-1.3.36.jcn2
-===========
-
 * Bugfix: broken (de)crescendi on a dynamic-line-spanner.
 
 * Bugfix: compilation dynamic-engraver.
 
-1.3.36.jcn1
-===========
-
 * Added and updated a faq about postscript and ghostscript.
 
 * Fixed order of slurVerticalDirection verticalDirection in
@@ -39,7 +36,9 @@
 
 * Bugfix: volume effect of (de)crescendi was sometimes wrong way round.
 
-.3.35.hwn1
+1.3.36
+======
+1.3.35.hwn1
 ===========
 
 * textEmptyDimension changed into textNonEmpty, default: off,
index 0a4e7e79e86ea030bbf4441077c899fc3a3d0f51..bca84206475b345267041bb302c91aa948831326 100644 (file)
@@ -55,7 +55,7 @@ disk-space run configure with @code{--disable-debugging}.
 Although we recommend to use Unix, LilyPond is known to run on Windows
 NT/95/98 as well.  See Section Windows NT/95,es.
 
-@item  EGCS 1.1 or newer. Check out @uref{ftp://ftp.gnu.org/pub/gcc/}.
+@item  EGCS 1.1 or newer. Check out @uref{ftp://ftp.gnu.org/gnu/gcc/}.
 
 @item  Python 1.5,
 Check out
@@ -64,16 +64,16 @@ Check out
 @item  GUILE 1.3.4,  check out @uref{http://www.gnu.org/software/guile/guile.html,http://www.gnu.org/software/guile/guile.html}.
 
 @item GNU make. 
-Check out @uref{ftp://ftp.gnu.org/make/,ftp://ftp.gnu.org/make/}.
+Check out @uref{ftp://ftp.gnu.org/gnu/make/,ftp://ftp.gnu.org/gnu/make/}.
 
 @item Flex (version 2.5.4 or newer). 
-Check out @uref{ftp://ftp.gnu.org/flex/,ftp://ftp.gnu.org/flex/}.
+Check out @uref{ftp://ftp.gnu.org/gnu/flex/,ftp://ftp.gnu.org/gnu/flex/}.
 
 @item Bison (version 1.25 or newer).
-Check out @uref{ftp://ftp.gnu.org/bison/,ftp://ftp.gnu.org/bison/}.
+Check out @uref{ftp://ftp.gnu.org/gnu/bison/,ftp://ftp.gnu.org/gnu/bison/}.
 
 @item Texinfo (version 4.0 or newer). 
-Check out @uref{ftp://ftp.gnu.org/pub/texinfo/,ftp://ftp.gnu.org/pub/texinfo/}.
+Check out @uref{ftp://ftp.gnu.org/gnu/texinfo/,ftp://ftp.gnu.org/gnu/texinfo/}.
 Most documentation is in texinfo.
 
 @item The geometry package for LaTeX is needed to use ly2dvi.  
index 101274a2b8fb6de0b46861c7c2791e639571471d..3b92694c797f35a7564fa60e34090fa6319d6092 100644 (file)
@@ -149,6 +149,11 @@ c''16 \property Staff.fontSize = -2 c''16
     automatic collision resolution.  The value is the shift amount
     expressed in @code{note_width}, as set in the paper section.
 
+@item @code{collisionMergeDotted}@indexcode{collisionMergeDotted} @propertytype{boolean}
+
+Merge noteheads in collisions, even if they have a different number of
+dots. This normal notation for polyphonic guitar music.
+
 @mudelafile[verbatim]{force-hshift.sly}
 
 
index 37dcaa182fb2c0faf95b970970a39931cf6e0cae..75215d77dc1070b9d090a0bb915b32fd79b13978 100644 (file)
@@ -48,7 +48,7 @@ Prerequisites
    * Although we recommend to use Unix, LilyPond is known to run on
      Windows NT/95/98 as well.  See Section Windows NT/95,es.
 
-   * EGCS 1.1 or newer. Check out `ftp://ftp.gnu.org/pub/gcc/'.
+   * EGCS 1.1 or newer. Check out `ftp://ftp.gnu.org/gnu/gcc/'.
 
    * Python 1.5, Check out `ftp://ftp.python.org' or
      `ftp://ftp.cwi.nl/pub/python'.
@@ -57,17 +57,17 @@ Prerequisites
      http://www.gnu.org/software/guile/guile.html
      (http://www.gnu.org/software/guile/guile.html).
 
-   * GNU make.  Check out ftp://ftp.gnu.org/make/
-     (ftp://ftp.gnu.org/make/).
+   * GNU make.  Check out ftp://ftp.gnu.org/gnu/make/
+     (ftp://ftp.gnu.org/gnu/make/).
 
-   * Flex (version 2.5.4 or newer).  Check out ftp://ftp.gnu.org/flex/
-     (ftp://ftp.gnu.org/flex/).
+   * Flex (version 2.5.4 or newer).  Check out
+     ftp://ftp.gnu.org/gnu/flex/ (ftp://ftp.gnu.org/gnu/flex/).
 
-   * Bison (version 1.25 or newer).  Check out ftp://ftp.gnu.org/bison/
-     (ftp://ftp.gnu.org/bison/).
+   * Bison (version 1.25 or newer).  Check out
+     ftp://ftp.gnu.org/gnu/bison/ (ftp://ftp.gnu.org/gnu/bison/).
 
    * Texinfo (version 4.0 or newer).  Check out
-     ftp://ftp.gnu.org/pub/texinfo/ (ftp://ftp.gnu.org/pub/texinfo/).
+     ftp://ftp.gnu.org/gnu/texinfo/ (ftp://ftp.gnu.org/gnu/texinfo/).
      Most documentation is in texinfo.
 
    * The geometry package for LaTeX is needed to use ly2dvi.  Available
diff --git a/VERSION b/VERSION
index 524e3309b669b70fb44b244a863f5034b61bbb07..b0b101c703fa4b4947655112e011c7e7241ada77 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=36
-MY_PATCH_LEVEL=jcn4
+PATCH_LEVEL=37
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/input/test/bb.ly b/input/test/bb.ly
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/lily/align-element.cc b/lily/align-element.cc
deleted file mode 100644 (file)
index a8b34c0..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
-  align-elem.cc -- implement Align_elem
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "align-element.hh"
-#include "interval.hh"
-#include "direction.hh"
-#include "debug.hh"
-#include "dimension-cache.hh"
-#include "axis-group-interface.hh"
-
-/*
-  This callback is set in the children of the align element. It does
-  not compute anything, but a side effect of a->do_side_processing ()
-  is that the elements are placed correctly.  */
-Real
-Align_element::alignment_callback (Dimension_cache const *c)
-{
-  Axis ax = c->axis ();
-  Score_element * sc = c->element_l ()->parent_l (ax);
-  Align_element * a = dynamic_cast<Align_element*> (sc);
-  if (a && a->get_elt_property ("alignment-done") == SCM_UNDEFINED) 
-    {
-      a->do_side_processing (ax);
-    }
-  return 0.0;
-}
-
-void
-Align_element::add_element (Score_element* s)
-{
-  s->add_offset_callback (alignment_callback, axis ());
-  axis_group (this).add_element (s);
-}
-
-/*
-  Hairy function to put elements where they should be. Can be tweaked
-  from the outside by setting minimum-space and extra-space in its
-  children */
-void
-Align_element::do_side_processing (Axis a)
-{
-  set_elt_property ("alignment-done", SCM_BOOL_T);
-  
-  SCM d = get_elt_property ("stacking-dir");
-  Direction stacking_dir = gh_number_p(d) ? to_dir (d) : CENTER;
-  if (!stacking_dir)
-    stacking_dir = DOWN;
-
-  
-  Array<Interval> dims;
-
-  Link_array<Score_element> elems;
-  Link_array<Score_element> all_elts
-    = Group_interface__extract_elements (this, (Score_element*) 0, "elements");
-  for (int i=0; i < all_elts.size(); i++) 
-    {
-      Interval y = all_elts[i]->extent(a) + all_elts[i]->relative_coordinate (this, a);
-      if (!y.empty_b())
-       {
-         Score_element *e =dynamic_cast<Score_element*>(all_elts[i]);
-
-         // todo: fucks up if item both in Halign & Valign. 
-         SCM min_dims = e->remove_elt_property ("minimum-space");
-         if (gh_pair_p (min_dims) &&
-             gh_number_p (gh_car (min_dims))
-             && gh_number_p (gh_cdr (min_dims)))
-           {
-             y.unite (Interval (gh_scm2double (gh_car  (min_dims)),
-                                gh_scm2double (gh_cdr (min_dims))));
-           }
-         
-         SCM extra_dims = e->remove_elt_property ("extra-space");
-         if (gh_pair_p (extra_dims) &&
-             gh_number_p (gh_car (extra_dims))
-             && gh_number_p (gh_cdr (extra_dims)))
-           {
-             y[LEFT] += gh_scm2double (gh_car  (extra_dims));
-             y[RIGHT] += gh_scm2double (gh_cdr (extra_dims));
-           }
-
-         elems.push (e);
-         dims.push (y);          
-       }
-    }
-
-  
-  Interval threshold = Interval (0, Interval::infinity ());
-  SCM thr = get_elt_property ("threshold");
-  if (gh_pair_p (thr))
-    {
-      threshold[SMALLER] = gh_scm2double (gh_car (thr));
-      threshold[BIGGER] = gh_scm2double (gh_cdr (thr));      
-    }
-
-  Real where_f=0;
-  for (int i=0 ;  i < elems.size(); i++) 
-    {
-      Real dy = - stacking_dir * dims[i][-stacking_dir];
-      if (i)
-       dy += stacking_dir * dims[i-1][stacking_dir];
-
-      if (i)
-       {
-         dy = (dy >? threshold[SMALLER] )
-           <? threshold[BIGGER];
-       }
-
-      where_f += stacking_dir * dy;
-      elems[i]->translate_axis (where_f, a);
-    }
-}
-
-
-int
-Align_element::get_count (Score_element*s)const
-{
-  SCM e = get_elt_property ("elements");
-  int c =0;
-  while (gh_pair_p (e))
-    {
-      if (gh_car (e) == s->self_scm_)
-       break;
-      c++;
-      e = gh_cdr (e);
-    }
-  return c;
-}
-
-Axis
-Align_element::axis () const
-{
-  return Axis (gh_scm2int (gh_car (get_elt_property ("axes"))));
-}
-
-void
-Align_element::set_axis (Axis a)
-{
-  axis_group (this).set_axes (a, a);
-}
-
-Align_element::Align_element ()
-{
-  axis_group (this).set_interface ();
-}
diff --git a/lily/align-interface.cc b/lily/align-interface.cc
new file mode 100644 (file)
index 0000000..6908147
--- /dev/null
@@ -0,0 +1,172 @@
+/*   
+  align-interface.cc --  implement Align_interface
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "align-interface.hh"
+#include "dimension-cache.hh"
+#include "score-element.hh"
+#include "group-interface.hh"
+#include "axis-group-interface.hh"
+
+/*
+  This callback is set in the children of the align element. It does
+  not compute anything, but a side effect of a->do_side_processing ()
+  is that the elements are placed correctly.  */
+Real
+Align_interface::alignment_callback (Dimension_cache const *c)
+{
+  Axis ax = c->axis ();
+  Score_element * sc = c->element_l ()->parent_l (ax);
+
+  if (sc && sc->get_elt_property ("alignment-done") == SCM_UNDEFINED) 
+    {
+      Align_interface (sc).do_side_processing (ax);
+    }
+  return 0.0;
+}
+
+/*
+  Hairy function to put elements where they should be. Can be tweaked
+  from the outside by setting minimum-space and extra-space in its
+  children */
+void
+Align_interface::do_side_processing (Axis a)
+{
+  elt_l_->set_elt_property ("alignment-done", SCM_BOOL_T);
+  
+  SCM d =   elt_l_->get_elt_property ("stacking-dir");
+  Direction stacking_dir = gh_number_p(d) ? to_dir (d) : CENTER;
+  if (!stacking_dir)
+    stacking_dir = DOWN;
+
+  
+  Array<Interval> dims;
+
+  Link_array<Score_element> elems;
+  Link_array<Score_element> all_elts
+    = Group_interface__extract_elements (  elt_l_, (Score_element*) 0, "elements");
+  for (int i=0; i < all_elts.size(); i++) 
+    {
+      Interval y = all_elts[i]->extent(a) + all_elts[i]->relative_coordinate (elt_l_, a);
+      if (!y.empty_b())
+       {
+         Score_element *e =dynamic_cast<Score_element*>(all_elts[i]);
+
+         // todo: fucks up if item both in Halign & Valign. 
+         SCM min_dims = e->remove_elt_property ("minimum-space");
+         if (gh_pair_p (min_dims) &&
+             gh_number_p (gh_car (min_dims))
+             && gh_number_p (gh_cdr (min_dims)))
+           {
+             y.unite (Interval (gh_scm2double (gh_car  (min_dims)),
+                                gh_scm2double (gh_cdr (min_dims))));
+           }
+         
+         SCM extra_dims = e->remove_elt_property ("extra-space");
+         if (gh_pair_p (extra_dims) &&
+             gh_number_p (gh_car (extra_dims))
+             && gh_number_p (gh_cdr (extra_dims)))
+           {
+             y[LEFT] += gh_scm2double (gh_car  (extra_dims));
+             y[RIGHT] += gh_scm2double (gh_cdr (extra_dims));
+           }
+
+         elems.push (e);
+         dims.push (y);          
+       }
+    }
+
+  
+  Interval threshold = Interval (0, Interval::infinity ());
+  SCM thr = elt_l_->get_elt_property ("threshold");
+  if (gh_pair_p (thr))
+    {
+      threshold[SMALLER] = gh_scm2double (gh_car (thr));
+      threshold[BIGGER] = gh_scm2double (gh_cdr (thr));      
+    }
+
+  Real where_f=0;
+  for (int i=0 ;  i < elems.size(); i++) 
+    {
+      Real dy = - stacking_dir * dims[i][-stacking_dir];
+      if (i)
+       dy += stacking_dir * dims[i-1][stacking_dir];
+
+      if (i)
+       {
+         dy = (dy >? threshold[SMALLER] )
+           <? threshold[BIGGER];
+       }
+
+      where_f += stacking_dir * dy;
+      elems[i]->translate_axis (where_f, a);
+    }
+}
+
+
+Axis
+Align_interface::axis ()const
+{
+  return  Axis (gh_scm2int (gh_car (elt_l_->get_elt_property ("axes"))));
+}
+
+
+/*
+  should  use generic Scm funcs.
+ */
+int
+Align_interface::get_count (Score_element*s)const
+{
+  SCM e = elt_l_->get_elt_property ("elements");
+  int c =0;
+  while (gh_pair_p (e))
+    {
+      if (gh_car (e) == s->self_scm_)
+       break;
+      c++;
+      e = gh_cdr (e);
+    }
+  return c;
+}
+
+void
+Align_interface::add_element (Score_element* s)
+{
+  s->add_offset_callback (alignment_callback, axis ());
+  Axis_group_interface (elt_l_).add_element (s);
+  
+}
+
+Align_interface::Align_interface (Score_element const*s)
+{
+  elt_l_ = (Score_element*)s;
+}
+
+void
+Align_interface::set_interface ()
+{
+  Axis_group_interface (elt_l_).set_interface ();
+
+  Group_interface (elt_l_, "interfaces").add_thing (ly_symbol2scm ("Alignment"));
+}
+
+void
+Align_interface::set_axis (Axis a)
+{
+  Axis_group_interface (elt_l_).set_axes (a,a );
+}
+
+bool
+Align_interface::has_interface_b ()
+{
+  SCM memq = scm_memq (ly_symbol2scm ("Alignment"),
+             elt_l_->get_elt_property ("interfaces"));
+  
+  return (memq != SCM_BOOL_F);
+}
+
index 5bde41d6bf2f5ae4f6d94cb0afa1a86a81bb67a7..a184e36131e2fee6ba6cc9b35e3a4450f1b59918 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "engraver.hh"
 #include "grace-align-item.hh"
+#include "align-interface.hh"
 #include "note-column.hh"
 #include "local-key-item.hh"
 #include "warn.hh"
@@ -104,7 +105,7 @@ Align_note_column_engraver::process_acknowledged ()
 
   if (now_column_l_)
     {
-      align_item_p_->add_element (now_column_l_);
+      Align_interface (align_item_p_).add_element (now_column_l_);
       now_column_l_ =0;
     }
 }
index 5d78ec4bd58794be869199bcbe49e7bc33cf4f13..60b15abb5c6a4b29865a4e35b734685df12d07c6 100644 (file)
@@ -45,9 +45,9 @@ Audio_key::Audio_key (Key_def const& k)
   key_ = k;
 }
 
-Audio_dynamic::Audio_dynamic (Real volume)
+Audio_dynamic::Audio_dynamic (int volume)
 {
-  volume_ = volume;
+  volume_i_ = volume;
 }
 
 Audio_tempo::Audio_tempo (int per_minute_4_i)
diff --git a/lily/axis-align-item.cc b/lily/axis-align-item.cc
deleted file mode 100644 (file)
index d0301c9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*   
-  axis-align-item.cc --  implement Axis_align_item
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "axis-align-item.hh"
-
-Axis_align_item::Axis_align_item ()
-{
-}
-
-void
-Axis_align_item::do_print () const
-{
-  Axis_group_item::do_print ();
-}
diff --git a/lily/axis-align-spanner.cc b/lily/axis-align-spanner.cc
deleted file mode 100644 (file)
index b369c85..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*   
-  axis-align-spanner.cc --  implement Axis_align_spanner
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-#include "axis-align-spanner.hh"
-
-Axis_align_spanner::Axis_align_spanner()
-{
-}
index 50b76990e5ddc5ab8b3e6662aeec3e4cc2654451..cf9208793a36b3cb69d10d52ce54b832326cb32e 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #include "axis-group-engraver.hh"
-#include "axis-group-spanner.hh"
+#include "spanner.hh"
 #include "paper-column.hh"
 #include "axis-group-interface.hh"
 
@@ -20,16 +20,18 @@ void
 Axis_group_engraver::do_creation_processing ()
 {
   staffline_p_ = get_spanner_p ();
-  axis_group (staffline_p_).set_axes (Y_AXIS, Y_AXIS);
+  Axis_group_interface (staffline_p_).set_interface ();
+  Axis_group_interface (staffline_p_).set_axes (Y_AXIS, Y_AXIS);
   staffline_p_->set_bound(LEFT,get_staff_info().command_pcol_l ());
   announce_element (Score_element_info (staffline_p_, 0));
 }
 
-Axis_group_spanner*
+Spanner*
 Axis_group_engraver::get_spanner_p () const
 {
-  return new Axis_group_spanner;
+  return new Spanner;
 }
+
 void
 Axis_group_engraver::do_removal_processing ()
 {
@@ -51,8 +53,8 @@ Axis_group_engraver::process_acknowledged ()
   for (int i=0; i < elts_.size (); i++)
     {
       Score_element *par = elts_[i]->parent_l (Y_AXIS);
-      if (!par || !axis_group (par).has_interface_b ())
-       axis_group (staffline_p_).add_element (elts_[i]);
+      if (!par || !Axis_group_interface (par).has_interface_b ())
+       Axis_group_interface (staffline_p_).add_element (elts_[i]);
     }
   elts_.clear ();
 }
index d00b7a1cea7644ac348b59d353f34e283035504c..f15c84ca5ca1946da02f701a727bbdbbd2fef3bd 100644 (file)
 #include "dimension-cache.hh"
 
 Axis_group_interface::Axis_group_interface (Score_element*s)
-  : Group_interface (s)
 {
   elt_l_ = s;
 }
 
 Axis_group_interface
-axis_group (Score_element*s)
+Axis_group_interface (Score_element*s)
 {
   return Axis_group_interface (s);
 }
@@ -37,7 +36,7 @@ Axis_group_interface::add_element (Score_element *e)
        e->set_parent (elt_l_, a);
     }
 
-  Group_interface::add_element (e);
+  Group_interface (elt_l_).add_element (e);
 
   elt_l_->add_dependency (e);
 }
@@ -116,7 +115,7 @@ Axis_group_interface::get_children ()
     {
       Score_element* e = unsmob_element (gh_car (ep));
       if (e)
-       childs.concat (axis_group (e).get_children ());
+       childs.concat (Axis_group_interface (e).get_children ());
     }
   
   return childs;
diff --git a/lily/axis-group-item.cc b/lily/axis-group-item.cc
deleted file mode 100644 (file)
index e3dfe35..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*   
-  axis-group-item.cc --  implement Axis_group_interface
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "axis-group-item.hh"
-#include "axis-group-interface.hh"
-
-Axis_group_item ::Axis_group_item ()
-{
-  axis_group (this).set_interface ();
-}
diff --git a/lily/axis-group-spanner.cc b/lily/axis-group-spanner.cc
deleted file mode 100644 (file)
index 00266e0..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*   
-  axis-group-spanner.cc --  implement Axis_group_spanner
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "axis-group-spanner.hh"
-#include "axis-group-interface.hh"
-
-Axis_group_spanner::Axis_group_spanner()
-{
-  axis_group (this).set_interface ();
-}
index d233d514ca08008f7f69d7b5d44986abb9c8be8e..78df27dc2edf8b930a2873f5cac31cb6fec1aea3 100644 (file)
@@ -10,7 +10,6 @@
 #include "lily-guile.hh"
 #include "span-bar.hh"
 #include "base-span-bar-engraver.hh"
-#include "axis-align-spanner.hh"
 
 Base_span_bar_engraver::Base_span_bar_engraver()
 {
index d641c8912c3443a4f2dd14d9af479c004459b7a8..23a62f4a5c4bc9f4a065c371b0554a28bbc0bd26 100644 (file)
@@ -350,19 +350,19 @@ Beam::calc_position_and_height (Real* y, Real* dy) const
     }
 
   Array<Offset> ideals;
-  Real x0 = first_visible_stem ()->hpos_f ();
+  Real x0 = first_visible_stem ()->relative_coordinate (0, X_AXIS);
   for (int i=0; i < stem_count (); i++)
     {
       Stem* s = stem (i);
       if (s->invisible_b ())
         continue;
-      ideals.push (Offset (s->hpos_f () - x0, 
+      ideals.push (Offset (s->relative_coordinate (0, X_AXIS) - x0, 
                           s->calc_stem_info ().idealy_f_));
     }
   Real dydx;
   minimise_least_squares (&dydx, y, ideals); // duh, takes references
 
-  Real dx = last_visible_stem ()->hpos_f () - x0;
+  Real dx = last_visible_stem ()->relative_coordinate (0, X_AXIS) - x0;
   *dy = dydx * dx;
 }
 
@@ -378,7 +378,7 @@ Beam::suspect_slope_b (Real y, Real dy) const
   Real lengthened = paper_l ()->get_var ("beam_lengthened");
   Real steep = paper_l ()->get_var ("beam_steep_slope");
 
-  Real dx = last_visible_stem ()->hpos_f () - first_visible_stem ()->hpos_f ();
+  Real dx = last_visible_stem ()->relative_coordinate (0, X_AXIS) - first_visible_stem ()->relative_coordinate (0, X_AXIS);
   Real dydx = dy && dx ? dy/dx : 0;
 
   if (((y - first_ideal > lengthened) && (dydx > steep))
@@ -404,8 +404,8 @@ Beam::calc_slope_damping_f (Real dy) const
 
   if (damping)
     {
-      Real dx = last_visible_stem ()->hpos_f ()
-       - first_visible_stem ()->hpos_f ();
+      Real dx = last_visible_stem ()->relative_coordinate (0, X_AXIS)
+       - first_visible_stem ()->relative_coordinate (0, X_AXIS);
       Real dydx = dy && dx ? dy/dx : 0;
       dydx = 0.6 * tanh (dydx) / damping;
       return dydx * dx;
@@ -421,9 +421,9 @@ Beam::calc_stem_y_f (Stem* s, Real y, Real dy) const
   int stem_multiplicity = (s->flag_i () - 2) >? 0;
 
   Real interbeam_f = paper_l ()->interbeam_f (beam_multiplicity);
-  Real x0 = first_visible_stem ()->hpos_f ();
-  Real dx = last_visible_stem ()->hpos_f () - x0;
-  Real stem_y = (dy && dx ? (s->hpos_f () - x0) / dx * dy : 0) + y;
+  Real x0 = first_visible_stem ()->relative_coordinate (0, X_AXIS);
+  Real dx = last_visible_stem ()->relative_coordinate (0, X_AXIS) - x0;
+  Real stem_y = (dy && dx ? (s->relative_coordinate (0, X_AXIS) - x0) / dx * dy : 0) + y;
 
   /* knee */
    Direction dir  = directional_element(this).get ();
@@ -590,8 +590,8 @@ Beam::set_beaming (Beaming_info_list *beaming)
 Molecule
 Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
 {
-  if ((next && !(next->hpos_f () > here->hpos_f ())) ||
-      (prev && !(prev->hpos_f () < here->hpos_f ())))
+  if ((next && !(next->relative_coordinate (0, X_AXIS) > here->relative_coordinate (0, X_AXIS))) ||
+      (prev && !(prev->relative_coordinate (0, X_AXIS) < here->relative_coordinate (0, X_AXIS))))
       programming_error ("Beams are not left-to-right");
 
   Real staffline_f = paper_l ()->get_var ("stafflinethickness");
@@ -605,9 +605,9 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
   Real stemdx = staffline_f;
 
   Real dx = visible_stem_count () ?
-    last_visible_stem ()->hpos_f () - first_visible_stem ()->hpos_f ()
+    last_visible_stem ()->relative_coordinate (0, X_AXIS) - first_visible_stem ()->relative_coordinate (0, X_AXIS)
     : 0.0;
-  Real dy = get_real ("height");
+  Real dy = gh_scm2double (get_elt_property ("height"));
   Real dydx = dy && dx ? dy/dx : 0;
 
   Molecule leftbeams;
@@ -636,7 +636,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
        Half beam should be one note-width, 
        but let's make sure two half-beams never touch
        */
-      Real w = here->hpos_f () - prev->hpos_f ();
+      Real w = here->relative_coordinate (0, X_AXIS) - prev->relative_coordinate (0, X_AXIS);
       w = w/2 <? nw_f;
       Molecule a;
       if (lhalfs)              // generates warnings if not
@@ -655,7 +655,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
       int rhalfs  = here->beam_count (RIGHT) - next->beam_count (LEFT);
       int rwholebeams= here->beam_count (RIGHT) <? next->beam_count (LEFT) ;
 
-      Real w = next->hpos_f () - here->hpos_f ();
+      Real w = next->relative_coordinate (0, X_AXIS) - here->relative_coordinate (0, X_AXIS);
       Molecule a = lookup_l ()->beam (dydx, w + stemdx, thick);
       a.translate_axis( - stemdx/2, X_AXIS);
       int j = 0;
@@ -717,19 +717,19 @@ Beam::do_brew_molecule () const
   Real x0,dx;
   if (visible_stem_count ())
     {
-      x0 = first_visible_stem ()->hpos_f ();
-      dx = last_visible_stem ()->hpos_f () - x0;
+      x0 = first_visible_stem ()->relative_coordinate (0, X_AXIS);
+      dx = last_visible_stem ()->relative_coordinate (0, X_AXIS) - x0;
     }
   else
     {
-      x0 = stem (0)->hpos_f ();
-      dx = stem_top ()->hpos_f () - x0;
+      x0 = stem (0)->relative_coordinate (0, X_AXIS);
+      dx = stem_top ()->relative_coordinate (0, X_AXIS) - x0;
     }
   
   
-  Real dy = get_real ("height");
+  Real dy = gh_scm2double (get_elt_property ("height"));
   Real dydx = dy && dx ? dy/dx : 0;
-  Real y = get_real ("y-position");
+  Real y = gh_scm2double (get_elt_property ("y-position"));
   for (int j=0; j <stem_count (); j++)
     {
       Stem *i = stem (j);
@@ -737,7 +737,7 @@ Beam::do_brew_molecule () const
       Stem * next = (j < stem_count ()-1) ? stem (j+1) :0;
 
       Molecule sb = stem_beams (i, next, prev);
-      Real x = i->hpos_f ()-x0;
+      Real x = i->relative_coordinate (0, X_AXIS)-x0;
       sb.translate (Offset (x, x * dydx + y));
       mol.add_molecule (sb);
     }
index 82f6dd904df42a5a566b2a52ebef46a6b0e9bee1..ec8495d9baf17ce207d23488b822cd07a906b1cb 100644 (file)
@@ -9,7 +9,7 @@
 #include "engraver.hh"
 #include "protected-scm.hh"
 #include "break-align-item.hh"
-#include "axis-group-item.hh"
+#include "align-interface.hh"
 #include "axis-group-interface.hh"
 
 class Break_align_engraver : public Engraver
@@ -34,7 +34,7 @@ void
 Break_align_engraver::add_column (SCM smob)
 {
   Score_element * e = unsmob_element (smob);
-  align_l_->add_element (e);
+  Align_interface (align_l_).add_element (e);
   typeset_element (e);
 }
 
@@ -103,21 +103,25 @@ Break_align_engraver::acknowledge_element (Score_element_info inf)
       SCM name = ly_str02scm (inf.elem_l_->name());
       SCM s = scm_assoc (name, column_alist_);
 
-      Axis_group_item * group = 0;
+      Item * group = 0;
+
       if (s != SCM_BOOL_F)
        {
          Score_element *e =  unsmob_element (gh_cdr(s));
-         group = dynamic_cast<Axis_group_item*> (e);
+         group = dynamic_cast<Item*> (e);
        }
       else
        {
-         group = new Axis_group_item;
-         axis_group(group).set_axes (X_AXIS,X_AXIS);
+         group = new Item;
+
+         Axis_group_interface (group).set_interface ();
+         Axis_group_interface (group).set_axes (X_AXIS,X_AXIS);
+
          group->set_elt_property ("origin", name);
          group->set_parent (align_l_, Y_AXIS);
          announce_element (Score_element_info (group, 0));
          column_alist_ = scm_assoc_set_x (column_alist_, name, group->self_scm_);
        }
-      axis_group (group).add_element (item_l);
+      Axis_group_interface (group).add_element (item_l);
     }
 }
index c0c2ac4807b28c756757595a2e67c4b3851294bc..ebaf7f3aee71632a62164ca6e305b7250ffc63b2 100644 (file)
 #include "paper-def.hh"
 #include "paper-column.hh"
 #include "group-interface.hh"
-
-/*
-  Handle spacing for prefatory matter. 
-
-  TODO: rewrite this.  It is kludgy
-*/
+#include "align-interface.hh"
 
 void
 Break_align_item::before_line_breaking ()
@@ -40,7 +35,7 @@ Break_align_item::before_line_breaking ()
   
   for (int i=0; i < all_elems.size(); i++) 
     {
-      Interval y = all_elems[i]->extent(axis ());
+      Interval y = all_elems[i]->extent(X_AXIS);
       if (!y.empty_b())
        elems.push (dynamic_cast<Score_element*> (all_elems[i]));
     }
@@ -105,10 +100,12 @@ Break_align_item::before_line_breaking ()
   
   scm_set_car_x (first_pair, gh_double2scm (-dists[0]));
   elems[0]->set_elt_property ("minimum-space", first_pair);
-  
-  Axis_align_item::before_line_breaking ();
 
 
+  /*
+    Force callbacks for alignment to be called   
+   */
+  Real unused =  elems[0]->relative_coordinate (this, X_AXIS);
   Real pre_space = elems[0]->relative_coordinate (column_l (), X_AXIS);
 
   Real xl = elems[0]->extent (X_AXIS)[LEFT];
@@ -156,7 +153,9 @@ Break_align_item::before_line_breaking ()
 Break_align_item::Break_align_item ()
 {
   set_elt_property ("stacking-dir" , gh_int2scm (RIGHT));
-  set_axis (X_AXIS);
+
+  Align_interface (this).set_interface (); 
+  Align_interface (this).set_axis (X_AXIS);
 
   add_offset_callback (Side_position_interface::aligned_on_self, X_AXIS);
 }
index f423d2a4a2dda420b43fe5c3c9e4d8889cd94633..c25f45d05c728d8ed5c2f24dc261af92defe695b 100644 (file)
 
 Collision::Collision()
 {
-  axis_group (this).set_axes (X_AXIS, Y_AXIS);
+  Axis_group_interface (this).set_interface ();
+  Axis_group_interface (this).set_axes (X_AXIS, Y_AXIS);
 }
 
 void
 Collision::add_column (Note_column* ncol_l)
 {
-  axis_group (this).add_element (ncol_l);
+  Axis_group_interface (this).add_element (ncol_l);
   add_dependency (ncol_l);
 }
 
index c7855b583669f9b90718de85211f4e2dac307215..e1874661219789c6690a770b18c1a0e0c199302c 100644 (file)
@@ -1,6 +1,6 @@
 #include "cross-staff.hh"
 #include "item.hh"
-#include "align-element.hh"
+#include "align-interface.hh"
 #include "spanner.hh"
 #include "warn.hh"
 
@@ -9,10 +9,11 @@ calc_interstaff_dist (Item const *item, Spanner const *span)
 {
   Real interstaff = 0.0; 
   Score_element *common = item->common_refpoint (span, Y_AXIS);
-  Align_element * align = dynamic_cast<Align_element*> (common);
-  if (align && align->axis() == Y_AXIS)
+  Align_interface align(common);
+
+  if (align.has_interface_b () && align.axis() == Y_AXIS)
     {
-      SCM threshold = align->get_elt_property ("threshold");
+      SCM threshold = common->get_elt_property ("threshold");
       if (!gh_pair_p (threshold)
          || !scm_equal_p (gh_car (threshold), gh_cdr (threshold)))
        warning (_ ("minVerticalAlign != maxVerticalAlign: cross staff spanners may be broken"));
@@ -30,9 +31,9 @@ calc_interstaff_dist (Item const *item, Spanner const *span)
        note_refpoint = note_refpoint->parent_l (Y_AXIS);
 
       int span_prio =
-       align->get_count ((Score_element*) dynamic_cast<Score_element const*> (span_refpoint));
+       align.get_count ((Score_element*) dynamic_cast<Score_element const*> (span_refpoint));
       int item_prio =
-       align->get_count ((Score_element*) dynamic_cast<Score_element  const *> (note_refpoint));
+       align.get_count ((Score_element*) dynamic_cast<Score_element  const *> (note_refpoint));
 
       /*
        our staff is lower -> interstaff *= -1
index 29a5789a22a6d043b8a922d73a2e754f941cdd83..2dc724e9f60cf22c4dad131de8eadf041361c4b1 100644 (file)
@@ -16,6 +16,7 @@
 #include "axis-group-interface.hh"
 
 
+// todo: dots and elements duplicate each other.
 void
 Dot_column::add_dots (Dots *d)
 {
@@ -23,7 +24,7 @@ Dot_column::add_dots (Dots *d)
   gi.add_element (d);
 
   add_dependency (d);
-  axis_group (this).add_element (d);
+  Axis_group_interface (this).add_element (d);
 }
 
 void
@@ -51,9 +52,10 @@ Dot_column::Dot_column ()
 {
   Group_interface gi (this, "dots");
   gi.set_interface ();
-  
   directional_element (this).set (RIGHT);
-  axis_group (this).set_axes(X_AXIS,X_AXIS);
+  
+  Axis_group_interface (this).set_interface ();
+  Axis_group_interface (this).set_axes(X_AXIS,X_AXIS);
 }
 
 /*
index 4f6f3c9cfb86e8ccf7789e58b35326f0c33cee9b..8309597e50b7db19057b6f1151421ed1d93e89d7 100644 (file)
@@ -32,8 +32,6 @@
 
   * direction of text-dynamic-request if not equalt to direction
   of line-spanner
-
-  * FIXME: this has gotten a bit too hairy.
  */
 
 class Dynamic_line_spanner : public Spanner
@@ -49,8 +47,8 @@ Dynamic_line_spanner::Dynamic_line_spanner ()
 {
   set_elt_property ("transparent", SCM_BOOL_T);
   side_position (this).set_axis (Y_AXIS);
-  axis_group (this).set_interface ();
-  axis_group (this).set_axes (X_AXIS, Y_AXIS);
+  Axis_group_interface (this).set_interface ();
+  Axis_group_interface (this).set_axes (X_AXIS, Y_AXIS);
 }
 
 void
@@ -69,7 +67,7 @@ void
 Dynamic_line_spanner::add_element (Score_element* e)
 {
   e->set_parent (this, Y_AXIS);
-  axis_group (this).add_element (e); 
+  Axis_group_interface (this).add_element (e); 
 }
 
 /**
@@ -89,7 +87,7 @@ class Dynamic_engraver : public Engraver
   Dynamic_line_spanner* finished_line_spanner_;
   Moment last_request_mom_;
 
-  Array<Note_column*> pending_column_arr_;
+  Note_column* pending_column_;
   Link_array<Score_element> pending_element_arr_;
   
   void  typeset_all ();
@@ -128,6 +126,7 @@ Dynamic_engraver::Dynamic_engraver ()
   finished_line_spanner_ = 0;
   span_start_req_l_ = 0;
   cresc_p_ =0;
+  pending_column_ = 0;
 
   text_req_l_ = 0;
   span_req_l_drul_[START] = 0;
@@ -140,6 +139,12 @@ Dynamic_engraver::do_post_move_processing ()
   text_req_l_ = 0;
   span_req_l_drul_[START] = 0;
   span_req_l_drul_[STOP] = 0;
+
+  /* ugr; we must attach the Dynamic_line_spanner to something
+     to be sure that the linebreaker will not be confused
+  */
+  // if (line_spanner_)
+  // line_spanner_->add_column (LEFT, get_staff_info ().command_pcol_l ());
 }
 
 bool
@@ -173,9 +178,8 @@ Dynamic_engraver::do_process_music ()
       && pending_element_arr_.size ())
     {
       line_spanner_ = new Dynamic_line_spanner;
-      for (int i = 0; i < pending_column_arr_.size (); i++)
-       line_spanner_->add_column (pending_column_arr_[i]);
-      pending_column_arr_.clear ();
+      assert (pending_column_);
+      line_spanner_->add_column (pending_column_);
       announce_element (Score_element_info
                        (line_spanner_,
                         text_req_l_ ? text_req_l_ : span_req_l_drul_[START]));
@@ -190,21 +194,12 @@ Dynamic_engraver::do_process_music ()
     }
 
   if (span_req_l_drul_[START] || span_req_l_drul_[STOP] || text_req_l_)
-    {
-      last_request_mom_ = now_mom ();
-    }
-  /*
-    TODO: This should be optionised:
-      * break when group of dynamic requests ends
-      * break now  (only if no cresc. in progress)
-      * continue through piece */
+    last_request_mom_ = now_mom ();
   else
     {
-      /*
-       During a (de)crescendo, pending request will not be cleared,
-       and a line-spanner will always be created, as \< \! are already
-       two requests.
 
+#if 0
+      /*
        Maybe always creating a line-spanner for a (de)crescendo (see
        below) is not a good idea:
 
@@ -217,7 +212,15 @@ Dynamic_engraver::do_process_music ()
        Urg, but line-spanner must always have at least same duration
        as (de)crecsendo, b.o. line-breaking.
        */
+      if (now_mom () > last_request_mom_)
+#else
+      /*
+       During a (de)crescendo, pending request will not be cleared,
+       and a line-spanner will always be created, as \< \! are already
+       two requests.
+       */
       if (now_mom () > last_request_mom_ && !span_start_req_l_)
+#endif 
        {
          for (int i = 0; i < pending_element_arr_.size (); i++)
            {
@@ -247,14 +250,8 @@ Dynamic_engraver::do_process_music ()
                e->set_elt_property ("minimum-space", s);
            }
          pending_element_arr_.clear ();
-         if (line_spanner_)
-           {
-             for (int i = 0; i < pending_column_arr_.size (); i++)
-               line_spanner_->add_column (pending_column_arr_[i]);
-             pending_column_arr_.clear ();
-             finished_line_spanner_ = line_spanner_;
-             line_spanner_ = 0;
-           }
+         finished_line_spanner_ = line_spanner_;
+         line_spanner_ = 0;
        }
     } 
 
@@ -287,7 +284,7 @@ Dynamic_engraver::do_process_music ()
       else
        {
          assert (!finished_cresc_p_);
-         cresc_p_->set_bound (RIGHT, get_staff_info ().musical_pcol_l ());
+         cresc_p_->set_bound(RIGHT, get_staff_info ().musical_pcol_l ());
          finished_cresc_p_ = cresc_p_;
          cresc_p_ = 0;
          span_start_req_l_ = 0;
@@ -329,7 +326,7 @@ Dynamic_engraver::do_process_music ()
                                            + "Spanner", SCM_UNDEFINED);
            }
 
-         cresc_p_->set_bound (LEFT, get_staff_info ().musical_pcol_l ());
+         cresc_p_->set_bound(LEFT, get_staff_info ().musical_pcol_l ());
 
 
          /* 
@@ -403,6 +400,13 @@ Dynamic_engraver::typeset_all ()
       typeset_element (text_p_);
       text_p_ = 0;
     }
+
+  /*
+    TODO: This should be optionised:
+      * break when group of dynamic requests ends
+      * break now 
+      * continue through piece */
+  //  if (line_spanner_ && last_request_mom_ < now_mom ())
   if (finished_line_spanner_)
     {
       side_position (finished_line_spanner_).add_staff_support ();
@@ -423,7 +427,7 @@ Dynamic_engraver::acknowledge_element (Score_element_info i)
        }
       else
        {
-         pending_column_arr_.push (n);
+         pending_column_ = n;
        }
     }
 }
index c9614b89de666172552e1b5d0252446d301c8ab5..7fbca0dd698718d599a2dca4e009e224a2ed94bf 100644 (file)
@@ -71,49 +71,10 @@ Dynamic_performer::do_process_music ()
         (ly_symbol2scm ("dynamic-absolute-volume"),
          ly_quote_scm (ly_str02scm (text_script_req_l_->text_str_.ch_C ())),
          SCM_UNDEFINED));
-      Real volume = gh_scm2double (ly_eval_str ("dynamic-default-volume"));
+      int volume = gh_scm2int (ly_eval_str ("dynamic-default-volume"));
       if (gh_number_p (s))
-       volume = gh_scm2double (s);
-      
-      /*
-       urg, code duplication:: staff_performer
-       */
-      s = get_property ("midiInstrument");
-      
-      if (!gh_string_p(s))
-       s = get_property ("instrument");
-
-      if (!gh_string_p(s))
-       s = ly_str02scm ("piano");
+       volume = gh_scm2int (s);
 
-      
-      /*
-       properties override default equaliser setting
-       */
-      SCM min = get_property ("midiMinimumVolume");
-      SCM max = get_property ("midiMaximumVolume");
-      if (gh_number_p (min) || gh_number_p (max))
-       {
-         Interval iv (0, 1);
-         if (gh_number_p (min))
-           iv[MIN] = gh_scm2double (min);
-         if (gh_number_p (max))
-           iv[MAX] = gh_scm2double (max);
-         volume = iv[MIN] + iv.length () * volume;
-       }
-      else
-       {
-         s = scm_eval (gh_list (ly_symbol2scm ("instrument-equaliser"),
-                                s, SCM_UNDEFINED));
-         if (gh_pair_p (s))
-           {
-             Interval iv;
-             iv[MIN] = gh_scm2double (gh_car (s));
-             iv[MAX] = gh_scm2double (gh_cdr (s));
-             volume = iv[MIN] + iv.length () * volume;
-           }
-       }
-      
       audio_p_ = new Audio_dynamic (volume);
       Audio_element_info info (audio_p_, text_script_req_l_);
       announce_element (info);
index 0ddf8481b7476d78f75d3879d4bb4932b1768e49..0745e3fe640eafda4bb9fd62e56fb3a9fc0e4c00 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "grace-align-item.hh"
+#include "align-interface.hh"
 #include "lookup.hh"
 #include "paper-column.hh"
 #include "paper-def.hh"
@@ -15,7 +16,8 @@
 Grace_align_item::Grace_align_item ()
 {
   set_elt_property ("stacking-dir", gh_int2scm (RIGHT));
-  set_axis (X_AXIS);
+  Align_interface (this).set_interface();
+  Align_interface (this).set_axis (X_AXIS);
 }
   
 void
@@ -28,10 +30,6 @@ Grace_align_item::before_line_breaking ()
                    gh_cons (gh_double2scm (nhw* 1.5),
                             gh_double2scm (infinity_f)));
   column_l ()->set_elt_property ("contains-grace", SCM_BOOL_T);
-
-  
-  Axis_align_item::before_line_breaking ();
-  //  translate_axis (-0.5* nhw, X_AXIS); // ugh.
 }
 
 
index 735ba6b69a894fcd9b4866ffe1ab50e1751ae362..3805612e1cb42f23b438e7e536d88516ee604bcf 100644 (file)
@@ -93,7 +93,7 @@ Grace_position_engraver::do_pre_move_processing ()
       warning (_("Unattached grace notes.  Attaching to last musical column."));
       
       align_l_->set_parent (0, X_AXIS);
-      axis_group(last_musical_col_l_).add_element (align_l_);
+      Axis_group_interface (last_musical_col_l_).add_element (align_l_);
     }
 
   last_musical_col_l_ = get_staff_info ().musical_pcol_l ();
diff --git a/lily/graphical-lisp-element.cc b/lily/graphical-lisp-element.cc
deleted file mode 100644 (file)
index e69de29..0000000
index a0a2e0cf509326f7d2eff9925bd5b783eeb5f699..1d2e281c2125c30d914bbe8f4e08abc6eeea8acf 100644 (file)
@@ -10,7 +10,7 @@
 #include "hara-kiri-engraver.hh"
 #include "rhythmic-head.hh"
 
-Axis_group_spanner*
+Spanner*
 Hara_kiri_engraver::get_spanner_p () const
 {
   return new Hara_kiri_group_spanner;
index ba10c73d46bb87dc5834df6c3cccc9ad54514e76..9f09ea2d90efc8ee2f035a40a68cc10a44bb50b2 100644 (file)
@@ -16,7 +16,6 @@
 Hara_kiri_group_spanner::Hara_kiri_group_spanner()
 {
   set_elt_property ("items-worth-living", SCM_EOL);
-  axis_group (this).set_axes(Y_AXIS,Y_AXIS);
 }
 
 void 
@@ -35,7 +34,7 @@ Hara_kiri_group_spanner::after_line_breaking ()
   if (gh_pair_p (worth))
     return;
 
-  Link_array<Score_element> childs = axis_group (this).get_children ();
+  Link_array<Score_element> childs = Axis_group_interface (this).get_children ();
   for (int i = 0; i < childs.size (); i++)
     {
       Score_element* s = childs[i];
diff --git a/lily/include/align-element.hh b/lily/include/align-element.hh
deleted file mode 100644 (file)
index 19a4e9d..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-  align-item.hh -- declare Align_elem
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef VERTICAL_ALIGN_ITEM_HH
-#define VERTICAL_ALIGN_ITEM_HH
-
-#include "score-element.hh"
-
-/**
-  Order elements top to bottom/left to right/right to left etc..
-
-  TODO: implement padding.
-
-  document usage of this.
-
-
-
-  *******
-  
-  element properties
-
-  stacking-dir
-  
-  Which side to align?  -1: left side, 0: centered (around
-     center_l_ if not nil, or around center of width), 1: right side
-
-
-*/
-class Align_element : public virtual Score_element {
-public:
-  Axis axis () const;
-
-  Align_element ();
-  void set_axis (Axis);
-  int get_count (Score_element*)const;
-  void add_element (Score_element *);
-  static Real alignment_callback (Dimension_cache const *);
-protected:
-  virtual void do_side_processing (Axis);
-  
-};
-#endif // VERTICAL_ALIGN_ITEM_HH
diff --git a/lily/include/align-interface.hh b/lily/include/align-interface.hh
new file mode 100644 (file)
index 0000000..0809620
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+  align-interface.hh -- declare Align_interface
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef ALIGN_INTERFACE_HH
+#define ALIGN_INTERFACE_HH
+
+#include "axes.hh"
+#include "lily-proto.hh"
+
+/*
+  TODO: rewrite this comment.
+  
+  
+  Order elements top to bottom/left to right/right to left etc..
+
+  TODO: implement padding.
+
+  document usage of this.
+
+
+
+  *******
+  
+  element properties
+
+  stacking-dir
+  
+  Which side to align?  -1: left side, 0: centered (around
+     center_l_ if not nil, or around center of width), 1: right side
+ */
+struct Align_interface  {
+  Score_element * elt_l_;
+  
+  Align_interface (Score_element const*);
+  static Real alignment_callback (Dimension_cache const *);
+  void do_side_processing (Axis a);
+  void set_axis (Axis);
+  Axis axis () const;
+  void add_element (Score_element*);
+  int get_count (Score_element*)const;
+  void set_interface ();
+  bool has_interface_b ();
+};
+
+#endif /* ALIGN_INTERFACE_HH */
+
diff --git a/lily/include/atom.hh b/lily/include/atom.hh
deleted file mode 100644 (file)
index e69de29..0000000
index 9b59283804b7aadf1f175db801a36b611b265f90..fd465f9f4cb286e7b177483909fa6a0d1e7ec7a4 100644 (file)
@@ -40,9 +40,9 @@ private:
 class Audio_dynamic : public Audio_item
 {
 public:
-  Audio_dynamic (Real volume);
+  Audio_dynamic (int volume);
 
-  Real volume_;
+  int volume_i_;
 };
 
 class Audio_key : public Audio_item
diff --git a/lily/include/axis-align-item.hh b/lily/include/axis-align-item.hh
deleted file mode 100644 (file)
index 7a7d402..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*   
-  axis-align-item.hh -- declare Axis_align_item
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef AXIS_ALIGN_ITEM_HH
-#define AXIS_ALIGN_ITEM_HH
-
-#include "align-element.hh"
-#include "axis-group-item.hh"
-
-/*
-  UGH. FIXME: multiple inheritance.
- */
-class Axis_align_item : public virtual Align_element, public virtual Axis_group_item
-{
-public:
-  Axis_align_item ();
-protected:
-  virtual void do_print ()const;
-
-};
-#endif /* AXIS_ALIGN_ITEM_HH */
-
diff --git a/lily/include/axis-align-spanner.hh b/lily/include/axis-align-spanner.hh
deleted file mode 100644 (file)
index 0352968..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
-  vertical-align-spanner.hh -- declare Vertical_align_spanner
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef VERTICAL_ALIGN_SPANNER_HH
-#define VERTICAL_ALIGN_SPANNER_HH
-
-#include "spanner.hh"
-#include "align-element.hh"
-#include "axis-group-spanner.hh"
-
-/*
-  FIXME: multiple inheritance
- */
-class Axis_align_spanner : public virtual Align_element, public virtual Axis_group_spanner
-{
-public:
-  VIRTUAL_COPY_CONS(Score_element);
-  Axis_align_spanner ();
-  virtual void do_print() const {}
-};
-#endif // VERTICAL_ALIGN_SPANNER_HH
index f2f99b0411b684bdac74c18934c4581952473da2..f790997d85104d7a2eb1bc134cfeab0a15f77f18 100644 (file)
 class Axis_group_engraver : public Engraver
 {
 protected:
-  Axis_group_spanner *staffline_p_;
+  Spanner *staffline_p_;
   Link_array<Score_element> elts_;
 
   virtual void do_creation_processing();
   virtual void do_removal_processing();
   virtual void acknowledge_element (Score_element_info);
   virtual void process_acknowledged ();
-  virtual Axis_group_spanner* get_spanner_p () const;
+  virtual Spanner* get_spanner_p () const;
 public:
   VIRTUAL_COPY_CONS(Translator);
   
index 9ceee2fcb13011a0a23f0c02f92ac9f2c7dfadc2..f1382da9be632585cfbe3c43a03e8f96ec29a8b7 100644 (file)
 
 #include "group-interface.hh"
 
-struct Axis_group_interface : Group_interface
+/**
+   Treat a group of elements as a union. This sets the parent of any S
+   added to ELT_L_ to ELT_L_.
+
+   Properties:
+
+   axes -- list of axis (number) in which this group works
+
+   transparent -- an Axis_group is transparent by default
+
+   elements -- contains list of pointers to other elements
+
+   interfaces -- Axis_group is added to this list.
+*/
+struct Axis_group_interface 
 {
+  Score_element *elt_l_;
   Axis_group_interface (Score_element*);
+
   static Interval group_extent_callback (Dimension_cache const*);
+
   void add_element (Score_element*);
   void set_axes (Axis,Axis);
   bool axis_b (Axis)const;
@@ -24,8 +41,5 @@ struct Axis_group_interface : Group_interface
   void set_interface ();
 };
 
-Axis_group_interface
-axis_group (Score_element*);
-
 #endif /* AXIS_GROUP_INTERFACE_HH */
 
index aa2e6392bc670a77444e91539edee6cab5971d01..09c7cfafd0cb2ee13152e399db7d99198272b2fd 100644 (file)
@@ -1,22 +1 @@
-/*
-  axis-item.hh -- declare Axis_group_item
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef AXIS_ITEM_HH
-#define AXIS_ITEM_HH
-
-#include "item.hh"
-
-class Axis_group_item :  public virtual Item
-{
-public:
-  Axis_group_item ();
-  VIRTUAL_COPY_CONS(Score_element);
-};
-
-#endif // AXIS_ITEM_HH
+#error
index 9d48108c2ee9c6a2e8d45402a7113d2451910ef7..65296f81060baccd891380179b283fc7515acef0 100644 (file)
@@ -1,27 +1,2 @@
-/*
-  axis-group-spanner.hh -- declare Axis_group_spanner
 
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef AXIS_GROUP_SPANNER_HH
-#define AXIS_GROUP_SPANNER_HH
-
-#include "spanner.hh"
-
-/**
-   An element which groups a line in a certain direction. The most
-   useful example of this is the Vertical_group_spanner
-*/
-class Axis_group_spanner : public virtual Spanner
-
-{
-public:
-  Axis_group_spanner ();
-  VIRTUAL_COPY_CONS(Score_element);
-};
-
-#endif // SPAN_AXIS_GROUP_HH
+#error
index 791e104f0066590309ccbeb4a88efa2992cb942f..c9a5aa16321c4c08c9698c68ab9440b25c8c4759 100644 (file)
 #ifndef BREAK_ALIGN_ITEM_HH
 #define BREAK_ALIGN_ITEM_HH
 
-#include "axis-align-item.hh"
+#include "item.hh"
 
 /// align breakable items (clef, bar, etc.)
-class Break_align_item : public Axis_align_item {
-
-
+class Break_align_item : public Item
+{
 protected:
   virtual void before_line_breaking ();
 public:
index f64db66504f06871fd42884481852415bcb219cc..64052db5e013f9415145a2ae5b5e0d0d47f6d11c 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef COLLISION_HH
 #define COLLISION_HH
 #include "lily-proto.hh"
-#include "axis-group-item.hh"
+#include "item.hh"
 #include "tuple.hh"
 
 //junkme, use SCM conses.
@@ -24,7 +24,8 @@ typedef Tuple<Score_element*, Real> Shift_tup;
   multistaff support (see Chlapik: equal noteheads should be on the
   same hpos.)  
 */
-class Collision : public Axis_group_item {
+class Collision : public Item
+{
 protected:
   Array<Shift_tup> automatic_shift ();
   Array<Shift_tup> forced_shift ();
index 56206a3bdf09be9a92a129e53ac4d0975149d89e..abcf2c40f3710a810c88c1edc86761df273c4322 100644 (file)
 class Context_specced_music : public Music_wrapper
 {
 public:
-  /** The kind of translation needed for this music.  This doesn't
-    make sense for simple (ie non-list) music, but it does no harm
-    here. Yes, it did harm Music_sequence: you can forget to copy it.
-      
-    */
+  /// The kind of translation needed for this music.  
   String translator_type_str_;
 
   /// what identification for the translation unit
index 9679bf32a4a28f325a1bf74d5775ae1c0a7606b2..4c3a211557d197a175ac8f91959104308a99c1bc 100644 (file)
 #ifndef DOT_COLUMN_HH
 #define DOT_COLUMN_HH
 
-#include "axis-group-item.hh"
+#include "item.hh"
 
 
 /**
   Group dots.  This is needed because, the dots have to be aligned per voice
  */
-class Dot_column : public Axis_group_item
+class Dot_column : public Item
 {
   static int compare (Dots * const&,Dots * const&);
   void add_dots (Dots*);
diff --git a/lily/include/dummy.icc b/lily/include/dummy.icc
deleted file mode 100644 (file)
index e69de29..0000000
index f3bb2af3c476ae724f5509fe23cde1a20a4889c2..ed16719bcab9773fd7f91e899ea1f70ce574ac69 100644 (file)
@@ -11,9 +11,9 @@
 #define GRACE_ALIGN_ITEM_HH
 
 
-#include "axis-align-item.hh"
+#include "item.hh"
 
-class Grace_align_item : public Axis_align_item
+class Grace_align_item : public Item
 {
 public:
   VIRTUAL_COPY_CONS (Score_element);
index 509fcdf25b8783cf98acb5499a6a57e4c907f56a..72bc892258ac1aa104e9ee398352dcb0a94727cf 100644 (file)
 #include "lily-guile.hh"
 #include "smobs.hh"
 
-/*
-  rename to list interface?
- */
-
 /**
    Look at Score element ELT as thing which has a list property called
    NAME_. Normally the list would contain Score_elements, but
    sometimes it can be different things.
+
+   todo: reename as list_interface?
 */
+
 struct Group_interface
 {
   Score_element * elt_l_;
index 82992a29a87f071e3cf352caa2d06a42159bab41..93eeb8feb7f160a206ef26a0110ce35c4410d97a 100644 (file)
@@ -15,7 +15,7 @@
 class Hara_kiri_engraver : public Axis_group_engraver
 {
 protected:
-  virtual Axis_group_spanner*get_spanner_p ()const;
+  virtual Spanner*get_spanner_p ()const;
   virtual void acknowledge_element (Score_element_info);
 public:
   VIRTUAL_COPY_CONS(Translator);
index e3e34c2a00d6c686a4ce174044484a8570430054..aeb77bf9b8386f32dd1dac29ab9eaeea03ef71d2 100644 (file)
 #ifndef HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
 #define HARA_KIRI_VERTICAL_GROUP_SPANNER_HH
 
-#include "axis-group-spanner.hh"
+#include "spanner.hh"
 
 /** 
   As Vertical_group_spanner, but keep track of interesting items.  If
   we don't contain any interesting items after linebreaking, then
   gracefully commit suicide.  Objective: don't disgrace Lily by
   typesetting empty lines in orchestral scores.  */
-class Hara_kiri_group_spanner : public Axis_group_spanner
+class Hara_kiri_group_spanner : public Spanner
 {
 public:
   Hara_kiri_group_spanner ();
diff --git a/lily/include/head-column.hh b/lily/include/head-column.hh
deleted file mode 100644 (file)
index e69de29..0000000
index c4b3dfbad3d6ca56efe42be084b1de3def0a7e2b..0f2c951ca4c51d106831eef22b5d1c4c2b7393a5 100644 (file)
   NB. This doesn't mean an Item has to initialize the output field before
   spacing calculation. 
   
-
   
-  @signature
-  visibility_lambda :: int -> (bool . bool)
-     
-  @in
-  break direction
-     
-  @out
-  (transparent, empty) cons
-     
-   */
-class Item : public virtual Score_element {
-  void do_break ();
-  void try_visibility_lambda ();
-public:
-  /*
-    ugh.
+  Element properties
+  
+  visibility-lambda -- a function that takes the break
+  direction and returns a (transparent, empty) cons
+
+  breakable -- boolean indicating if this is a breakable item (clef,
+  barline, key sig, etc.)
+
    */
+class Item : public Score_element
+{
   Drul_array<Item*> broken_to_drul_;
 
-
+  void do_break ();
+  void try_visibility_lambda ();
 public:
+  VIRTUAL_COPY_CONS(Score_element);
+  Item();
+  Item (Item const &);
 
-  /// I am really to be broken?
   bool breakable_b () const;
   bool broken_b () const;
   
@@ -57,18 +53,10 @@ public:
   Item * find_broken_piece (Direction) const;
   Score_element * find_broken_piece (Line_of_score*) const;    
 
-  Item();
-  Real hpos_f() const;
-  
   virtual Line_of_score * line_l() const;
   virtual Paper_column * column_l () const;
-    
-  static int left_right_compare (Item const *, Item const*);
-  
-  Item (Item const &);
 protected:
   virtual void do_breakable_col_processing();
-
   void copy_breakable_items();
 };
 
index 8309d245a93783f3bd60f7257d01268ecb0f7f51..1b85d39f98006865e39f512ab9f1b1732b44cc9b 100644 (file)
@@ -34,10 +34,6 @@ struct Audio_tie;
 struct Audio_time_signature;
 struct Auto_beam_engraver;
 struct Axis_align_item;
-struct Axis_group;
-struct Axis_group_element;
-struct Axis_group_item;
-struct Axis_group_spanner;
 struct Bar;
 struct Bar_column;
 struct Bar_column_engraver;
@@ -273,7 +269,6 @@ struct Tremolo_req;
 struct Tuplet_spanner;
 struct Unfolded_repeat_iterator;
 struct Vertical_brace;
-struct Vertical_spanner;
 struct Volta_spanner;
 struct Moment;
 
index 72a10c72a5b9cd5e08b4b9d915fdf9d821c40618..b5db361da42609695cc8e8ac041246878c0c08bd 100644 (file)
@@ -20,7 +20,7 @@
   */
 class Line_group_engraver_group : public Engraver_group_engraver {
 protected:
-  Axis_group_spanner *staffline_p_;   
+  Spanner *staffline_p_;   
 
   virtual void create_line_spanner ();
   virtual void do_creation_processing();
index 994a50b20d7fb42550602f1b944bd454312699cc..a5a0174d1990612160d42097379534f8a82898f2 100644 (file)
@@ -8,13 +8,34 @@
 #define SCORELINE_HH
 
 #include "column-x-positions.hh"
-#include "axis-group-spanner.hh"
-#include "super-element.hh"
+#include "spanner.hh"
 
 /// the columns of a score that form one line. FIXME: multiple inheritance
-class Line_of_score : public Axis_group_spanner, public Super_element
+class Line_of_score : public Spanner
 {
 public:
+
+  
+/*
+  imported the following  from Super_element
+  
+  The toplevel element. The Paper_score contains this element, and any
+  element shoud be a dependency for the super element.
+
+  It is the entry point for the "constraint solver"/ dependency
+  tracker.  Every XXXX_processing () call traverses the entire
+  dependency graph, and calls the appropriate
+  Score_element::do_XXX_processing function on each Score_element it encounters.
+  
+
+  FIXME: remove this class, to eliminate multiple inheritance. Merge
+  with Line_of_score ?  */
+  void space_processing ();
+  void pre_processing();
+  void breakable_col_processing();
+  void post_processing();
+  void output_all ();
+
   int rank_i_;
   
   Line_of_score();
@@ -30,7 +51,6 @@ public:
   void add_column (Paper_column*);
   
 protected:
-  virtual void do_print() const;
   VIRTUAL_COPY_CONS(Score_element);
 };
 
index df0876b598d7e17f41da28daa0ddd06e673755f7..0d81e99399cb99ef18b93b8c1672769a83aa57aa 100644 (file)
 #define NOTE_COLUMN_HH
 
 #include "item.hh"
-#include "axis-group-item.hh"
 
 /** a struct for treating a group of noteheads (noteheads, stem
-  (chord) and scripts) as a single entity.  */
-class Note_column : public Axis_group_item {
+  (chord) and scripts) as a single entity.
+*/
+class Note_column : public Item
+{
 protected:
   virtual void after_line_breaking () ;
 public:
-
   static int shift_compare (Note_column *const &, Note_column*const&);
   
   /** The relative position of the "voice" containing this
index 16b05850577f51cff1266e9c54a771ef24e8ee38..e0510bc7f8c6070b99d0a0a44fb45bc2565d0f6c 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef P_COL_HH
 #define P_COL_HH
 
-#include "axis-group-item.hh"
+#include "item.hh"
 #include "rod.hh"
 #include "spring.hh"
 
@@ -27,7 +27,8 @@
     \end{itemize}
   */
 
-class Paper_column : public Axis_group_item { 
+class Paper_column : public Item
+{ 
 public:
   VIRTUAL_COPY_CONS(Score_element);
   Drul_array<Array<Column_rod> > minimal_dists_arr_drul_;
index a3209d8b13710bcd6ab39eb74ad3902a57695d94..09c7cfafd0cb2ee13152e399db7d99198272b2fd 100644 (file)
@@ -1,25 +1 @@
-/*
-  score-halign-engraver.hh -- declare Score_horizontal_align_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 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:
-  VIRTUAL_COPY_CONS(Translator);
-  
-  Priority_horizontal_align_engraver();
-protected:
-  virtual void acknowledge_element (Score_element_info);
-  virtual void do_pre_move_processing();
-};
-#endif // Priority_HALIGN_GRAV_HH
+#error
diff --git a/lily/include/rest-column-engraver.hh b/lily/include/rest-column-engraver.hh
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/lily/include/rest-column.hh b/lily/include/rest-column.hh
deleted file mode 100644 (file)
index e69de29..0000000
index 9bcbd2e33ca779dd7d6f072357873377379e2e14..8fde243cd851f850d1ac53c79df5f1757325c238 100644 (file)
 
 typedef void (Score_element::*Score_element_method_pointer) (void);
 
-/** Both Spanner and Item are Score_element's. Most Score_element's depend
-  on other Score_element's, eg, Beam needs to know and set direction of
-  Stem. So the Beam has to be calculated *before* Stem. This is
-  accomplished with the dependencies fields of struct Score_element,
-  which are implemented in the Directed_graph_node class: all elements
-  form an acyclic graph.
+/**
+   Basic output object.
 
-  (elem)
+    Element Properties:
 
+   transparent -- boolean: if true, do not print anything black.
 
-Element Properties:
+   dependencies -- list of score-element pointers that indicate who to
+   compute first.
 
-Boolean (true iff defined)
+   interfaces -- list of symbols indicating the interfaces supported
+   by this object.
 
- break_helper_only -- if defined try to junk this after calcing breakpoints.
-
- transparent -- do not calc. output
+   extra-offset -- pair of reals (a cons) forcing an extra offset
+   before outputting
 
+   glyph -- afm character name to output.
+   
 */
 class Score_element  {
   /**
@@ -170,6 +170,8 @@ public:
 
   /**
      Set this if anyone points to me, or if I point to anyone.
+
+     JUNKME.
    */
   bool used_b_;
   
index 12495db3afc9d2ca9dedfac0b62ec4c9c2c8faaa..839c088c2cf7d00b15ee271449f8a832af3cea54 100644 (file)
 #include "spanner.hh"
 #include "item.hh"
 
+
+/**
+   Position victim object (ELT_L_) next to other objects (the support).
+
+   side-support -- list of score elements
+
+   direction -- where to put the victim object (left or right?)
+
+   side-relative-direction -- if set: get the direction from a different object, and multiply by this.
+   
+   direction-source -- in case side-relative-direction is set, where
+   to get the direction
+
+   minimum-space -- minimum distance that the victim should move
+   (after padding)
+
+   padding -- add this much extra space between victim and support
+
+   TODO: move  out unrelated callbacks.
+   
+ */
 struct Side_position_interface
 {
   Score_element * elt_l_;
index bc93e8fe3dbdd9470e48be1edbde299d92e4ca24..93213fa0b26b9b2cac75330078689e283cacbbf3 100644 (file)
@@ -29,7 +29,6 @@ public:
     
   VIRTUAL_COPY_CONS(Score_element);
   void add_bar (Score_element*);
-  void set_align (Align_element *);
 protected:
   void evaluate_empty ();
 
index 130604b86303cdfc1b4dedcbf960471b29580d7b..b67d63d7dc134b199deed55443b5a340438a9e5a 100644 (file)
@@ -20,13 +20,10 @@ class Axis_group_spanner;
 
   Examples
 
-  \begin{itemize}
-  \item (de)crescendo
-  \item slur
-  \item beam
-  \item bracket
-  \end{itemize}
-  
+  * (de)crescendo
+  * slur
+  * beam
+  * bracket
 
   Spanner should know about the items which it should consider:
   e.g. slurs should be steep enough to "enclose" all those items. This
@@ -34,7 +31,7 @@ class Axis_group_spanner;
   length of stems of notes they encompass.
 
   */
-class Spanner : public virtual Score_element {
+class Spanner : public  Score_element {
   Drul_array<Item*> spanned_drul_;
 
 public:
index 8c574bb68330911343baddd4fa1b28ec29320763..3ae4480ba416e2a76f71c0f102b1c3b20f820e32 100644 (file)
 #ifndef Super_element_HH
 #define Super_element_HH
 
+#error
 #include "score-element.hh"
-/** The toplevel element. The Paper_score contains this element, and any
-  element shoud be a dependency for the super element.
-
-  It is the entry point for the "constraint solver"/ dependency
-  tracker.  Every XXXX_processing () call traverses the entire
-  dependency graph, and calls the appropriate
-  Score_element::do_XXX_processing function on each Score_element it encounters.
-  
-
-  FIXME: remove this class, to eliminate multiple inheritance. Merge
-  with Line_of_score ?  */
-class Super_element : public virtual Score_element {
-public:
-  void space_processing ();
-  void pre_processing();
-  void breakable_col_processing();
-  void post_processing();
-  void output_all ();
-};
 
 #endif // Super_element_HH
diff --git a/lily/include/todo-performer.hh b/lily/include/todo-performer.hh
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/lily/include/vertical-align-engraver.hh b/lily/include/vertical-align-engraver.hh
deleted file mode 100644 (file)
index 286395f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-  vertical-align-engraver.hh -- declare Vertical_align_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-
-#ifndef VERTICAL_ALIGN_GRAV_HH
-#define VERTICAL_ALIGN_GRAV_HH
-
-#include "engraver.hh"
-class Axis_align_spanner;
-class Vertical_align_engraver : public Engraver {
-  Axis_align_spanner * valign_p_;
-  bool qualifies_b (Score_element_info) const;  
-public:
-  VIRTUAL_COPY_CONS(Translator);
-  
-  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
index d9abade41bf7e23fb80ad3bff5b1bc4f89eb568f..45cea7a7c4b211c2efb4f0256544f989c0ca1ba1 100644 (file)
@@ -19,6 +19,17 @@ Item::Item ()
   broken_to_drul_[LEFT] = broken_to_drul_[RIGHT]=0;
 }
 
+/**
+   Item copy ctor.  Copy nothing: everything should be a elt property
+   or a special purpose poitner (such as broken_to_drul_[]) */
+Item::Item (Item const &s)
+  : Score_element (s)
+{
+  broken_to_drul_[LEFT] = broken_to_drul_[RIGHT] =0;
+}
+
+
+
 bool
 Item::breakable_b () const
 {
@@ -29,12 +40,6 @@ Item::breakable_b () const
   return (i) ?  i->breakable_b () : to_boolean (get_elt_property( "breakable"));
 }
 
-Real 
-Item::hpos_f() const
-{
-  return relative_coordinate (0, X_AXIS);
-}
-
 Line_of_score *
 Item::line_l() const
 {
@@ -163,12 +168,6 @@ Item::column_l () const
   return dynamic_cast<Item*> (parent_l (X_AXIS))->column_l ();
 }
 
-Item::Item (Item const &s)
-  : Score_element (s)
-{
-  broken_to_drul_[LEFT] = broken_to_drul_[RIGHT] =0;
-}
-
 Direction
 Item::break_status_dir () const
 {
index 99dc54a202df3341af7827d8e402ed649e09d667..e08fae228911dc26434485cdc137ae0bfa4591cc 100644 (file)
@@ -7,7 +7,6 @@
 */
 
 #include "staff-symbol.hh"
-#include "axis-group-spanner.hh"
 #include "command-request.hh"
 #include "bar.hh"
 #include "debug.hh"
@@ -26,7 +25,7 @@ void
 Line_group_engraver_group::typeset_element (Score_element *elem)
 {
   if (!elem->parent_l (Y_AXIS))      
-    axis_group (staffline_p_).add_element (elem);
+    Axis_group_interface (staffline_p_).add_element (elem);
   Engraver_group_engraver::typeset_element (elem);
 }
 
@@ -53,8 +52,9 @@ Line_group_engraver_group::do_creation_processing()
 void
 Line_group_engraver_group::create_line_spanner ()
 {
-  staffline_p_ = new Axis_group_spanner ;
-  axis_group (staffline_p_).set_axes (Y_AXIS,Y_AXIS);
+  staffline_p_ = new Spanner ;
+  Axis_group_interface (staffline_p_).set_interface ();
+  Axis_group_interface (staffline_p_).set_axes (Y_AXIS,Y_AXIS);
 }
 
 
index 478a07289d7fd26a55ded33594ef2f9e397218ff..89d6de0dd42aed901ce63ee957d5bdd9bbbbfddb 100644 (file)
@@ -6,21 +6,23 @@
   (c) 1996--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
+#include "axis-group-interface.hh"
+#include "debug.hh"
 #include "line-of-score.hh"
+#include "main.hh"
+#include "paper-column.hh"
 #include "paper-def.hh"
 #include "paper-outputter.hh"
-#include "paper-column.hh"
 #include "paper-score.hh"
+#include "string.hh"
 #include "warn.hh"
-#include "main.hh"
-#include "debug.hh"
-#include "axis-group-interface.hh"
 
 
 Line_of_score::Line_of_score()
 {
   set_elt_property ("columns", SCM_EOL);
-  axis_group (this).set_axes (Y_AXIS,X_AXIS);
+  Axis_group_interface (this).set_interface ();
+  Axis_group_interface (this).set_axes (Y_AXIS,X_AXIS);
 }
 
 
@@ -67,15 +69,9 @@ Line_of_score::add_column (Paper_column*p)
 {
   set_elt_property ("columns",
                    gh_cons (p->self_scm_, get_elt_property ("columns")));
-  axis_group (this).add_element (p);
+  Axis_group_interface (this).add_element (p);
 }
 
-void
-Line_of_score::do_print() const
-{
-  Spanner::do_print();
-  Axis_group_spanner::do_print ();
-}
 
 void
 Line_of_score::output_line (bool last_line)
@@ -87,7 +83,7 @@ Line_of_score::output_line (bool last_line)
     translate_axis (- i[MAX], Y_AXIS);
   
   pscore_l_->outputter_l_->start_line (i.length ());
-  Super_element::output_all ();
+  output_all ();
   if (last_line)
     pscore_l_->outputter_l_->stop_last_line();
   else
@@ -99,3 +95,67 @@ Line_of_score::compare (Line_of_score* const &p1,Line_of_score* const &p2)
 {
   return p1->rank_i_ - p2->rank_i_;
 }
+
+
+
+/**
+    for administration of what was done already
+    */
+enum Score_element_status {
+  ORPHAN=0,                    // not yet added to pstaff
+  VIRGIN,                      // added to pstaff
+  PREBROKEN,
+  PREBROKEN_SECOND,
+  PRECALCING,
+  PRECALCED,           // calcs before spacing done
+  SPACING,
+  SPACED,
+  BROKEN,
+  BROKEN_SECOND,
+  POSTCALCING,         // busy calculating. This is used to trap cyclic deps.
+  POSTCALCED,          // after spacing calcs done
+  BREWING,
+  BREWED,
+};
+
+void
+Line_of_score::pre_processing ()
+{
+  calculate_dependencies (PRECALCED, PRECALCING, &Score_element::before_line_breaking);
+}
+
+void
+Line_of_score::space_processing ()
+{
+  calculate_dependencies (SPACED, SPACING, &Score_element::do_space_processing);
+}
+
+/* for break processing, use only one status, because copies have to
+  have correct status. (Previously,
+  Score_element::handle_[pre]broken_dependencies assigned to status_i_
+  */
+void
+Line_of_score::breakable_col_processing ()
+{
+  calculate_dependencies (PREBROKEN, PREBROKEN, &Score_element::do_breakable_col_processing);
+  //  calculate_dependencies (PREBROKEN_SECOND, PREBROKEN_SECOND, &Score_element::handle_prebroken_dependents);
+}
+
+
+void
+Line_of_score::post_processing ()
+{
+  //  calculate_dependencies (BROKEN_SECOND, BROKEN_SECOND,
+  //             &Score_element::handle_broken_dependents);
+  calculate_dependencies (POSTCALCED, POSTCALCING, &Score_element::after_line_breaking);
+}
+
+void
+Line_of_score::output_all () 
+{
+  calculate_dependencies (BREWED, BREWING, &Score_element::output_processing);
+}
+
+
+
+
index 730a8658fb59cd8ae3434ade2e1d2818ee676002..b822a6655e51eb3fe97f2f242aee6596036945fb 100644 (file)
@@ -476,11 +476,8 @@ Midi_dynamic::str () const
     07 MSB
     27 LSB
    */
-  static Real const full_scale = 127;
-
   str += to_str ((char)0x07);
-  int volume = (int)(audio_l_->volume_*full_scale);
-  str += to_str ((char)volume);
+  str += to_str ((char)audio_l_->volume_i_);
   return str;
 }
 
index 3b9a26e89b230cffcfbcc72019846a33a293de1d..909629921cf1781571166e685764e92c8d7543c0 100644 (file)
@@ -42,7 +42,8 @@ Note_column::Note_column()
 {
   set_elt_property ("rests", SCM_EOL);
   set_elt_property ("note-heads", SCM_EOL);  
-  axis_group (this).set_axes (X_AXIS, Y_AXIS);
+  Axis_group_interface (this).set_interface ();
+  Axis_group_interface (this).set_axes (X_AXIS, Y_AXIS);
 }
 
 Stem *
@@ -92,7 +93,7 @@ Note_column::set_stem (Stem * stem_l)
   set_elt_property ("stem", stem_l->self_scm_);
 
   add_dependency (stem_l);
-  axis_group (this).add_element (stem_l);
+  Axis_group_interface (this).add_element (stem_l);
 }
 
 
@@ -110,7 +111,7 @@ Note_column::add_head (Rhythmic_head *h)
       Group_interface gi (this, "note-heads");
       gi.add_element (nh);
     }
-  axis_group (this).add_element (h);
+  Axis_group_interface (this).add_element (h);
 }
 
 /**
@@ -133,7 +134,7 @@ Note_column::translate_rests (int dy_i)
 void
 Note_column::set_dotcol (Dot_column *d)
 {
-  axis_group (this).add_element (d);
+  Axis_group_interface (this).add_element (d);
 }
 
 /*
@@ -172,12 +173,12 @@ Note_column::after_line_breaking ()
     beam_y = gh_scm2double (s);
 
   
-  Real x0 = b->first_visible_stem ()->hpos_f ();
-  Real dx = b->last_visible_stem ()->hpos_f () - x0;
+  Real x0 = b->first_visible_stem ()->relative_coordinate (0, X_AXIS);
+  Real dx = b->last_visible_stem ()->relative_coordinate (0, X_AXIS) - x0;
   Real dydx = beam_dy && dx ? beam_dy/dx : 0;
 
   Direction d = stem_l ()->get_direction ();
-  Real beamy = (stem_l ()->hpos_f () - x0) * dydx + beam_y;
+  Real beamy = (stem_l ()->relative_coordinate (0, X_AXIS) - x0) * dydx + beam_y;
 
   s = get_elt_property ("rests");
   Score_element * se = unsmob_element (gh_car (s));
index 14f1340464e2f2c334e437b18d8132350720d73d..2f225d0718d55fb6eba1b11183ec34a274666702 100644 (file)
@@ -109,25 +109,20 @@ Paper_column::line_l() const
   return line_l_;
 }
 
-
-
-
 Paper_column*
 Paper_column::column_l () const
 {
   return (Paper_column*)(this);
 }
 
-
-
-
 Paper_column::Paper_column (Moment w)
 {
   SCM when = (new Moment (w))->smobify_self ();
   scm_unprotect_object (when);
   set_elt_property ("when", when);
-  
-  axis_group (this).set_axes (X_AXIS, X_AXIS);
+
+  Axis_group_interface (this).set_interface ();
+  Axis_group_interface (this).set_axes (X_AXIS, X_AXIS);
 
   line_l_=0;
   rank_i_ = -1;
@@ -156,3 +151,4 @@ Paper_column::musical_b () const
     }
   return s != Moment(0);
 }
+
index a2d31ab4a5b8f549681517cd482ca5e2c15f1501..4f1870886a9857aa998987fff9ce24b2fc3dc032 100644 (file)
@@ -81,19 +81,6 @@ Score_element::~Score_element()
   delete dim_cache_[Y_AXIS];  
 }
 
-
-Real
-Score_element::get_real (String s) const
-{
-  return gh_scm2double (get_elt_property (s));
-}
-
-void
-Score_element::set_real (String s, Real r)
-{
-  set_elt_property (s, gh_double2scm (r));
-}
-
 // should also have one that takes SCM arg. 
 SCM
 Score_element::get_elt_property (String nm) const
@@ -569,6 +556,10 @@ Score_element::fixup_refpoint ()
        {
          Score_element * newparent = parent->find_broken_piece (line_l ());
          set_parent (newparent, ax);
+         if (!newparent)
+           {
+             programming_error ("Orphaned score-element.");
+           }
        }
 
       if (Item * i  = dynamic_cast<Item*> (this))
index 15d490bca65693e3dc9de9ae341fbc8de06c1a35..bb6f6424270ec2fabfa6d32eebd590ed395382a5 100644 (file)
@@ -152,7 +152,7 @@ Score_engraver::typeset_all()
            }
        }
       if (!elem_p->parent_l(Y_AXIS))
-       axis_group (scoreline_l_).add_element (elem_p);
+       Axis_group_interface (scoreline_l_).add_element (elem_p);
     }
   elem_p_arr_.clear();
 }
index 7f556f08366090c8f514a8a198bec9b6a1006ffd..c76b0a09b82d7f69e5e25c1b572ec871028b04b7 100644 (file)
@@ -233,7 +233,8 @@ Side_position_interface::set_axis (Axis a)
   if (elt_l_->get_elt_property ("side-support") == SCM_UNDEFINED)
     elt_l_->set_elt_property ("side-support" ,SCM_EOL);
 
-  elt_l_->add_offset_callback (aligned_side, a);
+  if (!elt_l_->has_offset_callback_b (aligned_side, a))
+    elt_l_->add_offset_callback (aligned_side, a);
 }
 
 
index b5ce992237ae0ea3ac85db8fa3b88ae13fa73043..7a0f91f9413b840e644c17ca36cb135f82ae5b5b 100644 (file)
@@ -320,12 +320,12 @@ Slur::encompass_offset (Note_column const* col) const
   if (!stem_l)
     {
       warning (_ ("Slur over rest?"));
-     o[X_AXIS] = col->hpos_f ();
+     o[X_AXIS] = col->relative_coordinate (0, X_AXIS);
       o[Y_AXIS] = col->extent (Y_AXIS)[dir];
       return o;  
     }
   Direction stem_dir = directional_element (stem_l).get ();
-  o[X_AXIS] = stem_l->hpos_f ();
+  o[X_AXIS] = stem_l->relative_coordinate (0, X_AXIS);
 
   /*
     Simply set x to middle of notehead
@@ -444,7 +444,7 @@ Slur::set_extremities ()
          */
          else
            {
-             dx_f_drul_[d] = stem_l->hpos_f ()
+             dx_f_drul_[d] = stem_l->relative_coordinate (0, X_AXIS)
                - get_bound (d)->relative_coordinate (0, X_AXIS);
              /*
                side attached to beamed stem
index 7ed3c4a6c7dede5699f145fe91c63c0dad1a43e6..d16081928e05ef99ccc6aa6dd639420610667e32 100644 (file)
@@ -11,7 +11,6 @@
 #include "dimensions.hh"
 #include "paper-def.hh"
 #include "molecule.hh"
-#include "align-element.hh"
 #include "warn.hh"
 #include "group-interface.hh"
 
index 0b7771e1e0e9cd317ddade202a970cfffaed3548..b4807e3a9d9324f2cb8397b02f492af7376437eb 100644 (file)
@@ -72,10 +72,10 @@ void
 Span_dynamic_performer::do_process_music ()
 {
   if (finished_dynamic_tuple_arr_.size () > 1
-     && finished_dynamic_tuple_arr_.top ().audio_l_->volume_)
+     && finished_dynamic_tuple_arr_.top ().audio_l_->volume_i_)
     {
-      Real start_volume = finished_dynamic_tuple_arr_[0].audio_l_->volume_;
-      Real dv = finished_dynamic_tuple_arr_.top ().audio_l_->volume_
+      Real start_volume = finished_dynamic_tuple_arr_[0].audio_l_->volume_i_;
+      Real dv = finished_dynamic_tuple_arr_.top ().audio_l_->volume_i_
        - start_volume;
       /*
        urg.
@@ -90,11 +90,11 @@ Span_dynamic_performer::do_process_music ()
        */
       if (!dv || sign (dv) != finished_dir_)
        {
-         // urg.  10%: about one volume step
-         dv = (Real)finished_dir_ * 0.1;
+         // urg.  about one volume step
+         dv = (int)finished_dir_ * 13;
          if (!start_volume)
            start_volume = finished_dynamic_tuple_arr_.top
-             ().audio_l_->volume_ - dv;
+             ().audio_l_->volume_i_ - dv;
        }
       Moment start_mom = finished_dynamic_tuple_arr_[0].mom_;
       Moment dt = finished_dynamic_tuple_arr_.top ().mom_ - start_mom;
@@ -103,7 +103,7 @@ Span_dynamic_performer::do_process_music ()
          Audio_dynamic_tuple* a = &finished_dynamic_tuple_arr_[i];
          Real volume = start_volume + dv * (Real)(a->mom_ - start_mom)
            / (Real)dt;
-         a->audio_l_->volume_ = volume;
+         a->audio_l_->volume_i_ = (int)volume;
        }
       finished_dynamic_tuple_arr_.clear ();
     }
index 6e32dccc66bc786376b428e92645bdf485ab6566..222a39149674456a2206d50d42e0da2ab62ae59a 100644 (file)
 #include "line-of-score.hh"
 #include "break-align-item.hh"
 
-
 void
-Spanner::do_break_processing ()
+Spanner::do_break_processing()
 {
   //break_into_pieces
-  Item * left = spanned_drul_[LEFT];
-  Item * right = spanned_drul_[RIGHT];
-  
-  if  (left == right)
-    {
-      warning (_f ("Spanner `%s' has equal left and right spanpoints",
-                  classname (this)));
-    }
-
-  /*
-    Check if our parent in X-direction spans equally wide
-    or wider than we do.
-   */
-  for (int a = X_AXIS; a < NO_AXES; a ++)
-    {
-      if (Spanner* parent = dynamic_cast<Spanner*> (parent_l ((Axis)a)))
-       {
-#if 1
-         /*
-           Urg, should use instantiate-compare, or maybe mysterious
-           column_width/contains functions?
-         */
-         if (spanned_drul_[LEFT] && spanned_drul_[RIGHT] 
-             && parent->spanned_drul_[LEFT] && parent->spanned_drul_[RIGHT])
-           {
-             if (parent->spanned_drul_[LEFT]->column_l ()->rank_i ()
-                 > spanned_drul_[LEFT]->column_l ()->rank_i () > 0
-                 || parent->spanned_drul_[RIGHT]->column_l ()->rank_i ()
-                 < spanned_drul_[RIGHT]->column_l ()->rank_i ())
-               {
-                 warning (_f ("Spanner `%s' is not fully contained in parent spanner `%s'.",
-                              classname (this), classname (parent)));
-               }
-           }
-#else
-         /*
-           column_width (), contains ()?
-         */
-         if (!parent->column_width ().contains (this->column_width ()))
-           {
-             warning (_f ("Spanner `%s' is not fully contained in parent spanner `%s'.",
-                          classname (this), classname (parent)));
-           }
-#endif     
-       }
-    }
   
   if (line_l () || broken_b ())
     return;
+  
+  Item * left = spanned_drul_[LEFT];
+  Item * right = spanned_drul_[RIGHT];
 
   if  (left == right)
     {
+      warning (_ ("Left spanpoint is right spanpoint"));
+
       /*
        FIXME: this is broken.
        */
@@ -167,8 +125,7 @@ Spanner::set_bound(Direction d, Item*i)
   
   if (spanned_drul_[Direction(-d)] == spanned_drul_[d]
        && i)
-    warning (_f ("Spanner `%s' has equal left and right spanpoints",
-                classname (this)));
+    warning (_f ("Spanner `%s' has equal left and right spanpoints", classname (this)));
 }
 
 
index d945dc246338a156138c2e955973ce76303fad09..855aa46d03f86e0f380ed4c2cac3f3d5a982d38f 100644 (file)
@@ -60,8 +60,8 @@ Stem_tremolo::do_brew_molecule () const
       SCM s = beam->get_elt_property ("height");
       if (gh_number_p (s))
        dy = gh_scm2double (s);
-      Real dx = beam->last_visible_stem ()->hpos_f ()
-       - beam->first_visible_stem ()->hpos_f ();
+      Real dx = beam->last_visible_stem ()->relative_coordinate (0, X_AXIS)
+       - beam->first_visible_stem ()->relative_coordinate (0, X_AXIS);
       dydx = dx ? dy/dx : 0;
     }
   else
@@ -99,7 +99,7 @@ Stem_tremolo::do_brew_molecule () const
     {
       // ugh, rather calc from Stem_tremolo_req
       int beams_i = stem->beam_count(RIGHT) >? stem->beam_count (LEFT);
-      mol.translate (Offset(stem->hpos_f () - hpos_f (),
+      mol.translate (Offset(stem->relative_coordinate (0, X_AXIS) - relative_coordinate (0, X_AXIS),
                            stem->stem_end_position () * half_space - 
                            directional_element (beam).get () * beams_i * interbeam_f));
     }
@@ -121,7 +121,7 @@ Stem_tremolo::do_brew_molecule () const
       else
        whole_note_correction = 0;
         
-      mol.translate (Offset (stem->hpos_f () - hpos_f () +
+      mol.translate (Offset (stem->relative_coordinate (0, X_AXIS) - relative_coordinate (0, X_AXIS) +
                             whole_note_correction, dy));
     }
   
diff --git a/lily/super-element.cc b/lily/super-element.cc
deleted file mode 100644 (file)
index ee544ea..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-  super-elem.cc -- implement Super_elem
-
-  source file of the LilyPond music typesetter
-
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#include "super-element.hh"
-#include "line-of-score.hh"
-#include "paper-score.hh"
-#include "string.hh"
-#include "paper-outputter.hh"
-
-
-/**
-    for administration of what was done already
-    */
-enum Score_element_status {
-  ORPHAN=0,                    // not yet added to pstaff
-  VIRGIN,                      // added to pstaff
-  PREBROKEN,
-  PREBROKEN_SECOND,
-  PRECALCING,
-  PRECALCED,           // calcs before spacing done
-  SPACING,
-  SPACED,
-  BROKEN,
-  BROKEN_SECOND,
-  POSTCALCING,         // busy calculating. This is used to trap cyclic deps.
-  POSTCALCED,          // after spacing calcs done
-  BREWING,
-  BREWED,
-};
-
-void
-Super_element::pre_processing ()
-{
-  calculate_dependencies (PRECALCED, PRECALCING, &Score_element::before_line_breaking);
-}
-
-void
-Super_element::space_processing ()
-{
-  calculate_dependencies (SPACED, SPACING, &Score_element::do_space_processing);
-}
-
-/* for break processing, use only one status, because copies have to
-  have correct status. (Previously,
-  Score_element::handle_[pre]broken_dependencies assigned to status_i_
-  */
-void
-Super_element::breakable_col_processing ()
-{
-  calculate_dependencies (PREBROKEN, PREBROKEN, &Score_element::do_breakable_col_processing);
-  //  calculate_dependencies (PREBROKEN_SECOND, PREBROKEN_SECOND, &Score_element::handle_prebroken_dependents);
-}
-
-
-void
-Super_element::post_processing ()
-{
-  //  calculate_dependencies (BROKEN_SECOND, BROKEN_SECOND,
-  //             &Score_element::handle_broken_dependents);
-  calculate_dependencies (POSTCALCED, POSTCALCING, &Score_element::after_line_breaking);
-}
-
-void
-Super_element::output_all () 
-{
-  calculate_dependencies (BREWED, BREWING, &Score_element::output_processing);
-}
-
-
-
-
index ab38ee151415b1a5aa7af9bc37fe08cc7ac54e50..1669899c181c4a3b88cd20234f2ca845a89c8939 100644 (file)
@@ -157,15 +157,15 @@ Tuplet_spanner::calc_position_and_height (Real *offset, Real * dy) const
 
   *offset = - d * infinity_f;
   
-  Real x0 = column_arr[0]->hpos_f ();
-  Real x1 = column_arr.top ()->hpos_f ();
+  Real x0 = column_arr[0]->relative_coordinate (0, X_AXIS);
+  Real x1 = column_arr.top ()->relative_coordinate (0, X_AXIS);
   
   Real factor = column_arr.size () > 1 ? 1/(x1 - x0) : 1.0;
   
   for (int i = 0; i < column_arr.size ();  i++)
     {
       Real notey = column_arr[i]->extent (Y_AXIS)[d];
-      Real x = column_arr[i]->hpos_f () - x0;
+      Real x = column_arr[i]->relative_coordinate (0, X_AXIS) - x0;
       Real tuplety =  *dy * x * factor;
 
       if (notey * d > (*offset + tuplety) * d)
index 2c2d48d9ad901edb1cc997a92a11c31f8b01a02a..b4244c668e1872fb90da77f87911cfcc1798c6e9 100644 (file)
@@ -8,11 +8,26 @@
 #include "translator-group.hh"
 #include "axis-group-engraver.hh"
 #include "paper-column.hh"
-#include "vertical-align-engraver.hh"
-#include "axis-align-spanner.hh"
-#include "axis-group-spanner.hh"
+#include "align-interface.hh"
 #include "span-bar.hh"
 #include "axis-group-interface.hh"
+#include "engraver.hh"
+#include "spanner.hh"
+
+class Vertical_align_engraver : public Engraver {
+  Spanner * valign_p_;
+  bool qualifies_b (Score_element_info) const;  
+public:
+  VIRTUAL_COPY_CONS(Translator);
+  
+  Vertical_align_engraver();
+protected:
+  
+  virtual void acknowledge_element (Score_element_info);
+  virtual void do_creation_processing();
+  virtual void do_removal_processing();
+};
+
 
 Vertical_align_engraver::Vertical_align_engraver()
 {
@@ -22,9 +37,11 @@ Vertical_align_engraver::Vertical_align_engraver()
 void
 Vertical_align_engraver::do_creation_processing()
 {
-  valign_p_ =new Axis_align_spanner;
-  valign_p_->set_axis (Y_AXIS);
-  valign_p_->set_elt_property ("stacking-dir",  gh_int2scm (DOWN));
+  valign_p_ =new Spanner; //Axis_align_spanner
+  Align_interface (valign_p_).set_interface ();
+  Align_interface (valign_p_).set_axis (Y_AXIS);
+  valign_p_->set_elt_property ("stacking-dir",
+                              gh_int2scm (DOWN));
   
   valign_p_->set_bound(LEFT,get_staff_info().command_pcol_l ());
   announce_element (Score_element_info (valign_p_ , 0));
@@ -67,10 +84,11 @@ Vertical_align_engraver::acknowledge_element (Score_element_info i)
 {
   if (qualifies_b (i))
     {
-      valign_p_->add_element (i.elem_l_);
+      Align_interface(valign_p_).add_element (i.elem_l_);
     }
   /*
-    ? huh
+     Add make sure spanbars (whose size depends on vertical alignment)
+     depend on the vertical alignment element
    */
   else if (dynamic_cast<Span_bar*>(i.elem_l_) && i.origin_trans_l_arr (this).size ())
     {
index 5bcf0d68f4b17bcc766284ca13a7bb502cf7b263..6bc5df8a5fe11c8db1ce82de1c5c8268770c7059 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.36
-Entered-date: 17MAR00
+Version: 1.3.37
+Entered-date: 20MAR00
 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.36.tar.gz 
+       1000k lilypond-1.3.37.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.36.tar.gz 
+       1000k lilypond-1.3.37.tar.gz 
 Copying-policy: GPL
 End
index c9f2186c30b19fb1e805afcdf9323c829197de41..8a680e8cb7c401a0e07b5ea5e53fdf31321e8331 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.3.36
+Version: 1.3.37
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.36.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.37.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # get Packager from (undocumented?) ~/.rpmmacros!
index 00b14e605d483d09ff246de0269b4fcf60d63b22..2b3b88b76d445dc32611b1363ab4ed5066233b35 100644 (file)
@@ -40,8 +40,8 @@
        }
        \translator { 
                \ScoreContext 
-               %% URG: this changes dynamics too
-               %%textStyle = #"italic"
+               %textEmptyDimension = ##t
+               textStyle = #"italic"
                timeSignatureStyle = #"C"
        }
        \translator { \OrchestralScoreContext }
index eb422ae2bed729502d50e35e3b024f63007bcf91..7ec5642f26dfbb7f580dfb3f9d38115731a75779 100644 (file)
@@ -47,8 +47,8 @@
        }
        \translator { 
                \ScoreContext skipBars = ##t 
-               %% URG: this changes dynamics too
-               %%textStyle = #"italic"
+               %textEmptyDimension = ##t
+               textStyle = #"italic"
                timeSignatureStyle = #"C"
        }
 }
index 04626f50793c301bb36d62af96036066ae6d3d50..10301acea2cf09c4be619a31c60d6f4b132a2ace 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2000-03-20 16:31+0100\n"
+"POT-Creation-Date: 2000-03-15 19:34+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -207,7 +207,7 @@ msgstr ""
 msgid "unknown clef type"
 msgstr ""
 
-#: collision.cc:101
+#: collision.cc:99
 msgid "Too many clashing notecolumns.  Ignoring them."
 msgstr ""
 
@@ -236,19 +236,19 @@ msgstr ""
 msgid "NaN"
 msgstr ""
 
-#: dynamic-engraver.cc:285 span-dynamic-performer.cc:116
+#: dynamic-engraver.cc:244 span-dynamic-performer.cc:114
 msgid "can't find start of (de)crescendo"
 msgstr ""
 
-#: dynamic-engraver.cc:304
+#: dynamic-engraver.cc:263
 msgid "already have a crescendo"
 msgstr ""
 
-#: dynamic-engraver.cc:305
+#: dynamic-engraver.cc:264
 msgid "already have a decrescendo"
 msgstr ""
 
-#: dynamic-engraver.cc:380
+#: dynamic-engraver.cc:339
 msgid "unterminated (de)crescendo"
 msgstr ""
 
@@ -272,7 +272,7 @@ msgstr ""
 msgid "no Grace context available"
 msgstr ""
 
-#: grace-position-engraver.cc:93
+#: grace-position-engraver.cc:91
 msgid "Unattached grace notes.  Attaching to last musical column."
 msgstr ""
 
@@ -545,20 +545,20 @@ msgstr ""
 msgid "Braces don't match"
 msgstr ""
 
-#: paper-column.cc:49
+#: paper-column.cc:48
 msgid "Must set spring between differing columns"
 msgstr ""
 
-#: paper-def.cc:70
+#: paper-def.cc:69
 #, c-format
 msgid "unknown paper variable: `%s'"
 msgstr ""
 
-#: paper-def.cc:74
+#: paper-def.cc:73
 msgid "not a real variable"
 msgstr ""
 
-#: paper-def.cc:184
+#: paper-def.cc:180
 #, c-format
 msgid "paper output to %s..."
 msgstr ""
@@ -633,7 +633,7 @@ msgstr ""
 msgid "too many notes for rest collision"
 msgstr ""
 
-#: score-engraver.cc:141
+#: score-engraver.cc:139
 #, c-format
 msgid "unbound spanner `%s'"
 msgstr ""
@@ -704,14 +704,13 @@ msgstr ""
 msgid "Slur over rest?"
 msgstr ""
 
-#: spanner.cc:31 spanner.cc:170
-#, c-format
-msgid "Spanner `%s' has equal left and right spanpoints"
+#: spanner.cc:34
+msgid "Left spanpoint is right spanpoint"
 msgstr ""
 
-#: spanner.cc:56 spanner.cc:66
+#: spanner.cc:128
 #, c-format
-msgid "Spanner `%s' is not fully contained in parent spanner `%s'."
+msgid "Spanner `%s' has equal left and right spanpoints"
 msgstr ""
 
 #: stem-engraver.cc:124
index 561428ed2ac23427a9433b07fca83ca5ce1bb5d8..56a2d4a94437472d1d56973fd54c0c980ccf266e 100644 (file)
--- a/po/nl.po
+++ b/po/nl.po
@@ -4,7 +4,7 @@
 #
 msgid ""
 msgstr ""
-"POT-Creation-Date: 2000-03-20 16:31+0100\n"
+"POT-Creation-Date: 2000-03-15 19:34+0100\n"
 "Content-Type: text/plain; charset=\n"
 "Date: 1998-05-26 11:26:28+0200\n"
 "From:  <janneke@gnu.org>\n"
@@ -205,7 +205,7 @@ msgstr "ongeldige inversie toon: geen onderdeel van accoord: %s"
 msgid "unknown clef type"
 msgstr "onbekend type sleutel"
 
-#: collision.cc:101
+#: collision.cc:99
 msgid "Too many clashing notecolumns.  Ignoring them."
 msgstr "Te veel botsende nootkolommen.  Negeer ze."
 
@@ -236,19 +236,19 @@ msgstr "kan geheugen controle niet zetten!"
 msgid "NaN"
 msgstr "NaN"
 
-#: dynamic-engraver.cc:285 span-dynamic-performer.cc:116
+#: dynamic-engraver.cc:244 span-dynamic-performer.cc:114
 msgid "can't find start of (de)crescendo"
 msgstr "kan start van (de)crescendo niet vinden"
 
-#: dynamic-engraver.cc:304
+#: dynamic-engraver.cc:263
 msgid "already have a crescendo"
 msgstr "heb al een crescendo"
 
-#: dynamic-engraver.cc:305
+#: dynamic-engraver.cc:264
 msgid "already have a decrescendo"
 msgstr "heb al een decrescendo"
 
-#: dynamic-engraver.cc:380
+#: dynamic-engraver.cc:339
 msgid "unterminated (de)crescendo"
 msgstr "onbeëindigd (de)crescendo"
 
@@ -273,7 +273,7 @@ msgstr "Geen doenbare regelafbreuk gevonden"
 msgid "no Grace context available"
 msgstr "geen Grace context voor handen"
 
-#: grace-position-engraver.cc:93
+#: grace-position-engraver.cc:91
 msgid "Unattached grace notes.  Attaching to last musical column."
 msgstr "Losse grace noten.  Maak ze vast aan vorige muziekale kolom."
 
@@ -335,7 +335,6 @@ msgstr "vals:"
 
 #: local-key-engraver.cc:83 time-signature-engraver.cc:29
 #: translator-group.cc:416 translator-group.cc:425
-#, c-format
 msgid "can't find: `%s'"
 msgstr "kan niet vinden: `%s'"
 
@@ -537,7 +536,6 @@ msgid "Interpretation context with empty type"
 msgstr "Vertolk context met leeg type"
 
 #: music-output-def.cc:84
-#, c-format
 msgid "can't find `%s' context"
 msgstr "kan `%s' context niet vinden"
 
@@ -569,20 +567,20 @@ msgstr "Ontleden..."
 msgid "Braces don't match"
 msgstr "Haakjes paren niet"
 
-#: paper-column.cc:49
+#: paper-column.cc:48
 msgid "Must set spring between differing columns"
 msgstr "Moet veertje zetten tussen verschillende kolommen"
 
-#: paper-def.cc:70
+#: paper-def.cc:69
 #, c-format
 msgid "unknown paper variable: `%s'"
 msgstr "onbekende papier veranderlijke: `%s'"
 
-#: paper-def.cc:74
+#: paper-def.cc:73
 msgid "not a real variable"
 msgstr "niet een reële veranderlijke"
 
-#: paper-def.cc:184
+#: paper-def.cc:180
 #, c-format
 msgid "paper output to %s..."
 msgstr "papier uitvoer naar %s..."
@@ -645,7 +643,6 @@ msgid "Huh?  Not a Request: `%s'"
 msgstr "Huh?  Geen Request: `%s'"
 
 #: request-iterator.cc:20
-#, c-format
 msgid "Junking music: `%s'"
 msgstr "Schroot muziek: `%s'"
 
@@ -657,7 +654,7 @@ msgstr "te veel botsende rusten"
 msgid "too many notes for rest collision"
 msgstr "te veel noten voor bosting met rusten"
 
-#: score-engraver.cc:141
+#: score-engraver.cc:139
 #, c-format
 msgid "unbound spanner `%s'"
 msgstr "ongebonden spanner `%s'"
@@ -712,7 +709,6 @@ msgid "unterminated slur"
 msgstr "onbeëindigde bindingsboog"
 
 #: slur-engraver.cc:77
-#, c-format
 msgid "can't find both ends of %s"
 msgstr "kan niet beide uiteinden vinden van %s"
 
@@ -728,16 +724,15 @@ msgstr "Zet bindingsboog over rust.  Negeer."
 msgid "Slur over rest?"
 msgstr "Boogje over rust?"
 
-#: spanner.cc:31 spanner.cc:170
+#: spanner.cc:34
+msgid "Left spanpoint is right spanpoint"
+msgstr "Linker spanpunt is rechter spanpunt"
+
+#: spanner.cc:128
 #, c-format
 msgid "Spanner `%s' has equal left and right spanpoints"
 msgstr "Spanner `%s' heeft gelijke linker en rechter spanpunten"
 
-#: spanner.cc:56 spanner.cc:66
-#, c-format
-msgid "Spanner `%s' is not fully contained in parent spanner `%s'."
-msgstr "Spanner `%s' is niet volledig opgenomen in parent spanner `%s'."
-
 #: stem-engraver.cc:124
 #, c-format
 msgid "Adding note head to incompatible stem (type = %d)"
@@ -759,7 +754,6 @@ msgstr ""
 "%s: TFM bestand heeft %u parameters, wat meer is dan de %u die ik aan kan"
 
 #: tfm.cc:70
-#, c-format
 msgid "can't find ascii character: `%d'"
 msgstr "kan teken niet vinden: `%s'"
 
@@ -807,12 +801,10 @@ msgid "Already contains: `%s'"
 msgstr "Bevat reeds: `%s'"
 
 #: translator-group.cc:210
-#, c-format
 msgid "can't find or create `%s' called `%s'"
 msgstr "kan niet vinden of scheppen `%s' genaamd `%s'"
 
 #: translator-group.cc:322
-#, c-format
 msgid "can't find or create: `%s'"
 msgstr "kan niet vinden of scheppen: `%s'"
 
@@ -1094,9 +1086,6 @@ msgstr "% Automatisch gegenereerd"
 msgid "% from input file: "
 msgstr "% van invoerbestand: "
 
-#~ msgid "Left spanpoint is right spanpoint"
-#~ msgstr "Linker spanpunt is rechter spanpunt"
-
 #~ msgid "(search path: `%s'"
 #~ msgstr "(zoekpad: `%s')"
 
index 5cd17d315d988aa8d5a7c87763299cfcc851ef0f..0e42d834a2eaf09d119d87f19bf5d944b7039fc7 100644 (file)
@@ -5,21 +5,19 @@
 ;;; (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
 
 
-
 (define absolute-volume-alist '())
 (set! absolute-volume-alist
       (append 
       '(
-       ("sf" . 1.00)
-       ("ffff" . 0.91)
-       ("fff" . 0.81)
-       ("ff" . 0.71)
-       ("f" . 0.61)
-       ("mf" . 0.50)
-       ("mp" . 0.40)
-       ("p" . 0.30)
-       ("pp" . 0.20)
-       ("ppp" . 0.10)
+       ("sf" . 115)
+       ("fff" . 102)
+       ("ff" . 90)
+       ("f" . 77)
+       ("mf" . 64)
+       ("mp" . 51)
+       ("p" . 38)
+       ("pp" . 26)
+       ("ppp" . 13)
        )
       absolute-volume-alist))
 
     (if entry
        (cdr entry))))
 
-(define instrument-equaliser-alist '())
-(set! instrument-equaliser-alist
-      (append 
-       '(
-        ("flute" . (0 . 1))
-        ("oboe" . (0 . 1))
-        ("clarinet" . (0 . 1))
-        ("bassoon" . (0 . 1))
-        ("french horn" . (0 . 1))
-        ("trumpet" . (0 . 1))
-        ("timpani" . (0 . 1))
-        ("violin" . (0 . 1))
-        ("viola" . (0 . 1))
-        ("cello" . (0 . 1))
-        ("contrabass" . (0 . 1))
-        )
-       instrument-equaliser-alist))
-
-(define (instrument-equaliser s)
-  (let ((entry (assoc s absolute-volume-alist)))
-    (if entry
-       (cdr entry))))
-
-(define instrument-equaliser-alist '())
-
-;; 90 == 90/127 == 0.71 is supposed to be the default value
+;; 90 is supposed to be the default value
 ;; urg: we should set this at start of track
-(define dynamic-default-volume 0.71)
+(define dynamic-default-volume 90)
index 7714a5695c0b7ec9afb5ef4a5e3d91b3c619696c..5970042939f1f2515b4197e967cc1a2548d5b98e 100644 (file)
@@ -281,7 +281,7 @@ if 1:
        def conv(str):
                str =  re.sub ('SkipBars','skipBars', str)
                str =  re.sub ('fontsize','fontSize', str)
-               str =  re.sub ('midi_instrument','midiInstrument', x)                   
+               str =  re.sub ('midi_instrument','midiInstrument', str)                 
                        
                return str
 
@@ -293,7 +293,7 @@ if 1:
        def conv(str):
                str =  re.sub ('tieydirection','tieVerticalDirection', str)
                str =  re.sub ('slurydirection','slurVerticalDirection', str)
-               str =  re.sub ('ydirection','verticalDirection', x)                     
+               str =  re.sub ('ydirection','verticalDirection', str)                   
                        
                return str