]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/define-grobs.scm: uniform naming for definitions and output
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 17 May 2003 21:49:19 +0000 (21:49 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 17 May 2003 21:49:19 +0000 (21:49 +0000)
routine files.

* ly/engraver-init.ly (ChoirStaffContext): add \description from
scm/context-description.scm

* lily/parser.yy (translator_spec_body): add \description to the
\translator{} body syntax.

* lily/ottava-engraver.cc: new file.

* input/mutopia/R.Schumann/romanze-op28-2.ly: syntax updates.

* Documentation/user/refman.itely (Metronome marks): update doco.

46 files changed:
ChangeLog
Documentation/user/refman.itely
input/mutopia/R.Schumann/romanze-op28-2.ly
input/test/chord-names-american.ly [deleted file]
input/test/ottava.ly
lily/include/translator-def.hh
lily/my-lily-lexer.cc
lily/ottava-engraver.cc [new file with mode: 0644]
lily/parser.yy
lily/text-spanner-engraver.cc
lily/text-spanner.cc
lily/translator-def.cc
ly/engraver-init.ly
ly/spanners-init.ly
scm/ascii-script.scm [deleted file]
scm/basic-properties.scm [deleted file]
scm/context-description.scm [deleted file]
scm/define-grob-interfaces.scm [new file with mode: 0644]
scm/define-grob-properties.scm [new file with mode: 0644]
scm/define-grobs.scm [new file with mode: 0644]
scm/define-music-properties.scm [new file with mode: 0644]
scm/define-music-types.scm [new file with mode: 0644]
scm/define-translator-properties.scm [new file with mode: 0644]
scm/describe-context.scm [new file with mode: 0644]
scm/document-translation.scm
scm/grob-description.scm [deleted file]
scm/interface-description.scm [deleted file]
scm/lily.scm
scm/music-property-description.scm [deleted file]
scm/output-ascii-script.scm [new file with mode: 0644]
scm/output-pdf.scm [new file with mode: 0644]
scm/output-pdftex.scm [new file with mode: 0644]
scm/output-ps.scm [new file with mode: 0644]
scm/output-pysk.scm [new file with mode: 0644]
scm/output-sketch.scm [new file with mode: 0644]
scm/output-sodipodi.scm [new file with mode: 0644]
scm/output-tex.scm [new file with mode: 0644]
scm/pdf.scm [deleted file]
scm/pdftex.scm [deleted file]
scm/ps.scm [deleted file]
scm/pysk.scm [deleted file]
scm/sketch.scm [deleted file]
scm/sodipodi.scm [deleted file]
scm/tex.scm [deleted file]
scm/translator-property-description.scm [deleted file]
scripts/convert-ly.py

index 318673135270d9e30f4af40d9e14499d9190e98c..acb5e7cffe50b4801c34a0dd22ca32b4c31215d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2003-05-17  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * scm/define-grobs.scm: uniform naming for definitions and output
+       routine files. 
+
+       * ly/engraver-init.ly (ChoirStaffContext): add \description from
+       scm/context-description.scm
+
+       * lily/parser.yy (translator_spec_body): add \description to the
+       \translator{} body syntax.
+
+       * lily/ottava-engraver.cc: new file.
+
        * scm/chord-name.scm (natural-chord-alteration): replace old
        chord stuff. 
 
index 520a7cf3df94995f9fd3927b8d25a5ad490fc74a..34f0e6141fbd30b2c1d5b4562d3f9384b9534c8f 100644 (file)
@@ -1646,17 +1646,17 @@ paper output, a metronome marking is printed
 @subsection Text spanners
 @cindex Text spanners
 
-Some textual indications, e.g. @i{rallentando} or @i{accelerando}, are
-often extended over many measures. This is indicated by following the
-text with a dotted line.  You can create such texts using text
-spanners. The syntax is as follows:
-@example
- \startTextSpan
- \stopTextSpan
-@end example
+Some performance indications, e.g. @i{rallentando} or @i{accelerando},
+are written as texts, and extended over many measures with dotted
+lines.  You can create such texts using text spanners: attach
+@code{\startTextSpan} and @code{\stopTextSpan} to the
+start and ending note of the spanner. 
+
 The string to be printed, as well as the style, is set through object
 properties.
 
+[TODO: 8va engraver.]
+
 An application is to fake octavation indications.
 
 @lilypond[fragment,relative,verbatim]
@@ -1686,14 +1686,14 @@ Brackets are used in musical analysis to indicate structure in musical
 pieces. LilyPond supports a simple form of nested horizontal brackets.
 To use this, add the @internalsref{Horizontal_bracket_engraver} to
 @internalsref{Staff} context.  A bracket is started with
-@code{\groupOpen} and closed with @code{\groupClose}. 
+@code{\startGroup} and closed with @code{\stopGroup}. 
 
 @lilypond[singleline,verbatim]
 \score { \notes \relative c'' {  
-       c4-\groupOpen-\groupOpen
-       c4-\groupClose
-       c4-\groupOpen
-        c4-\groupClose-\groupClose
+       c4-\startGroup-\startGroup
+       c4-\stopGroup
+       c4-\startGroup
+        c4-\stopGroup-\stopGroup
   }
   \paper { \translator {
            \StaffContext \consists "Horizontal_bracket_engraver"
index 4fa2104d6d996329eaeaa0edf72a445dadc3f3f2..0db6693127d0dc8c8476547fcbe96379bb0b6bcc 100644 (file)
@@ -11,7 +11,6 @@
   title = "Romanzen"
   opus = "op. 28/2"
   composer = "R. Schumann (1810-1856)"
-  % latexpackages="rotating"
   enteredby="Rune Zedeler"
   maintainer="rune@zedeler.dk"
   mutopiatitle = "Romanzen - op. 28/2"
@@ -62,7 +61,7 @@ righta = \notes \transpose c cis' {
  e4^4( g8^5~<<g ces_4>> f^3  as-) |
  g4^4 b8^5~b a c'^5~ |
  c' b^4 ges^5 des^3 b,^5 \d  ges,16-[^4 f,] |
- e,^2^#'(large "ritard...") cis,^1 \u r8 r r4 r16 \d gis,^2^"R.H."-] |
+ e,^2^\markup { \large "ritard..." } cis,^1 \u r8 r r4 r16 \d gis,^2^"R.H."-] |
 
 
  \forcedBreak
@@ -73,16 +72,16 @@ righta = \notes \transpose c cis' {
  \m  a,-[( \u d^2 a d-] \m  c-[ \u d c' d-] \m  b,-[ \u  d-)^3] r8 |
  \m  c16-[( \u f c' f-] \m  es-[ \u f es' f-] \m  d-[ \u  f-)^3-] \m  f-[( \u as^2-] |
   f'-[  as-)-] \m  f-[( \u as f'  as-)] r8^\fermata r16 e'^2( f' g' | \stemBoth \tieBoth
- as' des'^1 c'8^#'(finger "2-3") h~h  c'16-) \clef F  e,16-[(^2 f, g,] |
+ as' des'^1 c'8^\markup { \finger "2-3" } h~h  c'16-) \clef F  e,16-[(^2 f, g,] |
  \forcedBreak
 
   as,-[^5 h,,^2-)-] \clef G <<c a^3>>8-[-( <<c g^2>>16 c'] <<c es ges c'^5>>4.~
  <<c es ges c'>>8-) s4 s8 r16 h^2( c' d' | 
- es' ges-1 f-2 a-1 c'-2 f'-4 \stemUp \tieUp e'-5 d' c' b-4 a^\prall^#'(finger "2-4-3") g |
+ es' ges-1 f-2 a-1 c'-2 f'-4 \stemUp \tieUp e'-5 d' c' b-4 a^\prall^\markup { \finger "2-4-3" } g |
   f-) f'-5( e'-5 d'-4 c'-3  f'-)-5 <<f^4 a^5>>4-( <<e^3 g^5>>8 |
  <<a, f^4>>4 <<g, e^3>>8 f16^4 d'^5~ d'8.-[ c'16^4] |
  \forcedBreak 
- < f8-)^3 \context Voice = another { \m  a,16-[^\pp \u c8 c16] } > \m  g,-[ \u c_3-] \m  b,-[^#'(finger "2-1") \u c8 c16-] \m  a,-[ \u c]~ | \stemBoth
+ < f8-)^3 \context Voice = another { \m  a,16-[^\pp \u c8 c16] } > \m  g,-[ \u c_3-] \m  b,-[^\markup { \finger "2-1" } \u c8 c16-] \m  a,-[ \u c]~ | \stemBoth
  c16 c8_4 c c16~c c8_2 c c16~ |
  c16 c8 c c16~c c8 c c16~ |
  c16 c8 c c16 r4^\fermata r8 | \bar "|."
@@ -165,8 +164,8 @@ lefta = \notes \transpose c cis {
   es' des'4^1~ \stemDown  des'8.-[ c'16] }
  }
  \transpose c' c, {
-  g4(-4 a8-3~a f-5 g-4 | a4-3 g8-#'(finger "4-3") ~g f-4 e-5 |
-   d4-)-#'(finger "4-5")( g8-3~g es f-4 | g4-3 f8-4~f es d-4 |
+  g4(-4 a8-3~a f-5 g-4 | a4-3 g8-\markup { \finger "4-3" } ~g f-4 e-5 |
+   d4-)-\markup { \finger "4-5" }( g8-3~g es f-4 | g4-3 f8-4~f es d-4 |
    c4-) r8 f4-4( as8-5~ | as g-4  b-)-5 as4-5( ces'8-4~ |
   ces' b des'-4  c'4-)-5( <<es'-4 es''>>8 |
   \stemDown \tieDown  des'4.-)_5~des'~ |
@@ -220,7 +219,7 @@ leftb = \notes \transpose c cis {
  \voiceTwo
  es as,_3 g,8 fis,~fis, g,_4-\arpeggio gis,_5~ |
  gis, <<a, c>>16 r16 r8 r4 cis8( |
-  d-) e( f16_4 d_5  c4.-)_ #'(finger "4-3")~ |
+  d-) e( f16_4 d_5  c4.-)_ \markup { \finger "4-3" }~ |
  \oneVoice
  c16( h,_4 c_3 cis_1 d_2 b,_3 a,_4 as,_1 g,8  c,8-) |
  \translator Staff = down \stemDown \tieDown
@@ -244,11 +243,12 @@ leftb = \notes \transpose c cis {
     \property PianoStaff.instrument="2. "
     \context Staff = up {
       \property Staff.DynamicLineSpanner \override #'direction = #-1
-      \clef G <\global \context Voice=upv \righta>
+      \clef G <\global \context Voice=upv \righta >
     }
     \context Staff = mid {
    % \property Staff.instrument="\\begin{turn}{-90}{Rechte Hand}\\end{turn}"
-    \property Staff.instrument=#'(rows ((raise . -7.5) "") ((raise . 7.5) (lines "Rechte   " "Hand.")))
+    \property Staff.instrument= \markup {
+        \column << Rechte Hand >>  }
       \clef F <\global \context Voice=midv \rightb>
     }
       \context Staff = down {
@@ -277,4 +277,5 @@ leftb = \notes \transpose c cis {
   }
   \midi { \tempo 8=100 }
 }
+
 %% new-chords-done %%
diff --git a/input/test/chord-names-american.ly b/input/test/chord-names-american.ly
deleted file mode 100644 (file)
index 96bb4ea..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-\version "1.7.16"
-\header {
-    texidoc = "Chord names in american styles, according to one of our users.
-
-
-FIXME
-
-"
-}
-
-\include "english.ly"
-
-
-%%FIXME:
-
-% DON'T  do this in the test file, it messes up all other files in the directory.
-
-% #(set! chord::names-alist-american
-%     (append 
-%     '(
-%       ;; any changes here, see scm/chord-name.scm
-%      )
-%      chord::names-alist-american))
-
-scheme = \chords {
-  c         % Major triad
-  cs:m      % Minor triad
-  df:m5-    % Diminished triad
-  c:5^3     % Root-fifth chord
-  c:4^3     % Suspended fourth triad
-  c:5+      % Augmented triad
-  c:2^3     % "2" chord
-  c:m5-.7-  % Diminished seventh
-  c:7+      % Major seventh
-  c:7.4^3   % Dominant seventh suspended fourth
-  c:5+.7    % Augmented dominant seventh
-  c:m5-.7   % "Half" diminished seventh
-  c:5-.7    % Dominant seventh flat fifth
-  c:5-.7+   % Major seventh flat fifth
-  c:m7+     % Minor-major seventh
-  c:m7      % Minor seventh
-  c:7       % Dominant seventh
-  c:6       % Major sixth
-  c:m6      % Minor sixth
-  c:9^7     % Major triad w/added ninth
-  c:6.9^7   % Six/Nine chord
-  c:9       % Dominant ninth 
-  c:7+.9    % Major ninth
-  c:m7.9    % Minor ninth
-}
-
-\score {
-  \notes <
-    \context ChordNames {
-         #(set-chord-name-style 'american)
-         \scheme
-    }
-    \context Staff \transpose c c' \scheme
-  >
-}
-
-%% new-chords-done %%
index c348d12b6e5736c6bc5bb76fb8e671c363d02109..87579eb59f76b51a043ec20c91828af5afae9040 100644 (file)
@@ -7,7 +7,7 @@ fragment = \notes {
   \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5)
   \property Voice.TextSpanner \set #'edge-text = #'("8va " . "")
   \property Staff.centralCPosition = #-13
-  a#(ly:export (make-span-event 'TextSpanEvent START)) b c a #(ly:export (make-span-event 'TextSpanEvent STOP))
+  a-\startTextSpan b c a-\stopTextSpan
 }
 
 \paper { raggedright = ##t} 
index d8a249ca2a66e6404b189be14d7bf1f9a356767a..8e755dda48daf56be79f9cdb1d03b6545fe72505 100644 (file)
@@ -29,7 +29,9 @@ private:
   SCM end_consists_name_list_;
   SCM accepts_name_list_;
   SCM property_ops_;
+
 public:
+  SCM description_; 
   SCM type_name_;
   SCM type_aliases_;
   SCM translator_group_type_;
index 684cacc8d82efec0e263e5a3003c7ad4cbf4d7a1..c24a153de15af383f86c0d5626c0f024b1c9f70f 100644 (file)
@@ -46,6 +46,7 @@ static Keyword_ent the_key_tab[]={
   {"context", CONTEXT},
   {"default", DEFAULT},
   {"denies", DENIES},
+  {"description", DESCRIPTION},
   {"duration", DURATION},
   {"grobdescriptions", GROBDESCRIPTIONS},
   {"figures",FIGURES},
diff --git a/lily/ottava-engraver.cc b/lily/ottava-engraver.cc
new file mode 100644 (file)
index 0000000..e849a1d
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+  text-spanner-engraver.cc -- implement Ottava_spanner_engraver
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 2000--2003 Han-Wen Nienhuys
+  Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#include "protected-scm.hh"
+#include "note-column.hh"
+#include "item.hh"
+#include "side-position-interface.hh"
+#include "engraver.hh"
+
+class Ottava_spanner_engraver : public Engraver
+{
+public:
+  TRANSLATOR_DECLARATIONS(Ottava_spanner_engraver);  
+protected:
+  virtual void finalize ();
+  virtual void acknowledge_grob (Grob_info);
+  virtual void process_music ();
+  virtual void stop_translation_timestep ();
+private:
+  Spanner *span_;
+  Spanner *finished_;
+  
+  Protected_scm last_ottavation_;
+  
+  void typeset_all ();
+};
+
+
+Ottava_spanner_engraver::Ottava_spanner_engraver ()
+{
+  finished_ = 0;
+  span_ =0;
+}
+
+void
+Ottava_spanner_engraver::process_music ()
+{
+  SCM ott = get_property ("ottavation");
+  if (ott != last_ottavation_)
+    {
+      finished_= span_;
+      span_ = 0;
+      if (gh_string_p (ott))
+       {
+         span_  = new Spanner (get_property ("OttavaSpanner"));
+         span_->set_grob_property ("edge-text", gh_cons (ott, SCM_EOL));
+         announce_grob (span_, SCM_EOL);
+       }
+    }
+
+  last_ottavation_ = ott;
+}
+
+void
+Ottava_spanner_engraver::acknowledge_grob (Grob_info info)
+{
+  Item *it = dynamic_cast<Item*> (info.grob_);
+  if (span_ && it && Note_column::has_interface (info.grob_))
+    {
+      Side_position_interface::add_support (span_, it);
+      if (!span_->get_bound (LEFT))
+       span_->set_bound (LEFT, it);
+      span_->set_bound (RIGHT, it);
+    }
+}
+
+void
+Ottava_spanner_engraver::typeset_all ()
+{  
+  if (finished_)
+    {
+      Side_position_interface::add_staff_support (finished_);
+
+      Direction d = LEFT;
+      do
+       {
+         if (!finished_->get_bound (RIGHT))
+           {
+             Grob* e = unsmob_grob (get_property ("currentMusicalColumn"));
+             finished_->set_bound (d, e);
+           }
+       }
+      while (flip (&d) != LEFT);
+      
+      typeset_grob (finished_);
+      finished_ = 0;
+    }
+}
+
+void
+Ottava_spanner_engraver::stop_translation_timestep ()
+{
+  if (span_ && !span_->get_bound (LEFT))
+    {
+      Grob* e = unsmob_grob (get_property ("currentMusicalColumn"));
+      span_->set_bound (LEFT, e);
+    }
+
+  typeset_all ();
+}
+
+void
+Ottava_spanner_engraver::finalize ()
+{
+  typeset_all ();
+  if (span_)
+    finished_ = span_;
+  typeset_all();
+}
+
+ENTER_DESCRIPTION(Ottava_spanner_engraver,
+/* descr */       "Create a text spanner when the ottavation property changes..",
+/* creats*/       "OttavaSpanner",
+/* accepts */     "",
+/* acks  */      "note-column-interface",
+/* reads */       "ottavation",
+/* write */       "");
index 09ace3518a03531a56b3676f92471569665ea256..f4eeeca5b318d4aade063e6303bbeae0f410f4c6 100644 (file)
@@ -221,6 +221,7 @@ yylex (YYSTYPE *s,  void * v)
 %token SIMULTANEOUS
 %token CONSISTSEND
 %token DENIES
+%token DESCRIPTION
 %token EXTENDER
 %token FIGURES FIGURE_OPEN FIGURE_CLOSE
 %token FIGURE_BRACKET_CLOSE FIGURE_BRACKET_OPEN
@@ -540,6 +541,9 @@ translator_spec_body:
                td->translator_group_type_ = $2;
                td->set_spot (THIS->here_input ());
        }
+       | translator_spec_body DESCRIPTION string  {
+               unsmob_translator_def ($$)->description_ = $3;
+       }
        | translator_spec_body STRING '=' embedded_scm                  {
                unsmob_translator_def ($$)->add_property_assign ($2, $4);
        }
index 52f03da9406b42e049d882de07b0f250b27f7088..7fd070d831b7c89d44f42c85247288a98ce40022 100644 (file)
@@ -6,18 +6,10 @@
   (c) 2000--2003 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
-#include "dimensions.hh"
-#include "event.hh"
-#include "paper-column.hh"
 #include "note-column.hh"
 #include "item.hh"
 #include "side-position-interface.hh"
 #include "engraver.hh"
-#include "group-interface.hh"
-#include "directional-element-interface.hh"
-#include "translator-group.hh"
-#include "axis-group-interface.hh"
-
 
 class Text_spanner_engraver : public Engraver
 {
@@ -107,11 +99,13 @@ Text_spanner_engraver::process_music ()
          current_req_ = req_drul_[START];
          span_  = new Spanner (get_property ("TextSpanner"));
 
+#if 0
          /* Ugh.  Reset (de)cresc. specific properties */
-         span_->set_grob_property ("outer", SCM_BOOL_T);
+         span_->set_grob_property ("enclose-bounds", SCM_BOOL_T);
          span_->set_grob_property ("if-text-padding", gh_double2scm (0));
          span_->set_grob_property ("width-correct", gh_double2scm (0));
-                   
+#endif
+         
          Side_position_interface::set_axis (span_, Y_AXIS);
          announce_grob (span_, req_drul_[START]->self_scm());
          req_drul_[START] = 0;
index d143013ed339c1eb3c66608afed078b8073c3b58..0864d55a3d244126cd4b0ebd77a9940325da3793 100644 (file)
@@ -1,10 +1,10 @@
 /*
 
-text-spanner.cc -- implement Text_spanner
+  text-spanner.cc -- implement Text_spanner
 
-source file of the GNU LilyPond music typesetter
+  source file of the GNU LilyPond music typesetter
 
-(c) 2000--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 2000--2003 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "molecule.hh"
@@ -46,7 +46,11 @@ Text_spanner::brew_molecule (SCM smob)
     }
 
   /* Ugh, must be same as Hairpin::brew_molecule.  */
-  Real padding = gh_scm2double (me->get_grob_property ("if-text-padding"));
+  Real padding = 0.0;
+  SCM itp= me->get_grob_property ("if-text-padding");
+  if (gh_number_p (itp))
+    padding = gh_scm2double (itp);
+  
   Real broken_left =  spanner->get_broken_left_end_align ();
   Real width = spanner->spanner_length ();
   width -= broken_left;
@@ -70,7 +74,7 @@ Text_spanner::brew_molecule (SCM smob)
 
          /* Text spanners such as ottava, should span from outer limits of
             noteheads, iso (de)cresc. spanners that span the inner space */
-         if (me->get_grob_property ("outer") != SCM_EOL)
+         if (me->get_grob_property ("enclose-bounds") != SCM_EOL)
            {
              width -= d * r;
            }
@@ -293,5 +297,5 @@ ADD_INTERFACE (Pianopedal,"piano-pedal-interface",
 
 ADD_INTERFACE (Text_spanner,"text-spanner-interface",
               "generic text spanner",
-              "dash-period if-text-padding dash-length edge-height edge-widen edge-text shorten-pair type thickness outer width-correct");
+              "dash-period if-text-padding dash-length edge-height edge-widen edge-text shorten-pair type thickness enclose-bounds width-correct");
 
index 8c8c459bc5bff7a4e65bae7475c80f66b1dccbbb..551c0b59d57f60b227a17a3bdd6a18a74c50e94e 100644 (file)
@@ -31,6 +31,7 @@ Translator_def::mark_smob (SCM smob)
 {
   Translator_def* me = (Translator_def*) SCM_CELL_WORD_1 (smob);
 
+  scm_gc_mark (me->description_);
   scm_gc_mark (me->type_aliases_);
   scm_gc_mark (me->consists_name_list_);
   scm_gc_mark (me->accepts_name_list_);
@@ -50,6 +51,7 @@ Translator_def::Translator_def ()
   end_consists_name_list_ = SCM_EOL;
   property_ops_ = SCM_EOL;
   type_name_ = SCM_EOL;
+  description_ = SCM_EOL;
 
   smobify_self();
   
@@ -69,9 +71,11 @@ Translator_def::Translator_def (Translator_def const & s)
   end_consists_name_list_ = SCM_EOL;
   property_ops_ = SCM_EOL;
   type_name_ = SCM_EOL;
-
+  description_ = SCM_EOL;
   
   smobify_self();
+  description_ = s.description_;
+
   consists_name_list_ = scm_list_copy (s.consists_name_list_);
   end_consists_name_list_ = scm_list_copy (s.end_consists_name_list_);
   accepts_name_list_ = scm_list_copy (s.accepts_name_list_);
@@ -327,10 +331,17 @@ Translator_def::to_alist () const
   SCM l = SCM_EOL;
   
   l = gh_cons (gh_cons (ly_symbol2scm ("consists"),  consists_name_list_), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("end-consists"),  end_consists_name_list_), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("description"),  description_), l);
+  l = gh_cons (gh_cons (ly_symbol2scm ("end-consists"),
+                       end_consists_name_list_), l);
   l = gh_cons (gh_cons (ly_symbol2scm ("accepts"),  accepts_name_list_), l);
   l = gh_cons (gh_cons (ly_symbol2scm ("property-ops"),  property_ops_), l);
-  l = gh_cons (gh_cons (ly_symbol2scm ("type-name"),  type_name_), l); // junkme.
+
+  /*
+    junkme:
+   */
+  l = gh_cons (gh_cons (ly_symbol2scm ("type-name"),  type_name_), l);
+  
   l = gh_cons (gh_cons (ly_symbol2scm ("group-type"),  translator_group_type_), l);    
 
   return l;  
index 7151edd13ea81128c2a199f2728ec07ff241e04f..da047f56583479d365c822be5af66548c17548ae 100644 (file)
@@ -6,7 +6,12 @@
 
 StaffContext=\translator {
        \type "Engraver_group_engraver"
-       \name Staff 
+       \name Staff
+
+       \description "Handles clefs, bar lines, keys, accidentals.  It can contain
+@code{Voice} contexts."
+
+       
        \consists "Output_property_engraver"    
        
        \consists "Bar_engraver"
@@ -21,6 +26,8 @@ StaffContext=\translator {
          =  #Separating_group_spanner::set_spacing_rods_and_seqs
        \consists "Dot_column_engraver"
 
+       % perhaps move to Voice context?
+       \consists "Ottava_spanner_engraver"
        \consists "Clef_engraver"
        \consists "Key_engraver"
        \consists "Time_signature_engraver"
@@ -80,6 +87,10 @@ InnerChoirStaffContext = \translator {
 ChoirStaffContext = \translator {
        \InnerChoirStaffContext
        \name ChoirStaff
+       
+       \description "Identical to @code{StaffGroup} except that the
+    contained staves are not connected vertically."
+       
        \accepts "InnerChoirStaff"
        \accepts "InnerStaffGroup"
 }
@@ -90,7 +101,11 @@ RhythmicStaffContext=\translator{
        
        \consists "Output_property_engraver"    
 
-
+\description  "
+    A context like @code{Staff} but for printing rhythms.  Pitches are
+    ignored; the notes are printed on one line.  It can contain
+    @code{Voice} contexts.
+"
        minimumVerticalExtent = ##f
        extraVerticalExtent = ##f
        verticalExtent = ##f 
@@ -123,7 +138,13 @@ RhythmicStaffContext=\translator{
 VoiceContext = \translator {
        \type "Engraver_group_engraver"
        \name Voice
+\description "
+    Corresponds to a voice on a staff.  This context handles the
+    conversion of dynamic signs, stems, beams, super- and subscripts,
+    slurs, ties, and rests.
 
+    You have to instantiate this explicitly if you want to have
+    multiple voices on the same staff."
 
        localKeySignature = #'()
        \consists "Font_size_engraver"
@@ -175,7 +196,11 @@ ThreadContext = \translator{
        \type Engraver_group_engraver
        \name Thread
        localKeySignature = #'()
-
+\description "
+    Handles note heads, and is contained in the Voice context.  You
+    have to instantiate this explicitly if you want to adjust the
+    style of individual note heads.
+"
        \consists "Font_size_engraver"  
        \consists "Thread_devnull_engraver"
        \consists "Note_heads_engraver"
@@ -193,6 +218,12 @@ GrandStaffContext=\translator{
        \type "Engraver_group_engraver"
        \name GrandStaff
        localKeySignature = #'()
+       \description "
+    Contains @code{Staff} or @code{RhythmicStaff} contexts.  It adds a
+    brace on the left side, grouping the staves together.  The bar
+    lines of the contained staves are connected vertically.  It can
+    contain @code{Staff} contexts."
+
        \consists "Span_bar_engraver"
        \consists "Span_arpeggio_engraver"
        \consists "System_start_delimiter_engraver"
@@ -205,7 +236,10 @@ PianoStaffContext = \translator{
        \GrandStaffContext
        \name "PianoStaff"
        \alias "GrandStaff"
-
+\description "
+    Just like @code{GrandStaff} but with @code{minVerticalAlign} set
+    equal to @code{maxVerticalAlign} so that interstaff beaming and
+    slurring can be used."
        verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
        VerticalAlignment \override #'forced-distance = #12
        VerticalAlignment \override #'self-alignment-Y = #0
@@ -242,6 +276,14 @@ InnerStaffGroupContext= \translator {
 StaffGroupContext = \translator {
        \InnerStaffGroupContext
        \name StaffGroup
+       \description "
+    Contains @code{Staff} or @code{RhythmicStaff} contexts.  Adds a
+    bracket on the left side, grouping the staves together.  The bar
+    lines of the contained staves are connected vertically.  It can
+    contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or
+    @code{Lyrics} contexts.
+"
+       
        \accepts "InnerChoirStaff"
        \accepts "ChoirStaff"
        \accepts "InnerStaffGroup"
@@ -255,7 +297,13 @@ LyricsVoiceContext= \translator{
        \consistsend "Hara_kiri_engraver"
        minimumVerticalExtent = #'(-1.2 . 1.2)
        extraVerticalExtent = ##f
-       verticalExtent = ##f 
+       verticalExtent = ##f
+
+       \description "
+    Corresponds to a voice with lyrics.  Handles the printing of a
+    single line of lyrics.
+"
+       
        \name LyricsVoice 
        \consists "Separating_line_group_engraver"
        \consists "Lyric_engraver"
@@ -283,7 +331,7 @@ NoteNamesContext = \translator {
 LyricsContext = \translator {
        \type "Engraver_group_engraver"
        \name Lyrics
-       
+       \description  "Typesets lyrics."
        %% To get folded repeats right.
        \consists Vertical_align_engraver 
 
@@ -299,7 +347,8 @@ LyricsContext = \translator {
 ChordNamesContext = \translator {
        \type "Engraver_group_engraver"
        \name ChordNames
-
+\description "    Typesets chord names."
+       
        \consists "Rest_swallow_translator" 
        \consists "Output_property_engraver"    
        \consists "Separating_line_group_engraver"
@@ -337,6 +386,19 @@ ScoreContext = \translator {
        \type Score_engraver
        \name Score
        localKeySignature = #'()
+
+       \description "This is the top level notation context.  No
+    other context can contain a @code{Score} context.  This context
+    handles the administration of time signatures.  It also makes sure
+    that items such as clefs, time signatures, and key-signatures are
+    aligned across staves.  It can contain @code{Lyrics},
+    @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff},
+    @code{StaffGroup}, and @code{ChoirStaff} contexts.
+
+    You cannot explicitly instantiate a Score context (since it is
+    not contained in any other context).  It is instantiated
+    automatically when an output definition (a @code{\score} or
+    @code{\paper} block) is processed."
        
        \consists "Repeat_acknowledge_engraver"
        \consists "Staff_collecting_engraver"
@@ -467,10 +529,7 @@ EasyNotation =  \translator {
        NoteHead \override #'molecule-callback = #Note_head::brew_ez_molecule
 }
 
-% retain for compatibility reasons (FIXME: convert-ly)
-GraceContext = \translator {
-       \type "Engraver_group_engraver"
-}
+
 
 FiguredBassContext = \translator {
        \type "Engraver_group_engraver"
@@ -507,6 +566,9 @@ TabStaffContext = \translator {
       \alias "Staff"
       \name "TabStaff"
       \denies "Voice"
+
+      \description "Context for generating tablature. [DOCME]"
+      
       \accepts "TabVoice"
       
       % 6 strings
index 6bbdcf93cc1e4a051c249cd12ee9a10aded2c214..f4d704fbedad995cf6d623473e12f53ada02a2cb 100644 (file)
@@ -4,8 +4,8 @@ startCluster = #(make-span-event 'ClusterEvent START)
 stopCluster = #(make-span-event 'ClusterEvent STOP)
 
 
-groupOpen = #(make-span-event 'NoteGroupingEvent START)
-groupClose = #(make-span-event 'NoteGroupingEvent STOP)
+startGroup = #(make-span-event 'NoteGroupingEvent START)
+stopGroup = #(make-span-event 'NoteGroupingEvent STOP)
 
 
 cr = #(make-span-event 'CrescendoEvent START)
diff --git a/scm/ascii-script.scm b/scm/ascii-script.scm
deleted file mode 100644 (file)
index d53cfb3..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-(define-module (scm ascii-script)
-  )
-
-(define this-module (current-module))
-
-(define-public (as-output-expression expr port)
-  (display (eval expr this-module) port)
-  )
-
-
-(debug-enable 'backtrace)
-
-(define (tex-encoded-fontswitch name-mag)
-  (let* ((iname-mag (car name-mag))
-        (ename-mag (cdr name-mag)))
-    (cons iname-mag
-         (cons ename-mag
-               (string-append  "magfont"
-                         (string-encode-integer
-                          (hashq (car ename-mag) 1000000))
-                         "m"
-                         (string-encode-integer
-                          (inexact->exact (* 1000 (cdr ename-mag)))))))))
-
-(define (fontify name-mag-pair exp)
-  (string-append (select-font name-mag-pair)
-                exp))
-
-
-(define (define-fonts internal-external-name-mag-pairs)
-  (set! font-name-alist (map tex-encoded-fontswitch
-                            internal-external-name-mag-pairs))
-  (apply string-append
-        (map (lambda (x)
-               (font-load-command (car x) (cdr x)))
-             (map cdr font-name-alist))))
-
-(define as-font-alist-alist
-  '(
-    (as5 .
-        (
-         (feta16 . as5)
-         (feta20 . as5)
-         (feta-nummer6 . as-number1)
-         (feta-nummer8 . as-number1)
-         (feta-braces16 . as-braces9)
-         (cmr7 . as-dummy)
-         (cmr8 . as-dummy)
-         (cmr10 . as-dummy)
-         ))
-    (as9 .
-        (
-         (feta16 . as9)
-         (feta20 . as9)
-         (feta-nummer4 . as-number1)
-         (feta-nummer8 . as-number4)
-         (feta-braces16 . as-braces9)
-         (cmr7 . as-dummy)
-         (cmr8 . as-dummy)
-         (cmr10 . as-dummy)
-         (cmr12 . as-dummy)
-         ))
-    ))
-
-(define (as-properties-to-font-name size fonts properties-alist-list)
-  (let* ((feta-name (properties-to-font-name fonts properties-alist-list))
-        (as-font-alist (cdr (assoc size as-font-alist-alist)))
-        (font (assoc (string->symbol feta-name) as-font-alist)))
-    (if font (symbol->string (cdr font))
-       (let ((e (current-error-port)))
-         (newline e)
-         (display "can't find font: " e)
-         (write feta-name e)
-         ;;(symbol->string size)
-         "as-dummy"
-         ))))
-
-;; FIXME: making a full style-sheet is a pain, so we parasite on
-;; paper16 and translate the result.
-;;
-(define (as-make-style-sheet size)
-  (let ((sheet (make-style-sheet 'paper16)))
-    (assoc-set! sheet 'properties-to-font
-               (lambda (x y) (as-properties-to-font-name size x y)))
-    sheet))
-
-
-(define (dot x y radius) "") ;; TODO
-
-(define (beam width slope thick)
-  (string-append
-   (func "set-line-char" "#")
-   (func "rline-to" width (* width slope))
-   ))
-
-                                       ; simple flat slurs
-(define (bezier-bow l thick)
-  (let (
-       (c0 (cadddr l))
-       (c1 (cadr l))
-       (c3 (caddr l)))
-    (let* ((x (car c0))
-          (dx (- (car c3) x))
-          (dy (- (cdr c3) (cdr c0)))
-          (rc (/ dy dx))
-          (c1-dx (- (car c1) x))
-          (c1-line-y (+ (cdr c0) (* c1-dx rc)))
-          (dir (if (< c1-line-y (cdr c1)) 1 -1))
-          (y (+ -1 (* dir (max (* dir (cdr c0)) (* dir (cdr c3)))))))
-      (string-append
-       (func "rmove-to" x y)
-       (func "put" (if (< 0 dir) "/" "\\\\"))
-       (func "rmove-to" 1 (if (< 0 dir) 1 0))
-       (func "set-line-char" "_")
-       (func "h-line" (- dx 1))
-       (func "rmove-to" (- dx 1) (if (< 0 dir) -1 0))
-       (func "put" (if (< 0 dir) "\\\\" "/"))))))
-
-
-(define (bracket arch_angle arch_width arch_height height arch_thick thick)
-  ;; width now fixed?
-  (let ((width 1))
-    (string-append
-     (func "rmove-to" (+ width 1) (- (/ height -2) 1))
-     (func "put" "\\\\")
-     (func "set-line-char" "|")
-     (func "rmove-to" 0 1)
-     (func "v-line" (+ height 1))
-     (func "rmove-to" 0 (+ height 1))
-     (func "put" "/")
-     )))
-
-(define (polygon points blotdiameter) "") ;; TODO
-
-(define (char i)
-  (func "char" i))
-
-(define (define-origin a b c ) "")
-
-(define (end-output) 
-  (func "end-output"))
-
-(define (experimental-on)
-  "")
-
-(define (filledbox breapth width depth height)
-  (let ((dx (+ width breapth))
-       (dy (+ depth height)))
-    (string-append 
-     (func "rmove-to" (* -1 breapth) (* -1 depth))
-     (if (< dx dy)
-        (string-append
-         (func "set-line-char" 
-               (if (<= dx 1) "|" "#"))
-         (func "v-line" dy))
-        (string-append
-         (func "set-line-char" 
-               (if (<= dy 1) "-" "="))
-         (func "h-line" dx))))))
-
-(define (roundfilledbox breapth width depth height blot)
-  (filledbox breapth width depth height))
-
-(define (font-load-command name-mag command)
-  ;; (display "name-mag: ")
-  ;; (write name-mag)
-  ;; (display "command: ")
-  ;; (write command)
-  (func "load-font" (car name-mag) (cdr name-mag)))
-
-(define (header creator generate) 
-  (func "header" creator generate))
-
-(define (header-end) 
-  (func "header-end"))
-
-;; urg: this is good for half of as2text's execution time
-(define (xlily-def key val)
-  (string-append "(define " key " " (arg->string val) ")\n"))
-
-(define (lily-def key val)
-  (if
-   ;; let's not have all bloody definitions
-   (or (equal? key "lilypondpaperlinewidth")
-       (equal? key "lilypondpaperstaffheight")
-       (equal? key "lilypondpaperoutputscale"))
-   (string-append "(define " key " " (arg->string val) ")\n")
-   ""))
-
-(define (no-origin) "")
-
-(define (placebox x y s) 
-  (let ((ey (inexact->exact y)))
-    (string-append "(move-to " (number->string (inexact->exact x)) " "
-                  (if (= 0.5 (- (abs y) (abs ey)))
-                      (number->string y)
-                      (number->string ey))
-                  ")\n" s)))
-
-(define (select-font name-mag-pair)
-  (let* ((c (assoc name-mag-pair font-name-alist)))
-    (if (eq? c #f)
-       (begin
-         (ly:warn 
-          (string-append 
-           "Programming error: No such font known " 
-           (car name-mag-pair))))
-       "")                             ; issue no command
-    (func "select-font" (car name-mag-pair))))
-
-(define (start-system width height)
-  (func "start-system" width height))
-
-(define (stop-system)
-  (func "stop-system"))
-
-(define (stop-last-system)
-  (func "stop-system"))
-
-
-(define (text s)
-  (func "text" s))
-
-(define (tuplet ht gap dx dy thick dir) "")
-
diff --git a/scm/basic-properties.scm b/scm/basic-properties.scm
deleted file mode 100644 (file)
index 85eb346..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-; Definition of backend properties (aka. element properties).
-
diff --git a/scm/context-description.scm b/scm/context-description.scm
deleted file mode 100644 (file)
index 649a600..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-
-;; todo: move this to engraver-init.ly 
-
-(define-public context-description-alist
-  '(
-    (Grace . "
-   DEPRECATED; this is a 1.4 construct.
-")
-    (LyricsVoice . "
-    Corresponds to a voice with lyrics.  Handles the printing of a
-    single line of lyrics.
-")
-    (Thread . "
-    Handles note heads, and is contained in the Voice context.  You
-    have to instantiate this explicitly if you want to adjust the
-    style of individual note heads.
-")
-    (Voice . "
-    Corresponds to a voice on a staff.  This context handles the
-    conversion of dynamic signs, stems, beams, super- and subscripts,
-    slurs, ties, and rests.
-
-    You have to instantiate this explicitly if you want to have
-    multiple voices on the same staff.")
-
-    (ChordNamesVoice . "
-    A voice with chord names.  Handles printing of a line of chord
-    names.")
-
-    (ChordNames . "
-    Typesets chord names.  Can contain @code{ChordNamesVoice}
-    contexts.")
-
-    (Lyrics . "
-    Typesets lyrics.  It can contain @code{LyricsVoice} contexts.
-")
-    (Staff . "
-    Handles clefs, bar lines, keys, accidentals.  It can contain
-    @code{Voice} contexts.
-")
-    (RhythmicStaff . "
-    A context like @code{Staff} but for printing rhythms.  Pitches are
-    ignored; the notes are printed on one line.  It can contain
-    @code{Voice} contexts.
-")
-    (GrandStaff . "
-    Contains @code{Staff} or @code{RhythmicStaff} contexts.  It adds a
-    brace on the left side, grouping the staves together.  The bar
-    lines of the contained staves are connected vertically.  It can
-    contain @code{Staff} contexts.")
-
-    (PianoStaff . "
-    Just like @code{GrandStaff} but with @code{minVerticalAlign} set
-    equal to @code{maxVerticalAlign} so that interstaff beaming and
-    slurring can be used.")
-
-    (StaffGroup . "
-    Contains @code{Staff} or @code{RhythmicStaff} contexts.  Adds a
-    bracket on the left side, grouping the staves together.  The bar
-    lines of the contained staves are connected vertically.  It can
-    contain @code{Staff}, @code{RhythmicStaff}, @code{GrandStaff}, or
-    @code{Lyrics} contexts.
-")
-    (ChoirStaff . "
-    Identical to @code{StaffGroup} except that the contained staves
-    are not connected vertically.
-")
-    (Score . "
-    This is the top level notation context.  No other context can
-    contain a @code{Score} context.  This context handles the
-    administration of time signatures.  It also makes sure that items
-    such as clefs, time signatures, and key-signatures are aligned
-    across staves.  It can contain @code{Lyrics}, @code{Staff},
-    @code{RhythmicStaff}, @code{GrandStaff}, @code{StaffGroup}, and
-    @code{ChoirStaff} contexts.
-
-    You cannot explicitly instantiate a Score context (since it is
-    not contained in any other context).  It is instantiated
-    automatically when an output definition (a @code{\score} or
-    @code{\paper} block) is processed.
-")
-
-    (TabStaff . "Context for generating tablature. [DOCME]")
-    )
-  )
-
-(set! context-description-alist
-      (sort context-description-alist alist<?))
diff --git a/scm/define-grob-interfaces.scm b/scm/define-grob-interfaces.scm
new file mode 100644 (file)
index 0000000..25370f1
--- /dev/null
@@ -0,0 +1,98 @@
+;;;; interface-description.scm -- part of generated backend documentation
+;;;;
+;;;;  source file of the GNU LilyPond music typesetter
+;;;; 
+;;;; (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
+
+
+; should include default value?
+
+(ly:add-interface
+'note-name-interface
+ "Note name"
+ '(style))
+
+(ly:add-interface
+ 'dynamic-interface
+   "Any kind of loudness sign"
+   '()
+    )
+
+(ly:add-interface
+ 'finger-interface
+ "A fingering instruction"
+ '()
+ )
+
+(ly:add-interface
+ 'rhythmic-grob-interface
+ "Any object with a rhythmic basis. Used to determine which grobs 
+are interesting enough to maintain a hara-kiri staff."
+ '()
+ )
+
+(ly:add-interface
+ 'ligature-interface
+ "A ligature"
+ '()
+ )
+
+(ly:add-interface
+ 'ligature-bracket-interface
+ "A bracket indicating a ligature in the original edition"
+ '(width thickness height ligature-primitive-callback))
+
+(ly:add-interface
+ 'mark-interface
+ "a rehearsal mark"
+ '(
+   ))
+
+(ly:add-interface
+ 'metronome-mark-interface
+ "a rehearsal mark"
+ '(
+   ))
+
+;;; todo: this is not typesetting info. Move to interpretation.
+(ly:add-interface
+ 'tablature-interface
+ "tablature notes"
+ '())
+
+
+
+;; todo: figure out where  to put this doco:
+
+"
+Grob properties form a name space where you can set variables per
+object.  Each object however, may have multiple functions. For
+example, consider a dynamic symbol, such @code{\ff} (fortissimo). It
+is printed above or below the staff, it is a dynamic sign, and it is a
+kind of text.
+
+To reflect this different functions of a grob, procedures and variables
+are grouped into so-called interfaces.  The dynamic text for example
+supports the  following interfaces:
+@table @code 
+@item font-interface
+  The glyph is built from characters from a font, hence the
+@code{font-interface}. For objects supporting @code{font-interface}, you
+can select alternate fonts by setting @code{font-style},
+@code{font-point-size}, etc.
+
+@item dynamic-interface
+  Dynamic interface is not associated with any variable or function in
+particular, but this makes it possible to distinguish this grob from
+other similar grobs (like @code{TextScript}), that have no meaning of
+dynamics.
+
+@item text-interface
+  This interface is for texts that are to be set using special routines
+to stack text into lines, using kerning, etc.
+
+@item general-grob-interface
+  This interface is supported by all grob types.
+@end table
+"
diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm
new file mode 100644 (file)
index 0000000..8e0687d
--- /dev/null
@@ -0,0 +1,554 @@
+;;;; grob-property-description.scm -- part of generated backend documentation
+;;;;
+;;;;  source file of the GNU LilyPond music typesetter
+;;;; 
+;;;; (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
+
+
+
+(define-public all-backend-properties '())
+
+(define (grob-property-description symbol type? description)
+  (if (not (equal? (object-property symbol 'backend-doc) #f))
+      (begin
+       (ly:warn (string-append "Redefining " (symbol->string symbol) "\n"))
+       (exit 2)
+      ))
+  
+  (set-object-property! symbol 'backend-type? type?)
+  (set-object-property! symbol 'backend-doc description)
+  (set! all-backend-properties (cons symbol all-backend-properties))
+  )
+
+;; put this in an alist?
+
+(grob-property-description 'X-extent-callback procedure? "procedure taking an grob and axis argument, returning a number-pair. The return value is the extent of the grob.
+
+The size of a grob are determined through callbacks, settable with
+grob properties @code{X-extent-callback} and @code{Y-extent-callback}.
+There can be only one extent-callback for each axis. No callback
+(Scheme value @code{#f}) means: `empty in this direction'. If you fill
+in a pair of numbers, that pair hard-codes the extent in that
+coordinate.
+")
+(grob-property-description 'X-offset-callbacks list? "list of functions, each taking an grob and axis argument. The function determine the position relative to this grob's parent. The last one in the list is called first.
+
+Offsets of grobs are relative to a parent reference point. Most
+positions are not known when an object is created, so these are
+calculated as needed. This is done by adding a callback for a specific
+direction.
+
+Offset callbacks can be stacked, i.e.
+
+@example
+        \property .... \override #'Y-offset-callbacks = #(list
+                callback1 callback2 callback3)
+
+@end example
+
+The callbacks will be executed in the order @code{callback3 callback2
+callback1}. This is used for quantized positioning: the staccato dot is
+above or below a note head, and it must not be on a staff-line.  To
+achieve this, the staccato dot has two callbacks: one that positions the
+grob above or below the note head, and one that rounds the Y-position of
+the grob to the nearest open space.
+
+
+")
+(grob-property-description 'Y-extent-callback procedure? "see @code{X-extent-callback}.")
+(grob-property-description 'Y-offset-callbacks list? "see @code{X-offset-callbacks}.")
+
+(grob-property-description 'accidental-grobs list? "Alis with (NOTENAME . GROBLIST) entries")
+(grob-property-description 'accidentals list? "List of alteration numbers.")
+(grob-property-description 'add-stem boolean? "does this flexa shape require an additional stem on the left side?.")
+(grob-property-description 'adjust-if-on-staffline boolean? "If this grob is on a staff line, adjust its appearance, so that it better fits into the staff.  E.g., if set true on stem grobs, flares of mensural flags will always be aligned with the staff lines, regardless if the associated note head is printed on a staff line or inbetween.")
+(grob-property-description 'after-line-breaking-callback procedure? "Procedure taking a grob as argument.
+This procedure is called (using dependency resolution) after line breaking. Return value is ignored.")
+(grob-property-description 'align-dir ly:dir? "Which side to align? -1: left side, 0: around center of width, 1: right side.")
+(grob-property-description 'alignment-done boolean? "boolean to administrate whether we've done the alignment already (to ensure that the process is done only once).")
+(grob-property-description 'all-elements grob-list? "list of all grobs in this line. Needed for protecting grobs from GC.")
+(grob-property-description 'arch-angle number? "turning angle of the hook of a system brace" )
+(grob-property-description 'arch-height ly:dimension? "height of the hook of a system brace.")
+(grob-property-description 'arch-thick number? "thickness of the hook of system brace.")
+(grob-property-description 'arch-width ly:dimension? "width of the hook of a system brace.")
+(grob-property-description 'arpeggio ly:grob? "pointer to arpeggio object.") 
+(grob-property-description 'arpeggio-direction ly:dir? "If set, put an
+arrow on the arpeggio squiggly line.")
+(grob-property-description 'ascendens boolean? "is this neume of an ascending?.")
+(grob-property-description 'attachment pair? "cons of symbols
+indicating how a slur should be attached at the ends. The format is
+'(LEFT-TYPE . RIGHT-TYPE), where both TYPEs are symbols. The values of
+these symbols may be alongside-stem, stem, head or loose-end.")
+(grob-property-description 'attachment-offset pair? "cons of offsets,
+'(LEFT-offset . RIGHT-offset).  This offset is added to the
+attachments to prevent ugly slurs.  [fixme: we need more documentation here].
+.")
+(grob-property-description 'auctum boolean? "is this neume augmented?.")
+(grob-property-description 'auto-knee-gap ly:dimension? "If a gap is found between noteheads
+where a  horizontal beam fits that is larger than this number,  make a kneed beam.")
+(grob-property-description 'axes list? "list of axis numbers.
+In the case of alignment grobs, this should contain only one number.")
+(grob-property-description 'bar-size ly:dimension? "size of a bar line.")
+(grob-property-description 'bars grob-list? "list of barline pointers.")
+(grob-property-description 'bar-size-procedure procedure? "Procedure that computes the size of a bar line.")
+(grob-property-description 'base-shortest-duration ly:moment?
+                          "Spacing is based on the shortest notes in a piece. Normally, pieces are spaced as if notes at least as short as this are present.")
+(grob-property-description 'baseline-skip ly:dimension? "Baseline skip to use for multiple lines of text.")
+(grob-property-description 'bass list? " musical-pitch, optional.")
+(grob-property-description 'beam ly:grob? "pointer to the beam, if applicable.")
+(grob-property-description 'beam-thickness ly:dimension? "thickness, measured in staffspace.")
+(grob-property-description 'beam-width ly:dimension? "width of the tremolo sign.")
+(grob-property-description 'beamed-lengths list? "list of stem lengths given beam multiplicity .")
+(grob-property-description 'beamed-minimum-free-lengths list? "list of normal minimum free stem lengths (chord to beams) given beam multiplicity.")
+(grob-property-description 'beamed-extreme-minimum-free-lengths list? "list of extreme minimum free stem lengths (chord to beams) given beam multiplicity.")
+(grob-property-description 'beamed-stem-shorten list? "shorten beamed stems in forced direction.")
+(grob-property-description 'beaming pair?
+                          "Pair of number lists. Each number list
+specifies which beams to make. 0 is the central beam, 1 is the next
+beam toward the note etc. This information is used to determine how to
+connect the beaming patterns from stem to stem inside a beam.")
+
+
+(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-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 '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 grob-list? "list of spanners that have this
+column as start/begin point. Only columns that have grobs or act as bounds are spaced.")
+(grob-property-description 'bracket-thick number? "width of a system start bracket. .")
+(grob-property-description 'break-align-symbol symbol? "the index in the spacing table (symbol) of the to be aligned item.")
+(grob-property-description 'break-glyph-function procedure? "function taking glyph and break-direction, returning the glyph at a line break.")
+(grob-property-description 'breakable boolean? "boolean indicating if this is a breakable item (clef, barline, key sig, etc.).")
+(grob-property-description 'c0-position integer? "integer indicating the position of central C.")
+(grob-property-description 'cautionary-style symbol? "style  of cautionary accidentals. Choices are 'smaller (one size smaller) or 'parentheses.")
+(grob-property-description 'cautionary boolean? "is this a cautionary accidentals.?")
+
+(grob-property-description 'center-element ly:grob? "grob which will
+be at the center of the group after aligning (when using
+Align_interface::center_on_element). .")
+(grob-property-description 'concaveness-gap ly:dimension? "A beam is
+considered to be concave if the distance of an inner notehead to the
+line between two outer noteheads is bigger than this gap.")
+(grob-property-description 'concaveness-threshold number? "A beam is
+considered to be concave is concaveness is bigger than this threshold.
+Concaveness is calculated as the sum of the vertical distances of
+inner noteheads that fall outside the interval of the two outer
+noteheads, to the vertically nearest outer notehead, divided by the
+square of the inner notes involved.")
+(grob-property-description 'collapse-height ly:dimension? "Minimum height of system start delimiter.  If equal or smaller, the bracket is removed.")
+
+(grob-property-description 'columns grob-list? "list of grobs, typically containing paper-columns.")
+(grob-property-description 'conditional-elements grob-list? "Internal use only")
+(grob-property-description 'context-info integer? "DOCME")
+
+(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.")
+(grob-property-description 'dash-period number? "the length of one dash + white space.")
+(grob-property-description 'dashed number? "[FIXME: use dash-period/dash length; see text-spanner] number representing the length of the dashes.")
+(grob-property-description 'descendens boolean? "is this neume of a descendent type?.")
+(grob-property-description 'de-uglify-parameters list? "list of 3 real constants. They define the valid areas for the middle control points. Used in de_uglyfy. They are a bit empirical.")
+
+(grob-property-description 'neutral-direction ly:dir? "Where to go if we're on the neutral position of the staff (by default, the middle of the staff; see also grob-property neutral-position).  [Ross] has the following to say about this: Some engravers consider the middle line neutral, and take the option of using either up- or down-stems for notes that fall on it. However, more up-to-date engraving no longer permits an option; now a down-stem is always appropriate.")
+(grob-property-description 'neutral-position number? "Position (in half staff spaces) where to flip the direction of stems: by default, custodes above this position get their stems downwards; custodes below this position get their stems upwards.  A value of 0 designates the center of the staff.  Use property neutral-direction to control the behaviour of stems on the neutral position itself.  (Note: currently, neutral-position is supported only for custodes; for stems of note heads, neutral-position is currently fixed to 0, i.e. the middle of the staff.)")
+(grob-property-description 'deminutum boolean? "is this neume deminished?.")
+(grob-property-description 'dependencies grob-list? "list of score-grob pointers that indicate who to compute first for certain global passes.")
+(grob-property-description 'details list? "alist of parameters for detailed grob behavior.")
+(grob-property-description 'dir-function procedure? "function of type (count total)->direction.  Default value: beam-dir-majority, also available: beam-dir-mean, beam-dir-median.
+
+The ways to calculate the direction of a beam work as follows:
+@table @code
+@item majority
+number count of up or down notes
+@item mean
+mean center distance of all notes
+@item median
+mean centre distance weighted per note
+@end table
+
+")
+(grob-property-description 'direction ly: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 'edge-height pair? "a cons that specifies the heights of the vertical edges '(LEFT-height . RIGHT-height).")
+(grob-property-description 'edge-widen 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).")
+(grob-property-description 'elements grob-list? "list of grobs, type depending on the Grob where this is set in.")
+(grob-property-description 'expand-limit integer? "maximum number of measures expanded in church rests.")
+(grob-property-description 'extra-X-extent number-pair? "enlarge in X dimension by this much, measured in staff space.")
+(grob-property-description 'extra-Y-extent number-pair? "see @code{extra-Y-extent}.")
+(grob-property-description 'X-extent number-pair? "Store extent. internal use only. ")
+(grob-property-description 'Y-extent number-pair? "Store extent. internal use only. ")
+(grob-property-description 'extra-offset number-pair? "pair of reals
+(a cons) forcing an extra offset before outputting.
+@code{extra-offset} is added just before `printing' the grob, so the
+typesetting engine is completely oblivious to it.
+")
+(grob-property-description 'extremity-offset-alist list? "an alist (attachment stem-dir*dir slur-dir*dir) -> offset.  The offset adds to the centre of the notehead, or stem.")
+
+(grob-property-description 'extremity-rules list? "an alist (procedure
+slur dir) -> attachment to determine the attachment (see above).  If
+procedure returns #t, attachment is used.  Otherwise, the next
+procedure is tried.")
+(grob-property-description
+ 'flag-style symbol?
+ "a string determining what style of glyph is typeset on a Stem. Valid
+options include undefined and mensural.
+  Additionally, @code{no-flag} switches off the flag.")
+(grob-property-description 'stroke-style string? "set to \"grace\" to turn stroke through flag on.")
+(grob-property-description 'flag-width-function procedure? "Procedure that computes the width of a half-beam (a non-connecting beam.).")
+(grob-property-description 'flexa-height ly:dimension? "height of a flexa shape in a ligature grob in staff_space.")
+(grob-property-description 'flexa-width ly:dimension? "width of a flexa shape in a ligature grob in staff_space.")
+(grob-property-description 'font-family symbol? "partial font
+definition: music roman braces dynamic math ...")
+(grob-property-description 'font-name string? "file name for the font to load.
+Overrides all other font-X qualifiers.")
+(grob-property-description 'font-design-size number? "partial font definition: exact font size in points FIXME: should override font-relative-size.")
+(grob-property-description 'font-magnification number? "Magnification
+  of the font. If undefined, the default is @code{1.0}.")
+
+(grob-property-description 'font-relative-size number? "partial font
+definition: the relative size compared the `normal' size.  0 is
+style-sheet's normal size, -1 is smaller, +1 is bigger.")
+
+(grob-property-description 'font-series symbol? "partial font definition: medium, bold.")
+(grob-property-description 'font-shape symbol? "partial font definition: upright or italic.")
+
+(grob-property-description 'font-style symbol? "a precooked set of font
+definitions, eg. finger volta timesig mark script large Large
+dynamic.")
+
+(grob-property-description 'force-hshift number? "amount of
+collision_note_width that overides automatic collision settings. This
+is used by @ref{note-collision-interface}.")
+
+(grob-property-description 'fraction number-pair? "fraction of a time signature.")
+(grob-property-description 'french-beaming boolean? "Use French
+beaming style: stems stop at innermost beams.")
+(grob-property-description 'full-size-change boolean? "if set, don't make a change clef smaller.")
+
+(grob-property-description 'glyph string? "a string determining what (style) of  glyph is typeset. Valid choices depend on the function that is reading this property. .")
+(grob-property-description 'glyph-name string? "a name of character within font.")
+(grob-property-description 'glyph-name-procedure procedure? "Return
+name of character within font.")
+
+(grob-property-description 'gap ly:dimension? "Size of a gap in a variable symbol.")
+
+(grob-property-description 'grow-direction ly:dir? "crescendo or decrescendo?.")
+(grob-property-description 'hair-thickness number? "thickness, measured in stafflinethickness.")
+(grob-property-description 'heads pair? "Pair of grob pointers, pointing to the two heads of the  tie.")
+(grob-property-description 'height ly:dimension? "in staffspace.")
+(grob-property-description 'height-limit ly:dimension? "Maximum slur height,
+  long slurs approach this height.
+
+  For small width w, the height should be proportional to w, for w ->
+  infinity, the height should rise to limit h_infinity asymptotically.
+
+  Hence we take F (x) such that
+@quotation
+@example  
+  F (0) = 0 , F' (0) = 1, and F (infinity) = 1
+@end example
+@end quotation
+  where
+@quotation
+@example  
+  h = height-limit * F (x * ratio / height-limit)
+@end example
+@end quotation
+  Currently, for F we use
+@quotation
+@example  
+  F (x) = 2/pi * atan (pi * x/2)
+@end example
+@end quotation
+")
+(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 'ideal-distances list? "(OBJ . (DIST . STRENGTH)) pairs.")
+(grob-property-description 'inclinatum boolean? "is this neume an inclinatum?.")
+(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.")
+(grob-property-description 'items-worth-living grob-list? "list of interesting items. If empty in a particular system, clear that system.")
+(grob-property-description 'join-heads boolean? "Whether to join the noteheads of an ambitus grob with a vertical line.")
+(grob-property-description 'kern ly:dimension? "amount of extra white
+space to add. For barline, space after a thick line.")
+(grob-property-description 'knee boolean? "Is this beam a knee?")
+(grob-property-description 'knee-spacing-correction number? "optical correction amount for knees. 0: no correction; 1: full correction.")
+(grob-property-description 'layer number? "The output layer [0..2].  The default is 1.")
+
+(grob-property-description 'left-position number? "position of left part of spanner.")
+(grob-property-description 'right-position number? "position of right part of spanner.")
+(grob-property-description 'left-padding ly:dimension? "space left of accs.")
+
+(grob-property-description 'left-widen boolean? "Whether the left edge of a piano pedal bracket should be widened by the first element of edge-widen.")
+
+(grob-property-description 'length ly:dimension? "Stem length for unbeamed stems, only for user override.")
+(grob-property-description 'lengths list? "Stem length given
+multiplicity of flag.  The Nth element of the list gives the stem
+length of a note with N flags.
+")
+(grob-property-description 'line-count integer? "Number of staff
+lines.  If you want to override this for staffs individually, you must
+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 'maximum-length ly:dimension? "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-length ly:moment? "Length of a
+measure. Used in some spacing situations.")
+(grob-property-description 'measure-count integer? "number of measures for a multimeasure rest.")
+
+(grob-property-description 'merge-differently-headed boolean? "Merge
+noteheads in collisions, even if they have different note heads. The
+smaller of the two heads will be rendered invisible. This used
+polyphonic guitar notation. The value of this setting is used by
+@ref{note-collision-interface} .")
+
+(grob-property-description 'merge-differently-dotted boolean? " Merge
+noteheads in collisions, even if they have a different number of
+dots. This normal notation for some types of polyphonic music. The
+value of this setting is used by @ref{note-collision-interface} .")
+
+(grob-property-description 'meta list? "Alist of meta information of this grob.
+
+The alist contains the following entries: name, interfaces.
+
+
+
+")
+(grob-property-description 'minimum-distance ly:dimension? "minimum distance between notes and rests.")
+(grob-property-description 'minimum-distances list? "list of rods (ie. (OBJ . DIST) pairs).")
+
+(grob-property-description 'minimum-X-extent number-pair? "minimum size in X dimension, measured in staff space.")
+(grob-property-description 'minimum-Y-extent number-pair? "see @code{minimum-Y-extent}.")
+(grob-property-description 'minimum-length ly:dimension? "try to make the
+Grob at least this long.
+
+Also works as a scaling parameter for the length of hyphen. .")
+
+(grob-property-description 'minimum-space ly:dimension? "minimum distance that the victim should move (after padding).")
+
+(grob-property-description 'molecule-callback procedure? "Function
+taking grob as argument, returning a smobbed Molecule.
+
+All visible, i.e. non-transparent, grobs have a callback to create a
+Molecule. The callback should be a Scheme function taking one argument
+(the grob) and returning a Molecule.  Most molecule callbacks are
+written in C++, but you can also write them in Scheme. An example is
+provided in @code{input/regression/molecule-hacking.ly}.
+")
+
+(grob-property-description 'molecule ly:molecule? "Cached output of the molecule-callback.")
+
+(grob-property-description 'new-accidentals list? "list of (pitch, accidental) pairs.")
+(grob-property-description 'no-spacing-rods boolean? "read from grobs: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM).")
+(grob-property-description 'no-stem-extend boolean? "should stem not be extended to middle staff line?.")
+(grob-property-description 'non-default boolean? "not set because of existence of a bar?.")
+(grob-property-description 'note-head-style string? "name of the font character to be used as note heads in the ambitus grob.")
+(grob-property-description 'note-heads grob-list? "List of note head grobs")
+(grob-property-description 'old-accidentals list? "list of (pitch, accidental) pairs.")
+(grob-property-description 'oriscus boolean? "is this neume an oriscus?.")
+(grob-property-description 'enclose-bounds boolean? "whether a text spanner should extend to the outer edge of the spanned notes")
+(grob-property-description 'padding ly:dimension? "add this much extra space between objects that are next to each other.")
+(grob-property-description 'pedal-type symbol? "Style of piano pedal: text, bracket or mixed.")
+(grob-property-description 'pedal-text ly:grob? "Pointer to the text of a mixed-style piano pedal.")
+(grob-property-description 'penalty number? "Penalty for breaking at
+this column. 10000 or more means forbid linebreak, -10000 or less
+means force linebreak.  Other values influence linebreaking decisions
+as a real penalty.")
+
+(grob-property-description 'pes-or-flexa boolean? "shall this neume be joined with the previous head?.")
+(grob-property-description 'pitch-max ly:pitch? "FIXME, JUNKME")
+(grob-property-description 'pitch-min ly:pitch? "FIXME, JUNKME")
+
+
+(grob-property-description 'pitches list? "list of musical-pitch.")
+(grob-property-description 'quilisma boolean? "is this neume a quilisma?.")
+(grob-property-description 'positions pair? "cons of staff positions (LEFT . RIGHT")
+(grob-property-description 'prefix-set number? "DOCME")
+(grob-property-description 'ratio number? "Slur parameter.  See height-limit.")
+(grob-property-description 'right-padding ly:dimension? "space right of accs.")
+(grob-property-description 'right-trim-amount ly:dimension? "shortening of the lyric extender on the right.")
+(grob-property-description 'right-widen boolean? "Whether the right edge of a piano pedal bracket should be widened by the second element of edge-widen")
+(grob-property-description 'script-priority number? "A sorting key that determines in what order a script is within a stack of scripts.")
+(grob-property-description 'self-alignment-X number-or-grob? "real number: -1 =
+left aligned, 0 = center, 1 right-aligned in X direction.
+
+ Set to an grob pointer, if you want that grob to be the center.
+In this case, the center grob should have this object as a
+reference point.
+
+TODO: revise typing.")
+(grob-property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis.")
+(grob-property-description 'semivocalis boolean? "is this neume a lisquescending one?.")
+(grob-property-description 'shorten ly:dimension? "the amount of space that a stem should be shortened (DOCME!)")
+(grob-property-description 'shorten-pair number-pair? "the length on each side to shorten a text-spanner, for example a pedal bracket")
+(grob-property-description 'common-shortest-duration ly:moment?
+                          "The most common shortest note length.
+This is used in spacing. Making this larger will make the score tighter.")
+(grob-property-description 'shortest-duration-space ly:dimension? "Start
+with this much space for the shortest duration. This is explessed in @code{spacing-increment} as unit. See also
+@ref{spacing-spanner-interface}.")
+(grob-property-description 'shortest-playing-duration ly:moment? "duration of the shortest playing in that column.")
+(grob-property-description 'shortest-starter-duration ly:moment? "duration of the shortest notes that starts exactly in this column.")
+(grob-property-description 'side-relative-direction ly:dir? "if set: get the direction from a different object, and multiply by this.")
+(grob-property-description 'side-support-elements grob-list? "the support, a list of grobs.")
+(grob-property-description 'slope number? "some kind of slope")
+(grob-property-description 'slope-limit number? "set slope to zero if slope is running away steeper than this.")
+
+(grob-property-description 'space-alist list? "Alist of break align
+spacing tuples: format = (SYMBOL . (TYPE . DISTANCE)), where TYPE can be
+minimum-space or extra-space.")
+(grob-property-description 'space-function procedure? "return interbeam space given Beam grob and multiplicity.")
+(grob-property-description 'spacing-increment number? "Add this much space for a doubled duration. Typically, the width of a note head. See also @ref{spacing-spanner-interface}.")
+
+(grob-property-description 'spacing-wishes grob-list? "List of note spacing or staff spacing objects.")
+(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
+itself.  Return value is ignored.")
+(grob-property-description 'stacking-dir ly:dir? "stack contents of grobs in which direction ?.")
+(grob-property-description 'staff-space ly:dimension? "Amount of line leading relative to global staffspace.")
+(grob-property-description 'staff-position number? "vertical position in staff spaces, counted from the middle line.")
+
+(grob-property-description 'staffline-clearance ly:dimension? "don't get closer than this to stafflines.")
+(grob-property-description 'stem ly:grob? "pointer to Stem object.")
+(grob-property-description 'stem-attachment-function procedure? "Where
+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-end-position number? "Where does the stem end (the end is opposite to the support-head.")
+
+(grob-property-description 'stem-shorten list? "shorten stems in forced directions given flag multiplicity:
+the Nth element of the list gives the amount stem shortening of a note with N flags.
+")
+(grob-property-description 'stem-spacing-correction number? "optical correction amount.  [TODO: doco] ")
+(grob-property-description 'stems grob-list? "list of stem objects, corresponding to the notes that the arpeggio has to be before.")
+(grob-property-description 'stropha boolean? "is this neume a stropha?.")
+(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.")
+(grob-property-description 'text markup? "Text markup.  See reference manual for more information.")
+(grob-property-description 'text-start boolean? "Indicator for whether a piano pedal bracket has leading text, such as Ped.")
+(grob-property-description 'thick-thickness number? "thickness, measured in stafflinethickness.")
+(grob-property-description 'thickness number? "thickness, measured in stafflinethickness.")
+(grob-property-description 'thin-kern number? "space after a hair-line.")
+(grob-property-description 'forced-distance ly:dimension? "forced distance for an alignment.")
+
+(grob-property-description 'threshold number-pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace.")
+(grob-property-description 'transparent boolean? "This is almost the
+same as setting molecule-callback to #f, but this retains the
+dimensions of this grob, which means that you can erase grobs
+individually. .")
+(grob-property-description 'bracket-visibility boolean-or-symbol? "
+This controls the visibility of the tuplet bracket.
+Setting it to false will prevent printing of the
+bracket. Setting the property to #'if-no-beam will make it
+print only if there is no beam associated with this tuplet bracket.")
+(grob-property-description 'number-visibility boolean-or-symbol? "
+Like @code{bracket-visibility}, but for the number.")
+(grob-property-description 'tie ly:grob? "") 
+(grob-property-description 'type symbol? " 
+
+")
+
+(grob-property-description 'break-visibility procedure? "a function
+that takes the break direction and returns a cons of booleans
+containing (TRANSPARENT . EMPTY).
+")
+
+(grob-property-description 'virga boolean? "is this neume a virga?.")
+(grob-property-description 'when ly:moment? "when does this column happen?.")
+(grob-property-description 'word-space ly:dimension? "elongate left (?) by this much (FIXME: cumbersome semantics).")
+
+(grob-property-description 'alignment number? "alignment of lyrics on notehead, -1 is LEFT, 0 is CENTRE, 1 is RIGHT .")
+(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 ly:dimension? "width of a grob measured in staff space.")
+(grob-property-description 'width-correct ly:dimension? "width correction for (de)cresc. text spanners.")
+(grob-property-description 'x-gap ly:dimension? "horizontal gap between notehead and tie.")
+(grob-property-description 'x-offset ly:dimension? "extra horizontal offset for ligature heads.")
+(grob-property-description 'y-free ly:dimension? "minimal vertical gap between slur and noteheads or stems.")
+(grob-property-description 'y-offset ly:dimension? "extra vertical offset
+for ties away from the center line.")
+(grob-property-description 'zigzag-length ly:dimension? "The length of the
+lines of a zigzag - relative to zigzag-width. a value of 1
+gives 60-degree zigzags.")
+(grob-property-description 'zigzag-width ly:dimension? "the width of one
+zigzag-squiggle, measured in staff space. The width will be adjusted
+so that the line can be constructed from a whole number of squiggles.")
+
+
+;;; INTERNAL
+
+(grob-property-description 'left-neighbors grob-list? " List of
+spacing-wish grobs that are close to the current column.
+
+The closest spacing-wishes determine the actual distances between the
+columns.
+")
+(grob-property-description 'right-neighbors grob-list? "see left-neighbors")
+(grob-property-description 'left-items grob-list? "")
+(grob-property-description 'right-items grob-list? "")
+(grob-property-description 'cause scheme? "Any kind of causation objects (i.e. music, or perhaps translator) that was the cause for this grob.  ")
+(grob-property-description 'font ly:font-metric? "Cached font metric object")
+(grob-property-description 'break-alignment-done boolean? "mark flag to signal we've done alignment already.")
+(grob-property-description
+ 'staff-padding ly:dimension?
+ "Maintain this much space to the staff.  It's effect is similar to
+the padding mechanism, but this will keep objects above and below the
+staff in a row more often, when the heights of the notes vary.
+")
+
+(grob-property-description 'staff-symbol ly:grob? "the staff symbol grob that we're in.")
+(grob-property-description 'collision-done boolean? "")
+(grob-property-description 'rest ly:grob? "the staff symbol grob that we're in.")
+(grob-property-description 'rest-collision ly:grob? "rest collision that a rest is in.")
+(grob-property-description 'rest-collision-done boolean? "Is this rest collision processed yet?")
+
+(grob-property-description 'script-molecule pair? "Index code for script -- internal, see script.cc.")
+
+(grob-property-description 'accidental-grob ly:grob? "Accidental for this note.")
+
+(grob-property-description 'causes list? "list of cause objects; these can be music objects or grobs.")
+(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? "?")
+
+(grob-property-description 'quant-score number? "Beam quanting score
+-- can be stored for debugging")
+(grob-property-description 'least-squares-dy number? 
+ "ideal beam slope, without damping.")
+(grob-property-description 'ligature-primitive-callback procedure? "callback that brews ligature head.")
+(grob-property-description 'stem-info pair? "caching of stem parameters")
+(grob-property-description 'note-columns pair? "list of NoteColumn grobs.")
+
+(grob-property-description 'if-text-padding number? "padding in case texts are there.")
+(grob-property-description 'grace-space-factor number? "space grace at this fraction of the increment.")
+(grob-property-description 'position-callbacks list? "list of
+functions set spanner positions.")
+(grob-property-description 'join-left number? "in ligature such as pes and flexa, the length of the vertical joining beam attached to the left side of the head")
+(grob-property-description 'delta-pitch number? "DOCME")
+(grob-property-description 'head-width ly:dimension? "width of this ligature head")
+(grob-property-description 'primitive number? "DOCME")
+(grob-property-description 'minimum-beam-collision-distance ly:dimension?
+"Minimum distance to beam for a rest collision.")
+
+(grob-property-description 'avoid-note-head boolean? "if set, the stem of a chord does not pass through all note head, but start at the last note head. Used by tablature.")
+
+(grob-property-description 'up-to-staff boolean? "if set, stems' lengths are set so as stems end out of the staff. Used by tablature.")
+
+(grob-property-description 'use-breve-rest boolean? "boolean that
+tells multi-measure-rest to use a breve rest to represent the duration
+of 1 measure instead of whole rest.  It defaults to false.  It is set
+to true when the duration of a measure is a breve or longer.")
+
+; (display (length all-backend-properties))
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
new file mode 100644 (file)
index 0000000..de352b2
--- /dev/null
@@ -0,0 +1,1258 @@
+;;;; grob-description.scm -- part of generated backend documentation
+;;;;
+;;;;  source file of the GNU LilyPond music typesetter
+;;;; 
+;;;; (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
+
+;;;; distances are given in stafflinethickness (thicknesses) and
+;;;; staffspace (distances)
+
+;;;; WARNING: the meta field should be the last one.
+;;;; WARNING: don't use anonymous functions for initialization. 
+
+;; TODO: junk the meta field in favor of something more compact?
+(define-public all-grob-descriptions
+  `(
+    (Accidental
+     . (
+       (molecule-callback . ,Accidental_interface::brew_molecule)
+       (font-family . music)
+       (cautionary-style . parentheses)
+       (after-line-breaking-callback . ,Accidental_interface::after_line_breaking)             (meta . ((interfaces . (item-interface accidental-interface font-interface))))
+       ))
+    (AccidentalPlacement
+     . (
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (left-padding . 0.3)
+
+       ;; this is quite small, but it is very ugly to have
+       ;; accs closer to the previous note than to the next one.
+       (right-padding . 0.15)
+       (meta . ((interfaces . (item-interface accidental-placement-interface))))
+       ))
+
+    (Ambitus
+     . (
+       (breakable . #t)
+       (break-align-symbol . ambitus)
+       (molecule-callback . ,Ambitus::brew_molecule)
+       (font-family . music)
+       (note-head-style . "noteheads-2")
+       (visibility-lambda . ,begin-of-line-visible)
+       (join-heads . #t)
+       (space-alist . (
+                      (clef . (extra-space . 0.0))
+                      (key-signature . (extra-space . 0.0))
+                      (staff-bar . (extra-space . 0.0))
+                      (time-signature . (extra-space . 0.0)) 
+                      (first-note . (extra-space . 0.0))
+                      ))
+       (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface break-aligned-interface item-interface  font-interface))))
+       ))
+
+    (Arpeggio
+     . (
+       (X-extent-callback . ,Arpeggio::width_callback)
+       (Y-extent-callback . #f)               
+       (molecule-callback . ,Arpeggio::brew_molecule)
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
+       (X-offset-callbacks . (,Side_position_interface::aligned_side))
+       (direction . -1)
+       (staff-position . 0.0)
+       (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface item-interface font-interface))))
+       ))
+
+    (BarLine
+     . (
+       (break-align-symbol . staff-bar)
+       (glyph . "|")
+       (break-glyph-function . ,default-break-barline)
+       (bar-size-procedure . ,Bar_line::get_staff_bar_size)
+       (molecule-callback . ,Bar_line::brew_molecule)     
+       (break-visibility . ,all-visible)
+       (breakable . #t)
+       (before-line-breaking-callback . ,Bar_line::before_line_breaking)
+       (space-alist . (
+                       (time-signature . (extra-space . 0.75)) 
+                       (custos . (minimum-space . 2.0))
+                       (clef .   (minimum-space . 1.0))
+                       (first-note . (extra-space . 1.3))
+                       (right-edge . (extra-space . 0.0))
+                       ))
+
+       ;;
+       ;; Ross. page 151 lists other values, we opt for a leaner look
+       ;; 
+       (kern . 3.0)
+       (thin-kern . 3.0)
+       (hair-thickness . 1.6)
+       (thick-thickness . 6.0)
+       (meta . ((interfaces . (bar-line-interface item-interface   break-aligned-interface font-interface))))
+       ))
+
+    
+    (BarNumber
+     . (
+       (molecule-callback . ,Text_item::brew_molecule)
+       (breakable . #t)
+       (break-visibility . ,begin-of-line-visible)
+       (padding . 1.0)
+       (direction . 1)
+       (font-family . roman)
+       (font-relative-size . -1)
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
+       (self-alignment-X . 1)
+       (extra-offset . (1.3 . 0))
+       (meta .
+             ((interfaces . (side-position-interface
+                             text-interface
+                             self-alignment-interface
+                             font-interface item-interface  break-aligned-interface))))
+
+            ))
+
+    (BassFigure
+     . (
+       (molecule-callback . ,brew-new-markup-molecule)
+       (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
+       (direction . 1)
+       (font-family . number)
+       (font-relative-size . -1)
+       (kern . 0.2)
+       (meta . ((interfaces . (text-interface                                                  rhythmic-grob-interface
+                                                                                               bass-figure-interface item-interface
+                                                                                               self-alignment-interface font-interface))))
+       ))
+    (Beam
+     . (
+       ;; todo: clean this up a bit: the list is getting
+       ;; rather long.
+       (molecule-callback . ,Beam::brew_molecule)
+       (concaveness-gap . 2.0)
+       (concaveness-threshold . 0.08)
+       (positions . (#f . #f))
+       (position-callbacks . (,Beam::least_squares
+                              ,Beam::check_concave
+                              ,Beam::slope_damping
+                              ,Beam::shift_region_to_valid
+                              ,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)
+       (neutral-direction . -1)
+       (dir-function . ,beam-dir-majority-median)
+       
+       ;; Whe have some unreferenced problems here.
+       ;;
+       ;; If we shorten beamed stems less than normal stems (1 staffspace),
+       ;; or high order less than 8th beams, patterns like
+       ;;     c''4 [c''8 c''] c''4 [c''16 c]
+       ;; are ugly (different stem lengths).
+       ;;
+       ;; But if we shorten 16th beams as much as 8th beams, a single
+       ;; forced 16th beam looks *very* short.
+
+       ;; We choose to shorten 8th beams the same as single stems,
+       ;; and high order beams less than 8th beams, so that all
+       ;; isolated shortened beams look nice and a bit shortened,
+       ;; sadly possibly breaking patterns with high order beams.
+       (beamed-stem-shorten . (1.0 0.5 0.25))
+       
+       (outer-stem-length-limit . 0.2)
+       (slope-limit . 0.2)
+       (flag-width-function . ,beam-flag-width-function)
+       (damping . 1)
+       (auto-knee-gap . 5.5)
+       (font-name . "cmr10")
+       (space-function . ,Beam::space_function)
+       (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
+       ))
+
+    (BreakAlignment
+     . (
+       (breakable . #t)
+       (stacking-dir . 1)
+       (axes . (0))
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (meta . ((interfaces . (break-alignment-interface item-interface axis-group-interface)))))
+       )
+
+    (BreakAlignGroup
+     . (
+       (axes  . (0))
+       (X-offset-callbacks . (,Break_align_interface::alignment_callback))
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (meta . ((interfaces . (break-aligned-interface item-interface axis-group-interface item-interface ))))
+       ))
+
+    (BreathingSign
+     . (
+       (break-align-symbol . breathing-sign)
+       (breakable . #t)
+       (space-alist . (
+                       (ambitus . (extra-space . 2.0))
+                       (custos . (minimum-space . 1.0))
+                       (key-signature . (minimum-space . 1.5))
+                       (staff-bar . (minimum-space . 1.5))
+                       (clef . (minimum-space . 2.0))
+                       (first-note . (minimum-space . 1.0))
+                       (right-edge . (extra-space . 0.1))
+                       ))
+       (molecule-callback . ,Breathing_sign::brew_molecule)
+       (lookup . name)
+       (font-family . music)
+       (text . "scripts-rcomma")
+       (Y-offset-callbacks . (,Breathing_sign::offset_callback))
+       (break-visibility . ,begin-of-line-invisible)
+       (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface item-interface ))))
+       ))
+
+    (Clef
+     . (
+       (molecule-callback . ,Clef::brew_molecule)
+       (before-line-breaking-callback . ,Clef::before_line_breaking)
+       (breakable . #t)
+       (font-family . music)      
+       (break-align-symbol . clef)
+       (break-visibility . ,begin-of-line-visible)
+       (space-alist . (
+                       (ambitus . (extra-space . 2.0))
+                       (staff-bar . (minimum-space .  3.7))
+                       (key-signature . (minimum-space . 4.0))
+                       (time-signature . (minimum-space . 4.2))
+                       (first-note . (minimum-space . 5.0))
+                       (next-note . (extra-space . 0.5))
+                       (right-edge . (extra-space . 0.5))
+                       ))
+       (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
+       (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface item-interface ))))
+       ))
+
+    (Cluster
+     . (
+       (molecule-callback . ,Cluster::brew_molecule)
+       (spacing-procedure . ,Spanner::set_spacing_rods)                
+       (minimum-length . 0.0)
+       (padding . 0.25)
+       (shape . leftsided-stairs)
+       (meta . ((interfaces . (cluster-interface spanner-interface))))
+       ))
+
+    (ChordName
+     . (
+       (molecule-callback . ,new-chord-name-brew-molecule)
+       (after-line-breaking-callback . ,Chord_name::after_line_breaking)
+       (word-space . 1.0)
+       (font-family . roman)
+       (meta . ((interfaces . (font-interface                                                  rhythmic-grob-interface
+                                                                                               text-interface chord-name-interface item-interface ))))
+       ))
+
+    (Custos
+     . (
+       (break-align-symbol . custos)
+       (breakable . #t)
+       (molecule-callback . ,Custos::brew_molecule)
+       (break-visibility . ,end-of-line-visible)
+       (style . vaticana)
+       (neutral-position . 0)
+       (neutral-direction . -1)
+       (adjust-if-on-staffline . #t)
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
+       (space-alist . (
+                       (first-note . (minimum-space . 0.0))
+                       (right-edge . (extra-space . 0.1))
+                       ))
+       (meta . ((interfaces
+                 . (custos-interface staff-symbol-referencer-interface
+                                     font-interface
+                                     break-aligned-interface item-interface ))))
+       ))
+
+
+    (DotColumn
+     . (
+       (axes . (0))
+       (direction . 1)
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (X-offset-callbacks . (,Dot_column::side_position))
+       (meta . ((interfaces . (dot-column-interface axis-group-interface item-interface ))))
+       ))
+
+    (Dots
+     . (
+       (molecule-callback . ,Dots::brew_molecule)
+       (dot-count . 1)
+       (Y-offset-callbacks  . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
+       (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface item-interface ))))
+       ))
+
+    (DoublePercentRepeat .
+                        (
+                         (molecule-callback . ,Percent_repeat_item_interface::double_percent)
+                         (breakable . #t)
+                         (slope . 1.0)
+                         (font-family . music)
+                         (width . 2.0)
+                         (thickness . 0.48)
+                         (break-align-symbol . staff-bar)
+                         (break-visibility . ,begin-of-line-invisible)
+                         (meta . ((interfaces . (font-interface
+                                                 break-aligned-interface
+                                                 percent-repeat-interface item-interface ))))
+                        ))
+
+    (DynamicText
+     . (
+       (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
+       (molecule-callback . ,Text_item::brew_molecule)
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
+                              ,Self_alignment_interface::centered_on_parent))
+       (self-alignment-X . 0)
+       (no-spacing-rods . #t)
+       (script-priority . 100)
+       (font-series . bold)
+       (font-family . dynamic)
+       (font-shape . italic)
+       (self-alignment-Y . 0)
+       (meta . ((interfaces . (font-interface text-interface self-alignment-interface  dynamic-interface script-interface item-interface ))))
+       ))
+
+    (DynamicLineSpanner
+     . (
+       (axes . (1))
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       (padding . 0.6)
+       (minimum-space . 1.2)
+       (direction . -1)
+       (meta . ((interfaces . (dynamic-interface axis-group-interface side-position-interface spanner-interface))))
+       ))
+
+    (LeftEdge
+     . (
+       (break-align-symbol . left-edge)
+       (X-extent-callback . ,Grob::point_dimension_callback)
+       (breakable . #t)
+       (space-alist . (
+                       (custos . (extra-space . 0.0))
+                       (ambitus . (extra-space . 2.0))
+                       (time-signature . (extra-space . 0.0)) 
+                       (staff-bar . (extra-space . 0.0))
+                       (breathing-sign . (minimum-space  . 0.0))
+                       (clef . (extra-space . 1.0))
+                       (first-note . (extra-space . 1.0))
+                       (right-edge . (extra-space . 0.0))
+                       (key-signature . (extra-space . 0.0))
+                       ))
+       (meta . ((interfaces . (break-aligned-interface item-interface ))))
+       ))
+
+    (Fingering
+     . (
+       (molecule-callback . ,Text_item::brew_molecule)
+       (padding . 0.6)
+       ;;              (direction . -1)
+       (self-alignment-X . 0)
+       (self-alignment-Y . 0)
+       (script-priority . 100)
+       (font-family . number)
+       (font-relative-size . -3)
+       (font-shape . upright)
+       (meta . ((interfaces . (finger-interface font-interface text-script-interface text-interface side-position-interface self-alignment-interface item-interface ))))
+       ))
+
+
+    (HaraKiriVerticalGroup
+     . (
+       (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
+       (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
+       (axes . (1))
+       (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface item-interface  spanner-interface))))
+       ))
+
+    (Hairpin
+     . (
+       (molecule-callback . ,Hairpin::brew_molecule)
+       (thickness . 1.0)
+       (height . 0.6666)
+       (spacing-procedure . ,Spanner::set_spacing_rods)
+       (minimum-length . 2.0)
+       (if-text-padding . 1.0)
+       (width-correct . -1.0)
+
+       (dash-thickness . 1.2)
+       (dash-length . 4.0)
+       (self-alignment-Y . 0)
+       (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
+       (meta . ((interfaces . (hairpin-interface self-alignment-interface dynamic-interface spanner-interface))))
+       ))
+
+    (HorizontalBracket
+     . (
+       (thickness . 1.0)
+       (molecule-callback . ,Horizontal_bracket::brew_molecule)
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       (padding . 0.2)
+       (direction . -1)
+       (meta . ((interfaces . (horizontal-bracket-interface side-position-interface spanner-interface))))
+       ))
+    (InstrumentName
+     . (
+       (breakable . #t)
+       (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
+                              ,Side_position_interface::aligned_on_support_refpoints))
+       ;; huh? what's this for?
+       (direction . 0)
+       (space-alist . (
+                       (left-edge . (extra-space . 1.0))
+                       ))
+
+       (self-alignment-Y . 0)
+       (molecule-callback . ,Text_item::brew_molecule)         
+       (break-align-symbol . instrument-name)
+       (break-visibility . ,begin-of-line-visible)
+       (baseline-skip . 2)
+       (font-family . roman)
+       (meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface item-interface ))))
+       ))
+
+    (KeySignature
+     . (
+       (molecule-callback . ,Key_signature_interface::brew_molecule)
+       (space-alist . (
+                       (time-signature . (extra-space . 1.25))
+                       (staff-bar .  (extra-space . 1.1))
+                       (right-edge . (extra-space . 0.5))
+                       (first-note . (extra-space . 2.5))
+                       ))
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
+       (break-align-symbol . key-signature)
+       (break-visibility . ,begin-of-line-visible)
+       (breakable . #t)
+       (meta . ((interfaces . (key-signature-interface  font-interface  break-aligned-interface item-interface ))))
+       ))
+
+    (LigatureBracket
+     . (
+       (ligature-primitive-callback . ,Note_head::brew_molecule)
+       (direction . 1)
+       (gap . 0.0)
+       (padding . 2.0)
+       (thickness . 1.6)
+       (edge-widen . (0.0 . 0.0))
+       (edge-height . (0.7 . 0.7))
+       (shorten-pair . (-0.2 . -0.2))
+       (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
+       (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
+       (molecule-callback . ,Tuplet_bracket::brew_molecule)
+       (meta .  ((interfaces . (tuplet-bracket-interface spanner-interface))))
+       ))
+
+    (LyricHyphen
+     . (
+       (thickness . 1.0)
+       (height . 0.4)
+       (minimum-length .  0.5) 
+       (maximum-length .  100)
+       (molecule-callback . ,Hyphen_spanner::brew_molecule)
+       (Y-extent-callback . ,Grob::point_dimension_callback)
+       (meta . ((interfaces . (lyric-hyphen-interface spanner-interface))))
+       ))
+
+    (LyricExtender
+     . (
+       (molecule-callback . ,Lyric_extender::brew_molecule)
+       (height . 0.8) ; stafflinethickness;
+       (right-trim-amount . 0.5)
+       (Y-extent-callback . ,Grob::point_dimension_callback)
+       (meta . ((interfaces . (lyric-extender-interface spanner-interface))))
+       ))
+
+    (LyricText
+     . (
+       (molecule-callback . ,Text_item::brew_molecule)
+       (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent
+                              ,Self_alignment_interface::aligned_on_self))
+       (self-alignment-X . 0)
+       (word-space . 0.6)
+       (ignore-length-mismatch . #f)
+       (begin-alignment . 4)
+       (end-alignment . 2)
+       (font-family . roman)
+       (font-shape . upright)
+       
+       ;; duh, side-position-interface?
+       (meta . ((interfaces . (rhythmic-grob-interface lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface ))))
+       ))
+
+    (MensuralLigature
+     . (
+       (thickness . 1.4)
+       (flexa-width . 2.0)
+       (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
+       (molecule-callback . ,Mensural_ligature::brew_molecule)
+       (meta . ((interfaces . (mensural-ligature-interface font-interface))))
+       ))
+
+    (RehearsalMark
+     . (
+       (molecule-callback . ,brew-new-markup-molecule)
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side)) 
+       (self-alignment-X . 0)
+       (break-align-symbol . time-signature)
+       (direction . 1)
+       (breakable . #t)
+       (font-family . roman)
+       (baseline-skip . 2)
+       (break-visibility . ,end-of-line-invisible)
+       (padding . 0.8)
+       (meta . ((interfaces . (text-interface side-position-interface font-interface mark-interface self-alignment-interface item-interface ))))
+       ))
+     (MetronomeMark
+     . (
+       (molecule-callback . ,brew-new-markup-molecule)
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side)) 
+       (direction . 1)
+       (breakable . #t)
+       (font-family . roman)
+       (break-visibility . ,end-of-line-invisible)
+       (padding . 0.8)
+       (meta . ((interfaces . (text-interface side-position-interface font-interface metronome-mark-interface item-interface))))
+       ))
+    (MeasureGrouping
+     . (
+       (Y-offset-callbacks . (,Side_position_interface::out_of_staff 
+                              ,Side_position_interface::aligned_side))
+       (molecule-callback . ,Measure_grouping::brew_molecule)
+       (padding . 2)
+       (direction . 1)
+       (thickness . 1)
+       (height . 2.0)
+       (staff-padding . 3)
+       (meta . ((interfaces . (spanner-interface side-position-interface measure-grouping-interface))))
+       ))
+    (MultiMeasureRest
+     . (
+       (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
+       (molecule-callback . ,Multi_measure_rest::brew_molecule)
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
+       (staff-position . 0)
+       (expand-limit . 10)
+       (thick-thickness . 6.6)
+       (hair-thickness . 2.0)
+       (padding . 1)
+       (meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface))))
+       ))
+    
+    (MultiMeasureRestNumber
+     . (
+       (molecule-callback . ,brew-new-markup-molecule)
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
+                              ,Self_alignment_interface::centered_on_other_axis_parent))
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       (self-alignment-X . 0)
+       (direction . 1)
+       (padding . 2)
+       (font-family . number)
+       (meta . ((interfaces . (side-position-interface self-alignment-interface font-interface spanner-interface text-interface))))
+       ))
+    (MultiMeasureRestText
+     . (
+       (molecule-callback . ,brew-new-markup-molecule)
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
+                              ,Self_alignment_interface::centered_on_other_axis_parent))
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       (self-alignment-X . 0)
+       (direction . 1)
+       (padding . 2)
+       (font-family . roman)
+       (meta . ((interfaces . (side-position-interface self-alignment-interface font-interface spanner-interface text-interface))))
+       ))
+ (NoteCollision
+     . (
+       (axes . (0 1))
+       ;; Ugh, should not be hard-coded. 
+       (note-width . 1.321)
+       (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 item-interface ))))
+       ))
+
+    (NoteColumn
+     . (
+       (axes . (0 1))
+       (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 item-interface ))))
+       ))
+
+    (NoteHead
+     . (
+       (style . default)
+       (molecule-callback . ,Note_head::brew_molecule)
+       (ligature-primitive-callback . ,Note_head::brew_molecule)
+       (glyph-name-procedure . ,find-notehead-symbol)
+       (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
+       (stem-attachment-function . ,note-head-style->attachment-coordinates)
+       (meta . ((interfaces . (rhythmic-grob-interface rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface item-interface ))))
+       ))
+
+    (Glissando
+     . (
+       (type . line)
+       (gap . 0.5)
+       (zigzag-width . 0.75)
+       (breakable . #t)
+       (X-extent-callback . #f)
+       (Y-extent-callback . #f)                         
+       (molecule-callback . ,Line_spanner::brew_molecule)
+       (meta . ((interfaces . (line-spanner-interface spanner-interface))))
+       ))
+
+    (VoiceFollower
+     . (
+       (type . line)
+       (gap . 0.5)
+       (breakable . #t)
+       (X-extent-callback . #f)
+       (Y-extent-callback . #f)                         
+       (molecule-callback . ,Line_spanner::brew_molecule)
+       (meta . ((interfaces . (line-spanner-interface spanner-interface))))
+       ))
+
+    (NoteName
+     . (
+       (molecule-callback . ,Text_item::brew_molecule)
+       (font-family . roman)
+       (meta . ((interfaces . (note-name-interface text-interface font-interface item-interface ))))
+       ))
+
+    (OctavateEight
+     . (
+       (self-alignment-X . 0)
+       (text . "8")
+       (break-visibility . ,begin-of-line-visible)
+       (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       (molecule-callback . ,Text_item::brew_molecule)
+       (font-shape . italic)
+       (padding . 0.4)
+       (font-relative-size . -2)
+       (font-family . roman)
+       (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
+       ))
+
+    (PaperColumn
+     . (
+       (axes . (0))
+       (before-line-breaking-callback . ,Paper_column::before_line_breaking)
+       (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 item-interface ))))
+       ))
+
+    (PhrasingSlur
+     . (
+       (molecule-callback . ,Slur::brew_molecule)
+       (thickness . 1.2)               
+       (spacing-procedure . ,Spanner::set_spacing_rods)                
+       (minimum-length . 1.5)
+       (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))
+       (Y-extent-callback . ,Slur::height)
+       (height-limit . 2.0)
+       (ratio . 0.333)
+       (beautiful . 0.5)
+       (y-free . 0.75)
+       (attachment . (#f . #f))
+       (attachment-offset . ((0 . 0) . (0 . 0)))
+       (slope-limit . 0.8)
+       (details . ((force-blowfit . 0.5)
+                   (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
+                   (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
+                   (bezier-area-steps . 1.0)))
+       (meta . ((interfaces . (slur-interface spanner-interface))))
+       ))
+
+    (NonMusicalPaperColumn
+     . (
+       (axes . (0))
+       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (before-line-breaking-callback . ,Paper_column::before_line_breaking)
+       ;; 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 item-interface ))))
+       ))
+
+    (PercentRepeat
+     . (
+       (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
+       (molecule-callback . ,Multi_measure_rest::percent)
+       (slope . 1.0)
+       (thickness . 0.48)
+       (minimum-width . 12.5) ; staffspace
+       (font-family . music)
+       (meta . ((interfaces . (multi-measure-rest-interface  spanner-interface font-interface percent-repeat-interface))))
+       ))
+
+    (PianoPedalBracket   ;; an example of a text spanner
+     . (
+       (molecule-callback . ,Text_spanner::brew_molecule)
+       (font-family . roman)
+       (type . line)
+       (if-text-padding . 1.0)
+       (width-correct . 0)
+       (outer . #t)
+       (direction . -1)
+       (edge-widen . (0.5 . 0.5))
+       (edge-height . (1.0 . 1.0))
+       (shorten-pair . (0.0 . 0.0))
+       (thickness .  1.0)
+       (meta . ((interfaces . (text-spanner-interface piano-pedal-interface spanner-interface))))
+       ))
+
+    (RepeatSlash
+     . (
+       (molecule-callback . , Percent_repeat_item_interface::beat_slash)
+       (thickness . 0.48)
+       (slope . 1.7)
+       (meta . ((interfaces . (percent-repeat-interface item-interface ))))
+       ))
+    (Rest
+     . (
+       (after-line-breaking-callback . ,Rest::after_line_breaking)
+       (X-extent-callback . ,Rest::extent_callback)
+       (Y-extent-callback . ,Rest::extent_callback)            
+       (molecule-callback . ,Rest::brew_molecule)
+       (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) 
+       (minimum-beam-collision-distance . 0.75)
+       (meta . (
+                (interfaces . (font-interface
+                               rhythmic-head-interface
+                                                                                       rhythmic-grob-interface
+
+                               staff-symbol-referencer-interface
+                               rest-interface item-interface ))
+               ))))
+
+    (RestCollision
+     . (
+       (minimum-distance . 0.75)
+       (meta . ((interfaces . (rest-collision-interface item-interface ))))
+       ))
+
+    (Script
+     . (
+       ;; don't set direction here: it breaks staccato.
+       (molecule-callback . ,Script_interface::brew_molecule)
+
+       ;; This value is sensitive: if too large, staccato dots will move a
+       ;; space a away.
+       (padding . 0.25)
+       ;; (script-priority . 0) priorities for scripts, see script.scm
+       (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
+       (before-line-breaking-callback . ,Script_interface::before_line_breaking)
+       (font-family . music)
+       (meta . ((interfaces . (script-interface side-position-interface font-interface item-interface ))))
+       ))
+
+    (ScriptColumn
+     . (
+       (before-line-breaking-callback . ,Script_column::before_line_breaking)
+       (meta . ((interfaces . (script-column-interface item-interface ))))
+       ))
+
+    (Slur
+     . (
+       (molecule-callback . ,Slur::brew_molecule)
+       (thickness . 1.2)               
+       (spacing-procedure . ,Spanner::set_spacing_rods)                
+       (minimum-length . 1.5)
+       (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))
+       (Y-extent-callback . ,Slur::height)
+       (height-limit . 2.0)
+       (ratio . 0.333)
+       (beautiful . 0.5)
+       (y-free . 0.75)
+       (attachment . (#f . #f))
+       (attachment-offset . ((0 . 0) . (0 . 0)))
+       (slope-limit . 0.8)
+       (details . ((force-blowfit . 0.5)
+                   (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
+                   (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
+                   (bezier-area-steps . 1.0)))
+       (meta . ((interfaces . (slur-interface spanner-interface))))
+       ))
+
+    (SpacingSpanner
+     . (
+       (spacing-procedure .  ,Spacing_spanner::set_springs)
+       (grace-space-factor . 0.6)
+       (shortest-duration-space . 2.0)
+       (spacing-increment . 1.2)
+       (base-shortest-duration . ,(ly:make-moment 1 8))
+       (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
+       ))
+
+    (SpanBar
+     . (
+       (break-align-symbol . staff-bar)
+       (bar-size-procedure . ,Span_bar::get_bar_size) 
+       (molecule-callback . ,Span_bar::brew_molecule)
+       (break-visibility . ,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)
+       ;; ugh duplication! 
+
+       ;;
+       ;; Ross. page 151 lists other values, we opt for a leaner look
+       ;; 
+       (kern . 3.0)
+       (thin-kern . 3.0)
+       (hair-thickness . 1.6)
+       (thick-thickness . 6.0)
+       (meta . ((interfaces . (span-bar-interface font-interface
+                                                  bar-line-interface item-interface ))))
+       ))
+
+    (StanzaNumber
+     . (
+       (breakable . #t)
+       (molecule-callback . ,Text_item::brew_molecule)         
+       (break-align-symbol . clef)
+       (break-visibility . ,begin-of-line-visible)
+       (font-family . roman)
+       (meta . ((interfaces . (break-aligned-interface text-interface font-interface item-interface ))))               
+       ))
+
+    (StaffSpacing
+     . (
+       (breakable . #t)
+       (stem-spacing-correction . 0.4)
+       (knee-spacing-correction . 0.75)
+       (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
+       ))
+    (NoteSpacing
+     . (
+       (stem-spacing-correction . 0.5)
+       (knee-spacing-correction . 0.75)
+       (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
+       ))
+
+    (StaffSymbol
+     . (
+       (molecule-callback . ,Staff_symbol::brew_molecule)
+       (line-count . 5)
+       (layer . 0)
+       (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
+       ))
+
+    (SostenutoPedal
+     . (
+       (molecule-callback . ,Text_item::brew_molecule)
+       (direction . 1)
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
+       (no-spacing-rods . #t)
+       (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
+       (pedal-type . mixed)
+       (font-family . roman)
+       (font-shape . italic)
+       (self-alignment-X . 0)
+       (meta . ((interfaces . (text-interface  self-alignment-interface font-interface item-interface))))
+       ))
+
+    (SostenutoPedalLineSpanner 
+     . (
+       (axes . (1))
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       
+
+       (padding . 1.2)
+       (minimum-space . 1.0)
+       (direction . -1)
+       (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface  spanner-interface))))
+       ))
+       
+    (Stem
+     . (
+       (before-line-breaking-callback . ,Stem::before_line_breaking)
+       (molecule-callback . ,Stem::brew_molecule)
+       (thickness . 1.3)
+
+       ;; 3.5 (or 3 measured from note head) is standar length
+       ;; 32nd, 64th flagged stems should be longer
+       (lengths . (3.5 3.5 3.5 4.5 5.0))
+       
+       ;; Stems in unnatural (forced) direction should be shortened by
+       ;; one staff space, according to [Roush & Gourlay].
+       ;; Flagged stems we shorten only half a staff space.
+       (stem-shorten . (1.0 0.5))
+
+       ;; default stem direction for note on middle line
+       (neutral-direction . -1)
+       
+       ;; [Wanske]: standard length (but no shorter than minimum).
+       ;; (beamed-lengths . (3.5))
+       
+       ;; FIXME.  3.5 yields too long beams (according to Ross and
+       ;; looking at Baerenreiter examples) for a number of common
+       ;; boundary cases.  Subtracting half a beam thickness fixes
+       ;; this, but the bug may well be somewhere else.
+       (beamed-lengths . (3.26))
+
+       ;; [Wanske] lists three sets of minimum lengths.  One
+       ;; set for the nomal case, and one set for beams with `der
+       ;; Balkenendpunkt weiter "uber bzw. unter die Systemgrenze
+       ;; hinaus (bei Gruppen mit grossem Tonumfang)' and the extreme
+       ;; case.
+
+       ;; Note that Wanske lists numbers lengths starting from top of
+       ;; head, so we must add half a staff space.
+       
+       ;; We use the normal minima as minimum for the ideal lengths,
+       ;; and the extreme minima as abolute minimum length.
+       
+       ;; The 'normal' minima
+       (beamed-minimum-free-lengths . (2.5 2.0 1.5))
+       
+       ;; The 'far outside staff' minima, not used
+       ;(beamed-far-minimum-free-lengths . (1.83))
+       
+       ;; The 'extreme case' minima
+       (beamed-extreme-minimum-free-lengths . (1.83 1.5))
+
+       (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)      
+       (avoid-note-head . #f)
+       (up-to-staff . #f)
+       (meta . ((interfaces . (stem-interface  font-interface item-interface ))))
+       ))
+
+    (StemTremolo
+     . (
+       (molecule-callback . ,Stem_tremolo::brew_molecule)
+       (Y-extent-callback . ,Stem_tremolo::height)
+       (X-extent-callback . #f)
+
+       (beam-width . 1.6) ; staff-space
+       (beam-thickness . 0.48) ; staff-space
+       (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
+       ))
+
+    (SeparationItem
+     . (
+       (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
+       ))
+
+    (SeparatingGroupSpanner
+     . (
+       (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
+       (meta . ((interfaces . (spacing-interface separation-spanner-interface spanner-interface))))
+       ))
+
+    (SustainPedal
+     . (
+       (no-spacing-rods . #t)
+       (molecule-callback . ,Sustain_pedal::brew_molecule)
+       (self-alignment-X . 0)
+       (direction . 1)
+       (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
+       (pedal-type . text)
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
+       (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface self-alignment-interface font-interface item-interface))))
+       ))
+
+    (SustainPedalLineSpanner 
+     . (
+       (axes . (1))
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       
+       (padding . 1.2)
+       (minimum-space . 1.0)
+       (direction . -1)
+       (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
+       ))
+
+    (System
+     . (
+       (axes . (0 1))
+       (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 spanner-interface))))
+       ))
+
+    (SystemStartBrace
+     . (
+       (glyph . "brace")
+       (molecule-callback . ,System_start_delimiter::brew_molecule)
+       (collapse-height . 5.0)
+       (font-family . braces)
+       (Y-extent-callback . #f)
+       (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
+       ))
+
+    (SystemStartBracket
+     . (
+       (Y-extent-callback . #f)
+       (molecule-callback . ,System_start_delimiter::brew_molecule)
+       (glyph . "bracket")
+       (arch-height . 1.5)
+       (arch-angle . 50.0)
+       (arch-thick . 0.25)
+       (arch-width . 1.5)
+       (bracket-collapse-height . 1)
+       (thickness . 0.25)
+       (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
+       ))
+
+    (SystemStartBar
+     . (
+       (Y-extent-callback . #f)
+       (molecule-callback . ,System_start_delimiter::brew_molecule)
+       (glyph . "bar-line")
+       (thickness . 1.6)
+       (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
+       (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
+       ))
+
+    (TextScript
+     . (
+       (molecule-callback . ,Text_item::brew_molecule)
+       (no-spacing-rods . #t)
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
+       (direction . -1)
+       (padding . 0.5)
+       (script-priority . 200)
+       ;; todo: add X self alignment?
+       (baseline-skip . 2)
+       (font-family . roman)
+       (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
+       ))
+
+    (TextSpanner
+     . (
+       (molecule-callback . ,Text_spanner::brew_molecule)
+       (font-family . roman)
+       (type . line)
+
+       ;; urg, only for (de)cresc. text spanners
+       (if-text-padding . 1.0)
+       (width-correct . -1)
+
+       (direction . 1)
+       (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))             
+       ))
+    
+    (OttavaSpanner
+     . (
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       (molecule-callback . ,Text_spanner::brew_molecule)
+       (font-family . roman)
+       (outer . #t)
+       (width-correct . 0.0)
+       (type . dotted-line)
+       (edge-height . (0 . 1.5))
+       (direction . 1)
+       (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))             
+       ))
+    
+    (TabNoteHead
+     . (
+       (font-family . roman)
+       (style . default)
+       (molecule-callback . ,tablature-molecule-callback)
+       (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
+       (extra-offset . (0 . -0.65)) ;; UGH! TODO: Clean this up!
+       (stem-attachment-function . ,tablature-stem-attachment-function)
+       (meta . ((interfaces
+                 . (rhythmic-head-interface
+                    font-interface
+                    note-head-interface staff-symbol-referencer-interface
+                    text-interface item-interface ))))
+       ))
+
+
+    (Tie
+     . (
+       (molecule-callback . ,Tie::brew_molecule)
+       (spacing-procedure . ,Spanner::set_spacing_rods)
+       (staffline-clearance . 0.35)
+       (details . ((ratio . 0.333) (height-limit . 1.0)))
+       (thickness . 1.2)
+       (x-gap . -0.1)
+       (y-offset . 0.6)
+       (minimum-length  . 2.5)
+       (meta . ((interfaces . (tie-interface spanner-interface))))
+       ))
+
+    (TieColumn
+     . (
+       (after-line-breaking-callback . ,Tie_column::after_line_breaking)
+       (X-extent-callback . ())
+       (Yoo-extent-callback . ())      
+       (meta . ((interfaces . (tie-column-interface spanner-interface))))
+       ))
+
+    (TimeSignature
+     . (
+       (molecule-callback . ,Time_signature::brew_molecule)
+       (break-align-symbol . time-signature)
+       (break-visibility . ,all-visible)
+       (space-alist . (
+                       (first-note . (extra-space . 2.0))
+                       (right-edge . (extra-space . 0.5))
+                       (staff-bar .  (minimum-space . 2.0))
+                       ))
+       (breakable . #t)
+       (style . C)
+       (font-family . number)
+       (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
+       ))
+
+    (TupletBracket
+     . (
+       (gap . 2.0)
+       (padding . 0.9)
+       (thickness . 1.6)
+       (edge-widen . (0.0 . 0.0))
+       (edge-height . (0.7 . 0.7))
+       (shorten-pair . (-0.2 . -0.2))
+       (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
+       (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
+       (molecule-callback . ,Tuplet_bracket::brew_molecule)
+       (font-family . roman)
+       (font-shape . italic)
+
+       (font-relative-size . -1)
+       (meta .  ((interfaces . (text-interface tuplet-bracket-interface font-interface spanner-interface))))
+       ))
+
+    (UnaCordaPedal
+     . (
+       (molecule-callback . ,Text_item::brew_molecule)
+       (font-family . roman)
+       (font-shape . italic)
+       (no-spacing-rods . #t)
+       (self-alignment-X . 0)
+       (direction . 1)
+       (pedal-type . text)
+       (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
+       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
+       (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
+       ))
+
+    (UnaCordaPedalLineSpanner 
+     . (
+       (axes . (1))
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       
+       (padding . 1.2)
+       (minimum-space . 1.0)
+       (direction . -1)
+       (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
+       ))
+
+    (VaticanaLigature
+     . (
+       (thickness . 1.0)
+       (flexa-width . 2.0)
+       (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
+       (molecule-callback . ,Vaticana_ligature::brew_molecule)
+       (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
+       ))
+
+    (VoltaBracket
+     . (
+       (molecule-callback . ,Volta_bracket_interface::brew_molecule)
+       (direction . 1)
+       (padding . 1)
+       (font-style . volta)
+       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
+       (thickness . 1.6)  ;  stafflinethickness
+       (height . 2.0) ; staffspace;
+       (minimum-space . 5)
+       (font-family . number)
+       (font-relative-size . -2)
+       (meta . ((interfaces . (volta-bracket-interface text-interface side-position-interface font-interface spanner-interface))))
+       ))
+    
+    (VerticalAlignment
+     . (
+       (axes . (1))
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
+       (stacking-dir . -1)
+       (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
+       ))
+
+    (VerticalAxisGroup
+     . (
+       (axes . (1))
+       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
+       
+       (meta . ((interfaces . (axis-group-interface spanner-interface))))
+       ))
+   )
+ )
+
+
+
+
+(define (completize-grob-entry x)
+  "transplant assoc key into 'name entry of 'meta of X
+"
+  (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))
+
+
+
+                                       ;  (display  (map pair? all-grob-descriptions))
+
+
+;; make sure that \property Foo.Bar =\turnOff doesn't complain
+
+(map (lambda (x)
+                                       ; (display (car x)) (newline)
+
+       (set-object-property! (car x) 'translation-type? list?)
+       (set-object-property! (car x) 'is-grob? #t))
+     all-grob-descriptions)
+
+
+(set! all-grob-descriptions (sort all-grob-descriptions alist<?))
diff --git a/scm/define-music-properties.scm b/scm/define-music-properties.scm
new file mode 100644 (file)
index 0000000..83ff53b
--- /dev/null
@@ -0,0 +1,93 @@
+;;;; music-property-description.scm -- part of generated backend documentation
+;;;;
+;;;;  source file of the GNU LilyPond music typesetter
+;;;; 
+;;;; (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
+
+
+(define-public all-music-properties '())
+
+(define (music-property-description symbol type? description)
+ (if (not (equal? #f (object-property symbol 'music-doc)))
+      (begin
+       (ly:warn (string-append "Redefining " (symbol->string symbol) "\n"))
+       (exit 2)
+      ))
+ (set-object-property! symbol 'music-type? type?)
+ (set-object-property! symbol 'music-doc description)
+ (set! all-music-properties (cons symbol all-music-properties))
+ )
+
+
+
+(music-property-description 'iterator-ctor procedure? "Function to construct music-event-iterator object for this Music")
+(music-property-description 'duration ly:duration? "Duration of this note/lyric.")
+(music-property-description 'metronome-count number? "How many beats in a minute?")
+(music-property-description 'span-type string? "What kind of spanner should be created?
+
+TODO: consider making type into symbol") 
+(music-property-description 'articulations music-list?
+                           "Articulation events specifically for this note.")
+(music-property-description 'articulation-type string? "key for script definitions alist.
+
+TODO: consider making type into symbol ")
+(music-property-description 'bass boolean? "Set if this note is a bass note in a chord")
+(music-property-description 'cautionary boolean? "If set, this alteration needs cautionary accidental")
+(music-property-description 'change-to-id string? "name of the context to change to ")
+(music-property-description 'change-to-type string? "type of the context to change to.")
+(music-property-description 'compress-procedure procedure? "compress this music expression. Argument 1: the music, arg 2: factor")
+(music-property-description 'context-id string? "name of context")
+(music-property-description 'context-type string?  "type of context")
+(music-property-description 'denominator integer? "denominator in a time signature")
+(music-property-description 'digit integer? "digit for fingering")
+(music-property-description 'direction ly:dir? "Print this up or down?")
+(music-property-description 'text-type symbol? "Particular type of text script (eg. finger, dynamic).")
+(music-property-description 'tempo-unit ly:duration? "The unit for the metronome count.")
+(music-property-description 'tonic ly:pitch? "Base of the scale")
+(music-property-description 'element ly:music? "The single child of a Music_wrapper music object, or the body of a repeat.")
+(music-property-description 'elements music-list? "A list of elements for sequential of simultaneous music, or the alternatives of repeated music. ")
+(music-property-description 'force-accidental boolean? "If set, a cautionary accidental should always be printed on this note")
+(music-property-description 'grob-property symbol? "The symbol of the grob property to set. ")
+(music-property-description 'grob-value scheme? "The value of the grob property to set")
+(music-property-description 'inversion boolean? "If set, this chord note is inverted.")
+(music-property-description 'label markup? "label of a mark.")
+(music-property-description 'last-pitch ly:pitch? "The last pitch after relativization.")
+(music-property-description 'length procedure? "How to compute the duration of this music")
+(music-property-description 'internal-class-name string? "C++ class to use for this Music object") 
+(music-property-description 'name symbol? "Name of this music object")
+(music-property-description 'numerator integer? "numerator of a time signature")
+(music-property-description 'once boolean? "Apply this operation only during one time step?")
+(music-property-description 'octavation  integer?
+                           "This pitch was octavated by how many octaves?
+For chord inversions, this is negative.")
+(music-property-description 'origin ly:input-location? "where was this piece of music defined?")
+(music-property-description 'penalty number? "Penalty for break hint.")
+(music-property-description 'pitch ly:pitch? "the pitch of this note")
+(music-property-description 'pitch-alist list? "list of pitches jointly forming the scale of a key signature")
+(music-property-description 'pop-first boolean? "Do a revert before we try to do a override on some grob property.")
+(music-property-description 'procedure procedure?
+                           "The function to run with \\applycontext. It must take a single argument, being the context.")
+(music-property-description 'predicate procedure? "the predicate of a \outputproperty")
+(music-property-description 'type symbol? "The type of this music object. Determines iteration in some cases.")
+(music-property-description 'types list? "The types of this music object. Determines iteration in some cases.")
+(music-property-description 'repeat-count  integer? "do a @code{\repeat} how ofen?")
+(music-property-description 'span-direction ly:dir? "Does this start or stop a spanner?")
+
+(music-property-description 'start-moment-function procedure? "Function to compute the negative length of
+starting grace notes.")
+(music-property-description 'string-number integer? "The number of the string in a String_number_req")
+(music-property-description 'symbol symbol? "Grob name to perform an override/revert on.")
+(music-property-description 'text markup? "markup expression to be printed")
+;; markup?
+(music-property-description 'tremolo-type integer? "")
+(music-property-description 'value scheme? "Assignment value for a
+translation property")
+(music-property-description 'what string? "What to change for auto-change. FIXME, naming")
+
+(music-property-description 'figure number? "number for figured bass")
+(music-property-description 'alteration number? "alteration for figured bass")
+(music-property-description 'bracket-start boolean? "start a bracket
+here. TODO: use span requests?")
+(music-property-description 'bracket-stop boolean? "stop a bracket here.")
+
diff --git a/scm/define-music-types.scm b/scm/define-music-types.scm
new file mode 100644 (file)
index 0000000..e44981c
--- /dev/null
@@ -0,0 +1,702 @@
+
+(define-public music-descriptions
+  `(
+    (AbortEvent
+     . (
+   (description .  "End the currently running spanners.")
+       (internal-class-name . "Event")
+       (span-type . "abort")
+       (types . (general-music event abort-event))
+       ))
+    (AbsoluteDynamicEvent
+     . (
+   (description . "Creates a dynamic mark.  Syntax: @var{note}@code{\\x},
+where x is one of \@\{\\ppp, \\pp, \\p, \\mp, \\mf, \\f, \\ff, \\fff.\@\}")
+       (internal-class-name . "Event")
+       (types . (general-music event dynamic-event absolute-dynamic-event))
+       ))
+    (ApplyContext
+     . (
+       (description . "Call the argument with the current context during interpreting phase")
+       (internal-class-name . "Music")
+       (types . (general-music apply-context))
+       (iterator-ctor . ,Apply_context_iterator::constructor)
+       ))
+    (ApplyOutputEvent
+     . (
+       (description . "
+Call the argument with all current grobs during interpreting phase.
+
+SYNTAX
+
+\applyoutput FUNC
+
+arguments to func are 1. the grob, 2. the originating context,
+3. context where FUNC is called.
+
+")
+       (internal-class-name . "Event")
+       (iterator-ctor . ,Output_property_music_iterator::constructor)
+       (types . (general-music layout-instruction))
+       ))
+    (ArpeggioEvent 
+     . (
+       (description .  "Make an arpeggio on this note. Syntax:
+@var{note}-@code{\\arpeggio}")
+       (internal-class-name .  "Event")
+       (types . (general-music arpeggio-event event))
+       ))
+
+    ;; todo: use articulation-event for slur as well.
+    ;; separate non articulation scripts  
+    (ArticulationEvent
+     . (
+   (description .  "Adds an articulation marking to a note.  Syntax:
+@var{note}@code{X}@code{Y}, where X is a direction (up @code{^}, down
+@code{_}, or Lilypond's choice (no direction specified)), and where Y
+is an articulation (such as @code{-.}, @code{->}, @code{\\tenuto},
+@code{\\downbow}).  See the user manual for details.")
+
+       (internal-class-name . "Event")
+       (types . (general-music event articulation-event script-event))
+       )) 
+    (AutoChangeMusic
+     . (
+       (description .  "Used for making voices that switch between piano staves automatically.")
+
+       (internal-class-name . "Music_wrapper")
+       (iterator-ctor . ,Auto_change_iterator::constructor)
+       (types . (general-music music-wrapper-music auto-change-instruction))
+       ))
+    (BarCheck
+     . (
+       (description .
+                    "Check whether this music coincides with the start of the measure.")
+       (internal-class-name . "Music")
+       (types . (general-music bar-check))
+       (iterator-ctor . ,Bar_check_iterator::constructor)
+       ))
+    (BassFigureEvent
+     . (
+       (description .  "Print a bass-figure text")
+
+       (internal-class-name . "Event")
+       (types . (general-music event rhythmic-event bass-figure-event))
+       ))
+    (BeamEvent
+     . (
+   (description .  "Starts or stops a beam.  Syntax for manual control:
+c8-[ c c-] c8")
+
+       (internal-class-name . "Event")
+       (types . (general-music event beam-event span-event))
+       ))
+    (NewBeamEvent
+     . (
+   (description .  "Starts or stops a beam.  Syntax for manual control:
+c8-[ c c-] c8")
+       (internal-class-name . "Event")
+       (types . (general-music event new-beam-event span-event))
+       ))
+    (BreakEvent
+     . (
+   (description .  "Creates a line break.  Syntax: \\break.")
+
+       (internal-class-name . "Event")
+       (types . (general-music break-event event))
+       ))
+    (BreathingSignEvent
+     . (
+       (description .  "Creates a `breath mark' or `comma'.  Syntax:
+@var{note}\\breathe.")
+
+       (internal-class-name . "Event")
+       (types . (general-music event breathing-event))
+       )) 
+    (BusyPlayingEvent
+     . (
+       (description .  "Used internally to signal beginning and ending of notes.")
+
+       (internal-class-name . "Event")
+       (types . (general-music event busy-playing-event))
+       )) 
+    (ClusterEvent
+     . (
+       (description .  "Begins or ends a cluster.")
+       (internal-class-name . "Event")
+       (types . (general-music cluster-event span-event event))
+       )) 
+    (ContextSpeccedMusic
+     . (
+       (description .  "Interpret the argument music within a specific context.")
+       (iterator-ctor . ,Context_specced_music_iterator::constructor)
+       (internal-class-name . "Music_wrapper")
+       (types . (context-specification general-music music-wrapper-music))
+       ))
+    (CrescendoEvent
+     . (
+   (description .  "Begins or ends a crescendo.  Syntax: @var{note}\\cr
+... @var{note}\\rc (you can also use \\<, \\!, \\cresc, and
+\\endcresc.  See the user manual for details.).")
+
+       (internal-class-name . "Event")
+       (types . (general-music dynamic-event crescendo-event event))
+       )) 
+    (DecrescendoEvent
+     . (
+       (description .  "See @ref{CrescendoEvent}.")
+
+       (internal-class-name . "Event")
+       (types . (general-music dynamic-event decrescendo-event event))
+       ))
+    (ExtenderEvent
+     . (
+       (description .  "Extend lyrics.")
+
+       (internal-class-name . "Event")
+       (types . (general-music extender-event event))
+       ))
+    (FingerEvent
+     . (
+       (description . "Specify what finger to use for this note.")
+       (internal-class-name . "Event")
+       (types . (general-music fingering-event event))
+       ))
+    (GlissandoEvent
+     . (
+       (description .  "Start  a glissando on this note.")
+       (internal-class-name . "Event")
+       (types . (general-music glissando-event event))
+       ))
+    
+    (GraceMusic
+     . (
+       (description .  "Interpret the argument as grace notes. ")
+
+       (internal-class-name . "Grace_music")
+       (iterator-ctor . ,Grace_iterator::constructor)
+       (types . (grace-music music-wrapper-music general-music))
+       ))
+    (NoteGroupingEvent
+     . (
+       (description . "Start or stop grouping brackets.")
+       (internal-class-name . "Event")
+       (types . (general-music event note-grouping-event))
+       ))
+    (HyphenEvent
+     . (
+       (description .  "A hyphen between lyric syllables.")
+
+       (internal-class-name . "Event")
+       (types . (general-music hyphen-event event))
+       ))
+    
+    (KeyChangeEvent
+     . (
+       (description .  "Change the key signature. Syntax: @code{\\key } @var{name} @var{scale}.")
+
+       (internal-class-name . "Key_change_ev")
+       (types . (general-music key-change-event event))
+       ))
+    
+    (LigatureEvent
+     . (
+       (description .  "(docme).")
+
+       (internal-class-name . "Event")
+       (span-type . ligature)
+       (types . (general-music span-event ligature-event event))
+       ))
+    
+    (LyricCombineMusic
+     . (
+       (description .  "Align lyrics to the start of notes.
+Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
+
+       (internal-class-name . "Lyric_combine_music")
+       (types . (general-music lyric-combine-music))
+       (iterator-ctor . ,Lyric_combine_music_iterator::constructor)
+       ))
+
+    (LyricEvent
+     . (
+       (description .  "A lyric syllable. Must be entered in lyrics mode, i.e.
+@code{\\lyrics @{ twinkle4 twinkle4 @} } .")
+
+       (internal-class-name . "Event")
+       (types . (general-music rhythmic-event lyric-event event))
+       ))
+    (MarkEvent
+     . (
+       (description .  "Insert a rehearsal mark. Syntax: @code{\mark} @var{marker},
+e.g. @code{\\mark \"A\"}.")
+
+       (internal-class-name . "Event")
+       (types . (general-music mark-event event))
+       ))
+    (MelismaPlayingEvent
+     . (
+       (description .  "Used internally to signal melismas")
+       (internal-class-name . "Event")
+       (types . (general-music melisma-playing-event event))
+       ))
+    
+    (MultiMeasureRestEvent
+     . (
+       (description . "Rests that may be compressed into Multi rests. Syntax
+@code{R2.*4} for 4 measures in 3/4 time. Note the capital R.")
+       (internal-class-name . "Event")
+       (types . (general-music event span-event multi-measure-rest-event))
+       ))
+    
+    (MultiMeasureTextEvent
+     . (
+       (description . "Texts on mm rests. Syntax
+@code{R-\\markup @{ \\roman \"bla\" @}}. Note the explicit font switch.")
+       (internal-class-name . "Event")
+       (types . (general-music event multi-measure-text-event))
+       ))
+
+    (Music
+     . (
+       (description .  "Generic type for music expressions.")
+
+       (internal-class-name . "Music")
+       (types . (general-music)) 
+       ))
+    (NoteEvent
+     . (
+       (description .  "A note.")
+
+       (internal-class-name . "Event")
+       (types . (general-music event note-event rhythmic-event melodic-event))
+       ))
+    
+    (OverrideProperty
+     . (
+       (description .  "Extend the definition of a graphical object.
+
+SYNTAX
+
+@code{\\propery Foo.Bar \\override} @var{SYMBOL} = @var{VALUE}
+
+")
+
+       (internal-class-name . "Music")
+       (types . (general-music layout-instruction))
+       (iterator-ctor . ,      Push_property_iterator::constructor)
+       ))
+
+    (PartCombineMusic
+     . (
+       (description .  "Combine two parts on a staff, either merged or
+as separate voices.")
+
+       (internal-class-name . "Simultaneous_music")
+       (types . (general-music part-combine-music))
+       (iterator-ctor . ,Part_combine_music_iterator::constructor)
+       ))
+    
+    (PhrasingSlurEvent
+     . (
+       (description . "Start or end phrasing slur. Syntax NOTE \\(  and \\) NOTE")
+       (internal-class-name . "Event")
+       (types . (general-music span-event phrasing-slur-event))
+       ))
+    
+    (PropertySet
+     . (
+       (description .  "Set a context property.
+
+Syntax: @code{\property @var{context}.@var{prop} = @var{scheme-val}}.")
+       (internal-class-name . "Music")
+       (types . (layout-instruction general-music))
+       (iterator-ctor . ,Property_iterator::constructor)
+       )
+     )
+    
+    (PropertyUnset
+     . (
+       (description .  "Remove the definition of a context @code{\property}.")
+
+       (internal-class-name . "Music")
+       (types . (layout-instruction general-music))
+       (iterator-ctor . ,Property_unset_iterator::constructor)
+       )
+     )
+    
+    (PesOrFlexaEvent
+     . (
+       (description .  "Within a ligature, mark the previous and the
+following note to form a pes (if melody goes up) or a flexa (if melody
+goes down).")
+
+       (internal-class-name . "Event")
+       (types . (general-music pes-or-flexa-event event))
+       ))
+
+    (RepeatedMusic
+     . (
+       (description .  "Repeat music in different ways")
+
+       (type .  repeated-music)
+       (types . (general-music repeated-music))
+       ))
+    
+    (Event
+     . (
+       (description .  "Atomic music event.")
+
+       (internal-class-name . "Event")
+       (types . (general-music event))
+       ))
+    
+    (RestEvent
+     . (
+       (description .  "A Rest. Syntax @code{r4} for a quarter rest. ")
+
+       (internal-class-name . "Event")
+       (types . (general-music event rhythmic-event rest-event))
+       )) 
+    (SequentialMusic
+     . (
+       (description .  "Music expressions concatenated. Syntax \\sequential @{..@} or simply @{..@} .")
+
+       (internal-class-name . "Sequential_music")
+       (iterator-ctor . ,Sequential_music_iterator::constructor)
+       (types . (general-music sequential-music))
+       ))
+    
+    (MultiMeasureRestMusicGroup
+     . (
+       (description .  "Like sequential-music, but specifically intended
+to group start-mmrest, skip, stop-mmrest sequence. Syntax @code{R2.*5} for 5 measures in 3/4 time.")
+       (internal-class-name . "Sequential_music")
+       (iterator-ctor . ,Sequential_music_iterator::constructor)
+       (types . (general-music sequential-music))
+       ))
+    
+    (SimultaneousMusic
+     . (
+       (description .  "Music playing together.
+
+SYNTAX
+
+@code{ \\simultaneous @{ .. @}} or < .. >.")
+
+       (internal-class-name . "Simultaneous_music")
+       (iterator-ctor . ,Simultaneous_music_iterator::constructor)
+       
+       (types . (general-music simultaneous-music))
+       ))
+    (SlurEvent
+     . (
+       (description . "Start or end slur. Syntax NOTE(  and )NOTE")
+       (internal-class-name . "Event")
+       (types . (general-music span-event slur-event))
+       ))
+
+    (RevertProperty
+     . (
+       (description .  "The opposite of @ref{OverrideProperty}: remove a
+previously added property from a graphical object definition
+ ")
+
+       (internal-class-name . "Music")
+       (types . (general-music layout-instruction))
+       (iterator-ctor . ,      Pop_property_iterator::constructor)
+       ))
+
+    (OutputPropertySetMusic
+     . (
+       (description .  "Set grob properties in objects
+individually. Syntax @code{\\outputproperty @var{predicate} @var{prop}
+= @var{val}}.")
+
+       (internal-class-name . "Music")
+       (iterator-ctor . ,Output_property_music_iterator::constructor)
+       (types . (general-music layout-instruction))
+       ))
+    
+    (TextSpanEvent
+     . (
+       (description . "Start a text spanner like 8va.....|")
+       (internal-class-name . "Event")
+       (types . (general-music span-event text-span-event))
+       ))
+    
+    (TranslatorChange
+     . (
+       (description .  "Change staffs in Piano staff. Syntax @code{\\translator Staff = @var{new-id}}.")
+       (internal-class-name . "Music")
+       (iterator-ctor . , Change_iterator::constructor)
+       (types . (general-music translator-change-instruction))
+       ))
+    
+    (TimeScaledMusic
+     . (
+       (description .  "Multiply durations, as in tuplets. Syntax @code{\\times @var{fraction} @var{music}}, e.g.
+@code{\\times 2/3 @{ ... @}} for triplets.
+ ")
+       (internal-class-name . "Time_scaled_music")
+       (iterator-ctor . ,Time_scaled_music_iterator::constructor)
+       (types . (time-scaled-music music-wrapper-music general-music))
+       ))
+    
+    (TransposedMusic
+     . (
+       (description .  "Music that has been transposed.")
+       (internal-class-name . "Transposed_music")
+       (types . (music-wrapper-music general-music transposed-music))
+       ))
+
+    (UntransposableMusic
+     . (
+       (description .  "Music that can not be transposed.")
+
+       (internal-class-name . "Untransposable_music")
+       (types . (music-wrapper-music general-music untransposable-music)) 
+       ))
+
+    (UnrelativableMusic
+     . (
+       (description .  "Music that can not be converted from relative to absolute notation.
+For example, transposed music.")
+       (internal-class-name . "Un_relativable_music")
+       (types . (music-wrapper-music general-music unrelativable-music))
+       ))
+
+    (RelativeOctaveMusic
+     . (
+       (description .  "Music that was entered in relative octave notation.")
+
+       (internal-class-name . "Relative_octave_music")
+       (types . (music-wrapper-music general-music relative-octave-music))
+       ))
+    
+    (EventChord
+     . (
+       (description .  "Internally used to group a set of events.")
+
+       (internal-class-name . "Simultaneous_music")
+       (iterator-ctor . ,Event_chord_iterator::constructor)
+       (types . (general-music event-chord simultaneous-music))
+       )
+     )
+    
+    (ScriptEvent
+     . (
+       (description .  "Add an articulation mark to a note. ")
+
+       (internal-class-name . "Event")
+       (types . (general-music event))
+       ))
+    
+    (SkipEvent
+     . (
+       (description .  "Filler that takes up duration, but does not print anything.")
+
+       (internal-class-name . "Event")
+       (types . (general-music event rhythmic-event skip-event))
+       ))
+    
+    (SpanEvent
+     . (
+       (description .  "Event for anything that is started at a different time than stopped.")
+
+       (internal-class-name . "Event")
+       (types . (general-music event))
+       ))
+    
+    (SustainEvent
+     . (
+       (description . "Depress or release sustain pedal. ")
+       (internal-class-name . "Event")
+       (types . (general-music pedal-event sustain-pedal-event))
+       ))
+    
+    (SostenutoEvent
+     . (
+       (description . "Depress or release sostenuto pedal. ")
+       (internal-class-name . "Event")
+       (types . (general-music pedal-event sostenuto-pedal-event))
+       ))
+    
+    (UnaCordaEvent
+     . (
+       (description . "Depress or release una-corda pedal.")
+       (internal-class-name . "Event")
+       (types . (general-music pedal-event una-corda-pedal-event))
+       ))
+    
+    (StringNumberEvent
+     . (
+       (description .  "Specify on which string to play this note. Syntax: @code{\\@var{number}}.")
+
+       (internal-class-name . "Event")
+       (types . (general-music string-number-event event))
+       )) 
+
+    (MetronomeChangeEvent
+     . (
+       (description .  "Change tempo setting (in beats per minute).")
+       (internal-class-name . "Event")
+       (types . (general-music metronome-change-event tempo-event event))
+       ))
+    
+    (TextScriptEvent
+     . (
+       (description .  "")
+       (internal-class-name . "Event")
+       (types . (general-music script-event text-script-event event))
+       )) 
+    (TieEvent
+     . (
+       (description .  "A tie.  Entered as @code{~}.")
+       (internal-class-name . "Event")
+       (types . (general-music tie-event event))
+       ))
+    (NewTieEvent
+     . (
+       (description .  "A tie.  Entered as @var{note}-~.")
+       (internal-class-name . "Event")
+       (types . (general-music new-tie-event event))
+       ))
+    (TremoloEvent
+     . (
+       (description . "Un measured tremolo.")
+       (internal-class-name . "Event")
+       (types . (general-music event tremolo-event))
+       ))
+    
+    (VoiceSeparator
+     . (
+       (description .  "Separate polyphonic voices in simultaneous music. Syntax: @code{\\\\}")
+
+       (internal-class-name . "Music")
+       (types . (separator general-music))
+       ))
+
+    (VoltaRepeatedMusic
+     . (
+       (iterator-ctor . ,Volta_repeat_iterator::constructor)
+       (internal-class-name . "Repeated_music")
+       (description . "")
+       (start-moment-function .  ,Repeated_music::first_start)
+       (length . ,Repeated_music::volta_music_length)
+       (types . (general-music repeated-music volta-repeated-music))
+       ))
+    
+    (UnfoldedRepeatedMusic
+     . (
+       (iterator-ctor . ,Unfolded_repeat_iterator::constructor)
+       (description .  "")
+       (start-moment-function .  ,Repeated_music::first_start)
+       (internal-class-name . "Repeated_music")
+       (types . (general-music repeated-music unfolded-repeated-music))
+       (length . ,Repeated_music::unfolded_music_length)
+       ))
+    (PercentRepeatedMusic
+     . (
+       (internal-class-name . "Repeated_music")
+       (description .  "Repeats encoded by percents.")
+       (iterator-ctor . ,Percent_repeat_iterator::constructor)
+       (start-moment-function .  ,Repeated_music::first_start)
+       (length . ,Repeated_music::unfolded_music_length)
+       (types . (general-music repeated-music percent-repeated-music))
+       ))
+    
+    (TremoloRepeteadMusic
+     . (
+       (iterator-ctor . ,Chord_tremolo_iterator::constructor)
+       (description .  "Repeated notes denoted by tremolo beams.")
+       (internal-class-name . "Repeated_music")
+       (start-moment-function .  ,Repeated_music::first_start)
+
+       ;; the length of the repeat is handled by shifting the note logs
+       (length . ,Repeated_music::folded_music_length)
+       (types . (general-music repeated-music tremolo-repeated-music))
+       
+       ))
+    
+    (FoldedRepeatedMusic
+     . (
+       (internal-class-name . "Repeated_music")
+       (description .  "Repeats with alternatives placed in parallel. ")
+       (iterator-ctor  . ,Folded_repeat_iterator::constructor)
+       (start-moment-function .  ,Repeated_music::minimum_start)
+       (length . ,Repeated_music::folded_music_length)
+       (types . (general-music repeated-music folded-repeated-music))
+       ))
+    ))
+
+(set! music-descriptions
+      (sort music-descriptions alist<?))
+
+(define music-name-to-property-table (make-vector 59 '()))
+
+
+;; init hash table,
+;; transport description to an object property.
+(set!
+ music-descriptions
+ (map (lambda (x)
+       (set-object-property! (car x)
+                             'music-description
+                             (cdr (assq 'description (cdr x))))
+       (let
+           ((l (cdr x)))
+         (set! l (assoc-set! l 'name (car x)))
+         (set! l (assq-remove!  l 'description))
+         (hashq-set! music-name-to-property-table (car x) l)
+         (cons (car x) l)
+         ))
+      music-descriptions))
+
+
+
+(define-public (make-music-by-name x)
+  (if (not (symbol? x))
+      (error (format "Not a symbol: ~a" x)))
+  (let*
+      (
+       (props (hashq-ref music-name-to-property-table x '()))
+       (name (if (pair? props)
+                (cdr (assoc 'internal-class-name props))
+                (error "Can not find music object" x)))
+       )
+
+    (if (eq? props '())
+       (ly:warn (format "Could not find music type `~a'" x)))  
+    (ly:make-bare-music name props)
+    ))
+
+
+
+(define-public (make-repeated-music name)
+  (let*
+      (
+       (handle (assoc
+               name
+               '(("volta" . VoltaRepeatedMusic)
+                 ("unfold" . UnfoldedRepeatedMusic)
+                 ("percent" . PercentRepeatedMusic)
+                 ("tremolo" . TremoloRepeteadMusic)
+                 ("fold" . FoldedRepeatedMusic)
+                 )))
+       (music-name
+       (if (pair? handle)
+           (cdr handle)
+           (begin
+             (ly:warn
+              (string-append "Unknown repeat type `" name
+                             "'\nSee music-types.scm for supported repeats"))
+             'VoltaRepeatedMusic)
+           )
+       )
+       )
+
+    (make-music-by-name music-name)
+    ))
+
diff --git a/scm/define-translator-properties.scm b/scm/define-translator-properties.scm
new file mode 100644 (file)
index 0000000..ba4eb74
--- /dev/null
@@ -0,0 +1,482 @@
+;;;; translator-property-description.scm -- part of backend documentation
+;;;;
+;;;;  source file of the GNU LilyPond music typesetter
+;;;; 
+;;;; (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
+
+
+(define-public all-translation-properties '())
+
+(define (translator-property-description symbol type? description)
+ (if (not (equal? #f (object-property symbol 'translation-doc)))
+      (begin
+       (ly:warn (string-append "Redefining " (symbol->string symbol) "\n"))
+       (exit 2)
+      ))
+  
+  (set-object-property! symbol 'translation-type? type?)
+  (set-object-property! symbol 'translation-doc description)
+  (set! all-translation-properties (cons symbol all-translation-properties))
+  )
+
+
+
+(translator-property-description 'acceptHashTable vector? "Internal
+variable: store table with MusicName to Engraver entries.")
+(translator-property-description 'acknowledgeHashTable vector?
+"Internal variable: store interface to engraver smob table for current
+context. Don't mess with this.")
+(translator-property-description 'aDueText string? "text for begin of a due")
+(translator-property-description 'associatedVoice string? "Name of the
+Voice that has the melody for this LyricsVoice.")
+(translator-property-description 'autoBeamSettings list? "Specifies
+when automatically generated beams should begin and end.  The elements
+have the format:
+
+@example
+
+   function shortest-duration-in-beam time-signature
+
+where
+
+    function = begin or end
+    shortest-duration-in-beam = numerator denominator; eg: 1 16
+    time-signature = numerator denominator, eg: 4 4
+
+unspecified or wildcard entries for duration or time-signature
+are given by * *
+
+The user can override beam begin or end time by pushing a wildcard entries
+'(begin * * * *) or '(end * * * *) resp., eg:
+
+    property Voice.autoBeamSettings push #'(end * * * *) = #(ly:make-moment 1 4)
+
+The head of the list:
+    '(
+((end * * 3 2) . ,(ly:make-moment 1 2))
+((end 1 16 3 2) . ,(ly:make-moment 1 4))
+((end 1 32 3 2) . ,(ly:make-moment 1 8))
+     ...
+    )
+
+@end example")
+
+;; "
+
+(translator-property-description 'autoAccidentals list? "List of
+different ways to typeset an accidental. All algorithms in the list
+are tried, and the one returning the most accidentals is used.
+Each entry is either a symbol containg a context name or a name-value
+pair containing an algorithm-description.
+The list must begin with a symbol (context name).
+The symbols denote in which context THE FOLLOWING algorithms (until next symbol) 
+will be interpreted. All notes in the interpretation context will share accidentals.
+The contexts must be stated in order, innermost first.
+The algorithms are:
+@table @samp
+@item same-octave:
+This is the default algorithm. Accidentals are typeset if the note changes
+the accidental of that note in that octave. Accidentals lasts to the end of the measure 
+and then as many measures as specified in the value. I.e. 1 means to the end
+of next measure, -1 means to the end of previous measure (that is: no duration at all), etc. #t means forever.
+@item any-octave:
+Accidentals are typeset if the note is different from 
+the previous note on the same pitch in any octave. The value has same meaning as in
+same-octave.
+@end table
+")
+
+(translator-property-description 'autoCautionaries list? "List similar to
+autoAccidentals, but it controls cautionary accidentals rather than
+normal ones. Both lists are tried, and the one giving the most accidentals
+wins. In case of draw, a normal accidental is typeset.
+")
+
+(translator-property-description 'automaticPhrasing boolean? " If set,
+the @ref{Lyric_phrasing_engraver} will match note heads of context
+called Voice X to syllables from LyricsVoice called
+X-<something>. This feature is turned on by default. See the example
+file @file{lyrics-multi-stanza.ly}.
+")
+
+(translator-property-description 'automaticMelismata boolean? " If
+set, \\addlyrics will assume that beams, slurs and ties signal
+melismata, and align lyrics accordingly.
+")
+
+(translator-property-description 'barAlways boolean? " If set to true a bar line is drawn after each note.
+")
+(translator-property-description 'barCheckSynchronize boolean? "If
+true then reset measurePosition when finding a barcheck. Turn off when
+using barchecks in polyphonic music.")
+(translator-property-description 'barNonAuto boolean? " If set to true then bar lines will not be printed
+    automatically; they must be explicitly created with @code{bar}
+    keywords.  Unlike with the @code{cadenza} keyword, measures are
+    still counted.  Bar generation will resume according to that
+    count if this property is set to zero.
+")
+(translator-property-description 'barNumberVisibility procedure? "Procedure that takes an int and returns whether the corresponding bar number should be printed")
+(translator-property-description 'bassFigureFormatFunction procedure? "DOCME")
+(translator-property-description 'beamMelismaBusy boolean? "Signal if a beam is set when automaticMelismata is set")
+(translator-property-description 'beatLength ly:moment? "The length of one beat in this time signature.")
+(translator-property-description 'beatGrouping list?
+                                "List of beatgroups. Eg. in 5/8 time #(list 2 3).")
+(translator-property-description 'breakAlignOrder list? "Defines the order in which
+prefatory matter (clefs, key signatures) appears, eg. this puts the
+key signatures after the bar lines:
+
+@example
+       \\property Score.breakAlignOrder = #'(
+         span-bar
+         breathing-sign
+         clef
+         staff-bar
+         key
+         time-signature
+       )
+@end example
+")
+(translator-property-description 'busyGrobs list? "
+a queue of (END-MOMENT . GROB) conses. This is for internal (C++) use only.
+Use at your own risk.  This property contains the grobs for which  END-MOMENT >= NOW.
+")
+
+(translator-property-description 'centralCPosition number? "Place of
+the central C, measured in half staffspaces.  Usually determined by
+looking at clefPosition and clefGlyph.")
+
+(translator-property-description
+ 'changeMoment moment-pair?
+ "duration that voices are examined for differences, when
+part-combining.  Usually unset or zero when combining threads into one
+voice, and 1 (or the duration of one measure) when combining voices
+into one staff.")
+
+(translator-property-description
+ 'chordNameFunction procedure?
+ "The function that converts lists of pitches to chord names.")
+(translator-property-description
+ 'chordNoteNamer procedure?
+ "Function that converts from a pitch object to a text markup. Used for single pitches.")
+(translator-property-description
+ 'chordRootNamer procedure?
+ "Function that converts from a pitch object to a text markup. Used for chords.")
+(translator-property-description
+ 'chordNameExceptions list?
+ "Alist of chord exceptions. Contains (CHORD . MARKUP) entries.")
+(translator-property-description
+ 'chordNameSeparator markup?
+ "The markup object used to separate parts of a chord name.")
+
+
+(translator-property-description 'chordChanges boolean? "Only show changes in chords scheme?")
+(translator-property-description 'clefGlyph string? "Name of the symbol within the music font")
+(translator-property-description 'clefOctavation integer? "Add
+this much extra octavation. Values of 7 and -7 are common.")
+
+(translator-property-description 'clefPosition number? "Where should
+the center of the clef symbol go?  On systems with an odd number of
+stafflines, the value 0 puts the clef on the middle staffline; a
+positive value shifts it up, a negative value shifts it down.  The
+unit of this distance is the half staff space.")
+
+(translator-property-description 'combineParts boolean? "try to combine parts?")
+(translator-property-description 'connectArpeggios boolean? " If
+set, connect all arpeggios that are found.  In this way, you can make
+arpeggios that cross staves.
+")
+(translator-property-description 'createKeyOnClefChange boolean? "Print a key signature whenever the clef is changed.")
+(translator-property-description 'crescendoText markup? "Text to print at start of non-hairpin crecscendo, ie: @samp{cresc.}")
+(translator-property-description 'crescendoSpanner symbol? "Type of spanner to be used for crescendi.  One of: @samp{hairpin}, @samp{line}, @samp{dashed-line}, @samp{dotted-line}.  If unset, hairpin type is used.")
+(translator-property-description 'decrescendoText markup? "Text to print at start of non-hairpin decrecscendo, ie: @samp{dim.}")
+(translator-property-description 'currentBarNumber integer? "Contains the current barnumber. This property is incremented at
+every barline.
+")
+(translator-property-description 'currentCommandColumn ly:grob? "Grob that is X-parent to all current breakable (clef, key signature, etc.) items.")
+(translator-property-description 'currentMusicalColumn ly:grob? "Grob that is X-parent to all non-breakable items (note heads, lyrics, etc.).")
+(translator-property-description 'defaultBarType string? "Sets the default type of bar line.  Available bar types: [FIXME];
+
+This variable is typically read at Score level, so overriding
+Staff.defaultBarType will have no effect.
+
+")
+(translator-property-description 'devNullThread symbol? "User control of Thread_devnull_engraver: one of
+@table @samp
+@item (), or unset
+Behave in normal way: remove one set of grobs when in unisolo.
+@item always:
+Remove any grob that comes along.
+@item never:
+Do nothing.
+@end table
+")
+(translator-property-description 'devNullVoice symbol? "User control of Voice_devnull_engraver: one of
+@table @samp
+@item (), or unset
+Behave in normal way: remove spanners when in unisolo.
+@item always:
+Remove any spanners that come along.
+@item never:
+Do nothing.
+@end table
+")
+(translator-property-description 'decrescendoSpanner symbol? "Type of spanner to be used for decrescendi.  One of: @samp{hairpin}, @samp{line}, @samp{dashed-line}, @samp{dotted-line}.  If unset, hairpin type is used.")
+
+(translator-property-description 'dynamicAbsoluteVolumeFunction procedure? "
+[DOCUMENT-ME]
+")
+(translator-property-description 'explicitClefVisibility procedure? "visibility-lambda function for clef changes.")
+
+
+
+(translator-property-description 'explicitKeySignatureVisibility
+procedure? "visibility-lambda function for explicit Key changes;
+\override of #'break-visibility will set the visibility for normal
+(ie. at the start of the line) key signatures.")
+
+(translator-property-description 'extraNatural boolean? "Whether to typeset an
+extra natural sign before accidentals changing from a non-natural to 
+another non-natural.
+")
+
+(translator-property-description 'extraVerticalExtent number-pair?
+"extra vertical extent, same format as MinimumVerticalExtent")
+
+
+(translator-property-description 'finalizations list? "List of expressions to evaluate before proceeding to next time step. Internal variable.")
+(translator-property-description 'followVoice boolean?
+                                "if set, note heads are tracked  across staff switches by a thin line")
+(translator-property-description 'fontSize integer?
+                                "Used to set the relative size of all grobs
+in a context. This is done using the @code{Font_size_engraver}.")
+
+(translator-property-description 'forceClef boolean? "Show clef symbol, even if it hasn't changed. Only active for the first clef after the property is set, not for the full staff.")
+(translator-property-description 'graceAccidentalSpace number? "amount space to alot for an accidental")
+(translator-property-description 'graceAlignPosition ly:dir? "put the grace note before or after the main note?")
+(translator-property-description 'highStringOne boolean? "Whether the 1st string is the string with
+highest pitch on the instrument (used by the automatic string selector).")
+(translator-property-description 'instr markup? "see @code{instrument}")
+(translator-property-description 'instrument markup? " If @code{Instrument_name_engraver}
+@cindex Instrument_name_engraver
+ is
+    added to the Staff translator, then the @code{instrument} property
+    is used to label the first line of the staff and the @code{instr}
+    property is used to label subsequent lines.  If the
+    @code{midiInstrument} property is not set, then @code{instrument}
+    is used to determine the instrument for MIDI output.")
+
+(translator-property-description 'instrumentEqualizer procedure? "[DOCUMENT-ME]")
+(translator-property-description 'instrumentSupport list? "
+list of grobs to attach instrument name to. 
+")                              
+(translator-property-description 'keyAccidentalOrder list? "
+Alist that defines in what order  alterations should be printed.
+The format is (NAME . ALTER), where NAME is from 0 .. 6 and ALTER from  -1, 1.
+")
+(translator-property-description 'keySignature list? "The current key signature. This is an alist containing (NAME . ALTER) or ((OCTAVE . NAME) . ALTER) or ((OCTAVE . NAME) . (ALTER . BARNUMBER)) pairs, where NAME is from 0.. 6 and ALTER from -2,-1,0,1,2. The optional barnumber contains the number of the measure of the accidental. FIXME: describe broken tie entries.")
+
+(translator-property-description 'lastKeySignature list? "Last key
+signature before a key signature change.")
+
+(translator-property-description 'localKeySignature list? "the key
+signature at this point in the measure.  The format is the same as for keySignature. Is reset at every bar line."
+) 
+(translator-property-description 'localKeySignatureChanges list? "Experimental.
+ [DOCME]")
+(translator-property-description 'majorSevenSymbol markup? "How should
+the major7 be formatted in a chord name?")
+(translator-property-description 'measureLength ly:moment? "Length of one
+measure in the current time signature last?")
+(translator-property-description 'measurePosition ly:moment? " How much
+of the current measure (measured in whole notes) have we had.  This
+can be set manually to create incomplete measures (anacrusis, upbeat),
+the start of the music.
+")
+(translator-property-description 'melismaBusy boolean? "Signifies
+whether a melisma is active. This can be used to signal melismas on
+top of those automatically detected. ")
+(translator-property-description 'melismaEngraverBusy boolean? "See melismaBusy. This is set automatically.")
+(translator-property-description 'metronomeMarkFormatter procedure?
+                                "How to produce a metronome markup.
+Called with 2 arguments,  event and context.")
+(translator-property-description 'midiInstrument string? "Name of the
+MIDI instrument to use ")
+(translator-property-description 'midiMinimumVolume number? "[DOCUMENT-ME]")
+(translator-property-description 'midiMaximumVolume number? "[DOCUMENT-ME]")
+(translator-property-description 'minimumFret number? "The tablature
+auto string-selecting mechanism selects the highest string with a fret
+not less than minimumFret")
+(translator-property-description 'minimumVerticalExtent number-pair?
+"minimum vertical extent, same format as VerticalExtent")
+(translator-property-description 'autoBeaming boolean? "If set to true
+then beams are generated automatically.")
+(translator-property-description 'noDirection boolean? "Don't set directions by a2-engraver when part-combining.")
+(translator-property-description 'oneBeat ly:moment? "  How long does one beat in the current time signature last?")
+(translator-property-description 'othersolo boolean? "FIXME")
+(translator-property-description 'ottavation string? "If set, the text
+for an 8va spanner. Changing this implies a new text spanner. ")
+(translator-property-description 'pedalSustainStrings list? "List of   string to print for sustain-pedal. Format is
+ (UP UPDOWN DOWN), where each of the three is the string to print when
+this is done with the pedal.")
+(translator-property-description 'pedalUnaCordaStrings list? "see pedalSustainStrings.")
+(translator-property-description 'pedalSostenutoStrings list? "see pedalSustainStrings.")
+
+(translator-property-description 'phrasingPunctuation string? "")
+(translator-property-description 'rehearsalMark number-or-string? "")
+(translator-property-description 'regularSpacingDelta ly:moment? "TODO")
+(translator-property-description 'repeatCommands list? "This property is read to find any command of the form (volta . X), where X is a string or #f")
+(translator-property-description 'scriptDefinitions list? "
+Description of scripts. This is used by Script_engraver for typesetting note-super/subscripts. See @file{scm/script.scm} for more information
+")
+
+(translator-property-description 'restNumberThreshold number?
+                                "If a multimeasure rest takes less
+than this number of measures, no number is printed. ")
+
+(translator-property-description 'scriptHorizontal boolean? "  Put
+scripts left or right of note heads.  Support for this is limited.
+Accidentals will collide with scripts.
+")
+(translator-property-description 'fingerHorizontalDirection integer?
+                                "If set, put the middle fingerings to
+the side of the note head. Use LEFT, RIGHT or unset.")
+
+(translator-property-description 'skipBars boolean? " Set to true to
+skip the empty bars that are produced by multimeasure notes and rests.
+These bars will not appear on the printed output.  If not set (the
+default) multimeasure notes and rests expand into their full length,
+printing the appropriate number of empty bars so that synchronization
+with other voices is preserved.
+
+
+@example
+@@lilypond[fragment,verbatim,center]
+r1 r1*3 R1*3  \\\\property Score.skipBars= ##t r1*3 R1*3
+
+@@end lilypond
+@end example
+
+")
+(translator-property-description 'skipTypesetting boolean?
+                                "When true, all no typesetting is done at
+this moment, causing  the interpretation phase to go a lot faster. This can
+help with debugging large scores.")
+(translator-property-description 'slurMelismaBusy boolean? "Signal a slur if automaticMelismata is set.")
+(translator-property-description 'solo boolean? "set if solo is detected by the part combiner.")
+(translator-property-description 'soloADue boolean? "set Solo/A due texts in the part combiner?.")
+(translator-property-description 'soloIIText string? "text for begin of solo for voice ``two'' when part-combining.")
+(translator-property-description 'soloText string? "text for begin of solo when part-combining.")
+(translator-property-description 'sparseTies boolean? "only create one tie per chord.")
+(translator-property-description 'splitInterval number-pair? "part-combiner will separate its two voices (or threads) when interval between the two voices is contained in this range.")
+(translator-property-description 'split-interval boolean? "set if part-combiner separated voices based on splitInterval.")
+(translator-property-description 'squashedPosition integer? " Vertical position of
+squashing for Pitch_squash_engraver.")
+(translator-property-description 'stringOneTopmost boolean? "Whether the 1st string is printed on the
+top line of the tablature.")
+(translator-property-description 'stavesFound list? "list of all staff-symbols found.")
+(translator-property-description 'stanza markup? "Stanza `number' to print at start of a verse. Use in LyricsVoice context.")
+(translator-property-description 'stemLeftBeamCount integer? "
+Specify the number of beams to draw on the left side of the next note.
+Overrides automatic beaming.  The value is only used once, and then it
+is erased.
+.")
+(translator-property-description 'stemRightBeamCount integer? "idem, for the right side.")
+(translator-property-description 'stringTunings list? "The tablature strings tuning. Must be a list of the different semitons pitch of each string (starting by the lower one).")
+(translator-property-description 'stz markup? "Abbreviated form for a stanza, see also Stanza property.")
+(translator-property-description 'subdivideBeams boolean? "If set, multiple beams will be subdivided at beat
+positions - by only drawing one beam over the beat.")
+(translator-property-description 'systemStartDelimiter symbol? "Which grob to make for the start of the system/staff?")
+(translator-property-description 'tablatureFormat procedure?
+                                "Function formatting a tab notehead; it takes
+a string number, a list of string tunings and Pitch object. It returns the text as a string.")
+
+(translator-property-description 'textNonEmpty boolean? " If set
+to true then text placed above or below the staff is not assumed to
+have zero width.  @code{\fatText} and @code{\emptyText} are predefined
+settings.
+.")
+(translator-property-description 'tieMelismaBusy boolean? "Signal ties when automaticMelismata is set.")
+(translator-property-description 'timeSignatureFraction number-pair? "
+pair of numbers,  signifying the time signature. For example #'(4 . 4) is a 4/4time signature.")
+(translator-property-description 'timing boolean? " Keep administration of measure length, position, bar number, etc?
+Switch off for cadenzas.")
+(translator-property-description 'tonic ly:pitch?
+                                "The tonic of the current scale")
+(translator-property-description 'transposing integer? "Transpose the MIDI output.  Set this property to the number of half-steps to transpose by.")
+(translator-property-description 'tremoloFlags integer? "Number of tremolo flags to add if none is specified.")
+(translator-property-description 'tupletNumberFormatFunction procedure?
+                                "Function taking a music as input, producing a string. This function is called to determine the text to print on a tuplet bracket.")
+
+(translator-property-description 'tupletInvisible boolean? "
+    If set to true, tuplet bracket creation is switched off
+entirely. This has the same effect as setting both
+@code{tupletNumberVisibility} and @code{tupletBracketVisibility} to
+@code{#f}, but as this does not even create any grobs, this setting
+uses less memory and time.")
+(translator-property-description 'tupletSpannerDuration ly:moment? "
+Normally a tuplet bracket is as wide as the
+@code{ imes} expression that gave rise to it. By setting this
+property, you can make brackets last shorter. Example
+
+@example
+@@lilypond[verbatim,fragment]
+context Voice  imes 2/3 @{
+  property Voice.tupletSpannerDuration = #(ly:make-moment 1 4)
+  [c8 c c] [c c c]
+@}
+@@end lilypond
+@end example
+.")
+(translator-property-description 'unirhythm boolean? "set if unirhythm is detected by the part combiner.")
+(translator-property-description 'unisilence boolean? "set if unisilence is detected by the part combiner.")
+(translator-property-description 'unison boolean? "set if unisono is detected  by the part combiner. .")
+(translator-property-description 'verticalAlignmentChildCallback
+procedure? "what callback to add to children of a vertical alignment.
+It determines what alignment procedure is used on the alignment
+itself.  .")
+(translator-property-description 'verticalExtent number-pair? "hard
+coded vertical extent.  The format is a pair of dimensions, for
+example, this sets the sizes of a staff to 10 (5+5) staffspaces high.
+
+@example
+property Staff.verticalExtent = #(-5.0 . 5.0)
+@end example
+
+VerticalExtent, MinimumVerticalExtent and ExtraVerticalExtent are
+predefined in all relevant contexts to @code{#f}, so they will not
+inherit values.
+
+Note that these VerticalExtents can only operate on vertical groups,
+and therefore only work in contexts which contain an
+@code{Axis_group_engraver}.
+")
+
+(translator-property-description 'voltaOnThisStaff boolean?
+ "Normally, volta brackets are put only on the topmost staff. Setting this variable to true, will force a bracket to be on this staff as well.")
+(translator-property-description 'voltaSpannerDuration ly:moment? "maximum duration of the volta bracket.
+
+    Set to a duration to control the size of the brackets printed by
+@code{\\alternative}.  It specifies the number of whole notes duration
+to use for the brackets.  This can be used to shrink the length of
+brackets in the situation where one alternative is very large.  It may
+have odd effects if the specified duration is longer than the music
+given in an @code{\\alternative}.
+.")
+(translator-property-description 'whichBar string?
+                                "This property is read to determine what type of barline to create.
+
+Example:
+@example
+\\property Staff.whichBar = \"|:\"
+@end example
+
+This will create a start-repeat bar in this staff only.
+
+If not set explicitly (by property or @code{\bar}), this is set
+according to values of @code{defaultBarType}, @code{barAlways},
+@code{barNonAuto} and @code{measurePosition}.
+
+Valid values are described in @ref{(lilypond-internals)bar-line-interface}.
+
+.")
diff --git a/scm/describe-context.scm b/scm/describe-context.scm
new file mode 100644 (file)
index 0000000..9c110a5
--- /dev/null
@@ -0,0 +1,37 @@
+
+;; todo: move this to engraver-init.ly 
+
+(define-public context-description-alist
+  '(
+    (LyricsVoice . )
+    (Thread . )
+    (Voice . )
+
+
+    (ChordNames . "
+  Can contain @code{ChordNamesVoice}
+    contexts.")
+
+    (Lyrics . "
+")
+    (Staff .
+
+    (RhythmicStaff .
+    (GrandStaff . 
+    (PianoStaff .
+               
+
+    (StaffGroup .
+               
+    (ChoirStaff . "
+")
+    (Score .
+          
+")
+
+    (TabStaff . 
+    )
+  )
+
+(set! context-description-alist
+      (sort context-description-alist alist<?))
index 95e3cb02f033e148712c12f9b0c39ede53ff73f8..3dbc47da3ceff2d3b2a963d66abc90cc6f99634a 100644 (file)
   (let*
       (
        (name (cdr (assoc 'type-name context-desc)))
-       (desc-handle (assoc (string->symbol name) context-description-alist))
-       (desc (if (pair? desc-handle)  (cdr desc-handle) ""))
+       (desc-handle (assoc 'description context-desc))
+       (desc (if (and  (pair? desc-handle) (string? (cdr desc-handle)))
+                (cdr desc-handle) "(not documented)"))
        
        (accepts (cdr (assoc 'accepts context-desc)))
        (consists (append
diff --git a/scm/grob-description.scm b/scm/grob-description.scm
deleted file mode 100644 (file)
index 18a53ca..0000000
+++ /dev/null
@@ -1,1245 +0,0 @@
-;;;; grob-description.scm -- part of generated backend documentation
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
-;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
-
-;;;; distances are given in stafflinethickness (thicknesses) and
-;;;; staffspace (distances)
-
-;;;; WARNING: the meta field should be the last one.
-;;;; WARNING: don't use anonymous functions for initialization. 
-
-;; TODO: junk the meta field in favor of something more compact?
-(define-public all-grob-descriptions
-  `(
-    (Accidental
-     . (
-       (molecule-callback . ,Accidental_interface::brew_molecule)
-       (font-family . music)
-       (cautionary-style . parentheses)
-       (after-line-breaking-callback . ,Accidental_interface::after_line_breaking)             (meta . ((interfaces . (item-interface accidental-interface font-interface))))
-       ))
-    (AccidentalPlacement
-     . (
-       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
-       (left-padding . 0.3)
-
-       ;; this is quite small, but it is very ugly to have
-       ;; accs closer to the previous note than to the next one.
-       (right-padding . 0.15)
-       (meta . ((interfaces . (item-interface accidental-placement-interface))))
-       ))
-
-    (Ambitus
-     . (
-       (breakable . #t)
-       (break-align-symbol . ambitus)
-       (molecule-callback . ,Ambitus::brew_molecule)
-       (font-family . music)
-       (note-head-style . "noteheads-2")
-       (visibility-lambda . ,begin-of-line-visible)
-       (join-heads . #t)
-       (space-alist . (
-                      (clef . (extra-space . 0.0))
-                      (key-signature . (extra-space . 0.0))
-                      (staff-bar . (extra-space . 0.0))
-                      (time-signature . (extra-space . 0.0)) 
-                      (first-note . (extra-space . 0.0))
-                      ))
-       (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface break-aligned-interface item-interface  font-interface))))
-       ))
-
-    (Arpeggio
-     . (
-       (X-extent-callback . ,Arpeggio::width_callback)
-       (Y-extent-callback . #f)               
-       (molecule-callback . ,Arpeggio::brew_molecule)
-       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
-       (X-offset-callbacks . (,Side_position_interface::aligned_side))
-       (direction . -1)
-       (staff-position . 0.0)
-       (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface item-interface font-interface))))
-       ))
-
-    (BarLine
-     . (
-       (break-align-symbol . staff-bar)
-       (glyph . "|")
-       (break-glyph-function . ,default-break-barline)
-       (bar-size-procedure . ,Bar_line::get_staff_bar_size)
-       (molecule-callback . ,Bar_line::brew_molecule)     
-       (break-visibility . ,all-visible)
-       (breakable . #t)
-       (before-line-breaking-callback . ,Bar_line::before_line_breaking)
-       (space-alist . (
-                       (time-signature . (extra-space . 0.75)) 
-                       (custos . (minimum-space . 2.0))
-                       (clef .   (minimum-space . 1.0))
-                       (first-note . (extra-space . 1.3))
-                       (right-edge . (extra-space . 0.0))
-                       ))
-
-       ;;
-       ;; Ross. page 151 lists other values, we opt for a leaner look
-       ;; 
-       (kern . 3.0)
-       (thin-kern . 3.0)
-       (hair-thickness . 1.6)
-       (thick-thickness . 6.0)
-       (meta . ((interfaces . (bar-line-interface item-interface   break-aligned-interface font-interface))))
-       ))
-
-    
-    (BarNumber
-     . (
-       (molecule-callback . ,Text_item::brew_molecule)
-       (breakable . #t)
-       (break-visibility . ,begin-of-line-visible)
-       (padding . 1.0)
-       (direction . 1)
-       (font-family . roman)
-       (font-relative-size . -1)
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
-       (self-alignment-X . 1)
-       (extra-offset . (1.3 . 0))
-       (meta .
-             ((interfaces . (side-position-interface
-                             text-interface
-                             self-alignment-interface
-                             font-interface item-interface  break-aligned-interface))))
-
-            ))
-
-    (BassFigure
-     . (
-       (molecule-callback . ,brew-new-markup-molecule)
-       (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
-       (direction . 1)
-       (font-family . number)
-       (font-relative-size . -1)
-       (kern . 0.2)
-       (meta . ((interfaces . (text-interface                                                  rhythmic-grob-interface
-                                                                                               bass-figure-interface item-interface
-                                                                                               self-alignment-interface font-interface))))
-       ))
-    (Beam
-     . (
-       ;; todo: clean this up a bit: the list is getting
-       ;; rather long.
-       (molecule-callback . ,Beam::brew_molecule)
-       (concaveness-gap . 2.0)
-       (concaveness-threshold . 0.08)
-       (positions . (#f . #f))
-       (position-callbacks . (,Beam::least_squares
-                              ,Beam::check_concave
-                              ,Beam::slope_damping
-                              ,Beam::shift_region_to_valid
-                              ,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)
-       (neutral-direction . -1)
-       (dir-function . ,beam-dir-majority-median)
-       
-       ;; Whe have some unreferenced problems here.
-       ;;
-       ;; If we shorten beamed stems less than normal stems (1 staffspace),
-       ;; or high order less than 8th beams, patterns like
-       ;;     c''4 [c''8 c''] c''4 [c''16 c]
-       ;; are ugly (different stem lengths).
-       ;;
-       ;; But if we shorten 16th beams as much as 8th beams, a single
-       ;; forced 16th beam looks *very* short.
-
-       ;; We choose to shorten 8th beams the same as single stems,
-       ;; and high order beams less than 8th beams, so that all
-       ;; isolated shortened beams look nice and a bit shortened,
-       ;; sadly possibly breaking patterns with high order beams.
-       (beamed-stem-shorten . (1.0 0.5 0.25))
-       
-       (outer-stem-length-limit . 0.2)
-       (slope-limit . 0.2)
-       (flag-width-function . ,beam-flag-width-function)
-       (damping . 1)
-       (auto-knee-gap . 5.5)
-       (font-name . "cmr10")
-       (space-function . ,Beam::space_function)
-       (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
-       ))
-
-    (BreakAlignment
-     . (
-       (breakable . #t)
-       (stacking-dir . 1)
-       (axes . (0))
-       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
-       (meta . ((interfaces . (break-alignment-interface item-interface axis-group-interface)))))
-       )
-
-    (BreakAlignGroup
-     . (
-       (axes  . (0))
-       (X-offset-callbacks . (,Break_align_interface::alignment_callback))
-       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
-       (meta . ((interfaces . (break-aligned-interface item-interface axis-group-interface item-interface ))))
-       ))
-
-    (BreathingSign
-     . (
-       (break-align-symbol . breathing-sign)
-       (breakable . #t)
-       (space-alist . (
-                       (ambitus . (extra-space . 2.0))
-                       (custos . (minimum-space . 1.0))
-                       (key-signature . (minimum-space . 1.5))
-                       (staff-bar . (minimum-space . 1.5))
-                       (clef . (minimum-space . 2.0))
-                       (first-note . (minimum-space . 1.0))
-                       (right-edge . (extra-space . 0.1))
-                       ))
-       (molecule-callback . ,Breathing_sign::brew_molecule)
-       (lookup . name)
-       (font-family . music)
-       (text . "scripts-rcomma")
-       (Y-offset-callbacks . (,Breathing_sign::offset_callback))
-       (break-visibility . ,begin-of-line-invisible)
-       (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface item-interface ))))
-       ))
-
-    (Clef
-     . (
-       (molecule-callback . ,Clef::brew_molecule)
-       (before-line-breaking-callback . ,Clef::before_line_breaking)
-       (breakable . #t)
-       (font-family . music)      
-       (break-align-symbol . clef)
-       (break-visibility . ,begin-of-line-visible)
-       (space-alist . (
-                       (ambitus . (extra-space . 2.0))
-                       (staff-bar . (minimum-space .  3.7))
-                       (key-signature . (minimum-space . 4.0))
-                       (time-signature . (minimum-space . 4.2))
-                       (first-note . (minimum-space . 5.0))
-                       (next-note . (extra-space . 0.5))
-                       (right-edge . (extra-space . 0.5))
-                       ))
-       (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
-       (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface item-interface ))))
-       ))
-
-    (Cluster
-     . (
-       (molecule-callback . ,Cluster::brew_molecule)
-       (spacing-procedure . ,Spanner::set_spacing_rods)                
-       (minimum-length . 0.0)
-       (padding . 0.25)
-       (shape . leftsided-stairs)
-       (meta . ((interfaces . (cluster-interface spanner-interface))))
-       ))
-
-    (ChordName
-     . (
-       (molecule-callback . ,new-chord-name-brew-molecule)
-       (after-line-breaking-callback . ,Chord_name::after_line_breaking)
-       (word-space . 1.0)
-       (font-family . roman)
-       (meta . ((interfaces . (font-interface                                                  rhythmic-grob-interface
-                                                                                               text-interface chord-name-interface item-interface ))))
-       ))
-
-    (Custos
-     . (
-       (break-align-symbol . custos)
-       (breakable . #t)
-       (molecule-callback . ,Custos::brew_molecule)
-       (break-visibility . ,end-of-line-visible)
-       (style . vaticana)
-       (neutral-position . 0)
-       (neutral-direction . -1)
-       (adjust-if-on-staffline . #t)
-       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
-       (space-alist . (
-                       (first-note . (minimum-space . 0.0))
-                       (right-edge . (extra-space . 0.1))
-                       ))
-       (meta . ((interfaces
-                 . (custos-interface staff-symbol-referencer-interface
-                                     font-interface
-                                     break-aligned-interface item-interface ))))
-       ))
-
-
-    (DotColumn
-     . (
-       (axes . (0))
-       (direction . 1)
-       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
-       (X-offset-callbacks . (,Dot_column::side_position))
-       (meta . ((interfaces . (dot-column-interface axis-group-interface item-interface ))))
-       ))
-
-    (Dots
-     . (
-       (molecule-callback . ,Dots::brew_molecule)
-       (dot-count . 1)
-       (Y-offset-callbacks  . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
-       (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface item-interface ))))
-       ))
-
-    (DoublePercentRepeat .
-                        (
-                         (molecule-callback . ,Percent_repeat_item_interface::double_percent)
-                         (breakable . #t)
-                         (slope . 1.0)
-                         (font-family . music)
-                         (width . 2.0)
-                         (thickness . 0.48)
-                         (break-align-symbol . staff-bar)
-                         (break-visibility . ,begin-of-line-invisible)
-                         (meta . ((interfaces . (font-interface
-                                                 break-aligned-interface
-                                                 percent-repeat-interface item-interface ))))
-                        ))
-
-    (DynamicText
-     . (
-       (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
-       (molecule-callback . ,Text_item::brew_molecule)
-       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
-                              ,Self_alignment_interface::centered_on_parent))
-       (self-alignment-X . 0)
-       (no-spacing-rods . #t)
-       (script-priority . 100)
-       (font-series . bold)
-       (font-family . dynamic)
-       (font-shape . italic)
-       (self-alignment-Y . 0)
-       (meta . ((interfaces . (font-interface text-interface self-alignment-interface  dynamic-interface script-interface item-interface ))))
-       ))
-
-    (DynamicLineSpanner
-     . (
-       (axes . (1))
-       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       (padding . 0.6)
-       (minimum-space . 1.2)
-       (direction . -1)
-       (meta . ((interfaces . (dynamic-interface axis-group-interface side-position-interface spanner-interface))))
-       ))
-
-    (LeftEdge
-     . (
-       (break-align-symbol . left-edge)
-       (X-extent-callback . ,Grob::point_dimension_callback)
-       (breakable . #t)
-       (space-alist . (
-                       (custos . (extra-space . 0.0))
-                       (ambitus . (extra-space . 2.0))
-                       (time-signature . (extra-space . 0.0)) 
-                       (staff-bar . (extra-space . 0.0))
-                       (breathing-sign . (minimum-space  . 0.0))
-                       (clef . (extra-space . 1.0))
-                       (first-note . (extra-space . 1.0))
-                       (right-edge . (extra-space . 0.0))
-                       (key-signature . (extra-space . 0.0))
-                       ))
-       (meta . ((interfaces . (break-aligned-interface item-interface ))))
-       ))
-
-    (Fingering
-     . (
-       (molecule-callback . ,Text_item::brew_molecule)
-       (padding . 0.6)
-       ;;              (direction . -1)
-       (self-alignment-X . 0)
-       (self-alignment-Y . 0)
-       (script-priority . 100)
-       (font-family . number)
-       (font-relative-size . -3)
-       (font-shape . upright)
-       (meta . ((interfaces . (finger-interface font-interface text-script-interface text-interface side-position-interface self-alignment-interface item-interface ))))
-       ))
-
-
-    (HaraKiriVerticalGroup
-     . (
-       (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
-       (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
-       (axes . (1))
-       (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface item-interface  spanner-interface))))
-       ))
-
-    (Hairpin
-     . (
-       (molecule-callback . ,Hairpin::brew_molecule)
-       (thickness . 1.0)
-       (height . 0.6666)
-       (spacing-procedure . ,Spanner::set_spacing_rods)
-       (minimum-length . 2.0)
-       (if-text-padding . 1.0)
-       (width-correct . -1.0)
-
-       (dash-thickness . 1.2)
-       (dash-length . 4.0)
-       (self-alignment-Y . 0)
-       (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
-       (meta . ((interfaces . (hairpin-interface self-alignment-interface dynamic-interface spanner-interface))))
-       ))
-
-    (HorizontalBracket
-     . (
-       (thickness . 1.0)
-       (molecule-callback . ,Horizontal_bracket::brew_molecule)
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       (padding . 0.2)
-       (direction . -1)
-       (meta . ((interfaces . (horizontal-bracket-interface side-position-interface spanner-interface))))
-       ))
-    (InstrumentName
-     . (
-       (breakable . #t)
-       (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
-                              ,Side_position_interface::aligned_on_support_refpoints))
-       ;; huh? what's this for?
-       (direction . 0)
-       (space-alist . (
-                       (left-edge . (extra-space . 1.0))
-                       ))
-
-       (self-alignment-Y . 0)
-       (molecule-callback . ,Text_item::brew_molecule)         
-       (break-align-symbol . instrument-name)
-       (break-visibility . ,begin-of-line-visible)
-       (baseline-skip . 2)
-       (font-family . roman)
-       (meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface item-interface ))))
-       ))
-
-    (KeySignature
-     . (
-       (molecule-callback . ,Key_signature_interface::brew_molecule)
-       (space-alist . (
-                       (time-signature . (extra-space . 1.25))
-                       (staff-bar .  (extra-space . 1.1))
-                       (right-edge . (extra-space . 0.5))
-                       (first-note . (extra-space . 2.5))
-                       ))
-       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
-       (break-align-symbol . key-signature)
-       (break-visibility . ,begin-of-line-visible)
-       (breakable . #t)
-       (meta . ((interfaces . (key-signature-interface  font-interface  break-aligned-interface item-interface ))))
-       ))
-
-    (LigatureBracket
-     . (
-       (ligature-primitive-callback . ,Note_head::brew_molecule)
-       (direction . 1)
-       (gap . 0.0)
-       (padding . 2.0)
-       (thickness . 1.6)
-       (edge-widen . (0.0 . 0.0))
-       (edge-height . (0.7 . 0.7))
-       (shorten-pair . (-0.2 . -0.2))
-       (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
-       (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
-       (molecule-callback . ,Tuplet_bracket::brew_molecule)
-       (meta .  ((interfaces . (tuplet-bracket-interface spanner-interface))))
-       ))
-
-    (LyricHyphen
-     . (
-       (thickness . 1.0)
-       (height . 0.4)
-       (minimum-length .  0.5) 
-       (maximum-length .  100)
-       (molecule-callback . ,Hyphen_spanner::brew_molecule)
-       (Y-extent-callback . ,Grob::point_dimension_callback)
-       (meta . ((interfaces . (lyric-hyphen-interface spanner-interface))))
-       ))
-
-    (LyricExtender
-     . (
-       (molecule-callback . ,Lyric_extender::brew_molecule)
-       (height . 0.8) ; stafflinethickness;
-       (right-trim-amount . 0.5)
-       (Y-extent-callback . ,Grob::point_dimension_callback)
-       (meta . ((interfaces . (lyric-extender-interface spanner-interface))))
-       ))
-
-    (LyricText
-     . (
-       (molecule-callback . ,Text_item::brew_molecule)
-       (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent
-                              ,Self_alignment_interface::aligned_on_self))
-       (self-alignment-X . 0)
-       (word-space . 0.6)
-       (ignore-length-mismatch . #f)
-       (begin-alignment . 4)
-       (end-alignment . 2)
-       (font-family . roman)
-       (font-shape . upright)
-       
-       ;; duh, side-position-interface?
-       (meta . ((interfaces . (rhythmic-grob-interface lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface ))))
-       ))
-
-    (MensuralLigature
-     . (
-       (thickness . 1.4)
-       (flexa-width . 2.0)
-       (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
-       (molecule-callback . ,Mensural_ligature::brew_molecule)
-       (meta . ((interfaces . (mensural-ligature-interface font-interface))))
-       ))
-
-    (RehearsalMark
-     . (
-       (molecule-callback . ,brew-new-markup-molecule)
-       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side)) 
-       (self-alignment-X . 0)
-       (break-align-symbol . time-signature)
-       (direction . 1)
-       (breakable . #t)
-       (font-family . roman)
-       (baseline-skip . 2)
-       (break-visibility . ,end-of-line-invisible)
-       (padding . 0.8)
-       (meta . ((interfaces . (text-interface side-position-interface font-interface mark-interface self-alignment-interface item-interface ))))
-       ))
-     (MetronomeMark
-     . (
-       (molecule-callback . ,brew-new-markup-molecule)
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side)) 
-       (direction . 1)
-       (breakable . #t)
-       (font-family . roman)
-       (break-visibility . ,end-of-line-invisible)
-       (padding . 0.8)
-       (meta . ((interfaces . (text-interface side-position-interface font-interface metronome-mark-interface item-interface))))
-       ))
-    (MeasureGrouping
-     . (
-       (Y-offset-callbacks . (,Side_position_interface::out_of_staff 
-                              ,Side_position_interface::aligned_side))
-       (molecule-callback . ,Measure_grouping::brew_molecule)
-       (padding . 2)
-       (direction . 1)
-       (thickness . 1)
-       (height . 2.0)
-       (staff-padding . 3)
-       (meta . ((interfaces . (spanner-interface side-position-interface measure-grouping-interface))))
-       ))
-    (MultiMeasureRest
-     . (
-       (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
-       (molecule-callback . ,Multi_measure_rest::brew_molecule)
-       (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
-       (staff-position . 0)
-       (expand-limit . 10)
-       (thick-thickness . 6.6)
-       (hair-thickness . 2.0)
-       (padding . 1)
-       (meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface))))
-       ))
-    
-    (MultiMeasureRestNumber
-     . (
-       (molecule-callback . ,brew-new-markup-molecule)
-       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
-                              ,Self_alignment_interface::centered_on_other_axis_parent))
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       (self-alignment-X . 0)
-       (direction . 1)
-       (padding . 2)
-       (font-family . number)
-       (meta . ((interfaces . (side-position-interface self-alignment-interface font-interface spanner-interface text-interface))))
-       ))
-    (MultiMeasureRestText
-     . (
-       (molecule-callback . ,brew-new-markup-molecule)
-       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
-                              ,Self_alignment_interface::centered_on_other_axis_parent))
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       (self-alignment-X . 0)
-       (direction . 1)
-       (padding . 2)
-       (font-family . roman)
-       (meta . ((interfaces . (side-position-interface self-alignment-interface font-interface spanner-interface text-interface))))
-       ))
- (NoteCollision
-     . (
-       (axes . (0 1))
-       ;; Ugh, should not be hard-coded. 
-       (note-width . 1.321)
-       (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 item-interface ))))
-       ))
-
-    (NoteColumn
-     . (
-       (axes . (0 1))
-       (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 item-interface ))))
-       ))
-
-    (NoteHead
-     . (
-       (style . default)
-       (molecule-callback . ,Note_head::brew_molecule)
-       (ligature-primitive-callback . ,Note_head::brew_molecule)
-       (glyph-name-procedure . ,find-notehead-symbol)
-       (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
-       (stem-attachment-function . ,note-head-style->attachment-coordinates)
-       (meta . ((interfaces . (rhythmic-grob-interface rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface item-interface ))))
-       ))
-
-    (Glissando
-     . (
-       (type . line)
-       (gap . 0.5)
-       (zigzag-width . 0.75)
-       (breakable . #t)
-       (X-extent-callback . #f)
-       (Y-extent-callback . #f)                         
-       (molecule-callback . ,Line_spanner::brew_molecule)
-       (meta . ((interfaces . (line-spanner-interface spanner-interface))))
-       ))
-
-    (VoiceFollower
-     . (
-       (type . line)
-       (gap . 0.5)
-       (breakable . #t)
-       (X-extent-callback . #f)
-       (Y-extent-callback . #f)                         
-       (molecule-callback . ,Line_spanner::brew_molecule)
-       (meta . ((interfaces . (line-spanner-interface spanner-interface))))
-       ))
-
-    (NoteName
-     . (
-       (molecule-callback . ,Text_item::brew_molecule)
-       (font-family . roman)
-       (meta . ((interfaces . (note-name-interface text-interface font-interface item-interface ))))
-       ))
-
-    (OctavateEight
-     . (
-       (self-alignment-X . 0)
-       (text . "8")
-       (break-visibility . ,begin-of-line-visible)
-       (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       (molecule-callback . ,Text_item::brew_molecule)
-       (font-shape . italic)
-       (padding . 0.4)
-       (font-relative-size . -2)
-       (font-family . roman)
-       (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
-       ))
-
-    (PaperColumn
-     . (
-       (axes . (0))
-       (before-line-breaking-callback . ,Paper_column::before_line_breaking)
-       (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 item-interface ))))
-       ))
-
-    (PhrasingSlur
-     . (
-       (molecule-callback . ,Slur::brew_molecule)
-       (thickness . 1.2)               
-       (spacing-procedure . ,Spanner::set_spacing_rods)                
-       (minimum-length . 1.5)
-       (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))
-       (Y-extent-callback . ,Slur::height)
-       (height-limit . 2.0)
-       (ratio . 0.333)
-       (beautiful . 0.5)
-       (y-free . 0.75)
-       (attachment . (#f . #f))
-       (attachment-offset . ((0 . 0) . (0 . 0)))
-       (slope-limit . 0.8)
-       (details . ((force-blowfit . 0.5)
-                   (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
-                   (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
-                   (bezier-area-steps . 1.0)))
-       (meta . ((interfaces . (slur-interface spanner-interface))))
-       ))
-
-    (NonMusicalPaperColumn
-     . (
-       (axes . (0))
-       (X-extent-callback . ,Axis_group_interface::group_extent_callback)
-       (before-line-breaking-callback . ,Paper_column::before_line_breaking)
-       ;; 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 item-interface ))))
-       ))
-
-    (PercentRepeat
-     . (
-       (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
-       (molecule-callback . ,Multi_measure_rest::percent)
-       (slope . 1.0)
-       (thickness . 0.48)
-       (minimum-width . 12.5) ; staffspace
-       (font-family . music)
-       (meta . ((interfaces . (multi-measure-rest-interface  spanner-interface font-interface percent-repeat-interface))))
-       ))
-
-    (PianoPedalBracket   ;; an example of a text spanner
-     . (
-       (molecule-callback . ,Text_spanner::brew_molecule)
-       (font-family . roman)
-       (type . line)
-       (if-text-padding . 1.0)
-       (width-correct . 0)
-       (outer . #t)
-       (direction . -1)
-       (edge-widen . (0.5 . 0.5))
-       (edge-height . (1.0 . 1.0))
-       (shorten-pair . (0.0 . 0.0))
-       (thickness .  1.0)
-       (meta . ((interfaces . (text-spanner-interface piano-pedal-interface spanner-interface))))
-       ))
-
-    (RepeatSlash
-     . (
-       (molecule-callback . , Percent_repeat_item_interface::beat_slash)
-       (thickness . 0.48)
-       (slope . 1.7)
-       (meta . ((interfaces . (percent-repeat-interface item-interface ))))
-       ))
-    (Rest
-     . (
-       (after-line-breaking-callback . ,Rest::after_line_breaking)
-       (X-extent-callback . ,Rest::extent_callback)
-       (Y-extent-callback . ,Rest::extent_callback)            
-       (molecule-callback . ,Rest::brew_molecule)
-       (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) 
-       (minimum-beam-collision-distance . 0.75)
-       (meta . (
-                (interfaces . (font-interface
-                               rhythmic-head-interface
-                                                                                       rhythmic-grob-interface
-
-                               staff-symbol-referencer-interface
-                               rest-interface item-interface ))
-               ))))
-
-    (RestCollision
-     . (
-       (minimum-distance . 0.75)
-       (meta . ((interfaces . (rest-collision-interface item-interface ))))
-       ))
-
-    (Script
-     . (
-       ;; don't set direction here: it breaks staccato.
-       (molecule-callback . ,Script_interface::brew_molecule)
-
-       ;; This value is sensitive: if too large, staccato dots will move a
-       ;; space a away.
-       (padding . 0.25)
-       ;; (script-priority . 0) priorities for scripts, see script.scm
-       (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
-       (before-line-breaking-callback . ,Script_interface::before_line_breaking)
-       (font-family . music)
-       (meta . ((interfaces . (script-interface side-position-interface font-interface item-interface ))))
-       ))
-
-    (ScriptColumn
-     . (
-       (before-line-breaking-callback . ,Script_column::before_line_breaking)
-       (meta . ((interfaces . (script-column-interface item-interface ))))
-       ))
-
-    (Slur
-     . (
-       (molecule-callback . ,Slur::brew_molecule)
-       (thickness . 1.2)               
-       (spacing-procedure . ,Spanner::set_spacing_rods)                
-       (minimum-length . 1.5)
-       (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))
-       (Y-extent-callback . ,Slur::height)
-       (height-limit . 2.0)
-       (ratio . 0.333)
-       (beautiful . 0.5)
-       (y-free . 0.75)
-       (attachment . (#f . #f))
-       (attachment-offset . ((0 . 0) . (0 . 0)))
-       (slope-limit . 0.8)
-       (details . ((force-blowfit . 0.5)
-                   (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
-                   (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
-                   (bezier-area-steps . 1.0)))
-       (meta . ((interfaces . (slur-interface spanner-interface))))
-       ))
-
-    (SpacingSpanner
-     . (
-       (spacing-procedure .  ,Spacing_spanner::set_springs)
-       (grace-space-factor . 0.6)
-       (shortest-duration-space . 2.0)
-       (spacing-increment . 1.2)
-       (base-shortest-duration . ,(ly:make-moment 1 8))
-       (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
-       ))
-
-    (SpanBar
-     . (
-       (break-align-symbol . staff-bar)
-       (bar-size-procedure . ,Span_bar::get_bar_size) 
-       (molecule-callback . ,Span_bar::brew_molecule)
-       (break-visibility . ,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)
-       ;; ugh duplication! 
-
-       ;;
-       ;; Ross. page 151 lists other values, we opt for a leaner look
-       ;; 
-       (kern . 3.0)
-       (thin-kern . 3.0)
-       (hair-thickness . 1.6)
-       (thick-thickness . 6.0)
-       (meta . ((interfaces . (span-bar-interface font-interface
-                                                  bar-line-interface item-interface ))))
-       ))
-
-    (StanzaNumber
-     . (
-       (breakable . #t)
-       (molecule-callback . ,Text_item::brew_molecule)         
-       (break-align-symbol . clef)
-       (break-visibility . ,begin-of-line-visible)
-       (font-family . roman)
-       (meta . ((interfaces . (break-aligned-interface text-interface font-interface item-interface ))))               
-       ))
-
-    (StaffSpacing
-     . (
-       (breakable . #t)
-       (stem-spacing-correction . 0.4)
-       (knee-spacing-correction . 0.75)
-       (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
-       ))
-    (NoteSpacing
-     . (
-       (stem-spacing-correction . 0.5)
-       (knee-spacing-correction . 0.75)
-       (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
-       ))
-
-    (StaffSymbol
-     . (
-       (molecule-callback . ,Staff_symbol::brew_molecule)
-       (line-count . 5)
-       (layer . 0)
-       (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
-       ))
-
-    (SostenutoPedal
-     . (
-       (molecule-callback . ,Text_item::brew_molecule)
-       (direction . 1)
-       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
-       (no-spacing-rods . #t)
-       (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
-       (pedal-type . mixed)
-       (font-family . roman)
-       (font-shape . italic)
-       (self-alignment-X . 0)
-       (meta . ((interfaces . (text-interface  self-alignment-interface font-interface item-interface))))
-       ))
-
-    (SostenutoPedalLineSpanner 
-     . (
-       (axes . (1))
-       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       
-
-       (padding . 1.2)
-       (minimum-space . 1.0)
-       (direction . -1)
-       (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface  spanner-interface))))
-       ))
-       
-    (Stem
-     . (
-       (before-line-breaking-callback . ,Stem::before_line_breaking)
-       (molecule-callback . ,Stem::brew_molecule)
-       (thickness . 1.3)
-
-       ;; 3.5 (or 3 measured from note head) is standar length
-       ;; 32nd, 64th flagged stems should be longer
-       (lengths . (3.5 3.5 3.5 4.5 5.0))
-       
-       ;; Stems in unnatural (forced) direction should be shortened by
-       ;; one staff space, according to [Roush & Gourlay].
-       ;; Flagged stems we shorten only half a staff space.
-       (stem-shorten . (1.0 0.5))
-
-       ;; default stem direction for note on middle line
-       (neutral-direction . -1)
-       
-       ;; [Wanske]: standard length (but no shorter than minimum).
-       ;; (beamed-lengths . (3.5))
-       
-       ;; FIXME.  3.5 yields too long beams (according to Ross and
-       ;; looking at Baerenreiter examples) for a number of common
-       ;; boundary cases.  Subtracting half a beam thickness fixes
-       ;; this, but the bug may well be somewhere else.
-       (beamed-lengths . (3.26))
-
-       ;; [Wanske] lists three sets of minimum lengths.  One
-       ;; set for the nomal case, and one set for beams with `der
-       ;; Balkenendpunkt weiter "uber bzw. unter die Systemgrenze
-       ;; hinaus (bei Gruppen mit grossem Tonumfang)' and the extreme
-       ;; case.
-
-       ;; Note that Wanske lists numbers lengths starting from top of
-       ;; head, so we must add half a staff space.
-       
-       ;; We use the normal minima as minimum for the ideal lengths,
-       ;; and the extreme minima as abolute minimum length.
-       
-       ;; The 'normal' minima
-       (beamed-minimum-free-lengths . (2.5 2.0 1.5))
-       
-       ;; The 'far outside staff' minima, not used
-       ;(beamed-far-minimum-free-lengths . (1.83))
-       
-       ;; The 'extreme case' minima
-       (beamed-extreme-minimum-free-lengths . (1.83 1.5))
-
-       (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)      
-       (avoid-note-head . #f)
-       (up-to-staff . #f)
-       (meta . ((interfaces . (stem-interface  font-interface item-interface ))))
-       ))
-
-    (StemTremolo
-     . (
-       (molecule-callback . ,Stem_tremolo::brew_molecule)
-       (Y-extent-callback . ,Stem_tremolo::height)
-       (X-extent-callback . #f)
-
-       (beam-width . 1.6) ; staff-space
-       (beam-thickness . 0.48) ; staff-space
-       (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
-       ))
-
-    (SeparationItem
-     . (
-       (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
-       ))
-
-    (SeparatingGroupSpanner
-     . (
-       (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
-       (meta . ((interfaces . (spacing-interface separation-spanner-interface spanner-interface))))
-       ))
-
-    (SustainPedal
-     . (
-       (no-spacing-rods . #t)
-       (molecule-callback . ,Sustain_pedal::brew_molecule)
-       (self-alignment-X . 0)
-       (direction . 1)
-       (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
-       (pedal-type . text)
-       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
-       (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface self-alignment-interface font-interface item-interface))))
-       ))
-
-    (SustainPedalLineSpanner 
-     . (
-       (axes . (1))
-       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       
-       (padding . 1.2)
-       (minimum-space . 1.0)
-       (direction . -1)
-       (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
-       ))
-
-    (System
-     . (
-       (axes . (0 1))
-       (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 spanner-interface))))
-       ))
-
-    (SystemStartBrace
-     . (
-       (glyph . "brace")
-       (molecule-callback . ,System_start_delimiter::brew_molecule)
-       (collapse-height . 5.0)
-       (font-family . braces)
-       (Y-extent-callback . #f)
-       (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
-       ))
-
-    (SystemStartBracket
-     . (
-       (Y-extent-callback . #f)
-       (molecule-callback . ,System_start_delimiter::brew_molecule)
-       (glyph . "bracket")
-       (arch-height . 1.5)
-       (arch-angle . 50.0)
-       (arch-thick . 0.25)
-       (arch-width . 1.5)
-       (bracket-collapse-height . 1)
-       (thickness . 0.25)
-       (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
-       ))
-
-    (SystemStartBar
-     . (
-       (Y-extent-callback . #f)
-       (molecule-callback . ,System_start_delimiter::brew_molecule)
-       (glyph . "bar-line")
-       (thickness . 1.6)
-       (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
-       (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
-       ))
-
-    (TextScript
-     . (
-       (molecule-callback . ,Text_item::brew_molecule)
-       (no-spacing-rods . #t)
-       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
-       (direction . -1)
-       (padding . 0.5)
-       (script-priority . 200)
-       ;; todo: add X self alignment?
-       (baseline-skip . 2)
-       (font-family . roman)
-       (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
-       ))
-
-    (TextSpanner
-     . (
-       (molecule-callback . ,Text_spanner::brew_molecule)
-       (font-family . roman)
-       (type . line)
-
-       ;; urg, only for (de)cresc. text spanners
-       (if-text-padding . 1.0)
-       (width-correct . -1)
-
-       (direction . 1)
-       (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))             
-       ))
-    
-    (TabNoteHead
-     . (
-       (font-family . roman)
-       (style . default)
-       (molecule-callback . ,tablature-molecule-callback)
-       (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
-       (extra-offset . (0 . -0.65)) ;; UGH! TODO: Clean this up!
-       (stem-attachment-function . ,tablature-stem-attachment-function)
-       (meta . ((interfaces
-                 . (rhythmic-head-interface
-                    font-interface
-                    note-head-interface staff-symbol-referencer-interface
-                    text-interface item-interface ))))
-       ))
-
-
-    (Tie
-     . (
-       (molecule-callback . ,Tie::brew_molecule)
-       (spacing-procedure . ,Spanner::set_spacing_rods)
-       (staffline-clearance . 0.35)
-       (details . ((ratio . 0.333) (height-limit . 1.0)))
-       (thickness . 1.2)
-       (x-gap . -0.1)
-       (y-offset . 0.6)
-       (minimum-length  . 2.5)
-       (meta . ((interfaces . (tie-interface spanner-interface))))
-       ))
-
-    (TieColumn
-     . (
-       (after-line-breaking-callback . ,Tie_column::after_line_breaking)
-       (X-extent-callback . ())
-       (Yoo-extent-callback . ())      
-       (meta . ((interfaces . (tie-column-interface spanner-interface))))
-       ))
-
-    (TimeSignature
-     . (
-       (molecule-callback . ,Time_signature::brew_molecule)
-       (break-align-symbol . time-signature)
-       (break-visibility . ,all-visible)
-       (space-alist . (
-                       (first-note . (extra-space . 2.0))
-                       (right-edge . (extra-space . 0.5))
-                       (staff-bar .  (minimum-space . 2.0))
-                       ))
-       (breakable . #t)
-       (style . C)
-       (font-family . number)
-       (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
-       ))
-
-    (TupletBracket
-     . (
-       (gap . 2.0)
-       (padding . 0.9)
-       (thickness . 1.6)
-       (edge-widen . (0.0 . 0.0))
-       (edge-height . (0.7 . 0.7))
-       (shorten-pair . (-0.2 . -0.2))
-       (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
-       (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
-       (molecule-callback . ,Tuplet_bracket::brew_molecule)
-       (font-family . roman)
-       (font-shape . italic)
-
-       (font-relative-size . -1)
-       (meta .  ((interfaces . (text-interface tuplet-bracket-interface font-interface spanner-interface))))
-       ))
-
-    (UnaCordaPedal
-     . (
-       (molecule-callback . ,Text_item::brew_molecule)
-       (font-family . roman)
-       (font-shape . italic)
-       (no-spacing-rods . #t)
-       (self-alignment-X . 0)
-       (direction . 1)
-       (pedal-type . text)
-       (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
-       (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
-       (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
-       ))
-
-    (UnaCordaPedalLineSpanner 
-     . (
-       (axes . (1))
-       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       
-       (padding . 1.2)
-       (minimum-space . 1.0)
-       (direction . -1)
-       (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
-       ))
-
-    (VaticanaLigature
-     . (
-       (thickness . 1.0)
-       (flexa-width . 2.0)
-       (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
-       (molecule-callback . ,Vaticana_ligature::brew_molecule)
-       (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
-       ))
-
-    (VoltaBracket
-     . (
-       (molecule-callback . ,Volta_bracket_interface::brew_molecule)
-       (direction . 1)
-       (padding . 1)
-       (font-style . volta)
-       (Y-offset-callbacks . (,Side_position_interface::aligned_side))
-       (thickness . 1.6)  ;  stafflinethickness
-       (height . 2.0) ; staffspace;
-       (minimum-space . 5)
-       (font-family . number)
-       (font-relative-size . -2)
-       (meta . ((interfaces . (volta-bracket-interface text-interface side-position-interface font-interface spanner-interface))))
-       ))
-    
-    (VerticalAlignment
-     . (
-       (axes . (1))
-       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
-       (stacking-dir . -1)
-       (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
-       ))
-
-    (VerticalAxisGroup
-     . (
-       (axes . (1))
-       (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
-       
-       (meta . ((interfaces . (axis-group-interface spanner-interface))))
-       ))
-   )
- )
-
-
-
-
-(define (completize-grob-entry x)
-  "transplant assoc key into 'name entry of 'meta of X
-"
-  (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))
-
-
-
-                                       ;  (display  (map pair? all-grob-descriptions))
-
-
-;; make sure that \property Foo.Bar =\turnOff doesn't complain
-
-(map (lambda (x)
-                                       ; (display (car x)) (newline)
-
-       (set-object-property! (car x) 'translation-type? list?)
-       (set-object-property! (car x) 'is-grob? #t))
-     all-grob-descriptions)
-
-
-(set! all-grob-descriptions (sort all-grob-descriptions alist<?))
diff --git a/scm/interface-description.scm b/scm/interface-description.scm
deleted file mode 100644 (file)
index 25370f1..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-;;;; interface-description.scm -- part of generated backend documentation
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
-;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
-
-
-; should include default value?
-
-(ly:add-interface
-'note-name-interface
- "Note name"
- '(style))
-
-(ly:add-interface
- 'dynamic-interface
-   "Any kind of loudness sign"
-   '()
-    )
-
-(ly:add-interface
- 'finger-interface
- "A fingering instruction"
- '()
- )
-
-(ly:add-interface
- 'rhythmic-grob-interface
- "Any object with a rhythmic basis. Used to determine which grobs 
-are interesting enough to maintain a hara-kiri staff."
- '()
- )
-
-(ly:add-interface
- 'ligature-interface
- "A ligature"
- '()
- )
-
-(ly:add-interface
- 'ligature-bracket-interface
- "A bracket indicating a ligature in the original edition"
- '(width thickness height ligature-primitive-callback))
-
-(ly:add-interface
- 'mark-interface
- "a rehearsal mark"
- '(
-   ))
-
-(ly:add-interface
- 'metronome-mark-interface
- "a rehearsal mark"
- '(
-   ))
-
-;;; todo: this is not typesetting info. Move to interpretation.
-(ly:add-interface
- 'tablature-interface
- "tablature notes"
- '())
-
-
-
-;; todo: figure out where  to put this doco:
-
-"
-Grob properties form a name space where you can set variables per
-object.  Each object however, may have multiple functions. For
-example, consider a dynamic symbol, such @code{\ff} (fortissimo). It
-is printed above or below the staff, it is a dynamic sign, and it is a
-kind of text.
-
-To reflect this different functions of a grob, procedures and variables
-are grouped into so-called interfaces.  The dynamic text for example
-supports the  following interfaces:
-@table @code 
-@item font-interface
-  The glyph is built from characters from a font, hence the
-@code{font-interface}. For objects supporting @code{font-interface}, you
-can select alternate fonts by setting @code{font-style},
-@code{font-point-size}, etc.
-
-@item dynamic-interface
-  Dynamic interface is not associated with any variable or function in
-particular, but this makes it possible to distinguish this grob from
-other similar grobs (like @code{TextScript}), that have no meaning of
-dynamics.
-
-@item text-interface
-  This interface is for texts that are to be set using special routines
-to stack text into lines, using kerning, etc.
-
-@item general-grob-interface
-  This interface is supported by all grob types.
-@end table
-"
index 0c5cda7036d4f34a1e96bbe5258c1e6ee8cdd0fe..4add9c25c440e6c09f2d2095f0704e268fa8b54f 100644 (file)
@@ -337,13 +337,13 @@ is the  first to satisfy CRIT
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;  output
-(use-modules (scm tex)
-            (scm ps)
-            (scm pysk)
-            (scm ascii-script)
-            (scm sketch)
-            (scm sodipodi)
-            (scm pdftex)
+(use-modules (scm output-tex)
+            (scm output-ps)
+            (scm output-pysk)
+            (scm output-ascii-script)
+            (scm output-sketch)
+            (scm output-sodipodi)
+            (scm output-pdftex)
             )
 
 (define output-alist
@@ -389,11 +389,10 @@ is the  first to satisfy CRIT
        "new-markup.scm"
        "bass-figure.scm"
        "music-functions.scm"
-       "music-property-description.scm"
+       "define-music-properties.scm"
        "auto-beam.scm"
-       "basic-properties.scm"
        "chord-name.scm"
-       "translator-property-description.scm"
+       "define-translator-properties.scm"
        "script.scm"
        "drums.scm"
        "midi.scm"
@@ -403,10 +402,9 @@ is the  first to satisfy CRIT
        "slur.scm"
        "font.scm"
        
-       "grob-property-description.scm"
-       "grob-description.scm"
-       "context-description.scm"
-       "interface-description.scm"
+       "define-grob-properties.scm"
+       "define-grobs.scm"
+       "define-grob-interfaces.scm"
        ))
 
 
diff --git a/scm/music-property-description.scm b/scm/music-property-description.scm
deleted file mode 100644 (file)
index 83ff53b..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-;;;; music-property-description.scm -- part of generated backend documentation
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
-;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
-
-
-(define-public all-music-properties '())
-
-(define (music-property-description symbol type? description)
- (if (not (equal? #f (object-property symbol 'music-doc)))
-      (begin
-       (ly:warn (string-append "Redefining " (symbol->string symbol) "\n"))
-       (exit 2)
-      ))
- (set-object-property! symbol 'music-type? type?)
- (set-object-property! symbol 'music-doc description)
- (set! all-music-properties (cons symbol all-music-properties))
- )
-
-
-
-(music-property-description 'iterator-ctor procedure? "Function to construct music-event-iterator object for this Music")
-(music-property-description 'duration ly:duration? "Duration of this note/lyric.")
-(music-property-description 'metronome-count number? "How many beats in a minute?")
-(music-property-description 'span-type string? "What kind of spanner should be created?
-
-TODO: consider making type into symbol") 
-(music-property-description 'articulations music-list?
-                           "Articulation events specifically for this note.")
-(music-property-description 'articulation-type string? "key for script definitions alist.
-
-TODO: consider making type into symbol ")
-(music-property-description 'bass boolean? "Set if this note is a bass note in a chord")
-(music-property-description 'cautionary boolean? "If set, this alteration needs cautionary accidental")
-(music-property-description 'change-to-id string? "name of the context to change to ")
-(music-property-description 'change-to-type string? "type of the context to change to.")
-(music-property-description 'compress-procedure procedure? "compress this music expression. Argument 1: the music, arg 2: factor")
-(music-property-description 'context-id string? "name of context")
-(music-property-description 'context-type string?  "type of context")
-(music-property-description 'denominator integer? "denominator in a time signature")
-(music-property-description 'digit integer? "digit for fingering")
-(music-property-description 'direction ly:dir? "Print this up or down?")
-(music-property-description 'text-type symbol? "Particular type of text script (eg. finger, dynamic).")
-(music-property-description 'tempo-unit ly:duration? "The unit for the metronome count.")
-(music-property-description 'tonic ly:pitch? "Base of the scale")
-(music-property-description 'element ly:music? "The single child of a Music_wrapper music object, or the body of a repeat.")
-(music-property-description 'elements music-list? "A list of elements for sequential of simultaneous music, or the alternatives of repeated music. ")
-(music-property-description 'force-accidental boolean? "If set, a cautionary accidental should always be printed on this note")
-(music-property-description 'grob-property symbol? "The symbol of the grob property to set. ")
-(music-property-description 'grob-value scheme? "The value of the grob property to set")
-(music-property-description 'inversion boolean? "If set, this chord note is inverted.")
-(music-property-description 'label markup? "label of a mark.")
-(music-property-description 'last-pitch ly:pitch? "The last pitch after relativization.")
-(music-property-description 'length procedure? "How to compute the duration of this music")
-(music-property-description 'internal-class-name string? "C++ class to use for this Music object") 
-(music-property-description 'name symbol? "Name of this music object")
-(music-property-description 'numerator integer? "numerator of a time signature")
-(music-property-description 'once boolean? "Apply this operation only during one time step?")
-(music-property-description 'octavation  integer?
-                           "This pitch was octavated by how many octaves?
-For chord inversions, this is negative.")
-(music-property-description 'origin ly:input-location? "where was this piece of music defined?")
-(music-property-description 'penalty number? "Penalty for break hint.")
-(music-property-description 'pitch ly:pitch? "the pitch of this note")
-(music-property-description 'pitch-alist list? "list of pitches jointly forming the scale of a key signature")
-(music-property-description 'pop-first boolean? "Do a revert before we try to do a override on some grob property.")
-(music-property-description 'procedure procedure?
-                           "The function to run with \\applycontext. It must take a single argument, being the context.")
-(music-property-description 'predicate procedure? "the predicate of a \outputproperty")
-(music-property-description 'type symbol? "The type of this music object. Determines iteration in some cases.")
-(music-property-description 'types list? "The types of this music object. Determines iteration in some cases.")
-(music-property-description 'repeat-count  integer? "do a @code{\repeat} how ofen?")
-(music-property-description 'span-direction ly:dir? "Does this start or stop a spanner?")
-
-(music-property-description 'start-moment-function procedure? "Function to compute the negative length of
-starting grace notes.")
-(music-property-description 'string-number integer? "The number of the string in a String_number_req")
-(music-property-description 'symbol symbol? "Grob name to perform an override/revert on.")
-(music-property-description 'text markup? "markup expression to be printed")
-;; markup?
-(music-property-description 'tremolo-type integer? "")
-(music-property-description 'value scheme? "Assignment value for a
-translation property")
-(music-property-description 'what string? "What to change for auto-change. FIXME, naming")
-
-(music-property-description 'figure number? "number for figured bass")
-(music-property-description 'alteration number? "alteration for figured bass")
-(music-property-description 'bracket-start boolean? "start a bracket
-here. TODO: use span requests?")
-(music-property-description 'bracket-stop boolean? "stop a bracket here.")
-
diff --git a/scm/output-ascii-script.scm b/scm/output-ascii-script.scm
new file mode 100644 (file)
index 0000000..d938458
--- /dev/null
@@ -0,0 +1,225 @@
+(define-module (scm output-ascii-script)
+  )
+
+(define this-module (current-module))
+
+(define-public (as-output-expression expr port)
+  (display (eval expr this-module) port)
+  )
+
+
+(debug-enable 'backtrace)
+
+(define (tex-encoded-fontswitch name-mag)
+  (let* ((iname-mag (car name-mag))
+        (ename-mag (cdr name-mag)))
+    (cons iname-mag
+         (cons ename-mag
+               (string-append  "magfont"
+                         (string-encode-integer
+                          (hashq (car ename-mag) 1000000))
+                         "m"
+                         (string-encode-integer
+                          (inexact->exact (* 1000 (cdr ename-mag)))))))))
+
+(define (fontify name-mag-pair exp)
+  (string-append (select-font name-mag-pair)
+                exp))
+
+
+(define (define-fonts internal-external-name-mag-pairs)
+  (set! font-name-alist (map tex-encoded-fontswitch
+                            internal-external-name-mag-pairs))
+  (apply string-append
+        (map (lambda (x)
+               (font-load-command (car x) (cdr x)))
+             (map cdr font-name-alist))))
+
+(define as-font-alist-alist
+  '(
+    (as5 .
+        (
+         (feta16 . as5)
+         (feta20 . as5)
+         (feta-nummer6 . as-number1)
+         (feta-nummer8 . as-number1)
+         (feta-braces16 . as-braces9)
+         (cmr7 . as-dummy)
+         (cmr8 . as-dummy)
+         (cmr10 . as-dummy)
+         ))
+    (as9 .
+        (
+         (feta16 . as9)
+         (feta20 . as9)
+         (feta-nummer4 . as-number1)
+         (feta-nummer8 . as-number4)
+         (feta-braces16 . as-braces9)
+         (cmr7 . as-dummy)
+         (cmr8 . as-dummy)
+         (cmr10 . as-dummy)
+         (cmr12 . as-dummy)
+         ))
+    ))
+
+(define (as-properties-to-font-name size fonts properties-alist-list)
+  (let* ((feta-name (properties-to-font-name fonts properties-alist-list))
+        (as-font-alist (cdr (assoc size as-font-alist-alist)))
+        (font (assoc (string->symbol feta-name) as-font-alist)))
+    (if font (symbol->string (cdr font))
+       (let ((e (current-error-port)))
+         (newline e)
+         (display "can't find font: " e)
+         (write feta-name e)
+         ;;(symbol->string size)
+         "as-dummy"
+         ))))
+
+;; FIXME: making a full style-sheet is a pain, so we parasite on
+;; paper16 and translate the result.
+;;
+(define (as-make-style-sheet size)
+  (let ((sheet (make-style-sheet 'paper16)))
+    (assoc-set! sheet 'properties-to-font
+               (lambda (x y) (as-properties-to-font-name size x y)))
+    sheet))
+
+
+(define (dot x y radius) "") ;; TODO
+
+(define (beam width slope thick)
+  (string-append
+   (func "set-line-char" "#")
+   (func "rline-to" width (* width slope))
+   ))
+
+                                       ; simple flat slurs
+(define (bezier-bow l thick)
+  (let (
+       (c0 (cadddr l))
+       (c1 (cadr l))
+       (c3 (caddr l)))
+    (let* ((x (car c0))
+          (dx (- (car c3) x))
+          (dy (- (cdr c3) (cdr c0)))
+          (rc (/ dy dx))
+          (c1-dx (- (car c1) x))
+          (c1-line-y (+ (cdr c0) (* c1-dx rc)))
+          (dir (if (< c1-line-y (cdr c1)) 1 -1))
+          (y (+ -1 (* dir (max (* dir (cdr c0)) (* dir (cdr c3)))))))
+      (string-append
+       (func "rmove-to" x y)
+       (func "put" (if (< 0 dir) "/" "\\\\"))
+       (func "rmove-to" 1 (if (< 0 dir) 1 0))
+       (func "set-line-char" "_")
+       (func "h-line" (- dx 1))
+       (func "rmove-to" (- dx 1) (if (< 0 dir) -1 0))
+       (func "put" (if (< 0 dir) "\\\\" "/"))))))
+
+
+(define (bracket arch_angle arch_width arch_height height arch_thick thick)
+  ;; width now fixed?
+  (let ((width 1))
+    (string-append
+     (func "rmove-to" (+ width 1) (- (/ height -2) 1))
+     (func "put" "\\\\")
+     (func "set-line-char" "|")
+     (func "rmove-to" 0 1)
+     (func "v-line" (+ height 1))
+     (func "rmove-to" 0 (+ height 1))
+     (func "put" "/")
+     )))
+
+(define (polygon points blotdiameter) "") ;; TODO
+
+(define (char i)
+  (func "char" i))
+
+(define (define-origin a b c ) "")
+
+(define (end-output) 
+  (func "end-output"))
+
+(define (experimental-on)
+  "")
+
+(define (filledbox breapth width depth height)
+  (let ((dx (+ width breapth))
+       (dy (+ depth height)))
+    (string-append 
+     (func "rmove-to" (* -1 breapth) (* -1 depth))
+     (if (< dx dy)
+        (string-append
+         (func "set-line-char" 
+               (if (<= dx 1) "|" "#"))
+         (func "v-line" dy))
+        (string-append
+         (func "set-line-char" 
+               (if (<= dy 1) "-" "="))
+         (func "h-line" dx))))))
+
+(define (roundfilledbox breapth width depth height blot)
+  (filledbox breapth width depth height))
+
+(define (font-load-command name-mag command)
+  ;; (display "name-mag: ")
+  ;; (write name-mag)
+  ;; (display "command: ")
+  ;; (write command)
+  (func "load-font" (car name-mag) (cdr name-mag)))
+
+(define (header creator generate) 
+  (func "header" creator generate))
+
+(define (header-end) 
+  (func "header-end"))
+
+;; urg: this is good for half of as2text's execution time
+(define (xlily-def key val)
+  (string-append "(define " key " " (arg->string val) ")\n"))
+
+(define (lily-def key val)
+  (if
+   ;; let's not have all bloody definitions
+   (or (equal? key "lilypondpaperlinewidth")
+       (equal? key "lilypondpaperstaffheight")
+       (equal? key "lilypondpaperoutputscale"))
+   (string-append "(define " key " " (arg->string val) ")\n")
+   ""))
+
+(define (no-origin) "")
+
+(define (placebox x y s) 
+  (let ((ey (inexact->exact y)))
+    (string-append "(move-to " (number->string (inexact->exact x)) " "
+                  (if (= 0.5 (- (abs y) (abs ey)))
+                      (number->string y)
+                      (number->string ey))
+                  ")\n" s)))
+
+(define (select-font name-mag-pair)
+  (let* ((c (assoc name-mag-pair font-name-alist)))
+    (if (eq? c #f)
+       (begin
+         (ly:warn 
+          (string-append 
+           "Programming error: No such font known " 
+           (car name-mag-pair))))
+       "")                             ; issue no command
+    (func "select-font" (car name-mag-pair))))
+
+(define (start-system width height)
+  (func "start-system" width height))
+
+(define (stop-system)
+  (func "stop-system"))
+
+(define (stop-last-system)
+  (func "stop-system"))
+
+
+(define (text s)
+  (func "text" s))
+
+(define (tuplet ht gap dx dy thick dir) "")
+
diff --git a/scm/output-pdf.scm b/scm/output-pdf.scm
new file mode 100644 (file)
index 0000000..898c996
--- /dev/null
@@ -0,0 +1,273 @@
+;;; pdf.scm -- implement Scheme output routines for PDF.
+;;;
+;;;  source file of the GNU LilyPond music typesetter
+;;; 
+;;; (c)  2001--2003 Stephen Peters <portnoy@portnoy.org>
+
+
+;currently no font commands; this is a helper for pdftex.scm.
+
+(define-module (scm output-pdf))
+
+
+
+(define this-module (current-module))
+
+(use-modules
+ (guile)
+ (lily))
+
+
+
+; simple commands to store and update currentpoint.  This makes the
+; other procedures simple rewrites of the PostScript code.
+
+(define currentpoint (cons 0 0))
+(define (showcp) 
+  (string-append (number-pair->string currentpoint) " "))
+(define (moveto x y)
+  (set! currentpoint (cons x y))
+  (string-append (showcp) "m "))
+(define (moveto-pair pair)
+  (moveto (car pair) (cdr pair)))
+(define (rmoveto x y)
+  (moveto (+ x (car currentpoint)) (+ y (cdr currentpoint))))
+(define (lineto x y)
+  (set! currentpoint (cons x y))
+  (string-append (showcp) "l "))
+(define (lineto-pair pair)
+  (lineto (car pair) (cdr pair)))
+(define (rlineto x y)
+  (lineto (+ x (car currentpoint)) (+ y (cdr currentpoint))))
+(define (curveto x1 y1 x2 y2 x y)
+  (set! currentpoint (cons x y))
+  (string-append (ly:number->string x1) (ly:number->string y1)
+                (ly:number->string x2) (ly:number->string y2)
+                (ly:number->string x) (ly:number->string y) "c "))
+(define (curveto-pairs pt1 pt2 pt)
+  (curveto (car pt1) (cdr pt1) (car pt2) (cdr pt2) (car pt) (cdr pt)))
+(define (closefill) "h f ")
+(define (closestroke) "S ")
+(define (setlinewidth w) (string-append (ly:number->string w) "w "))
+(define (setgray g) (string-append (ly:number->string g) "g "))
+(define (setlineparams) "1 j 1 J ")
+
+(define (beam width slope thick)
+  (let ((ht (* slope width)))
+    (string-append (moveto 0 (- (/ thick 2)))
+                  (rlineto width ht)
+                  (rlineto 0 thick)
+                  (lineto 0 (/ thick 2))
+                  (closefill))))
+
+(define (comment s) 
+  (string-append "% " s "\n"))
+
+(define (brack-traject pair ds alpha)
+  (let ((alpha-rad (* alpha (/ 3.141592654 180))))
+    (cons (+ (car pair) (* (cos alpha-rad) ds))
+         (+ (cdr pair) (* (sin alpha-rad) ds)))))
+
+(define (bracket arch_angle arch_width arch_height height arch_thick thick)
+  (let* ((halfht (+ (/ height 2) thick))
+        (farpt (cons (+ thick arch_height) 
+                     (+ (- halfht arch_thick) arch_width)))
+        (halfbrack 
+         (string-append (moveto 0 0)
+                        (lineto thick 0)
+                        (lineto thick (- halfht arch_thick))
+                        (curveto-pairs
+                         (brack-traject (cons thick 
+                                              (- halfht arch_thick))
+                                        (* 0.4 arch_height) 0)
+                         (brack-traject farpt 
+                                        (* -0.25 arch_height) 
+                                        arch_angle)
+                         farpt)
+                        (curveto-pairs 
+                         (brack-traject farpt
+                                        (* -0.15 arch_height)
+                                        arch_angle)
+                         (brack-traject (cons (/ thick 2) halfht)
+                                        (/ arch_height 2) 0)
+                         (cons 0 halfht))
+                        (lineto 0 0)
+                        (closefill))))
+    (string-append (setlinewidth (/ thick 2))
+                  (setlineparams)
+                  "q 1 0 0 -1 0 0 cm " ; flip coords
+                  halfbrack
+                  "Q " ; grestore
+                  halfbrack)))
+
+(define (char i)
+  (invoke-char " show" i))
+
+
+(define (dashed-slur thick dash l)
+  (string-append (setlineparams)
+                "[ " (ly:number->string dash) " "
+                (ly:number->string (* 10 thick)) " ] 0 d "
+                (setlinewidth thick)
+                (moveto-pair (car l))
+                (apply curveto (cdr l))
+                (closestroke)))
+
+(define (dashed-line thick on off dx dy)
+  (string-append (setlineparams)
+                "[ " (ly:number->string on) " "
+                (ly:number->string off) " ] 0 d "
+                (setlinewidth thick)
+                (moveto 0 0)
+                (lineto dx dy)
+                (closestroke)))
+
+(define (repeat-slash width slope beamthick)
+  (let* ((height (/ beamthick slope))
+        (xwid (sqrt (+ (* beamthick beamthick) (* height height)))))
+    (string-append (moveto 0 0)
+                  (rlineto xwid 0)
+                  (rlineto width (* slope width))
+                  (rlineto (- xwid) 0)
+                  (closefill))))
+
+(define (end-output) "")
+
+(define (experimental-on) "")
+
+(define (filledbox breadth width depth height) 
+  (string-append (ly:number->string (- breadth))
+                (ly:number->string (- depth))
+                (ly:number->string (+ breadth width))
+                (ly:number->string (+ depth height))
+                " re f "))
+
+(define (roundfilledbox breadth width depth height blotdiam)
+  (let* ((rad (/ blotdiam 2))
+        (h (- height rad))
+        (d (- depth rad))
+        (w (- width rad))
+        (b (- breadth rad)))
+    (string-append " 0 J "
+                  (setlinewidth blotdiam)
+                  "1 j "
+                  (moveto (- b) (- d))
+                  (rlineto (+ b w) 0)
+                  (rlineto 0 (+ d h))
+                  (rlineto (- (+ b w)) 0)
+                  (rlineto 0 (- (+ d h)))
+                  "b ")))
+
+;; PDF doesn't have the nifty arc operator.  This uses a fast
+;; approximation with two curves.  It bulges out a bit more than a
+;; true circle should along the 45 degree axes, but most users won't
+;; notice.
+(define (dot x y radius)
+  (string-append (moveto (- x radius) y)
+                (curveto (- x radius) (+ y (* 1.3333 radius))
+                         (+ x radius) (+ y (* 1.3333 radius))
+                         (+ x radius) y)
+                (curveto (+ x radius) (- y (* 1.3333 radius))
+                         (- x radius) (- y (* 1.3333 radius))
+                         (- x radius) y)
+                "f "))
+
+
+(define (roundfilledbox breadth width depth height blot) 
+  (filledbox breadth width depth height))
+
+(define (font-def i s) "")
+
+(define (font-switch i) "")
+
+(define (header-end) "")
+
+(define (lily-def key val) "")
+
+(define (header creator generate) "")
+
+(define (invoke-char s i)
+  (string-append 
+   "(\\" (inexact->string i 8) ") " s " " ))
+
+(define (placebox x y s) "")
+
+(define (bezier-bow l thick)
+  (bezier-sandwich l thick))
+
+(define (bezier-sandwich l thick)
+  (string-append (setlinewidth thick)
+                (moveto-pair (list-ref l 7))
+                (curveto-pairs (list-ref l 4)
+                               (list-ref l 5)
+                               (list-ref l 6))
+                (lineto-pair (list-ref l 3))
+                (curveto-pairs (list-ref l 0)
+                               (list-ref l 1)
+                               (list-ref l 2))
+                "B "
+                (bezier-ending (list-ref l 3) (list-ref l 0) (list-ref l 5))
+                (bezier-ending (list-ref l 7) (list-ref l 0) (list-ref l 5))))
+
+(define (bezier-ending z0 z1 z2)
+  (let ((x0 (car z0))
+       (y0 (cdr z0))
+       (x1 (car z1))
+       (y1 (cdr z1))
+       (x2 (car z2))
+       (y2 (cdr z2)))
+    (dot x0 y0 
+        (/ (sqrt (+ (* (- x1 x2) (- x1 x2)) 
+                    (* (- y1 y2) (- y1 y2)))) 2))))
+
+
+(define (start-system width height) "")
+
+(define (stem breadth width depth height) 
+  (filledbox breadth width depth height))
+
+(define (stop-system) "")
+
+(define (text s) "")
+
+(define (polygon points blotdiameter) "") ;; TODO
+
+(define (draw-line thick fx fy tx ty)
+  (string-append (setlineparams)
+                (setlinewidth thick)
+                (moveto fx fy)
+                (lineto tx ty)
+                "S "))
+
+(define (unknown) "\n unknown\n")
+
+; Problem here -- we're using /F18 for the font, but we don't know 
+; for sure that that will exist.
+
+(define (ez-ball ch letter-col ball-col)
+  (let ((origin (cons 0.45 0)))
+    (string-append (setgray 0)
+                  (setlinewidth 1.1)
+                  (moveto-pair origin) (lineto-pair origin)
+                  (closestroke)
+                  (setgray ball-col)
+                  (setlinewidth 0.9)
+                  (moveto-pair origin) (lineto-pair origin)
+                  (closestroke)
+                  (setgray letter-col)
+                  (moveto-pair origin)
+                  "BT "
+                  "/F18 0.85 Tf "
+                  "-0.28 -0.30 Td " ; move for text block
+                  "[(" ch ")] TJ ET ")))
+
+(define (define-origin a b c ) "")
+(define (no-origin) "")
+
+(define-public (pdf-output-expression expr port)
+  (display (eval expr this-module) port) )
+
+
+; Local Variables:
+; scheme-program-name: "guile"
+; End:
diff --git a/scm/output-pdftex.scm b/scm/output-pdftex.scm
new file mode 100644 (file)
index 0000000..ceb35e6
--- /dev/null
@@ -0,0 +1,265 @@
+;;; pdftex.scm -- implement Scheme output routines for PDFTeX
+;;;
+;;;  source file of the GNU LilyPond music typesetter
+;;;  modified from the existing tex.scm
+;;; 
+;;; (c)  1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;; Stephen Peters <portnoy@portnoy.org>
+
+
+;; TODO: port this  to the new module framework.
+
+(define-module (scm output-pdftex))
+
+(use-modules (scm output-pdf)
+            (guile)
+            (ice-9 regex)
+            (ice-9 string-fun)
+            (lily))
+
+(define font-name-alist  '())
+
+(define this-module (current-module))
+(define (unknown) 
+  "%\n\\unknown\n")
+
+
+(define (select-font name-mag-pair)
+  (let*
+      (
+       (c (assoc name-mag-pair font-name-alist))
+       )
+
+    (if (eq? c #f)
+       (begin
+         (display "FAILED\n")
+         (display (object-type (car name-mag-pair)))
+         (display (object-type (caaar font-name-alist)))
+
+         (ly:warn (string-append
+                   "Programming error: No such font known "
+                   (car name-mag-pair) " "
+                   (ly:number->string (cdr name-mag-pair))
+                   ))
+         "") ; issue no command
+       (string-append "\\" (cddr c)))
+    
+    
+    ))
+
+(define (beam width slope thick)
+  (embedded-pdf (list 'beam  width slope thick)))
+
+(define (bracket arch_angle arch_width arch_height height arch_thick thick)
+  (embedded-pdf (list 'bracket  arch_angle arch_width arch_height height arch_thick thick)))
+
+(define (dashed-slur thick dash l)
+  (embedded-pdf (list 'dashed-slur   thick dash l)))
+
+(define (char i)
+  (string-append "\\char" (inexact->string i 10) " "))
+
+(define (dashed-line thick on off dx dy)
+  (embedded-pdf (list 'dashed-line  thick on off dx dy)))
+
+(define (font-load-command name-mag command)
+  (string-append
+   "\\font\\" command "="
+   (car name-mag)
+   " scaled "
+   (ly:number->string (inexact->exact (* 1000  (cdr name-mag))))
+   "\n"))
+
+(define (ez-ball c l b)
+  (embedded-pdf (list 'ez-ball  c  l b)))
+
+(define (header-to-file fn key val)
+  (set! key (symbol->string key))
+  (if (not (equal? "-" fn))
+      (set! fn (string-append fn "." key))
+      )
+  (display
+   (format "writing header field `~a' to `~a'..."
+          key
+          (if (equal? "-" fn) "<stdout>" fn)
+          )
+   (current-error-port))
+  (if (equal? fn "-")
+      (display val)
+      (display val (open-file fn "w"))
+      )
+  (display "\n" (current-error-port))
+  ""
+  )
+
+(if (or (equal? (minor-version) "4.1")
+       (equal? (minor-version) "4")
+       (equal? (minor-version) "3.4"))
+    (define (embedded-pdf expr)
+      (let ((ps-string
+            (with-output-to-string
+              (lambda () (pdf-output-expression expr (current-output-port))))))
+       (string-append "\\embeddedpdf{" ps-string "}")))
+    (define (embedded-pdf expr)
+      (let
+         ((os (open-output-string)))
+       (pdf-output-expression expr os)
+       (string-append "\\embeddedpdf{" (get-output-string os) "}"))))
+
+
+(define (comment s)
+  (simple-format #f "% ~a\n" s))
+
+(define (end-output) 
+  (begin
+                                       ; uncomment for some stats about lily memory      
+                                       ;               (display (gc-stats))
+    (string-append "%\n\\lilypondend\n"
+                                       ; Put GC stats here.
+                  )))
+
+(define (experimental-on)
+  "")
+
+(define (repeat-slash w a t)
+  (embedded-pdf (list 'repeat-slash w a t)))
+(define (fontify name-mag-pair exp)
+  (string-append (select-font name-mag-pair)
+                exp))
+
+
+(define (tex-encoded-fontswitch name-mag)
+  (let* ((iname-mag (car name-mag))
+        (ename-mag (cdr name-mag)))
+    (cons iname-mag
+         (cons ename-mag
+               (string-append  "magfont"
+                         (string-encode-integer
+                          (hashq (car ename-mag) 1000000))
+                         "m"
+                         (string-encode-integer
+                          (inexact->exact (* 1000 (cdr ename-mag)))))))))
+(define (define-fonts internal-external-name-mag-pairs)
+  (set! font-name-alist (map tex-encoded-fontswitch
+                            internal-external-name-mag-pairs))
+  (apply string-append
+        (map (lambda (x)
+               (font-load-command (car x) (cdr x)))
+             (map cdr font-name-alist))))
+
+
+(define (font-switch i)
+  (string-append
+   "\\" (font i) "\n"))
+
+(define (font-def i s)
+  (string-append
+   "\\font" (font-switch i) "=" s "\n"))
+
+(define (header-end)
+  (string-append
+   "\\def\\lilyoutputscalefactor{"
+   (number->string (cond
+                   ((equal? (ly:unit) "mm") (/ 72.0  25.4))
+                   ((equal? (ly:unit) "pt") (/ 72.0  72.27))
+                   (else (error "unknown unit" (ly:unit)))
+                   ))
+   "}%\n"
+   "\\ifx\\lilypondstart\\undefined\n"
+   "  \\input lilyponddefs\n"
+   "\\fi\n"
+   "\\outputscale=\\lilypondpaperoutputscale \\lilypondpaperunit\n"
+   "\\lilypondpostscript\n"
+   "\\pdfcompresslevel=0"))
+
+;; Note: this string must match the string in ly2dvi.py!!!
+(define (header creator generate) 
+  (string-append
+   "% Generated automatically by: " creator generate "\n"))
+
+(define (invoke-char s i)
+  (string-append 
+   "\n\\" s "{" (inexact->string i 10) "}" ))
+
+;;
+;; need to do something to make this really safe.
+;;
+(define (output-tex-string s)
+  (if security-paranoia
+      (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
+      s))
+
+(define (lily-def key val)
+  (let ((tex-key
+        (regexp-substitute/global 
+             #f "_" (output-tex-string key) 'pre "X" 'post))
+       (tex-val (output-tex-string val)))
+    (if (equal? (sans-surrounding-whitespace tex-val) "")
+       (string-append "\\let\\" tex-key "\\undefined\n")
+       (string-append "\\def\\" tex-key "{" tex-val "}%\n"))))
+
+(define (number->dim x)
+  (string-append
+   ;;ugh ly:* in backend needs compatibility func for standalone output
+   (ly:number->string x) " \\outputscale "))
+
+(define (placebox x y s) 
+  (string-append "\\lyitem{"
+                (ly:number->string y) "}{"
+                (ly:number->string x) "}{"
+                s "}%\n"))
+
+(define (bezier-bow l thick)
+  (embedded-pdf (list 'bezier-bow  `(quote ,l) thick)))
+
+(define (bezier-sandwich l thick)
+  (embedded-pdf (list 'bezier-sandwich  `(quote ,l) thick)))
+
+(define (start-system wd ht)
+  (string-append "\\leavevmode\n"
+                "\\scoreshift = " (number->dim (* ht 0.5)) "\n"
+                "\\lilypondifundefined{lilypondscoreshift}%\n"
+                "  {}%\n"
+                "  {\\advance\\scoreshift by -\\lilypondscoreshift}%\n"
+                "\\lybox{"
+                (ly:number->string wd) "}{"
+                (ly:number->string ht) "}{%\n"))
+
+(define (stop-system) 
+  "}%\n%\n\\interscoreline\n%\n")
+(define (stop-last-system)
+  "}%\n")
+
+(define (filledbox breapth width depth height) 
+  (string-append "\\lyvrule{"
+                (ly:number->string (- breapth)) "}{"
+                (ly:number->string (+ breapth width)) "}{"
+                (ly:number->string depth) "}{"
+                (ly:number->string height) "}"))
+
+(define (roundfilledbox x y width height blotdiam)
+  (embedded-pdf (list 'roundfilledbox  x y width height blotdiam)))
+
+(define (text s)
+  (string-append "\\hbox{" (output-tex-string s) "}"))
+
+(define (draw-line thick fx fy tx ty)
+  (embedded-pdf (list 'draw-line thick fx fy tx ty)))
+
+(define (define-origin file line col)
+  (if (procedure? point-and-click)
+      (string-append "\\special{src:\\string:"
+                    (point-and-click line col file)
+                    "}" )
+      "")
+  )
+
+                                       ; no-origin not supported in PDFTeX
+(define (no-origin) "")
+
+
+
+
+(define-public (pdftex-output-expression expr port)
+  (display (eval expr this-module) port) )
diff --git a/scm/output-ps.scm b/scm/output-ps.scm
new file mode 100644 (file)
index 0000000..baac7b4
--- /dev/null
@@ -0,0 +1,300 @@
+;;;; ps.scm -- implement Scheme output routines for PostScript
+;;;;
+;;;;  source file of the GNU LilyPond music typesetter
+;;;; 
+;;;; (c)  1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+
+(debug-enable 'backtrace)
+
+
+(define-module (scm output-ps))
+(define this-module (current-module))
+
+(use-modules
+ (guile)
+ (lily))
+
+
+
+;;; Lily output interface --- cleanup and docme
+
+
+
+;; Module entry
+(define-public (ps-output-expression expr port)
+  (display (eval expr this-module) port))
+
+
+;; Global vars
+
+;; alist containing fontname -> fontcommand assoc (both strings)
+(define font-name-alist '())
+
+
+;; Interface functions
+(define (beam width slope thick)
+  (string-append
+   (numbers->string (list slope width thick)) " draw_beam" ))
+
+;; two beziers with round endings
+(define (bezier-bow l thick)
+  
+  (define (bezier-ending z0 z1 z2)
+    (let ((x0 (car z0))
+         (y0 (cdr z0))
+         (x1 (car z1))
+         (y1 (cdr z1))
+         (x2 (car z2))
+         (y2 (cdr z2)))
+      (string-append
+       " "
+       (numbers->string
+       (list x0 y0
+             (/ (sqrt (+ (* (- x1 x2) (- x1 x2))
+                         (* (- y1 y2) (- y1 y2)))) 2)))
+       " draw_dot")))
+
+  (string-append
+   (bezier-sandwich l thick)
+   (bezier-ending (list-ref l 3) (list-ref l 0) (list-ref l 5))
+   (bezier-ending (list-ref l 7) (list-ref l 0) (list-ref l 5))))
+
+;; two beziers
+(define (bezier-sandwich l thick)
+  (string-append 
+   (apply string-append (map number-pair->string l))
+   (ly:number->string thick)
+   " draw_bezier_sandwich "))
+
+(define (bracket arch_angle arch_width arch_height  height arch_thick thick)
+  (string-append
+   (numbers->string
+    (list arch_angle arch_width arch_height height arch_thick thick))
+   " draw_bracket"))
+
+(define (symmetric-x-triangle thick w h)
+  (string-append
+   (numbers->string (list h w thick))
+   " draw_symmetric_x_triangle"))
+
+
+(define (char i)
+  (string-append 
+   "(\\" (inexact->string i 8) ") show " ))
+
+
+(define (comment s)
+  (string-append "% " s "\n"))
+
+
+(define (dashed-line thick on off dx dy)
+  (string-append 
+   (ly:number->string dx)
+   " "
+   (ly:number->string dy)
+   " "
+   (ly:number->string thick)
+   " [ "
+   (ly:number->string on)
+   " "
+   (ly:number->string off)
+   " ] 0 draw_dashed_line"))
+
+;; what the heck is this interface ?
+(define (dashed-slur thick dash l)
+  (string-append 
+   (apply string-append (map number-pair->string l)) 
+   (ly:number->string thick) 
+   " [ "
+   (ly:number->string dash)
+   " "
+   ;;UGH.  10 ?
+   (ly:number->string (* 10 thick))
+   " ] 0 draw_dashed_slur"))
+
+(define (define-fonts internal-external-name-mag-pairs)
+  
+  (define (font-load-command name-mag command)
+    
+    (define (possibly-capitalize-font-name name)
+      (if (equal? (substring name 0 2) "cm")
+         (string-upcase name)
+         name))
+    
+    (string-append
+     "/" command
+     " { /"
+     ;; Ugh, the Bluesky type1 fonts for computer modern use capitalized 
+     ;; postscript font names.
+     (possibly-capitalize-font-name (car name-mag))
+     " findfont "
+     "20 " (ly:number->string (cdr name-mag)) " mul "
+     "output-scale div scalefont setfont } bind def "
+     "\n"))
+
+  (define (ps-encoded-fontswitch name-mag-pair)
+    (let* ((key (car name-mag-pair))
+          (value (cdr name-mag-pair)))
+      (cons key
+           (cons value
+                 (string-append "lilyfont"
+                                (car value)
+                                "-"
+                                (number->string (cdr value)))))))
+      
+  (set! font-name-alist (map ps-encoded-fontswitch
+                            internal-external-name-mag-pairs))
+
+  (apply string-append
+        (map (lambda (x) (font-load-command (car x) (cdr x)))
+             (map cdr font-name-alist))))
+
+(define (define-origin file line col) "")
+
+(define (dot x y radius)
+  (string-append
+   " "
+   (numbers->string
+    (list x y radius)) " draw_dot"))
+
+(define (zigzag-line centre? zzw zzh thick dx dy)
+  (string-append
+    (if centre? "true" "false")
+    " "
+    (ly:number->string zzw)
+    " "
+    (ly:number->string zzh)
+    " "
+    (ly:number->string thick)
+    " 0 0 "
+    (ly:number->string dx)
+    " "
+    (ly:number->string dy)
+    " draw_zigzag_line "))
+
+(define (draw-line thick x1 y1 x2 y2)
+  (string-append 
+  "    1 setlinecap
+       1 setlinejoin "
+  (ly:number->string thick)
+       " setlinewidth "
+   (ly:number->string x1)
+   " "
+   (ly:number->string y1)
+   " moveto "
+   (ly:number->string x2)
+   " "
+   (ly:number->string y2)
+   " lineto stroke"))
+
+(define (polygon points blotdiameter)
+  (string-append
+   " "
+   (numbers->string points)
+   (ly:number->string (/ (length points) 2))
+   (ly:number->string blotdiameter)
+   " draw_polygon"))
+
+(define (end-output)
+  "\nend-lilypond-output\n")
+
+(define (ez-ball ch letter-col ball-col)
+  (string-append
+   " (" ch ") "
+   (numbers->string (list letter-col ball-col))
+   " /Helvetica-Bold " ;; ugh
+   " draw_ez_ball"))
+
+(define (filledbox breapth width depth height) 
+  (string-append (numbers->string (list breapth width depth height))
+                " draw_box" ))
+
+(define (fontify name-mag-pair exp)
+
+  (define (select-font name-mag-pair)
+    (let* ((c (assoc name-mag-pair font-name-alist)))
+      (if (eq? c #f)
+         (begin
+           (display "FAILED\n")
+           (display (object-type (car name-mag-pair)))
+           (display (object-type (caaar font-name-alist)))
+           (ly:warn (string-append
+                     "Programming error: No such font known "
+                     (car name-mag-pair) " "
+                     (ly:number->string (cdr name-mag-pair))))
+           
+           ;; Upon error, issue no command
+           "")
+         (string-append " " (cddr c) " "))))
+  
+  (string-append (select-font name-mag-pair) exp))
+
+(define (header creator generate) 
+  (string-append
+   "%!PS-Adobe-3.0\n"
+   "%%Creator: " creator generate "\n"))
+
+(define (header-end)
+  (string-append
+   ;; URG: now we can't use scm output without Lily
+   (ly:gulp-file "lilyponddefs.ps")
+   " {exch pop //systemdict /run get exec} "
+   (ly:gulp-file "music-drawing-routines.ps")
+   "{ exch pop //systemdict /run get exec } "
+   ;; ps-testing wreaks havoc when used with lilypond-book.
+   ;;  -- is this still true with new modules system?
+   ;;   (if (defined? 'ps-testing) "\n /testing true def" "")
+   ;;   "\n /testing true def"
+   ))
+
+(define (lily-def key val)
+  (let ((prefix "lilypondpaper"))
+    (if (string=?
+        (substring key 0 (min (string-length prefix) (string-length key)))
+        prefix)
+       (string-append "/" key " {" val "} bind def\n")
+       (string-append "/" key " (" val ") def\n"))))
+
+(define (no-origin) "")
+  
+(define (placebox x y s) 
+  (string-append 
+   (ly:number->string x) " " (ly:number->string y) " {" s "} place-box\n"))
+
+(define (repeat-slash wid slope thick)
+  (string-append
+   (numbers->string (list wid slope thick))
+   " draw_repeat_slash"))
+
+(define (roundfilledbox x y width height blotdiam)
+   (string-append
+    " "
+    (numbers->string
+     (list x y width height blotdiam)) " draw_round_box"))
+
+(define (start-system width height)
+  (string-append
+   "\n" (ly:number->string height)
+   " start-system\n"
+   "{\n"
+   "set-ps-scale-to-lily-scale"))
+
+(define (stem breapth width depth height) 
+  (string-append
+   (numbers->string (list breapth width depth height))
+   " draw_box" ))
+
+(define (stop-last-system)
+  (stop-system))
+
+(define (stop-system)
+  "}\nstop-system\n")
+
+(define (text s)
+  (string-append "(" s ") show "))
+
+(define (unknown) 
+  "\n unknown\n")
+
diff --git a/scm/output-pysk.scm b/scm/output-pysk.scm
new file mode 100644 (file)
index 0000000..0edc678
--- /dev/null
@@ -0,0 +1,80 @@
+;;; pysk.scm -- implement Python  output routines (for Sketch)
+;;;
+;;;  source file of the GNU LilyPond music typesetter
+;;; 
+;;; (c)  1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+
+
+(define-module (scm output-pysk)
+  )
+
+(use-modules (scm output-ps)
+            (ice-9 regex)
+            (ice-9 string-fun)
+            (guile)
+            )
+
+(define this-module (current-module))
+(define-public (pysk-output-expression expr port)
+  (display (pythonify expr) port )
+  )
+
+(define (ly:warn s) (display s))
+
+(define (pythonify q)
+  (cond
+   ((string? q) (py-str q))
+   ((symbol? q) (py-str (symbol->string q)))
+   ((and (pair?  q)
+        (not (pair? (cdr q)))
+        (not (eq? '() (cdr q)))
+        ) (py-tuple q))
+   ((pair? q) (py-listify q))
+   ((number? q) (number->string q))
+   ((eq? q '()) '())
+   (else (begin
+          (ly:warn "Unknown object to pythonify:")
+          (write q)
+          (newline)
+          )
+  )))
+
+(define (py-str s)
+  (string-append "'" s "'")
+  )
+
+(define (py-tuple q)
+  (string-append "(" (pythonify (car  q)) "," (pythonify (cdr q)) ")")
+  )
+
+(define (my-map f l)
+  (if (null? l)
+      '()
+      (if (pair? (cdr l))
+         (cons (f (car l)) (my-map f (cdr l)))
+         (cons (f (car l)) (f (cdr l)))
+         )
+  ))
+
+(define (tuplify-list lst)
+  (if (null? lst)
+      '()
+      (if (pair? (cdr lst))
+         (cons (car lst) (tuplify-list (cdr lst)))
+         (if (eq? '() (cdr lst))
+             lst
+             (list (string-append "(" (car lst) ", " (cdr lst) ")" ))
+             ))
+         ))
+
+(define (py-listify q)
+  (string-append
+   "["
+   (string-join
+    (tuplify-list (my-map pythonify q))   ",")
+   "]\n"
+   ))
+
+
diff --git a/scm/output-sketch.scm b/scm/output-sketch.scm
new file mode 100644 (file)
index 0000000..ad914a9
--- /dev/null
@@ -0,0 +1,347 @@
+
+;;; sketch.scm -- implement Scheme output routines for Sketch
+;;;
+;;;  source file of the GNU LilyPond music typesetter
+;;; 
+;;; (c)  1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+
+;; def dispats (out,x,y,expr):
+;;     (symbol, rest) = expr
+;;     if symbol == 'placebox':
+;;     (dx,dy,expr) = rest
+;;     dispats (out, x + dx, y + dy, expr)
+;;         # hier wordt (X+DX) dus eerder gedaan dan dispats van EXPR.
+;;         # er zijn geen "globale" variabelen.
+;;     elif symbol == 'char':
+;;         out.write ('moveto( %f %f); char(%d)' % (x,y,rest))
+
+
+
+
+;;
+;; All functions have the signature 
+;;
+;;  NAME X Y ARGUMENTS-PASSED-BY-LILYPOND
+;;
+
+(define-module (scm output-sketch))
+(debug-enable 'backtrace)
+
+(define this-module (current-module))
+
+(define-public (sketch-output-expression expr port)
+  (display (dispatch expr) port))
+
+(use-modules (ice-9 format) (guile) (lily))
+
+;; hmm
+; (define (dispatch x y expr)
+;  (let ((keyword (car expr))) 
+;    (cond
+; ((eq? keyword 'beam x y width slope thick)
+; ((eq? keyword 'bezier-bow x y l thick)
+; ((eq? keyword 'bezier-sandwich x y l thick)
+; ((eq? keyword 'bracket arch_angle arch_width arch_height  height arch_thick thick)
+; ((eq? keyword 'char x y i)
+; ((eq? keyword 'comment s)
+; ((eq? keyword 'dashed-line thick on off dx dy)
+; ((eq? keyword 'dashed-slur thick dash l)
+; ((eq? keyword 'define-origin a b c ) "")
+; ((eq? keyword 'end-output)
+; ((eq? keyword 'experimental-on) "")
+; ((eq? keyword 'ez-ball ch letter-col ball-col)
+; ((eq? keyword 'filledbox x y breapth width depth height)
+; ((eq? keyword 'font-load-command name-mag command)
+; ((eq? keyword 'font-switch i)
+; ((eq? keyword 'header creator generate)
+; ((eq? keyword 'header-end)
+; ((eq? keyword 'invoke-char s i)
+; ((eq? keyword 'lily-def key val)
+; ((eq? keyword 'no-origin) "")
+; ((eq? keyword 'output-scale 1)
+; ((eq? keyword 'placebox)
+;  (dispatch (+ x (cadr expr)) (+ y (caddr expr) (cadddr expr))))
+; ((eq? keyword 'repeat-slash wid slope thick)
+; ((eq? keyword 'roundfilledbox x y dx dy w h b)
+; ((eq? keyword 'select-font name-mag-pair)
+; ((eq? keyword 'start-system width height)
+; ((eq? keyword 'stem x y z w) (filledbox x y z w))
+; ((eq? keyword 'stop-last-system)
+; ((eq? keyword 'stop-system)
+; ((eq? keyword 'text x y s)
+; ((eq? keyword 'unknown)
+
+;     )))
+
+
+(define current-y 150)
+
+(define (dispatch expr)
+  (let ((keyword (car expr))) 
+    (cond
+     ((eq? keyword 'placebox)
+      (dispatch-x-y (cadr expr) (+ current-y (caddr expr)) (cadddr expr)))
+     (else
+      (apply (eval keyword this-module) (cdr expr))))))
+
+(define (dispatch-x-y x y expr)
+  (apply (eval (car expr) this-module) (append (list x y) (cdr expr))))
+      
+(define (ascii->string i) (make-string 1 (integer->char i)))
+
+(define (control->list x y c)
+  (list (+ x (car c)) (+ y (cdr c))))
+
+(define (control-flip-y c)
+  (cons (car c) (* -1 (cdr c))))
+
+;;; urg.
+(define (sketch-numbers->string l)
+  (string-append
+   (number->string (car l))
+   (if (null? (cdr l))
+       ""
+       (string-append ","  (sketch-numbers->string (cdr l))))))
+
+;;;\def\scaletounit{ 2.83464566929134 mul }%
+
+;;(define output-scale 2.83464566929134)
+
+(define scale-to-unit
+  (cond
+   ((equal? (ly:unit) "mm") (/ 72.0  25.4))
+   ((equal? (ly:unit) "pt") (/ 72.0  72.27))
+   (else (error "unknown unit" (ly:unit)))
+   ))
+
+(define (mul-scale x) (* scale-to-unit output-scale x))
+
+(define (sketch-filled-rectangle width dy dx height x y)
+  (string-append
+   "fp((0,0,0))\n"
+   "lw(0.1)\n"
+   "r("
+   (sketch-numbers->string (map mul-scale (list width dy dx height x y)))
+   ")\n"))
+
+
+(define (sketch-bezier x y l)
+  (let* ((c0 (car (list-tail l 3)))
+        (c123 (list-head l 3))
+        (start (control->list x y c0))
+        (control (apply append
+                        (map (lambda (c) (control->list x y c)) c123))))
+    (string-append
+     "bs(" (sketch-numbers->string (map mul-scale start)) ",0)\n"
+     "bc(" (sketch-numbers->string (map mul-scale control)) ",2)\n")))
+  
+
+
+(define (sketch-beziers x y l thick)
+  (let* ((first (list-tail l 4))
+        (second (list-head l 4)))
+    (string-append
+     "fp((0,0,0))\n"
+     "lw(0.1)\n"
+     "b()\n"
+     (sketch-bezier x y first)
+     (sketch-bezier x y second))))
+        
+
+;; alist containing fontname -> fontcommand assoc (both strings)
+;; old scheme
+;;(define font-alist '(("feta13" . ("feta13" . "13"))
+;;                  ("feta20" . ("feta20" . "20"))))
+(define font-alist '(("feta13" . ("LilyPond-Feta13" . "13"))
+;;                  ("feta20" . ("LilyPond-Feta-20" . "20")
+                    ("feta20" . ("GNU-LilyPond-feta-20" . "20")
+                     )))
+
+;;(define font "")
+(define font (cdar font-alist))
+
+(define font-count 0)
+(define current-font "")
+
+(define (fontify x y name-mag-pair exp)
+  (string-append (select-font name-mag-pair)
+                (apply (eval (car exp) this-module)
+                       (append (list x y) (cdr exp)))))
+;;              (if (string? exp) exp "")))
+
+(define (define-fonts x) "")
+
+(define (font-def x)
+"")
+
+
+(define (cached-fontname i)
+  "")
+
+
+(define (roundfilledbox x y dx dy w h b)
+  (sketch-filled-rectangle w 0 0 h x y))
+
+(define (polygon points blotdiameter) "") ;; TODO
+
+(define (select-font name-mag-pair)
+  ;; name-mag-pair: (quote ("feta20" . 0.569055118110236))"feta20"(quote ("feta20" . 0.569055118110236))
+  (let ((f (assoc (caadr name-mag-pair) font-alist)))
+    (if (pair? f)
+       (set! font (cdr f))
+       (format #t "font not found: ~s\n" (caadr name-mag-pair))))
+  ;;(write font)
+  "")
+
+(define (font-load-command name-mag command)
+  "")
+
+(define (beam x y width slope thick)
+  (apply sketch-filled-rectangle
+        (list width (* slope width) 0 thick x y)))
+
+(define (comment s)
+  (string-append "# " s "\n"))
+
+(define (bracket arch_angle arch_width arch_height  height arch_thick thick)
+  (string-append
+   (numbers->string (list arch_angle arch_width arch_height height arch_thick thick)) " draw_bracket" ))
+
+(define (char x y i)
+  (string-append
+   "fp((0,0,0))\n"
+   "le()\n"
+   "lw(0.1)\n"
+   "Fn('" (car font) "')\n"
+   "Fs(" (cdr font) ")\n"
+   ;; how to get zero-left padding with ``Guile's fprintf'' ?
+   ;;(format #f "txt('\\x~2x',(" i)
+   ;;(format #f "txt('\\x~02x',(" i)
+   ;; ugh: python's '%02x' % i
+   (format #f "&#x~2,'0x;" i)
+   (sketch-numbers->string (map mul-scale (list x y)))
+   "))\n"))
+
+
+;; what the heck is this interface ?
+(define (dashed-slur thick dash l)
+  (string-append 
+   (apply string-append (map number-pair->string l)) 
+   (ly:number->string thick) 
+   " [ "
+   (ly:number->string dash)
+   " "
+   (ly:number->string (* 10 thick))    ;UGH.  10 ?
+   " ] 0 draw_dashed_slur"))
+
+(define (dashed-line thick on off dx dy)
+  (string-append 
+   (ly:number->string dx)
+   " "
+   (ly:number->string dy)
+   " "
+   (ly:number->string thick) 
+   " [ "
+   (ly:number->string on)
+   " "
+   (ly:number->string off)
+   " ] 0 draw_dashed_line"))
+
+(define (repeat-slash wid slope thick)
+ (string-append (numbers->string (list wid slope thick))
+  " draw_repeat_slash"))
+
+(define (end-output)
+  "guidelayer('Guide Lines',1,0,0,1,(0,0,1))
+grid((0,0,20,20),0,(0,0,1),'Grid')\n")
+
+(define (experimental-on) "")
+
+(define (font-switch i)
+  "")
+
+(define (header-end)
+  "")
+
+(define output-scale 1)
+
+(define (lily-def key val)
+  (if (equal? key "lilypondpaperoutputscale")
+      ;; ugr
+      (set! output-scale (string->number val))
+      )
+  "")
+
+
+(define (header creator generate)
+  (string-append
+   "##Sketch 1 2
+document()
+layout('A4',0)
+layer('Layer 1',1,1,0,0,(0,0,0))
+"))
+
+(define (invoke-char s i)
+  "")
+
+;; TODO: bezier-ending, see ps.scm
+(define (bezier-bow x y l thick)
+  (bezier-sandwich x y l thick))
+
+(define (bezier-sandwich x y l thick)
+  (apply
+   sketch-beziers (list x y (primitive-eval l) thick)))
+
+(define (start-system width height)
+  (set! current-y (- current-y height))
+  "G()\n")
+
+;;  r((520.305,0,0,98.0075,51.8863,10.089))
+;;  width, 0, 0, height, x, y
+(define (filledbox x y breapth width depth height)
+  (apply sketch-filled-rectangle
+        (list
+         (+ breapth width) 0 0 (+ depth height) (- x breapth) (- y depth))))
+
+(define (stem x y z w) (filledbox x y z w))
+
+
+(define (stop-system)
+    "G_()\n")
+
+;; huh?
+(define (stop-last-system)
+   (stop-system))
+
+(define (text x y s)
+  (string-append
+   "fp((0,0,0))\n"
+   "le()\n"
+   "lw(0.1)\n"
+   "Fn('" (car font) "')\n"
+   "Fs(" (cdr font) ")\n"
+   ;; Hmm
+   "txt('" s "',(" (sketch-numbers->string
+                                 (map mul-scale (list x y))) "))\n"))
+
+(define (unknown) 
+  "\n unknown\n")
+
+(define (ez-ball ch letter-col ball-col)
+  (string-append
+   " (" ch ") "
+   (numbers->string (list letter-col ball-col))
+   " /Helvetica-Bold " ;; ugh
+   " draw_ez_ball"))
+
+(define (define-origin a b c ) "")
+(define (no-origin) "")
+
+
+
+;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;
+
diff --git a/scm/output-sodipodi.scm b/scm/output-sodipodi.scm
new file mode 100644 (file)
index 0000000..52efd40
--- /dev/null
@@ -0,0 +1,394 @@
+;;;; sodipodi.scm -- implement Scheme output routines for PostScript
+;;;;
+;;;;  source file of the GNU LilyPond music typesetter
+;;;; 
+;;;; (c)  2002--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+
+;;;; NOTE:
+;;;;
+;;;; * Get mftrace 1.0.12 or newer to create the .pfa fonts:
+;;;;
+;;;;       make -C mf clean
+;;;;       make -C mf pfa
+;;;;
+;;;; * Get sodipodi-0.28 or newer
+;;;;
+;;;; * Link/copy mf/out/private-fonts to ~/.sodipodi/private-fonts 
+
+;;;; http://www.w3.org/TR/SVG11/paths.html
+
+
+(debug-enable 'backtrace)
+
+(define-module (scm output-sodipodi))
+(define this-module (current-module))
+
+(use-modules
+ (guile)
+ (lily))
+
+;;; Lily output interface --- cleanup and docme
+
+;;; Bare minimum interface for \score { \notes c } }
+;;; should implement:
+;;;
+;;;    xx-output-expression
+;;;    char
+;;;    filledbox
+;;;    placebox
+
+;;; and should intercept: 
+;;;
+;;;    fontify
+;;;    lily-def
+;;;    header-end
+;;;    define-fonts
+;;;    no-origin
+;;;    start-system
+;;;    end-output
+;;;    header
+;;;    comment
+;;;    stop-last-system
+
+;; Module entry
+;;(define-public (sodipodi-output-expression expr port)
+;;  (display (eval expr this-module) port))
+
+(define-public (sodipodi-output-expression expr port)
+  (display (dispatch expr) port))
+
+(define (dispatch expr)
+  (let ((keyword (car expr)))
+    (cond
+     ((eq? keyword 'some-func) "")
+     ;;((eq? keyword 'placebox) (dispatch (cadddr expr)))
+     ;;((eq? keyword 'fontify) (dispatch (caddr expr)))
+     (else
+      (if (module-defined? this-module keyword)
+         (apply (eval keyword this-module) (cdr expr))
+         (begin
+           (display
+            (string-append "undefined: " (symbol->string keyword) "\n"))
+           ""))))))
+  
+
+;; Global vars
+
+(define output-scale 1)
+(define system-y 0)
+;; huh?
+(define urg-line-thickness 0)
+(define line-thickness 0.001)
+(define half-lt (/ line-thickness 2))
+
+
+(define scale-to-unit
+  (cond
+   ((equal? (ly:unit) "mm") (/ 72.0  25.4))
+   ((equal? (ly:unit) "pt") (/ 72.0  72.27))
+   (else (error "unknown unit" (ly:unit)))))
+
+;; alist containing fontname -> fontcommand assoc (both strings)
+;;(define font-name-alist '())
+
+;; Helper functions
+
+
+(define (tagify tag string . attribute-alist)
+  (string-append
+   "<" tag
+   (apply string-append (map (lambda (x) (string-append
+                                         " "
+                                         (symbol->string (car x))
+                                         "='"
+                                         (cdr x)
+                                         "'"))
+                            attribute-alist))
+   ">\n"
+   string "\n</" tag ">\n"))
+
+
+(define (ascii->string i) (make-string 1 (integer->char i)))
+(define (ascii->upm-string i)
+  (let* ((i+1 (+ i 1))
+        (u1 #xee)
+        (u2 (+ #x80 (quotient i+1 #x40)))
+        (u3 (+ #x80 (modulo i+1 #x40))))
+    (apply string-append
+          (map ascii->string
+               (list u1 u2 u3)))))
+
+(define (control->list c)
+  (list (car c) (cdr c)))
+
+(define (control->string c)
+  (string-append
+   (number->string (car c)) ","
+   ;; loose the -1
+   (number->string (* -1 (cdr c))) " "))
+
+(define (control-flip-y c)
+  (cons (car c) (* -1 (cdr c))))
+
+(define (numbers->string l)
+  (string-append
+   (number->string (car l))
+   (if (null? (cdr l))
+       ""
+       (string-append ","  (numbers->string (cdr l))))))
+
+(define (svg-bezier l close)
+  (let* ((c0 (car (list-tail l 3)))
+        (c123 (list-head l 3)))
+    (string-append
+     (if (not close) "M " "L ")
+     (control->string c0)
+     "C " (apply string-append (map control->string c123))
+     (if (not close) "" (string-append
+                        "L " (control->string close))))));; " Z")))))
+
+(define xml-header
+"<?xml version='1.0' standalone='no'?>
+<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN'
+'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'
+[
+ <!ATTLIST svg
+ xmlns:xlink CDATA #FIXED 'http://www.w3.org/1999/xlink'>
+]>
+"
+;;"
+)
+
+(define svg-header
+"<svg
+   id='svg1'
+   sodipodi:version='0.26'
+   xmlns='http://www.w3.org/2000/svg'
+   xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'
+   xmlns:xlink='http://www.w3.org/1999/xlink'
+   width='210mm'
+   height='297mm'
+   sodipodi:docbase='/tmp/'
+   sodipodi:docname='/tmp/x'>
+  <defs
+     id='defs3' />
+  <sodipodi:namedview
+     id='base' />
+  <g transform='translate(10,10) scale (1.0)'>
+  ")
+
+
+
+;; Interface functions
+
+(define (sqr x)
+  (* x x))
+
+;; transform=scale and stroke don't play nice together...
+(define (XXXbeam width slope thick)
+  (let* ((x width)
+        (y (* slope width))
+        (z (sqrt (+ (sqr x) (sqr y)))))
+    (tagify "rect" ""
+           ;; '(style . "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-opacity:1;stroke-width:0.1;stroke-linejoin:miter;stroke-linecap:butt;")
+           ;;'(style . "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:0.000001;stroke-linejoin:miter;stroke-linecap:butt;")
+           `(style . ,(format "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:~f;stroke-linejoin:miter;stroke-linecap:butt;" line-thickness))
+           ;;`(x . ,(number->string half-lt))
+           `(x . "0")
+           ;;`(y . ,(number->string (- half-lt (/ thick 2))))
+           `(y . ,(number->string (- 0 (/ thick 2))))
+           `(width . ,(number->string width))
+           `(height . ,(number->string thick))
+           `(ry . ,(number->string half-lt))
+           `(transform . ,(format #f "matrix(~f,~f,0,1,0,0) scale (~f,~f)"
+                                  (/ x z)
+                                  (* -1 (/ y z))
+                                  output-scale output-scale)))))
+
+(define (beam width slope thick)
+  (let* ((x width)
+        (y (* slope width))
+        (z (sqrt (+ (sqr x) (sqr y)))))
+    (tagify "rect" ""
+           `(style . ,(format "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:~f;stroke-linejoin:miter;stroke-linecap:butt;" line-thickness))
+           `(x . "0")
+           `(y . ,(number->string (* output-scale (- 0 (/ thick 2)))))
+           `(width . ,(number->string (* output-scale width)))
+           `(height . ,(number->string (* output-scale thick)))
+           `(ry . ,(number->string (* output-scale half-lt)))
+           `(transform . ,(format #f "matrix(~f,~f,0,1,0,0) scale (~f,~f)"
+                                  (/ x z)
+                                  (* -1 (/ y z))
+                                  1 1)))))
+
+;; TODO: bezier-ending, see ps.scm
+(define (bezier-bow urg-l thick)
+  
+  (define (bezier-ending z0 z1 z2)
+    (let ((x0 (car z0))
+         (y0 (cdr z0))
+         (x1 (car z1))
+         (y1 (cdr z1))
+         (x2 (car z2))
+         (y2 (cdr z2)))
+      (let ((r (/ (sqrt (+ (* (- x1 x2) (- x1 x2))
+                         (* (- y1 y2) (- y1 y2)))) 2)))
+      (tagify "circle" ""
+             `(fill . "#000000;")
+             `(cx . ,(number->string (* output-scale x0)))
+             `(cy . ,(number->string (* output-scale (- 0 y0))))
+             `(r . ,(number->string (* output-scale r)))))))
+  
+  (let ((l (eval urg-l this-module)))
+    (string-append
+     (bezier-sandwich l thick)
+     (bezier-ending (list-ref l 3) (list-ref l 0) (list-ref l 5))
+     (bezier-ending (list-ref l 7) (list-ref l 0) (list-ref l 5)))))
+
+(define (bezier-sandwich l thick)
+  (let* (;;(l (eval urg-l this-module))
+        (first (list-tail l 4))
+        (first-c0 (car (list-tail first 3)))
+        (second (list-head l 4)))
+    (tagify "path" ""
+           `(stroke . "#000000")
+           `(stroke-width . ,(number->string line-thickness))
+           `(transform . ,(format #f "scale (~f,~f)"
+                                  output-scale output-scale))
+           `(d . ,(string-append (svg-bezier first #f)
+                                 (svg-bezier second first-c0))))))
+  
+(define (char i)
+  (if #t
+      ;;(tagify "tspan" (format #f "&#xe0~2,'0x;" i))
+      (tagify "tspan" (ascii->upm-string i))
+      (begin
+       (format #t "can't display char: ~x\n" i)
+       " ")))
+
+
+(define (comment s)
+  (string-append "<!-- " s " -->\n"))
+
+(define (define-fonts internal-external-name-mag-pairs)
+  (comment (format #f "Fonts used: ~S" internal-external-name-mag-pairs)))
+
+(define (end-output)
+  "</g></svg>")
+
+(define (filledbox breapth width depth height)
+  (roundfilledbox breapth width depth height line-thickness))
+
+(define font-cruft
+  "fill:black;stroke:none;text-anchor:start;writing-mode:lr;font-weight:normal;")
+
+;; FIXME
+(define font-alist
+  `(  
+    ("cmr8" . ,(string-append
+                 font-cruft
+                 "font-family:cmr;font-style:normal;font-size:8;"))
+    ("feta13" . ,(string-append
+                 font-cruft
+                 "font-family:LilyPond-Feta;font-style:-Feta;font-size:13;"))
+    ("feta-nummer10" . ,(string-append
+                        font-cruft
+                        "font-family:LilyPond-feta-nummer;font-style:-feta-nummer;font-size:10;"))
+    ("feta20" . ,(string-append
+                 font-cruft
+                 "font-family:LilyPond-feta;font-style:-feta;font-size:20;"))
+    ("parmesan20" . ,(string-append
+                     font-cruft
+                     "font-family:LilyPond-Parmesan;font-style:-Parmesan;font-size:20;"))))
+
+(define (get-font name-mag-pair)
+  ;; name-mag-pair: (quote ("feta20" . 0.569055118110236))"feta20"(quote ("feta20" . 0.569055118110236))
+  (let ((f (assoc (caadr name-mag-pair) font-alist)))
+    (if (pair? f)
+       (cdr f)
+       (begin
+         (format #t "font not found: ~s\n" (caadr name-mag-pair))
+         (cdr (assoc "feta20" font-alist))))))
+
+(define (fontify name-mag-pair expr)
+  (string-append
+   (tagify "text" (dispatch expr) (cons 'style (get-font name-mag-pair)))))
+
+(define (header-end)
+  (comment "header-end"))
+
+(define (header creator generate)
+  (string-append
+   xml-header
+   (comment creator)
+   (comment generate)
+   svg-header))
+  
+
+(define (lily-def key val)
+  (cond
+   ((equal? key "lilypondpaperoutputscale")
+    ;; ugr
+    ;; If we just use transform scale (output-scale),
+    ;; all fonts come out scaled too (ie, much too big)
+    ;; So, we manually scale all other stuff.
+    (set! output-scale (* scale-to-unit (string->number val))))
+   ((equal? key "lilypondpaperlinethickness")
+    (set! urg-line-thickness (* scale-to-unit (string->number val)))))
+  "")
+
+(define (no-origin)
+  "")
+
+
+(define (placebox x y expr)
+  (tagify "g" (dispatch expr)
+         `(transform .
+                     ,(string-append
+                       "translate("
+                       ;; urg
+                       (number->string (* output-scale x))
+                       ","
+                       (number->string (- 0 (* output-scale y)))
+                       ")"))))
+
+(define (roundfilledbox breapth width depth height blot-diameter)
+  (tagify "rect" ""
+         ;;'(style . "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;")
+           `(style . ,(format "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:~f;stroke-linejoin:miter;stroke-linecap:butt;" line-thickness))
+         `(x . ,(number->string (* output-scale (- 0 breapth))))
+         `(y . ,(number->string (* output-scale (- 0 height))))
+         `(width . ,(number->string (* output-scale (+ breapth width))))
+         `(height . ,(number->string (* output-scale (+ depth height))))
+         ;;`(ry . ,(number->string (* output-scale half-lt)))
+         `(ry . ,(number->string (/ blot-diameter 2)))))
+
+
+  
+;; TODO: use height, set scaling?
+(define (start-system width height)
+  (let ((y system-y))
+    ;;"<g transform='translate(50,-250)'>
+    (set! system-y (+ system-y height))
+    ;;(format #f "<g transform='translate(0,~1,'~f)'>" y)))
+    (string-append
+     "\n"
+     (comment "start-system")
+     (format #f "<g transform='translate(0.0,~f)'>\n" (* output-scale y)))))
+
+(define (stop-system)
+  (string-append
+   "\n"
+   (comment "stop-system")
+   "</g>\n"))
+
+(define stop-last-system stop-system)
+
+(define (text s)
+  ;; to unicode or not?
+  (if #t
+      (tagify "tspan" s)
+      (tagify "tspan"
+             (apply string-appendb
+                    (map (lambda (x) (ascii->upm-string (char->integer x)))
+                         (string->list s))))))
diff --git a/scm/output-tex.scm b/scm/output-tex.scm
new file mode 100644 (file)
index 0000000..afd15e3
--- /dev/null
@@ -0,0 +1,293 @@
+
+;;; tex.scm -- implement Scheme output routines for TeX
+;;;
+;;;  source file of the GNU LilyPond music typesetter
+;;; 
+;;; (c)  1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+
+(define-module (scm output-tex) )
+(debug-enable 'backtrace)
+(use-modules (scm output-ps)
+            (ice-9 regex)
+            (ice-9 string-fun)
+            (ice-9 format)
+            (guile)
+            (lily)
+            )
+
+(define this-module (current-module))
+
+;;;;;;;;
+;;;;;;;; DOCUMENT ME!
+;;;;;;;;
+
+(define font-name-alist  '())
+
+(define (tex-encoded-fontswitch name-mag)
+  (let* ((iname-mag (car name-mag))
+        (ename-mag (cdr name-mag)))
+    (cons iname-mag
+         (cons ename-mag
+               (string-append  "magfont"
+                         (string-encode-integer
+                          (hashq (car ename-mag) 1000000))
+                         "m"
+                         (string-encode-integer
+                          (inexact->exact (* 1000 (cdr ename-mag)))))))))
+
+(define (define-fonts internal-external-name-mag-pairs)
+  (set! font-name-alist (map tex-encoded-fontswitch
+                            internal-external-name-mag-pairs))
+  (apply string-append
+        (map (lambda (x)
+               (font-load-command (car x) (cdr x)))
+             (map cdr font-name-alist))))
+
+
+
+;; urg, how can exp be #unspecified?  -- in sketch output
+;;
+;; set! returns #<unspecified>  --hwn
+(define (fontify name-mag-pair exp)
+  (string-append (select-font name-mag-pair)
+                exp))
+
+
+(define (unknown) 
+  "%\n\\unknown\n")
+
+(define (select-font name-mag-pair)
+  (let*
+      (
+       (c (assoc name-mag-pair font-name-alist))
+       )
+
+    (if (eq? c #f)
+       (begin
+         (display "FAILED\n")
+         (display (object-type (car name-mag-pair)))
+         (display (object-type (caaar font-name-alist)))
+
+         (ly:warn (string-append
+                   "Programming error: No such font known "
+                   (car name-mag-pair) " "
+                   (ly:number->string (cdr name-mag-pair))
+                   ))
+         "") ; issue no command
+       (string-append "\\" (cddr c)))
+    
+    
+    ))
+
+(define (blank)
+  "")
+
+(define (dot x y radius)
+  (embedded-ps (list 'dot x y radius)))
+
+(define (beam width slope thick)
+  (embedded-ps (list 'beam  width slope thick)))
+
+(define (bracket arch_angle arch_width arch_height height arch_thick thick)
+  (embedded-ps (list 'bracket  arch_angle arch_width arch_height height arch_thick thick)))
+
+(define (dashed-slur thick dash l)
+  (embedded-ps (list 'dashed-slur thick dash `(quote ,l))))
+
+(define (char i)
+  (string-append "\\char" (inexact->string i 10) " "))
+
+(define (dashed-line thick on off dx dy)
+  (embedded-ps (list 'dashed-line  thick on off dx dy)))
+
+(define (zigzag-line centre? zzw zzh thick dx dy)
+  (embedded-ps (list 'zigzag-line centre? zzw zzh thick dx dy)))
+
+(define (symmetric-x-triangle t w h)
+  (embedded-ps (list 'symmetric-x-triangle t w h)))
+
+(define (font-load-command name-mag command)
+  (string-append
+   "\\font\\" command "="
+   (car name-mag)
+   " scaled "
+   (ly:number->string (inexact->exact (* 1000  (cdr name-mag))))
+   "\n"))
+
+(define (ez-ball c l b)
+  (embedded-ps (list 'ez-ball  c  l b)))
+
+(define (header-to-file fn key val)
+  (set! key (symbol->string key))
+  (if (not (equal? "-" fn))
+      (set! fn (string-append fn "." key))
+      )
+  (display
+   (format "writing header field `~a' to `~a'..."
+          key
+          (if (equal? "-" fn) "<stdout>" fn)
+          )
+   (current-error-port))
+  (if (equal? fn "-")
+      (display val)
+      (display val (open-file fn "w"))
+  )
+  (display "\n" (current-error-port))
+  ""
+  )
+
+(if (or (equal? (minor-version) "4.1")
+       (equal? (minor-version) "4")
+       (equal? (minor-version) "3.4"))
+    (define (embedded-ps expr)
+      (let ((ps-string
+            (with-output-to-string
+              (lambda () (ps-output-expression expr (current-output-port))))))
+       (string-append "\\embeddedps{" ps-string "}")))
+    (define (embedded-ps expr)
+      (let
+         ((os (open-output-string)))
+       (ps-output-expression expr os)
+       (string-append "\\embeddedps{" (get-output-string os) "}"))))
+
+(define (comment s)
+  (string-append "% " s "\n"))
+
+(define (end-output) 
+  (begin
+                                       ; uncomment for some stats about lily memory      
+                                       ;               (display (gc-stats))
+    (string-append
+     "\\lilypondend\n"
+                                       ; Put GC stats here.
+                  )))
+
+(define (experimental-on)
+  "")
+
+(define (repeat-slash w a t)
+  (embedded-ps (list 'repeat-slash  w a t)))
+
+(define (header-end)
+  (string-append
+   "\\def\\scaletounit{ "
+   (number->string (cond
+                    ((equal? (ly:unit) "mm") (/ 72.0  25.4))
+                    ((equal? (ly:unit) "pt") (/ 72.0  72.27))
+                    (else (error "unknown unit" (ly:unit)))
+                    ))
+   " mul }%\n"
+   "\\ifx\\lilypondstart\\undefined\n"
+   "  \\input lilyponddefs\n"
+   "\\fi\n"
+   "\\outputscale = \\lilypondpaperoutputscale\\lilypondpaperunit\n"
+   "\\lilypondstart\n"
+   "\\lilypondspecial\n"
+   "\\lilypondpostscript\n"))
+
+;; Note: this string must match the string in ly2dvi.py!!!
+(define (header creator generate) 
+  (string-append
+   "% Generated automatically by: " creator generate "\n"))
+
+(define (invoke-char s i)
+  (string-append 
+   "\n\\" s "{" (inexact->string i 10) "}" ))
+
+;;
+;; need to do something to make this really safe.
+;;
+(define-public (output-tex-string s)
+  (if security-paranoia
+      (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
+      s))
+
+(define (lily-def key val)
+  (let ((tex-key
+        (regexp-substitute/global
+             #f "_" (output-tex-string key) 'pre "X" 'post))
+        
+       (tex-val (output-tex-string val)))
+    (if (equal? (sans-surrounding-whitespace tex-val) "")
+       (string-append "\\let\\" tex-key "\\undefined\n")
+       (string-append "\\def\\" tex-key "{" tex-val "}%\n"))))
+
+(define (number->dim x)
+  (string-append
+   ;;ugh ly:* in backend needs compatibility func for standalone output
+   (ly:number->string x) " \\outputscale "))
+
+(define (placebox x y s) 
+  (string-append "\\lyitem{"
+                (ly:number->string y) "}{"
+                (ly:number->string x) "}{"
+                s "}%\n"))
+
+(define (bezier-bow l thick)
+  (embedded-ps (list 'bezier-bow  `(quote ,l) thick)))
+
+(define (bezier-sandwich l thick)
+  (embedded-ps (list 'bezier-sandwich  `(quote ,l) thick)))
+
+(define (start-system wd ht)
+  (string-append "\\leavevmode\n"
+                "\\scoreshift = " (number->dim (* ht 0.5)) "\n"
+                "\\lilypondifundefined{lilypondscoreshift}%\n"
+                "  {}%\n"
+                "  {\\advance\\scoreshift by -\\lilypondscoreshift}%\n"
+                "\\lybox{"
+                (ly:number->string wd) "}{"
+                (ly:number->string ht) "}{%\n"))
+
+(define (stop-system) 
+  "}%\n%\n\\interscoreline\n%\n")
+(define (stop-last-system)
+  "}%\n")
+
+(define (filledbox breapth width depth height)
+  (if (and #f (defined? 'ps-testing))
+      (embedded-ps
+       (string-append (numbers->string (list breapth width depth height))
+                     " draw_box" ))
+      (string-append "\\lyvrule{"
+                    (ly:number->string (- breapth)) "}{"
+                    (ly:number->string (+ breapth width)) "}{"
+                    (ly:number->string depth) "}{"
+                    (ly:number->string height) "}")))
+
+(define (roundfilledbox x y width height blotdiam)
+  (embedded-ps (list 'roundfilledbox  x y width height blotdiam)))
+
+(define (text s)
+  (string-append "\\hbox{" (output-tex-string s) "}"))
+
+(define (tuplet ht gapx dx dy thick dir)
+  (embedded-ps (list 'tuplet  ht gapx dx dy thick dir)))
+
+(define (polygon points blotdiameter)
+  (embedded-ps (list 'polygon `(quote ,points) blotdiameter)))
+
+(define (draw-line thick fx fy tx ty)
+  (embedded-ps (list 'draw-line thick fx fy tx ty)))
+
+(define (between-system-string string)
+  string
+  )
+(define (define-origin file line col)
+  (if (procedure? point-and-click)
+      (string-append "\\special{src:" ;;; \\string ? 
+                    (point-and-click line col file)
+                    "}" )
+      "")
+  )
+
+;; no-origin not yet supported by Xdvi
+(define (no-origin) "")
+
+(define-public (tex-output-expression expr port)
+  (display (eval expr this-module) port )
+  )
+
+
diff --git a/scm/pdf.scm b/scm/pdf.scm
deleted file mode 100644 (file)
index 1788c94..0000000
+++ /dev/null
@@ -1,272 +0,0 @@
-;;; pdf.scm -- implement Scheme output routines for PDF.
-;;;
-;;;  source file of the GNU LilyPond music typesetter
-;;; 
-;;; (c)  2001--2003 Stephen Peters <portnoy@portnoy.org>
-
-
-;currently no font commands; this is a helper for pdftex.scm.
-
-(define-module (scm pdf))
-
-
-(define this-module (current-module))
-
-(use-modules
- (guile)
- (lily))
-
-
-
-; simple commands to store and update currentpoint.  This makes the
-; other procedures simple rewrites of the PostScript code.
-
-(define currentpoint (cons 0 0))
-(define (showcp) 
-  (string-append (number-pair->string currentpoint) " "))
-(define (moveto x y)
-  (set! currentpoint (cons x y))
-  (string-append (showcp) "m "))
-(define (moveto-pair pair)
-  (moveto (car pair) (cdr pair)))
-(define (rmoveto x y)
-  (moveto (+ x (car currentpoint)) (+ y (cdr currentpoint))))
-(define (lineto x y)
-  (set! currentpoint (cons x y))
-  (string-append (showcp) "l "))
-(define (lineto-pair pair)
-  (lineto (car pair) (cdr pair)))
-(define (rlineto x y)
-  (lineto (+ x (car currentpoint)) (+ y (cdr currentpoint))))
-(define (curveto x1 y1 x2 y2 x y)
-  (set! currentpoint (cons x y))
-  (string-append (ly:number->string x1) (ly:number->string y1)
-                (ly:number->string x2) (ly:number->string y2)
-                (ly:number->string x) (ly:number->string y) "c "))
-(define (curveto-pairs pt1 pt2 pt)
-  (curveto (car pt1) (cdr pt1) (car pt2) (cdr pt2) (car pt) (cdr pt)))
-(define (closefill) "h f ")
-(define (closestroke) "S ")
-(define (setlinewidth w) (string-append (ly:number->string w) "w "))
-(define (setgray g) (string-append (ly:number->string g) "g "))
-(define (setlineparams) "1 j 1 J ")
-
-(define (beam width slope thick)
-  (let ((ht (* slope width)))
-    (string-append (moveto 0 (- (/ thick 2)))
-                  (rlineto width ht)
-                  (rlineto 0 thick)
-                  (lineto 0 (/ thick 2))
-                  (closefill))))
-
-(define (comment s) 
-  (string-append "% " s "\n"))
-
-(define (brack-traject pair ds alpha)
-  (let ((alpha-rad (* alpha (/ 3.141592654 180))))
-    (cons (+ (car pair) (* (cos alpha-rad) ds))
-         (+ (cdr pair) (* (sin alpha-rad) ds)))))
-
-(define (bracket arch_angle arch_width arch_height height arch_thick thick)
-  (let* ((halfht (+ (/ height 2) thick))
-        (farpt (cons (+ thick arch_height) 
-                     (+ (- halfht arch_thick) arch_width)))
-        (halfbrack 
-         (string-append (moveto 0 0)
-                        (lineto thick 0)
-                        (lineto thick (- halfht arch_thick))
-                        (curveto-pairs
-                         (brack-traject (cons thick 
-                                              (- halfht arch_thick))
-                                        (* 0.4 arch_height) 0)
-                         (brack-traject farpt 
-                                        (* -0.25 arch_height) 
-                                        arch_angle)
-                         farpt)
-                        (curveto-pairs 
-                         (brack-traject farpt
-                                        (* -0.15 arch_height)
-                                        arch_angle)
-                         (brack-traject (cons (/ thick 2) halfht)
-                                        (/ arch_height 2) 0)
-                         (cons 0 halfht))
-                        (lineto 0 0)
-                        (closefill))))
-    (string-append (setlinewidth (/ thick 2))
-                  (setlineparams)
-                  "q 1 0 0 -1 0 0 cm " ; flip coords
-                  halfbrack
-                  "Q " ; grestore
-                  halfbrack)))
-
-(define (char i)
-  (invoke-char " show" i))
-
-
-(define (dashed-slur thick dash l)
-  (string-append (setlineparams)
-                "[ " (ly:number->string dash) " "
-                (ly:number->string (* 10 thick)) " ] 0 d "
-                (setlinewidth thick)
-                (moveto-pair (car l))
-                (apply curveto (cdr l))
-                (closestroke)))
-
-(define (dashed-line thick on off dx dy)
-  (string-append (setlineparams)
-                "[ " (ly:number->string on) " "
-                (ly:number->string off) " ] 0 d "
-                (setlinewidth thick)
-                (moveto 0 0)
-                (lineto dx dy)
-                (closestroke)))
-
-(define (repeat-slash width slope beamthick)
-  (let* ((height (/ beamthick slope))
-        (xwid (sqrt (+ (* beamthick beamthick) (* height height)))))
-    (string-append (moveto 0 0)
-                  (rlineto xwid 0)
-                  (rlineto width (* slope width))
-                  (rlineto (- xwid) 0)
-                  (closefill))))
-
-(define (end-output) "")
-
-(define (experimental-on) "")
-
-(define (filledbox breadth width depth height) 
-  (string-append (ly:number->string (- breadth))
-                (ly:number->string (- depth))
-                (ly:number->string (+ breadth width))
-                (ly:number->string (+ depth height))
-                " re f "))
-
-(define (roundfilledbox breadth width depth height blotdiam)
-  (let* ((rad (/ blotdiam 2))
-        (h (- height rad))
-        (d (- depth rad))
-        (w (- width rad))
-        (b (- breadth rad)))
-    (string-append " 0 J "
-                  (setlinewidth blotdiam)
-                  "1 j "
-                  (moveto (- b) (- d))
-                  (rlineto (+ b w) 0)
-                  (rlineto 0 (+ d h))
-                  (rlineto (- (+ b w)) 0)
-                  (rlineto 0 (- (+ d h)))
-                  "b ")))
-
-;; PDF doesn't have the nifty arc operator.  This uses a fast
-;; approximation with two curves.  It bulges out a bit more than a
-;; true circle should along the 45 degree axes, but most users won't
-;; notice.
-(define (dot x y radius)
-  (string-append (moveto (- x radius) y)
-                (curveto (- x radius) (+ y (* 1.3333 radius))
-                         (+ x radius) (+ y (* 1.3333 radius))
-                         (+ x radius) y)
-                (curveto (+ x radius) (- y (* 1.3333 radius))
-                         (- x radius) (- y (* 1.3333 radius))
-                         (- x radius) y)
-                "f "))
-
-
-(define (roundfilledbox breadth width depth height blot) 
-  (filledbox breadth width depth height))
-
-(define (font-def i s) "")
-
-(define (font-switch i) "")
-
-(define (header-end) "")
-
-(define (lily-def key val) "")
-
-(define (header creator generate) "")
-
-(define (invoke-char s i)
-  (string-append 
-   "(\\" (inexact->string i 8) ") " s " " ))
-
-(define (placebox x y s) "")
-
-(define (bezier-bow l thick)
-  (bezier-sandwich l thick))
-
-(define (bezier-sandwich l thick)
-  (string-append (setlinewidth thick)
-                (moveto-pair (list-ref l 7))
-                (curveto-pairs (list-ref l 4)
-                               (list-ref l 5)
-                               (list-ref l 6))
-                (lineto-pair (list-ref l 3))
-                (curveto-pairs (list-ref l 0)
-                               (list-ref l 1)
-                               (list-ref l 2))
-                "B "
-                (bezier-ending (list-ref l 3) (list-ref l 0) (list-ref l 5))
-                (bezier-ending (list-ref l 7) (list-ref l 0) (list-ref l 5))))
-
-(define (bezier-ending z0 z1 z2)
-  (let ((x0 (car z0))
-       (y0 (cdr z0))
-       (x1 (car z1))
-       (y1 (cdr z1))
-       (x2 (car z2))
-       (y2 (cdr z2)))
-    (dot x0 y0 
-        (/ (sqrt (+ (* (- x1 x2) (- x1 x2)) 
-                    (* (- y1 y2) (- y1 y2)))) 2))))
-
-
-(define (start-system width height) "")
-
-(define (stem breadth width depth height) 
-  (filledbox breadth width depth height))
-
-(define (stop-system) "")
-
-(define (text s) "")
-
-(define (polygon points blotdiameter) "") ;; TODO
-
-(define (draw-line thick fx fy tx ty)
-  (string-append (setlineparams)
-                (setlinewidth thick)
-                (moveto fx fy)
-                (lineto tx ty)
-                "S "))
-
-(define (unknown) "\n unknown\n")
-
-; Problem here -- we're using /F18 for the font, but we don't know 
-; for sure that that will exist.
-
-(define (ez-ball ch letter-col ball-col)
-  (let ((origin (cons 0.45 0)))
-    (string-append (setgray 0)
-                  (setlinewidth 1.1)
-                  (moveto-pair origin) (lineto-pair origin)
-                  (closestroke)
-                  (setgray ball-col)
-                  (setlinewidth 0.9)
-                  (moveto-pair origin) (lineto-pair origin)
-                  (closestroke)
-                  (setgray letter-col)
-                  (moveto-pair origin)
-                  "BT "
-                  "/F18 0.85 Tf "
-                  "-0.28 -0.30 Td " ; move for text block
-                  "[(" ch ")] TJ ET ")))
-
-(define (define-origin a b c ) "")
-(define (no-origin) "")
-
-(define-public (pdf-output-expression expr port)
-  (display (eval expr this-module) port) )
-
-
-; Local Variables:
-; scheme-program-name: "guile"
-; End:
diff --git a/scm/pdftex.scm b/scm/pdftex.scm
deleted file mode 100644 (file)
index 126614d..0000000
+++ /dev/null
@@ -1,265 +0,0 @@
-;;; pdftex.scm -- implement Scheme output routines for PDFTeX
-;;;
-;;;  source file of the GNU LilyPond music typesetter
-;;;  modified from the existing tex.scm
-;;; 
-;;; (c)  1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
-;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
-;;; Stephen Peters <portnoy@portnoy.org>
-
-
-;; TODO: port this  to the new module framework.
-
-(define-module (scm pdftex))
-
-(use-modules (scm pdf)
-            (guile)
-            (ice-9 regex)
-            (ice-9 string-fun)
-            (lily))
-
-(define font-name-alist  '())
-
-(define this-module (current-module))
-(define (unknown) 
-  "%\n\\unknown\n")
-
-
-(define (select-font name-mag-pair)
-  (let*
-      (
-       (c (assoc name-mag-pair font-name-alist))
-       )
-
-    (if (eq? c #f)
-       (begin
-         (display "FAILED\n")
-         (display (object-type (car name-mag-pair)))
-         (display (object-type (caaar font-name-alist)))
-
-         (ly:warn (string-append
-                   "Programming error: No such font known "
-                   (car name-mag-pair) " "
-                   (ly:number->string (cdr name-mag-pair))
-                   ))
-         "") ; issue no command
-       (string-append "\\" (cddr c)))
-    
-    
-    ))
-
-(define (beam width slope thick)
-  (embedded-pdf (list 'beam  width slope thick)))
-
-(define (bracket arch_angle arch_width arch_height height arch_thick thick)
-  (embedded-pdf (list 'bracket  arch_angle arch_width arch_height height arch_thick thick)))
-
-(define (dashed-slur thick dash l)
-  (embedded-pdf (list 'dashed-slur   thick dash l)))
-
-(define (char i)
-  (string-append "\\char" (inexact->string i 10) " "))
-
-(define (dashed-line thick on off dx dy)
-  (embedded-pdf (list 'dashed-line  thick on off dx dy)))
-
-(define (font-load-command name-mag command)
-  (string-append
-   "\\font\\" command "="
-   (car name-mag)
-   " scaled "
-   (ly:number->string (inexact->exact (* 1000  (cdr name-mag))))
-   "\n"))
-
-(define (ez-ball c l b)
-  (embedded-pdf (list 'ez-ball  c  l b)))
-
-(define (header-to-file fn key val)
-  (set! key (symbol->string key))
-  (if (not (equal? "-" fn))
-      (set! fn (string-append fn "." key))
-      )
-  (display
-   (format "writing header field `~a' to `~a'..."
-          key
-          (if (equal? "-" fn) "<stdout>" fn)
-          )
-   (current-error-port))
-  (if (equal? fn "-")
-      (display val)
-      (display val (open-file fn "w"))
-      )
-  (display "\n" (current-error-port))
-  ""
-  )
-
-(if (or (equal? (minor-version) "4.1")
-       (equal? (minor-version) "4")
-       (equal? (minor-version) "3.4"))
-    (define (embedded-pdf expr)
-      (let ((ps-string
-            (with-output-to-string
-              (lambda () (pdf-output-expression expr (current-output-port))))))
-       (string-append "\\embeddedpdf{" ps-string "}")))
-    (define (embedded-pdf expr)
-      (let
-         ((os (open-output-string)))
-       (pdf-output-expression expr os)
-       (string-append "\\embeddedpdf{" (get-output-string os) "}"))))
-
-
-(define (comment s)
-  (simple-format #f "% ~a\n" s))
-
-(define (end-output) 
-  (begin
-                                       ; uncomment for some stats about lily memory      
-                                       ;               (display (gc-stats))
-    (string-append "%\n\\lilypondend\n"
-                                       ; Put GC stats here.
-                  )))
-
-(define (experimental-on)
-  "")
-
-(define (repeat-slash w a t)
-  (embedded-pdf (list 'repeat-slash w a t)))
-(define (fontify name-mag-pair exp)
-  (string-append (select-font name-mag-pair)
-                exp))
-
-
-(define (tex-encoded-fontswitch name-mag)
-  (let* ((iname-mag (car name-mag))
-        (ename-mag (cdr name-mag)))
-    (cons iname-mag
-         (cons ename-mag
-               (string-append  "magfont"
-                         (string-encode-integer
-                          (hashq (car ename-mag) 1000000))
-                         "m"
-                         (string-encode-integer
-                          (inexact->exact (* 1000 (cdr ename-mag)))))))))
-(define (define-fonts internal-external-name-mag-pairs)
-  (set! font-name-alist (map tex-encoded-fontswitch
-                            internal-external-name-mag-pairs))
-  (apply string-append
-        (map (lambda (x)
-               (font-load-command (car x) (cdr x)))
-             (map cdr font-name-alist))))
-
-
-(define (font-switch i)
-  (string-append
-   "\\" (font i) "\n"))
-
-(define (font-def i s)
-  (string-append
-   "\\font" (font-switch i) "=" s "\n"))
-
-(define (header-end)
-  (string-append
-   "\\def\\lilyoutputscalefactor{"
-   (number->string (cond
-                   ((equal? (ly:unit) "mm") (/ 72.0  25.4))
-                   ((equal? (ly:unit) "pt") (/ 72.0  72.27))
-                   (else (error "unknown unit" (ly:unit)))
-                   ))
-   "}%\n"
-   "\\ifx\\lilypondstart\\undefined\n"
-   "  \\input lilyponddefs\n"
-   "\\fi\n"
-   "\\outputscale=\\lilypondpaperoutputscale \\lilypondpaperunit\n"
-   "\\lilypondpostscript\n"
-   "\\pdfcompresslevel=0"))
-
-;; Note: this string must match the string in ly2dvi.py!!!
-(define (header creator generate) 
-  (string-append
-   "% Generated automatically by: " creator generate "\n"))
-
-(define (invoke-char s i)
-  (string-append 
-   "\n\\" s "{" (inexact->string i 10) "}" ))
-
-;;
-;; need to do something to make this really safe.
-;;
-(define (output-tex-string s)
-  (if security-paranoia
-      (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
-      s))
-
-(define (lily-def key val)
-  (let ((tex-key
-        (regexp-substitute/global 
-             #f "_" (output-tex-string key) 'pre "X" 'post))
-       (tex-val (output-tex-string val)))
-    (if (equal? (sans-surrounding-whitespace tex-val) "")
-       (string-append "\\let\\" tex-key "\\undefined\n")
-       (string-append "\\def\\" tex-key "{" tex-val "}%\n"))))
-
-(define (number->dim x)
-  (string-append
-   ;;ugh ly:* in backend needs compatibility func for standalone output
-   (ly:number->string x) " \\outputscale "))
-
-(define (placebox x y s) 
-  (string-append "\\lyitem{"
-                (ly:number->string y) "}{"
-                (ly:number->string x) "}{"
-                s "}%\n"))
-
-(define (bezier-bow l thick)
-  (embedded-pdf (list 'bezier-bow  `(quote ,l) thick)))
-
-(define (bezier-sandwich l thick)
-  (embedded-pdf (list 'bezier-sandwich  `(quote ,l) thick)))
-
-(define (start-system wd ht)
-  (string-append "\\leavevmode\n"
-                "\\scoreshift = " (number->dim (* ht 0.5)) "\n"
-                "\\lilypondifundefined{lilypondscoreshift}%\n"
-                "  {}%\n"
-                "  {\\advance\\scoreshift by -\\lilypondscoreshift}%\n"
-                "\\lybox{"
-                (ly:number->string wd) "}{"
-                (ly:number->string ht) "}{%\n"))
-
-(define (stop-system) 
-  "}%\n%\n\\interscoreline\n%\n")
-(define (stop-last-system)
-  "}%\n")
-
-(define (filledbox breapth width depth height) 
-  (string-append "\\lyvrule{"
-                (ly:number->string (- breapth)) "}{"
-                (ly:number->string (+ breapth width)) "}{"
-                (ly:number->string depth) "}{"
-                (ly:number->string height) "}"))
-
-(define (roundfilledbox x y width height blotdiam)
-  (embedded-pdf (list 'roundfilledbox  x y width height blotdiam)))
-
-(define (text s)
-  (string-append "\\hbox{" (output-tex-string s) "}"))
-
-(define (draw-line thick fx fy tx ty)
-  (embedded-pdf (list 'draw-line thick fx fy tx ty)))
-
-(define (define-origin file line col)
-  (if (procedure? point-and-click)
-      (string-append "\\special{src:\\string:"
-                    (point-and-click line col file)
-                    "}" )
-      "")
-  )
-
-                                       ; no-origin not supported in PDFTeX
-(define (no-origin) "")
-
-
-
-
-(define-public (pdftex-output-expression expr port)
-  (display (eval expr this-module) port) )
diff --git a/scm/ps.scm b/scm/ps.scm
deleted file mode 100644 (file)
index 3699894..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-;;;; ps.scm -- implement Scheme output routines for PostScript
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c)  1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
-;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
-
-(debug-enable 'backtrace)
-
-
-(define-module (scm ps))
-(define this-module (current-module))
-
-(use-modules
- (guile)
- (lily))
-
-
-
-;;; Lily output interface --- cleanup and docme
-
-
-
-;; Module entry
-(define-public (ps-output-expression expr port)
-  (display (eval expr this-module) port))
-
-
-;; Global vars
-
-;; alist containing fontname -> fontcommand assoc (both strings)
-(define font-name-alist '())
-
-
-;; Interface functions
-(define (beam width slope thick)
-  (string-append
-   (numbers->string (list slope width thick)) " draw_beam" ))
-
-;; two beziers with round endings
-(define (bezier-bow l thick)
-  
-  (define (bezier-ending z0 z1 z2)
-    (let ((x0 (car z0))
-         (y0 (cdr z0))
-         (x1 (car z1))
-         (y1 (cdr z1))
-         (x2 (car z2))
-         (y2 (cdr z2)))
-      (string-append
-       " "
-       (numbers->string
-       (list x0 y0
-             (/ (sqrt (+ (* (- x1 x2) (- x1 x2))
-                         (* (- y1 y2) (- y1 y2)))) 2)))
-       " draw_dot")))
-
-  (string-append
-   (bezier-sandwich l thick)
-   (bezier-ending (list-ref l 3) (list-ref l 0) (list-ref l 5))
-   (bezier-ending (list-ref l 7) (list-ref l 0) (list-ref l 5))))
-
-;; two beziers
-(define (bezier-sandwich l thick)
-  (string-append 
-   (apply string-append (map number-pair->string l))
-   (ly:number->string thick)
-   " draw_bezier_sandwich "))
-
-(define (bracket arch_angle arch_width arch_height  height arch_thick thick)
-  (string-append
-   (numbers->string
-    (list arch_angle arch_width arch_height height arch_thick thick))
-   " draw_bracket"))
-
-(define (symmetric-x-triangle thick w h)
-  (string-append
-   (numbers->string (list h w thick))
-   " draw_symmetric_x_triangle"))
-
-
-(define (char i)
-  (string-append 
-   "(\\" (inexact->string i 8) ") show " ))
-
-
-(define (comment s)
-  (string-append "% " s "\n"))
-
-
-(define (dashed-line thick on off dx dy)
-  (string-append 
-   (ly:number->string dx)
-   " "
-   (ly:number->string dy)
-   " "
-   (ly:number->string thick)
-   " [ "
-   (ly:number->string on)
-   " "
-   (ly:number->string off)
-   " ] 0 draw_dashed_line"))
-
-;; what the heck is this interface ?
-(define (dashed-slur thick dash l)
-  (string-append 
-   (apply string-append (map number-pair->string l)) 
-   (ly:number->string thick) 
-   " [ "
-   (ly:number->string dash)
-   " "
-   ;;UGH.  10 ?
-   (ly:number->string (* 10 thick))
-   " ] 0 draw_dashed_slur"))
-
-(define (define-fonts internal-external-name-mag-pairs)
-  
-  (define (font-load-command name-mag command)
-    
-    (define (possibly-capitalize-font-name name)
-      (if (equal? (substring name 0 2) "cm")
-         (string-upcase name)
-         name))
-    
-    (string-append
-     "/" command
-     " { /"
-     ;; Ugh, the Bluesky type1 fonts for computer modern use capitalized 
-     ;; postscript font names.
-     (possibly-capitalize-font-name (car name-mag))
-     " findfont "
-     "20 " (ly:number->string (cdr name-mag)) " mul "
-     "output-scale div scalefont setfont } bind def "
-     "\n"))
-
-  (define (ps-encoded-fontswitch name-mag-pair)
-    (let* ((key (car name-mag-pair))
-          (value (cdr name-mag-pair)))
-      (cons key
-           (cons value
-                 (string-append "lilyfont"
-                                (car value)
-                                "-"
-                                (number->string (cdr value)))))))
-      
-  (set! font-name-alist (map ps-encoded-fontswitch
-                            internal-external-name-mag-pairs))
-
-  (apply string-append
-        (map (lambda (x) (font-load-command (car x) (cdr x)))
-             (map cdr font-name-alist))))
-
-(define (define-origin file line col) "")
-
-(define (dot x y radius)
-  (string-append
-   " "
-   (numbers->string
-    (list x y radius)) " draw_dot"))
-
-(define (zigzag-line centre? zzw zzh thick dx dy)
-  (string-append
-    (if centre? "true" "false")
-    " "
-    (ly:number->string zzw)
-    " "
-    (ly:number->string zzh)
-    " "
-    (ly:number->string thick)
-    " 0 0 "
-    (ly:number->string dx)
-    " "
-    (ly:number->string dy)
-    " draw_zigzag_line "))
-
-(define (draw-line thick x1 y1 x2 y2)
-  (string-append 
-  "    1 setlinecap
-       1 setlinejoin "
-  (ly:number->string thick)
-       " setlinewidth "
-   (ly:number->string x1)
-   " "
-   (ly:number->string y1)
-   " moveto "
-   (ly:number->string x2)
-   " "
-   (ly:number->string y2)
-   " lineto stroke"))
-
-(define (polygon points blotdiameter)
-  (string-append
-   " "
-   (numbers->string points)
-   (ly:number->string (/ (length points) 2))
-   (ly:number->string blotdiameter)
-   " draw_polygon"))
-
-(define (end-output)
-  "\nend-lilypond-output\n")
-
-(define (ez-ball ch letter-col ball-col)
-  (string-append
-   " (" ch ") "
-   (numbers->string (list letter-col ball-col))
-   " /Helvetica-Bold " ;; ugh
-   " draw_ez_ball"))
-
-(define (filledbox breapth width depth height) 
-  (string-append (numbers->string (list breapth width depth height))
-                " draw_box" ))
-
-(define (fontify name-mag-pair exp)
-
-  (define (select-font name-mag-pair)
-    (let* ((c (assoc name-mag-pair font-name-alist)))
-      (if (eq? c #f)
-         (begin
-           (display "FAILED\n")
-           (display (object-type (car name-mag-pair)))
-           (display (object-type (caaar font-name-alist)))
-           (ly:warn (string-append
-                     "Programming error: No such font known "
-                     (car name-mag-pair) " "
-                     (ly:number->string (cdr name-mag-pair))))
-           
-           ;; Upon error, issue no command
-           "")
-         (string-append " " (cddr c) " "))))
-  
-  (string-append (select-font name-mag-pair) exp))
-
-(define (header creator generate) 
-  (string-append
-   "%!PS-Adobe-3.0\n"
-   "%%Creator: " creator generate "\n"))
-
-(define (header-end)
-  (string-append
-   ;; URG: now we can't use scm output without Lily
-   (ly:gulp-file "lilyponddefs.ps")
-   " {exch pop //systemdict /run get exec} "
-   (ly:gulp-file "music-drawing-routines.ps")
-   "{ exch pop //systemdict /run get exec } "
-   ;; ps-testing wreaks havoc when used with lilypond-book.
-   ;;  -- is this still true with new modules system?
-   ;;   (if (defined? 'ps-testing) "\n /testing true def" "")
-   ;;   "\n /testing true def"
-   ))
-
-(define (lily-def key val)
-  (let ((prefix "lilypondpaper"))
-    (if (string=?
-        (substring key 0 (min (string-length prefix) (string-length key)))
-        prefix)
-       (string-append "/" key " {" val "} bind def\n")
-       (string-append "/" key " (" val ") def\n"))))
-
-(define (no-origin) "")
-  
-(define (placebox x y s) 
-  (string-append 
-   (ly:number->string x) " " (ly:number->string y) " {" s "} place-box\n"))
-
-(define (repeat-slash wid slope thick)
-  (string-append
-   (numbers->string (list wid slope thick))
-   " draw_repeat_slash"))
-
-(define (roundfilledbox x y width height blotdiam)
-   (string-append
-    " "
-    (numbers->string
-     (list x y width height blotdiam)) " draw_round_box"))
-
-(define (start-system width height)
-  (string-append
-   "\n" (ly:number->string height)
-   " start-system\n"
-   "{\n"
-   "set-ps-scale-to-lily-scale"))
-
-(define (stem breapth width depth height) 
-  (string-append
-   (numbers->string (list breapth width depth height))
-   " draw_box" ))
-
-(define (stop-last-system)
-  (stop-system))
-
-(define (stop-system)
-  "}\nstop-system\n")
-
-(define (text s)
-  (string-append "(" s ") show "))
-
-(define (unknown) 
-  "\n unknown\n")
-
diff --git a/scm/pysk.scm b/scm/pysk.scm
deleted file mode 100644 (file)
index 956fdf5..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-;;; pysk.scm -- implement Python  output routines (for Sketch)
-;;;
-;;;  source file of the GNU LilyPond music typesetter
-;;; 
-;;; (c)  1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
-;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
-
-
-(define-module (scm pysk)
-  )
-
-(use-modules (scm ps)
-            (ice-9 regex)
-            (ice-9 string-fun)
-            (guile)
-            )
-
-(define this-module (current-module))
-(define-public (pysk-output-expression expr port)
-  (display (pythonify expr) port )
-  )
-
-(define (ly:warn s) (display s))
-
-(define (pythonify q)
-  (cond
-   ((string? q) (py-str q))
-   ((symbol? q) (py-str (symbol->string q)))
-   ((and (pair?  q)
-        (not (pair? (cdr q)))
-        (not (eq? '() (cdr q)))
-        ) (py-tuple q))
-   ((pair? q) (py-listify q))
-   ((number? q) (number->string q))
-   ((eq? q '()) '())
-   (else (begin
-          (ly:warn "Unknown object to pythonify:")
-          (write q)
-          (newline)
-          )
-  )))
-
-(define (py-str s)
-  (string-append "'" s "'")
-  )
-
-(define (py-tuple q)
-  (string-append "(" (pythonify (car  q)) "," (pythonify (cdr q)) ")")
-  )
-
-(define (my-map f l)
-  (if (null? l)
-      '()
-      (if (pair? (cdr l))
-         (cons (f (car l)) (my-map f (cdr l)))
-         (cons (f (car l)) (f (cdr l)))
-         )
-  ))
-
-(define (tuplify-list lst)
-  (if (null? lst)
-      '()
-      (if (pair? (cdr lst))
-         (cons (car lst) (tuplify-list (cdr lst)))
-         (if (eq? '() (cdr lst))
-             lst
-             (list (string-append "(" (car lst) ", " (cdr lst) ")" ))
-             ))
-         ))
-
-(define (py-listify q)
-  (string-append
-   "["
-   (string-join
-    (tuplify-list (my-map pythonify q))   ",")
-   "]\n"
-   ))
-
-
diff --git a/scm/sketch.scm b/scm/sketch.scm
deleted file mode 100644 (file)
index 5c83940..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-
-;;; sketch.scm -- implement Scheme output routines for Sketch
-;;;
-;;;  source file of the GNU LilyPond music typesetter
-;;; 
-;;; (c)  1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
-;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
-
-;; def dispats (out,x,y,expr):
-;;     (symbol, rest) = expr
-;;     if symbol == 'placebox':
-;;     (dx,dy,expr) = rest
-;;     dispats (out, x + dx, y + dy, expr)
-;;         # hier wordt (X+DX) dus eerder gedaan dan dispats van EXPR.
-;;         # er zijn geen "globale" variabelen.
-;;     elif symbol == 'char':
-;;         out.write ('moveto( %f %f); char(%d)' % (x,y,rest))
-
-
-
-
-;;
-;; All functions have the signature 
-;;
-;;  NAME X Y ARGUMENTS-PASSED-BY-LILYPOND
-;;
-
-(define-module (scm sketch))
-(debug-enable 'backtrace)
-
-(define this-module (current-module))
-
-(define-public (sketch-output-expression expr port)
-  (display (dispatch expr) port))
-
-(use-modules (ice-9 format) (guile) (lily))
-
-;; hmm
-; (define (dispatch x y expr)
-;  (let ((keyword (car expr))) 
-;    (cond
-; ((eq? keyword 'beam x y width slope thick)
-; ((eq? keyword 'bezier-bow x y l thick)
-; ((eq? keyword 'bezier-sandwich x y l thick)
-; ((eq? keyword 'bracket arch_angle arch_width arch_height  height arch_thick thick)
-; ((eq? keyword 'char x y i)
-; ((eq? keyword 'comment s)
-; ((eq? keyword 'dashed-line thick on off dx dy)
-; ((eq? keyword 'dashed-slur thick dash l)
-; ((eq? keyword 'define-origin a b c ) "")
-; ((eq? keyword 'end-output)
-; ((eq? keyword 'experimental-on) "")
-; ((eq? keyword 'ez-ball ch letter-col ball-col)
-; ((eq? keyword 'filledbox x y breapth width depth height)
-; ((eq? keyword 'font-load-command name-mag command)
-; ((eq? keyword 'font-switch i)
-; ((eq? keyword 'header creator generate)
-; ((eq? keyword 'header-end)
-; ((eq? keyword 'invoke-char s i)
-; ((eq? keyword 'lily-def key val)
-; ((eq? keyword 'no-origin) "")
-; ((eq? keyword 'output-scale 1)
-; ((eq? keyword 'placebox)
-;  (dispatch (+ x (cadr expr)) (+ y (caddr expr) (cadddr expr))))
-; ((eq? keyword 'repeat-slash wid slope thick)
-; ((eq? keyword 'roundfilledbox x y dx dy w h b)
-; ((eq? keyword 'select-font name-mag-pair)
-; ((eq? keyword 'start-system width height)
-; ((eq? keyword 'stem x y z w) (filledbox x y z w))
-; ((eq? keyword 'stop-last-system)
-; ((eq? keyword 'stop-system)
-; ((eq? keyword 'text x y s)
-; ((eq? keyword 'unknown)
-
-;     )))
-
-
-(define current-y 150)
-
-(define (dispatch expr)
-  (let ((keyword (car expr))) 
-    (cond
-     ((eq? keyword 'placebox)
-      (dispatch-x-y (cadr expr) (+ current-y (caddr expr)) (cadddr expr)))
-     (else
-      (apply (eval keyword this-module) (cdr expr))))))
-
-(define (dispatch-x-y x y expr)
-  (apply (eval (car expr) this-module) (append (list x y) (cdr expr))))
-      
-(define (ascii->string i) (make-string 1 (integer->char i)))
-
-(define (control->list x y c)
-  (list (+ x (car c)) (+ y (cdr c))))
-
-(define (control-flip-y c)
-  (cons (car c) (* -1 (cdr c))))
-
-;;; urg.
-(define (sketch-numbers->string l)
-  (string-append
-   (number->string (car l))
-   (if (null? (cdr l))
-       ""
-       (string-append ","  (sketch-numbers->string (cdr l))))))
-
-;;;\def\scaletounit{ 2.83464566929134 mul }%
-
-;;(define output-scale 2.83464566929134)
-
-(define scale-to-unit
-  (cond
-   ((equal? (ly:unit) "mm") (/ 72.0  25.4))
-   ((equal? (ly:unit) "pt") (/ 72.0  72.27))
-   (else (error "unknown unit" (ly:unit)))
-   ))
-
-(define (mul-scale x) (* scale-to-unit output-scale x))
-
-(define (sketch-filled-rectangle width dy dx height x y)
-  (string-append
-   "fp((0,0,0))\n"
-   "lw(0.1)\n"
-   "r("
-   (sketch-numbers->string (map mul-scale (list width dy dx height x y)))
-   ")\n"))
-
-
-(define (sketch-bezier x y l)
-  (let* ((c0 (car (list-tail l 3)))
-        (c123 (list-head l 3))
-        (start (control->list x y c0))
-        (control (apply append
-                        (map (lambda (c) (control->list x y c)) c123))))
-    (string-append
-     "bs(" (sketch-numbers->string (map mul-scale start)) ",0)\n"
-     "bc(" (sketch-numbers->string (map mul-scale control)) ",2)\n")))
-  
-
-
-(define (sketch-beziers x y l thick)
-  (let* ((first (list-tail l 4))
-        (second (list-head l 4)))
-    (string-append
-     "fp((0,0,0))\n"
-     "lw(0.1)\n"
-     "b()\n"
-     (sketch-bezier x y first)
-     (sketch-bezier x y second))))
-        
-
-;; alist containing fontname -> fontcommand assoc (both strings)
-;; old scheme
-;;(define font-alist '(("feta13" . ("feta13" . "13"))
-;;                  ("feta20" . ("feta20" . "20"))))
-(define font-alist '(("feta13" . ("LilyPond-Feta13" . "13"))
-;;                  ("feta20" . ("LilyPond-Feta-20" . "20")
-                    ("feta20" . ("GNU-LilyPond-feta-20" . "20")
-                     )))
-
-;;(define font "")
-(define font (cdar font-alist))
-
-(define font-count 0)
-(define current-font "")
-
-(define (fontify x y name-mag-pair exp)
-  (string-append (select-font name-mag-pair)
-                (apply (eval (car exp) this-module)
-                       (append (list x y) (cdr exp)))))
-;;              (if (string? exp) exp "")))
-
-(define (define-fonts x) "")
-
-(define (font-def x)
-"")
-
-
-(define (cached-fontname i)
-  "")
-
-
-(define (roundfilledbox x y dx dy w h b)
-  (sketch-filled-rectangle w 0 0 h x y))
-
-(define (polygon points blotdiameter) "") ;; TODO
-
-(define (select-font name-mag-pair)
-  ;; name-mag-pair: (quote ("feta20" . 0.569055118110236))"feta20"(quote ("feta20" . 0.569055118110236))
-  (let ((f (assoc (caadr name-mag-pair) font-alist)))
-    (if (pair? f)
-       (set! font (cdr f))
-       (format #t "font not found: ~s\n" (caadr name-mag-pair))))
-  ;;(write font)
-  "")
-
-(define (font-load-command name-mag command)
-  "")
-
-(define (beam x y width slope thick)
-  (apply sketch-filled-rectangle
-        (list width (* slope width) 0 thick x y)))
-
-(define (comment s)
-  (string-append "# " s "\n"))
-
-(define (bracket arch_angle arch_width arch_height  height arch_thick thick)
-  (string-append
-   (numbers->string (list arch_angle arch_width arch_height height arch_thick thick)) " draw_bracket" ))
-
-(define (char x y i)
-  (string-append
-   "fp((0,0,0))\n"
-   "le()\n"
-   "lw(0.1)\n"
-   "Fn('" (car font) "')\n"
-   "Fs(" (cdr font) ")\n"
-   ;; how to get zero-left padding with ``Guile's fprintf'' ?
-   ;;(format #f "txt('\\x~2x',(" i)
-   ;;(format #f "txt('\\x~02x',(" i)
-   ;; ugh: python's '%02x' % i
-   (format #f "&#x~2,'0x;" i)
-   (sketch-numbers->string (map mul-scale (list x y)))
-   "))\n"))
-
-
-;; what the heck is this interface ?
-(define (dashed-slur thick dash l)
-  (string-append 
-   (apply string-append (map number-pair->string l)) 
-   (ly:number->string thick) 
-   " [ "
-   (ly:number->string dash)
-   " "
-   (ly:number->string (* 10 thick))    ;UGH.  10 ?
-   " ] 0 draw_dashed_slur"))
-
-(define (dashed-line thick on off dx dy)
-  (string-append 
-   (ly:number->string dx)
-   " "
-   (ly:number->string dy)
-   " "
-   (ly:number->string thick) 
-   " [ "
-   (ly:number->string on)
-   " "
-   (ly:number->string off)
-   " ] 0 draw_dashed_line"))
-
-(define (repeat-slash wid slope thick)
- (string-append (numbers->string (list wid slope thick))
-  " draw_repeat_slash"))
-
-(define (end-output)
-  "guidelayer('Guide Lines',1,0,0,1,(0,0,1))
-grid((0,0,20,20),0,(0,0,1),'Grid')\n")
-
-(define (experimental-on) "")
-
-(define (font-switch i)
-  "")
-
-(define (header-end)
-  "")
-
-(define output-scale 1)
-
-(define (lily-def key val)
-  (if (equal? key "lilypondpaperoutputscale")
-      ;; ugr
-      (set! output-scale (string->number val))
-      )
-  "")
-
-
-(define (header creator generate)
-  (string-append
-   "##Sketch 1 2
-document()
-layout('A4',0)
-layer('Layer 1',1,1,0,0,(0,0,0))
-"))
-
-(define (invoke-char s i)
-  "")
-
-;; TODO: bezier-ending, see ps.scm
-(define (bezier-bow x y l thick)
-  (bezier-sandwich x y l thick))
-
-(define (bezier-sandwich x y l thick)
-  (apply
-   sketch-beziers (list x y (primitive-eval l) thick)))
-
-(define (start-system width height)
-  (set! current-y (- current-y height))
-  "G()\n")
-
-;;  r((520.305,0,0,98.0075,51.8863,10.089))
-;;  width, 0, 0, height, x, y
-(define (filledbox x y breapth width depth height)
-  (apply sketch-filled-rectangle
-        (list
-         (+ breapth width) 0 0 (+ depth height) (- x breapth) (- y depth))))
-
-(define (stem x y z w) (filledbox x y z w))
-
-
-(define (stop-system)
-    "G_()\n")
-
-;; huh?
-(define (stop-last-system)
-   (stop-system))
-
-(define (text x y s)
-  (string-append
-   "fp((0,0,0))\n"
-   "le()\n"
-   "lw(0.1)\n"
-   "Fn('" (car font) "')\n"
-   "Fs(" (cdr font) ")\n"
-   ;; Hmm
-   "txt('" s "',(" (sketch-numbers->string
-                                 (map mul-scale (list x y))) "))\n"))
-
-(define (unknown) 
-  "\n unknown\n")
-
-(define (ez-ball ch letter-col ball-col)
-  (string-append
-   " (" ch ") "
-   (numbers->string (list letter-col ball-col))
-   " /Helvetica-Bold " ;; ugh
-   " draw_ez_ball"))
-
-(define (define-origin a b c ) "")
-(define (no-origin) "")
-
-
-
-;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;
-
diff --git a/scm/sodipodi.scm b/scm/sodipodi.scm
deleted file mode 100644 (file)
index 3d5297f..0000000
+++ /dev/null
@@ -1,394 +0,0 @@
-;;;; sodipodi.scm -- implement Scheme output routines for PostScript
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c)  2002--2003 Jan Nieuwenhuizen <janneke@gnu.org>
-
-;;;; NOTE:
-;;;;
-;;;; * Get mftrace 1.0.12 or newer to create the .pfa fonts:
-;;;;
-;;;;       make -C mf clean
-;;;;       make -C mf pfa
-;;;;
-;;;; * Get sodipodi-0.28 or newer
-;;;;
-;;;; * Link/copy mf/out/private-fonts to ~/.sodipodi/private-fonts 
-
-;;;; http://www.w3.org/TR/SVG11/paths.html
-
-
-(debug-enable 'backtrace)
-
-(define-module (scm sodipodi))
-(define this-module (current-module))
-
-(use-modules
- (guile)
- (lily))
-
-;;; Lily output interface --- cleanup and docme
-
-;;; Bare minimum interface for \score { \notes c } }
-;;; should implement:
-;;;
-;;;    xx-output-expression
-;;;    char
-;;;    filledbox
-;;;    placebox
-
-;;; and should intercept: 
-;;;
-;;;    fontify
-;;;    lily-def
-;;;    header-end
-;;;    define-fonts
-;;;    no-origin
-;;;    start-system
-;;;    end-output
-;;;    header
-;;;    comment
-;;;    stop-last-system
-
-;; Module entry
-;;(define-public (sodipodi-output-expression expr port)
-;;  (display (eval expr this-module) port))
-
-(define-public (sodipodi-output-expression expr port)
-  (display (dispatch expr) port))
-
-(define (dispatch expr)
-  (let ((keyword (car expr)))
-    (cond
-     ((eq? keyword 'some-func) "")
-     ;;((eq? keyword 'placebox) (dispatch (cadddr expr)))
-     ;;((eq? keyword 'fontify) (dispatch (caddr expr)))
-     (else
-      (if (module-defined? this-module keyword)
-         (apply (eval keyword this-module) (cdr expr))
-         (begin
-           (display
-            (string-append "undefined: " (symbol->string keyword) "\n"))
-           ""))))))
-  
-
-;; Global vars
-
-(define output-scale 1)
-(define system-y 0)
-;; huh?
-(define urg-line-thickness 0)
-(define line-thickness 0.001)
-(define half-lt (/ line-thickness 2))
-
-
-(define scale-to-unit
-  (cond
-   ((equal? (ly:unit) "mm") (/ 72.0  25.4))
-   ((equal? (ly:unit) "pt") (/ 72.0  72.27))
-   (else (error "unknown unit" (ly:unit)))))
-
-;; alist containing fontname -> fontcommand assoc (both strings)
-;;(define font-name-alist '())
-
-;; Helper functions
-
-
-(define (tagify tag string . attribute-alist)
-  (string-append
-   "<" tag
-   (apply string-append (map (lambda (x) (string-append
-                                         " "
-                                         (symbol->string (car x))
-                                         "='"
-                                         (cdr x)
-                                         "'"))
-                            attribute-alist))
-   ">\n"
-   string "\n</" tag ">\n"))
-
-
-(define (ascii->string i) (make-string 1 (integer->char i)))
-(define (ascii->upm-string i)
-  (let* ((i+1 (+ i 1))
-        (u1 #xee)
-        (u2 (+ #x80 (quotient i+1 #x40)))
-        (u3 (+ #x80 (modulo i+1 #x40))))
-    (apply string-append
-          (map ascii->string
-               (list u1 u2 u3)))))
-
-(define (control->list c)
-  (list (car c) (cdr c)))
-
-(define (control->string c)
-  (string-append
-   (number->string (car c)) ","
-   ;; loose the -1
-   (number->string (* -1 (cdr c))) " "))
-
-(define (control-flip-y c)
-  (cons (car c) (* -1 (cdr c))))
-
-(define (numbers->string l)
-  (string-append
-   (number->string (car l))
-   (if (null? (cdr l))
-       ""
-       (string-append ","  (numbers->string (cdr l))))))
-
-(define (svg-bezier l close)
-  (let* ((c0 (car (list-tail l 3)))
-        (c123 (list-head l 3)))
-    (string-append
-     (if (not close) "M " "L ")
-     (control->string c0)
-     "C " (apply string-append (map control->string c123))
-     (if (not close) "" (string-append
-                        "L " (control->string close))))));; " Z")))))
-
-(define xml-header
-"<?xml version='1.0' standalone='no'?>
-<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN'
-'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'
-[
- <!ATTLIST svg
- xmlns:xlink CDATA #FIXED 'http://www.w3.org/1999/xlink'>
-]>
-"
-;;"
-)
-
-(define svg-header
-"<svg
-   id='svg1'
-   sodipodi:version='0.26'
-   xmlns='http://www.w3.org/2000/svg'
-   xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'
-   xmlns:xlink='http://www.w3.org/1999/xlink'
-   width='210mm'
-   height='297mm'
-   sodipodi:docbase='/tmp/'
-   sodipodi:docname='/tmp/x'>
-  <defs
-     id='defs3' />
-  <sodipodi:namedview
-     id='base' />
-  <g transform='translate(10,10) scale (1.0)'>
-  ")
-
-
-
-;; Interface functions
-
-(define (sqr x)
-  (* x x))
-
-;; transform=scale and stroke don't play nice together...
-(define (XXXbeam width slope thick)
-  (let* ((x width)
-        (y (* slope width))
-        (z (sqrt (+ (sqr x) (sqr y)))))
-    (tagify "rect" ""
-           ;; '(style . "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-opacity:1;stroke-width:0.1;stroke-linejoin:miter;stroke-linecap:butt;")
-           ;;'(style . "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:0.000001;stroke-linejoin:miter;stroke-linecap:butt;")
-           `(style . ,(format "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:~f;stroke-linejoin:miter;stroke-linecap:butt;" line-thickness))
-           ;;`(x . ,(number->string half-lt))
-           `(x . "0")
-           ;;`(y . ,(number->string (- half-lt (/ thick 2))))
-           `(y . ,(number->string (- 0 (/ thick 2))))
-           `(width . ,(number->string width))
-           `(height . ,(number->string thick))
-           `(ry . ,(number->string half-lt))
-           `(transform . ,(format #f "matrix(~f,~f,0,1,0,0) scale (~f,~f)"
-                                  (/ x z)
-                                  (* -1 (/ y z))
-                                  output-scale output-scale)))))
-
-(define (beam width slope thick)
-  (let* ((x width)
-        (y (* slope width))
-        (z (sqrt (+ (sqr x) (sqr y)))))
-    (tagify "rect" ""
-           `(style . ,(format "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:~f;stroke-linejoin:miter;stroke-linecap:butt;" line-thickness))
-           `(x . "0")
-           `(y . ,(number->string (* output-scale (- 0 (/ thick 2)))))
-           `(width . ,(number->string (* output-scale width)))
-           `(height . ,(number->string (* output-scale thick)))
-           `(ry . ,(number->string (* output-scale half-lt)))
-           `(transform . ,(format #f "matrix(~f,~f,0,1,0,0) scale (~f,~f)"
-                                  (/ x z)
-                                  (* -1 (/ y z))
-                                  1 1)))))
-
-;; TODO: bezier-ending, see ps.scm
-(define (bezier-bow urg-l thick)
-  
-  (define (bezier-ending z0 z1 z2)
-    (let ((x0 (car z0))
-         (y0 (cdr z0))
-         (x1 (car z1))
-         (y1 (cdr z1))
-         (x2 (car z2))
-         (y2 (cdr z2)))
-      (let ((r (/ (sqrt (+ (* (- x1 x2) (- x1 x2))
-                         (* (- y1 y2) (- y1 y2)))) 2)))
-      (tagify "circle" ""
-             `(fill . "#000000;")
-             `(cx . ,(number->string (* output-scale x0)))
-             `(cy . ,(number->string (* output-scale (- 0 y0))))
-             `(r . ,(number->string (* output-scale r)))))))
-  
-  (let ((l (eval urg-l this-module)))
-    (string-append
-     (bezier-sandwich l thick)
-     (bezier-ending (list-ref l 3) (list-ref l 0) (list-ref l 5))
-     (bezier-ending (list-ref l 7) (list-ref l 0) (list-ref l 5)))))
-
-(define (bezier-sandwich l thick)
-  (let* (;;(l (eval urg-l this-module))
-        (first (list-tail l 4))
-        (first-c0 (car (list-tail first 3)))
-        (second (list-head l 4)))
-    (tagify "path" ""
-           `(stroke . "#000000")
-           `(stroke-width . ,(number->string line-thickness))
-           `(transform . ,(format #f "scale (~f,~f)"
-                                  output-scale output-scale))
-           `(d . ,(string-append (svg-bezier first #f)
-                                 (svg-bezier second first-c0))))))
-  
-(define (char i)
-  (if #t
-      ;;(tagify "tspan" (format #f "&#xe0~2,'0x;" i))
-      (tagify "tspan" (ascii->upm-string i))
-      (begin
-       (format #t "can't display char: ~x\n" i)
-       " ")))
-
-
-(define (comment s)
-  (string-append "<!-- " s " -->\n"))
-
-(define (define-fonts internal-external-name-mag-pairs)
-  (comment (format #f "Fonts used: ~S" internal-external-name-mag-pairs)))
-
-(define (end-output)
-  "</g></svg>")
-
-(define (filledbox breapth width depth height)
-  (roundfilledbox breapth width depth height line-thickness))
-
-(define font-cruft
-  "fill:black;stroke:none;text-anchor:start;writing-mode:lr;font-weight:normal;")
-
-;; FIXME
-(define font-alist
-  `(  
-    ("cmr8" . ,(string-append
-                 font-cruft
-                 "font-family:cmr;font-style:normal;font-size:8;"))
-    ("feta13" . ,(string-append
-                 font-cruft
-                 "font-family:LilyPond-Feta;font-style:-Feta;font-size:13;"))
-    ("feta-nummer10" . ,(string-append
-                        font-cruft
-                        "font-family:LilyPond-feta-nummer;font-style:-feta-nummer;font-size:10;"))
-    ("feta20" . ,(string-append
-                 font-cruft
-                 "font-family:LilyPond-feta;font-style:-feta;font-size:20;"))
-    ("parmesan20" . ,(string-append
-                     font-cruft
-                     "font-family:LilyPond-Parmesan;font-style:-Parmesan;font-size:20;"))))
-
-(define (get-font name-mag-pair)
-  ;; name-mag-pair: (quote ("feta20" . 0.569055118110236))"feta20"(quote ("feta20" . 0.569055118110236))
-  (let ((f (assoc (caadr name-mag-pair) font-alist)))
-    (if (pair? f)
-       (cdr f)
-       (begin
-         (format #t "font not found: ~s\n" (caadr name-mag-pair))
-         (cdr (assoc "feta20" font-alist))))))
-
-(define (fontify name-mag-pair expr)
-  (string-append
-   (tagify "text" (dispatch expr) (cons 'style (get-font name-mag-pair)))))
-
-(define (header-end)
-  (comment "header-end"))
-
-(define (header creator generate)
-  (string-append
-   xml-header
-   (comment creator)
-   (comment generate)
-   svg-header))
-  
-
-(define (lily-def key val)
-  (cond
-   ((equal? key "lilypondpaperoutputscale")
-    ;; ugr
-    ;; If we just use transform scale (output-scale),
-    ;; all fonts come out scaled too (ie, much too big)
-    ;; So, we manually scale all other stuff.
-    (set! output-scale (* scale-to-unit (string->number val))))
-   ((equal? key "lilypondpaperlinethickness")
-    (set! urg-line-thickness (* scale-to-unit (string->number val)))))
-  "")
-
-(define (no-origin)
-  "")
-
-
-(define (placebox x y expr)
-  (tagify "g" (dispatch expr)
-         `(transform .
-                     ,(string-append
-                       "translate("
-                       ;; urg
-                       (number->string (* output-scale x))
-                       ","
-                       (number->string (- 0 (* output-scale y)))
-                       ")"))))
-
-(define (roundfilledbox breapth width depth height blot-diameter)
-  (tagify "rect" ""
-         ;;'(style . "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-opacity:1;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;")
-           `(style . ,(format "fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1;stroke-width:~f;stroke-linejoin:miter;stroke-linecap:butt;" line-thickness))
-         `(x . ,(number->string (* output-scale (- 0 breapth))))
-         `(y . ,(number->string (* output-scale (- 0 height))))
-         `(width . ,(number->string (* output-scale (+ breapth width))))
-         `(height . ,(number->string (* output-scale (+ depth height))))
-         ;;`(ry . ,(number->string (* output-scale half-lt)))
-         `(ry . ,(number->string (/ blot-diameter 2)))))
-
-
-  
-;; TODO: use height, set scaling?
-(define (start-system width height)
-  (let ((y system-y))
-    ;;"<g transform='translate(50,-250)'>
-    (set! system-y (+ system-y height))
-    ;;(format #f "<g transform='translate(0,~1,'~f)'>" y)))
-    (string-append
-     "\n"
-     (comment "start-system")
-     (format #f "<g transform='translate(0.0,~f)'>\n" (* output-scale y)))))
-
-(define (stop-system)
-  (string-append
-   "\n"
-   (comment "stop-system")
-   "</g>\n"))
-
-(define stop-last-system stop-system)
-
-(define (text s)
-  ;; to unicode or not?
-  (if #t
-      (tagify "tspan" s)
-      (tagify "tspan"
-             (apply string-appendb
-                    (map (lambda (x) (ascii->upm-string (char->integer x)))
-                         (string->list s))))))
diff --git a/scm/tex.scm b/scm/tex.scm
deleted file mode 100644 (file)
index 5b4245a..0000000
+++ /dev/null
@@ -1,293 +0,0 @@
-
-;;; tex.scm -- implement Scheme output routines for TeX
-;;;
-;;;  source file of the GNU LilyPond music typesetter
-;;; 
-;;; (c)  1998--2003 Jan Nieuwenhuizen <janneke@gnu.org>
-;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
-
-
-(define-module (scm tex) )
-(debug-enable 'backtrace)
-(use-modules (scm ps)
-            (ice-9 regex)
-            (ice-9 string-fun)
-            (ice-9 format)
-            (guile)
-            (lily)
-            )
-
-(define this-module (current-module))
-
-;;;;;;;;
-;;;;;;;; DOCUMENT ME!
-;;;;;;;;
-
-(define font-name-alist  '())
-
-(define (tex-encoded-fontswitch name-mag)
-  (let* ((iname-mag (car name-mag))
-        (ename-mag (cdr name-mag)))
-    (cons iname-mag
-         (cons ename-mag
-               (string-append  "magfont"
-                         (string-encode-integer
-                          (hashq (car ename-mag) 1000000))
-                         "m"
-                         (string-encode-integer
-                          (inexact->exact (* 1000 (cdr ename-mag)))))))))
-
-(define (define-fonts internal-external-name-mag-pairs)
-  (set! font-name-alist (map tex-encoded-fontswitch
-                            internal-external-name-mag-pairs))
-  (apply string-append
-        (map (lambda (x)
-               (font-load-command (car x) (cdr x)))
-             (map cdr font-name-alist))))
-
-
-
-;; urg, how can exp be #unspecified?  -- in sketch output
-;;
-;; set! returns #<unspecified>  --hwn
-(define (fontify name-mag-pair exp)
-  (string-append (select-font name-mag-pair)
-                exp))
-
-
-(define (unknown) 
-  "%\n\\unknown\n")
-
-(define (select-font name-mag-pair)
-  (let*
-      (
-       (c (assoc name-mag-pair font-name-alist))
-       )
-
-    (if (eq? c #f)
-       (begin
-         (display "FAILED\n")
-         (display (object-type (car name-mag-pair)))
-         (display (object-type (caaar font-name-alist)))
-
-         (ly:warn (string-append
-                   "Programming error: No such font known "
-                   (car name-mag-pair) " "
-                   (ly:number->string (cdr name-mag-pair))
-                   ))
-         "") ; issue no command
-       (string-append "\\" (cddr c)))
-    
-    
-    ))
-
-(define (blank)
-  "")
-
-(define (dot x y radius)
-  (embedded-ps (list 'dot x y radius)))
-
-(define (beam width slope thick)
-  (embedded-ps (list 'beam  width slope thick)))
-
-(define (bracket arch_angle arch_width arch_height height arch_thick thick)
-  (embedded-ps (list 'bracket  arch_angle arch_width arch_height height arch_thick thick)))
-
-(define (dashed-slur thick dash l)
-  (embedded-ps (list 'dashed-slur thick dash `(quote ,l))))
-
-(define (char i)
-  (string-append "\\char" (inexact->string i 10) " "))
-
-(define (dashed-line thick on off dx dy)
-  (embedded-ps (list 'dashed-line  thick on off dx dy)))
-
-(define (zigzag-line centre? zzw zzh thick dx dy)
-  (embedded-ps (list 'zigzag-line centre? zzw zzh thick dx dy)))
-
-(define (symmetric-x-triangle t w h)
-  (embedded-ps (list 'symmetric-x-triangle t w h)))
-
-(define (font-load-command name-mag command)
-  (string-append
-   "\\font\\" command "="
-   (car name-mag)
-   " scaled "
-   (ly:number->string (inexact->exact (* 1000  (cdr name-mag))))
-   "\n"))
-
-(define (ez-ball c l b)
-  (embedded-ps (list 'ez-ball  c  l b)))
-
-(define (header-to-file fn key val)
-  (set! key (symbol->string key))
-  (if (not (equal? "-" fn))
-      (set! fn (string-append fn "." key))
-      )
-  (display
-   (format "writing header field `~a' to `~a'..."
-          key
-          (if (equal? "-" fn) "<stdout>" fn)
-          )
-   (current-error-port))
-  (if (equal? fn "-")
-      (display val)
-      (display val (open-file fn "w"))
-  )
-  (display "\n" (current-error-port))
-  ""
-  )
-
-(if (or (equal? (minor-version) "4.1")
-       (equal? (minor-version) "4")
-       (equal? (minor-version) "3.4"))
-    (define (embedded-ps expr)
-      (let ((ps-string
-            (with-output-to-string
-              (lambda () (ps-output-expression expr (current-output-port))))))
-       (string-append "\\embeddedps{" ps-string "}")))
-    (define (embedded-ps expr)
-      (let
-         ((os (open-output-string)))
-       (ps-output-expression expr os)
-       (string-append "\\embeddedps{" (get-output-string os) "}"))))
-
-(define (comment s)
-  (string-append "% " s "\n"))
-
-(define (end-output) 
-  (begin
-                                       ; uncomment for some stats about lily memory      
-                                       ;               (display (gc-stats))
-    (string-append
-     "\\lilypondend\n"
-                                       ; Put GC stats here.
-                  )))
-
-(define (experimental-on)
-  "")
-
-(define (repeat-slash w a t)
-  (embedded-ps (list 'repeat-slash  w a t)))
-
-(define (header-end)
-  (string-append
-   "\\def\\scaletounit{ "
-   (number->string (cond
-                    ((equal? (ly:unit) "mm") (/ 72.0  25.4))
-                    ((equal? (ly:unit) "pt") (/ 72.0  72.27))
-                    (else (error "unknown unit" (ly:unit)))
-                    ))
-   " mul }%\n"
-   "\\ifx\\lilypondstart\\undefined\n"
-   "  \\input lilyponddefs\n"
-   "\\fi\n"
-   "\\outputscale = \\lilypondpaperoutputscale\\lilypondpaperunit\n"
-   "\\lilypondstart\n"
-   "\\lilypondspecial\n"
-   "\\lilypondpostscript\n"))
-
-;; Note: this string must match the string in ly2dvi.py!!!
-(define (header creator generate) 
-  (string-append
-   "% Generated automatically by: " creator generate "\n"))
-
-(define (invoke-char s i)
-  (string-append 
-   "\n\\" s "{" (inexact->string i 10) "}" ))
-
-;;
-;; need to do something to make this really safe.
-;;
-(define-public (output-tex-string s)
-  (if security-paranoia
-      (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
-      s))
-
-(define (lily-def key val)
-  (let ((tex-key
-        (regexp-substitute/global
-             #f "_" (output-tex-string key) 'pre "X" 'post))
-        
-       (tex-val (output-tex-string val)))
-    (if (equal? (sans-surrounding-whitespace tex-val) "")
-       (string-append "\\let\\" tex-key "\\undefined\n")
-       (string-append "\\def\\" tex-key "{" tex-val "}%\n"))))
-
-(define (number->dim x)
-  (string-append
-   ;;ugh ly:* in backend needs compatibility func for standalone output
-   (ly:number->string x) " \\outputscale "))
-
-(define (placebox x y s) 
-  (string-append "\\lyitem{"
-                (ly:number->string y) "}{"
-                (ly:number->string x) "}{"
-                s "}%\n"))
-
-(define (bezier-bow l thick)
-  (embedded-ps (list 'bezier-bow  `(quote ,l) thick)))
-
-(define (bezier-sandwich l thick)
-  (embedded-ps (list 'bezier-sandwich  `(quote ,l) thick)))
-
-(define (start-system wd ht)
-  (string-append "\\leavevmode\n"
-                "\\scoreshift = " (number->dim (* ht 0.5)) "\n"
-                "\\lilypondifundefined{lilypondscoreshift}%\n"
-                "  {}%\n"
-                "  {\\advance\\scoreshift by -\\lilypondscoreshift}%\n"
-                "\\lybox{"
-                (ly:number->string wd) "}{"
-                (ly:number->string ht) "}{%\n"))
-
-(define (stop-system) 
-  "}%\n%\n\\interscoreline\n%\n")
-(define (stop-last-system)
-  "}%\n")
-
-(define (filledbox breapth width depth height)
-  (if (and #f (defined? 'ps-testing))
-      (embedded-ps
-       (string-append (numbers->string (list breapth width depth height))
-                     " draw_box" ))
-      (string-append "\\lyvrule{"
-                    (ly:number->string (- breapth)) "}{"
-                    (ly:number->string (+ breapth width)) "}{"
-                    (ly:number->string depth) "}{"
-                    (ly:number->string height) "}")))
-
-(define (roundfilledbox x y width height blotdiam)
-  (embedded-ps (list 'roundfilledbox  x y width height blotdiam)))
-
-(define (text s)
-  (string-append "\\hbox{" (output-tex-string s) "}"))
-
-(define (tuplet ht gapx dx dy thick dir)
-  (embedded-ps (list 'tuplet  ht gapx dx dy thick dir)))
-
-(define (polygon points blotdiameter)
-  (embedded-ps (list 'polygon `(quote ,points) blotdiameter)))
-
-(define (draw-line thick fx fy tx ty)
-  (embedded-ps (list 'draw-line thick fx fy tx ty)))
-
-(define (between-system-string string)
-  string
-  )
-(define (define-origin file line col)
-  (if (procedure? point-and-click)
-      (string-append "\\special{src:" ;;; \\string ? 
-                    (point-and-click line col file)
-                    "}" )
-      "")
-  )
-
-;; no-origin not yet supported by Xdvi
-(define (no-origin) "")
-
-(define-public (tex-output-expression expr port)
-  (display (eval expr this-module) port )
-  )
-
-
diff --git a/scm/translator-property-description.scm b/scm/translator-property-description.scm
deleted file mode 100644 (file)
index ce325a0..0000000
+++ /dev/null
@@ -1,480 +0,0 @@
-;;;; translator-property-description.scm -- part of backend documentation
-;;;;
-;;;;  source file of the GNU LilyPond music typesetter
-;;;; 
-;;;; (c)  1998--2003  Han-Wen Nienhuys <hanwen@cs.uu.nl>
-;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
-
-
-(define-public all-translation-properties '())
-
-(define (translator-property-description symbol type? description)
- (if (not (equal? #f (object-property symbol 'translation-doc)))
-      (begin
-       (ly:warn (string-append "Redefining " (symbol->string symbol) "\n"))
-       (exit 2)
-      ))
-  
-  (set-object-property! symbol 'translation-type? type?)
-  (set-object-property! symbol 'translation-doc description)
-  (set! all-translation-properties (cons symbol all-translation-properties))
-  )
-
-
-
-(translator-property-description 'acceptHashTable vector? "Internal
-variable: store table with MusicName to Engraver entries.")
-(translator-property-description 'acknowledgeHashTable vector?
-"Internal variable: store interface to engraver smob table for current
-context. Don't mess with this.")
-(translator-property-description 'aDueText string? "text for begin of a due")
-(translator-property-description 'associatedVoice string? "Name of the
-Voice that has the melody for this LyricsVoice.")
-(translator-property-description 'autoBeamSettings list? "Specifies
-when automatically generated beams should begin and end.  The elements
-have the format:
-
-@example
-
-   function shortest-duration-in-beam time-signature
-
-where
-
-    function = begin or end
-    shortest-duration-in-beam = numerator denominator; eg: 1 16
-    time-signature = numerator denominator, eg: 4 4
-
-unspecified or wildcard entries for duration or time-signature
-are given by * *
-
-The user can override beam begin or end time by pushing a wildcard entries
-'(begin * * * *) or '(end * * * *) resp., eg:
-
-    property Voice.autoBeamSettings push #'(end * * * *) = #(ly:make-moment 1 4)
-
-The head of the list:
-    '(
-((end * * 3 2) . ,(ly:make-moment 1 2))
-((end 1 16 3 2) . ,(ly:make-moment 1 4))
-((end 1 32 3 2) . ,(ly:make-moment 1 8))
-     ...
-    )
-
-@end example")
-
-;; "
-
-(translator-property-description 'autoAccidentals list? "List of
-different ways to typeset an accidental. All algorithms in the list
-are tried, and the one returning the most accidentals is used.
-Each entry is either a symbol containg a context name or a name-value
-pair containing an algorithm-description.
-The list must begin with a symbol (context name).
-The symbols denote in which context THE FOLLOWING algorithms (until next symbol) 
-will be interpreted. All notes in the interpretation context will share accidentals.
-The contexts must be stated in order, innermost first.
-The algorithms are:
-@table @samp
-@item same-octave:
-This is the default algorithm. Accidentals are typeset if the note changes
-the accidental of that note in that octave. Accidentals lasts to the end of the measure 
-and then as many measures as specified in the value. I.e. 1 means to the end
-of next measure, -1 means to the end of previous measure (that is: no duration at all), etc. #t means forever.
-@item any-octave:
-Accidentals are typeset if the note is different from 
-the previous note on the same pitch in any octave. The value has same meaning as in
-same-octave.
-@end table
-")
-
-(translator-property-description 'autoCautionaries list? "List similar to
-autoAccidentals, but it controls cautionary accidentals rather than
-normal ones. Both lists are tried, and the one giving the most accidentals
-wins. In case of draw, a normal accidental is typeset.
-")
-
-(translator-property-description 'automaticPhrasing boolean? " If set,
-the @ref{Lyric_phrasing_engraver} will match note heads of context
-called Voice X to syllables from LyricsVoice called
-X-<something>. This feature is turned on by default. See the example
-file @file{lyrics-multi-stanza.ly}.
-")
-
-(translator-property-description 'automaticMelismata boolean? " If
-set, \\addlyrics will assume that beams, slurs and ties signal
-melismata, and align lyrics accordingly.
-")
-
-(translator-property-description 'barAlways boolean? " If set to true a bar line is drawn after each note.
-")
-(translator-property-description 'barCheckSynchronize boolean? "If
-true then reset measurePosition when finding a barcheck. Turn off when
-using barchecks in polyphonic music.")
-(translator-property-description 'barNonAuto boolean? " If set to true then bar lines will not be printed
-    automatically; they must be explicitly created with @code{bar}
-    keywords.  Unlike with the @code{cadenza} keyword, measures are
-    still counted.  Bar generation will resume according to that
-    count if this property is set to zero.
-")
-(translator-property-description 'barNumberVisibility procedure? "Procedure that takes an int and returns whether the corresponding bar number should be printed")
-(translator-property-description 'bassFigureFormatFunction procedure? "DOCME")
-(translator-property-description 'beamMelismaBusy boolean? "Signal if a beam is set when automaticMelismata is set")
-(translator-property-description 'beatLength ly:moment? "The length of one beat in this time signature.")
-(translator-property-description 'beatGrouping list?
-                                "List of beatgroups. Eg. in 5/8 time #(list 2 3).")
-(translator-property-description 'breakAlignOrder list? "Defines the order in which
-prefatory matter (clefs, key signatures) appears, eg. this puts the
-key signatures after the bar lines:
-
-@example
-       \\property Score.breakAlignOrder = #'(
-         span-bar
-         breathing-sign
-         clef
-         staff-bar
-         key
-         time-signature
-       )
-@end example
-")
-(translator-property-description 'busyGrobs list? "
-a queue of (END-MOMENT . GROB) conses. This is for internal (C++) use only.
-Use at your own risk.  This property contains the grobs for which  END-MOMENT >= NOW.
-")
-
-(translator-property-description 'centralCPosition number? "Place of
-the central C, measured in half staffspaces.  Usually determined by
-looking at clefPosition and clefGlyph.")
-
-(translator-property-description
- 'changeMoment moment-pair?
- "duration that voices are examined for differences, when
-part-combining.  Usually unset or zero when combining threads into one
-voice, and 1 (or the duration of one measure) when combining voices
-into one staff.")
-
-(translator-property-description
- 'chordNameFunction procedure?
- "The function that converts lists of pitches to chord names.")
-(translator-property-description
- 'chordNoteNamer procedure?
- "Function that converts from a pitch object to a text markup. Used for single pitches.")
-(translator-property-description
- 'chordRootNamer procedure?
- "Function that converts from a pitch object to a text markup. Used for chords.")
-(translator-property-description
- 'chordNameExceptions list?
- "Alist of chord exceptions. Contains (CHORD . MARKUP) entries.")
-(translator-property-description
- 'chordNameSeparator markup?
- "The markup object used to separate parts of a chord name.")
-
-
-(translator-property-description 'chordChanges boolean? "Only show changes in chords scheme?")
-(translator-property-description 'clefGlyph string? "Name of the symbol within the music font")
-(translator-property-description 'clefOctavation integer? "Add
-this much extra octavation. Values of 7 and -7 are common.")
-
-(translator-property-description 'clefPosition number? "Where should
-the center of the clef symbol go?  On systems with an odd number of
-stafflines, the value 0 puts the clef on the middle staffline; a
-positive value shifts it up, a negative value shifts it down.  The
-unit of this distance is the half staff space.")
-
-(translator-property-description 'combineParts boolean? "try to combine parts?")
-(translator-property-description 'connectArpeggios boolean? " If
-set, connect all arpeggios that are found.  In this way, you can make
-arpeggios that cross staves.
-")
-(translator-property-description 'createKeyOnClefChange boolean? "Print a key signature whenever the clef is changed.")
-(translator-property-description 'crescendoText markup? "Text to print at start of non-hairpin crecscendo, ie: @samp{cresc.}")
-(translator-property-description 'crescendoSpanner symbol? "Type of spanner to be used for crescendi.  One of: @samp{hairpin}, @samp{line}, @samp{dashed-line}, @samp{dotted-line}.  If unset, hairpin type is used.")
-(translator-property-description 'decrescendoText markup? "Text to print at start of non-hairpin decrecscendo, ie: @samp{dim.}")
-(translator-property-description 'currentBarNumber integer? "Contains the current barnumber. This property is incremented at
-every barline.
-")
-(translator-property-description 'currentCommandColumn ly:grob? "Grob that is X-parent to all current breakable (clef, key signature, etc.) items.")
-(translator-property-description 'currentMusicalColumn ly:grob? "Grob that is X-parent to all non-breakable items (note heads, lyrics, etc.).")
-(translator-property-description 'defaultBarType string? "Sets the default type of bar line.  Available bar types: [FIXME];
-
-This variable is typically read at Score level, so overriding
-Staff.defaultBarType will have no effect.
-
-")
-(translator-property-description 'devNullThread symbol? "User control of Thread_devnull_engraver: one of
-@table @samp
-@item (), or unset
-Behave in normal way: remove one set of grobs when in unisolo.
-@item always:
-Remove any grob that comes along.
-@item never:
-Do nothing.
-@end table
-")
-(translator-property-description 'devNullVoice symbol? "User control of Voice_devnull_engraver: one of
-@table @samp
-@item (), or unset
-Behave in normal way: remove spanners when in unisolo.
-@item always:
-Remove any spanners that come along.
-@item never:
-Do nothing.
-@end table
-")
-(translator-property-description 'decrescendoSpanner symbol? "Type of spanner to be used for decrescendi.  One of: @samp{hairpin}, @samp{line}, @samp{dashed-line}, @samp{dotted-line}.  If unset, hairpin type is used.")
-
-(translator-property-description 'dynamicAbsoluteVolumeFunction procedure? "
-[DOCUMENT-ME]
-")
-(translator-property-description 'explicitClefVisibility procedure? "visibility-lambda function for clef changes.")
-
-
-
-(translator-property-description 'explicitKeySignatureVisibility
-procedure? "visibility-lambda function for explicit Key changes;
-\override of #'break-visibility will set the visibility for normal
-(ie. at the start of the line) key signatures.")
-
-(translator-property-description 'extraNatural boolean? "Whether to typeset an
-extra natural sign before accidentals changing from a non-natural to 
-another non-natural.
-")
-
-(translator-property-description 'extraVerticalExtent number-pair?
-"extra vertical extent, same format as MinimumVerticalExtent")
-
-
-(translator-property-description 'finalizations list? "List of expressions to evaluate before proceeding to next time step. Internal variable.")
-(translator-property-description 'followVoice boolean?
-                                "if set, note heads are tracked  across staff switches by a thin line")
-(translator-property-description 'fontSize integer?
-                                "Used to set the relative size of all grobs
-in a context. This is done using the @code{Font_size_engraver}.")
-
-(translator-property-description 'forceClef boolean? "Show clef symbol, even if it hasn't changed. Only active for the first clef after the property is set, not for the full staff.")
-(translator-property-description 'graceAccidentalSpace number? "amount space to alot for an accidental")
-(translator-property-description 'graceAlignPosition ly:dir? "put the grace note before or after the main note?")
-(translator-property-description 'highStringOne boolean? "Whether the 1st string is the string with
-highest pitch on the instrument (used by the automatic string selector).")
-(translator-property-description 'instr markup? "see @code{instrument}")
-(translator-property-description 'instrument markup? " If @code{Instrument_name_engraver}
-@cindex Instrument_name_engraver
- is
-    added to the Staff translator, then the @code{instrument} property
-    is used to label the first line of the staff and the @code{instr}
-    property is used to label subsequent lines.  If the
-    @code{midiInstrument} property is not set, then @code{instrument}
-    is used to determine the instrument for MIDI output.")
-
-(translator-property-description 'instrumentEqualizer procedure? "[DOCUMENT-ME]")
-(translator-property-description 'instrumentSupport list? "
-list of grobs to attach instrument name to. 
-")                              
-(translator-property-description 'keyAccidentalOrder list? "
-Alist that defines in what order  alterations should be printed.
-The format is (NAME . ALTER), where NAME is from 0 .. 6 and ALTER from  -1, 1.
-")
-(translator-property-description 'keySignature list? "The current key signature. This is an alist containing (NAME . ALTER) or ((OCTAVE . NAME) . ALTER) or ((OCTAVE . NAME) . (ALTER . BARNUMBER)) pairs, where NAME is from 0.. 6 and ALTER from -2,-1,0,1,2. The optional barnumber contains the number of the measure of the accidental. FIXME: describe broken tie entries.")
-
-(translator-property-description 'lastKeySignature list? "Last key
-signature before a key signature change.")
-
-(translator-property-description 'localKeySignature list? "the key
-signature at this point in the measure.  The format is the same as for keySignature. Is reset at every bar line."
-) 
-(translator-property-description 'localKeySignatureChanges list? "Experimental.
- [DOCME]")
-(translator-property-description 'majorSevenSymbol markup? "How should
-the major7 be formatted in a chord name?")
-(translator-property-description 'measureLength ly:moment? "Length of one
-measure in the current time signature last?")
-(translator-property-description 'measurePosition ly:moment? " How much
-of the current measure (measured in whole notes) have we had.  This
-can be set manually to create incomplete measures (anacrusis, upbeat),
-the start of the music.
-")
-(translator-property-description 'melismaBusy boolean? "Signifies
-whether a melisma is active. This can be used to signal melismas on
-top of those automatically detected. ")
-(translator-property-description 'melismaEngraverBusy boolean? "See melismaBusy. This is set automatically.")
-(translator-property-description 'metronomeMarkFormatter procedure?
-                                "How to produce a metronome markup.
-Called with 2 arguments,  event and context.")
-(translator-property-description 'midiInstrument string? "Name of the
-MIDI instrument to use ")
-(translator-property-description 'midiMinimumVolume number? "[DOCUMENT-ME]")
-(translator-property-description 'midiMaximumVolume number? "[DOCUMENT-ME]")
-(translator-property-description 'minimumFret number? "The tablature
-auto string-selecting mechanism selects the highest string with a fret
-not less than minimumFret")
-(translator-property-description 'minimumVerticalExtent number-pair?
-"minimum vertical extent, same format as VerticalExtent")
-(translator-property-description 'autoBeaming boolean? "If set to true
-then beams are generated automatically.")
-(translator-property-description 'noDirection boolean? "Don't set directions by a2-engraver when part-combining.")
-(translator-property-description 'oneBeat ly:moment? "  How long does one beat in the current time signature last?")
-(translator-property-description 'othersolo boolean? "FIXME")
-(translator-property-description 'pedalSustainStrings list? "List of   string to print for sustain-pedal. Format is
- (UP UPDOWN DOWN), where each of the three is the string to print when
-this is done with the pedal.")
-(translator-property-description 'pedalUnaCordaStrings list? "see pedalSustainStrings.")
-(translator-property-description 'pedalSostenutoStrings list? "see pedalSustainStrings.")
-
-(translator-property-description 'phrasingPunctuation string? "")
-(translator-property-description 'rehearsalMark number-or-string? "")
-(translator-property-description 'regularSpacingDelta ly:moment? "TODO")
-(translator-property-description 'repeatCommands list? "This property is read to find any command of the form (volta . X), where X is a string or #f")
-(translator-property-description 'scriptDefinitions list? "
-Description of scripts. This is used by Script_engraver for typesetting note-super/subscripts. See @file{scm/script.scm} for more information
-")
-
-(translator-property-description 'restNumberThreshold number?
-                                "If a multimeasure rest takes less
-than this number of measures, no number is printed. ")
-
-(translator-property-description 'scriptHorizontal boolean? "  Put
-scripts left or right of note heads.  Support for this is limited.
-Accidentals will collide with scripts.
-")
-(translator-property-description 'fingerHorizontalDirection integer?
-                                "If set, put the middle fingerings to
-the side of the note head. Use LEFT, RIGHT or unset.")
-
-(translator-property-description 'skipBars boolean? " Set to true to
-skip the empty bars that are produced by multimeasure notes and rests.
-These bars will not appear on the printed output.  If not set (the
-default) multimeasure notes and rests expand into their full length,
-printing the appropriate number of empty bars so that synchronization
-with other voices is preserved.
-
-
-@example
-@@lilypond[fragment,verbatim,center]
-r1 r1*3 R1*3  \\\\property Score.skipBars= ##t r1*3 R1*3
-
-@@end lilypond
-@end example
-
-")
-(translator-property-description 'skipTypesetting boolean?
-                                "When true, all no typesetting is done at
-this moment, causing  the interpretation phase to go a lot faster. This can
-help with debugging large scores.")
-(translator-property-description 'slurMelismaBusy boolean? "Signal a slur if automaticMelismata is set.")
-(translator-property-description 'solo boolean? "set if solo is detected by the part combiner.")
-(translator-property-description 'soloADue boolean? "set Solo/A due texts in the part combiner?.")
-(translator-property-description 'soloIIText string? "text for begin of solo for voice ``two'' when part-combining.")
-(translator-property-description 'soloText string? "text for begin of solo when part-combining.")
-(translator-property-description 'sparseTies boolean? "only create one tie per chord.")
-(translator-property-description 'splitInterval number-pair? "part-combiner will separate its two voices (or threads) when interval between the two voices is contained in this range.")
-(translator-property-description 'split-interval boolean? "set if part-combiner separated voices based on splitInterval.")
-(translator-property-description 'squashedPosition integer? " Vertical position of
-squashing for Pitch_squash_engraver.")
-(translator-property-description 'stringOneTopmost boolean? "Whether the 1st string is printed on the
-top line of the tablature.")
-(translator-property-description 'stavesFound list? "list of all staff-symbols found.")
-(translator-property-description 'stanza markup? "Stanza `number' to print at start of a verse. Use in LyricsVoice context.")
-(translator-property-description 'stemLeftBeamCount integer? "
-Specify the number of beams to draw on the left side of the next note.
-Overrides automatic beaming.  The value is only used once, and then it
-is erased.
-.")
-(translator-property-description 'stemRightBeamCount integer? "idem, for the right side.")
-(translator-property-description 'stringTunings list? "The tablature strings tuning. Must be a list of the different semitons pitch of each string (starting by the lower one).")
-(translator-property-description 'stz markup? "Abbreviated form for a stanza, see also Stanza property.")
-(translator-property-description 'subdivideBeams boolean? "If set, multiple beams will be subdivided at beat
-positions - by only drawing one beam over the beat.")
-(translator-property-description 'systemStartDelimiter symbol? "Which grob to make for the start of the system/staff?")
-(translator-property-description 'tablatureFormat procedure?
-                                "Function formatting a tab notehead; it takes
-a string number, a list of string tunings and Pitch object. It returns the text as a string.")
-
-(translator-property-description 'textNonEmpty boolean? " If set
-to true then text placed above or below the staff is not assumed to
-have zero width.  @code{\fatText} and @code{\emptyText} are predefined
-settings.
-.")
-(translator-property-description 'tieMelismaBusy boolean? "Signal ties when automaticMelismata is set.")
-(translator-property-description 'timeSignatureFraction number-pair? "
-pair of numbers,  signifying the time signature. For example #'(4 . 4) is a 4/4time signature.")
-(translator-property-description 'timing boolean? " Keep administration of measure length, position, bar number, etc?
-Switch off for cadenzas.")
-(translator-property-description 'tonic ly:pitch?
-                                "The tonic of the current scale")
-(translator-property-description 'transposing integer? "Transpose the MIDI output.  Set this property to the number of half-steps to transpose by.")
-(translator-property-description 'tremoloFlags integer? "Number of tremolo flags to add if none is specified.")
-(translator-property-description 'tupletNumberFormatFunction procedure?
-                                "Function taking a music as input, producing a string. This function is called to determine the text to print on a tuplet bracket.")
-
-(translator-property-description 'tupletInvisible boolean? "
-    If set to true, tuplet bracket creation is switched off
-entirely. This has the same effect as setting both
-@code{tupletNumberVisibility} and @code{tupletBracketVisibility} to
-@code{#f}, but as this does not even create any grobs, this setting
-uses less memory and time.")
-(translator-property-description 'tupletSpannerDuration ly:moment? "
-Normally a tuplet bracket is as wide as the
-@code{ imes} expression that gave rise to it. By setting this
-property, you can make brackets last shorter. Example
-
-@example
-@@lilypond[verbatim,fragment]
-context Voice  imes 2/3 @{
-  property Voice.tupletSpannerDuration = #(ly:make-moment 1 4)
-  [c8 c c] [c c c]
-@}
-@@end lilypond
-@end example
-.")
-(translator-property-description 'unirhythm boolean? "set if unirhythm is detected by the part combiner.")
-(translator-property-description 'unisilence boolean? "set if unisilence is detected by the part combiner.")
-(translator-property-description 'unison boolean? "set if unisono is detected  by the part combiner. .")
-(translator-property-description 'verticalAlignmentChildCallback
-procedure? "what callback to add to children of a vertical alignment.
-It determines what alignment procedure is used on the alignment
-itself.  .")
-(translator-property-description 'verticalExtent number-pair? "hard
-coded vertical extent.  The format is a pair of dimensions, for
-example, this sets the sizes of a staff to 10 (5+5) staffspaces high.
-
-@example
-property Staff.verticalExtent = #(-5.0 . 5.0)
-@end example
-
-VerticalExtent, MinimumVerticalExtent and ExtraVerticalExtent are
-predefined in all relevant contexts to @code{#f}, so they will not
-inherit values.
-
-Note that these VerticalExtents can only operate on vertical groups,
-and therefore only work in contexts which contain an
-@code{Axis_group_engraver}.
-")
-
-(translator-property-description 'voltaOnThisStaff boolean?
- "Normally, volta brackets are put only on the topmost staff. Setting this variable to true, will force a bracket to be on this staff as well.")
-(translator-property-description 'voltaSpannerDuration ly:moment? "maximum duration of the volta bracket.
-
-    Set to a duration to control the size of the brackets printed by
-@code{\\alternative}.  It specifies the number of whole notes duration
-to use for the brackets.  This can be used to shrink the length of
-brackets in the situation where one alternative is very large.  It may
-have odd effects if the specified duration is longer than the music
-given in an @code{\\alternative}.
-.")
-(translator-property-description 'whichBar string?
-                                "This property is read to determine what type of barline to create.
-
-Example:
-@example
-\\property Staff.whichBar = \"|:\"
-@end example
-
-This will create a start-repeat bar in this staff only.
-
-If not set explicitly (by property or @code{\bar}), this is set
-according to values of @code{defaultBarType}, @code{barAlways},
-@code{barNonAuto} and @code{measurePosition}.
-
-Valid values are described in @ref{(lilypond-internals)bar-line-interface}.
-
-.")
index 9c56ae5716dc78178a4c333069592b772a55a2b5..056decf8ce91ae2055278d93e808ef64427e48ba 100644 (file)
@@ -1170,6 +1170,23 @@ if 1:
        
        conversions.append (((1,7,17), conv, "Skip_req  -> Skip_event"))
 
+if 1:
+       def conv(str):
+               str = re.sub ("groupOpen",
+                             "startGroup", str)
+               str = re.sub ("groupClose",
+                             "stopGroup", str)
+               str = re.sub ("#'outer",
+                             "#'enclose-bounds", str)
+
+               return str
+       
+       conversions.append (((1,7,18), conv,
+                            """"groupOpen/Close  -> start/stopGroup,
+                            #'outer  -> #'enclose-bounds
+                            """))
+
+
 
 ################################
 #      END OF CONVERSIONS