]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.47
authorfred <fred>
Wed, 27 Mar 2002 02:47:34 +0000 (02:47 +0000)
committerfred <fred>
Wed, 27 Mar 2002 02:47:34 +0000 (02:47 +0000)
111 files changed:
Documentation/regression-test.tely
NEWS
input/regression/spacing-clef-first-note.ly [new file with mode: 0644]
input/regression/spacing-knee.ly [new file with mode: 0644]
lily/accidental-engraver.cc
lily/align-interface.cc
lily/arpeggio.cc
lily/axis-group-engraver.cc
lily/axis-group-interface.cc
lily/bar-line.cc
lily/beam.cc
lily/break-align-engraver.cc
lily/break-align-interface.cc
lily/breathing-sign-engraver.cc
lily/breathing-sign.cc
lily/chord-name.cc
lily/chord-tremolo-engraver.cc
lily/clef-engraver.cc
lily/clef.cc
lily/collision-engraver.cc
lily/collision.cc
lily/completion-note-heads-engraver.cc
lily/custos.cc
lily/dot-column.cc
lily/dots.cc
lily/dynamic-engraver.cc
lily/engraver-group-engraver.cc
lily/figured-bass-engraver.cc
lily/font-interface.cc
lily/grob-interface.cc [new file with mode: 0644]
lily/grob.cc
lily/hairpin.cc
lily/hara-kiri-group-spanner.cc
lily/hyphen-spanner.cc
lily/include/grob-interface.hh [new file with mode: 0644]
lily/include/grob.hh
lily/include/hara-kiri-group-spanner.hh
lily/include/note-spacing.hh
lily/include/separation-item.hh
lily/include/spaceable-grob.hh
lily/include/stem.hh
lily/include/tie-column.hh
lily/include/tuplet-bracket.hh [new file with mode: 0644]
lily/include/tuplet-spanner.hh
lily/include/volta-bracket.hh [new file with mode: 0644]
lily/item.cc
lily/key-engraver.cc
lily/key-signature-interface.cc
lily/lily-guile.cc
lily/line-spanner.cc
lily/local-key-item.cc
lily/lookup.cc
lily/lyric-extender.cc
lily/molecule.cc
lily/multi-measure-rest-engraver.cc
lily/multi-measure-rest.cc
lily/note-column.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/note-spacing.cc
lily/paper-column.cc
lily/percent-repeat-item.cc
lily/phrasing-slur-engraver.cc
lily/piano-pedal-engraver.cc
lily/porrectus.cc
lily/rest-collision-engraver.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/rhythmic-column-engraver.cc
lily/rhythmic-head.cc
lily/scm-option.cc
lily/score-engraver.cc
lily/score.cc
lily/script-column.cc
lily/script.cc
lily/separating-group-spanner.cc
lily/separation-item.cc
lily/sequential-music-iterator.cc
lily/side-position-interface.cc
lily/slur-engraver.cc
lily/slur.cc
lily/spaceable-grob.cc
lily/spacing-spanner.cc
lily/span-bar-engraver.cc
lily/span-bar.cc
lily/spanner.cc
lily/staff-spacing.cc
lily/staff-symbol-referencer.cc
lily/staff-symbol.cc
lily/stem-engraver.cc
lily/stem-tremolo.cc
lily/stem.cc
lily/syllable-group.cc
lily/system-start-delimiter.cc
lily/system.cc
lily/text-item.cc
lily/text-spanner.cc
lily/tie-column.cc
lily/tie-engraver.cc
lily/tie.cc
lily/time-signature.cc
lily/tuplet-bracket.cc
lily/tuplet-engraver.cc
lily/volta-bracket.cc [new file with mode: 0644]
lily/volta-engraver.cc
scm/backend-documentation-lib.scm
scm/generate-documentation.scm
scm/grob-description.scm
scm/grob-property-description.scm
scm/interface-description.scm

index ee9a1fdb41c6fc663aa101ca2a0a67d99cc5f622..4b1531f563db068367f631012cc78eb8ceda6ff1 100644 (file)
@@ -257,10 +257,16 @@ Grace note do weird things with timing. Fragile.
 
 @lilypondfile[printfilename]{lyrics-bar.ly}
 
+@lilypondfile[printfilename]{spacing-knee.ly}
+
+
+
 @lilypondfile[printfilename]{non-empty-text.ly}
 
 @lilypondfile[printfilename]{prefatory-spacing-matter.ly}
 
+@lilypondfile[printfilename]{spacing-clef-first-note.ly}
+
 @lilypondfile[printfilename]{spacing-bar-stem.ly}
 
 
diff --git a/NEWS b/NEWS
index ce25038d6fa1025cf6e026594394e90988e64a3f..4dd7ec9c36b5255189d35b74b2a35b462cc773da 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,10 +5,12 @@ New features in 1.5
 
 * Figured bass support
 
-* Improved grace notes
+* Improved beam formatting.
+
+* Improved grace notes.
 
 * Better spacing.
 
 * More ancient notation support.
 
-* Some entry optimizations
+* Some entry optimizations.
diff --git a/input/regression/spacing-clef-first-note.ly b/input/regression/spacing-clef-first-note.ly
new file mode 100644 (file)
index 0000000..c0d9258
--- /dev/null
@@ -0,0 +1,23 @@
+\header {
+
+    texidoc = "clef changes at the start of a line get much more space
+than clef changes halfway the line."
+
+}
+
+\score  {\notes {
+    < \context Staff = SA {
+       c2
+       \clef bass e16 f a
+       \clef treble b
+       }
+      \context Staff = SB  {
+         c4 c4 c4 
+      }>
+    }
+    \paper { linewidth  = -1.
+\translator { \StaffContext
+             TimeSignature = \turnOff
+        }
+
+     }}
diff --git a/input/regression/spacing-knee.ly b/input/regression/spacing-knee.ly
new file mode 100644 (file)
index 0000000..3b51d5f
--- /dev/null
@@ -0,0 +1,13 @@
+\header {
+texidoc = "For knees, the spacing correction is such that the
+stems are put at regular distances.
+"
+    }
+\score { \notes
+{
+[g''8 g g'' g''] 
+
+    }
+\paper { linewidth = -1. }
+     }
+
index 5b476a05cb8dd922f4fe61228761046c7a4832e9..8a3110cfb68c494f773f50eba28856abdb57df32 100644 (file)
@@ -225,9 +225,7 @@ Accidental_engraver::create_grobs ()
              if (!key_item_p_) 
                {
                  key_item_p_ = new Item (get_property ("Accidentals"));
-                 Local_key_item::set_interface (key_item_p_);
 
-                 Staff_symbol_referencer::set_interface (key_item_p_);
                  SCM c0 = get_property ("centralCPosition");
                  if (gh_number_p (c0))
                    Staff_symbol_referencer::set_position (key_item_p_, gh_scm2int (c0));
index e326199e4150555b8b20ba8789b9add169188126..03447301845f620533e005566927ef5138890c01 100644 (file)
@@ -270,15 +270,6 @@ Align_interface::add_element (Grob*me,Grob* s, SCM cb)
   Axis_group_interface::add_element (me, s);
 }
 
-
-void
-Align_interface::set_interface (Grob*me)
-{
-  me->set_interface (ly_symbol2scm ("align-interface"));
-
-  Axis_group_interface::set_interface (me);
-}
-
 void
 Align_interface::set_axis (Grob*me,Axis a)
 {
@@ -291,3 +282,13 @@ Align_interface::has_interface (Grob*me)
   return me && me->has_interface (ly_symbol2scm ("align-interface"));
 }
 
+
+ADD_INTERFACE (Align_interface, "align-interface",
+  " Order grobs top to bottom/left to right/right to left etc.",
+  "forced-distance stacking-dir align-dir threshold alignment-done center-element elements axes");
+
+
+
+ADD_INTERFACE (Foobar, "aligned-interface",
+  "read by align-interface",
+  "minimum-space-pair extra-space");
index f480a6acb9b3f29e7635f1767d1f9b75cd5a5978..dcf1a03dac2098dfd0c39ebf68bc0247267ae394 100644 (file)
@@ -109,3 +109,9 @@ Arpeggio::width_callback (SCM smob, SCM axis)
 
   return ly_interval2scm (arpeggio.extent (X_AXIS) * 1.5);
 }
+
+
+ADD_INTERFACE (Arpeggio, "arpeggio-interface",
+  "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads.",
+  "stems arpeggio-direction");
+
index f22d068ffaf6900310a47011fe61ffcf2d23f928..8c054c3d67e55cfe23f6ff259597d555365c7ee3 100644 (file)
@@ -42,8 +42,6 @@ void
 Axis_group_engraver::initialize ()
 {
   staffline_p_ = get_spanner_p ();
-  Axis_group_interface::set_interface (staffline_p_);
-  Axis_group_interface::set_axes (staffline_p_, Y_AXIS, Y_AXIS);
 
   Grob *  it = unsmob_grob (get_property ("currentCommandColumn"));
 
@@ -148,7 +146,7 @@ Spanner*
 Hara_kiri_engraver::get_spanner_p () const
 {
   Spanner * sp = new Spanner (get_property ("HaraKiriVerticalGroup"));
-  Hara_kiri_group_spanner::set_interface (sp);
+
   return sp;
 }
 
index d7074ef3a4a43375a146019be9dc1db57c9b11ca..895b5597c9a4f19c33f1807b054898d833176b81 100644 (file)
@@ -130,11 +130,7 @@ Axis_group_interface::has_interface (Grob*me)
   return me && me->has_interface (ly_symbol2scm ("axis-group-interface"));
 }
 
-void
-Axis_group_interface::set_interface (Grob*me)
-{
-  if (!has_interface (me))
-    {
-      me->set_interface (ly_symbol2scm ("axis-group-interface"));      
-    }
-}
+
+ADD_INTERFACE (Axis_group_interface, "axis-group-interface",
+  "a group of coupled grobs",
+  "axes");
index 5aac74183e60931d5d966f9ac066d1bb6c5d7d07..e1bd060ccc9fbc9969a5566f728a73a8ec354a6b 100644 (file)
@@ -164,11 +164,6 @@ Bar_line::before_line_breaking (SCM smob)
   return SCM_UNSPECIFIED;
 }
   
-void
-Bar_line::set_interface (Grob*me)
-{
-  me->set_interface (ly_symbol2scm ("bar-line-interface"));
-}
 
 bool
 Bar_line::has_interface (Grob*m)
@@ -198,3 +193,38 @@ Bar_line::get_staff_bar_size (SCM smob)
   else
     return gh_int2scm (0);
 }
+
+
+
+ADD_INTERFACE (Bar_line, "bar-line-interface",
+  "Bar line.
+
+This is a request to print a special bar symbol. It replaces the 
+regular bar symbol with a special
+symbol.  The argument @var{bartype} is a string which specifies the
+kind of bar to print.  Options are @code{:|}
+@cindex |A@@@code{:|}
+,
+@code{|:}
+@cindex |B@@@code{|:}
+, @code{:|:}
+@cindex |C@@@code{:|:}
+,
+@code{||}
+@cindex |D@@@code{||}
+, @code{|.}
+@cindex |E@@@code{|.}
+,
+@code{.|}
+@cindex |F@@@code{.|}
+, and @code{.|.}
+@cindex |G@@@code{.|.}
+. 
+
+These produce, respectively, a right repeat, a left repeat, a double
+repeat, a double bar, a start bar, an end bar, and a thick double bar.
+If @var{bartype} is set to @code{empty} then nothing is printed,
+but a line break is allowed at that spot.
+"
+,
+  "bar-size-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function");
index 23d0998d1f54b138bf0a13eb6fc2433721aa1e86..98b674ce8439e6a40449925138347d2ab4ab3e46 100644 (file)
@@ -286,7 +286,13 @@ Beam::consider_auto_knees (Grob *me)
 
  TODO:
    take some y-position (chord/beam/nearest?) into account
-   scmify forced-fraction */
+   scmify forced-fraction
+
+   TODO:
+   
+   why is shorten stored in beam, and not directly in stem?
+
+*/
 void
 Beam::set_stem_shorten (Grob *m)
 {
@@ -351,11 +357,15 @@ struct Quant_score
 
 /*
   TODO:
+  
    - Make all demerits customisable
-   - One sensible check per demerit
+
+   - One sensible check per demerit (what's this --hwn)
+
    - Add demerits for quants per se, as to forbid a specific quant
      entirely
- */
+
+*/
 MAKE_SCHEME_CALLBACK (Beam, quanting, 1);
 SCM
 Beam::quanting (SCM smob)
@@ -1208,12 +1218,6 @@ Beam::forced_stem_count (Grob *me)
 
 
 
-/*
-
-TODO:
-use filter and standard list functions.
-
-*/
 int
 Beam::visible_stem_count (Grob *me) 
 {
@@ -1332,3 +1336,11 @@ Beam::has_interface (Grob *me)
   return me->has_interface (ly_symbol2scm ("beam-interface"));
 }
 
+
+ADD_INTERFACE (Beam, "beam-interface",
+  "A beam.
+
+#'thickness= weight of beams, in staffspace
+  ",
+  "concaveness-threshold dir-function quant-score auto-knee-gap gap chord-tremolo beamed-stem-shorten shorten least-squares-dy direction damping flag-width-function neutral-direction positions thickness");
+
index 243accda3909ee3c3be444c99f7e1bfc5146a4f7..2b4c510dad5236147ace9eb97d1f90426cb23ea0 100644 (file)
@@ -100,7 +100,7 @@ Break_align_engraver::acknowledge_grob (Grob_info inf)
       if (!align_l_)
        {
          align_l_ = new Item (get_property ("BreakAlignment"));
-         Break_align_interface::set_interface (align_l_);
+
          announce_grob (align_l_, SCM_EOL);
 
          Item * edge = new Item (get_property ("LeftEdge"));
@@ -127,9 +127,6 @@ Break_align_engraver::add_to_group(SCM align_name, Item*item_l)
     {
       group = new Item (get_property ("BreakAlignGroup"));
 
-      Axis_group_interface::set_interface (group);
-      Axis_group_interface::set_axes (group, X_AXIS,X_AXIS);
-
       group->set_grob_property ("break-align-symbol", align_name);
       group->set_parent (align_l_, Y_AXIS);
       announce_grob(group, item_l->self_scm());
index 3a7e953811299bdc25821a10a11199c4898c79ce..fd2ae3e9f5fcecc6cbf85080f7a3d1adbfe7cda4 100644 (file)
@@ -67,13 +67,6 @@ Break_align_interface::add_element (Grob*me, Grob *toadd)
   Axis_group_interface::add_element (me, toadd);
 }
 
-void
-Break_align_interface::set_interface (Grob*me)
-{
-  Align_interface::set_interface (me); 
-  Align_interface::set_axis (me,X_AXIS);
-}
-
 void
 Break_align_interface::do_alignment (Grob *me)
 {
@@ -92,7 +85,7 @@ Break_align_interface::do_alignment (Grob *me)
 
 
   int idx  = 0;
-  while (extents[idx].empty_b ())
+  while (idx < extents.size  () && extents[idx].empty_b ())
     idx++;
   
   Array<Real> offsets;
@@ -222,3 +215,26 @@ Break_align_interface::do_alignment (Grob *me)
 }
 
 
+
+ADD_INTERFACE (Break_aligned_interface, "break-aligned-interface",
+  "Items that are aligned in prefatory matter.
+
+The spacing of these items is controlled by the space-alist
+property. It contains a list break-align-symbols with a specification
+of the associated space. The space definition is either (extra-space
+. @var{number}), which adds space after the symbol, (minimum-space
+. @var{ms}), which pads the space until it it is @var{ms}.
+
+
+Special keys for the alist are 'first-note and 'next-note, signifyign
+the first note on a line, and the next note halfway a line.
+
+",
+  "break-align-symbol break-alignment-done space-alist");
+
+ADD_INTERFACE (Break_align_interface, "break-alignment-interface",
+  "See @ref{break-aligned-interface}.",
+  "break-alignment-done");
+
+
+
index 439e09bee37b6d9d88f67797883b8d9aa21ea233..18a7491bb1f6d0f3070e4cc414a1278bfba67910 100644 (file)
@@ -63,8 +63,6 @@ Breathing_sign_engraver::create_grobs ()
       SCM b = get_property ("BreathingSign");
       breathing_sign_p_ = new Item (b);
 
-      Breathing_sign::set_interface (breathing_sign_p_);
-
       announce_grob(breathing_sign_p_, breathing_sign_req_l_->self_scm());
       breathing_sign_req_l_ = 0;
     }
index 32ef10e334c577a67fb73efb69c424b3a542e3f0..85a17b450ff4f3d0dee6b9cc0430587bda699ed2 100644 (file)
@@ -52,9 +52,7 @@ Breathing_sign::offset_callback (SCM element_smob, SCM)
   return gh_double2scm (inter_f * sz * d);
 }
 
-void
-Breathing_sign::set_interface (Grob *b)
-{
-  Staff_symbol_referencer::set_interface (b);
 
-}
+ADD_INTERFACE(Breathing_sign, "breathing-sign-interface",
+             "A breathing sign.",
+             "direction");
index 4ddf833c2138393d16d854fc2a96c3b984a51491..e00f05ace9879a40b078e66350a9bc2aa72a0dd4 100644 (file)
@@ -61,3 +61,9 @@ Chord_name::brew_molecule (SCM smob)
 
   return mol.smobbed_copy ();
 }
+
+
+ADD_INTERFACE (Chord_name, "chord-name-interface",
+  "generate a chord name",
+  "pitches chord inversion bass begin-of-line-visible");
+
index 04e156f2a405c94428b3440d1a8369b188d5df0a..99711b84af7f08a713c69cfa0c57595fc33a6a60 100644 (file)
@@ -120,10 +120,8 @@ Chord_tremolo_engraver::process_music ()
          if (flags)
            {
              stem_tremolo_ = new Item (get_property ("StemTremolo"));
-             Stem_tremolo::set_interface (stem_tremolo_);
-
              announce_grob(stem_tremolo_, repeat_->self_scm());
-             stem_tremolo_->set_grob_property ("tremolo-flags",
+             stem_tremolo_->set_grob_property ("flag-count",
                                                gh_int2scm (flags));
 
            }
index 3edf26597d8b6bf4cb69b54da0786394e5af5695..b3ec806aec538ef1522c3b542702d3998a623f66 100644 (file)
@@ -94,8 +94,6 @@ Clef_engraver::create_clef ()
       Item *c= new Item (get_property ("Clef"));
       announce_grob(c, SCM_EOL);
 
-      Staff_symbol_referencer::set_interface (c);
-      
       clef_p_ = c;
     }
   SCM cpos = get_property ("clefPosition");
index cbae1801597b5a6350f64f5196ffb1b74d40402a..589ca0856ec3ec45bf6ffd9419767baea31f13ce 100644 (file)
@@ -53,11 +53,6 @@ Clef::has_interface (Grob* me)
 }
 
 
-void
-Clef::set_interface (Grob* me)
-{
-  me->set_interface (ly_symbol2scm ("clef-interface"));
-}
 
 MAKE_SCHEME_CALLBACK (Clef,brew_molecule,1)
 SCM
@@ -74,3 +69,9 @@ Clef::brew_molecule (SCM smob)
       return SCM_EOL;
     }
 }
+
+
+ADD_INTERFACE (Clef, "clef-interface",
+  "A clef sign",
+  "non-default full-size-change glyph-name");
+
index ff947053d2ad94319179247c83ecc2cbca4ee3e1..2b8c4923feb5b6e67558a054386bbfc2d817b1a1 100644 (file)
@@ -36,9 +36,6 @@ Collision_engraver::create_grobs ()
   if (!col_p_) 
     {
       col_p_ = new Item (get_property ("NoteCollision"));
-      Axis_group_interface::set_interface (col_p_);
-      Axis_group_interface::set_axes (col_p_, X_AXIS, Y_AXIS);
-
       announce_grob (col_p_, SCM_EOL);
     }
   
index 7a82e1219303ea2739468b0a00c8c01341b25fcb..ee4b039f1344ef04cb72794e7f63e56222b9b215 100644 (file)
@@ -374,3 +374,10 @@ Collision::add_column (Grob*me,Grob* ncol_l)
   Axis_group_interface::add_element (me, ncol_l);
   me->add_dependency (ncol_l);
 }
+
+
+ADD_INTERFACE (Collision, "note-collision-interface",
+  "An object that handles collisions between notes with different
+stem directions and horizontal shifts. Most of the interesting
+properties are to be set in @ref{note-column-interface}",
+  "merge-differently-dotted note-width collision-done");
index 8c7db7b92cf25bf39494265ffe6517b5e18362be..ebfa26a947afe94e181dce294a98102543d006f8 100644 (file)
@@ -195,8 +195,6 @@ Completion_heads_engraver::process_music ()
     {
       Item *note_p  = new Item (get_property ("NoteHead"));
       
-      Staff_symbol_referencer::set_interface (note_p);
-      
       Music * req =  note_req_l_arr_[i];
       if (scratch_note_reqs_.size())
        {
index 29c32f699684ab4859f5e93c692b3beb5c3e0ce1..5fc7266b18023bc998dc3b8c04ac7d04fff8f454 100644 (file)
@@ -9,7 +9,6 @@
 /* TODO:
 
  - merge create_ledger_line () and Note_head::create_ledger_line ()
 
  - rewrite create_ledger_line () to support short and thin ledger lines
 
@@ -146,6 +145,12 @@ Custos::brew_molecule (SCM smob)
   if (gh_symbol_p (scm_style))
     {
       String style = ly_scm2string (scm_symbol_to_string (scm_style));
+
+      /*
+       DOCME:
+       
+       Why would we want it differently? What's the meaning of adjust ?
+       */
       bool adjust =
        to_boolean (me->get_grob_property ("adjust-if-on-staffline"));
 
@@ -207,3 +212,20 @@ Custos::has_interface (Grob*m)
 {
   return m && m->has_interface (ly_symbol2scm ("custos-interface"));
 }
+
+
+ADD_INTERFACE (Custos, "custos-interface",
+  "A custos is a staff context symbol that appears at the end of a
+  staff line with monophonic musical contents (i.e. with a single
+  voice).  It anticipates the pitch of the first note of the following
+  line and thus helps the player or singer to manage line breaks
+  during performance, thus enhancing readability of a score.
+
+  Custodes were frequently used in music notation until the 16th
+  century.  There were different appearences for different notation
+  styles.  Nowadays, they have survived only in special forms of
+  musical notation such as via the editio vaticana dating back to the
+  beginning of the 20th century.
+
+[TODO: add to glossary]",
+  "style adjust-if-on-staffline neutral-position");
index a91ffc5f8f5285eb6bcd04207097cbdecde0903b..584b3616e64e4286abf7fa56aafff7a7ebb6f1ae 100644 (file)
 #include "axis-group-interface.hh"
 #include "stem.hh"
 
+/*
+  TODO: let Dot_column communicate with stem via Note_column.
+ */
+
 MAKE_SCHEME_CALLBACK (Dot_column,force_shift_callback,2);
 SCM
 Dot_column::force_shift_callback (SCM element_smob, SCM axis)
@@ -141,3 +145,10 @@ Dot_column::add_head (Grob * me, Grob *rh)
     }
 }
 
+
+
+
+ADD_INTERFACE (Dot_column, "dot-column-interface",
+  "Interface that groups dots so they form a column",
+  "stem");
+
index 1805de4cd1bd4877595f033fdef339903fad663d..0e1b6912a7db57e2f3217455df6da61f580d17a1 100644 (file)
@@ -70,3 +70,11 @@ Dots::brew_molecule (SCM d)
 
 
 
+
+ADD_INTERFACE (Dots, "dots-interface",
+  "The dots to go with a notehead/rest.  A separate interface, since they
+are a party in collision resolution.
+#'direction is the Direction to handle staff-line collisions in.",
+  "direction dot-count");
+
+
index fd92417cbc1fd53ea5c58e4ff6431153b41861a7..7ddff09e1f470555d4c6dcf701124f68226dc280 100644 (file)
@@ -139,8 +139,6 @@ Dynamic_engraver::process_music ()
          line_spanner_ = new Spanner (get_property ("DynamicLineSpanner"));
 
          Side_position_interface::set_axis (line_spanner_, Y_AXIS);
-         Axis_group_interface::set_interface (line_spanner_);
-         Axis_group_interface::set_axes (line_spanner_, Y_AXIS, Y_AXIS);
 
          Music * rq = accepted_spanreqs_drul_[START];
          if (script_req_l_)
@@ -172,8 +170,6 @@ Dynamic_engraver::process_music ()
       script_p_->set_grob_property ("text",
                                   script_req_l_->get_mus_property ("text"));
       
-      Side_position_interface::set_direction (script_p_, DOWN);
-
       if (Direction d = script_req_l_->get_direction ())
        Directional_element_interface::set (line_spanner_, d);
 
@@ -250,9 +246,7 @@ Dynamic_engraver::process_music ()
          else
            {
              cresc_p_  = new Spanner (get_property ("TextSpanner"));
-             cresc_p_->set_interface (ly_symbol2scm ("dynamic-interface"));
              cresc_p_->set_grob_property ("type", s);
-             
              daddy_trans_l_->set_property ((start_type
                                            + "Spanner").ch_C(), SCM_UNDEFINED);
              s = get_property ((start_type + "Text").ch_C ());
index 03b268ea765d89456a07d8734ed9cc060108a2e0..c07095e9c11014e2e122d91081725691d085255e 100644 (file)
@@ -35,17 +35,17 @@ Engraver_group_engraver::create_grobs_in_simple_children ()
 
 /*
 
-  '''Done: eliminating useless broadcast/acknowledge'''
+  Done: eliminating useless broadcast/acknowledge
 
 
 One cause for translation slowness: grob broadcasted/acknowledges
-(b/a): every grob is b/a'd to all peer-engravers and all
+ (b/a): every grob is b/a-ed to all peer-engravers and all
 parent-engravers. This means that lots of (often) useless b/a is done
 for large scores (the top-level engravers gets to know every detail of
 every voice, thread, etc. Measurements indicate this is 10% of the
-interpretation time:
+ interpretation time:
 
-standchen
+ standchen
 
 old: (pre 1.5.13)  10.28
 new: 8.73
@@ -64,7 +64,7 @@ The cost of precomputing engraver lists has two elts: computing the
 list itself, GC for the structure, looking up the list during the
 acks.
 
- */
+*/
 SCM find_acknowledge_engravers (SCM gravlist, SCM meta);
 void
 Engraver_group_engraver::acknowledge_grobs ()
index 9e97d0e0181980f561b077faac36bf82c07a21ab..c725f77f488e15eb9f98e0924cd2f7bb44df2a3c 100644 (file)
@@ -78,7 +78,7 @@ Figured_bass_engraver::process_music ()
 
   
 ENTER_DESCRIPTION(Figured_bass_engraver,
-/* descr */       "Make volta brackets",
+/* descr */       "Make figured bass numbers.",
 /* creats*/       "BassFigure",
 /* acks  */       "",
 /* reads */       "",
index c5c32c2337d2f2df2b08694af97e1786226a718c..09275dc19d3d4d94bacade9762eefb0e6b7ef420 100644 (file)
@@ -237,3 +237,9 @@ Font_interface::properties_to_font_name (SCM fonts, SCM alist_chain)
   return ly_str02scm ("cmr10");
   
 }
+
+
+
+ADD_INTERFACE (Font_interface, "font-interface",
+  "Any symbol that is typeset through fixed sets of glyphs (ie. fonts)",
+  "font-magnification font-style font font-series font-shape font-family font-name font-design-size font-relative-size");
diff --git a/lily/grob-interface.cc b/lily/grob-interface.cc
new file mode 100644 (file)
index 0000000..dd1b1e9
--- /dev/null
@@ -0,0 +1,87 @@
+#include  "protected-scm.hh"
+#include "grob-interface.hh"
+#include "lily-guile.hh"
+#include "grob.hh"
+#include "warn.hh"
+
+Protected_scm all_ifaces;
+
+
+void add_interface (const char * symbol,
+                   const char * descr,
+                   const char * vars)
+{
+  SCM s = ly_symbol2scm (symbol);
+  SCM d = gh_str02scm (descr);
+  SCM l = parse_symbol_list (vars);
+
+
+  ly_add_interface(s,d,l);
+}
+
+SCM
+ly_add_interface (SCM a, SCM b, SCM c)
+{
+  SCM_ASSERT_TYPE (gh_symbol_p(a), a, SCM_ARG1, __FUNCTION__, "symbol");
+  SCM_ASSERT_TYPE (gh_string_p(b), b, SCM_ARG2, __FUNCTION__, "string");  
+  SCM_ASSERT_TYPE (gh_list_p(c), c,  SCM_ARG3, __FUNCTION__, "list of syms");    
+  if (!gh_vector_p (all_ifaces))
+    {
+      all_ifaces = scm_make_vector (gh_int2scm (40), SCM_EOL);
+    }
+
+  SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
+
+  scm_hashq_set_x (all_ifaces, a, entry);
+
+
+  return SCM_UNSPECIFIED;
+}
+
+
+SCM
+ly_all_grob_interfaces ()
+{
+  return all_ifaces;
+}
+
+void
+init_iface_funcs ()
+{
+  scm_c_define_gsubr ("ly-add-interface", 3, 0, 0,
+                     (Scheme_function_unknown)ly_add_interface);
+  scm_c_define_gsubr ("ly-all-grob-interfaces", 0, 0, 0,
+                     (Scheme_function_unknown)ly_all_grob_interfaces);
+}
+
+ADD_SCM_INIT_FUNC(giface, init_iface_funcs);
+
+void
+check_interfaces_for_property (Grob *me, SCM sym)
+{
+  SCM ifs =  me->get_grob_property ("interfaces");
+
+
+  bool found = false;
+  for (; !found && gh_pair_p (ifs); ifs =gh_cdr (ifs))
+    {
+      SCM iface = scm_hashq_ref (all_ifaces , gh_car (ifs), SCM_BOOL_F);
+      if (iface == SCM_BOOL_F)
+       {
+         String msg = to_str ("Unknown interface `%s'",
+                              ly_scm2string (scm_symbol_to_string (gh_car(ifs))).ch_C());
+         programming_error (msg);
+         continue;
+       }
+
+      found= found || (scm_memq (sym, gh_caddr (iface)) != SCM_BOOL_F);
+    }
+
+  if (!found)
+    {
+     String str = to_str("Grob %s has no interface for property %s",
+                        me->name ().ch_C(),
+                        ly_symbol2string(sym).ch_C());
+     programming_error (str);
+    }
+}
index 9484c6951a98798dc9b54c8659bc7534e20eadda..7daa21f1d48d3344867942c0a893c79ed51be0f3 100644 (file)
@@ -85,7 +85,10 @@ Grob::Grob (SCM basicprops)
       /*
        Should change default to be empty? 
       */
-      if (cb != SCM_BOOL_F && !gh_procedure_p (cb) && !gh_pair_p (cb))
+      if (cb != SCM_BOOL_F
+         && !gh_procedure_p (cb) && !gh_pair_p (cb)
+         && gh_procedure_p (get_grob_property ("molecule-callback"))
+         )
        cb = molecule_extent_proc;
     
       dim_cache_[a].dimension_ = cb;
@@ -95,8 +98,13 @@ Grob::Grob (SCM basicprops)
   if (gh_pair_p (meta))
     {
       SCM ifs = scm_assoc (ly_symbol2scm ("interfaces"), meta);
-  
-      set_grob_property ("interfaces",ly_cdr (ifs));
+
+      /*
+       do it directly to bypass interface checks.
+       */
+      mutable_property_alist_ = gh_cons (gh_cons (ly_symbol2scm ("interfaces"),
+                                                 gh_cdr (ifs)),
+                                        mutable_property_alist_);
     }
 }
 
@@ -168,12 +176,17 @@ Grob::set_immutable_grob_property (SCM s, SCM v)
 }
 #endif
 
+extern void check_interfaces_for_property (Grob *me, SCM sym);
+
 void
 Grob::internal_set_grob_property (SCM s, SCM v)
 {
 #ifndef NDEBUG
   if (internal_type_checking_global_b)
-    assert (type_check_assignment (s, v, ly_symbol2scm ("backend-type?")));
+    {
+      assert (type_check_assignment (s, v, ly_symbol2scm ("backend-type?")));
+      check_interfaces_for_property(this, s);
+    }
 #endif
 
   
@@ -261,6 +274,12 @@ Grob::calculate_dependencies (int final, int busy, SCM funcname)
 Molecule *
 Grob::get_molecule ()  const
 {
+  if (immutable_property_alist_ == SCM_EOL)
+    {
+      return 0;
+      
+    }
+  
   SCM mol = get_grob_property ("molecule");
   if (unsmob_molecule (mol))
     return unsmob_molecule (mol);
@@ -394,12 +413,15 @@ Grob::handle_broken_grobs (SCM src, SCM criterion)
          /* now: sc && sc->line_l () == line */
          if (!line)
            return sc->self_scm();
-             /*
-               This was introduced in 1.3.49 as a measure to prevent
-               programming errors. It looks expensive (?). TODO:
-               benchmark , document when (what kind of programming
-               errors) this happens.
-              */
+         /*
+           This was introduced in 1.3.49 as a measure to prevent
+           programming errors. It looks expensive (?).
+
+           TODO:
+               
+           benchmark , document when (what kind of programming
+           errors) this happens.
+         */
          if (sc->common_refpoint (line, X_AXIS)
               && sc->common_refpoint (line, Y_AXIS))
            {
@@ -583,13 +605,6 @@ Grob::empty_b (Axis a)const
            gh_procedure_p (dim_cache_[a].dimension_));
 }
 
-/*
-  TODO: add
-
-    Grob *refpoint
-
-  to arguments?
- */
 Interval
 Grob::extent (Grob * refp, Axis a) const
 {
@@ -935,18 +950,14 @@ Grob::has_interface (SCM k)
   return scm_memq (k, ifs) != SCM_BOOL_F;
 }
 
-void
-Grob::set_interface (SCM k)
-{
-  if (has_interface (k))
-    return ;
-  else
-    {
-      set_grob_property ("interfaces",
-                        gh_cons (k, get_grob_property ("interfaces")));
-    }
-}
-
 
 ADD_SCM_INIT_FUNC (scoreelt, init_functions);
 IMPLEMENT_TYPE_P (Grob, "ly-grob?");
+
+ADD_INTERFACE (Grob, "grob-interface",
+  "All grobs support this",
+  "X-offset-callbacks Y-offset-callbacks X-extent-callback molecule cause
+Y-extent-callback molecule-callback font-relative-size extra-offset
+staff-symbol interfaces dependencies no-spacing-rods extra-extent-X causes
+layer extra-extent-Y minimum-extent-X minimum-extent-Y transparent");
+
index 26518b007f167fc25e0a7b746b3676a07772e366..f1c715d60276241679f47f02c6dfb15d0c568309 100644 (file)
@@ -140,3 +140,11 @@ Hairpin::brew_molecule (SCM smob)
 
 
 
+ADD_INTERFACE (Hairpin, "hairpin-interface",
+  "hairpin crescendo.
+
+padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf'
+
+",
+  "grow-direction thickness height padding");
+
index a8a2d938aee661c69888c25ae1c2af4949f59de9..3ddad25c62abd4fa304d0e8c41a27343579e660a 100644 (file)
@@ -82,11 +82,6 @@ Hara_kiri_group_spanner::add_element (Grob * me, Grob *e)
 }
 
 
-void
-Hara_kiri_group_spanner::set_interface (Grob*me)
-{
-  me->set_interface (ly_symbol2scm ("hara-kiri-group-interface"));
-}
 
 
 bool
@@ -101,3 +96,12 @@ Hara_kiri_group_spanner::add_interesting_item (Grob* me,Grob* n)
   me->add_dependency (n);
   Pointer_group_interface::add_grob (me, ly_symbol2scm ("items-worth-living"),n);
 }
+
+
+ADD_INTERFACE (Hara_kiri_group_spanner,"hara-kiri-group-interface",
+  "  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.",
+  "items-worth-living");
+
index 6b42b5b5547e175a953f47b0bb3bd13244810f41..ce66513274429169ca7d2f7386d6311429bf9613 100644 (file)
@@ -114,3 +114,11 @@ Hyphen_spanner::Hyphen_spanner (Spanner*s)
   elt_l_ = s;
 }
 
+
+
+ADD_INTERFACE (Hyphen_spanner, "lyric-hyphen-interface",
+  "A centred hyphen is a simple line between lyrics used to divide
+syllables.   The length of the hyphen line should stretch based on the
+size of the gap between syllables.",
+  "thickness height minimum-length maximum-length word-space");
+
diff --git a/lily/include/grob-interface.hh b/lily/include/grob-interface.hh
new file mode 100644 (file)
index 0000000..028c476
--- /dev/null
@@ -0,0 +1,28 @@
+/*   
+  interface.hh -- declare Interface 
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef INTERFACE_HH
+#define INTERFACE_HH
+
+
+void add_interface (const char * symbol,
+                   const char * descr,
+                   const char * vars);
+
+SCM ly_add_interface (SCM, SCM, SCM); 
+
+#define ADD_INTERFACE(cl,a,b,c) \
+void cl ## _init_ifaces() {\
+  add_interface(a,b,c);\
+}\
+ADD_SCM_INIT_FUNC(cl ## ifaces, cl ## _init_ifaces);\
+
+
+#endif /* INTERFACE_HH */
+
index 028f5a14b7aea480942003778bfe0cc3a03a65f7..f94e3887125b8f48310fa2781c741e4d2f9e3f09 100644 (file)
@@ -13,6 +13,7 @@
 #include "lily-proto.hh"
 #include "smobs.hh"
 #include "dimension-cache.hh"
+#include "grob-interface.hh"
 
 /**
     for administration of what was done already
@@ -125,7 +126,6 @@ public:
   static SCM ly_get_grob_property (SCM, SCM);  
 
   bool has_interface (SCM intf);
-  void set_interface (SCM intf);
 
   virtual void handle_broken_dependencies ();
   virtual void handle_prebroken_dependencies ();
index 2aa5ffcf5bb1fb7d04789945809e61f15e7a2876..42b5a0da1c783228fab49cc217015b2de3024ed3 100644 (file)
@@ -20,7 +20,6 @@ public:
   DECLARE_SCHEME_CALLBACK (y_extent, (SCM smob, SCM axis));
   DECLARE_SCHEME_CALLBACK (force_hara_kiri_in_parent_callback, (SCM ,SCM));
   static void add_element (Grob *me, Grob *e);
-  static void set_interface (Grob*me);
   static bool has_interface (Grob*);
   static void consider_suicide (Grob*me);
   static void add_interesting_item (Grob * me , Grob* n);
index 84424f188b55840062f421b5e3446c37346d8cca..f0c14d09087fdac922db16cdd576a05f4ecf2d7b 100644 (file)
@@ -18,7 +18,7 @@ public:
   static bool has_interface (Grob*);
 
   static void get_spacing (Grob *me, Item* , Real, Real, Real*, Real*);
-  static Real stem_dir_correction (Grob *me, Item * next_col);  
+  static Real stem_dir_correction (Grob *me, Item * next_col, Real incr);  
   static Item * right_column (Grob*);
   static Item * left_column (Grob*);  
 };
index 9a64afaf8e8325dfd9e649bd74fa933a48fed86a..bca937d454343235e0d760ca16bf144b411e810f 100644 (file)
 
 #include "lily-proto.hh"
 
-/**  
-*/
 struct Separation_item
 {
-
   static bool has_interface (Grob*);
   static Interval my_width (Grob*) ;
   static void add_item (Grob*,Item*);
index 32679ae2c521dfe45d5ea5113157e0c1ff58183b..57ed529deae763dc5b7f7b7bb82c45206ff02940 100644 (file)
@@ -18,7 +18,7 @@ struct Spaceable_grob
   /// set a minimum distance
   static void add_rod (Grob*me, Grob * to, Real distance);
   static void add_spring (Grob*me,Grob * to, Real dist, Real strength, bool);
-  static void set_interface (Grob*);
+
   static void remove_interface (Grob*);
   static SCM get_minimum_distances (Grob*);
   static SCM get_ideal_distances (Grob*);
index 65e7d238abf22f686ce46bc6ab7378707f87b23f..fcda40ed7b8458ddba3df253e6e90a6d223b23b7 100644 (file)
@@ -45,8 +45,6 @@ public:
   DECLARE_SCHEME_CALLBACK (dim_callback, (SCM smob, SCM axis));
   DECLARE_SCHEME_CALLBACK (height, (SCM,SCM));
   static bool has_interface (Grob*);
-  static void set_interface (Grob*);
-
   static void set_spacing_hints (Grob*me) ;
 };
 #endif
index 0d7161e70ad62865defe5b326349da90fca09150..7e41e7efdb7842b2a96702d11b1e31f05d59384c 100644 (file)
@@ -17,7 +17,6 @@
 class Tie_column
 {
 public:
-  static void set_interface (Grob*me);
   static bool has_interface (Grob*);
   static void add_tie (Grob*me,Grob*);
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
diff --git a/lily/include/tuplet-bracket.hh b/lily/include/tuplet-bracket.hh
new file mode 100644 (file)
index 0000000..b50780a
--- /dev/null
@@ -0,0 +1,38 @@
+
+/*
+  tuplet-bracket.hh -- part of GNU LilyPond
+
+  (c)  1997--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#ifndef Tuplet_bracket_HH
+#define Tuplet_bracket_HH
+
+#include "lily-guile.hh"
+
+/*
+
+    TODO: quantise, we don't want to collide with staff lines.
+ (or should we be above staff?)
+
+  todo: handle breaking elegantly.
+*/
+class Tuplet_bracket
+{
+public:
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  static bool has_interface (Grob*);
+
+  static void add_column (Grob*me,Item*);
+  static void add_beam (Grob*me,Grob*);
+
+  static void calc_dy (Grob*,Real *) ;
+  static void calc_position_and_height (Grob*,Real*,Real *dy);
+  
+  DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
+
+  static Direction get_default_dir (Grob*);
+};
+
+#endif // Tuplet_bracket_HH
+
index 661bd3aaa4bbd4aa6df69ad69e86eed55064f3b5..65296f81060baccd891380179b283fc7515acef0 100644 (file)
@@ -1,38 +1,2 @@
-/*
-  plet-spanner.hh -- part of GNU LilyPond
-
-  (c)  1997--2002 Jan Nieuwenhuizen <janneke@gnu.org>
-*/
-
-#ifndef Tuplet_bracket_HH
-#define Tuplet_bracket_HH
-
-#include "lily-guile.hh"
-
-/*
-
-    TODO: quantise, we don't want to collide with staff lines.
- (or should we be above staff?)
-
-  todo: handle breaking elegantly.
-*/
-class Tuplet_bracket
-{
-public:
-  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
-  static void set_interface (Grob*);  
-  static bool has_interface (Grob*);
-
-  static void add_column (Grob*me,Item*);
-  static void add_beam (Grob*me,Grob*);
-
-  static void calc_dy (Grob*,Real *) ;
-  static void calc_position_and_height (Grob*,Real*,Real *dy);
-  
-  DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
-
-  static Direction get_default_dir (Grob*);
-};
-
-#endif // Tuplet_bracket_HH
 
+#error
diff --git a/lily/include/volta-bracket.hh b/lily/include/volta-bracket.hh
new file mode 100644 (file)
index 0000000..fda2965
--- /dev/null
@@ -0,0 +1,26 @@
+
+/*
+  volta-spanner.hh -- part of GNU LilyPond
+
+  (c) 1997--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#ifndef VOLTA_SPANNER_HH
+#define VOLTA_SPANNER_HH
+
+
+#include "spanner.hh"
+
+class Volta_bracket_interface
+{
+public:
+  static void set_interface (Grob*);
+  static bool has_interface (Grob*);
+  
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+  static void add_column (Grob*, Grob*col);
+  static void add_bar (Grob*me, Item*bar);
+};
+
+#endif // VOLTA_SPANNER_HH
+
index 2d161192f69ce8b3c89ee9fc107fd3229e2f43b6..c40c5adba24652cf5901d4a442fc96b68bb013e7 100644 (file)
 #include "spanner.hh"
 #include "lily-guile.hh"
 #include "line-of-score.hh"
+#include "group-interface.hh"
 
 Item::Item (SCM s)
   : Grob (s)
 {
   broken_to_drul_[LEFT] = broken_to_drul_[RIGHT]=0;
+  Group_interface::add_thing (this, ly_symbol2scm ("interfaces"), ly_symbol2scm ("item-interface"));
+                    
 }
 
 /**
@@ -192,3 +195,8 @@ unsmob_item (SCM s )
 {
   return dynamic_cast<Item*> (unsmob_grob (s));
 }
+
+ADD_INTERFACE(Item,
+             "item-interface",
+             "",
+             "visibility-lambda breakable")
index 2c08ae4112d5890ee4659b049ecf080d44a198e9..f8387cac5eb52a4316252e3265c37ae37f5401b4 100644 (file)
@@ -69,7 +69,6 @@ Key_engraver::create_key (bool def)
       item_p_->set_grob_property ("old-accidentals", get_property ("lastKeySignature"));
       item_p_->set_grob_property ("new-accidentals", get_property ("keySignature"));
 
-      Staff_symbol_referencer::set_interface (item_p_);
       announce_grob(item_p_, keyreq_l_ ? keyreq_l_->self_scm() : SCM_EOL);
     }
 
index 6375de710034bbe65eef9fa0178e391378256159..802a6bf015657e20661e2a260fb49348d40dcf43 100644 (file)
@@ -22,9 +22,6 @@
 
 struct Key_signature_interface
 {
-
-  static void set_interface (Grob*);
-  static bool has_interface (Grob*);
   DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
 };
 
@@ -174,9 +171,6 @@ Key_signature_interface::brew_molecule (SCM smob)
   return mol.smobbed_copy ();
 }
 
-bool
-Key_signature_interface::has_interface (Grob*m)
-{
-  return m && m->has_interface (ly_symbol2scm ("key-signature-interface"));
-}
-
+ADD_INTERFACE (Key_signature_interface, "key-signature-interface",
+  "A group of  accidentals.",
+  "c0-position old-accidentals new-accidentals");
index 975b9e522915f4d32919a4cf458dbf9ff5796bca..e2ab82ae2ffd63ba16f37ec978f33f41b142906d 100644 (file)
@@ -557,7 +557,9 @@ ly_assoc_cdr (SCM key, SCM alist)
 }
 
 /*
-  LIST has the form "sym1 sym2 sym3" 
+  LIST has the form "sym1 sym2 sym3\nsym4\nsym5"
+
+  i.e. \n and ' ' can be used interchangeably as separators.
  */
 SCM
 parse_symbol_list (const char * list)
@@ -565,9 +567,18 @@ parse_symbol_list (const char * list)
   char * s = strdup (list);
   char *orig = s;
   SCM create_list = SCM_EOL;
+
+  for (char * p = s; *p; p++)
+    {
+      if (*p == '\n')
+       *p = ' ' ;
+    }
+  
   if (!s[0] )
     s = 0;
 
+
+  
   while (s)
     {
       char *next = strchr (s, ' ');
index 9f8a47b83045d8e7dcf7a6fbcaca7b78c0155155..3b7c1495b3e98fbab38fa28647a1fbde35f324d4 100644 (file)
@@ -246,7 +246,7 @@ Line_spanner::brew_molecule (SCM smob)
 
   Real thick = me->paper_l ()->get_var ("stafflinethickness");  
 
-  SCM s = me->get_grob_property ("line-thickness");
+  SCM s = me->get_grob_property ("thickness");
   if (gh_number_p (s))
     thick *= gh_scm2double (s);
 
@@ -259,3 +259,10 @@ Line_spanner::brew_molecule (SCM smob)
 }
 
 
+
+ADD_INTERFACE (Line_spanner, "line-spanner-interface",
+  "Generic line drawn between two objects, eg. for use with glissandi.
+gap is measured in staff-spaces.   ",
+  "gap dash-period dash-length thickness type");
+
+
index f2d03d6e4e26e7216ef67289a6fca5f3c805a15a..5709fb428e3ef1b35e0e482a931ea18ec3b23667 100644 (file)
@@ -69,15 +69,16 @@ Local_key_item::add_pitch (Grob*me, Pitch p, bool cautionary, bool natural,
 Molecule
 Local_key_item::parenthesize (Grob*me, Molecule m)
 {
-  Molecule open = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-("));
-  Molecule close = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-)"));
+  Molecule open = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-leftparen"));
+  Molecule close = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-rightparen"));
   m.add_at_edge (X_AXIS, LEFT, Molecule (open), 0);
   m.add_at_edge (X_AXIS, RIGHT, Molecule (close), 0);
 
   return m;
 }
 
-/* HW says: maybe move to tie.cc
+/*
+  HW says: maybe move to tie.cc
 
   Note, tie should not kill all accidentals when broken, only the ones
   that are indicated by a property tie-break-reminder, I guess
@@ -248,8 +249,9 @@ Local_key_item::has_interface (Grob*m)
 {
   return m && m->has_interface (ly_symbol2scm ("accidentals-interface"));
 }
-void
-Local_key_item::set_interface (Grob*m)
-{
-  m->set_interface (ly_symbol2scm ("accidentals-interface"));
-}
+
+
+
+ADD_INTERFACE (Local_key_item, "accidentals-interface",
+  "Accidentals",
+  "accidentals left-padding right-padding paren-cautionaries cautionary-size");
index 8e5c17eb89eb67e1f62bc2268a67cbe919c6b264..1a2c793082c3276da9d0c99c2e05492a8e80230b 100644 (file)
@@ -445,10 +445,6 @@ Lookup::accordion (SCM s, Real staff_space, Font_metric *fm)
   return m;  
 }
 
-/*
-  TODO: should use slope instead?  Angle gives nasty rad <-> degree
-  conversions.
-*/
 Molecule
 Lookup::repeat_slash (Real w, Real s, Real t)
 {
index 9fc7f8a7a46dd0ed157bf0e04208f142d2e4767d..38c44068cde9850e764bab425ce3102e676fe575 100644 (file)
@@ -54,3 +54,9 @@ Lyric_extender::set_textitem (Spanner*sp, Direction d, Grob*s)
 }
 
 
+
+
+ADD_INTERFACE (Lyric_extender,"lyric-extender-interface",
+  "The extender is a simple line at the baseline of the lyric
+that helps show the length of a melissima (tied/slurred note).",
+  "word-space height right-trim-amount");
index 4efdcfaf1de14a39050a557e441cb3c47a40c762..e45bddbcae6e910a6aaf7a60975712d6e30fdc23 100644 (file)
@@ -202,11 +202,11 @@ ly_add_molecule (SCM first, SCM second)
 
 
 SCM
-make_molecule (SCM expr, SCM xext, SCM yext)
+ly_make_molecule (SCM expr, SCM xext, SCM yext)
 {
-  /*
-    TODO: typechecking. 
-   */
+  SCM_ASSERT_TYPE (ly_number_pair_p (xext), xext, SCM_ARG2, __FUNCTION__, "number pair");
+  SCM_ASSERT_TYPE (ly_number_pair_p (yext), yext, SCM_ARG3, __FUNCTION__, "number pair");  
+
   Box b (ly_scm2interval (xext), ly_scm2interval(yext));
   Molecule m (b, expr);
   return m.smobbed_copy ();
@@ -246,7 +246,7 @@ ly_align_to_x (SCM mol, SCM axis, SCM dir)
 static void
 molecule_init ()
 {
-  scm_c_define_gsubr ("ly-make-molecule", 3, 0, 0, (Scheme_function_unknown) make_molecule);
+  scm_c_define_gsubr ("ly-make-molecule", 3, 0, 0, (Scheme_function_unknown) ly_make_molecule);
   scm_c_define_gsubr ("ly-fontify-atom", 2, 0, 0, (Scheme_function_unknown) ly_fontify_atom);
   scm_c_define_gsubr ("ly-align-to!", 3, 0, 0, (Scheme_function_unknown) ly_align_to_x);
   scm_c_define_gsubr ("ly-add-molecule", 2, 0,0,(Scheme_function_unknown) ly_add_molecule);
index ba7cdafbc730b8335fb8cca6cb487915e2f6eb11..4f1115a98a3727c41fea67705aad8fe5d815a69c 100644 (file)
@@ -100,9 +100,6 @@ Multi_measure_rest_engraver::process_music ()
     {
       mmrest_p_ = new Spanner (get_property ("MultiMeasureRest"));
 
-      Multi_measure_rest::set_interface (mmrest_p_);
-      Staff_symbol_referencer::set_interface (mmrest_p_);
-
       announce_grob(mmrest_p_, busy_span_req_l_->self_scm());
       start_measure_i_
        = gh_scm2int (get_property ("currentBarNumber"));
index ed39337b78db4836b28a725187da3447bceac320..d7f6f04144397dbb704fa7a5379d61fe5114298c 100644 (file)
 #include "text-item.hh"
 #include "percent-repeat-item.hh"
 
-
-void
-Multi_measure_rest::set_interface (Grob*me)
-{
-  me->set_interface (ly_symbol2scm ("multi-measure-rest-interface"));
-}
-
 bool
 Multi_measure_rest::has_interface (Grob*me)
 {
@@ -273,3 +266,13 @@ Multi_measure_rest::set_spacing_rods (SCM smob)
   return SCM_UNSPECIFIED;
 }
 
+
+
+ADD_INTERFACE (Multi_measure_rest,"multi-measure-rest-interface",
+  "A rest that spans a whole number of measures.  For typesetting the
+numbers, fields from font-interface may be used.
+
+padding is the space between number and rest. Measured in staffspace.
+
+",
+  "columns measure-count expand-limit minimum-width padding");
index b53a18deb4b163b2a5eddf3d1390bd21dd2d6253..d35b6da16f67ade0181924527947d0be94cfa1b8 100644 (file)
@@ -34,15 +34,6 @@ Note_column::shift_compare (Grob *const &p1, Grob *const&p2)
   return h1 - h2;
 }
 
-void
-Note_column::set_interface (Grob* me)
-{
-  me->set_interface (ly_symbol2scm ("note-column-interface"));
-  
-  Axis_group_interface::set_interface (me);
-  Axis_group_interface::set_axes (me, X_AXIS, Y_AXIS);
-}
-
 Item *
 Note_column::stem_l (Grob*me) 
 {
@@ -158,3 +149,10 @@ Note_column::accidentals (Grob *me)
 
   return 0;
 }
+
+
+
+ADD_INTERFACE (Note_column,"note-column-interface",
+  "Stem and noteheads combined",
+  "arpeggio note-heads rest-collision rest horizontal-shift stem accidentals force-hshift");
+
index a1764e8796d9795c0aeaaa7cbd79d9d1d80b7228..b66b61d77c472d48fd962352fc2801489dd05fca 100644 (file)
@@ -170,7 +170,7 @@ internal_brew_molecule (Grob *me,  bool ledger_take_space)
          */
          
          left_ledger_protusion *= 0.66;
-         right_ledger_protusion *= 0.8
+         right_ledger_protusion *= 0.9
        }
 
       Interval l_extents = Interval (hd[LEFT] - left_ledger_protusion,
@@ -276,3 +276,8 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a)
   
   return gh_number_p (result) ?  gh_scm2double (result) : 0.0;
 }
+
+ADD_INTERFACE (Note_head,"note-head-interface",
+  "Note head",
+  "accidentals-grob style stem-attachment-function");
+
index 30dffc105ec0b077aa438c4c3bbb555154dab6a3..23ded7abd544d84c12bd61842b2bef96ff9270ef 100644 (file)
@@ -65,8 +65,6 @@ Note_heads_engraver::process_music ()
     {
       Item *note_p  = new Item (get_property ("NoteHead"));
       
-      Staff_symbol_referencer::set_interface (note_p);
-      
       Music * req = note_req_l_arr_[i];
       
       Duration dur = *unsmob_duration (req->get_mus_property ("duration"));
index 8f29e28dd1090242d0acf7622659fde3909d8647..a002d50dc25ed0f8922768ab1beffbea12bffb10 100644 (file)
@@ -44,12 +44,22 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
            {
              it = it -> find_prebroken_piece (col_dir);
            }
+
          /*
            some kind of mismatch, eg. a note column, that is behind a
            linebreak.
           */
          if (!it)
            continue; 
+
+         if (d == RIGHT && right_col != it->column_l ())
+           continue;
+         
+         if (Separation_item::has_interface (it))
+           {
+             extents[d].unite (Separation_item::my_width (it));
+             continue;
+           }
          
          extents[d].unite (it->extent (it->column_l (), X_AXIS));
          if (d == RIGHT)
@@ -84,7 +94,7 @@ Note_spacing::get_spacing (Grob *me, Item* right_col,
       *space += 0.5 * (( -extents[RIGHT][LEFT]) >? 0);
     }
 
-  *space += stem_dir_correction (me, right_col);
+  *space += stem_dir_correction (me, right_col, increment);
 }
 
 Item *
@@ -167,12 +177,10 @@ Note_spacing::right_column (Grob*me)
 
    TODO: have to check wether the stems are in the same staff.
 
-   TODO: also correct for bar lines in RIGHT-ITEMS.  Should check if
-   the barline is the leftmost object of the break alignment.
-
 */
 Real
-Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn)  
+Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn,
+                                  Real increment)  
 {
   Drul_array<Direction> stem_dirs(CENTER,CENTER);
   Drul_array<Interval> stem_posns;
@@ -180,6 +188,7 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn)
   Drul_array<SCM> props(me->get_grob_property ("left-items"),
                        me->get_grob_property ("right-items"));
 
+  Drul_array<Grob*> beams_drul(0,0);
   Real correction = 0.0;
   
   stem_dirs[LEFT] = stem_dirs[RIGHT] = CENTER;
@@ -228,6 +237,9 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn)
              goto exit_func ;
            }
 
+         beams_drul[d] = Stem::beam_l (stem);
+           
+         
          Direction sd = Stem::get_direction (stem);
          if (stem_dirs[d] && stem_dirs[d] != sd)
            {
@@ -262,27 +274,40 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn)
   
   if (correct &&stem_dirs[LEFT] *stem_dirs[RIGHT] == -1)
     {
-      
-      intersect = stem_posns[LEFT];  
-      intersect.intersect(stem_posns[RIGHT]);
-      correct = correct && !intersect.empty_b ();
+      if (beams_drul[LEFT] == beams_drul[RIGHT])
+       {
+         /*
+           this is a knee: maximal correction.
+         */
+         
+         correction = increment* stem_dirs[LEFT];
+       }
+      else
+       {
+         intersect = stem_posns[LEFT];  
+         intersect.intersect(stem_posns[RIGHT]);
+         correct = correct && !intersect.empty_b ();
 
-      if (!correct)
-       return 0.0;
-      /*
-       Ugh. 7 is hardcoded.
-      */
-      correction = abs (intersect.length ());
-      correction = (correction/7) <? 1.0;
-      correction *= stem_dirs[LEFT] ;
-      correction *= gh_scm2double (me->get_grob_property ("stem-spacing-correction"));
+         if (!correct)
+           return 0.0;
+         
+         correction = abs (intersect.length ());         
 
-      if (!bar_yextent.empty_b())
-       {
-         correction *= 0.5;
+      
+         /*
+           Ugh. 7 is hardcoded.
+         */
+         correction = (correction/7) <? 1.0;
+         correction *= stem_dirs[LEFT] ;
+         correction *= gh_scm2double (me->get_grob_property ("stem-spacing-correction"));
+
+         if (!bar_yextent.empty_b())
+           {
+             correction *= 0.5;
+           }
        }
     }
-  else if (correct)
+  else if (correct && stem_dirs[LEFT] *stem_dirs[RIGHT] == UP)
     {
       /*
        Correct for the following situation:
@@ -326,3 +351,10 @@ Note_spacing::stem_dir_correction (Grob*me, Item * rcolumn)
   return correction;
 }
  
+
+
+
+ADD_INTERFACE (Note_spacing,"note-spacing-interface",
+  "",
+  "left-items right-items stem-spacing-correction");
+
index 3f7d17a4000f3c37917a2df4c375956a4ff0e8c8..c474e92af56ab695058e63054ed14e1524cfed7f 100644 (file)
@@ -60,10 +60,6 @@ Paper_column::column_l () const
 Paper_column::Paper_column (SCM l)
   : Item (l)           // guh.?
 {
-  Axis_group_interface::set_interface (this);
-  Axis_group_interface::set_axes (this, X_AXIS, X_AXIS);
-  Spaceable_grob::set_interface (this);
-
   line_l_=0;
   rank_i_ = -1;
 }
@@ -127,3 +123,9 @@ Paper_column::brew_molecule (SCM p)
   return t.smobbed_copy ();                                            
 }
 
+
+
+
+ADD_INTERFACE (Paper_column, "paper-column-interface",
+  "",
+  "between-cols when bounded-by-me shortest-playing-duration shortest-starter-duration");
index 68d3bd6c1fb078a65d0ec7326aaba53589d7e140..47b219927073c3d8e7b0e88c2dd811757f48c851 100644 (file)
@@ -77,9 +77,9 @@ Percent_repeat_item_interface::beat_slash (SCM grob)
   return m.smobbed_copy ();
 }
 
-
-
-
+ADD_INTERFACE (Percent_repeat_item_interface,"percent-repeat-interface",
+  "Repeats that look like percent signs",
+  "slope thickness");
 
 
 
index f51f9473b8e2e71b1e32fff18084b9974f13da04..dc4b7d624b00e2dc5708f9d00e3522dd20a1096d 100644 (file)
@@ -147,7 +147,7 @@ Phrasing_slur_engraver::create_grobs ()
          // push a new phrasing_slur onto stack.
          // (use temp. array to wait for all phrasing_slur STOPs)
          Grob* phrasing_slur = new Spanner (get_property ("PhrasingSlur"));
-         Slur::set_interface (phrasing_slur);
+         Slur::set_interface (phrasing_slur); // can't remove.
          SCM s = get_property ("phrasingSlurBeginAttachment");
          if (gh_symbol_p (s))
            {
index 5c9ca83d6399a47149274195b9673a46d2ceb37e..4afd70a14a4d2ec57ce4499892b62b708ce5f5bd 100644 (file)
@@ -7,8 +7,10 @@
   
   Chris Jackson <chris@fluffhouse.org.uk> - extended to support
   bracketed pedals.
+
   TODO: support for __| |__ or __| Ped  instead of  ___/\__ for pedal up-down
- */
+
+*/
 
 #include "engraver.hh"
 #include "musical-request.hh"
@@ -172,8 +174,6 @@ Piano_pedal_engraver::create_grobs ()
            {
              p->line_spanner_ = new Spanner (get_property ( ( String (p->name_) + "PedalLineSpanner").ch_C() ));
              Side_position_interface::set_axis (p->line_spanner_, Y_AXIS);
-             Axis_group_interface::set_interface (p->line_spanner_);
-             Axis_group_interface::set_axes (p->line_spanner_, Y_AXIS, Y_AXIS);
              Music * rq = (p->req_l_drul_[START]  ?  p->req_l_drul_[START]  :  p->req_l_drul_[STOP]);
              announce_grob (p->line_spanner_, rq->self_scm ());
            }
@@ -307,7 +307,6 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, SCM pedaltype)
       p->current_bracket_req_ = p->req_l_drul_[START];
 
       p->bracket_p_  = new Spanner (get_property ("PianoPedalBracket"));
-      p->bracket_p_->set_interface (ly_symbol2scm ("piano-pedal-interface"));
 
       // Set a property so that the molecule-creating function will know whether the left edge should be flared \___
       p->bracket_p_->set_grob_property("left-widen", gh_bool2scm((bool) p->req_l_drul_[STOP]) );
index d52d871d68953b95eea455515eab9031c89361cb..d811c380c3665b77eea00481e6deb12d8c905cc8 100644 (file)
@@ -178,12 +178,23 @@ Porrectus::brew_molecule (SCM smob)
   bool solid = to_boolean (me->get_grob_property ("solid"));
   bool add_stem = to_boolean (me->get_grob_property ("add-stem"));
 
-  SCM stem_direction_scm = me->get_grob_property ("stem-direction");
+  /*
+
+  TODO:
+
+  ugr. why not  called direction?
+    
+   */
+  SCM stem_direction_scm = me->get_grob_property ("direction");
   Direction stem_direction =
     gh_number_p (stem_direction_scm) ? to_dir (stem_direction_scm) : DOWN;
   if (!stem_direction)
     stem_direction = DOWN;
 
+
+  /*
+    TODO: revise name.
+   */
   bool auto_properties = to_boolean (me->get_grob_property ("auto-properties"));
   if (auto_properties)
       // determine add_stem and stem_direction automatically from durations
@@ -231,7 +242,7 @@ Porrectus::brew_molecule (SCM smob)
 
   Molecule molecule;
 
-  SCM line_thickness_scm = me->get_grob_property ("line-thickness");
+  SCM line_thickness_scm = me->get_grob_property ("thickness");
   Real line_thickness;
   if (gh_number_p (line_thickness_scm))
     {
@@ -244,7 +255,7 @@ Porrectus::brew_molecule (SCM smob)
   Real thickness =
     line_thickness * me->paper_l ()->get_var ("stafflinethickness");
 
-  SCM porrectus_width_scm = me->get_grob_property ("porrectus-width");
+  SCM porrectus_width_scm = me->get_grob_property ("width");
   Real porrectus_width;
   if (gh_number_p (porrectus_width_scm))
     {
@@ -480,3 +491,9 @@ Porrectus::brew_mensural_molecule (Item *me,
   molecule.translate_axis (ypos_correction, Y_AXIS);
   return molecule;
 }
+
+
+ADD_INTERFACE (Porrectus,"porrectus-interface",
+  "A porrectus ligature, joining two note heads into a single grob.",
+  "left-head right-head width add-stem auto-properties solid direction");
+
index 7bdfbbf9276dccb0bbd3ca43944bbd161d44bf12..339540123bca9c16a52483b17b8c1220f1be5db3 100644 (file)
@@ -39,7 +39,7 @@ Rest_collision_engraver::create_grobs ()
     return;
 
   rest_collision_p_ = new Item (get_property ("RestCollision"));
-  Rest_collision::set_interface (rest_collision_p_);
+
   announce_grob(rest_collision_p_, SCM_EOL);
   for (int i=0; i< note_column_l_arr_.size (); i++)
     Rest_collision::add_column (rest_collision_p_,note_column_l_arr_[i]);
index 9f4588d0ed75bacfc166afc36b3776acd1a9cabb..2569c7ab2b9153f5241faa423e4ba0d659b39633 100644 (file)
@@ -81,7 +81,6 @@ head_characteristic (Grob * col)
 
   TODO: look at horizontal-shift to determine ordering between rests
   for more than two voices.
-  
  */
 SCM
 Rest_collision::do_shift (Grob *me, SCM elts)
@@ -245,12 +244,9 @@ Rest_collision::do_shift (Grob *me, SCM elts)
   return SCM_UNSPECIFIED;
 }
 
-void
-Rest_collision::set_interface (Grob*me)
-{
-  me->set_extent_callback (SCM_EOL, X_AXIS);
-  me->set_extent_callback (SCM_EOL, Y_AXIS);
-}
-
 
+ADD_INTERFACE (Rest_collision,"rest-collision-interface",
+  "Move around ordinary rests (not multi-measure-rests) to avoid
+conflicts.",
+  "maximum-rest-count minimum-distance elements");
 
index cb92159fecedfad2471cf6ceb6429179c4109d7c..2bb3506c49e3c27535d835ac44cf252434582395 100644 (file)
@@ -66,7 +66,7 @@ Rest_engraver::process_music ()
   if (rest_req_l_ && !rest_p_) 
     {
       rest_p_ = new Item (get_property ("Rest"));
-      Rhythmic_head::set_interface (rest_p_);
+
 
       
       int durlog  = unsmob_duration (rest_req_l_->get_mus_property ("duration"))-> duration_log ();
index 3e2f9539a17b33a87d003ad29282ea36e0645fdf..aee966e1b1e8911aea54a691fa6bf4c6cd82316f 100644 (file)
@@ -120,3 +120,9 @@ Rest::has_interface (Grob*m)
 {
   return m && m->has_interface (ly_symbol2scm ("rest-interface"));
 }
+
+
+ADD_INTERFACE (Rest,"rest-interface",
+  "a rest",
+  "style");
+
index 32b3061e7e1f5a1703ec423262317496816de7ed..89ed54beb1cb03ec839f375c5459934c6ffc6839 100644 (file)
@@ -85,7 +85,6 @@ Rhythmic_column_engraver::create_grobs ()
       if (!note_column_)
        {
          note_column_ = new Item (get_property ("NoteColumn"));
-         Note_column::set_interface (note_column_);
          announce_grob(note_column_, SCM_EOL);
 
 
index 16e482d957cffb52aa533ec62d66d9c2266b2495..dd20a029b86bd6df0fbd166f7aaa2765b4b3d857 100644 (file)
@@ -49,14 +49,15 @@ Rhythmic_head::set_dots (Grob*me,Item *dot_l)
 }
 
 
-void
-Rhythmic_head::set_interface (Grob*me)
-{
-  me->set_interface (ly_symbol2scm ("rhythmic-head-interface"));
-}
 
 bool
 Rhythmic_head::has_interface (Grob*me)
 {
   return me &&  me->has_interface (ly_symbol2scm ("rhythmic-head-interface"));
 }
+
+
+ADD_INTERFACE (Rhythmic_head,"rhythmic-head-interface",
+  "Note head or rest",
+  "dot stem duration-log");
+
index e472f2878e96e70ce2892d58c92084f35edf86b7..97ee9ec2c65e34ec2e4957434ea8409e633eba66 100644 (file)
@@ -40,10 +40,7 @@ bool internal_type_checking_global_b;
 
 /*
 
-  TODO: verzin iets tegen optie code bloot
-
-
-  other interesting stuff to add:
+add these as well:
 
 @item -T,--no-timestamps
 don't timestamp the output
index 899b1d0208ab774594bd7bc6c921ea725fe4f2fa..3d6e5d058ba29d54a0e96320f27d4d6a1a3ab16c 100644 (file)
@@ -273,7 +273,6 @@ Score_engraver::try_music (Music*r)
 /*
   TODO:  use property Score.breakForbidden = #t
  */
-
 void
 Score_engraver::forbid_breaks ()
 {
index 9570c267f5e8270dfc3bebfe56302a18907fa85e..d8887be29f72d0c1a78cef1bc488dedf4a37eebb 100644 (file)
@@ -8,7 +8,6 @@
 
 #include "ly-smobs.icc"
 
-#include "scm-hash.hh"
 #include "score.hh"
 #include "debug.hh"
 #include "music-output-def.hh"
@@ -16,7 +15,7 @@
 #include "music-iterator.hh"
 #include "music.hh"
 #include "global-translator.hh"
-#include "scope.hh"
+#include "scm-hash.hh"
 #include "cpu-timer.hh"
 #include "main.hh"
 #include "paper-def.hh"
@@ -73,7 +72,9 @@ void
 Score::run_translator (Music_output_def *odef_l)
 {
   /*
-    TODO: this is not very elegant.... 
+    We want to know if we want to store locations, since they take a
+    lot of overhead.
+    
    */
   store_locations_global_b = (gh_eval_str ("point-and-click") !=  SCM_BOOL_F);
 
@@ -125,8 +126,8 @@ Score::run_translator (Music_output_def *odef_l)
 
   if (!header_p_)
     header_p_ = new Scheme_hash_table; // ugh
-  Scope bla (header_p_);
-  output->header_l_ = &bla;
+
+  output->header_l_ = header_p_;
   output->origin_str_ =  location_str ();
 
   progress_indication ("\n");
index f41264760c97e342ae1892d0bd3674cb361b47e5..59e28471c7a6f20088c1755d446bb414be4e9c41 100644 (file)
@@ -79,3 +79,9 @@ Script_column::before_line_breaking (SCM smob)
   return SCM_UNSPECIFIED;
 }
 
+
+ADD_INTERFACE (Script_column,"script-column-interface",
+  "An interface that sorts scripts according to their @code{script-priority}",
+  "");
+
+
index 5ae6152f3d3259c59dd868ae3ba5eac1777c15f5..0280a52d17a980fa1557ac2793afb34f674cdc5f 100644 (file)
@@ -84,9 +84,12 @@ Script::has_interface (Grob*me)
   return me->has_interface (ly_symbol2scm ("script-interface"));
 }
 
-void
-Script::set_interface (Grob*me)
-{
-  return me->set_interface (ly_symbol2scm ("script-interface"));
-}
+
+ADD_INTERFACE (Text_script,"text-script-interface",
+  "Any text script",
+  "script-priority");
+
+ADD_INTERFACE (Skript, "script-interface",
+  "",
+  "script-priority script-molecule staff-support");
 
index c8a74111c5ac5dac283934ec24be0e707bb975f3..580919a04ebd3a1c551cfbf2326b9192fed1026b 100644 (file)
@@ -135,13 +135,14 @@ Separating_group_spanner::add_spacing_unit (Grob* me ,Item*i)
 }
 
 
-void
-Separating_group_spanner::set_interface (Grob*)
-{
-}
-
 bool
 Separating_group_spanner::has_interface (Grob*)
 {//todo
   assert (false);
 }
+
+
+
+ADD_INTERFACE (Separating_group_spanner,"separation-spanner-interface",
+  "Spanner that containing @code{separation-item-interface} grobs to calculate rods",
+  "");
index 860b4519d5288ca2ede7dcefaddebef716c45ffc..81b3df8ced18cc06c91df83d2d15a9d75b82d71e 100644 (file)
@@ -1,5 +1,5 @@
 /*   
-  single-malt-grouping-item.cc --  implement Separation_item
+     separation-item.cc --  implement Separation_item
   
   source file of the GNU LilyPond music typesetter
   
@@ -26,6 +26,11 @@ Separation_item::add_item (Grob*s,Item* i)
   s->add_dependency (i);
 }
 
+/*
+  DOCME:
+
+  why don't we use extent()
+ */
 Interval
 Separation_item::my_width (Grob *me)
 {
@@ -73,3 +78,13 @@ Separation_item::my_width (Grob *me)
 
 
 
+
+
+ADD_INTERFACE (Separation_item,"separation-item-interface",
+  "Item that computes widths to generate spacing rods.
+
+Calc dimensions for the Separating_group_spanner; this has to be
+an item to get dependencies correct.  It can't be an grob_group
+since these usually are in a different X_group
+",
+  "elements");
index 57e6ea48998c85b8aa815a20fb9964718fdc03bc..61cf029270af6e2f81748408fdf42ecdb36613ce 100644 (file)
@@ -14,7 +14,7 @@
 
 /*
   
-  TODO: handling of grace notes is excuisite pain.  This handling
+  TODO: handling of grace notes is exquisite pain.  This handling
   should be formally specified and then the implementation verified.
 
 */
@@ -263,6 +263,7 @@ Sequential_music_iterator::get_music (Moment until)const
   Skip events till UNTIL. We don't do any other side effects such as
   descending to child iterator contexts, because they might depend on
   \context specs and \translator changes being executed
+
   TODO: build support for grace notes here.
  */
 void
index 9acf165858db16ee93ced2c38a35e330bd8e7fdc..4ce9df6761ae4118309790159514c86e2d3fb6fc 100644 (file)
@@ -335,3 +335,10 @@ Side_position_interface::supported_b (Grob*me)
 }
 
 
+
+
+ADD_INTERFACE (Side_position_interface,"side-position-interface",
+  "Position a victim object (this one) next to other objects (the support).
+#'direction = where to put the victim object (left or right?)
+",
+  "side-support-elements direction-source direction side-relative-direction minimum-space padding self-alignment-X self-alignment-Y");
index 9bf8e6a29ec4674f24559c46c68695626589f190..806f5918e0b1bba4c79a738413e9a6e6e03b2de9 100644 (file)
@@ -156,7 +156,7 @@ Slur_engraver::create_grobs ()
          // push a new slur onto stack.
          // (use temp. array to wait for all slur STOPs)
          Grob* slur = new Spanner (get_property ("Slur"));
-         Slur::set_interface (slur);
+         Slur::set_interface (slur); // cannot remove yet!
          SCM s = get_property ("slurBeginAttachment");
          if (gh_symbol_p (s))
            {
index 427cd0799acaae8552d332d0478fac6d90a73228..2e0e9b57f7c4b20ffb1a3a4eb72dac4d37a258a2 100644 (file)
@@ -9,11 +9,16 @@
 
 /*
   [TODO]
+  
     * should avoid stafflines with horizontal part.
+
     * begin and end should be treated as a/acknowledge Scripts.
+
     * smart changing of endings
+
     * smart changing of (Y-?)offsets to avoid ugly beziers
  (along-side-stem)
  */
 
 #include "directional-element-interface.hh"
@@ -683,3 +688,7 @@ Slur::has_interface (Grob*me)
 }
 
 
+ADD_INTERFACE (Slur,"slur-interface",
+  "A slur",
+  "slope-limit de-uglify-parameters details attachment direction attachment-offset beautiful y-free control-points extremity-rules extremity-offset-alist thickness dashed");
+
index 2695186b5d6685278bf72d5119666a74f3dd330f..30e1b0503e96aa067c6f917f43fdd2c8f769a545 100644 (file)
@@ -80,8 +80,9 @@ Spaceable_grob::remove_interface (Grob*me)
 }
 
 
-void
-Spaceable_grob::set_interface (Grob*me)
-{
-  me->set_interface (ly_symbol2scm ("spaceable-grob-interface"));
-}
+ADD_INTERFACE (Spaceable,"spaceable-grob-interface",
+  "An grob (generally a Paper_column) that takes part in the
+spacing problem. ",
+  "penalty minimum-distances ideal-distances
+left-neighbors right-neighbors");
+
index f3c69d9976c47da7287bc2c2c4ef1f8e61892b88..2fff9c08e6d954c68c197fd5b33f49c6b92ed000 100644 (file)
@@ -180,12 +180,31 @@ Spacing_spanner::prune_loose_colunms (Grob*me,Link_array<Grob> *cols, Rational s
 
                  Real space, fixed;
                  fixed = 0.0;
-                 bool expand_only;
-                 Real base = note_spacing (me, lc, rc, shortest, &expand_only);
-                 Note_spacing::get_spacing (sp, rc, base, increment, &space, &fixed);
-                 space -=base; 
+                 bool dummy;
+
+                 if (d == LEFT)
+                   {
+                     /*
+                       The note spacing should be taken from the musical
+                       columns.
+                   
+                     */
+                     Real base = note_spacing (me, lc, rc, shortest, &dummy);
+                     Note_spacing::get_spacing (sp, rc, base, increment, &space, &fixed);
+
+                     space -= increment; 
+                 
+                     dists[d] = dists[d] >? space;
+                   }
+                 else
+                   {
+                     Real space, fixed_space;
+                     Staff_spacing::get_spacing_params (sp,
+                                                        &space, &fixed_space);
+
+                     dists[d] = dists[d] >? fixed_space;
+                   }
                  
-                 dists[d] = dists[d] >? space;
                }
            }
          while (flip (&d) != LEFT);
@@ -536,7 +555,7 @@ Spacing_spanner::musical_column_spacing (Grob *me, Item * lc, Item *rc, Real inc
 
 
 /*
-  Read hints from L (todo: R) and generate springs.
+  Read hints from L and generate springs.
  */
 void
 Spacing_spanner::breakable_column_spacing (Item* l, Item *r)
@@ -670,3 +689,50 @@ Spacing_spanner::note_spacing (Grob*me, Grob *lc, Grob *rc,
   return dist;
 }
 
+
+
+ADD_INTERFACE (Spacing_spanner,"spacing-spanner-interface",
+  " SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
+The space taken by a note is determined by the formula 
+
+
+
+where TIME is the amount of time a note occupies.  The value of C is
+chosen such that the smallest space within a measure is
+arithmetic_basicspace:
+
+C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) 
+
+The smallest space is the one following the shortest note in the
+measure, or the space following a hypothetical 1/8 note.  Typically
+arithmetic_basicspace is set to a value so that the shortest note
+takes about two noteheads of space (ie, is followed by a notehead of
+space):
+
+@example
+2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
+
+@{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
+@{ assuming: SHORTEST <= 1/8 @}
+
+= arithmetic_multiplier *
+( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
+
+= arithmetic_multiplier * arithmetic_basicspace
+
+@{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
+
+= quartwidth * arithmetic_basicspace
+
+=>            
+
+arithmetic_basicspace = 2/1 = 2
+
+
+If you want to space your music wider, use something like:
+
+arithmetic_basicspace = 4.;
+
+@end example",
+  "spacing-increment shortest-duration-space");
+
index 02c5ab0f13fc9bac7581be0443028528737cc362..c2c3fd919c78ddb5df8d193712779be0171d1aa3 100644 (file)
@@ -57,7 +57,7 @@ Span_bar_engraver::acknowledge_grob (Grob_info i)
       if (bar_l_arr_.size () >= 2 && !spanbar_p_) 
        {
          spanbar_p_ = new Item (get_property ("SpanBar"));
-         Span_bar::set_interface (spanbar_p_);
+
          spanbar_p_->set_parent (bar_l_arr_[0], X_AXIS);
 
          announce_grob (spanbar_p_, SCM_EOL);
index c1d82c6df047d96cc1c8f79615112c29d1d3b8a2..0279cd273330a92fb6d4aa81d7aee1a631ea57ed 100644 (file)
@@ -27,20 +27,22 @@ Span_bar::add_bar (Grob*me, Grob*b)
 
 MAKE_SCHEME_CALLBACK (Span_bar,brew_molecule,1);
 
-/**
- * Limitations/Bugs:
- *
- * (1) Elements from 'me->get_grob_property ("elements")' must be
- * ordered according to their y coordinates relative to their common
- * axis group parent.  Otherwise, the computation goes mad.  (TODO:
- * apply a sort algorithm that ensures this precondition.)  However,
- * until now, I have seen no case where lily has not fulfilled this
- * precondition.
- *
- * (2) This method depends on bar_engraver not being removed from
- * staff context.  If bar_engraver is removed, the size of the staff
- * lines is evaluated as 0, which results in a solid span bar line
- * with faulty y coordinate.
+/*
+  Limitations/Bugs:
+
+   (1) Elements from 'me->get_grob_property ("elements")' must be
+   ordered according to their y coordinates relative to their common
+   axis group parent.  Otherwise, the computation goes mad.
+
+   (TODO:
+   apply a sort algorithm that ensures this precondition.)  However,
+   until now, I have seen no case where lily has not fulfilled this
+   precondition.
+
+   (2) This method depends on bar_engraver not being removed from
+   staff context.  If bar_engraver is removed, the size of the staff
+   lines is evaluated as 0, which results in a solid span bar line
+   with faulty y coordinate.
  */
 
 /*
@@ -245,17 +247,15 @@ Span_bar::get_bar_size (SCM smob)
   return gh_double2scm (iv.length ());
 }
 
-void
-Span_bar::set_interface (Grob *me)
-{
-  Bar_line::set_interface (me);
-  
-  me->set_interface (ly_symbol2scm ("span-bar-interface"));
-  me->set_extent_callback (SCM_EOL, Y_AXIS);
-}
 
 bool
 Span_bar::has_interface (Grob*m)
 {
   return m && m->has_interface (ly_symbol2scm ("span-bar-interface"));
 }
+
+ADD_INTERFACE (Span_bar,"span-bar-interface",
+  "A bar line that spans other barlines (typically used to get cross-staff barlines.",
+  "");
+
+
index 0b6573dd72c51d20dcf507fcc21034c044c2c55e..9e8be73b3b211918542e1a7c1ba62e237af6a4f1 100644 (file)
@@ -17,7 +17,6 @@
 #include "paper-outputter.hh"
 #include "paper-column.hh"
 #include "line-of-score.hh"
-
 #include "group-interface.hh"
 
 void
@@ -199,6 +198,9 @@ Spanner::Spanner (SCM s)
 {
   spanned_drul_[LEFT]=0;
   spanned_drul_[RIGHT]=0;
+  Group_interface::add_thing (this, ly_symbol2scm ("interfaces"), ly_symbol2scm ("spanner-interface"));
+                    
+  
 }
 
 Spanner::Spanner (Spanner const &s)
@@ -406,3 +408,8 @@ unsmob_spanner (SCM s )
 {
   return dynamic_cast<Spanner*> (unsmob_grob (s));
 }
+
+ADD_INTERFACE(Spanner,
+             "spanner-interface",
+             "",
+             "minimum-length");
index 5eab8ffbf200b4781f50b23645f365315f6e24f0..8d7a5db7c37cf33dadf996103ab8d88798a26ead 100644 (file)
@@ -179,7 +179,8 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
   *fixed = 1.0;
 
   Grob * separation_item=0;
-  
+  Item * me_item  = dynamic_cast<Item*> (me);
+    
   for (SCM s = me->get_grob_property ("left-items");
        gh_pair_p (s); s = gh_cdr(s))
     {
@@ -212,7 +213,15 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
   if (!scm_list_p (alist))
     return ;
 
-  SCM space_def = scm_sloppy_assq (ly_symbol2scm ("begin-of-note"), alist);
+  
+  SCM space_def = scm_sloppy_assq (ly_symbol2scm ("first-note"), alist);
+  if (me_item->break_status_dir () == CENTER)
+    {
+      SCM nndef = scm_sloppy_assq (ly_symbol2scm ("next-note"), alist);
+      if (gh_pair_p (nndef ))
+       space_def = nndef;
+    }
+
   if (!gh_pair_p (space_def))
     {
       programming_error ("Unknown prefatory spacing. "); 
@@ -232,3 +241,8 @@ Staff_spacing::get_spacing_params (Grob *me, Real * space, Real * fixed)
 
   *space += next_notes_correction (me, last_grob);
 }
+
+
+ADD_INTERFACE (Staff_spacing,"staff-spacing-interface",
+  "",
+  "left-items right-items");
index e63efa1b309298e08b67bafce0cd9cd3674ded59..7e1b0838834bd0cf95c5f71953442b43ea552a89 100644 (file)
@@ -160,9 +160,12 @@ compare_position (Grob *const  &a, Grob * const &b)
 }
 
 
-void
-Staff_symbol_referencer::set_interface (Grob * e)
-{
-  e->add_offset_callback (Staff_symbol_referencer::callback_proc, Y_AXIS);
-}
 
+
+
+ADD_INTERFACE (Staff_symbol_referencer,"staff-symbol-referencer-interface",
+  "Object whose Y position is meaning with reference to a staff
+symbol. Objects that have this interface should include
+Staff_symbol_referencer::callback in their Y-offset-callback.
+",
+  "staff-position");
index 65c7cca21e85e1f381e5e5cfbaaa2281bf2e33a8..de2ecf4e423e0ac8e2c3f4c32846b3d283d8b8ac 100644 (file)
@@ -83,3 +83,11 @@ Staff_symbol::has_interface (Grob*m)
 {
   return m && m->has_interface (ly_symbol2scm ("staff-symbol-interface"));
 }
+
+
+
+ADD_INTERFACE (Staff_symbol,"staff-symbol-interface",
+  "This spanner draws the lines of a staff.  The middle line is
+position 0.",
+  "staff-space line-count invisible-staff");
+
index a23d1430a8e8fb14509dac706799b93b1f05a52c..c4cab0c3a1fec3d54ba586983bed482cd513f109 100644 (file)
@@ -62,9 +62,7 @@ Stem_engraver::acknowledge_grob (Grob_info i)
       if (!stem_p_) 
        {
          stem_p_ = new Item (get_property ("Stem"));
-         Stem::set_interface (stem_p_);
-         Staff_symbol_referencer::set_interface (stem_p_);
-         
+
          stem_p_->set_grob_property ("duration-log", gh_int2scm (duration_log));
 
          if (tremolo_req_l_)
@@ -89,9 +87,8 @@ Stem_engraver::acknowledge_grob (Grob_info i)
              if (requested_type)
                {
                  tremolo_p_ = new Item (get_property ("StemTremolo"));
-                 Stem_tremolo::set_interface (tremolo_p_);
-
                  announce_grob(tremolo_p_, tremolo_req_l_->self_scm());
+
                  /*
                    The number of tremolo flags is the number of flags of
                    the tremolo-type minus the number of flags of the note
@@ -101,7 +98,7 @@ Stem_engraver::acknowledge_grob (Grob_info i)
                    - (duration_log > 2 ? duration_log - 2 : 0);
                  if (tremolo_flags < 0)
                    tremolo_flags = 0;
-                 tremolo_p_->set_grob_property ("tremolo-flags",
+                 tremolo_p_->set_grob_property ("flag-count",
                                                gh_int2scm (tremolo_flags));
                }
            }
index 597b7962f747183ac76288e1b560fc0fb9cfa6d4..3a18323b3252de7669107affe8a92e08ec004070 100644 (file)
     lengthen stem if necessary
  */
 
-void
-Stem_tremolo::set_interface (Grob *me)
-{
-  me->set_interface (ly_symbol2scm ("stem-tremolo"));
-}
-
 bool
 Stem_tremolo::has_interface (Grob *me)
 {
-  return me->has_interface (ly_symbol2scm ("stem-tremolo"));
+  return me->has_interface (ly_symbol2scm ("stem-tremolo-interface"));
 }
 
 MAKE_SCHEME_CALLBACK (Stem_tremolo,dim_callback,2);
@@ -76,9 +70,11 @@ Stem_tremolo::brew_molecule (SCM smob)
   if (beam)
     {
       Real dy = 0;
-      SCM s = beam->get_grob_property ("dy");
-      if (gh_number_p (s))
-       dy = gh_scm2double (s);
+      SCM s = beam->get_grob_property ("positions");
+      if (gh_pair_p (s))
+       {
+         dy = -gh_scm2double (gh_car (s)) +gh_scm2double (gh_cdr (s));
+       }
       Real dx = Beam::last_visible_stem (beam)->relative_coordinate (0, X_AXIS)
        - Beam::first_visible_stem (beam)->relative_coordinate (0, X_AXIS);
       dydx = dx ? dy/dx : 0;
@@ -97,7 +93,7 @@ Stem_tremolo::brew_molecule (SCM smob)
   a.translate (Offset (-width/2, width / 2 * dydx));
   
   int tremolo_flags;
-  SCM s = me->get_grob_property ("tremolo-flags");
+  SCM s = me->get_grob_property ("flag-count");
   if (gh_number_p (s))
     tremolo_flags = gh_scm2int (s);
   else
@@ -162,3 +158,7 @@ Stem_tremolo::set_stem (Grob*me,Grob *s)
   me->set_grob_property ("stem", s->self_scm ());
 }
 
+
+ADD_INTERFACE (Stem_tremolo,"stem-tremolo-interface",
+  "",
+  "stem beam-width beam-thickness flag-count");
index 615417116cdbf290e855e057e8e4e75cfd9d599a..91fe78c888f2994e9d6b7d8ca6d6ce029d84e96c 100644 (file)
@@ -231,7 +231,12 @@ Stem::add_head (Grob*me, Grob *n)
     }
   else
     {
-      n->set_grob_property ("rest", n->self_scm ());
+      /*
+       Apparently, this is never used.
+       */
+#if 0
+      me->set_grob_property ("rest", n->self_scm ());
+#endif
     }
 }
 
@@ -356,8 +361,8 @@ Stem::get_default_stem_end_position (Grob*me)
 
 
   bool no_extend_b = to_boolean (me->get_grob_property ("no-stem-extend"));
-   if (!grace_b && !no_extend_b && dir * st < 0) // junkme?
-      st = 0.0;
+  if (!grace_b && !no_extend_b && dir * st < 0) // junkme?
+    st = 0.0;
 
   return st;
 }
@@ -795,8 +800,7 @@ Stem::has_interface (Grob*m)
   return m && m->has_interface (ly_symbol2scm ("stem-interface"));
 }
 
-void
-Stem::set_interface (Grob*me)
-{    
-  me->set_interface (ly_symbol2scm ("stem-interface"));
-}
+ADD_INTERFACE (Stem,"stem-interface",
+  "A stem",
+  "thickness stem-info beamed-lengths beamed-minimum-lengths lengths beam stem-shorten duration-log beaming neutral-direction stem-end-position support-head heads direction length style no-stem-extend flag-style dir-forced");
+
index 65aa936a374bb86281b6906c258e904d51d70c85..e8973a68242b519f8beb51d28eb994d343add6c7 100644 (file)
@@ -285,3 +285,9 @@ Syllable_group::make_entry ()
   Syllable_group *vi = new Syllable_group;
   return vi->smobbed_self ();
 }
+
+
+ADD_INTERFACE (Lyric_syllable,"lyric-syllable-interface",
+  "a single piece of lyrics",
+  "word-space alignment ignore-length-mismatch begin-alignment end-alignment");
+
index 6d3846cd03e5eae8cc6ddc9dd1fc445e9e6b3502..5ad1bc6c6e68ddb8d7a8aeca8a3de86efa4f93ce 100644 (file)
@@ -57,11 +57,6 @@ Will not fix it since I'm not sure.
   return mol;
 }
 
-void
-System_start_delimiter::set_interface (Grob*me)
-{
-  me->set_interface (ly_symbol2scm ("system-start-delimiter-interface"));
-}
 
 bool
 System_start_delimiter::has_interface (Grob*me)
@@ -185,3 +180,9 @@ System_start_delimiter::staff_brace (Grob*me, Real y)
   return Molecule (b, at);
 }
   
+
+
+
+ADD_INTERFACE (System_start_delimiter,"system-start-delimiter-interface",
+  "#'style can be bar-line, bracket or brace",
+  "bar-line-collapse-height brace-collapse-height bracket-collapse-height thickness arch-height arch-angle arch-thick arch-width bracket-thick glyph");
index 3405d68f2893024da38a3c902d6457fff82111c0..75f0bf4916b1b472889402d8deb8333bd0960ada 100644 (file)
@@ -36,9 +36,6 @@ System::System (SCM s)
   : Spanner (s)
 {
   rank_i_ = 0;
-
-  Axis_group_interface::set_interface (this);
-  Axis_group_interface::set_axes (this, Y_AXIS,X_AXIS);
 }
 
 int
@@ -538,3 +535,15 @@ System::column_l_arr ()const
   return acs;
 }
   
+
+
+
+ADD_INTERFACE (System,"system-interface",
+  "Super grob, parent of all:
+
+The columns of a score that form one line.  The toplevel grob.  Any
+grob has a Line_of_score as both X and Y reference point. The
+Paper_score contains one grob of this type. Control enters the
+Grob dependency calculation from this single Line_of_score
+object.",
+  "between-system-string spacing-procedure before-line-breaking-callback after-line-breaking-callback all-elements columns");
index b165e86711e5dc4004ba3d8550e437a77bd7520f..194028ab3f4dd24d001843ff4de0cecfa2a35f6f 100644 (file)
@@ -246,3 +246,9 @@ Text_item::brew_molecule (SCM smob)
   return mol.smobbed_copy (); 
 }
 
+
+
+
+ADD_INTERFACE (Text_item,"text-interface",
+  "A scheme markup text",
+  "text align baseline-skip lookup raise kern word-space magnify");
index 6457d433c30aa346a8240bfed2d6d95f0f990b8f..0ff02bf2e07e1c73d9b9a2b94f52362b4fee062a 100644 (file)
@@ -22,7 +22,7 @@ source file of the GNU LilyPond music typesetter
 /*
   TODO:
   - vertical start / vertical end (fixme-name) |
-  - contination types (vert. star, vert. end)  |-> eat volta-spanner
+  - contination types (vert. star, vert. end)  |-> eat volta-bracket
   - more styles
   - more texts/positions
 */
@@ -291,3 +291,16 @@ Text_spanner::setup_pedal_bracket(Spanner *me)
   me->set_grob_property ("shorten-pair", gh_cons ( gh_double2scm ( shorten[LEFT] ), 
                                                   gh_double2scm ( shorten[RIGHT] ) ));
 }
+
+
+
+ADD_INTERFACE (Pianopedal,"piano-pedal-interface",
+  "",
+  "pedal-type edge-width edge-height shorten-pair text-start left-widen right-widen");
+
+
+
+ADD_INTERFACE (Text_spanner,"text-spanner-interface",
+  "generic text spanner",
+  "dash-period dash-length edge-height edge-width edge-text shorten-pair type");
+
index 9c46164bb6668d73c4aa0f3d7f2b5e7e3495bdc4..a2c34f6e62ff686d565b1a73d7b4f7b8b8d689da 100644 (file)
 
 
 
-void
-Tie_column::set_interface (Grob*me)
-{
-  me->set_interface (ly_symbol2scm ("tie-column-interface"));
-  me->set_extent_callback (SCM_EOL, X_AXIS);
-  me->set_extent_callback (SCM_EOL, Y_AXIS) ; 
-}
 
 bool
 Tie_column::has_interface (Grob*me)
@@ -122,3 +115,10 @@ Tie_column::after_line_breaking (SCM smob)
   set_directions (unsmob_grob (smob));
   return SCM_UNSPECIFIED;
 }
+
+
+
+ADD_INTERFACE (Tie_column,"tie-column-interface",
+  "that sets tie directions in a tied chord",
+  "direction");
+
index 079d6e84ee34084c5cceefe99dda692217be439b..447b5ee143be107f1da2255f0a68fac96affca07 100644 (file)
@@ -156,7 +156,7 @@ Tie_engraver::create_grobs ()
          
          Spanner * p = new Spanner (basic);
 
-         Tie::set_interface (p);
+         Tie::set_interface (p); // cannot remove.
          Tie::set_head (p,LEFT, dynamic_cast<Item*> (unsmob_grob (ly_car (pair))));
          Tie::set_head (p,RIGHT, dynamic_cast<Item*> (unsmob_grob (ly_cdr (pair))));
          
@@ -166,7 +166,7 @@ Tie_engraver::create_grobs ()
       else for (SCM s = head_list; gh_pair_p (s); s = ly_cdr (s))
        {
          Grob * p = new Spanner (basic);
-         Tie::set_interface (p);
+         Tie::set_interface (p); // cannot remove yet!
          
          Tie::set_head (p, LEFT, dynamic_cast<Item*> (unsmob_grob (ly_caar (s))));
          Tie::set_head (p, RIGHT, dynamic_cast<Item*> (unsmob_grob (ly_cdar (s))));
@@ -178,7 +178,7 @@ Tie_engraver::create_grobs ()
       if (tie_p_arr_.size () > 1 && !tie_column_p_)
        {
          tie_column_p_ = new Spanner (get_property ("TieColumn"));
-         Tie_column::set_interface (tie_column_p_);
+
          for (int i = tie_p_arr_.size (); i--;)
            Tie_column::add_tie (tie_column_p_,tie_p_arr_ [i]);
          announce_grob(tie_column_p_, SCM_EOL);
index 2dea2b88467b2182386ab7ffd454fac25d372cf1..688a12dece44afd48e502200084051651db20dbe 100644 (file)
@@ -50,7 +50,6 @@ void
 Tie::set_interface (Grob*me)
 {
   me->set_grob_property ("heads", gh_cons (SCM_EOL, SCM_EOL));
-  me->set_interface (ly_symbol2scm ("tie-interface"));
 }
 
 bool
@@ -311,3 +310,8 @@ Tie::brew_molecule (SCM smob)
 }
 
 
+
+ADD_INTERFACE (Tie,"tie-interface",
+  "A tie connecting two noteheads.
+direction = Forced direction for all ties",
+  "y-offset staffline-clearance control-points heads details thickness x-gap direction minimum-length");
index 1ba5fb873a96193dea6144d3a7da1ded8f770a2b..0513157775d69f8b79b9ffe3856460b0091d85ac 100644 (file)
@@ -122,3 +122,34 @@ Time_signature::time_signature (Grob*me,int num, int den)
   return m;
 }
 
+
+
+ADD_INTERFACE (Time_signature,"time-signature-interface",
+  "A time signature, in different styles.
+  The following values for 'style are are recognized:
+
+    @table @samp
+      @item @code{C}
+        4/4 and 2/2 are typeset as C and struck C, respectively.  All
+        other time signatures are written with two digits.
+
+      @item @code{old}
+        2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and 9/8 are
+        typeset with old-style mensuration marks.  All other time
+        signatures are written with two digits.
+
+      @item @code{1xxx}
+        All time signatures are typeset with a single
+        digit, e.g. 3/2 is written as 3. (Any symbol starting
+       with the digit @code{1} will do.)
+
+      @item @code{C}@var{M}@code{/}@var{N}, 
+@code{old}@var{M}@code{/}@var{N} or
+      @code{old6/8alt}
+        Tells LilyPond to use a specific symbol as time signature, 
+       regardless of the actual time signature.
+    @end table
+
+See also the test-file @file{input/test/time.ly}.
+",
+  "fraction style");
index dc74135a3c42e8fae888a6a70f4babd5bec2994e..da4f0585403be71e19c916ca22b204eb86e35294 100644 (file)
@@ -16,7 +16,7 @@
 #include "paper-column.hh"
 #include "paper-def.hh"
 #include "text-item.hh"
-#include "tuplet-spanner.hh"
+#include "tuplet-bracket.hh"
 #include "stem.hh"
 #include "note-column.hh"
 #include "dimensions.hh"
@@ -26,9 +26,6 @@
 #include "staff-symbol-referencer.hh"
 
 /*
-  TODO:
-  staff-line collisions for horizontal tuplet brackets.
-
   TODO:
 
   in the case that there is no bracket, but there is a (single) beam,
  */
 
 
-
-void
-Tuplet_bracket::set_interface (Grob*me)
-{
-  me->set_interface (ly_symbol2scm ("tuplet-bracket"));
-}
-
 MAKE_SCHEME_CALLBACK (Tuplet_bracket,brew_molecule,1);
 SCM
 Tuplet_bracket::brew_molecule (SCM smob) 
@@ -302,3 +292,16 @@ Tuplet_bracket::add_column (Grob*me, Item*n)
 }
 
 
+bool
+Tuplet_bracket::has_interface (Grob*me)
+{
+  return me->has_interface (ly_symbol2scm ("tuplet-bracket-interface"));
+}
+
+
+
+
+ADD_INTERFACE (Tuplet_bracket,"tuplet-bracket-interface",
+  "A bracket with a number in the middle, used for tuplets.",
+  "columns number-gap delta-y tuplet-bracket-visibility tuplet-number-visibility thick direction");
+
index f3a73c8e10ccdfc2636f964a099719bcb8611ac6..8ace269d131fbbc0782b35f709f97aca740ed9a1 100644 (file)
@@ -9,7 +9,7 @@
 
 
 #include "command-request.hh"
-#include "tuplet-spanner.hh"
+#include "tuplet-bracket.hh"
 #include "note-column.hh"
 #include "time-scaled-music.hh"
 #include "beam.hh"
@@ -75,7 +75,7 @@ Tuplet_engraver::create_grobs ()
        continue;
 
       Spanner* glep = new Spanner (get_property ("TupletBracket"));
-      Tuplet_bracket::set_interface (glep);
+
       if (i >= started_span_p_arr_.size ())
        started_span_p_arr_.push (glep);
       else
diff --git a/lily/volta-bracket.cc b/lily/volta-bracket.cc
new file mode 100644 (file)
index 0000000..1705fbf
--- /dev/null
@@ -0,0 +1,130 @@
+/*
+  volta-bracket.cc -- implement Volta_bracket_interface
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--2002 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#include <string.h>
+
+#include "box.hh"
+#include "debug.hh"
+#include "font-interface.hh"
+#include "molecule.hh"
+#include "paper-column.hh"
+#include "paper-def.hh"
+#include "text-item.hh"
+#include "volta-bracket.hh"
+#include "group-interface.hh"
+#include "side-position-interface.hh"
+#include "directional-element-interface.hh"
+
+
+/*
+  this is too complicated. Yet another version of side-positioning,
+  badly implemented.
+
+  --
+
+  * Should look for system_start_delim to find left edge of staff.
+  
+*/
+
+MAKE_SCHEME_CALLBACK (Volta_bracket_interface,brew_molecule,1);
+SCM
+Volta_bracket_interface::brew_molecule (SCM smob) 
+{
+  Grob *me = unsmob_grob (smob);
+  Link_array<Item> bar_arr
+    = Pointer_group_interface__extract_grobs (me, (Item*)0, "bars");
+
+  if (!bar_arr.size ())
+    return SCM_EOL;
+
+  Spanner *orig_span =  dynamic_cast<Spanner*> (me->original_l_);
+
+  bool first_bracket = orig_span && (orig_span->broken_into_l_arr_[0] == (Spanner*)me);
+  
+  bool last_bracket = orig_span && (orig_span->broken_into_l_arr_.top () == (Spanner*)me);
+
+  bool no_vertical_start = orig_span && !first_bracket;
+  bool no_vertical_end = orig_span && !last_bracket;
+  SCM bars = me->get_grob_property ("bars");
+  Grob * endbar =   unsmob_grob (ly_car (bars));
+  SCM glyph = endbar->get_grob_property("glyph");
+  String str = ly_scm2string(glyph);
+  const char* cs = str.ch_C();
+  no_vertical_end |=
+    (strcmp(cs,":|")!=0 && strcmp(cs,"|:")!=0 && strcmp(cs,"|.")!=0
+     && strcmp(cs,":|:")!=0 && strcmp(cs,".|")!=0);
+
+  Real staff_thick = me->paper_l ()->get_var ("stafflinethickness");  
+  Real half_space = 0.5;
+
+  Item * bound = dynamic_cast<Spanner*> (me)->get_bound (LEFT);
+
+  /*
+    not a start, but really broken in two
+   */
+  Real left =0.;  
+  if (bound->break_status_dir () == RIGHT)
+  {
+    Paper_column *pc = bound->column_l ();
+    left = pc->extent (pc, X_AXIS)[RIGHT]   - bound->relative_coordinate (pc, X_AXIS);
+  }
+  else
+  {
+    /*
+      the volta spanner is attached to the bar-line, which is moved
+      to the right. We don't need to compensate for the left edge.
+    */
+  }
+
+  Real w = dynamic_cast<Spanner*> (me)->spanner_length () - left - half_space;
+  Real h =  gh_scm2double (me->get_grob_property ("height"));
+  Real t =  staff_thick * gh_scm2double (me->get_grob_property ("thickness"));
+
+  /*
+    ugh: should build from line segments.
+   */
+  SCM at = (scm_list_n (ly_symbol2scm ("volta"),
+                    gh_double2scm (h),
+                    gh_double2scm (w),
+                    gh_double2scm (t),
+                    gh_int2scm (no_vertical_start),
+                    gh_int2scm (no_vertical_end),
+                    SCM_UNDEFINED));
+
+  Box b (Interval (0, w), Interval (0, h));
+  Molecule mol (b, at);
+  SCM text = me->get_grob_property ("text");
+  SCM properties = scm_list_n (me->mutable_property_alist_,
+                              me->immutable_property_alist_,SCM_UNDEFINED);
+  Molecule num = Text_item::text2molecule (me, text, properties);
+
+  mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
+                  - 1.0);
+  mol.translate_axis (left, X_AXIS);
+  return mol.smobbed_copy ();
+}
+
+
+void
+Volta_bracket_interface::add_bar (Grob *me, Item* b)
+{
+  Pointer_group_interface::add_grob (me, ly_symbol2scm ("bars"), b);
+  Side_position_interface::add_support (me,b);
+  add_bound_item (dynamic_cast<Spanner*> (me), b); 
+}
+
+void
+Volta_bracket_interface::add_column (Grob*me, Grob* c)
+{
+  Side_position_interface::add_support (me,c);
+}
+
+ADD_INTERFACE (Volta_bracket_interface,"volta-bracket-interface",
+  "Volta bracket with number",
+  "bars thickness height");
+
index 6a6889eb954ddf7e70f14aa7479cb12770201d61..6203c86b0acfdd846bd758c0def065694e69513c 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "engraver.hh"
 #include "translator-group.hh"
-#include "volta-spanner.hh"
+#include "volta-bracket.hh"
 #include "item.hh"
 #include "note-column.hh"
 #include "bar-line.hh"
@@ -140,7 +140,7 @@ Volta_engraver::create_grobs ()
       started_mom_ = now_mom () ;
 
       volta_span_p_ = new Spanner (get_property ("VoltaBracket"));
-      Volta_spanner::set_interface (volta_span_p_);
+
       announce_grob (volta_span_p_, SCM_EOL);
       volta_span_p_->set_grob_property ("text", start_str_);
     }
@@ -154,14 +154,14 @@ Volta_engraver::acknowledge_grob (Grob_info i)
       if (Note_column::has_interface (item))
        {
          if (volta_span_p_)
-           Volta_spanner::add_column (volta_span_p_,item);
+           Volta_bracket_interface::add_column (volta_span_p_,item);
        }
       if (Bar_line::has_interface (item))
        {
          if (volta_span_p_)
-           Volta_spanner::add_bar (volta_span_p_, item);
+           Volta_bracket_interface::add_bar (volta_span_p_, item);
          if (end_volta_span_p_)
-           Volta_spanner::add_bar (end_volta_span_p_ , item);
+           Volta_bracket_interface::add_bar (end_volta_span_p_ , item);
        }
     }
   else if (Staff_symbol::has_interface (i.grob_l_))
index 87b7e079dea96cd2c10341f5bc08323d4b865212..ac7ea8f94ae326b9e115a11b148806b6d20e9a53 100644 (file)
        (typename (type-name type))
        (desc (object-property sym 'backend-doc)))
 
-    (cons (string-append "@code{" name "} "
+
+    (if (equal? desc #f)
+       (error "Unknown property " sym)
+       
+       (cons (string-append "@code{" name "} "
                       "(" typename ")"
                       ": "
 
 ; index gets too messy
 ;                     "@vindex " name "\n"
-
-
                       )
-         desc)))
+         desc))))
 
 (define (document-grob-property sym grob-description )
+  "Document SYM, filling in default values."
   (let* ((handle (assoc sym grob-description))
         (defval (if (eq? handle #f)
                     "(unset)"
                   (scm->texi (cdr handle))))
         (propdoc (backend-property->texi sym)))
-    
+
     (cons (car propdoc) (string-append (cdr propdoc)
                                           "\nDefault value: "
-                                          defval))))
+                                          defval)))
+  )
 
 (define (document-interface where interface grob-description)
+
   (let* ((level (if (eq? where 'grob) 3 2))
         (name (car interface))
         (desc (cadr interface))
         (props (caddr interface))
-        (docfunc (lambda (x)
+        (docfunc (lambda (pr)
                    (document-grob-property
-                    x grob-description )))
+                    pr grob-description )))
         (docs (map docfunc props)))
 
     (string-append
      (node (interface-name name))
      (document-interface 'self interface '()))))
 
+
 ;; First level grob description
 (define (document-grob iname description)
   (processing iname)
   (let* ((metah (assoc 'meta description))
         
-        (meta (if (pair? metah)
-                  (cdr metah)
-                  '((properties . ()) (name . "huh?"))
-                  ))
-        
+        (meta (cdr metah))
         (name (cdr (assoc 'name meta)))
-        (ifaces (cdr (assoc 'interface-descriptions meta)))
-        (ifacedoc (map (lambda (x)
-                         (document-interface 'grob x description))
-                       (reverse ifaces))))
+        (ifaces (map lookup-interface (cdr (assoc 'interfaces meta))))
+        (ifacedoc (map (lambda (iface)
+                         (document-interface 'grob iface description))
+                       (reverse ifaces)))
+        )
 
+    
     (string-append
      (node (grob-name name))
      (texi-section 2 (grob-name name) #f)
                            (map engraver-name engraver-names)))))
 
            (apply string-append ifacedoc))))
-     
+
+
+
 (define (engraver-makes-grob? name-symbol grav)
   (memq name-symbol (assoc 'grobs-created (Translator::description grav)))
   )
 
 
 (define interface-description-alist
-  (map (lambda (x) (cons (string->symbol x) (eval-string x)))
-            (interface-names)))
+  (hash-fold
+   (lambda (key val prior)
+     (cons (cons key val)  prior)
+     )
+   '() (ly-all-grob-interfaces)))
 
 (set! interface-description-alist (sort interface-description-alist alist<?))
 
+
+;;;;;;;;;; check for dangling backend properties.
+(define (mark-interface-properties entry)
+  (map (lambda (x) (set-object-property! x  'iface-marked #t)) (caddr (cdr entry)))
+  )
+
+(map mark-interface-properties interface-description-alist)
+
+(define (check-dangling-properties prop)
+  (if (not (object-property prop 'iface-marked))
+      (error  "\nDangling property: "  prop))
+  )
+
+(map check-dangling-properties all-backend-properties)
+
+;;;;;;;;;;;;;;;;
+
+(define (lookup-interface name)
+  (let*  (
+         (entry  (hashq-ref (ly-all-grob-interfaces) name #f))
+         )
+
+    (if (equal? entry #f)
+       (error "Unknown interface" name))
+    
+    entry
+))
+
+;(write  (map car  interface-description-alist) (current-error-port))
+;(display  (lookup-interface 'volta-bracket-interface))
+
 (define (document-all-interfaces name)
   (string-append
    (texi-node-menu name (map (lambda (x)
      texi)
   )
   )
-  
+
+;;;;;;;;;;;;;;;;
+
index ac7c071a5b50dfc66649e7158450654a8523cee3..18afa60d6e89b0ba43a850c4322e11952bf0a390 100644 (file)
@@ -31,6 +31,8 @@
 ;; are described...
 (define no-copies #f)
 
+
+
 (let* ((doc (string-append
             (document-music "LilyPond music properties") 
             (document-paper "LilyPond interpretation contexts")
index 5d5fbf938c543db9c927ec1c7f708097a68feb8f..f28a50c4bc4f17ff9e7ae6efd9fbcb2ee80c51ad 100644 (file)
      . (
        (molecule-callback . ,Local_key_item::brew_molecule)
        (X-offset-callbacks . (,Side_position_interface::aligned_side))
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))     
        (after-line-breaking-callback . ,Local_key_item::after_line_breaking)
        (direction . -1)
        (left-padding . 0.2)
        (right-padding . 0.5)
        (paren-cautionaries . #t)
        (font-family . music)
-       (meta . ,(grob-description accidentals-interface font-interface side-position-interface))
+       (meta . ((interfaces . (accidentals-interface staff-symbol-referencer-interface font-interface side-position-interface))))
        ))
 
     (Arpeggio
@@ -35,7 +36,7 @@
        (X-offset-callbacks . (,Side_position_interface::aligned_side))
        (direction . -1)
        (staff-position . 0.0)
-       (meta . ,(grob-description arpeggio-interface side-position-interface font-interface))
+       (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface font-interface))))
        ))
 
     (BarLine
@@ -52,7 +53,7 @@
                        (time-signature . (extra-space . 0.75)) 
                        (custos . (minimum-space . 2.0))
                        (clef .   (minimum-space . 1.0))
-                       (begin-of-note . (extra-space . 1.3))
+                       (first-note . (extra-space . 1.3))
                        ))
 
        ;;
@@ -62,7 +63,7 @@
        (thin-kern . 3.0)
        (hair-thickness . 1.6)
        (thick-thickness . 6.0)
-       (meta . ,(grob-description bar-line-interface font-interface))
+       (meta . ((interfaces . (bar-line-interface font-interface))))
        ))
 
     
        (font-family . roman)
        (font-relative-size . -1)
        (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       (meta . ,(grob-description
-                 side-position-interface
-                 text-interface  font-interface break-aligned-interface))
-       ))
+       (meta .
+             ((interfaces . (side-position-interface
+                             text-interface
+                             font-interface break-aligned-interface))))
+
+            ))
 
     (BassFigure
      . (
@@ -91,7 +94,7 @@
        (padding . 0.1)
        (kern . 0.2)
        (thickness . 1.0)
-       (meta . ,(grob-description text-interface font-interface ))
+       (meta . ((interfaces . (text-interface font-interface))))
        ))
     (Beam
      . (
                               ,Beam::check_concave
                               ,Beam::slope_damping
                               ,Beam::quanting
-                              ))
-       
+                             ))
+
+       ;; TODO: should be in SLT.
        (thickness . 0.48) ; in staff-space
        (before-line-breaking-callback . ,Beam::before_line_breaking)
        (after-line-breaking-callback . (,Beam::after_line_breaking
                                         ,Beam::end_after_line_breaking))
-;      (quant-score-functions . (
-;                                ,Beam::score_stem_lengths
-;                                ))
        (neutral-direction . -1)
        (dir-function . ,beam-dir-majority-median)
        (beamed-stem-shorten . (1.0 0.5))
        (damping . 1)
        (auto-knee-gap . 7)
        (font-name . "cmr10")
-       (meta . ,(grob-description beam-interface))
+       (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface))))
        ))
 
     (BreakAlignment
      . (
        (breakable . #t)
        (stacking-dir . 1)
-       (axes 0)
-       (meta . ,(grob-description
-                 axis-group-interface 
-                 )
-             )
-       ))
+       (axes . (0))
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (meta . ((interfaces . (break-alignment-interface axis-group-interface)))))
+       )
 
     (BreakAlignGroup
      . (
        (axes  . (0))
        (X-offset-callbacks . (,Break_align_interface::alignment_callback))
-
-       (meta . ,(grob-description axis-group-interface))
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (meta . ((interfaces . (break-aligned-interface axis-group-interface))))
        ))
 
     (BreathingSign
      . (
        (break-align-symbol . breathing-sign)
-       (breakable . #t )
+       (breakable . #t)
        (space-alist . (
                        (key-signature . (minimum-space . 1.5))
                        (staff-bar . (minimum-space . 1.5))
                        (clef . (minimum-space . 2.0))
-                       (begin-of-note . (minimum-space . 1.0))
+                       (first-note . (minimum-space . 1.0))
                        ))
        (molecule-callback . ,Text_item::brew_molecule)
        (lookup . name)
        (text . "scripts-rcomma")
        (Y-offset-callbacks . (,Breathing_sign::offset_callback))
        (visibility-lambda . ,begin-of-line-invisible)
-       (meta . ,(grob-description  break-aligned-interface text-interface font-interface))
+       (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface))))
        ))
 
     (Clef
                        (staff-bar . (minimum-space .  3.7))
                        (key-signature . (minimum-space . 4.0))
                        (time-signature . (minimum-space . 4.2))
-                       (begin-of-note . (minimum-space . 5.0))
+                       (first-note . (minimum-space . 5.0))
+                       (next-note . (extra-space . 0.5))                       
                        ))
        (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
-       (meta . ,(grob-description clef-interface font-interface break-aligned-interface ))
+       (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface))))
        ))
 
     (ChordName
        (after-line-breaking-callback . ,Chord_name::after_line_breaking)
        (chord-name-function . ,default-chord-name-function)
        (font-family . roman)
-       (meta . ,(grob-description  font-interface text-interface chord-name-interface))
+       (meta . ((interfaces . (font-interface text-interface chord-name-interface))))
        ))
 
     (Custos
        (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
        (font-family . music)
        (space-alist . (
-                       (begin-of-note . (minimum-space . 0.0))
+                       (first-note . (minimum-space . 0.0))
                        ))
-       (meta . ,(grob-description custos-interface staff-symbol-referencer-interface break-aligned-interface) )
+       (meta . ((interfaces . (custos-interface staff-symbol-referencer-interface break-aligned-interface))))
        ))
 
 
     (DotColumn
      . (
-       (axes 0)
+       (axes . (0))
        (direction . 1)
        (X-extent-callback . ,Axis_group_interface::group_extent_callback)
-
        (X-offset-callbacks . (,Dot_column::side_position))
-       (meta . ,(grob-description dot-column-interface axis-group-interface))
+       (meta . ((interfaces . (dot-column-interface axis-group-interface))))
        ))
 
     (Dots
        (dot-count . 1)
        (staff-position . 0.0)
        (Y-offset-callbacks  . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
-       (meta . ,(grob-description  font-interface dots-interface ))
+       (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface))))
        ))
 
     (DoublePercentRepeat .
                          (thickness . 0.48)
                          (break-align-symbol . staff-bar)
                          (visibility-lambda . ,begin-of-line-invisible)
-                         (meta . ,(grob-description font-interface percent-repeat-interface))
-                         ))
+                         (meta . ((interfaces . (font-interface percent-repeat-interface))))
+                        ))
 
     (DynamicText
      . (
        (font-family . dynamic)
        (font-shape . italic)
        (self-alignment-Y . 0)
-       (meta . ,(grob-description font-interface text-interface dynamic-interface))
+       (meta . ((interfaces . (font-interface text-interface dynamic-interface))))
        ))
 
     (DynamicLineSpanner
      . (
-       (axes . ( 1))
+       (axes . (1))
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       
        (padding . 0.6)
        (minimum-space . 1.2)
        (direction . -1)
-       (meta . ,(grob-description dynamic-interface axis-group-interface side-position-interface))
+       (meta . ((interfaces . (dynamic-interface axis-group-interface side-position-interface))))
        ))
 
     (LeftEdge
                        (staff-bar . (extra-space . 0.0))
                        (breathing-sign . (minimum-space  . 0.0))
                        (clef . (extra-space . 1.0))
-                       (begin-of-note . (extra-space . 0.0))
+                       (first-note . (extra-space . 0.0))
                        (key-signature . (extra-space . 0.0))
                        ))
-       (meta . ,(grob-description break-aligned-interface))
+       (meta . ((interfaces . (break-aligned-interface))))
        ))
 
     (Fingering
        (font-family . number)
        (font-relative-size . -3)
        (font-shape . upright)
-       (meta . ,(grob-description finger-interface  font-interface
-                                  text-script-interface text-interface side-position-interface))
+       (meta . ((interfaces . (finger-interface font-interface text-script-interface text-interface side-position-interface))))
        ))
 
 
      . (
        (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
        (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
-       (axes 1)
-       (meta . ,(grob-description axis-group-interface hara-kiri-group-interface))
+       (axes . (1))
+       (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface))))
        ))
 
     (Hairpin
        (dash-length . 4.0)
        (self-alignment-Y . 0)
        (Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
-       (meta . ,(grob-description hairpin-interface dynamic-interface))
+       (meta . ((interfaces . (hairpin-interface dynamic-interface))))
        ))
 
     (InstrumentName
        (visibility-lambda . ,begin-of-line-visible)
        (baseline-skip . 2)
        (font-family . roman)
-       (meta . ,(grob-description  font-interface  text-interface break-aligned-interface))
+       (meta . ((interfaces . (font-interface side-position-interface text-interface break-aligned-interface))))
        ))
 
     (KeySignature
        (space-alist . (
                        (time-signature . (extra-space . 1.25))
                        (staff-bar .  (extra-space . 1.1))
-                       (begin-of-note . (extra-space . 2.5))
+                       (first-note . (extra-space . 2.5))
                        ))
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
        (break-align-symbol . key-signature)
        (visibility-lambda . ,begin-of-line-visible)
        (breakable . #t)
-       (meta . ,(grob-description key-signature-interface  font-interface  break-aligned-interface))
+       (meta . ((interfaces . (key-signature-interface  font-interface  break-aligned-interface))))
        ))
 
 
        (maximum-length .  100)
        (molecule-callback . ,Hyphen_spanner::brew_molecule)
        (Y-extent-callback . ,Grob::point_dimension_callback)
-       (meta . ,(grob-description lyric-hyphen-interface ))
+       (meta . ((interfaces . (lyric-hyphen-interface))))
        ))
 
     (LyricExtender
        (height . 0.8) ; stafflinethickness;
        (right-trim-amount . 0.5)
        (Y-extent-callback . ,Grob::point_dimension_callback)
-       (meta . ,(grob-description  lyric-extender-interface))
+       (meta . ((interfaces . (lyric-extender-interface))))
        ))
 
     (LyricText
        (end-alignment . 2)
        (font-family . roman)
        (font-shape . upright)
-       (meta . ,(grob-description lyric-syllable-interface text-interface font-interface ))
+       ;; duh, side-position-interface?
+       (meta . ((interfaces . (lyric-syllable-interface side-position-interface text-interface font-interface))))
        ))
 
     (Porrectus
        (style . mensural)
        (auto-properties . #f)
        (solid . #f)
-       (porrectus-width . 2.4)
-       (line-thickness . 1.0)
+       (width . 2.4)
+       (thickness . 1.0)
        (add-stem . #t)
-       (stem-direction . 1)
+       (direction . 1)
        (molecule-callback . ,Porrectus::brew_molecule)
-       (meta . ,(grob-description porrectus-interface))
+       (meta . ((interfaces . (porrectus-interface))))
        ))
 
     (RehearsalMark
        (font-relative-size . 1)
        (visibility-lambda . ,end-of-line-invisible)
        (padding . 0.8)
-       (meta . ,(grob-description  mark-interface side-position-interface))
+       (meta . ((interfaces . (text-interface font-interface mark-interface side-position-interface))))
        ))
 
     (MultiMeasureRest
        (minimum-width . 12.5) ; staffspace
        (font-family . number)
        (font-relative-size . 1)
-       (meta . ,(grob-description multi-measure-rest-interface rest-interface font-interface ))
+       (meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface))))
        ))
 
     (NoteCollision
      . (
-       (axes 0 1)
+       (axes . (0 1))
        ;; Ugh, should not be hard-coded. 
        (note-width . 1.321)
-       (meta . ,(grob-description
-                 note-collision-interface axis-group-interface
-                 ))
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       (meta . ((interfaces . (note-collision-interface axis-group-interface))))
        ))
 
     (NoteColumn
      . (
        (axes . (0 1))
-       (meta . ,(grob-description axis-group-interface note-column-interface))
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       (meta . ((interfaces . (axis-group-interface note-column-interface))))
        ))
 
     (NoteHead
        (molecule-callback . ,Note_head::brew_molecule)
        (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
        (stem-attachment-function . ,note-head-style->attachment-coordinates)
-       (meta . ,(grob-description rhythmic-head-interface font-interface note-head-interface))
+       (meta . ((interfaces . (rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface))))
        ))
 
     (Glissando
        (X-extent-callback . #f)
        (Y-extent-callback . #f)                         
        (molecule-callback . ,Line_spanner::brew_molecule)
-       (meta . ,(grob-description line-spanner-interface))
+       (meta . ((interfaces . (line-spanner-interface))))
        ))
 
     (VoiceFollower
        (X-extent-callback . #f)
        (Y-extent-callback . #f)                         
        (molecule-callback . ,Line_spanner::brew_molecule)
-       (meta . ,(grob-description line-spanner-interface))
+       (meta . ((interfaces . (line-spanner-interface))))
        ))
 
     (NoteName
      . (
        (molecule-callback . ,Text_item::brew_molecule)
        (font-family . roman)
-       (meta . ,(grob-description note-name-interface font-interface))
+       (meta . ((interfaces . (note-name-interface text-interface font-interface))))
        ))
 
     (OctavateEight
        (molecule-callback . ,Text_item::brew_molecule)
        (font-shape . italic)
        (font-family . roman)
-       (meta . ,(grob-description text-interface font-interface ))
+       (meta . ((interfaces . (text-interface side-position-interface font-interface))))
        ))
 
     (PaperColumn
      . (
-       (axes 0)
-                                       ;               (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8")
-       (meta . ,(grob-description paper-column-interface axis-group-interface spaceable-element-interface))
+       (axes . (0))
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+
+;              (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
+       (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface))))
        ))
 
     (PhrasingSlur
        (after-line-breaking-callback . ,Slur::after_line_breaking)
        (extremity-rules . ,default-slur-extremity-rules)
        (extremity-offset-alist . ,default-phrasing-slur-extremity-offset-alist)
-       (de-uglify-parameters . ( 1.5  0.8  -2.0))
+       (de-uglify-parameters . (1.5  0.8  -2.0))
        (Y-extent-callback . ,Slur::height)
        (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
                    (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
        (attachment . (#f . #f))
        (attachment-offset . ((0 . 0) . (0 . 0)))
        (slope-limit . 0.8)
-       (meta . ,(grob-description slur-interface))
+       (meta . ((interfaces . (slur-interface))))
        ))
 
     (NonMusicalPaperColumn
      . (
-       (axes 0)
-                                       ;       (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8")
-       (meta . ,(grob-description paper-column-interface
-                                  axis-group-interface spaceable-element-interface))
+       (axes . (0))
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+
+       ;; debugging stuff: print column number.
+;      (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
+
+
+       (meta .  ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface))))
        ))
 
     (PercentRepeat
        (thickness . 0.48)
        (minimum-width . 12.5) ; staffspace
        (font-family . music)
-       (meta . ,(grob-description multi-measure-rest-interface  font-interface percent-repeat-interface))
+       (meta . ((interfaces . (multi-measure-rest-interface  font-interface percent-repeat-interface))))
        ))
 
     (PianoPedalBracket   ;; an example of a text spanner
        (edge-height . (1.0 . 1.0))
        (shorten-pair . (0.0 . 0.0))
        (thickness .  1.0)
-       (meta . ,(grob-description piano-pedal-interface))
+       (meta . ((interfaces . (piano-pedal-interface))))
        ))
 
     (RepeatSlash
        (molecule-callback . , Percent_repeat_item_interface::beat_slash)
        (thickness . 0.48)
        (slope . 1.7)
-       (meta . ,(grob-description percent-repeat-interface))
+       (meta . ((interfaces . (percent-repeat-interface))))
        ))
     (Rest
      . (
        (molecule-callback . ,Rest::brew_molecule)
        (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) 
        (minimum-beam-collision-distance . 1.5)
-       (meta . ,(grob-description  
-                 rhythmic-head-interface
-                 staff-symbol-referencer-interface
-                 rest-interface))
-       ))
+       (meta . (
+                (interfaces . (font-interface
+                               rhythmic-head-interface
+                               staff-symbol-referencer-interface
+                               rest-interface))
+               ))))
 
     (RestCollision
      . (
        (minimum-distance . 0.75)
-       (meta . ,(grob-description rest-collision-interface ))
+       (meta . ((interfaces . (rest-collision-interface))))
        ))
 
     (Script
        (X-offset-callbacks . (,Side_position_interface::centered_on_parent))
        (before-line-breaking-callback . ,Script::before_line_breaking)
        (font-family . music)
-       (meta . ,(grob-description script-interface side-position-interface font-interface))
+       (meta . ((interfaces . (script-interface side-position-interface font-interface))))
        ))
 
     (ScriptColumn
      . (
        (before-line-breaking-callback . ,Script_column::before_line_breaking)
-       (meta . ,(grob-description script-column-interface))
+       (meta . ((interfaces . (script-column-interface))))
        ))
 
     (Slur
        (after-line-breaking-callback . ,Slur::after_line_breaking)
        (extremity-rules . ,default-slur-extremity-rules)
        (extremity-offset-alist . ,default-slur-extremity-offset-alist)
-       (de-uglify-parameters . ( 1.5  0.8  -2.0))
+       (de-uglify-parameters . (1.5  0.8  -2.0))
        (Y-extent-callback . ,Slur::height)
        (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
                    (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
        (attachment . (#f . #f))
        (attachment-offset . ((0 . 0) . (0 . 0)))
        (slope-limit . 0.8)
-       (meta . ,(grob-description slur-interface))
+       (meta . ((interfaces . (slur-interface))))
        ))
 
     (SpacingSpanner
        (shortest-duration-space . 2.0)
        (spacing-increment . 1.2)
        
-       (X-extent-callback . #f)
-       (Y-extent-callback . #f)
-
 
-       (meta . ,(grob-description  spacing-spanner-interface))
+       (meta . ((interfaces . (spacing-spanner-interface))))
        ))
 
     (SpanBar
        (molecule-callback . ,Span_bar::brew_molecule)
        (visibility-lambda . ,begin-of-line-invisible)
        (X-extent-callback . ,Span_bar::width_callback)
+       (Y-extent-callback . ())
        (breakable . #t)
        (glyph . "|")
        (before-line-breaking-callback . ,Span_bar::before_line_breaking)
        (thin-kern . 3.0)
        (hair-thickness . 1.6)
        (thick-thickness . 6.0)
-       (meta . ,(grob-description span-bar-interface bar-line-interface ))
+       (meta . ((interfaces . (span-bar-interface bar-line-interface))))
        ))
 
     (StanzaNumber
        (break-align-symbol . clef)
        (visibility-lambda . ,begin-of-line-visible)
        (font-family . roman)
-       (meta . ,(grob-description break-aligned-interface text-interface font-interface))              
+       (meta . ((interfaces . (break-aligned-interface text-interface font-interface))))               
        ))
 
     (StaffSpacing
      . (
        (breakable . #t)
-       (X-extent-callback . #f)
        (stem-spacing-correction . 0.4)
-       (Y-extent-callback . #f)
-       (meta . ,(grob-description staff-spacing-interface))
+       (meta . ((interfaces . (staff-spacing-interface))))
        ))
     (NoteSpacing
      . (
-       (X-extent-callback . #f)
-       (Y-extent-callback . #f)
        (stem-spacing-correction . 0.5)
        (space-factor . 1.0)
-       (meta . ,(grob-description note-spacing-interface))
+       (meta . ((interfaces . (note-spacing-interface))))
        ))
 
     (StaffSymbol
        (staff-space . 1.0)
        (line-count . 5)
        (layer . 0)
-       (meta . ,(grob-description staff-symbol-interface ))
+       (meta . ((interfaces . (staff-symbol-interface))))
        ))
 
     (SostenutoPedal
        (font-family . roman)
        (font-shape . italic)
        (self-alignment-X . 0)
-       (meta . ,(grob-description text-interface  font-interface))
+       (meta . ((interfaces . (text-interface  font-interface))))
        ))
 
     (SostenutoPedalLineSpanner 
      . (
-       (axes . ( 1))
+       (axes . (1))
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+
        (padding . 1.2)
        (minimum-space . 1.0)
        (direction . -1)
-       (meta . ,(grob-description piano-pedal-interface axis-group-interface side-position-interface))
+       (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface))))
        ))
        
     (Stem
        (X-offset-callbacks . (,Stem::off_callback))
        (X-extent-callback . ,Stem::dim_callback)       
        (Y-extent-callback . ,Stem::height)
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
        (adjust-if-on-staffline . #t)
        (font-family . music)      
-       (meta . ,(grob-description stem-interface  font-interface))
+       (meta . ((interfaces . (stem-interface  font-interface))))
        ))
 
     (StemTremolo
 
        (beam-width . 2.0) ; staff-space
        (beam-thickness . 0.48) ; staff-space
-       (meta . ,(grob-description stem-tremolo-interface ))
+       (meta . ((interfaces . (stem-tremolo-interface))))
        ))
 
     (SeparationItem
      . (
-       (meta . ,(grob-description separation-item-interface ))
+       (meta . ((interfaces . (separation-item-interface))))
        ))
 
     (SeparatingGroupSpanner
      . (
        (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
-       (meta . ,(grob-description separation-spanner-interface))
+       (meta . ((interfaces . (separation-spanner-interface))))
        ))
 
     (SustainPedal
        (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
        (pedal-type . text)
        (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
-       (meta . ,(grob-description piano-pedal-interface side-position-interface font-interface))
+       (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface side-position-interface font-interface))))
        ))
 
     (SustainPedalLineSpanner 
      . (
-       (axes . ( 1))
+       (axes . (1))
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       
        (padding . 1.2)
        (minimum-space . 1.0)
        (direction . -1)
-       (meta . ,(grob-description piano-pedal-interface axis-group-interface side-position-interface))
+       (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface))))
        ))
 
     (System
      . (
        (axes . (0 1))
-       (meta . ,(grob-description  line-of-score-interface axis-group-interface))
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       (meta . ((interfaces . (system-interface axis-group-interface))))
        ))
 
     (SystemStartBrace
        (collapse-height . 5.0)
        (font-family . braces)
        (Y-extent-callback . #f)
-       (meta . ,(grob-description system-start-delimiter-interface font-interface))
+       (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
        ))
 
     (SystemStartBracket
        (arch-width . 1.5)
        (bracket-collapse-height . 1)
        (thickness . 0.25)
-       (meta . ,(grob-description system-start-delimiter-interface ))
+       (meta . ((interfaces . (system-start-delimiter-interface))))
        ))
 
     (SystemStartBar
        (glyph . "bar-line")
        (thickness . 1.6)
        (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
-       (meta . ,(grob-description system-start-delimiter-interface ))
+       (meta . ((interfaces . (system-start-delimiter-interface))))
        ))
 
     (TextScript
        ;; todo: add X self alignment?
        (baseline-skip . 2)
        (font-family . roman)
-       (meta . ,(grob-description text-script-interface text-interface side-position-interface font-interface ))
+       (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface))))
        ))
 
     (TextSpanner
        (width-correct . -1)
 
        (direction . 1)
-       (meta . ,(grob-description text-spanner-interface  font-interface))             
+       (meta . ((interfaces . (text-spanner-interface  font-interface))))              
        ))
 
     (Tie
        (x-gap . 0.2)
        (y-offset . 0.6)
        (minimum-length  . 2.5)
-       (meta . ,(grob-description tie-interface ))
+       (meta . ((interfaces . (tie-interface))))
        ))
 
     (TieColumn
      . (
        (after-line-breaking-callback . ,Tie_column::after_line_breaking)
-       (meta . ,(grob-description tie-column-interface ))
+       (X-extent-callback . ())
+       (Yoo-extent-callback . ())      
+       (meta . ((interfaces . (tie-column-interface))))
        ))
 
     (TimeSignature
        (break-align-symbol . time-signature)
        (visibility-lambda . ,all-visible)
        (space-alist . (
-                       (begin-of-note . (extra-space . 2.0))
+                       (first-note . (extra-space . 2.0))
                        (staff-bar .  (minimum-space . 2.0))
                        ))
        (breakable . #t)
        (style . C)
        (font-family . number)
-       (meta . ,(grob-description time-signature-interface  font-interface))
+       (meta . ((interfaces . (time-signature-interface  font-interface))))
        ))
 
     (TupletBracket
        (font-family . roman)
        (font-shape . italic)
        (font-relative-size . -1)
-       (meta .  ,(grob-description text-interface
-                                   tuplet-bracket-interface font-interface))
+       (meta .  ((interfaces . (text-interface tuplet-bracket-interface font-interface))))
        ))
 
     (UnaCordaPedal
        (pedal-type . text)
        (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
        (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
-       (meta . ,(grob-description text-interface font-interface))
+       (meta . ((interfaces . (text-interface font-interface))))
        ))
 
     (UnaCordaPedalLineSpanner 
      . (
-       (axes . ( 1))
+       (axes . (1))
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
        (padding . 1.2)
        (minimum-space . 1.0)
        (direction . -1)
-       (meta . ,(grob-description piano-pedal-interface axis-group-interface side-position-interface))
+       (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface))))
        ))
 
     (VoltaBracket
      . (
-       (molecule-callback . ,Volta_spanner::brew_molecule)
+       (molecule-callback . ,Volta_bracket_interface::brew_molecule)
        (direction . 1)
        (padding . 1)
        (font-style . volta)
        (minimum-space . 5)
        (font-family . number)
        (font-relative-size . -2)
-       (meta . ,(grob-description volta-bracket-interface side-position-interface font-interface))
+       (meta . ((interfaces . (volta-bracket-interface text-interface side-position-interface font-interface))))
        ))
     
     (VerticalAlignment
      . (
-       (axes 1)
+       (axes . (1))
        (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
-       (X-extent-callback . #f)
        (stacking-dir . -1)
-       (meta . ,(grob-description align-interface axis-group-interface))
+       (meta . ((interfaces . (align-interface axis-group-interface))))
        ))
 
     (VerticalAxisGroup
      . (
-       (axes 1)
-       (meta . ,(grob-description axis-group-interface))
+       (axes . (1))
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       
+       (meta . ((interfaces . (axis-group-interface))))
        ))
-    )
 )
+   )
+ )
 
 
 
 (define (completize-grob-entry x)
   "transplant assoc key into 'name entry of 'meta of X
 "
-  (let* ((name-sym  (car x))
-        (entry (cdr x))
-        (metaentry (cdr (assoc 'meta entry)))
-        (new-metaentry (assoc-set! metaentry 'name name-sym))
-        )
 
-    (cons name-sym (assoc-set! entry 'meta new-metaentry))
-    ))
+  (let* ((name-sym  (car x))
+        (grob-entry (cdr x))
+        (metaentry (cdr (assoc 'meta grob-entry)))
+        (ifaces-entry
+         (cdr (assoc 'interfaces metaentry)))
+
+       )
+    (set! metaentry (assoc-set! metaentry 'name name-sym))
+    (set! metaentry (assoc-set! metaentry 'interfaces
+                               (cons 'grob-interface ifaces-entry)))
+    (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
+    (cons name-sym grob-entry)))
 
 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
 
index 9b7c43bcf8ac75398254bcae847019d0ffc5eb59..cb86a25200c2b4921626225c534acd17db2c3c8e 100644 (file)
@@ -69,19 +69,14 @@ In the case of alignment grobs, this should contain only one number.")
 (grob-property-description 'beam ly-grob? "pointer to the beam, if applicable.")
 (grob-property-description 'beam-thickness number? "thickness, measured in staffspace.")
 (grob-property-description 'beam-width number? "width of the tremolo sign.")
-(grob-property-description 'beamAuto boolean? "enable autobeaming?.")
 (grob-property-description 'beamed-lengths list? "list of stem lengths given beam multiplicity .")
 (grob-property-description 'beamed-minimum-lengths list? "list of minimum stem lengths given beam multiplicity.")
 (grob-property-description 'beamed-stem-shorten number? "shorten beamed stems in forced direction.")
 (grob-property-description 'beaming number-pair? "number of beams extending to left and right.")
-(grob-property-description 'beams list? "list of beam ptrs.")
 (grob-property-description 'beautiful number? "number that dictates when a slur should be de-uglyfied.  It correlates with the enclosed area between noteheads and slurs.  A value of 0.1 yields only undisturbed slurs, a value of 5 will tolerate quite high blown slurs.")
-(grob-property-description 'before-grace-spacing-factor number? " stretch space this much if there are grace notes before the column.")
 (grob-property-description 'before-line-breaking-callback procedure? "Procedure taking grob as argument.
 This procedure is called (using dependency resolution) before line breaking, but after generating discretionary items. Return value is ignored.")
-(grob-property-description 'before-musical-spacing-factor number? "space before musical columns (eg. taken by accidentals) get this much
-stretched when they follow a musical column, in absence of grace
-notes.  0.0 means no extra space (accidentals are ignored).")
+(grob-property-description 'between-cols pair? "Where to attach a loose column to")
 (grob-property-description 'between-system-string string? "string
  to dump between two systems. Useful for forcing pagebreaks.")
 (grob-property-description 'bounded-by-me list? "list of spanners that have this
@@ -104,9 +99,7 @@ square of the inner notes involved.")
 (grob-property-description 'bar-line-collapse-height number? "Minimum height of system start delimiter bar-line glyphs.  If equal or smaller, the bar-line is removed.")
 (grob-property-description 'brace-collapse-height number? "Minimum height of system start delimiter brace glyphs.  If equal or smaller, the brace is removed.")
 (grob-property-description 'bracket-collapse-height number? "Minimum height of system start delimiter bracket glyphs.  If equal or smaller, the bracket is removed.")
-(grob-property-description 'column-space-strength number? "relative strength of space following breakable columns (eg. prefatory matter).")
 (grob-property-description 'columns list? "list of grobs, typically containing paper-columns, list of note-columns.")
-(grob-property-description 'contains-grace boolean? "Used to widen entries for grace notes.")
 (grob-property-description 'control-points list? "List of 4 offsets (number-pairs) that form control points for the  tie/slur shape.")
 (grob-property-description 'damping integer? "amount of beam slope damping should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams .")
 (grob-property-description 'dash-length number? "the length of a dash.")
@@ -134,13 +127,12 @@ mean centre distance weighted per note
 @end table
 
 ")
-(grob-property-description 'dir-list list? "list of stem directions, needed for optical spacing correction.")
 (grob-property-description 'direction dir? "up or down, left or right?.")
 (grob-property-description 'direction-source ly-grob? "in case side-relative-direction is set, which grob  to get the direction from .")
 (grob-property-description 'dot ly-grob? "reference to Dots object.")
 (grob-property-description 'dot-count integer? "number of dots.")
 (grob-property-description 'duration-log integer? "2-log of the notehead duration, i.e. 0=whole note, 1 = half note, etc.")
-(grob-property-description 'dy number? "set by beam: vertical travel height")
+
 (grob-property-description 'edge-height pair? "a cons that specifies the heights of the vertical edges '(LEFT-height . RIGHT-height).")
 (grob-property-description 'edge-width pair? "a cons that specifies the widths of the slanted edges '(LEFT-width . RIGHT-width).")
 (grob-property-description 'edge-text pair? "a cons that specifies the texts to be set at the edges '(LEFT-text . RIGHT-text).")
@@ -199,7 +191,6 @@ FIXME: in Tie this is a pair of grob pointers, pointing to the two heads of the
 .")
 (grob-property-description 'height number? "in staffspace.")
 (grob-property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting. This is used by @ref{note-collision-interface}.")
-(grob-property-description 'horizontal-space number? "amount of space to add after a note (in staff-space).")
 (grob-property-description 'ideal-distances list? "(OBJ . (DIST . STRENGTH)) pairs.")
 (grob-property-description 'interfaces list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.")
 (grob-property-description 'inversion list? " musical-pitch, optional.")
@@ -213,6 +204,9 @@ For barline, space after a thick line.")
 (grob-property-description 'layer number? "The output layer [0..2].  The default is 1.")
 
 (grob-property-description 'left-padding number? "space left of accs.")
+(grob-property-description 'right-head ly-grob? "")
+(grob-property-description 'left-head ly-grob? "")
+
 (grob-property-description 'left-widen boolean? "Whether the left edge of a piano pedal bracket should be widened by the first element of edge-width.")
 
 (grob-property-description 'length number? "Stem length for unbeamed stems, only for user override.")
@@ -223,10 +217,8 @@ use @code{\outputproperty}. @code{\property .. \override} will not
 work: @code{\override} is processed after the StaffSymbol is created,
 and will have no effect.
 ")
-(grob-property-description 'line-thickness number? "the thickness[stafflinethickness] of the line.")
 (grob-property-description 'lookup symbol? "lookup method: 'value for plain text, 'name for character-name.")
 (grob-property-description 'magnify number? "the magnification factor.  FIXME: doesn't work for feta fonts.")
-(grob-property-description 'maximum-duration-for-spacing moment? "space as if a duration of this type is available in this measure.")
 (grob-property-description 'maximum-length number? "don't make Grob longer than this")
 (grob-property-description 'maximum-rest-count integer? "kill off rests so we don't more than this number left.")
 (grob-property-description 'measure-count integer? "number of measures for a multimeasure rest.")
@@ -263,13 +255,7 @@ FIXME: also pair? (cons LEFT RIGHT)
 (grob-property-description 'note-heads list? "List of note head grobs")
 (grob-property-description 'number-gap number? "size of the gap for tohe number in a tuplet.")
 (grob-property-description 'old-accidentals list? "list of (pitch, accidental) pairs.")
-(grob-property-description 'origin ly-input-location? "location in input file of the definition.")
-(grob-property-description 'outer-stem-length-limit number? "catch
-suspect beam slopes, set slope to zero if outer stem is lengthened
-more than this (in staffspace).")
-
 (grob-property-description 'padding number? "add this much extra space between objects that are next to each other.")
-(grob-property-description 'parallel-beam boolean? "internal: true if there is a beam just as wide as the bracket .")
 (grob-property-description 'paren-cautionaries boolean? "Whether to add parenthesis around cautionary accidentals.")
 (grob-property-description 'pedal-type symbol? "Style of piano pedal: text, bracket or mixed.")
 (grob-property-description 'penalty number? "Penalty for breaking at
@@ -278,7 +264,6 @@ means force linebreak.  Other values influence linebreaking decisions
 as a real penalty.")
 
 (grob-property-description 'pitches list? "list of musical-pitch.")
-(grob-property-description 'porrectus-width number? "width of the porrectus ligature measured in staff space.")
 (grob-property-description 'positions pair? "cons of staff positions (LEFT . RIGHT")
 (grob-property-description 'raise number? "height for text to be raised (a negative value lowers the text.")
 (grob-property-description 'right-padding number? "space right of accs.")
@@ -309,7 +294,6 @@ TODO: revise typing.")
 spacing tuples: format = (SYMBOL . (TYPE . DISTANCE)), where TYPE can be
 minimum-space or extra-space.")
 
-(grob-property-description 'space-factor number? "Scale horizontal spacing up by this amount.")
 (grob-property-description 'spacing-procedure procedure? "procedure
 taking grob as argument. This is called after
 before-line-breaking-callback, but before the actual line breaking
@@ -324,16 +308,11 @@ itself.  Return value is ignored.")
 does the stem attach to the notehead? Function takes a symbol argument
 being the style. It returns a (X . Y) pair, specifying location in
 terms of note head bounding box.")
-(grob-property-description 'stem-direction dir? "up or down?.
-
-[docme: why not direction]
-")
 (grob-property-description 'stem-end-position number? "Where does the stem end (the end is opposite to the support-head.")
-(grob-property-description 'stem-length number? "length of stem.")
+
 (grob-property-description 'stem-shorten list? "shorten stems in forced directions given flag multiplicity.")
 (grob-property-description 'stem-spacing-correction number? "optical correction amount.  [TODO: doco] ")
 (grob-property-description 'stems list? "list of stem objects, corresponding to the notes that the arpeggio has to be before.")
-(grob-property-description 'stretch-distance number-pair? "pair of distances.")
 (grob-property-description 'style symbol? "a string determining what style of  glyph is typeset. Valid choices depend on the function that is reading this property. .")
 (grob-property-description 'support-head ly-grob? "the note head at
 one end of the stem.")
@@ -421,11 +400,10 @@ Like @code{tuplet-bracket-visibility}, but for the number.")
 (grob-property-description 'ignore-length-mismatch boolean? "if #t, stanzas with shorter lyrics can be moved away from their respective note-head by the lyric alignment code.")
 (grob-property-description 'begin-alignment number? "proportion of lyric length from beginning to align with note-head for left-aligned lyrics.")
 (grob-property-description 'end-alignment number? "proportion of lyric length from end to align with note-head for right-aligned lyrics.")
+(grob-property-description 'width number? "width of a grob measured in staff space.")
 (grob-property-description 'x-gap number? "horizontal gap between notehead and tie.")
 (grob-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems.")
 (grob-property-description 'y-offset number? "extra vertical offset for ties away from the center line.")
-(grob-property-description 'y number? "set by beam: position of left edge.")
-
 
 ;;;;;;;;;;;;;;;;;;;;
 ;;;;;;;;;;;;;;;; INTERNAL
@@ -454,7 +432,7 @@ columns.
 (grob-property-description 'accidentals-grob ly-grob? "accidentals for this note.")
 
 (grob-property-description 'causes list? "list of cause objects.")
-(grob-property-description 'tremolo-flags number? "")
+(grob-property-description 'flag-count number? "")
 (grob-property-description 'chord-tremolo boolean? "if set, this beam is a tremolo. TODO: use interface for this!")
 (grob-property-description 'chord pair? "?")
 (grob-property-description 'begin-of-line-visible boolean? "?")
index 3e765fa1ea61793470765da10a508191ccd593ac..9af686f69f6d9192fc03f56f738492e6b13d55b3 100644 (file)
 
 ; should include default value?
 
-
-;;; FIXME: naming.
-;;; Score elements are called `objects' now and then, which gets
-;;; rather confusing, we now have `elements', `items', `spanners'
-;;; and `objects'.
-
-
-;;; TODO: this should be done through C++ macros, in order to have
-;;; tighter coupling between the C++ and its doco.
-
-(define all-interfaces '())
-
-(define (lily-interface symbol description props)
-  (set! all-interfaces (acons symbol (list symbol
-                                          description
-                                          props) all-interfaces)
-       )
-  )
-
-(define (grob-description . interfaces)
-  (let* ((ifs (cons grob-interface interfaces))
-        (props (map caddr ifs))
-                                       ;        (prop-typep-pairs (map (lambda (x) (cons (car x) (cadr x)))
-                                       ;                                       (apply append props)))
-        (syms (map car ifs))
-        )
-    (list (cons 'separator "\n\n\n")   ;easy printing.
-         (cons 'interfaces syms)
-         (cons 'interface-descriptions ifs)
-                                       ; (cons 'interface-descriptions (cadr merged))
-         ;; description of the grob itself?
-                                       ;         (cons 'properties prop-typep-pairs)
-         )))
-
-
-(lily-interface
- 'grob-interface
- "All grobs support this"
- '(
-   X-offset-callbacks 
-   Y-offset-callbacks 
-   X-extent-callback 
-   Y-extent-callback
-   molecule-callback
-   font-relative-size 
-   extra-offset 
-   interfaces  
-   dependencies 
-   no-spacing-rods 
-   extra-extent-X 
-   extra-extent-Y 
-   minimum-extent-X 
-   minimum-extent-Y 
-   origin 
-   transparent 
-   ))
-
-
-(lily-interface
- 'beam-interface
- "A beam.
-
-#'thickness= weight of beams, in staffspace
-  "
- '(auto-knee-gap
-   beamed-stem-shorten 
-   damping 
-   flag-width-function 
-   neutral-direction 
-   outer-stem-length-limit 
-   positions
-   slope-limit 
-   thickness 
-   )
- )
-
-(lily-interface
- 'staff-spacing-interface
- ""
- '(
-   ))
-
-(lily-interface
- 'note-spacing-interface
- ""
- '(
-   ))
-
-(lily-interface
- 'clef-interface
- "A clef sign"
- '(
-   non-default 
-   full-size-change 
-   glyph 
-   ))
-
-
-
-(lily-interface
- 'axis-group-interface
- "a group of coupled grobs"
- '(
-   axes 
-   ))
-
-
-(lily-interface
- 'note-column-interface
- "Stem and noteheads combined"
- '(
-   note-heads
-   horizontal-shift 
-   force-hshift 
-   ))
-
-
-(lily-interface
- 'stem-interface
- "A stem"
- '(
-   thickness 
-   beamed-lengths 
-   beamed-minimum-lengths 
-   lengths 
-   beam 
-   stem-shorten 
-   duration-log 
-   beaming 
-   neutral-direction 
-   stem-end-position 
-   support-head 
-   heads 
-   direction 
-   length 
-   style 
-   flag-style 
-   dir-forced 
-   ))
-
-
-
-(lily-interface
- 'slur-interface
- "A slur"
- '(
-   de-uglify-parameters 
-   details 
-   attachment 
-   direction 
-   attachment-offset 
-   beautiful 
-   y-free 
-   control-points 
-   extremity-rules  
-   extremity-offset-alist 
-   thickness 
-   dashed 
-
-   )
- )
-
-
-
-(lily-interface
- 'side-position-interface
- "Position a victim object (this one) next to other objects (the support).
-#'direction = where to put the victim object (left or right?)
-"
- '(
-   side-support-elements 
-   direction-source 
-   direction 
-   side-relative-direction 
-   minimum-space 
-   padding 
-   self-alignment-X 
-   self-alignment-Y 
-   
-   )
- )
-
-
-(lily-interface
- 'accidentals-interface
- "Accidentals"
- '(accidentals
-   left-padding 
-   right-padding
-   paren-cautionaries
-   cautionary-size
-   ))
-
-
-
-(lily-interface
- 'line-of-score-interface
- "Super grob, parent of all:
-
-The columns of a score that form one line.  The toplevel grob.  Any
-grob has a Line_of_score as both X and Y reference point. The
-Paper_score contains one grob of this type. Control enters the
-Grob dependency calculation from this single Line_of_score
-object."
- '(
-   between-system-string 
-   spacing-procedure 
-   before-line-breaking-callback
-   after-line-breaking-callback 
-   all-elements 
-   columns 
-   ))
-
-
-(lily-interface
- 'note-head-interface
- "Note head"
- '( style stem-attachment-function ))
-
-
-(lily-interface
- 'note-name-interface
+(ly-add-interface
+'note-name-interface
  "Note name"
- '( style ))
-
-
-
-(lily-interface
- 'rhythmic-head-interface
- "Note head or rest"
- '(
-   dot 
-   stem 
-   duration-log 
-   ))
-
-
-(lily-interface
- 'rest-interface
- "a rest"
- '(style ))
-
-
-(lily-interface
- 'tuplet-bracket-interface
- "A bracket with a number in the middle, used for tuplets." 
- '(
-   columns 
-   number-gap 
-   delta-y 
-   tuplet-bracket-visibility 
-   tuplet-number-visibility 
-   thick 
-   direction
-   ))
-
-
-(lily-interface
- 'align-interface
- " Order grobs top to bottom/left to right/right to left etc."
- '(
-   stacking-dir  
-   align-dir  
-   threshold  
-   alignment-done  
-   center-element 
-   elements  
-   axes  
-   ))
-
-
-(lily-interface
- 'aligned-interface
- "read by align-interface"
- '(
-   minimum-space 
-   extra-space 
-   ))
-
-
-(lily-interface
- 'break-aligned-interface
- "Items that are aligned in prefatory matter"
- '(
-   break-align-symbol
-   space-alist
-   visibility-lambda 
-   breakable 
-   ))
-
-
-(lily-interface
- 'chord-name-interface
- "generate a chord name"
- '( pitches inversion bass))
-
-
-(lily-interface
- 'time-signature-interface
- "A time signature, in different styles.
-  The following values for 'style are are recognized:
-
-    @table @samp
-      @item @code{C}
-        4/4 and 2/2 are typeset as C and struck C, respectively.  All
-        other time signatures are written with two digits.
-
-      @item @code{old}
-        2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and 9/8 are
-        typeset with old-style mensuration marks.  All other time
-        signatures are written with two digits.
-
-      @item @code{1xxx}
-        All time signatures are typeset with a single
-        digit, e.g. 3/2 is written as 3. (Any symbol starting
-       with the digit @code{1} will do.)
-
-      @item @code{C}@var{M}@code{/}@var{N}, 
-@code{old}@var{M}@code{/}@var{N} or
-      @code{old6/8alt}
-        Tells LilyPond to use a specific symbol as time signature, 
-       regardless of the actual time signature.
-    @end table
-
-See also the test-file @file{input/test/time.ly}.
-"
- '(fraction style ))
-
-
-(lily-interface
- 'bar-line-interface
- "Bar line.
-
-This is a request to print a special bar symbol. It replaces the 
-regular bar symbol with a special
-symbol.  The argument @var{bartype} is a string which specifies the
-kind of bar to print.  Options are @code{\":|\"}
-@cindex \"|A@@@code{:|}
-,
-@code{\"|:\"}
-@cindex \"|B@@@code{|:}
-, @code{\":|:\"}
-@cindex \"|C@@@code{:|:}
-,
-@code{\"||\"}
-@cindex \"|D@@@code{||}
-, @code{\"|.\"}
-@cindex \"|E@@@code{|.}
-,
-@code{\".|\"}
-@cindex \"|F@@@code{.|}
-, and @code{\".|.\"}
-@cindex \"|G@@@code{.|.}
-. 
-
-These produce, respectively, a right repeat, a left repeat, a double
-repeat, a double bar, a start bar, an end bar, and a thick double bar.
-If @var{bartype} is set to @code{\"empty\"} then nothing is printed,
-but a line break is allowed at that spot.
-
-"
- '(bar-size-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function ))
-
-
-(lily-interface
- 'hairpin-interface
- "hairpin crescendo.
-
-padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf'
-
-"
- '( grow-direction thickness height padding
-                  ))
-
-
-(lily-interface
- 'arpeggio-interface
- "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads."
- '(stems arpeggio-direction))
-
-
-
-(lily-interface
- 'note-collision-interface
- "An object that handles collisions between notes with different
-stem directions and horizontal shifts. Most of the interesting
-properties are to be set in @ref{note-column-interface}"
- '(merge-differently-dotted note-width))
-
-
-
-(lily-interface
- 'custos-interface
- "A custos is a staff context symbol that appears at the end of a
-  staff line with monophonic musical contents (i.e. with a single
-  voice).  It anticipates the pitch of the first note of the following
-  line and thus helps the player or singer to manage line breaks
-  during performance, thus enhancing readability of a score.
-
-  Custodes were frequently used in music notation until the 16th
-  century.  There were different appearences for different notation
-  styles.  Nowadays, they have survived only in special forms of
-  musical notation such as via the editio vaticana dating back to the
-  beginning of the 20th century.
-
-[TODO: add to glossary]"
-   '(style))
-
-
-
+ '(style))
 
-
-
-  (lily-interface
-   'dots-interface
-   "The dots to go with a notehead/rest.  A separate interface, since they
-are a party in collision resolution.
-#'direction is the Direction to handle staff-line collisions in."
-   '(direction dot-count))
-
-
-  (lily-interface
-   'font-interface
-   "Any symbol that is typeset through fixed sets of glyphs (ie. fonts)"
-   '(font-style font-series font-shape font-family font-name
-font-design-size font-relative-size)
-   )
-
-
-
-  (lily-interface
-   'text-interface
-   "A scheme markup text"
-   '(text align baseline-skip lookup raise kern magnify))
-
-
-  (lily-interface
-   'dot-column-interface
-   "Interface that groups dots so they form a column"
-   '( )
-   )
-
-
-  (lily-interface
-   'dynamic-interface
+(ly-add-interface
+ 'dynamic-interface
    "Any kind of loudness sign"
    '()
     )
 
+(ly-add-interface
+ 'finger-interface
+ "A fingering instruction"
+ '()
+ )
 
-
-  (lily-interface
-   'finger-interface
-   "A fingering instruction"
-   '()
-    )
-
-
-  (lily-interface
-   'separation-spanner-interface
-   "Spanner that containing @code{separation-item-interface} grobs to calculate rods"
-   '()
-  )
-
-  (lily-interface
-   'text-script-interface
-   "Any text script"
-   '()
-   )
-
-
-  (lily-interface
-   'grace-alignment-interface
-   "put grace notes in line"
-   '(
-    horizontal-space 
-    )
-   )
-
-
-  (lily-interface
-   'hara-kiri-group-interface
-   "  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."
-   '( items-worth-living )
-)
-
-
-  (lily-interface
-   'line-spanner-interface
-   "Generic line drawn between two objects, eg. for use with glissandi.
-gap is measured in staff-spaces.   "
-
-   '(gap dash-period dash-length line-thickness type 
-   ))
-
-
-  (lily-interface
-   'lyric-hyphen-interface
-   "A centred hyphen is a simple line between lyrics used to divide
-syllables.   The length of the hyphen line should stretch based on the
-size of the gap between syllables."
-
-   '( thickness height minimum-length word-space 
-   ))
-
-
-  (lily-interface
-   'key-signature-interface
-   "A group of  accidentals."
-   '(
-    c0-position  
-    old-accidentals  
-    new-accidentals  
-    ))
-
-
-  (lily-interface
-   'lyric-extender-interface
-   "The extender is a simple line at the baseline of the lyric
-that helps show the length of a melissima (tied/slurred note)."
-   '(
-    word-space  
-    height  
-    right-trim-amount  
-    ))
-
-
-
-  (lily-interface
-   'lyric-syllable-interface
-   "a single piece of lyrics"
-   '(
-    word-space
-    alignment
-    ignore-length-mismatch
-    begin-alignment
-    end-alignment
-    ))
-
-
-
-  (lily-interface
-   'mark-interface
-   "a rehearsal mark"
-   '(
-    ))
-
-
-  (lily-interface
-   'multi-measure-rest-interface
-   "A rest that spans a whole number of measures.  For typesetting the
-numbers, fields from font-interface may be used.
-
-padding is the space between number and rest. Measured in staffspace.
-
-"
-   '(    columns expand-limit minimum-width padding))
-
-
-  (lily-interface
-   'paper-column-interface
-   ""
-
-   '(column-space-strength before-musical-spacing-factor
-stem-spacing-correction before-grace-spacing-factor when bounded-by-me
-dir-list shortest-playing-duration shortest-starter-duration
-contains-grace extra-space stretch-distance ))
-
-
-  (lily-interface
-   'piano-pedal-interface
-   ""
-   '(pedal-type
-     edge-width
-     edge-height
-     shorten-pair
-     left-widen
-     right-widen
-    ))
-
-
-  (lily-interface
-   'porrectus-interface
-   "A porrectus ligature, joining two note heads into a single grob."
-   '(
-    ))
-
-
-  (lily-interface
-   'spaceable-element-interface
-   "An grob (generally a Paper_column) that takes part in the
-spacing problem. "
-   '(penalty 
-     minimum-distances 
-     ideal-distances  
-     dir-list 
-     ))
-
-
-  (lily-interface
-   'rest-collision-interface
-   "Move around ordinary rests (not multi-measure-rests) to avoid
-conflicts."
-   '(
-    maximum-rest-count 
-    minimum-distance 
-    elements 
-    ))
-
-
-  (lily-interface
-   'script-interface
-   ""
-   '(
-    script-priority 
-    ))
-
-
-  (lily-interface
-   'script-column-interface
-   "An interface that sorts scripts according to their @code{script-priority}"
-   '( ))
-
-
-
-  (lily-interface
-   'spacing-spanner-interface
-   " SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
-The space taken by a note is determined by the formula 
-
-
-
-where TIME is the amount of time a note occupies.  The value of C is
-chosen such that the smallest space within a measure is
-arithmetic_basicspace:
-
-C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) 
-
-The smallest space is the one following the shortest note in the
-measure, or the space following a hypothetical 1/8 note.  Typically
-arithmetic_basicspace is set to a value so that the shortest note
-takes about two noteheads of space (ie, is followed by a notehead of
-space):
-
-@example
-2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
-
-@{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
-@{ assuming: SHORTEST <= 1/8 @}
-
-= arithmetic_multiplier *
-( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
-
-= arithmetic_multiplier * arithmetic_basicspace
-
-@{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
-
-= quartwidth * arithmetic_basicspace
-
-=>            
-
-arithmetic_basicspace = 2/1 = 2
-
-
-If you want to space your music wider, use something like:
-
-arithmetic_basicspace = 4.;
-
-@end example"
-   '(
-spacing-increment
-shortest-duration-space
-    
-    ))
-
-
-  (lily-interface
-   'staff-symbol-referencer-interface
-   
-   "Object whose Y position is meaning with reference to a staff
-symbol. Objects that have this interface should include
-Staff_symbol_referencer::callback in their Y-offset-callback.
-"
-   '(
-    staff-symbol
-    staff-position
-    ))
-  
-
-  (lily-interface
-   'staff-symbol-interface
-   "This spanner draws the lines of a staff.  The middle line is
-position 0."
-   '(
-    staff-space 
-    line-count
-    invisible-staff
-    ))
-
-
-  (lily-interface
-   'stem-tremolo-interface
-   ""
-   '( stem beam-width beam-thickness
-    ))
-
-
-  (lily-interface
-   'separation-item-interface
-   "Item that computes widths to generate spacing rods.
-
-Calc dimensions for the Separating_group_spanner; this has to be
-an item to get dependencies correct.  It can't be an grob_group
-since these usually are in a different X_group
-"
-   '(
-    elements 
-     ))
-
-
-  (lily-interface
-   'system-start-delimiter-interface
-   "#'style can be bar-line, bracket or brace"
-   '(bar-line-collapse-height brace-collapse-height bracket-collapse-height
-                             thickness arch-height arch-angle arch-thick
-                             arch-width bracket-thick glyph ))
-
-
-  (lily-interface
-   'text-spanner-interface
-   "generic text spanner"
-   '(
-    dash-period  
-    dash-length 
-    line-thickness 
-    edge-height 
-    edge-width
-    edge-text 
-    shorten-pair
-    type 
-))
-
-
-  (lily-interface
-   'tie-interface
-   "A tie connecting two noteheads.
-direction = Forced direction for all ties"
-   
-   '(
-    staffline-clearance 
-    control-points 
-    heads 
-    details 
-    thickness 
-    x-gap 
-    direction 
-    minimum-length 
-    ))
-
-
-
-
-  (lily-interface
-   'tie-column-interface
-   "that sets tie directions in a tied chord"
-   '(direction
-   ))
-
-(lily-interface
- 'percent-repeat-interface
- "Repeats that look like percent signs"
- '(slope thickness))
-
-(lily-interface
- 'volta-bracket-interface
- "Volta bracket with number"
- '(
-   bars  
-   thickness  
-   height  
-   ))
-
-
-(lily-interface
- 'span-bar-interface
- "A bar line that spans other barlines (typically used to get cross-staff barlines."
+(ly-add-interface
+ 'mark-interface
+ "a rehearsal mark"
  '(
    ))
-
-
-(primitive-eval (cons
-         'begin
-         (map (lambda (x) (list 'define (car x) (list 'quote (cdr x))))
-              all-interfaces)))
-
-
-(define (interface-names) (map (lambda (x) (symbol->string (car x))) all-interfaces))
-
-