]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.96.jcn9
authorJan Nieuwenhuizen <janneke@gnu.org>
Sat, 21 Oct 2000 23:09:39 +0000 (01:09 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sat, 21 Oct 2000 23:09:39 +0000 (01:09 +0200)
1.3.96.jcn9

71 files changed:
CHANGES
Documentation/user/mudela-book.tely
NEWS
VERSION
input/test/american-chords.ly
input/test/chord-names.ly
input/test/chords.ly
input/test/jazz-chords.ly
lily/align-interface.cc
lily/bar.cc
lily/dynamic-engraver.cc
lily/dynamic-performer.cc
lily/include/align-interface.hh
lily/include/arpeggio.hh
lily/include/axis-group-interface.hh
lily/include/beam.hh
lily/include/break-align-item.hh
lily/include/clef.hh
lily/include/collision.hh
lily/include/crescendo.hh
lily/include/dots.hh
lily/include/grace-align-item.hh
lily/include/hyphen-spanner.hh
lily/include/key-item.hh
lily/include/ly-smobs.icc
lily/include/lyric-extender.hh
lily/include/multi-measure-rest.hh
lily/include/musical-request.hh
lily/include/note-head.hh
lily/include/paper-column.hh
lily/include/rest.hh
lily/include/rhythmic-head.hh
lily/include/side-position-interface.hh
lily/include/slur.hh
lily/include/smobs.hh
lily/include/spaceable-element.hh
lily/include/spacing-spanner.hh
lily/include/span-bar.hh
lily/include/staff-symbol.hh
lily/include/stem-tremolo.hh
lily/include/tie.hh
lily/include/volta-spanner.hh
lily/lyric-engraver.cc
lily/lyric-performer.cc
lily/mark-engraver.cc
lily/moment.cc
lily/musical-request.cc
lily/my-lily-lexer.cc
lily/parser.yy
lily/property-engraver.cc
lily/score-element.cc
lily/spaceable-element.cc
lily/span-arpeggio-engraver.cc
lily/text-engraver.cc
lily/text-spanner.cc
lily/tie-column.cc
lily/translator-group.cc
ly/chord-modifiers.ly
ly/declarations.ly
ly/engraver.ly
ly/generate-documentation.ly [new file with mode: 0644]
scm/basic-properties.scm
scm/chord-names.scm
scm/element-descriptions.scm [new file with mode: 0644]
scm/font.scm
scm/generate-documentation.scm [new file with mode: 0644]
scm/interface.scm [new file with mode: 0644]
scm/lily.scm
scm/slur.scm
scripts/etf2ly.py
scripts/mudela-book.py

diff --git a/CHANGES b/CHANGES
index f84b624f1336270df6586591a516a584c4351059..7f4589422dc7825357fb9ded024b3c9dcf4e2a38 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,38 +1,47 @@
-1.3.96.jcn7
+1.3.96.jcn9
 ===========
 
 ===========
 
-* Junked all old style text lookups, except for feta definitions.
+* Moved Text_script_req's text_ member into mus-property.
 
 
-1.3.96.jcn6
-===========
+* Renamed ChordName to ChordNames, for consistancy.
 
 
-* Added support for name-based character lookups.
+* Resurrected most of chord names, superscripting and kerning
+  is currently broken, though.
 
 
-1.3.96.jcn5
+1.3.96.jcn7
 ===========
 
 ===========
 
-* Added support for font styles and papersize style sheets.
+* Junked all old style text lookups, except for feta definitions.
 
 
-1.3.96.jcn4
-===========
+* Added support for name-based character lookups.
+
+* Added support for font styles and papersize style sheets.
 
 * Added new code for font selection and scm text markup.  Only used
   for testing in \textscript SCM. See input/test/markup.ly.
 
 
 * Added new code for font selection and scm text markup.  Only used
   for testing in \textscript SCM. See input/test/markup.ly.
 
-1.3.96.jcn3
-===========
-
 * Fixed (added actually, it got lost?) word-space for chords.
 
 * Fixed (added actually, it got lost?) word-space for chords.
 
-1.3.96.jcn1
-===========
-
 * Added slope-limit and attachment-offset properties to slur.
 
 * Slur's broken trend now weighs in the number of note-columns.
 
 * Spacing tweaks: 
 
 * Added slope-limit and attachment-offset properties to slur.
 
 * Slur's broken trend now weighs in the number of note-columns.
 
 * Spacing tweaks: 
 
+1.3.96.hwn1
+===========
+
+* Mudela-book fixes (Tom Cato Amundsen)
+
+* Put marks above chords.
+
+* Solaris fix.
+
+* Type checking for \push and \pop; elt property description (docs
+inclusive) is now in Scheme. Preliminary auto-documentation in
+ly/generate-documentation.ly
+
+
 1.3.95.jcn5
 ===========
 
 1.3.95.jcn5
 ===========
 
index b135ca2f9012a2cad3c099475f1ee5bba6281490..ae77afe0d203654f960b0cb51dbef3900569e16e 100644 (file)
@@ -318,6 +318,9 @@ TeXinfo input will be written to a file with ext @file{.texi}. So be
 careful, don't give the source file that ext, or the file will be
 overwritten.
 
 careful, don't give the source file that ext, or the file will be
 overwritten.
 
+If you use @code{--outdir}, you should also @code{cd} to that directory
+before running LaTeX or makeinfo.
+
 @strong{[UGH: IS THIS THE BEST WAY TO DO IT. MAYBE ADD A COMMENT LINE TO THE
 GENERATED FILE, SO MUDELA-BOOK CAN TEST IF THE FILE IT IS TO OVERWRITE
 IS GENERATED.]}
 @strong{[UGH: IS THIS THE BEST WAY TO DO IT. MAYBE ADD A COMMENT LINE TO THE
 GENERATED FILE, SO MUDELA-BOOK CAN TEST IF THE FILE IT IS TO OVERWRITE
 IS GENERATED.]}
@@ -395,11 +398,6 @@ The La@TeX{} \includeonly@{...@} command is ignored.
 
 Ignores almost all La@TeX{} commands that changes margins and linewidths.
 
 
 Ignores almost all La@TeX{} commands that changes margins and linewidths.
 
-La@TeX{} comments can confuse @command{mudela-book}:
-@example
-% this music will be displayed: \mudela@{c d e@}
-@end example
-
 @section Authors
 
 @email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}, @uref{http://www.cs.uu.nl/people/hanwen}
 @section Authors
 
 @email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}, @uref{http://www.cs.uu.nl/people/hanwen}
diff --git a/NEWS b/NEWS
index a35ea9667956b9b59766d586733b83bae1c05298..de0d3f6cf14e66dc88cd45b5f0e3b62700b231a8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -15,7 +15,7 @@ internals: LilyPond is smaller, cleaner, more flexible, etc.
 
  - Improved robustness: Lily almost never crashes.
 
 
  - Improved robustness: Lily almost never crashes.
 
-* Piano pedal support
+* Piano pedal support, Arpeggios
 
 * MIDI: dynamics, tempo changes
 
 
 * MIDI: dynamics, tempo changes
 
diff --git a/VERSION b/VERSION
index bcd827905b8d0e0f69ec64d0dca3dc634462afd1..8a957f0f5c8026aad33619c8f04a2dffc3bd5ebe 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=96
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=96
-MY_PATCH_LEVEL=jcn8
+MY_PATCH_LEVEL=jcn9
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 91f6238088356df48e285a1fa2e18eeb31e50fc2..bc20a85f4c09cfaa6219335add89d0d2a65b3f88 100644 (file)
@@ -1,3 +1,4 @@
+\version "1.3.96"
 %{
   See scm/chord-names.scm: chord::names-alist-american
   James Hammons <jlhamm@pacificnet.net>
 %{
   See scm/chord-names.scm: chord::names-alist-american
   James Hammons <jlhamm@pacificnet.net>
@@ -13,7 +14,7 @@
       chord::names-alist-american))
 
 chord = \notes\transpose c''\chords{
       chord::names-alist-american))
 
 chord = \notes\transpose c''\chords{
-       \property ChordNames.ChordName \push #'style = #"american"
+       \property ChordNames.ChordNames \push #'style = #"american"
 c
 cs:m
 df:m5-
 c
 cs:m
 df:m5-
@@ -47,8 +48,8 @@ c:m7.9
     \paper
     {
                \translator { 
     \paper
     {
                \translator { 
-                       \ChordNameContext
-                       ChordName \push #'word-space = #1 
+                       \ChordNamesContext
+                       ChordNames \push #'word-space = #1 
                }
     }
 }
                }
     }
 }
index 76a0246148c27d8a1be28f28196d3ec079af107a..940999a4b4b061752fe85159b48a4be8ac5e5703 100644 (file)
@@ -1,3 +1,4 @@
+\version "1.3.96"
 chord = \notes\transpose c''\chords{
    c1
    c:m
 chord = \notes\transpose c''\chords{
    c1
    c:m
@@ -21,8 +22,8 @@ chord = \notes\transpose c''\chords{
     \paper{
        linewidth = -1.0;
                \translator { 
     \paper{
        linewidth = -1.0;
                \translator { 
-                       \ChordNameContext
-                       ChordName \push #'word-space = #1 
+                       \ChordNamesContext
+                       ChordNames \push #'word-space = #1 
                }
     }
 }
                }
     }
 }
index c5b31dcfb5f684ab296735225318ee01d55a6fe3..76e1ca73954c41e1661711a9d66ce44c7796c47b 100644 (file)
@@ -1,4 +1,4 @@
-\version "1.3.96";
+\version "1.3.97";
 
 %{
 Would this be acceptable/good enough/convenient for entry?
 
 %{
 Would this be acceptable/good enough/convenient for entry?
index 731a360f1ec3c8b66a47ba02f5b7e06f3a19c67f..44d35bc00849ce7fc270dcd1d78432a608af2e99 100644 (file)
@@ -1,3 +1,4 @@
+\version "1.3.96"
 %% This should only be necessary if your kpathsea setup is broken
 %%
 %% Make sure the correct msamxx.tfm is where lily can find it
 %% This should only be necessary if your kpathsea setup is broken
 %%
 %% Make sure the correct msamxx.tfm is where lily can find it
         ;; any changes here, see scm/chord-names.scm
 
 
         ;; any changes here, see scm/chord-names.scm
 
 
-        ;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (("o7" (type . "super"))))
+        ;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (super "o7"))
         ;jazz: the delta, see jazz-chords.ly
         ;jazz: the delta, see jazz-chords.ly
-        (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) .  (("N" (type . "super") (style . "msam") (size . -3))))
+        (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) .  (super ((family . "math") "N")))
 
 
-        ;(((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (("x7" (type . "super"))))
+        ;(((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (super "x7"))
         ; slashed o
         ; slashed o
-        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (("o" (type . "super")) ("/" (size . -2) (offset . (-0.58 . 0.5))) ("7" (type . "super"))))
-
+        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows (super "o") ((kern . -0.5) ((size . "-3") "/")) "7"))
        )
       chord::names-alist-american))
 
 chord = \notes\transpose c''\chords{
        )
       chord::names-alist-american))
 
 chord = \notes\transpose c''\chords{
-       \property ChordNames.ChordName \push #'style = #"american"
+       \property ChordNames.ChordNames \push #'style = #"american"
        c:m5-.7-
        c:m5-.7
 }
        c:m5-.7-
        c:m5-.7
 }
@@ -38,8 +38,8 @@ chord = \notes\transpose c''\chords{
     \paper
     {
          \translator { 
     \paper
     {
          \translator { 
-               \ChordNameContext
-               ChordName \push #'word-space = #1 
+               \ChordNamesContext
+               ChordNames \push #'word-space = #1 
          }
     }
 }
          }
     }
 }
index 12c8683d78fa4e71b7cfd6b894f6c0103de6e655..ef4fc214bddb3f742cd556977a633134dd508500 100644 (file)
@@ -21,9 +21,9 @@ MAKE_SCHEME_CALLBACK(Align_interface,alignment_callback,2);
 SCM
 Align_interface::alignment_callback (SCM element_smob, SCM axis)
 {
 SCM
 Align_interface::alignment_callback (SCM element_smob, SCM axis)
 {
-  Score_element * sun = unsmob_element (element_smob);
+  Score_element * me = unsmob_element (element_smob);
   Axis ax = (Axis )gh_scm2int (axis);
   Axis ax = (Axis )gh_scm2int (axis);
-  Score_element * par = sun->parent_l (ax);
+  Score_element * par = me->parent_l (ax);
   if (par && !to_boolean (par->get_elt_property ("alignment-done")))
     {
       Align_interface::do_side_processing (par, ax);
   if (par && !to_boolean (par->get_elt_property ("alignment-done")))
     {
       Align_interface::do_side_processing (par, ax);
index 63b2632560b2a1b406b93272ab5eb9200107d6e4..4192fd0780b254741076798413283792eb10dab7 100644 (file)
@@ -178,13 +178,13 @@ Bar::before_line_breaking  (SCM smob)
 void
 Bar::set_interface (Score_element*me)
 {
 void
 Bar::set_interface (Score_element*me)
 {
-  me->set_interface (ly_symbol2scm ("bar-interface"));
+  me->set_interface (ly_symbol2scm ("bar-line-interface"));
 }
 
 bool
 Bar::has_interface (Score_element*m)
 {
 }
 
 bool
 Bar::has_interface (Score_element*m)
 {
-  return m && m->has_interface (ly_symbol2scm ("bar-interface"));
+  return m && m->has_interface (ly_symbol2scm ("bar-line-interface"));
 }
 
 
 }
 
 
index 2a7ca06770857746fce991c63a6c9406b5dafe3e..0da8f321c6f9ba820212fcc40453a060d827e931 100644 (file)
@@ -182,7 +182,8 @@ Dynamic_engraver::do_process_music ()
   if (script_req_l_)
     {
       script_p_ = new Item (get_property ("DynamicText"));
   if (script_req_l_)
     {
       script_p_ = new Item (get_property ("DynamicText"));
-      script_p_->set_elt_property ("text", script_req_l_->text_);
+      script_p_->set_elt_property ("text",
+                                  script_req_l_->get_mus_property ("text"));
       if (Direction d = script_req_l_->get_direction ())
        Directional_element_interface::set (line_spanner_, d);
 
       if (Direction d = script_req_l_->get_direction ())
        Directional_element_interface::set (line_spanner_, d);
 
index f3f60b9483bded2f0208d66e9b1e170765dc7619..92e53acd4947e8e5a8ce7c05505901df1bf5946c 100644 (file)
@@ -61,7 +61,7 @@ Dynamic_performer::do_process_music ()
       if (gh_procedure_p (proc))
        {
          // urg
       if (gh_procedure_p (proc))
        {
          // urg
-         svolume = gh_call1 (proc, script_req_l_->text_); 
+         svolume = gh_call1 (proc, script_req_l_->get_mus_property ("text"));
        }
 
       Real volume = 0.5; 
        }
 
       Real volume = 0.5; 
index 924ca2dec33b65fd6e7d150753e8bf69c0b5d417..904f20202a5b976ccde71767dc522c7d80b9a000 100644 (file)
 #include "lily-proto.hh"
 #include "lily-guile.hh"
 
 #include "lily-proto.hh"
 #include "lily-guile.hh"
 
-
-/*
-  Order elements top to bottom/left to right/right to left etc.
-
-
-  *******
-  
-  element properties
-
-  stacking-dir -- stack contents of elements in which direction ?
-
-  align-dir -- Which side to align? -1: left side, 0: centered (around
-    center_l_ if not nil, or around center of width), 1: right side
-
-  threshold -- (cons MIN MAX), where MIN and MAX are dimensions in
-    staffspace
-
-  alignment-done -- boolean to administrate whether we've done the alignment already (to ensure that the process is done only once)
-
-  center-element -- element which will be at the center of the group
-    after aligning (when using
-    Align_interface::center_on_element). The center element should
-    have this object as a reference point.
-
-  elements -- to be aligned elements 
-
-  axes -- list of axis numbers. Should contain only one number.
-  
-  *******
-  
-  Reads the following from its elements
-  
-  
-  minimum-space --  (cons LEFT RIGHT)
-
-  extra-space -- (cons LEFT RIGHT)
-  
-*/
 struct Align_interface {
   DECLARE_SCHEME_CALLBACK(alignment_callback, (SCM element, SCM axis));
   static void do_side_processing (Score_element*,Axis a);
 struct Align_interface {
   DECLARE_SCHEME_CALLBACK(alignment_callback, (SCM element, SCM axis));
   static void do_side_processing (Score_element*,Axis a);
index 08c5a98c685f27a6a8f6e30594c31b17397fed93..d912c49615c3613384bad17619077857c845a409 100644 (file)
 
 #include "lily-guile.hh"
 #include "lily-proto.hh"
 
 #include "lily-guile.hh"
 #include "lily-proto.hh"
-/*
-  properties:
 
 
-  stems -- list of stem objects, corresponding to the notes that the
-  arp has to be before.  */
 class Arpeggio
 {
 public:
 class Arpeggio
 {
 public:
index 258ff65dc4ed4e41a2a9e1c1a095e413a9f5021a..3c4676b9899170b4ffabe07851231411f51059c5 100644 (file)
    added to ELT_L_ to ELT_L_.
 
    Properties:
    added to ELT_L_ to ELT_L_.
 
    Properties:
-
-   axes -- list of axis (number) in which this group works
-
-   transparent -- an Axis_group is transparent by default
-
-   elements -- contains list of pointers to other elements
-
-   interfaces -- Axis_group is added to this list.
 */
 struct Axis_group_interface 
 {
 */
 struct Axis_group_interface 
 {
index 11bc3d37040ac3b5f568688e31dc36cccada382f..ba926a0972d155ecae43e925e06a0ee6efb71c6d 100644 (file)
 
 
 
 
 
 
-/** a beam connects multiple stems.
-
-  Beam adjusts the stems its owns to make sure that they reach the
-  beam and that point in the correct direction (urg?)
-
-   elt_properties:
-   
-   y-position -- real  (position of left edge)
-
-   height -- real  (dy)
-
-
-   Read-only
-   =========
-   
-   flag-width-function --
-
-   damping -- amount of beam slope damping. (int)
-     should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams 
-
-   default-neutral-direction -- which direction to choose if we're in
-     the middle of the staff
-   
-   thickness -- weight of beams, in staffspace
-
-   space-function -- function of type multiplicity -> real (in staffspace)
-
-   beamed-stem-shorten --
-
-   height-quants --
-
-   vertical-position-quant-function --
-
-   dir-function --
-   
-   damping -- damping factor (real).
-
-   outer-stem-length-limit -- catch suspect beam slopes, set slope to zero if
-     outer stem is lengthened more than this (in staffspace)
-
-   slope-limit -- set slope to zero if slope is running away steeper than this.
-*/
 class Beam
 {
 public:
 class Beam
 {
 public:
index 3e9d0d6c1d696c39bedd1ba3df763eccfed6feb8..75d65e7acec21e405d24686f52e29ead1bf1d707 100644 (file)
 
 #include "item.hh"
 
 
 #include "item.hh"
 
-/**
-   align breakable items (clef, bar, etc.)
-
-   Properties:
-
-   break-align-symbol -- the index in the spacing table (symbol) of
-   the to be aligned item.
-
-*/
 class Break_align_interface
 {
 public:
 class Break_align_interface
 {
 public:
index bd59e6ee1da437aaa6c516abb47d614791991ab2..e5308818df54e2e9f66db78169f3d06c0c962304 100644 (file)
 #include "lily-guile.hh"
 #include "lily-proto.hh"
 
 #include "lily-guile.hh"
 #include "lily-proto.hh"
 
-/**
-  Set a clef in a staff.
-
-  properties:
-
-  non-default -- not set because of existence of a bar?
-
-  change -- is this a change clef (smaller size)?
-
-  glyph -- a string determining what glyph is typeset
-  
- */
 struct Clef 
 {
   DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
 struct Clef 
 {
   DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM ));
index d700f5a34a50b08260ab27881d3be45e06910098..483ad4bff1244eed306c57f0edf9a4c1c087c993 100644 (file)
 
   * Make interface of this, similar to align-interface.
   
 
   * Make interface of this, similar to align-interface.
   
-  Properties:
-
-  elements -- (see Axis_group_interface)
-
-  merge-differently-dotted -- merge black noteheads with differing dot count.
-
-  horizontal-shift -- integer that identifies ranking of note-column for horizontal shifting.
-  
-  force-hshift -- amount of collision_note_width that overides automatic collision settings.
-  Read and removed from elements.
-
-  note-width -- unit for horizontal translation, measured in staff-space.
-  
 */
 class Collision                        // interface
 {
 */
 class Collision                        // interface
 {
index 0fe05d839650f06c77675ebeaabae1079a5b01f6..c487894bc2c558198be4cc94f1433a771b7d7939 100644 (file)
@@ -12,9 +12,7 @@
 
 #include "lily-guile.hh"
 /**
 
 #include "lily-guile.hh"
 /**
-  The hairpin symbol. (cresc)
-
-  (normal spanner?)
+  The hairpin symbol. 
  */
 struct Crescendo
 {
  */
 struct Crescendo
 {
index ea4ce9be63ecd2446ab14a7c409e97bc564b5ce6..075bf3fdc7c9645a931eb8567bdc5ca2e938bfb1 100644 (file)
 
 
 
 
 
 
-/**
-  The dots to go with a notehead/rest.  A separate class, since they
-  are a party in collision resolution.
-
-  properties:
-
-  dot-count -- number of dots.
-
-  
-  */
-class Dots                     // interface
+class Dots
 {
 public:
   DECLARE_SCHEME_CALLBACK(quantised_position_callback, (SCM element, SCM axis));
 {
 public:
   DECLARE_SCHEME_CALLBACK(quantised_position_callback, (SCM element, SCM axis));
index 812a442e295d91cbb69f9c570c4a535bf6c9cbeb..e367a4dbc86c12275e097ed887064e92c464ab21 100644 (file)
 #include "lily-guile.hh"
 #include "lily-proto.hh"
 
 #include "lily-guile.hh"
 #include "lily-proto.hh"
 
-/*
-  horizontal-space -- amount of space to add after a note (in staff-space)
- */
-
 class Grace_align_item
 {
 public:
 class Grace_align_item
 {
 public:
index fba4ed4c263543c9bf62ba9d33bdf125a2d2b1ff..8d8b90f4835c01150c20871cc60c45927a1eeac9 100644 (file)
@@ -9,27 +9,6 @@
 
 #include "spanner.hh"
 
 
 #include "spanner.hh"
 
-/** 
-  centred hyphen 
-
-  A centred hyphen is a simple line between lyrics used to
-  divide syllables.
-
-  The length of the hyphen line should stretch based on the
-  size of the gap between syllables.
-
-properties:
-
-  thickness -- thickness of line (in stafflinethickness)
-
-  height -- vertical offset  (in staffspace)
-
-  minimum-length -- try to make the hyphens at least this long. Also works
-    as a scaling parameter for the length
-
-  word-space -- elongate left by this much (FIXME: cumbersome semantics)
-  
-  */
 struct Hyphen_spanner 
 {
 public:
 struct Hyphen_spanner 
 {
 public:
index 706f65530fd915a26d922493c9bd5473b44ecc83..3f48ff410dba285f2260ef48828c9acd3a2ad34c 100644 (file)
 #include "lily-proto.hh"
 
 /**
 #include "lily-proto.hh"
 
 /**
-  A group of  accidentals.
 
 
-  Properties:
 
 
-  c0-position -- integer indicating the position of central C?
+  Properties:
 
 
-  old-accidentals -- list of (pitch, accidental) pairs
 
 
-  new-accidentals -- list of (pitch, accidental) pairs
  */
 struct Key_item
 {
  */
 struct Key_item
 {
index 0bcb9d2e8dbabde1ac3bc00c3b0a4e2f89ebbc95..902f8c507fb5c394071a38a5b2a71467054ae71a 100644 (file)
@@ -20,6 +20,12 @@ unsmob_ ## name ( SCM s)                     \
 return  CL::unsmob (s);                                \
 }
 
 return  CL::unsmob (s);                                \
 }
 
+#define IMPLEMENT_TYPE_P(CL, FUNCNAME)\
+void init_type_p_ ## CL ()\
+{\
+  scm_make_gsubr (FUNCNAME, 1, 0, 0, (Scheme_function_unknown) CL::smob_p);\
+}\
+ADD_SCM_INIT_FUNC(init_type_p_ ## CL, init_type_p_ ## CL)
 
 #ifndef SCM_CELL_TYPE
 #define SCM_CELL_TYPE(X) SCM_CAR(X)
 
 #ifndef SCM_CELL_TYPE
 #define SCM_CELL_TYPE(X) SCM_CAR(X)
@@ -32,6 +38,15 @@ return  CL::unsmob (s);                              \
 
 #define IMPLEMENT_SIMPLE_SMOBS(CL)                             \
 long CL::smob_tag_;                                            \
 
 #define IMPLEMENT_SIMPLE_SMOBS(CL)                             \
 long CL::smob_tag_;                                            \
+SCM                                                            \
+CL::smob_p (SCM s)                                             \
+{                                                              \
+  if (SCM_NIMP(s) && SCM_CELL_TYPE(s) == smob_tag_)            \
+    return SCM_BOOL_T;                                         \
+  else                                                         \
+    return SCM_BOOL_F;                                         \
+                                                               \
+}                                                              \
 void                                                           \
 CL::init_smobs ()                                              \
 {                                                              \
 void                                                           \
 CL::init_smobs ()                                              \
 {                                                              \
index 1204a3befc1c37d77221f23d9cc1fd4381db2c50..a8926002e86e5e1bdaeec3748f787dc0ede38904 100644 (file)
 
 #include "spanner.hh"
 
 
 #include "spanner.hh"
 
-/** 
-  simple extender line 
-
-  The extender is a simple line at the baseline of the lyric
-  that helps show the length of a melissima (tied/slurred note).
+/*
 
   Extenders must be entered manually for now.
 
 
   Extenders must be entered manually for now.
 
   extend beond, lasting the whole duration of the melissima
   (as in MUP, urg).
 
   extend beond, lasting the whole duration of the melissima
   (as in MUP, urg).
 
-  Properties:
-  
-  word-space --
 
 
-  height -- in stafflinethickness
+ */
 
 
-  right-trim-amount --
-  
-  */
-class Lyric_extender // interface
+class Lyric_extender
 {
 public:
   Spanner*elt_l_;
 {
 public:
   Spanner*elt_l_;
index d516dbfd96d9d733cc3298436a5ba38d230afe8f..c53350773dc23de046f106351220194934c9a864 100644 (file)
 #include "lily-proto.hh"
 #include "lily-guile.hh"
 #include "rod.hh"
 #include "lily-proto.hh"
 #include "lily-guile.hh"
 #include "rod.hh"
-/*
-  properties:
 
 
-  columns -- list of paper-columns
-
- expand-limit -- int : max number of measures expanded in church rests
-
- minimum-width -- Real in staffspace
-
- padding -- staffspace
-*/
 class Multi_measure_rest
 {
 public:
 class Multi_measure_rest
 {
 public:
index c38fd7fee94ef87bc5110434e448e9aae1aa506d..5fb7299a69cbfc8c4730ce39a97a44e15116e9b0 100644 (file)
@@ -15,8 +15,6 @@
 #include "duration.hh"
 #include "musical-pitch.hh"
 #include "array.hh"
 #include "duration.hh"
 #include "musical-pitch.hh"
 #include "array.hh"
-#include "protected-scm.hh"
-
 
 /** a request with a duration.
   This request is used only used as a base class.
 
 /** a request with a duration.
   This request is used only used as a base class.
@@ -52,9 +50,6 @@ struct Tremolo_req : public Request {
   */
 class Lyric_req : public Rhythmic_req
 {
   */
 class Lyric_req : public Rhythmic_req
 {
-public:
-  Protected_scm text_;
-
 protected:
   VIRTUAL_COPY_CONS (Music);
 };
 protected:
   VIRTUAL_COPY_CONS (Music);
 };
@@ -72,9 +67,6 @@ protected:
 
 class Text_script_req : public Script_req
 {
 
 class Text_script_req : public Script_req
 {
-public:
-  Protected_scm text_;
-
 protected:
   VIRTUAL_COPY_CONS (Music);
   virtual bool do_equal_b (Request const*) const;
 protected:
   VIRTUAL_COPY_CONS (Music);
   virtual bool do_equal_b (Request const*) const;
@@ -82,9 +74,6 @@ protected:
 
 class Dynamic_script_req : public Script_req
 {
 
 class Dynamic_script_req : public Script_req
 {
-public:
-  Protected_scm text_;
-
 protected:
   VIRTUAL_COPY_CONS (Music);
 };
 protected:
   VIRTUAL_COPY_CONS (Music);
 };
index 6703c443bb90fc18a155cdca3dc9cd5ab181664f..0a2f95efb04a1984cd9437181d87f12e8ef4e732 100644 (file)
@@ -15,8 +15,6 @@
     NoteHead is a kind of RhythmicHead, see there.
 
   Read-only:
     NoteHead is a kind of RhythmicHead, see there.
 
   Read-only:
-  
-  style -- symbol that sets note head style
 */
 
 class Note_head 
 */
 
 class Note_head 
index 5633cb0fb236e48d8845d0fc2d9b30045479b5ce..cc4778ddddfcff7b5b4d75cf92927bfc3c169460 100644 (file)
 #include "rod.hh"
 #include "spring.hh"
 
 #include "rod.hh"
 #include "spring.hh"
 
-/**
-   bounded-by-me -- list of elts.
-
-   shortest-starter-duration -- rational signifying shortest moment that starts here
-
-
-   Interfaces:
-
-   axis-group, spaceable-element.
-  */
-
 class Paper_column : public Item
 { 
 public:
 class Paper_column : public Item
 { 
 public:
index 051bdaf98990cc34f68a7bca629a9fa01b9fd444..f623aa3bfeb373c2e3dd3a73586c24cff7da8f34 100644 (file)
 
 #include "lily-guile.hh"
 
 
 #include "lily-guile.hh"
 
-/**
-   A pause.
-
-   See also Rhythmic_head, Staff_symbol_referencer.
-   
-   Read-only properties:
-
-   style -- string specifying glyph style
- */
 class  Rest
 {
 public:
 class  Rest
 {
 public:
index 50b1b87187f11a2265f8de8a608a9f937db047ed..1c222f873cb70ff52fadb1e647d160d4fdbbe6de 100644 (file)
 #include "lily-guile.hh"
 #include "lily-proto.hh"
 
 #include "lily-guile.hh"
 #include "lily-proto.hh"
 
-/*
-  Properties
-  
-  dot -- reference to Dots object.
-
-  stem -- pointer to Stem object
-
-  Read-only
-
-  duration-log -- 2-log of the notehead duration
-
-*/
 class Rhythmic_head
 {
 public:
 class Rhythmic_head
 {
 public:
index db67e1914356c617c8552ed329b9edeb3b89100e..6c9cb6e5ed1de644ce086cb2b16d878e86e10bfc 100644 (file)
 #include "spanner.hh"
 #include "item.hh"
 
 #include "spanner.hh"
 #include "item.hh"
 
-
-
-
-
 /**
    Position victim object (ELT_L_) next to other objects (the support).
 
    side-support -- list of score elements
 
 /**
    Position victim object (ELT_L_) next to other objects (the support).
 
    side-support -- list of score elements
 
-   direction -- where to put the victim object (left or right?)
-
-   side-relative-direction -- if set: get the direction from a different object, and multiply by this.
-   
    direction-source -- in case side-relative-direction is set, where
    direction-source -- in case side-relative-direction is set, where
-   to get the direction
+     to get the direction
 
 
-   minimum-space -- minimum distance that the victim should move
-   (after padding)
-
-   padding -- add this much extra space between victim and support
-
-   self-alignment-X -- real number: -1 = left aligned, 0 = center, 1
-     right-aligned in X direction.
-
-     Set to an element pointer, if you want that element to be the center. 
-     
-   self-alignment-Y -- like self-alignment-X but for Y axis
-   
    TODO: move  out unrelated callbacks.
 
    TODO: reduce number of methods.
    TODO: move  out unrelated callbacks.
 
    TODO: reduce number of methods.
-
 */
 struct Side_position
 {
 */
 struct Side_position
 {
index 82f5b9a1251c555925ce04252798e0a512473d45..c788b68e0f07156a3ca89869c0c112b74cdf81f6 100644 (file)
 #include "rod.hh"
 
 /**
 #include "rod.hh"
 
 /**
-
-   de-uglify-parameters -- list of 3 real constants. They define the
-     valid areas for the middle control points. Used in de_uglyfy.
-     They are a bit empirical.
-
-   details -- alist containing contaning a few magic constants.
-
-   note-columns -- list of elt pointers to note columns.
-
-   attachment -- cons of symbols, '(LEFT-TYPE . RIGHT-TYPE), where
-     both types may be alongside-stem, stem, head or loose-end
-   
-   direction -- up or down?
-
-   y-free -- ? 
-   
-   control-points --
-
-   
-   
-   Read-only
-   =========
-   
-   extremity-rules --
-
-   extremity-offset-alist --
-
-   thickness --
-
-   dash -- number representing the length of the dashes.
 */
 class Slur
 {
 */
 class Slur
 {
index c881c05ad6215d37244930c9f8f2be45613e9a07..3c46977016e7524ba27612e76686b42571acae45 100644 (file)
@@ -111,6 +111,7 @@ private:\
 public: \
        static SCM equal_p (SCM a, SCM b);\
        static CL * unsmob (SCM);\
 public: \
        static SCM equal_p (SCM a, SCM b);\
        static CL * unsmob (SCM);\
+       static SCM smob_p (SCM);\
        static void init_smobs();                               \
 private:
 
        static void init_smobs();                               \
 private:
 
index 577f8902e1f842329d02305697aa15f88abb59f7..03489cd81050c4b7ed2ba20001c1fe1be97a3012 100644 (file)
 #include "lily-guile.hh"
 #include "lily-proto.hh"
 
 #include "lily-guile.hh"
 #include "lily-proto.hh"
 
-/*
-  properties :
-
-  minimum-distances -- list of rods (ie. (OBJ . DIST) pairs)
-
-  ideal-distances -- (OBJ . (DIST . STRENGTH)) pairs
-  
-  dir-list -- list of stem directions.
- */
 struct Spaceable_element
 {
   /// set a minimum distance
 struct Spaceable_element
 {
   /// set a minimum distance
index f0f81dde7612c38c72117665dd79cede71db83ac..7f678043eee3b7d4a1e82af8f984540a9bfc0b85 100644 (file)
 
 #include "spanner.hh"
 
 
 #include "spanner.hh"
 
-/**
-   Read-only properties
-
-   maximum-duration-for-spacing -- rational: space as if a duration of
-     this type is available in this measure.
-
-
-   
-   Read properties from paper-column
-
-   dir-list -- list of stem directions
-
-   shortest-playing-duration -- duration of the shortest playing in that column.
-
-   shortest-starter-duration -- duration of the shortest notes that starts
-     exactly in that column.
-
-   contains-grace -- boolean. Used to widen entries for grace notes.
-
-   extra-space --  pair of distances
-
-   stretch-distance -- pair of distances
- */
 class Spacing_spanner
 {
 public:
 class Spacing_spanner
 {
 public:
index 9b942fada0974256aba43f60133d929e82584410..880eb0dba009dfcb02f65563c6a81bc1fe1441dd 100644 (file)
    This is a barline that is spanned across other bar lines.  This is
    the implementation of the long barlines that occur in orchestral
    score and other multi-staff music.
    This is a barline that is spanned across other bar lines.  This is
    the implementation of the long barlines that occur in orchestral
    score and other multi-staff music.
-
-   TODO: Is this usable for other stuff besides barlines? We only have
-   to span a Score_element.  Perhaps this can be used for large time
-   sigs?
 */
 class Span_bar
 {
 */
 class Span_bar
 {
index 5bcf6196a7e182f4b79e850f30a6c664b10999e0..ce78e12711198710727ac539dbf29bcc81a4f574 100644 (file)
@@ -13,9 +13,6 @@
 #include "lily-guile.hh"
 
 /**
 #include "lily-guile.hh"
 
 /**
-  This spanner draws the lines of a pstaff.
-  The bottom line is position 0.
-
   TODO: add stafflinethickness as parameter.
   */
 class Staff_symbol 
   TODO: add stafflinethickness as parameter.
   */
 class Staff_symbol 
index 81ef981d10b128652a05d08c4bff109d964d7cdf..11fa9dda0c0bf90d4e89281201dc2d052ef8dc9e 100644 (file)
@@ -13,9 +13,6 @@
 #include "lily-proto.hh"
 #include "lily-guile.hh"
 
 #include "lily-proto.hh"
 #include "lily-guile.hh"
 
-/*
-  stem -- pointer to the stem object.
- */
 class Stem_tremolo
 {
 public:
 class Stem_tremolo
 {
 public:
index a5553555a9fb2d5211b4319e358b98335d0f7d0f..7155dfbba86397d5f4c479ae829969bbc8546bae 100644 (file)
@@ -14,9 +14,6 @@
 #include "lily-proto.hh"
 
 
 #include "lily-proto.hh"
 
 
-/*
-  heads -- pair of element pointers, pointing to the two heads of the
-  tie.  */
 class Tie
 {
 public:
 class Tie
 {
 public:
index 6bf3608531a04f26a21b1b9b78e7d525cc32402e..3619fe0e4cbc00e8eb3b4be2d57f104e3ffd887a 100644 (file)
 
 #include "spanner.hh"
 
 
 #include "spanner.hh"
 
-/** Volta bracket with number
-
-properties:
-
-bars -- list of barline ptrs.
-
-thickness -- in stafflinethickness
-
-height -- in staffspace 
-
+/** 
 */
 
 class Volta_spanner
 */
 
 class Volta_spanner
index fe69dea3ed5a6879571afd8ecbdfe591937d1340..c0af7c4fd8ba8c22c5b1cec6a8a3c0ca52ed5846 100644 (file)
@@ -43,7 +43,7 @@ Lyric_engraver::do_process_music()
     {
       text_p_=  new Item (get_property ("LyricText"));
       
     {
       text_p_=  new Item (get_property ("LyricText"));
       
-      text_p_->set_elt_property ("text", req_l_->text_);
+      text_p_->set_elt_property ("text", req_l_->get_mus_property ("text"));
 
       /*
        We can't reach the notehead where we're centered from here. So
 
       /*
        We can't reach the notehead where we're centered from here. So
index 1ba885ff19a80af32a5558d4059c32042f21c055..4557f43076481c043189dd39fba1340da4d06cd5 100644 (file)
@@ -22,11 +22,12 @@ void
 Lyric_performer::do_process_music ()
 {
   // FIXME: won't work with fancy lyrics
 Lyric_performer::do_process_music ()
 {
   // FIXME: won't work with fancy lyrics
-  if (lreq_arr_.size () && gh_string_p (lreq_arr_[0]->text_)
-      && ly_scm2string (lreq_arr_[0]->text_).length_i ())
+  if (lreq_arr_.size ()
+      && gh_string_p (lreq_arr_[0]->get_mus_property ("text"))
+      && ly_scm2string (lreq_arr_[0]->get_mus_property ("text")).length_i ())
     {
       audio_p_ = new Audio_text (Audio_text::LYRIC,
     {
       audio_p_ = new Audio_text (Audio_text::LYRIC,
-                                ly_scm2string (lreq_arr_[0]->text_));
+                                ly_scm2string (lreq_arr_[0]->get_mus_property ("text")));
       Audio_element_info info (audio_p_, lreq_arr_[0]);
       announce_element (info);
     }
       Audio_element_info info (audio_p_, lreq_arr_[0]);
       announce_element (info);
     }
index eeada948563860f7cb47457961907211068c121a..629870d6c305b511d608c47ada812309936fc383 100644 (file)
@@ -67,7 +67,8 @@ void
 Mark_engraver::acknowledge_element (Score_element_info inf)
 {
   Score_element * s = inf.elem_l_;
 Mark_engraver::acknowledge_element (Score_element_info inf)
 {
   Score_element * s = inf.elem_l_;
-  if (Staff_symbol::has_interface (s))
+  if (Staff_symbol::has_interface (s)
+      || to_boolean (s->get_elt_property ("invisible-staff")))
     {
       SCM sts = get_property ("staffsFound");
       SCM thisstaff = inf.elem_l_->self_scm ();
     {
       SCM sts = get_property ("staffsFound");
       SCM thisstaff = inf.elem_l_->self_scm ();
index c3ebbf02c9028f252210701d462d6b7b4cf94e28..ff21fb5ebffbf6f5a3a9befe24a4da8bdcc6c41c 100644 (file)
@@ -15,7 +15,7 @@
 
 IMPLEMENT_UNSMOB(Moment,moment);
 IMPLEMENT_SIMPLE_SMOBS(Moment);
 
 IMPLEMENT_UNSMOB(Moment,moment);
 IMPLEMENT_SIMPLE_SMOBS(Moment);
-
+IMPLEMENT_TYPE_P (Moment, "moment?");
 
 SCM
 Moment::mark_smob (SCM)
 
 SCM
 Moment::mark_smob (SCM)
@@ -67,6 +67,7 @@ void
 init_moments ()
 {
   scm_make_gsubr ("make-moment", 2 , 0, 0, (Scheme_function_unknown) make_rational);
 init_moments ()
 {
   scm_make_gsubr ("make-moment", 2 , 0, 0, (Scheme_function_unknown) make_rational);
+  scm_make_gsubr ("make-moment", 2 , 0, 0, (Scheme_function_unknown) make_rational);  
 }
 
 ADD_SCM_INIT_FUNC(moms,init_moments);
 }
 
 ADD_SCM_INIT_FUNC(moms,init_moments);
index d91e6d35ec12abad9c815af85c9c127d288e2c6e..81183d7d29dc098b3f87b72e67257c658d9d2843 100644 (file)
@@ -114,7 +114,8 @@ bool
 Text_script_req::do_equal_b (Request const* r) const
 {
   Text_script_req const* t  = dynamic_cast<Text_script_req const*> (r);
 Text_script_req::do_equal_b (Request const* r) const
 {
   Text_script_req const* t  = dynamic_cast<Text_script_req const*> (r);
-  return t && gh_equal_p (text_, t->text_);
+  return t && gh_equal_p (get_mus_property ("text"),
+                         t->get_mus_property ("text"));
 }
 
 
 }
 
 
index a20e1df14a7662d8909cc02a2707b97bee7b9323..1f0033f86f2383adfe9780dab2a3fcf01f26ba7b 100644 (file)
@@ -44,6 +44,7 @@ static Keyword_ent the_key_tab[]={
   {"denies", DENIES},
   {"duration", DURATION},
   {"dynamicscript", DYNAMICSCRIPT},
   {"denies", DENIES},
   {"duration", DURATION},
   {"dynamicscript", DYNAMICSCRIPT},
+  {"elementdescriptions", ELEMENTDESCRIPTIONS},
   {"font", FONT},
   {"grace", GRACE},
   {"header", HEADER},
   {"font", FONT},
   {"grace", GRACE},
   {"header", HEADER},
index 1ac8e9b9e9969633ab74f701950526d5b9a16250..a0fab227267ca36799e47bbf6d39e0eb4b0d7c5c 100644 (file)
@@ -141,6 +141,7 @@ yylex (YYSTYPE *s,  void * v_l)
 %token CM_T
 %token CONSISTS
 %token SEQUENTIAL
 %token CM_T
 %token CONSISTS
 %token SEQUENTIAL
+%token ELEMENTDESCRIPTIONS
 %token SIMULTANEOUS
 %token CONSISTSEND
 %token DENIES
 %token SIMULTANEOUS
 %token CONSISTSEND
 %token DENIES
@@ -460,6 +461,12 @@ translator_spec_body:
        | translator_spec_body CONSISTS STRING semicolon {
                unsmob_translator_def ($$)->add_element ($3);
        }
        | translator_spec_body CONSISTS STRING semicolon {
                unsmob_translator_def ($$)->add_element ($3);
        }
+       | translator_spec_body ELEMENTDESCRIPTIONS embedded_scm {
+               for (SCM p = $3; gh_pair_p (p); p = gh_cdr (p))
+                       unsmob_translator_def ($$)
+                       ->add_property_assign (scm_symbol_to_string (gh_caar (p)), gh_cdar (p));
+
+       }
        | translator_spec_body CONSISTSEND STRING semicolon {
                unsmob_translator_def ($$)->add_last_element ( $3);
        }
        | translator_spec_body CONSISTSEND STRING semicolon {
                unsmob_translator_def ($$)->add_last_element ( $3);
        }
@@ -1059,13 +1066,13 @@ verbose_request:
        }
        | DYNAMICSCRIPT embedded_scm {
                Dynamic_script_req *d = new Dynamic_script_req;
        }
        | DYNAMICSCRIPT embedded_scm {
                Dynamic_script_req *d = new Dynamic_script_req;
-               d->text_ = $2;
+               d->set_mus_property ("text", $2);
                d->set_spot (THIS->here_input ());
                $$ = d;
        }
        | TEXTSCRIPT embedded_scm {
                Text_script_req *t = new Text_script_req;
                d->set_spot (THIS->here_input ());
                $$ = d;
        }
        | TEXTSCRIPT embedded_scm {
                Text_script_req *t = new Text_script_req;
-               t->text_ = $2;
+               t->set_mus_property ("text", $2);
                t->set_spot (THIS->here_input ());
                $$ = t;
        }
                t->set_spot (THIS->here_input ());
                $$ = t;
        }
@@ -1232,13 +1239,13 @@ open_request_parens:
 gen_text_def:
        embedded_scm {
                Text_script_req *t = new Text_script_req;
 gen_text_def:
        embedded_scm {
                Text_script_req *t = new Text_script_req;
-               t->text_ = $1;  
+               t->set_mus_property ("text", $1);
                t->set_spot (THIS->here_input ());
                $$ = t;
        }
        | string {
                Text_script_req *t = new Text_script_req;
                t->set_spot (THIS->here_input ());
                $$ = t;
        }
        | string {
                Text_script_req *t = new Text_script_req;
-               t->text_ = $1;
+               t->set_mus_property ("text", $1);
                t->set_spot (THIS->here_input ());
                $$ = t;
        }
                t->set_spot (THIS->here_input ());
                $$ = t;
        }
@@ -1247,8 +1254,9 @@ gen_text_def:
                  Maybe use Finger_script_request?
                */
                Text_script_req* t = new Text_script_req;
                  Maybe use Finger_script_request?
                */
                Text_script_req* t = new Text_script_req;
-               t->text_ = gh_cons (ly_symbol2scm ("finger"),
-                       ly_str02scm (to_str ($1).ch_C ()));
+               t->set_mus_property ("text", 
+                       gh_cons (ly_symbol2scm ("finger"),
+                               ly_str02scm (to_str ($1).ch_C ())));
                t->set_spot (THIS->here_input ());
                $$ = t;
        }
                t->set_spot (THIS->here_input ());
                $$ = t;
        }
@@ -1433,7 +1441,7 @@ simple_element:
                else
                        THIS->pop_spot ();
                Lyric_req* lreq_p = new Lyric_req;
                else
                        THIS->pop_spot ();
                Lyric_req* lreq_p = new Lyric_req;
-               lreq_p ->text_ = $1;
+                lreq_p->set_mus_property ("text", $1);
                lreq_p->duration_ = *$3;
                lreq_p->set_spot (THIS->here_input());
                Simultaneous_music* velt_p = new Request_chord (gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
                lreq_p->duration_ = *$3;
                lreq_p->set_spot (THIS->here_input());
                Simultaneous_music* velt_p = new Request_chord (gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
index 9877b430ecb83ce248c5734a78c3cc227f591eb6..2b511ff26166c68adbf2f6764345772308bf6c2e 100644 (file)
@@ -118,12 +118,13 @@ Property_engraver::apply_properties (SCM p, Score_element *e, Translator_group*o
 
          SCM errport = scm_current_error_port ();
          scm_display (prop_sym, errport);
 
          SCM errport = scm_current_error_port ();
          scm_display (prop_sym, errport);
-         scm_puts (" is deprecated. Use\n \\property ", errport);
+         scm_puts (_(" is deprecated. Use\n \\property ").ch_C(), errport);
 
 
-         SCM name = e->get_elt_property ("name");
          scm_puts (origin->type_str_.ch_C(), errport);
          scm_puts (".", errport);
          
          scm_puts (origin->type_str_.ch_C(), errport);
          scm_puts (".", errport);
          
+         SCM name = e->get_elt_property ("meta");
+         name = scm_assoc (ly_symbol2scm ("name"), name);
          scm_display (name, errport);
          scm_puts(" \\push #'",errport);
          scm_display (elt_prop_sym,errport);
          scm_display (name, errport);
          scm_puts(" \\push #'",errport);
          scm_display (elt_prop_sym,errport);
index a19df5c7d0807c352af97dfb4b63b27c1a6c0daf..4a4c59d60da5972de8767809233786472562ac12 100644 (file)
@@ -84,6 +84,11 @@ Score_element::Score_element(SCM basicprops)
     
     dim_cache_[a].dimension_ = cb;
   }
     
     dim_cache_[a].dimension_ = cb;
   }
+
+  SCM meta = get_elt_property ("meta");
+  SCM ifs = scm_assoc (ly_symbol2scm ("interfaces"), meta);
+  
+  set_elt_property ("interfaces",gh_cdr (ifs));
 }
 
 
 }
 
 
@@ -605,6 +610,9 @@ Score_element::extent (Score_element * refp, Axis a) const
   else
     return ext;
 
   else
     return ext;
 
+  if (!gh_pair_p (d->dimension_))
+    return ext;
+  
   ext = ly_scm2interval (d->dimension_);
 
   SCM extra = get_elt_property (a == X_AXIS
   ext = ly_scm2interval (d->dimension_);
 
   SCM extra = get_elt_property (a == X_AXIS
@@ -675,9 +683,10 @@ Score_element::common_refpoint (SCM elist, Axis a) const
 String
 Score_element::name () const
 {
 String
 Score_element::name () const
 {
-  SCM nm = get_elt_property ("name");
-  
-  return  nm == SCM_EOL ? classname (this) :ly_scm2string (nm) ;  
+  SCM meta = get_elt_property ("meta");
+  SCM nm = scm_assoc (ly_symbol2scm ("name"), meta);
+  nm =  (gh_pair_p (nm)) ? gh_cdr (nm) : SCM_EOL;
+  return  gh_string_p (nm) ?ly_scm2string (nm) :  classname (this);  
 }
 
 void
 }
 
 void
@@ -878,7 +887,7 @@ static void
 init_functions ()
 {
   interfaces_sym = scm_permanent_object (ly_symbol2scm ("interfaces"));
 init_functions ()
 {
   interfaces_sym = scm_permanent_object (ly_symbol2scm ("interfaces"));
-  
+
   scm_make_gsubr ("ly-get-elt-property", 2, 0, 0, (Scheme_function_unknown)ly_get_elt_property);
   scm_make_gsubr ("ly-set-elt-property", 3, 0, 0, (Scheme_function_unknown)ly_set_elt_property);
   scm_make_gsubr ("ly-get-spanner-bound", 2 , 0, 0, (Scheme_function_unknown) spanner_get_bound);
   scm_make_gsubr ("ly-get-elt-property", 2, 0, 0, (Scheme_function_unknown)ly_get_elt_property);
   scm_make_gsubr ("ly-set-elt-property", 3, 0, 0, (Scheme_function_unknown)ly_set_elt_property);
   scm_make_gsubr ("ly-get-spanner-bound", 2 , 0, 0, (Scheme_function_unknown) spanner_get_bound);
@@ -906,4 +915,4 @@ Score_element::set_interface (SCM k)
 
 
 ADD_SCM_INIT_FUNC(scoreelt, init_functions);
 
 
 ADD_SCM_INIT_FUNC(scoreelt, init_functions);
-
+IMPLEMENT_TYPE_P(Score_element, "ly-element?");
index 37cac89a5e29e8a316c4bc4461241b0bbe7b59a3..f2478b56c4c728882397bc89f8a554aa641f69d1 100644 (file)
@@ -78,4 +78,5 @@ Spaceable_element::remove_interface (Score_element*me)
 void
 Spaceable_element::set_interface (Score_element*me)
 {
 void
 Spaceable_element::set_interface (Score_element*me)
 {
+  me->set_interface (ly_symbol2scm ("spaceable-element-interface"));
 }
 }
index 5ae4d1295d5dad78283ab0b245cda19c98836d53..d90b51df2479c92d4e9dd7e614d5e8f824558f02 100644 (file)
@@ -10,7 +10,6 @@
 #include "lily-guile.hh"
 #include "item.hh"
 #include "arpeggio.hh"
 #include "lily-guile.hh"
 #include "item.hh"
 #include "arpeggio.hh"
-#include "span-arpeggio.hh"
 #include "group-interface.hh"
 #include "side-position-interface.hh"
 #include "staff-symbol-referencer.hh"
 #include "group-interface.hh"
 #include "side-position-interface.hh"
 #include "staff-symbol-referencer.hh"
index 79113f421e3ed9949ce7d535b756fb1fd563d9a1..232269182510925be878c96cadcdb2ad67feebce 100644 (file)
@@ -126,7 +126,7 @@ Text_engraver::do_process_music ()
       if (r->get_direction ())
        Side_position::set_direction (text, r->get_direction ());
       
       if (r->get_direction ())
        Side_position::set_direction (text, r->get_direction ());
       
-      text->set_elt_property ("text", r->text_);
+      text->set_elt_property ("text", r->get_mus_property ("text"));
       
       SCM nonempty = get_property ("textNonEmpty");
       if (to_boolean (nonempty))
       
       SCM nonempty = get_property ("textNonEmpty");
       if (to_boolean (nonempty))
index 82d840a5e879746db0a34a4026237ac2c469dbdb..cfd1bd292fecabd81a96106eca9ffeaef7c705f7 100644 (file)
 #include "staff-symbol-referencer.hh"
 
 /*
 #include "staff-symbol-referencer.hh"
 
 /*
-  Generic Text spanner:
-
-  type: "line", "dashed-line", "dotted-line"
-  edge-text: ("le" . "re")
-  text-style: "italic"
-  egde-height: (lh . rh)
-
-  "le"--------------"re"
-                    |^ 
-                    |v rh
-
-  fine tuning:
-
-  dash-period 
-  dash-length 
-  line-thickness
-
   TODO:
     - vertical start / vertical end (fixme-name) |
     - contination types (vert. star, vert. end)  |-> eat volta-spanner
   TODO:
     - vertical start / vertical end (fixme-name) |
     - contination types (vert. star, vert. end)  |-> eat volta-spanner
@@ -167,7 +150,7 @@ Text_spanner::brew_molecule (SCM smob)
       if (gh_pair_p (s))
        {
          Direction d = LEFT;
       if (gh_pair_p (s))
        {
          Direction d = LEFT;
-         int dir = me->get_elt_property ("direction");
+         int dir = to_dir (me->get_elt_property ("direction"));
          do
            {
              Real dy = gh_scm2double (index_cell (s, d)) * - dir;
          do
            {
              Real dy = gh_scm2double (index_cell (s, d)) * - dir;
index 4d68c240747982d982756037a5c306f6135b2f79..9da8e66885c44e1413bc9b93cf59c50e3f1aff06 100644 (file)
@@ -19,7 +19,7 @@
 void
 Tie_column::set_interface (Score_element*me)
 {
 void
 Tie_column::set_interface (Score_element*me)
 {
-  me->set_interface (ly_symbol2scm ("tie-column"));
+  me->set_interface (ly_symbol2scm ("tie-column-interface"));
   me->set_extent_callback (SCM_EOL, X_AXIS);
   me->set_extent_callback (SCM_EOL, Y_AXIS) ; 
 }
   me->set_extent_callback (SCM_EOL, X_AXIS);
   me->set_extent_callback (SCM_EOL, Y_AXIS) ; 
 }
@@ -27,7 +27,7 @@ Tie_column::set_interface (Score_element*me)
 bool
 Tie_column::has_interface (Score_element*me)
 {
 bool
 Tie_column::has_interface (Score_element*me)
 {
-  return  me->has_interface (ly_symbol2scm ("tie-column"));
+  return  me->has_interface (ly_symbol2scm ("tie-column-interface"));
 }
 
 void
 }
 
 void
index 24416817d00941fb8a32113d78cbf357e636f99a..6b735ad953232e7c317320ae2bd279c9013c6855 100644 (file)
@@ -343,9 +343,51 @@ Translator_group::execute_single_pushpop_property (SCM prop, SCM eltprop, SCM va
           */
          if (gh_pair_p (prev) || prev == SCM_EOL)
            {
           */
          if (gh_pair_p (prev) || prev == SCM_EOL)
            {
+             bool ok = true;
+             
+             SCM errport = scm_current_error_port ();
+             
+             SCM meta = scm_assoc (ly_symbol2scm ("meta"), prev);
+             SCM props = scm_assoc (ly_symbol2scm ("properties"), gh_cdr (meta));
+             SCM propdesc = scm_assoc (eltprop, gh_cdr (props));
+             if (!gh_pair_p (propdesc))
+               {
+                 scm_puts (_("Couldn't find property description for #'").ch_C(),errport);
+                 scm_display (eltprop, errport);
+
+                 scm_puts (_(" in element description ").ch_C(),errport);
+                 scm_display (prop, errport);
+
+                 scm_puts (_(". Perhaps you made a typing error?\n").ch_C(),errport);            
+               }
+             else
+               {
+                 
+                 SCM predicate = gh_cadr (propdesc);
+                 if (gh_call1 (predicate, val) == SCM_BOOL_F)
+                   {
+                     ok = false;
+                     scm_puts (_("Failed typecheck for #'").ch_C (),errport);
+                     scm_display (eltprop,errport);
+                     scm_puts ( _(", value ").ch_C (), errport);
+                     scm_display (val, errport);
+                     scm_puts (_(" must satisfy ").ch_C (), errport);
+                     scm_display (predicate, errport);
+                     scm_puts ("\n", errport);               
+                   }
+               }
+
+             if (ok)
+               {
                  prev = gh_cons (gh_cons (eltprop, val), prev);
                  set_property (prop, prev);
                  prev = gh_cons (gh_cons (eltprop, val), prev);
                  set_property (prop, prev);
+               }
            }
            }
+         else
+           {
+             // warning here.
+           }
+         
        }
       else
        {
        }
       else
        {
index bab60b66f467c892ada155269acfc36341507113..673620ddf8ed37424b7c5b4dacd95a7cb32e405d 100644 (file)
@@ -1,10 +1,3 @@
-%{
- chord modifiers
-%}
-
-% UGR 
-#(eval-string (ly-gulp-file "chord-names.scm"))
-
 
 % urg!
 %
 
 % urg!
 %
index 230ea0d8b89f5e4573fa40fb5f0485ba038cc4fc..b2781c3dd2db7275916f474b7fefcb83ecec7b29 100644 (file)
@@ -2,20 +2,10 @@ breve = \duration #'( -1 0)
 longa = \duration #'( -2 0 )
 maxima = \duration #'( -3 0 )
 
 longa = \duration #'( -2 0 )
 maxima = \duration #'( -3 0 )
 
-
-#(begin
-  (eval-string (ly-gulp-file "slur.scm"))
-  (eval-string (ly-gulp-file "font.scm"))
-  (eval-string (ly-gulp-file "generic-property.scm"))
-  (eval-string (ly-gulp-file "basic-properties.scm"))
- )
-
 \include "nederlands.ly"               % dutch
 \include "chord-modifiers.ly"
 \include "script.ly"
 
 \include "nederlands.ly"               % dutch
 \include "chord-modifiers.ly"
 \include "script.ly"
 
-
-
 % declarations for standard directions
 left = -1
 right = 1
 % declarations for standard directions
 left = -1
 right = 1
@@ -25,7 +15,6 @@ start = -1
 stop = 1
 smaller = -1
 bigger = 1
 stop = 1
 smaller = -1
 bigger = 1
-
 center=0
 
 break =  \penalty  -1000000; 
 center=0
 
 break =  \penalty  -1000000; 
@@ -34,10 +23,8 @@ nobreak =  \penalty 1000000;
 
 melisma = \property Staff.melismaBusy = ##t
 melismaEnd = \property Staff.melismaBusy = ##f
 
 melisma = \property Staff.melismaBusy = ##t
 melismaEnd = \property Staff.melismaBusy = ##f
-
-
-
 papersize = "a4"
 papersize = "a4"
+
 \include "engraver.ly"
 \include "generic-paper.ly"
 \include "paper20.ly"
 \include "engraver.ly"
 \include "generic-paper.ly"
 \include "paper20.ly"
index ee09f7bee8ac7dc4a10e3b85af359e52998cadf0..8d5be1e0642a83a21994b6e8c12d4f3f5c0b1b24 100644 (file)
@@ -165,13 +165,13 @@ GraceContext=\translator {
        TextScript \push #'font-size = #-1
        Slur \push #'font-size = #-1
        Accidentals \push #'font-size = #-1
        TextScript \push #'font-size = #-1
        Slur \push #'font-size = #-1
        Accidentals \push #'font-size = #-1
-       Beam \push #'beam-thickness = #0.3
-       Beam \push #'beam-space-function = #(lambda (x) 0.5)
+       Beam \push #'thickness = #0.3
+       Beam \push #'space-function = #(lambda (x) 0.5)
 
        Stem \push #'lengths = #(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0))
        Stem \push #'beamed-lengths =
                #'(0.0 2.5 2.0 1.5)
 
        Stem \push #'lengths = #(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0))
        Stem \push #'beamed-lengths =
                #'(0.0 2.5 2.0 1.5)
-       Stem \push #'minimum-beamed-lengths
+       Stem \push #'beamed-minimum-lengths
                 = #(map (lambda (x) (* 0.8 x)) '(0.0 2.5 2.0 1.5))
 
        weAreGraceContext = ##t   
                 = #(map (lambda (x) (* 0.8 x)) '(0.0 2.5 2.0 1.5))
 
        weAreGraceContext = ##t   
@@ -280,9 +280,12 @@ ChordNamesContext = \translator {
        \name ChordNames;
 
        Generic_property_list = #generic-chord-staff-properties
        \name ChordNames;
 
        Generic_property_list = #generic-chord-staff-properties
+
        \consists "Property_engraver";  
        \consists "Output_property_engraver";   
        \accepts "ChordNamesVoice";
        \consists "Property_engraver";  
        \consists "Output_property_engraver";   
        \accepts "ChordNamesVoice";
+
+       VerticalAxisGroup \push #'invisible-staff = ##t
        \consistsend "Axis_group_engraver";
        }
 
        \consistsend "Axis_group_engraver";
        }
 
@@ -429,627 +432,13 @@ ScoreContext = \translator {
          Time_signature
          Stanza_number
        )
          Time_signature
          Stanza_number
        )
-       
+
+
+       \elementdescriptions #all-element-descriptions
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        % TODO: uniform naming.;  
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        % TODO: uniform naming.;  
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-
-       %
-       % distances are given in stafflinethickness (thicknesses) and
-       % staffspace (distances)
-       %
-       Arpeggio = #`(
-               (interfaces . (arpeggio-interface side-position-interface))
-               (X-extent-callback . ,Arpeggio::width_callback)
-               (molecule-callback . ,Arpeggio::brew_molecule)
-               (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
-               (X-offset-callbacks . (,Side_position::aligned_side))
-               (right-padding . 0.4)  ; Hmm, not generic?
-               (direction . -1)
-               (staff-position . 0.0)
-               (name . "Arpeggio") 
-       )
-       BarLine = #`(
-               (interfaces . (bar-interface staff-bar-interface))
-               (break-align-symbol . Staff_bar)
-               (glyph . "|")
-               (break-glyph-function . ,default-break-barline)
-               (barsize-procedure . ,Bar::get_staff_bar_size)
-               (molecule-callback . ,Bar::brew_molecule)          
-               (visibility-lambda . ,all-visible)
-               (breakable . #t)
-               (before-line-breaking-callback . ,Bar::before_line_breaking)
-               ;;
-               ;; 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)
-               (name . "BarLine")
-       )
-
-       BarNumber = #`(
-               (molecule-callback . ,Text_item::brew_molecule)
-               (breakable . #t)
-               (visibility-lambda . ,begin-of-line-visible)
-               (padding . 1.0)
-               (direction . 1)
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (font-family . roman)
-               (name . "BarNumber")
-       )
-
-       Beam = #basic-beam-properties
-
-       BreakAlignment = #`(
-               (breakable . #t)
-               (interfaces . (break-align-interface))
-               (stacking-dir . 1)
-               (axes 0)
-               (X-offset-callbacks . (,Break_align_interface::self_align_callback))
-               (space-alist . ,default-break-align-space-alist) 
-               (name . "BreakAlignment")               
-       )
-
-       BreakAlignGroup = #`(
-               (interfaces . (axis-group-interface))
-               (axes  . (0))
-               (X-offset-callbacks . (,Break_align_interface::alignment_callback))
-               
-               (name . "BreakAlignGroup")
-       )
-
-       BreathingSign = #`(
-               (interfaces . (breathing-sign-interface))
-               (break-align-symbol . Breathing_sign)
-               (breakable . #t )
-               (molecule-callback . ,Breathing_sign::brew_molecule)
-               (Y-offset-callbacks . (,Breathing_sign::offset_callback))
-               (visibility-lambda . ,begin-of-line-invisible)
-               (name . "BreathingSign")
-       )
-
-       Clef = #`(
-          (interfaces .  (clef-interface))
-          (molecule-callback . ,Score_element::brew_molecule)
-          (before-line-breaking-callback . ,Clef::before_line_breaking)
-          (breakable . #t)
-          (break-align-symbol . Clef_item)
-          (visibility-lambda . ,begin-of-line-visible)
-          (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
-          (name . "Clef")
-       )
-
-       ChordNames = #`(
-               (molecule-callback . ,Chord_name::brew_molecule)
-               (interfaces . (chord-name-interface))
-               (after-line-breaking-callback . ,Chord_name::after_line_breaking)
-               (chord-name-function . ,default-chord-name-function)
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (font-family . roman)
-               (name . "ChordNames")  
-       )
-
-       NoteCollision = #`(
-               (axes 0 1)
-               (interfaces . (collision-interface))
-               (note-width . 1.65)
-               (name . "NoteCollision")
-       )
-
-       Crescendo = #`(
-               (molecule-callback . ,Crescendo::brew_molecule)
-               (interfaces . (crescendo-interface dynamic-interface))
-               (thickness . 1.0)
-               (shorten-for-letter  .  4.0)
-               (height . 0.6666)
-               (dash-thickness . 1.2)
-               (dash-length . 4.0)
-               (name . "Crescendo")
-               (self-alignment-Y . 0)
-               (Y-offset-callbacks . (,Side_position::aligned_on_self))
-       )
-
-       DotColumn = #`(
-               (interfaces . (dot-column-interface axis-group-interface ))
-               (axes 0 )
-               (name . "DotColumn")
-       )
-
-       Dots = #`(
-               (interfaces . (dot-interface))
-               (molecule-callback . ,Dots::brew_molecule)
-               (dot-count . 1)
-               (staff-position . 0.0)
-               (Y-offset-callbacks  . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
-
-               (name . "Dots")         
-       )
-       
-       DynamicText = #`(
-               (interfaces . (dynamic-interface))
-               (Y-offset-callbacks . (,Side_position::aligned_on_self))
-               (molecule-callback . ,Text_item::brew_molecule)
-               (font-style . dynamic)
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (script-priority . 100)
-               (self-alignment-Y . 0)
-               (name . "DynamicText")
-       )
-       
-       DynamicLineSpanner = #`(
-               (interfaces . (dynamic-interface axis-group-interface side-position-interface))
-               (axes . ( 1))
-               (padding . 3)
-               (minimum-space . 6)
-               (name . "dynamic alignment")
-       )
-       
-       LeftEdge = #`(
-               (break-align-symbol . Left_edge_item)
-               (breakable . #t)
-               (name . "LeftEdge")
-       )
-       
-       Fingering = #`(
-               (interfaces . (finger-interface text-script-interface text-item-interface side-position-interface))
-               (molecule-callback . ,Text_item::brew_molecule)
-               (padding .      3.0)
-               (self-alignment-X . 0)
-               (name . "Fingering") 
-       )
-
-       GraceAlignment = #`(
-               (interfaces . (axis-group-interface align-interface))
-               (axes . (0))
-               (horizontal-space . 1.2)
-               (padding . 1.0)
-               (before-line-breaking-callback . ,Grace_align_item::before_line_breaking)
-               (name . "GraceAlignment")
-       )
-       
-       HaraKiriVerticalGroup = #`(
-               (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
-               (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
-               (interfaces . (hara-kiri-group-interface))
-               (axes 1)
-               (name . "HaraKiriVerticalGroup")
-       )
-
-       LyricHyphen = #`(
-               (interfaces  . (lyric-hyphen-interface))        
-               (thickness . 1.0)
-               (height . 0.4)
-               (minimum-length .  0.5) 
-               (molecule-callback . ,Hyphen_spanner::brew_molecule)
-               (Y-extent-callback . ,Score_element::point_dimension_callback)
-               (name . "LyricHyphen")
-       )
-       
-       InstrumentName = #`(
-               (interfaces . (instrument-name-interface))
-               (breakable . #t)
-               (Y-offset-callbacks . (,Side_position::centered_on_parent))
-               (molecule-callback . ,Text_item::brew_molecule)         
-               (break-align-symbol . Instrument_name)
-               (visibility-lambda . ,begin-of-line-visible)
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (font-family . roman)
-               (name . "InstrumentName")
-       )
-       
-       KeySignature = #`(
-         (interfaces . (key-item-interface))
-         (molecule-callback . ,Key_item::brew_molecule)
-         (break-align-symbol . Key_item)
-         (visibility-lambda . ,begin-of-line-visible)
-         (breakable . #t)
-         (name . "KeySignature")
-       )
-       
-       Accidentals = #`(
-               (molecule-callback . ,Local_key_item::brew_molecule)
-               (X-offset-callbacks . (,Side_position::aligned_side))
-               (direction . -1)
-               (left-padding . 0.2)
-               (right-padding . 0.4)
-               (interfaces . (accidentals-interface))
-               (name .  "Accidentals")
-       )
-       
-       LineOfScore = #`(
-               (axes . (0 1))
-               (interfaces . (axis-group-interface))
-               (name .  "LineOfScore")
-       )
-       
-       LyricExtender = #`(
-               (interfaces . (lyric-extender-interface))
-               (molecule-callback . ,Lyric_extender::brew_molecule)
-               (height . 0.8) ; stafflinethickness;
-               (right-trim-amount . 0.5)
-               (Y-extent-callback . ,Score_element::point_dimension_callback)
-               (name . "LyricExtender")
-       )
-       
-       LyricText = #`(
-               (interfaces .  (lyric-syllable-interface text-item-interface))
-               (molecule-callback . ,Text_item::brew_molecule)
-               (X-offset-callbacks . (,Side_position::aligned_on_self))
-               (self-alignment-X . 0)
-               (non-rhythmic . #t)
-               (word-space . 0.6)
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (font-family . roman)
-               (name . "LyricText") 
-       )
-       
-       RehearsalMark = #`(
-               (interfaces . (mark-interface side-position-interface))
-               (molecule-callback . ,Text_item::brew_molecule) 
-               (breakable . #t)
-               (visibility-lambda . ,end-of-line-invisible)
-               (padding . 4.0)
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (font-style . mark)
-               (name . "RehearsalMark")
-       )
-       
-       MultiMeasureRest = #`(
-               (interfaces . (multi-measure-rest-interface))
-               (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
-               (molecule-callback . ,Multi_measure_rest::brew_molecule)
-               (staff-position . 0)
-               (expand-limit . 10)
-               (padding . 2.0) ; staffspace
-               (minimum-width . 12.5) ; staffspace
-               (name . "MultiMeasureRest")
-       )
-       
-       NoteColumn = #`(
-               (interfaces . (axis-group-interface note-column-interface))
-               (axes 0 1)
-               (name . "NoteColumn")
-       )
-       
-       NoteHead = #`(
-               (interfaces . (note-head-interface rhythmic-head-interface))
-               (style . default)
-               (molecule-callback . ,Note_head::brew_molecule)
-               (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
-               (name . "NoteHead")
-       )
-
-       NoteName = #`(
-               (molecule-callback . ,Text_item::brew_molecule)
-               (name . "NoteName")
-       )
-
-       OctavateEight  = #`(
-               (self-alignment-X . 0)
-               (text . "8")
-               (visibility-lambda . ,begin-of-line-visible)
-               (X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self))
-               (Y-offset-callbacks . (,Side_position::aligned_side))
-               (molecule-callback . ,Text_item::brew_molecule)
-               (font-shape . "italic")
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (name . "OctavateEight")
-       )
-       
-       PaperColumn = #`(
-               (interfaces . (paper-column-interface axis-group-interface))
-               (axes 0)
-               (before-musical-spacing-factor . 0.4)
-               (name . "PaperColumn")
-       )
-       NonMusicalPaperColumn = #`(
-               (interfaces . (paper-column-interface axis-group-interface))
-               (axes 0)
-               (before-musical-spacing-factor . 1.0)
-               (name . "PaperColumn")
-       )
-
-       Rest = #`(
-               (interfaces . (rest-interface rhythmic-head-interface))
-               (after-line-breaking-callback . ,Rest::after_line_breaking)
-               (molecule-callback . ,Rest::brew_molecule)
-               (minimum-beam-collision-distance . 1.5)
-               (name . "Rest")
-       )
-       
-       RestCollision = #`(
-               (interfaces . (rest-collision-interface))
-               (minimum-distance . 0.75)
-               (name . "RestCollision")                
-       )
-
-       Script = #`(
-               (molecule-callback . ,Script::brew_molecule)
-               (interfaces . (script-interface side-position-interface))
-               (X-offset-callbacks . (,Side_position::centered_on_parent))
-               (name . "Script")
-       )
-       
-       ScriptColumn = #`(
-               (before-line-breaking-callback . ,Script_column::before_line_breaking)
-               (name . "ScriptColumn")
-       )
        
        
-       Slur = #`(
-               (interfaces . (slur-interface))
-               (molecule-callback . ,Slur::brew_molecule)
-               (thickness . 1.2)               
-               (spacing-procedure . ,Slur::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))
-               (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)))
-               (beautiful . 0.5)
-               (y-free . 0.75)
-               (slope-limit . 0.8)
-               (attachment-offset . ((0 . 0) . (0 . 0)))
-               (name . "Slur")
-               )
-
-       SpacingSpanner =#`(
-               (spacing-procedure . ,Spacing_spanner::set_springs)
-
-               ;; assume that notes at least this long are present.
-               (maximum-duration-for-spacing . ,(make-moment 1 8))
-               (name . "SpacingSpanner")
-       )
-       SpanBar = #`(
-               (interfaces . (bar-interface span-bar-interface))
-               (break-align-symbol . Staff_bar)
-               (barsize-procedure . ,Span_bar::get_bar_size) 
-               (molecule-callback . ,Bar::brew_molecule)
-               (visibility-lambda . ,begin-of-line-invisible)
-               (X-extent-callback . ,Span_bar::width_callback)
-               (Y-offset-callbacks . (,Span_bar::center_on_spanned_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)
-               (name . "SpanBar")
-       )
-
-       StanzaNumber = #`(
-               (breakable . #t)
-               (molecule-callback . ,Text_item::brew_molecule)         
-               (break-align-symbol . Clef_item)
-               (visibility-lambda . ,begin-of-line-visible)
-               (name . "StanzaNumber")
-       )
-
-       StaffSymbol = #`(
-               (interfaces . (staff-symbol-interface ))
-               (molecule-callback . ,Staff_symbol::brew_molecule)
-               (staff-space . 1.0)
-               (line-count . 5 )
-               (name . "StaffSymbol")
-       )
-
-       SystemStartDelimiter = #`(
-               (molecule-callback . ,System_start_delimiter::brew_molecule)
-               (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
-               (collapse-height . 1.0)
-               (thickness . 1.6)
-               (arch-height . 1.5)
-               (arch-angle . 50.0)
-               (arch-thick . 0.25)
-               (arch-width . 1.5)
-               (bracket-thick . 0.25)
-               (bracket-width . 2.0)
-               (name . "SystemStartDelimiter")
-       )
-
-       TextScript = #`(
-               (molecule-callback . ,Text_item::brew_molecule)
-               (no-spacing-rods . #t)
-               (interfaces . (text-script-interface text-item-interface side-position-interface))
-               (padding . 0.5)
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (name . "TextScript") 
-       )
-       TextSpanner = #`(
-               (interfaces . (text-spanner-interface))
-               (molecule-callback . ,Text_spanner::brew_molecule)
-               (type . "line")
-               (direction . 1)
-               (font-shape . "italic")
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (name . "TextSpanner")          
-       )
-       Tie = #`(
-               (interfaces . (tie-interface))
-               (molecule-callback . ,Tie::brew_molecule)
-               (spacing-procedure . ,Tie::set_spacing_rods)
-               (staffline-clearance . 0.24)
-               (details . ((ratio . 0.333) (height-limit . 1.0)))
-               (thickness . 1.2)
-               (x-gap . 0.2)
-               (minimum-length  . 2.5)
-               (name . "Tie")
-       )
-
-       TieColumn = #`(
-               (after-line-breaking-callback . ,Tie_column::after_line_breaking)
-               (interfaces . (tie-column-interface))
-               (name . "TieColumn")            
-       )
-
-       TimeSignature = #`(
-               (interfaces . (time-signature-interface))
-               (molecule-callback . ,Time_signature::brew_molecule)
-               (break-align-symbol . Time_signature)
-               (visibility-lambda . ,all-visible)
-               (breakable . #t)
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (font-style . timesig)
-               (name . "TimeSignature")
-       )
-
-       TupletBracket = #`(
-               (interfaces . (tuplet-spanner-interface))
-               (number-gap . 2.0)   
-               (delta-y . 0)
-               (thick . 1.0)
-               (after-line-breaking-callback . ,Tuplet_spanner::after_line_breaking)
-               (molecule-callback . ,Tuplet_spanner::brew_molecule)
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (font-shape . "italic")
-               (name . "TupletBracket")
-       )       
-
-       SostenutoPedal = #`(
-               (molecule-callback . ,Text_item::brew_molecule)
-               (X-offset-callbacks . (,Side_position::aligned_on_self))
-               (Y-offset-callbacks .
-                (,Side_position::aligned_side
-                 ,Side_position::centered_on_parent))
-
-               (font-shape . "italic")
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (no-spacing-rods . #t)
-               (self-alignment-X . 0)
-               (name  . "SostenutoPedal")
-                               
-       )
-
-       Stem = #`(
-               (interfaces . (stem-interface))
-               (before-line-breaking-callback . ,Stem::before_line_breaking)
-               (molecule-callback . ,Stem::brew_molecule)
-               (thickness . 0.8)
-               (beamed-lengths . (0.0 2.5 2.0 1.5))
-               (beamed-minimum-lengths . (0.0 1.5 1.25 1.0))
-               
-;;  Stems in unnatural (forced) direction should be shortened,
-;;  according to [Roush & Gourlay].  Their suggestion to knock off
-;;  a whole staffspace seems a bit drastical: we'll do half.
-
-               (lengths . (3.5 3.5 3.5 4.5 5.0))
-               (stem-shorten . (0.5))
-               ; if stem is on middle line, choose this direction.
-               (default-neutral-direction . 1)
-               (X-offset-callbacks . (,Stem::off_callback))            
-               (name . "Stem")
-       )
-
-       StemTremolo = #`(
-               (molecule-callback . ,Stem_tremolo::brew_molecule)
-               (beam-width . 2.0) ; staff-space
-               (beam-thickness . 0.42) ; staff-space
-               (beam-space-function . ,default-beam-space-function)
-               (name . "StemTremolo")
-       )
-
-       SeparationItem = #`(
-               (interfaces . (separation-item-interface))
-               (name . "SeparationItem")
-       )
-
-       SeparatingGroupSpanner = #`(
-               (interfaces . (separation-spanner-interface))
-               (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
-               (name . "SeparatingGroupSpanner")
-       )
-
-       SustainPedal = #`(
-               (interfaces . (sustain-pedal-interface  side-position-interface))
-               (no-spacing-rods . #t)
-               (molecule-callback . ,Sustain_pedal::brew_molecule)
-               (self-alignment-X . 0)
-               (X-offset-callbacks . (,Side_position::aligned_on_self))
-               (Y-offset-callbacks .
-                (,Side_position::aligned_side
-                 ,Side_position::centered_on_parent))
-
-               (name . "SustainPedal")         
-       )       
-       UnaChordaPdeal = #`(
-               (molecule-callback . ,Text_item::brew_molecule)
-               (font-shape . "italic")
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (no-spacing-rods . #t)
-               (self-alignment-X . 0)
-               (X-offset-callbacks . (,Side_position::aligned_on_self))
-               (Y-offset-callbacks .
-                (,Side_position::aligned_side
-                 ,Side_position::centered_on_parent))
-
-               (name . "UnaChordaPedal")
-       )
-
-       VoltaBracket = #`(
-               (molecule-callback . ,Volta_spanner::brew_molecule)
-               (interfaces . (volta-spanner-interface side-position-interface))
-               (direction . 1)
-               (padding . 5)
-               (thickness . 1.6)  ;  stafflinethickness
-               (height . 2.0) ; staffspace;
-               (minimum-space . 25)
-               (properties-to-font-name . ,properties-to-font-name)
-               (style-to-font-name . ,style-to-font-name)
-               (markup-to-properties . ,markup-to-properties)
-               (font-style . volta)
-               (name . "VoltaBracket")
-       )       
-
-       VerticalAlignment = #`(
-               (axes 1)
-               (interfaces . (align-interface axis-group-interface))
-               (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
-               (X-extent-callback . #f)
-               (stacking-dir . -1)
-               (name . "VerticalAlignment")
-       )
-
-       VerticalAxisGroup = #`(
-               (axes 1)
-               (interfaces . (axis-group-interface))
-               (name . "VerticalAxisGroup")
-       )
 
 
        \include "auto-beam-settings.ly";
 
 
        \include "auto-beam-settings.ly";
diff --git a/ly/generate-documentation.ly b/ly/generate-documentation.ly
new file mode 100644 (file)
index 0000000..03399af
--- /dev/null
@@ -0,0 +1,2 @@
+
+#(eval-string (ly-gulp-file "generate-documentation.scm"))
index d5f5d1a94738b914487c43d95b5b271f86e8ecc7..ff3204e8e2dbda1a835e36fe1ce495b6c907252c 100644 (file)
 ; 
 (define basic-beam-properties
   `(
 ; 
 (define basic-beam-properties
   `(
-    (interfaces . (beam-interface))
     (molecule-callback . ,Beam::brew_molecule)
     (thickness . 0.42) ; in staff-space, should use stafflinethick?
     (before-line-breaking-callback . ,Beam::before_line_breaking)
     (molecule-callback . ,Beam::brew_molecule)
     (thickness . 0.42) ; in staff-space, should use stafflinethick?
     (before-line-breaking-callback . ,Beam::before_line_breaking)
     (flag-width-function . ,default-beam-flag-width-function)
     (space-function . ,default-beam-space-function)
     (damping . 1)
     (flag-width-function . ,default-beam-flag-width-function)
     (space-function . ,default-beam-space-function)
     (damping . 1)
-    (name . "beam")
+    (meta . ,(element-description "Beam" general-element-interface beam-interface))
     )
   )
 
     )
   )
 
index ed54054cee925eca2385610cffa8ca20ad4c54e1..99400b03ab0bab20e176c3ac605fcd3d7e032fef 100644 (file)
    (ice-9 regex)
    )
 
    (ice-9 regex)
    )
 
-;; The regex module may not be available, or may be broken.
-(define chord-use-regex
-  (let ((os (string-downcase (vector-ref (uname) 0))))
-    (not (equal? "cygwin" (substring os 0 (min 6 (string-length os)))))))
-
-;; If you have trouble with regex, define #f
-(define chord-use-regex #t)
-;;(define chord-use-regex #f)
-
 ;;
 ;; (octave notename accidental)
 ;;
 
 ;;
 ;;
 ;; (octave notename accidental)
 ;;
 
 ;;
-;; text: list of word
-;; word: string + optional list of property
-;; property: size, style, font, super, offset
+;; text: scm markup text -- see font.scm and input/test/markup.ly
 ;;
 
 ;; TODO
 ;;
 
 ;; TODO
@@ -50,7 +39,7 @@
        ; C iso C.no5
        (((0 . 0) (2 . 0)) . #f)
        ; Cm iso Cm.no5
        ; C iso C.no5
        (((0 . 0) (2 . 0)) . #f)
        ; Cm iso Cm.no5
-       (((0 . 0) (2 . -1)) . (("m")))
+       (((0 . 0) (2 . -1)) . ("m"))
        ; C2 iso C2.no3
        (((0 . 0) (1 . 0) (4 . 0)) . (super "2"))
        ; C4 iso C4.no3
        ; C2 iso C2.no3
        (((0 . 0) (1 . 0) (4 . 0)) . (super "2"))
        ; C4 iso C4.no3
         (((0 . 0) (2 . -1)) . ("m"))
         (((0 . 0) (3 . 0) (4 . 0)) . ("sus"))
         (((0 . 0) (2 . -1) (4 . -1)) . ("dim"))
         (((0 . 0) (2 . -1)) . ("m"))
         (((0 . 0) (3 . 0) (4 . 0)) . ("sus"))
         (((0 . 0) (2 . -1) (4 . -1)) . ("dim"))
-;Alternate:     (((0 . 0) (2 . -1) (4 . -1)) . (("o" (type . "super"))))
+;Alternate:     (((0 . 0) (2 . -1) (4 . -1)) . ((super "o")))
         (((0 . 0) (2 . 0) (4 . 1)) . ("aug"))
 ;Alternate:     (((0 . 0) (2 . 0) (4 . 1)) . ("+"))
         (((0 . 0) (1 . 0) (4 . 0)) . ("2"))
         ;; Common seventh chords
         (((0 . 0) (2 . 0) (4 . 1)) . ("aug"))
 ;Alternate:     (((0 . 0) (2 . 0) (4 . 1)) . ("+"))
         (((0 . 0) (1 . 0) (4 . 0)) . ("2"))
         ;; Common seventh chords
-        (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (("o" (type . "super")) "7"))
+        (((0 . 0) (2 . -1) (4 . -1) (6 . -2)) . (rows (super "o") "7"))
         (((0 . 0) (2 . 0) (4 . 0) (6 . 0)) . ("maj7"))
         (((0 . 0) (2 . -1) (4 . 0) (6 . -1)) . ("m7"))
         (((0 . 0) (2 . 0) (4 . 0) (6 . -1)) . ("7"))
         (((0 . 0) (2 . -1) (4 . 0) (6 . 0)) . ("m(maj7)"))
         ;jazz: the delta, see jazz-chords.ly
         (((0 . 0) (2 . 0) (4 . 0) (6 . 0)) . ("maj7"))
         (((0 . 0) (2 . -1) (4 . 0) (6 . -1)) . ("m7"))
         (((0 . 0) (2 . 0) (4 . 0) (6 . -1)) . ("7"))
         (((0 . 0) (2 . -1) (4 . 0) (6 . 0)) . ("m(maj7)"))
         ;jazz: the delta, see jazz-chords.ly
-        ;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) .  (("N" (type . "super") (style . "msam") (size . -3))))
-        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (("o" (type . "super")) ("/" (size . -2) (offset . (-0.58 . 0.5))) "7")) ; slashed o
+        ;(((0 . 0) (2 . -1) (4 . -1) (6 . -2)) .  (super ((family . "math") "N"))
+        (((0 . 0) (2 . -1) (4 . -1) (6 . -1)) . (rows (super "o") ((kern . -0.5) ((size . "-3") "/")) "7")) ; slashed o
         (((0 . 0) (2 . 0) (4 . 1) (6 . -1)) . ("aug7"))
         (((0 . 0) (2 . 0) (4 . 1) (6 . -1)) . ("aug7"))
-        (((0 . 0) (2 . 0) (4 . -1) (6 . 0)) . (("maj7") ("accidentals--1" (font . "feta") (type . "super")) ("5")))
+        (((0 . 0) (2 . 0) (4 . -1) (6 . 0)) . (rows "maj7" (music (named ("accidentals--1"))) "5"))
         (((0 . 0) (3 . 0) (4 . 0) (6 . -1)) . ("7sus4"))
         ;; Common ninth chords
         (((0 . 0) (2 . 0) (4 . 0) (5 . 0) (1 . 0)) . ("6/9")) ;; we don't want the '/no7'
         (((0 . 0) (3 . 0) (4 . 0) (6 . -1)) . ("7sus4"))
         ;; Common ninth chords
         (((0 . 0) (2 . 0) (4 . 0) (5 . 0) (1 . 0)) . ("6/9")) ;; we don't want the '/no7'
     (make-string 1 (integer->char (+ (modulo (+ (cadr pitch) 2) 7) 65)))
     (if (= (caddr pitch) 0)
       '()
     (make-string 1 (integer->char (+ (modulo (+ (cadr pitch) 2) 7) 65)))
     (if (= (caddr pitch) 0)
       '()
-      (list (list (string-append "accidentals-" 
-                                (number->string (caddr pitch)))
-                                  ;; Keep accidentals from being too large
-                 '(font . "feta") '(type . "super") )))))
+      (list
+       (append '(music)
+              (list
+               (append '(named)
+                       (list
+                        (string-append "accidentals-" 
+                                       (number->string (caddr pitch)))))))))))
+
 
 (define (step->text pitch)
   (string-append
 
 (define (step->text pitch)
   (string-append
 ;; additions, subtractions and base or inversion to chord name
 ;;
 (define (chord::inner-name-banter tonic user-name additions subtractions base-and-inversion)
 ;; additions, subtractions and base or inversion to chord name
 ;;
 (define (chord::inner-name-banter tonic user-name additions subtractions base-and-inversion)
-    (apply append (pitch->text-banter tonic)
-          (if user-name user-name '())
-          ;; why does list->string not work, format seems only hope...
-          (if (and chord-use-regex
-                   (string-match "super" (format "~s" user-name))
-                   (or (pair? additions)
-                       (pair? subtractions)))
-              '(("/" (type . "super")))
-              '())
-          (let loop ((from additions) (to '()))
-            (if (pair? from)
+  (apply append
+        '(rows)
+        (pitch->text-banter tonic)
+        (if user-name user-name '())
+        ;; why does list->string not work, format seems only hope...
+        (if (and (string-match "super" (format "~s" user-name))
+                 (or (pair? additions)
+                     (pair? subtractions)))
+            '((super "/"))
+            '())
+        (let loop ((from additions) (to '()))
+          (if (pair? from)
+              (let ((p (car from)))
+                (loop (cdr from) 
+                      (append to
+                              (cons
+                               (list 'super (step->text-banter p))
+                               (if (or (pair? (cdr from))
+                                       (pair? subtractions))
+                                   '((super "/"))
+                                   '())))))
+              to))
+        (let loop ((from subtractions) (to '()))
+          (if (pair? from)
                 (let ((p (car from)))
                   (loop (cdr from) 
                         (append to
                 (let ((p (car from)))
                   (loop (cdr from) 
                         (append to
-                         (cons
-                          (cons (step->text-banter p) '((type . "super")))
-                          (if (or (pair? (cdr from))
-                                  (pair? subtractions))
-                              '(("/" (type . "super")))
-                              '())))))
+                                (cons '(super "no")
+                                      (cons
+                                       (list 'super (step->text-banter p))
+                                       (if (pair? (cdr from))
+                                           '((super "/"))
+                                           '()))))))
                 to))
                 to))
-          (let loop ((from subtractions) (to '()))
-            (if (pair? from)
-                (let ((p (car from)))
-                  (loop (cdr from) 
-                        (append to
-                          (cons '("no" (type . "super"))
-                                (cons
-                                 (cons (step->text-banter p) '((type . "super")))
-                                           (if (pair? (cdr from))
-                                               '(("/" (type . "super")))
-                                               '()))))))
-                to))
-          (if (and (pair? base-and-inversion)
-                   (or (car base-and-inversion)
-                       (cdr base-and-inversion)))
-              (cons "/" (append
-                         (if (car base-and-inversion)
-                             (pitch->text 
-                              (car base-and-inversion))
-                             (pitch->text 
-                              (cdr base-and-inversion)))
-                         '()))
-              '())
-          '()))
+        (if (and (pair? base-and-inversion)
+                 (or (car base-and-inversion)
+                     (cdr base-and-inversion)))
+            (cons "/" (append
+                       (if (car base-and-inversion)
+                           (pitch->text 
+                            (car base-and-inversion))
+                           (pitch->text 
+                            (cdr base-and-inversion)))
+                       '()))
+            '())
+        '()))
 
 (define (chord::name-banter tonic user-name pitches base-and-inversion)
   (let ((additions (chord::additions pitches))
 
 (define (chord::name-banter tonic user-name pitches base-and-inversion)
   (let ((additions (chord::additions pitches))
                  transposed)))
       (name-func (car pitches) user-name completed base-and-inversion))))))
 
                  transposed)))
       (name-func (car pitches) user-name completed base-and-inversion))))))
 
+
diff --git a/scm/element-descriptions.scm b/scm/element-descriptions.scm
new file mode 100644 (file)
index 0000000..25784ad
--- /dev/null
@@ -0,0 +1,569 @@
+
+; distances are given in stafflinethickness (thicknesses) and
+; staffspace (distances)
+
+(define all-element-descriptions
+  `((Arpeggio . (
+              (X-extent-callback . ,Arpeggio::width_callback)
+              (molecule-callback . ,Arpeggio::brew_molecule)
+              (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
+              (X-offset-callbacks . (,Side_position::aligned_side))
+              (direction . -1)
+              (staff-position . 0.0)
+              (meta . ,(element-description "Arpeggio" arpeggio-interface side-position-interface))
+              ))
+  
+       (BarLine . (
+               (break-align-symbol . Staff_bar)
+               (glyph . "|")
+               (break-glyph-function . ,default-break-barline)
+               (barsize-procedure . ,Bar::get_staff_bar_size)
+               (molecule-callback . ,Bar::brew_molecule)          
+               (visibility-lambda . ,all-visible)
+               (breakable . #t)
+               (before-line-breaking-callback . ,Bar::before_line_breaking)
+               ;;
+               ;; 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 . ,(element-description  "BarLine" bar-line-interface general-element-interface))
+       ))
+
+       (BarNumber . (
+               (molecule-callback . ,Text_item::brew_molecule)
+               (breakable . #t)
+               (visibility-lambda . ,begin-of-line-visible)
+               (padding . 1.0)
+               (direction . 1)
+                (properties-to-font-name . ,properties-to-font-name)
+                (style-to-font-name . ,style-to-font-name)
+                (markup-to-properties . ,markup-to-properties)
+                (font-family . roman)
+               (meta . ,(element-description "BarNumber"
+                       text-interface general-element-interface break-aligned-interface))
+       ))
+
+       (Beam . ,basic-beam-properties)
+        
+       (BreakAlignment . (
+               (breakable . #t)
+               (stacking-dir . 1)
+               (axes 0)
+               (X-offset-callbacks . (,Break_align_interface::self_align_callback))
+               (space-alist . ,default-break-align-space-alist) 
+               (meta . ,(element-description "BreakAlignment"
+                       axis-group-interface align-interface
+                       )
+               )
+       ))
+
+       (BreakAlignGroup . (
+               (axes  . (0))
+               (X-offset-callbacks . (,Break_align_interface::alignment_callback))
+               
+               (meta . ,(element-description "BreakAlignGroup" axis-group-interface))
+       ))
+
+       (BreathingSign . (
+               (break-align-symbol . Breathing_sign)
+               (breakable . #t )
+               (molecule-callback . ,Breathing_sign::brew_molecule)
+               (Y-offset-callbacks . (,Breathing_sign::offset_callback))
+               (visibility-lambda . ,begin-of-line-invisible)
+               (meta . ,(element-description "BreathingSign" general-element-interface break-aligned-interface))
+       ))
+
+       (Clef . (
+          (molecule-callback . ,Score_element::brew_molecule)
+          (before-line-breaking-callback . ,Clef::before_line_breaking)
+          (breakable . #t)
+          (break-align-symbol . Clef_item)
+          (visibility-lambda . ,begin-of-line-visible)
+          (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
+          (meta . ,(element-description "Clef" clef-interface break-aligned-interface general-element-interface))
+       ))
+
+       (ChordNames . (
+               (molecule-callback . ,Chord_name::brew_molecule)
+               (after-line-breaking-callback . ,Chord_name::after_line_breaking)
+               (chord-name-function . ,default-chord-name-function)
+               (properties-to-font-name . ,properties-to-font-name)
+               (style-to-font-name . ,style-to-font-name)
+               (markup-to-properties . ,markup-to-properties)
+               (font-size . "0") ;; Hmm, 0 should be the default, maybe??
+               (font-family . "roman")
+               (meta . ,(element-description "ChordNames" chord-name-interface))
+       ))
+
+       (NoteCollision . (
+               (axes 0 1)
+               (note-width . 1.65)
+               (meta . ,(element-description "NoteCollision"
+                 general-element-interface note-collision-interface axis-group-interface
+               ))
+       ))
+
+       (Crescendo . (
+               (molecule-callback . ,Crescendo::brew_molecule)
+               (thickness . 1.0)
+               (shorten-for-letter  .  4.0)
+               (height . 0.6666)
+               (dash-thickness . 1.2)
+               (dash-length . 4.0)
+               (self-alignment-Y . 0)
+               (Y-offset-callbacks . (,Side_position::aligned_on_self))
+               (meta . ,(element-description "Crescendo" hairpin-interface))
+       ))
+
+       (DotColumn . (
+               (axes 0 )
+               (meta . ,(element-description "DotColumn" dot-column-interface general-element-interface axis-group-interface))
+       ))
+
+       (Dots . (
+               (molecule-callback . ,Dots::brew_molecule)
+               (dot-count . 1)
+               (staff-position . 0.0)
+               (Y-offset-callbacks  . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
+               (meta . ,(element-description "Dots" dot-interface general-element-interface))
+       ))
+       
+       (DynamicText . (
+               (Y-offset-callbacks . (,Side_position::aligned_on_self))
+               (molecule-callback . ,Text_item::brew_molecule)
+               (script-priority . 100)
+               (font-style . dynamic)
+                (properties-to-font-name . ,properties-to-font-name)
+                (style-to-font-name . ,style-to-font-name)
+                (markup-to-properties . ,markup-to-properties)
+               (self-alignment-Y . 0)
+
+               (meta . ,(element-description "DynamicText" text-interface general-element-interface))
+       ))
+       
+       (DynamicLineSpanner . (
+               (axes . ( 1))
+               (padding . 3)
+               (minimum-space . 6)
+               (meta . ,(element-description "DynamicLineSpanner" dynamic-interface axis-group-interface side-position-interface))
+       ))
+       
+       (LeftEdge . (
+               (break-align-symbol . Left_edge_item)
+               (breakable . #t)
+               (meta . ,(element-description "LeftEdge" break-aligned-interface))
+       ))
+       
+       (Fingering . (
+               (molecule-callback . ,Text_item::brew_molecule)
+               (padding .      3.0)
+               (self-alignment-X . 0)
+               (font-style . dynamic)
+                (properties-to-font-name . ,properties-to-font-name)
+                (style-to-font-name . ,style-to-font-name)
+                (markup-to-properties . ,markup-to-properties)
+               
+               (meta . ,(element-description "Fingering" finger-interface text-script-interface text-interface side-position-interface))
+       ))
+
+       (GraceAlignment . (
+               (axes . (0))
+               (horizontal-space . 1.2)
+               (padding . 1.0)
+               (before-line-breaking-callback . ,Grace_align_item::before_line_breaking)
+               (meta . ,(element-description "GraceAlignment" axis-group-interface align-interface grace-alignment-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 . ,(element-description "HaraKiriVerticalGroup" axis-group-interface hara-kiri-group-interface))
+       ))
+
+       (LyricHyphen . (
+               (thickness . 1.0)
+               (height . 0.4)
+               (minimum-length .  0.5) 
+               (molecule-callback . ,Hyphen_spanner::brew_molecule)
+               (Y-extent-callback . ,Score_element::point_dimension_callback)
+               (meta . ,(element-description "LyricHyphen" lyric-hyphen-interface general-element-interface))
+       ))
+       
+       (InstrumentName . (
+               (breakable . #t)
+               (Y-offset-callbacks . (,Side_position::centered_on_parent))
+               (molecule-callback . ,Text_item::brew_molecule)         
+               (break-align-symbol . Instrument_name)
+               (visibility-lambda . ,begin-of-line-visible)
+               (properties-to-font-name . ,properties-to-font-name)
+               (style-to-font-name . ,style-to-font-name)
+               (markup-to-properties . ,markup-to-properties)
+               (font-family . roman)
+               (meta . ,(element-description "InstrumentName" general-element-interface text-interface break-aligned-interface))
+       ))
+       
+       (KeySignature . (
+         (molecule-callback . ,Key_item::brew_molecule)
+         (break-align-symbol . Key_item)
+         (visibility-lambda . ,begin-of-line-visible)
+         (breakable . #t)
+         (meta . ,(element-description "KeySignature" key-signature-interface general-element-interface break-aligned-interface))
+       ))
+       
+       (Accidentals . (
+               (molecule-callback . ,Local_key_item::brew_molecule)
+               (X-offset-callbacks . (,Side_position::aligned_side))
+               (direction . -1)
+               (left-padding . 0.2)
+               (right-padding . 0.4)
+               (meta . ,(element-description "Accidentals" general-element-interface accidentals-interface))
+       ))
+       
+       (LineOfScore . (
+               (axes . (0 1))
+               (meta . ,(element-description "LineOfScore" general-element-interface axis-group-interface))
+       ))
+       
+       (LyricExtender . (
+               (molecule-callback . ,Lyric_extender::brew_molecule)
+               (height . 0.8) ; stafflinethickness;
+               (right-trim-amount . 0.5)
+               (Y-extent-callback . ,Score_element::point_dimension_callback)
+               (meta . ,(element-description "LyricExtender" general-element-interface lyric-extender-interface))
+       ))
+       
+       (LyricText . (
+               (molecule-callback . ,Text_item::brew_molecule)
+               (X-offset-callbacks . (,Side_position::aligned_on_self))
+               (self-alignment-X . 0)
+               (non-rhythmic . #t)
+               (word-space . 0.6)
+               
+               (properties-to-font-name . ,properties-to-font-name)
+               (style-to-font-name . ,style-to-font-name)
+               (markup-to-properties . ,markup-to-properties)
+               (font-family . roman)
+                
+               (meta . ,(element-description "LyricText" lyric-syllable-interface text-interface))
+       ))
+       
+       (RehearsalMark . (
+         (molecule-callback . ,Text_item::brew_molecule)       
+         (breakable . #t)
+         (properties-to-font-name . ,properties-to-font-name)
+          (style-to-font-name . ,style-to-font-name)
+              (markup-to-properties . ,markup-to-properties)
+               (font-style . mark)
+                (visibility-lambda . ,end-of-line-invisible)
+         (padding . 4.0)
+         (meta . ,(element-description "RehearsalMark" general-element-interface mark-interface side-position-interface))
+       ))
+       
+       (MultiMeasureRest . (
+               (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
+               (molecule-callback . ,Multi_measure_rest::brew_molecule)
+               (staff-position . 0)
+               (expand-limit . 10)
+               (padding . 2.0) ; staffspace
+               (minimum-width . 12.5) ; staffspace
+               (meta . ,(element-description "MultiMeasureRest" multi-measure-rest-interface general-element-interface))
+       ))
+       
+       (NoteColumn . (
+               (axes . (0 1))
+               (meta . ,(element-description "NoteColumn" general-element-interface axis-group-interface note-column-interface))
+       ))
+
+       (NoteHead . (
+               (style . default)
+               (molecule-callback . ,Note_head::brew_molecule)
+               (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
+               (meta . ,(element-description  "NoteHead"
+                       rhythmic-head-interface
+                       note-head-interface general-element-interface))
+       ))
+
+       (OctavateEight . (
+               (self-alignment-X . 0)
+               (text . "8")
+               (visibility-lambda . ,begin-of-line-visible)
+               (X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self))
+               (Y-offset-callbacks . (,Side_position::aligned_side))
+               (molecule-callback . ,Text_item::brew_molecule)
+                (font-shape . "italic")
+                (properties-to-font-name . ,properties-to-font-name)
+                (style-to-font-name . ,style-to-font-name)
+                (markup-to-properties . ,markup-to-properties)
+
+               (meta . ,(element-description "OctavateEight" text-interface general-element-interface))
+       ))
+       
+       (PaperColumn . (
+               (axes 0)
+                (before-musical-spacing-factor . 0.4)
+               (meta . ,(element-description "PaperColumn" paper-column-interface axis-group-interface spaceable-element-interface))
+       ))
+       (NonMusicalPaperColumn . (
+                (axes 0)
+                (before-musical-spacing-factor . 1.0)
+               (meta . ,(element-description "NonMusicalPaperColumn" paper-column-interface axis-group-interface spaceable-element-interface))
+        ))
+       
+       (Rest . (
+               (after-line-breaking-callback . ,Rest::after_line_breaking)
+               (molecule-callback . ,Rest::brew_molecule)
+               (minimum-beam-collision-distance . 1.5)
+               (meta . ,(element-description  "Rest"
+                       rhythmic-head-interface
+                       rest-interface general-element-interface))
+       ))
+       (RestCollision . (
+               (minimum-distance . 0.75)
+               (meta . ,(element-description "RestCollision" rest-collision-interface general-element-interface))
+       ))
+
+       (Script . (
+               (molecule-callback . ,Script::brew_molecule)
+               (X-offset-callbacks . (,Side_position::centered_on_parent))
+               (meta . ,(element-description "Script" script-interface side-position-interface))
+       ))
+       
+       (ScriptColumn . (
+               (before-line-breaking-callback . ,Script_column::before_line_breaking)
+               (meta . ,(element-description "ScriptColumn" script-column-interface))
+       ))
+       
+       (Slur . ,default-basic-slur-properties)
+       (SpacingSpanner . (
+               (spacing-procedure . ,Spacing_spanner::set_springs)
+
+               ;; assume that notes at least this long are present.
+               (maximum-duration-for-spacing . ,(make-moment 1 8))
+               (meta . ,(element-description "SpacingSpanner" general-element-interface spacing-spanner-interface))
+       ))
+       (SpanBar . (
+
+               (break-align-symbol . Staff_bar)
+               (barsize-procedure . ,Span_bar::get_bar_size) 
+               (molecule-callback . ,Bar::brew_molecule)
+               (visibility-lambda . ,begin-of-line-invisible)
+               (X-extent-callback . ,Span_bar::width_callback)
+               (Y-offset-callbacks . (,Span_bar::center_on_spanned_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 . ,(element-description "SpanBar" span-bar-interface bar-line-interface general-element-interface))
+       ))
+
+       (StanzaNumber . (
+               (breakable . #t)
+               (molecule-callback . ,Text_item::brew_molecule)         
+               (break-align-symbol . Clef_item)
+               (visibility-lambda . ,begin-of-line-visible)
+               (meta . ,(element-description "StanzaNumber" break-aligned-interface text-interface))
+       ))
+
+       (StaffSymbol . (
+               (molecule-callback . ,Staff_symbol::brew_molecule)
+               (staff-space . 1.0)
+               (line-count . 5 )
+               (meta . ,(element-description "StaffSymbol" staff-symbol-interface general-element-interface))
+       ))
+       (SostenutoPedal . (
+               (molecule-callback . ,Text_item::brew_molecule)
+               (X-offset-callbacks . (,Side_position::aligned_on_self))
+               (Y-offset-callbacks .
+                (,Side_position::aligned_side
+                 ,Side_position::centered_on_parent))
+               (no-spacing-rods . #t)
+                (font-shape . "italic")
+                (properties-to-font-name . ,properties-to-font-name)
+                (style-to-font-name . ,style-to-font-name)
+                (markup-to-properties . ,markup-to-properties)
+               
+               (self-alignment-X . 0)
+               (meta . ,(element-description "SostenutoPedal" text-interface general-element-interface))
+       ))
+
+       (Stem . (
+               (before-line-breaking-callback . ,Stem::before_line_breaking)
+               (molecule-callback . ,Stem::brew_molecule)
+               (thickness . 0.8)
+               (beamed-lengths . (0.0 2.5 2.0 1.5))
+               (beamed-minimum-lengths . (0.0 1.5 1.25 1.0))
+               
+;;  Stems in unnatural (forced) direction should be shortened,
+;;  according to [Roush & Gourlay].  Their suggestion to knock off
+;;  a whole staffspace seems a bit drastical: we'll do half.
+
+               (lengths . (3.5 3.5 3.5 4.5 5.0))
+               (stem-shorten . (0.5))
+               ; if stem is on middle line, choose this direction.
+               (default-neutral-direction . 1)
+               (X-offset-callbacks . (,Stem::off_callback))            
+               (meta . ,(element-description  "Stem" stem-interface general-element-interface))
+       ))
+
+       (StemTremolo . (
+               (molecule-callback . ,Stem_tremolo::brew_molecule)
+               (beam-width . 2.0) ; staff-space
+               (beam-thickness . 0.42) ; staff-space
+               (beam-space-function . ,default-beam-space-function)
+               (meta . ,(element-description "StemTremolo" stem-tremolo-interface general-element-interface))
+       ))
+
+       (SeparationItem . (
+               (meta . ,(element-description "SeparationItem" separation-item-interface general-element-interface))
+       ))
+       (SeparatingGroupSpanner . (
+               (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
+               (meta . ,(element-description "SeparatingGroupSpanner" separation-spanner-interface))
+       ))
+
+       (SustainPedal . (
+               (no-spacing-rods . #t)
+               (molecule-callback . ,Sustain_pedal::brew_molecule)
+               (self-alignment-X . 0)
+               (X-offset-callbacks . (,Side_position::aligned_on_self))
+               (Y-offset-callbacks .
+                (,Side_position::aligned_side
+                 ,Side_position::centered_on_parent))
+
+               (meta . ,(element-description "SustainPedal" sustain-pedal-interface side-position-interface))
+       ))
+
+       (SystemStartDelimiter . (
+               (molecule-callback . ,System_start_delimiter::brew_molecule)
+               (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
+               (collapse-height . 1.0)
+               (thickness . 1.6)
+               (arch-height . 1.5)
+               (arch-angle . 50.0)
+               (arch-thick . 0.25)
+               (arch-width . 1.5)
+               (bracket-thick . 0.25)
+               (bracket-width . 2.0)
+               (meta . ,(element-description "SystemStartDelimiter" system-start-delimiter general-element-interface))
+       ))
+
+       (TextScript . (
+               (molecule-callback . ,Text_item::brew_molecule)
+               (no-spacing-rods . #t)
+               (padding . 0.5)
+               (meta . ,(element-description "TextScript" text-script-interface text-interface side-position-interface general-element-interface))
+       ))
+       (TextSpanner . (
+               (molecule-callback . ,Text_spanner::brew_molecule)
+                (font-shape . "italic")
+                (properties-to-font-name . ,properties-to-font-name)
+                (style-to-font-name . ,style-to-font-name)
+                (markup-to-properties . ,markup-to-properties)
+               (type . "line")
+               (direction . 1)
+               (meta . ,(element-description "TextSpanner" text-spanner-interface general-element-interface))          
+       ))
+       (Tie . (
+               (molecule-callback . ,Tie::brew_molecule)
+               (spacing-procedure . ,Tie::set_spacing_rods)
+               (staffline-clearance . 0.24)
+               (details . ((ratio . 0.333) (height-limit . 1.0)))
+               (thickness . 1.2)
+               (x-gap . 0.2)
+               (minimum-length  . 2.5)
+               (meta . ,(element-description "Tie" tie-interface general-element-interface))
+       ))
+
+       (TieColumn . (
+               (after-line-breaking-callback . ,Tie_column::after_line_breaking)
+               (meta . ,(element-description "TieColumn" tie-column-interface general-element-interface))
+       ))
+
+       (TimeSignature . (
+               (molecule-callback . ,Time_signature::brew_molecule)
+               (break-align-symbol . Time_signature)
+               (visibility-lambda . ,all-visible)
+               (breakable . #t)
+                (properties-to-font-name . ,properties-to-font-name)
+                (style-to-font-name . ,style-to-font-name)
+                (markup-to-properties . ,markup-to-properties)
+                (font-style . timesig)
+               
+               (meta . ,(element-description "TimeSignature" time-signature-interface general-element-interface))
+       ))
+
+       (TupletBracket . (
+               (number-gap . 2.0)   
+               (delta-y . 0)
+               (thick . 1.0)
+               (after-line-breaking-callback . ,Tuplet_spanner::after_line_breaking)
+               (molecule-callback . ,Tuplet_spanner::brew_molecule)
+                (properties-to-font-name . ,properties-to-font-name)
+                (style-to-font-name . ,style-to-font-name)
+                (markup-to-properties . ,markup-to-properties)
+                (font-shape . "italic")
+               (meta .  ,(element-description "TupletBracket"
+                         general-element-interface tuplet-bracket-interface))
+       ))
+
+       (UnaChordaPdeal . (
+               (molecule-callback . ,Text_item::brew_molecule)
+                (font-shape . "italic")
+                (properties-to-font-name . ,properties-to-font-name)
+                (style-to-font-name . ,style-to-font-name)
+                (markup-to-properties . ,markup-to-properties)
+               (no-spacing-rods . #t)
+               (self-alignment-X . 0)
+               (X-offset-callbacks . (,Side_position::aligned_on_self))
+               (Y-offset-callbacks .
+                (,Side_position::aligned_side
+                 ,Side_position::centered_on_parent))
+               (meta . ,(element-description "UnaChordaPedal" text-interface general-element-interface))
+       ))
+
+       (VoltaBracket . (
+               (molecule-callback . ,Volta_spanner::brew_molecule)
+               (direction . 1)
+               (padding . 5)
+                (properties-to-font-name . ,properties-to-font-name)
+                (style-to-font-name . ,style-to-font-name)
+                (markup-to-properties . ,markup-to-properties)
+                (font-style . volta)
+       
+               (thickness . 1.6)  ;  stafflinethickness
+               (height . 2.0) ; staffspace;
+               (minimum-space . 25)
+               (meta . ,(element-description "VoltaBracket" volta-bracket-interface side-position-interface))
+       ))
+
+       (VerticalAlignment . (
+               (axes 1)
+               (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
+               (X-extent-callback . #f)
+               (stacking-dir . -1)
+               (meta . ,(element-description "VerticalAlignment" align-interface axis-group-interface))
+       ))
+
+       (VerticalAxisGroup . (
+               (axes 1)
+               (meta . ,(element-description "VerticalAxisGroup" axis-group-interface))
+       ))
+))
+
+
+
+;  (display  (map pair? all-element-descriptions))
+
index a0df641b4d2d8c06342de16e7b98db203e8433ac..1c641c854e68eced36b650a9f8d0d9868196cc51 100644 (file)
@@ -50,6 +50,9 @@
     (("bold upright roman cmbx 12" . 1) . "cmbx12")
     (("medium italic roman cmbx 10" . 0) . "cmbx10")
     (("medium italic roman cmbx 12" . 1) . "cmbx12")
     (("bold upright roman cmbx 12" . 1) . "cmbx12")
     (("medium italic roman cmbx 10" . 0) . "cmbx10")
     (("medium italic roman cmbx 12" . 1) . "cmbx12")
+    (("medium upright math msam 10" . -2) . "msam10")
+    (("medium upright math msam 10" . -1) . "msam10")
+    (("medium upright math msam 10" . 0) . "msam10")
     ))
 
 (define (style-sheet-template-entry-compile entry size)
     ))
 
 (define (style-sheet-template-entry-compile entry size)
     (name . font-name)
     (size . font-size)
     (point . font-point)
     (name . font-name)
     (size . font-size)
     (point . font-point)
+    (kern . kern)
     ))
     
 (define markup-abbrev-to-properties-alist
     ))
     
 (define markup-abbrev-to-properties-alist
      (italic . (font-shape . "italic"))
      (named . (lookup . name))
      (text . (lookup . value))
      (italic . (font-shape . "italic"))
      (named . (lookup . name))
      (text . (lookup . value))
-     (super . (font-size . -1)))
+     ;; super needs some work
+     (super . (font-size . "-1")))
    (map (lambda (x) (cons (car x) (cons 'font-style (car x))))
        style-to-font-alist)))
   
    (map (lambda (x) (cons (car x) (cons 'font-style (car x))))
        style-to-font-alist)))
   
diff --git a/scm/generate-documentation.scm b/scm/generate-documentation.scm
new file mode 100644 (file)
index 0000000..345e4da
--- /dev/null
@@ -0,0 +1,111 @@
+
+
+(define (uniqued-alist  alist acc)
+  (if (null? alist) acc
+      (if (assoc (caar alist) acc)
+         (uniqued-alist (cdr alist) acc)
+         (uniqued-alist (cdr alist) (cons (car alist) acc)
+  ))))
+
+
+;;; TODO
+
+(define (wordwrap string)
+  ""
+  )
+  
+
+(define (self-evaluating? x)
+  (or (number? x) (string? x))
+  )
+      
+(define (type-name  predicate)
+  (cond
+   ((eq? predicate dir?) "direction")
+   ((eq? predicate ly-element?) "graphic element")
+   ((eq? predicate pair?) "pair")
+   ((eq? predicate integer?) "integer")
+   ((eq? predicate list?) "list")
+   ((eq? predicate symbol?) "symbol")
+   ((eq? predicate string?) "string")
+   ((eq? predicate boolean?) "string")   
+   ((eq? predicate number?) "number")
+   ((eq? predicate procedure?) "procedure") 
+   (else "(unknown)")
+  ))
+
+(define (scm->string val)
+  (string-append
+   (if (self-evaluating? val) "" "'")
+   (call-with-output-string (lambda (port) (display val port)))
+  ))
+
+(define (document-property prop desc)
+  (let ((handle (assoc (car prop) desc)))
+    (string-append
+     "\n" (symbol->string (car prop)) " (" (type-name (cadr prop)) ") -- "
+     (caddr prop)
+     "\ndefault value:  "
+     (if (pair? handle)
+        (scm->string (cdr handle))
+        "not set"
+        )
+     "\n"
+  )
+  ))
+
+;;
+;; todo: setup ifaces differently.
+;;
+(define (document-element description)
+  (let* ((metah (assoc 'meta description))
+        (meta (if (pair? metah)
+                  (cdr metah)
+                  '((properties . ()) (name . "huh?"))
+                  ))
+        
+        (name (cdr (assoc 'name meta)))
+;       (iface-descs (cdr (assoc 'interface-descriptions meta)))
+        (propdesc (cdr (assoc 'properties meta)))
+        (docs (map (lambda (x) (document-property x description))
+                   (uniqued-alist propdesc '())))
+        )
+
+    (string-append
+     "\n-------------------------\n"
+     name "\n"
+     "-------------------------\n"
+     "INTERFACES\n"
+     "(todo)\n"
+     ; (apply string-append iface-descs)
+     "-------------------------\n"
+     "PROPERTIES:\n"
+     (apply string-append docs)
+    )
+  ))
+
+
+(define (document-elements elts)
+  (string-append
+   (map (lambda (x) (display (car x)) (document-element (cdr x)))
+       elts
+       )
+   ))
+
+(define (test-module )
+  (display
+   (list
+  (scm->string '(1 2 abc))
+  (scm->string +)
+  (type-name number?)
+  (uniqued-alist '((a . 1 ) (a . 1)) '() )
+  )))
+
+
+; (define b (cdr (assoc 'Beam all-element-descriptions)))
+;(display b)
+
+; (display (document-element  b))
+
+(display (document-elements all-element-descriptions))
+
diff --git a/scm/interface.scm b/scm/interface.scm
new file mode 100644 (file)
index 0000000..2445984
--- /dev/null
@@ -0,0 +1,606 @@
+
+; should include default value?
+
+;;; ::::::: should generate documentation for score elements from here.
+
+(define (property-description symbol type? description)
+  (list symbol type? description))
+  
+(define (lily-interface symbol description props)
+  (list (list symbol)
+       (list description)
+       props
+       )
+  )
+
+(define (merge-interfaces ifs)
+   (list
+    (apply append (map car ifs))
+    (apply append (map cadr ifs))
+    (apply append (map caddr ifs))
+  ))
+
+(define (element-description name . interfaces)
+  (let ((merged (merge-interfaces interfaces)))
+    (list (cons 'separator "\n\n\n")   ;easy printing.
+         (cons 'name name)
+         (cons 'interfaces (car merged))
+         ; (cons 'interface-descriptions (cadr merged))
+         ;; description of the element itself?
+         (cons 'properties (caddr merged))
+  )))
+
+;;;;;;;;;;;;;;;;;
+
+(define general-element-interface
+  (lily-interface
+   'general-element-interface
+   "All elements support this"
+   (list (property-description 'X-offset-callbacks list? "")
+    (property-description 'Y-offset-callbacks list? "")
+    (property-description 'X-extent-callback procedure? "")
+    (property-description 'Y-extent-callback procedure? "")
+    (property-description 'font-size integer? "")
+    ))
+)
+
+(define beam-interface
+  (lily-interface
+   'beam-interface
+   "A beam. "
+   (list
+    (property-description 'y-position number? "position of left edge")
+    (property-description 'height number? "dy")
+    (property-description 'flag-width-function procedure? "")
+    (property-description 'damping integer? "amount of beam slope damping should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams ")
+    (property-description 'default-neutral-direction dir? "which
+direction to choose if we're in the middle of the staff ")
+    (property-description 'thickness number? "weight of beams, in staffspace")
+    (property-description 'space-function procedure? "function of type multiplicity -> real (in staffspace)")
+    (property-description 'beamed-stem-shorten number? "")
+    (property-description 'height-quants number? "")
+    (property-description 'vertical-position-quant-function procedure? "")
+    (property-description 'dir-function procedure? "")
+    (property-description 'damping number? "damping factor.")
+    (property-description 'outer-stem-length-limit number? "catch
+suspect beam slopes, set slope to zero if outer stem is lengthened
+more than this (in staffspace)")
+    (property-description 'slope-limit number? "set slope to zero if slope is running away steeper than this.")
+    )
+))
+
+
+
+;;;;;;;;;;;;;;;;;;;;
+
+(define clef-interface
+  (lily-interface
+   'clef-interface
+   "A clef sign"
+   (list
+    (property-description 'non-default boolean? "not set because of existence of a bar?")
+    (property-description 'change boolean? "is this a change clef (smaller size)?")
+    (property-description 'glyph string? "a string determining what glyph is typeset")
+    ))
+  )
+
+(define axis-group-interface
+  (lily-interface
+   'axis-group-interface
+   "a group of coupled elements"
+   (list
+    (property-description 'axes list? "list of axis (number) in which this group works")
+   )))
+
+(define note-column-interface
+  (lily-interface
+   'note-column-interface
+   "Stem and noteheads combined"
+   (list
+    (property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting.")
+    (property-description 'force-hshift number? "amount of collision_note_width that overides automatic collision settings.")
+    (property-description 'merge-differently-dotted boolean? "merge black noteheads with differing dot count.")
+    ))
+  )
+
+(define stem-interface
+  (lily-interface
+   'stem-interface
+   "A stem"
+   (list
+    (property-description 'thickness number? "")
+    (property-description 'beamed-lengths list? "")
+    (property-description 'beamed-minimum-lengths list? "")
+    (property-description 'lengths list? "")
+    (property-description 'stem-shorten list? "")
+    (property-description 'default-neutral-direction dir? "")
+    (property-description 'direction dir? "")
+    (property-description 'stem-length number? "")
+    (property-description 'style string? "") ; symbol!?
+    (property-description 'flag-style string? "") ; symbol!?
+    (property-description 'X-offset-callbacks list? "")
+    )))
+
+
+(define slur-interface
+  (lily-interface
+   'slur-interface
+   "A slur"
+   (list
+    (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.")
+    (property-description 'details list? "alist containing contaning a few magic constants.")
+    (property-description 'attachment pair? "cons of symbols, '(LEFT-TYPE . RIGHT-TYPE), where both types may be alongside-stem, stem, head or loose-end")
+    (property-description 'direction dir? "up or down?")
+    (property-description 'y-free number? "? ")
+    (property-description 'control-points list? "")
+    (property-description 'extremity-rules  list? "")
+    (property-description 'extremity-offset-alist list? "")
+    (property-description 'thickness list? "")
+    (property-description 'dash number? "number representing the length of the dashes.")
+    )
+   )
+  )
+
+(define side-position-interface
+  (lily-interface
+   'side-position-interface
+   "put an element next to another one."
+   (list
+    (property-description 'direction dir? "where to put the victim object (left or right?)")
+    (property-description 'side-relative-direction dir? "if set: get the direction from a different object, and multiply by this.")
+    (property-description 'minimum-space number? "minimum distance that the victim should move (after padding)")
+    (property-description 'padding number? "add this much extra space between victim and support")
+    (property-description 'self-alignment-X number? "real number: -1 = left aligned, 0 = center, 1 right-aligned in X direction. Set to an element pointer, if you want that element to be the center. ")
+    (property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis")
+    
+    )
+  ))
+
+(define accidentals-interface
+  (lily-interface
+   'accidentals-interface
+   "Accidentals"
+   (list
+    (property-description 'left-padding number? "space left of accs")
+    (property-description 'right-padding number? "space right of accs")     
+    )
+   ))
+
+(define note-head-interface
+  (lily-interface
+   'note-head-interface
+   "Note head"
+   (list
+    (property-description 'style symbol? "symbol that sets note head style")
+    )
+   ))
+
+
+(define rhythmic-head-interface
+  (lily-interface
+   'rhythmic-head-interface
+   "Note head or rest"
+   (list
+    (property-description 'dot ly-element? "reference to Dots object.")
+    (property-description 'stem ly-element? "pointer to Stem object")
+    (property-description 'duration-log integer? "2-log of the notehead duration")
+    )))
+
+(define rest-interface
+  (lily-interface
+   'rest-interface
+   "a rest"
+   (list
+    (property-description 'style string? "string specifying glyph style"))))
+
+(define tuplet-bracket-interface
+  (lily-interface
+   'tuplet-bracket-interface
+   "A bracket with a number in the middle" 
+   (list
+    (property-description 'beams list? "list of beam ptrs.")
+    (property-description 'columns list? " list of note-columns.")
+    (property-description 'number-gap number? "")
+    (property-description 'delta-y number? "")
+    (property-description 'thick number? "")
+    )
+))
+
+
+(define align-interface
+  (lily-interface
+   'align-interface
+   " Order elements top to bottom/left to right/right to left etc."
+   (list
+    (property-description 'stacking-dir  dir? "stack contents of elements in which direction ?")
+    (property-description 'align-dir  dir? "Which side to align? -1: left side, 0: centered around center-element if not nil, or around center of width), 1: right side")
+    (property-description 'threshold  pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace")
+    (property-description 'alignment-done  boolean? "boolean to administrate whether we've done the alignment already (to ensure that the process is done only once)")
+    (property-description 'center-element ly-element? "element which will be at the
+center of the group after aligning (when using
+Align_interface::center_on_element). The center element should have
+this object as a reference point.")
+    (property-description 'elements  list? "to be aligned elements ")
+    (property-description 'axes  list? "list of axis numbers. Should contain only one number.")
+    )))    
+
+(define aligned-interface
+  (lily-interface
+   'aligned-interface
+   "read by align-interface"
+   (list
+    (property-description 'minimum-space pair? "(cons LEFT RIGHT)")
+    (property-description 'extra-space pair? "(cons LEFT RIGHT)")
+    )))
+
+(define break-aligned-interface
+  (lily-interface
+   'break-aligned-interface
+   "Items that are aligned in prefatory matter"
+   (list
+    (property-description 'break-align-symbol symbol? "the index in the spacing table (symbol) of the to be aligned item.")
+    (property-description 'visibility-lambda procedure? "")
+    (property-description 'breakable boolean? "")
+    )))
+
+(define chord-name-interface
+  (lily-interface
+   'chord-name-interface
+   ""
+   (list
+    )))
+(define time-signature-interface
+  (lily-interface
+   'time-signature-interface
+   "A time signature, in different styles"
+   (list
+    (property-description 'fraction pair? "")
+    (property-description 'style string? "")
+    )))
+
+(define bar-line-interface
+  (lily-interface
+   'bar-line-interface
+   "Bar line"
+   (list
+    (property-description 'barsize-procedure procedure? "")
+    (property-description 'kern number? "")
+    (property-description 'thin-kern number? "")
+    (property-description 'hair-thickness number? "")
+    (property-description 'thick-thickness number? "")
+    (property-description 'glyph string? "")
+    (property-description 'bar-size number? "")
+    (property-description 'break-glyph-function procedure? "")
+   )))
+
+
+
+
+(define text-spanner-interface
+  (lily-interface
+   'text-spanner-interface
+   "generic text spanner"
+   (list
+    (property-description 'dash-period  number? "")
+    (property-description 'dash-length number? "")
+    (property-description 'line-thickness number? "")
+    (property-description 'edge-height pair? "(leftheight . rightheight)")
+    (property-description 'edge-text pair? "(lefttext . righttext)")
+    (property-description 'text-style string? "") ; SYMBOL!!?
+    (property-description 'type string? "line, dashed-line or dotted-line") ; SYMBOL!!?    
+    )
+))
+
+(define hairpin-interface
+  (lily-interface
+   'hairpin-interface
+   "hairpin crescendo"
+   (list
+    (property-description 'grow-direction dir? "")
+    (property-description 'thickness number? "")
+    (property-description 'height number? "")
+    )))
+
+
+(define arpeggio-interface
+  (lily-interface
+   'arpeggio-interface
+   "arpeggio "
+   (list
+    (property-description 'stems list? "list of stem objects, corresponding to the notes that the  arp has to be before.")
+    )
+   )
+  )
+
+(define note-collision-interface
+  (lily-interface
+   'note-collision-interface
+   "note collision"
+   (list
+    (property-description 'note-width 'number? "unit for horizontal translation, measured in staff-space.")
+    )   )  )
+(define dot-interface
+  (lily-interface
+   'dots-interface
+   "The dots to go with a notehead/rest.  A separate interface, since they
+  are a party in collision resolution."
+   (list
+    (property-description 'dot-count integer? "number of dots")
+    )))
+
+(define text-interface
+  (lily-interface
+   'text-interface
+   "A text"
+   (list
+    (property-description 'text string? "")
+    (property-description 'style string? "")
+    )))
+
+
+(define dot-column-interface
+  (lily-interface
+   'dot-column-interface
+   ""
+   (list
+    )))
+
+(define dynamic-interface
+  (lily-interface
+   'dynamic-interface
+   "Any kind of loudness sign"
+   '()
+    ))
+
+
+(define finger-interface
+  (lily-interface
+   'finger-interface
+   "Any kind of loudness sign"
+   '()
+    ))
+
+(define separation-spanner-interface
+  (lily-interface
+   'separation-spanner-interface
+   ""
+   '()
+  ))
+(define text-script-interface
+  (lily-interface
+   'text-script-interface
+   "Any text script"
+   '()
+    ))
+
+(define grace-alignment-interface
+  (lily-interface
+   'grace-alignment-interface
+   "put grace notes in line"
+   (list
+    (property-description 'horizontal-space number? "amount of space to add after a note (in staff-space)")
+    )
+   ))
+
+(define hara-kiri-group-interface
+  (lily-interface
+   'hara-kiri-group-interface
+   "seppuku"
+   '()))
+
+(define lyric-hyphen-interface
+  (lily-interface
+   'lyric-hyphen-interface
+   "A centred hyphen is a simple line between lyrics used to divide
+syllables.   The length of the hyphen line should stretch based on the
+  size of the gap between syllables."
+   (list
+    
+    (property-description 'thickness number? "thickness of line (in stafflinethickness)")
+    (property-description 'height number? "vertical offset  (in staffspace)")
+
+    (property-description 'minimum-length number? "try to make the hyphens at least this long. Also works as a scaling parameter for the length")
+    (property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics)")
+    )))
+
+(define key-signature-interface
+  (lily-interface
+   'key-signature-interface
+   "A group of  accidentals."
+   (list
+    (property-description 'c0-position  integer? "integer indicating the position of central C?")
+    (property-description 'old-accidentals  list? "list of (pitch, accidental) pairs")
+    (property-description 'new-accidentals  list? "list of (pitch, accidental) pairs")
+    )))
+
+(define lyric-extender-interface
+  (lily-interface
+   'lyric-extender-interface
+   "The extender is a simple line at the baseline of the lyric
+  that helps show the length of a melissima (tied/slurred note)."
+   (list
+    (property-description 'word-space  number? "")
+    (property-description 'height  number? "in stafflinethickness")
+    (property-description 'right-trim-amount  number? "")
+    )))
+
+
+(define lyric-syllable-interface
+  (lily-interface
+   'lyric-syllable-interface
+   ""
+   (list
+    (property-description 'word-space  number? "")
+    )))
+
+
+(define mark-interface
+  (lily-interface
+   'mark-interface
+   ""
+   (list
+    )))
+
+(define multi-measure-rest-interface
+  (lily-interface
+   'multi-measure-rest-interface
+   ""
+   (list
+    
+    (property-description 'columns  list? "list of paper-columns")
+    (property-description 'expand-limit  integer? "int : max number of measures expanded in church rests")
+    (property-description 'minimum-width number? "Real in staffspace")
+    (property-description 'padding  number? "staffspace")
+    )))
+
+(define paper-column-interface
+  (lily-interface
+   'paper-column-interface
+   ""
+   (list
+    (property-description 'dir-list  list? "list of stem directions")
+    (property-description 'shortest-playing-duration  moment? "duration of the shortest playing in that column.")
+    (property-description 'shortest-starter-duration  moment? "duration of the shortest notes that starts exactly in this column.")
+    (property-description 'contains-grace  boolean? "Used to widen entries for grace notes.")
+    (property-description 'extra-space  pair? "pair of distances")
+    (property-description 'stretch-distance pair? "pair of distances")
+    )))
+
+(define spaceable-element-interface
+  (lily-interface
+   'spaceable-element-interface
+   ""
+   (list
+     (property-description 'minimum-distances list? "list of rods (ie. (OBJ . DIST) pairs)")
+     (property-description 'ideal-distances  list? "(OBJ . (DIST . STRENGTH)) pairs")
+     (property-description 'dir-list list? "list of stem directions.")
+     )))
+
+(define rest-collision-interface
+  (lily-interface
+   'rest-collision-interface
+   ""
+   (list
+    (property-description 'maximum-rest-count integer? "")
+    (property-description 'minimum-distance number? "")    
+    )))
+
+(define script-interface
+  (lily-interface
+   'script-interface
+   ""
+   (list
+    (property-description 'script-priority number? "")
+    )))
+
+(define script-column-interface
+  (lily-interface
+   'script-column-interface
+   ""
+   (list )))
+
+
+(define spacing-spanner-interface
+  (lily-interface
+   'spacing-spanner-interface
+   ""
+   (list
+    (property-description 'maximum-duration-for-spacing moment? "space as if a duration of this type is available in this measure.")
+    )))
+
+(define staff-symbol-interface
+  (lily-interface
+   'staff-symbol-interface
+   "This spanner draws the lines of a staff.  The middle line is
+position 0."
+   (list
+    (property-description 'staff-space number? "")
+    (property-description 'line-count integer? "")
+    )))
+
+(define stem-tremolo-interface
+  (lily-interface
+   'stem-tremolo-interface
+   ""
+   (list
+    (property-description 'stem ly-element? "pointer to the stem object.")
+    (property-description 'beam-width number? "")
+    (property-description 'beam-thickness number? "")
+    (property-description 'beam-space-function procedure? "")
+    )))
+
+(define separation-item-interface
+  (lily-interface
+   'separation-item-interface
+   ""
+   (list
+    )))
+
+(define sustain-pedal-interface
+  (lily-interface
+   'sustain-pedal-interface
+   ""
+   (list
+    )))
+(define system-start-delimiter
+  (lily-interface
+   'system-start-delimiter
+   ""
+   (list
+    (property-description 'collapse-height number? "")
+    (property-description 'thickness number? "")
+    (property-description 'arch-height number? "")
+    (property-description 'arch-angle number? "")
+    (property-description 'arch-thick number? "")
+    (property-description 'arch-width number? "")
+    (property-description 'bracket-thick number? "")
+    (property-description 'bracket-width number? "")
+    )))
+
+(define text-script-interface
+  (lily-interface
+   'text-script-interface
+   ""
+   (list
+    
+    )))
+
+(define tie-interface
+  (lily-interface
+   'tie-interface
+   ""
+   (list
+    (property-description 'staffline-clearance number? "")
+    (property-description 'heads pair? "pair of element pointers, pointing to the two heads of the  tie. ")
+    (property-description 'details list? "")
+    (property-description 'thickness number? "")
+    (property-description 'x-gap number? "")
+    (property-description 'minimum-length number? "")
+    )))
+
+
+
+(define tie-column-interface
+  (lily-interface
+   'tie-column-interface
+   ""
+   (list
+    )))
+
+(define volta-bracket-interface
+  (lily-interface
+   'volta-bracket-interface
+   "Volta bracket with number"
+   (list
+    (property-description 'bars  list? "list of barline ptrs.")
+    (property-description 'thickness  number? "in stafflinethickness")
+    (property-description 'height  number? "in staffspace ")
+    )))
+
+(define span-bar-interface
+  (lily-interface
+   'span-bar-interface
+   ""
+   (list
+    )))
+
index a18f3fec56a4dd468e6def47fad0f6ce2daa1d98..d7f25a10af59bae2351803fb2ea5b38eb5e0c549 100644 (file)
@@ -11,6 +11,9 @@
 ;
 
 
 ;
 
 
+; We should repartition the entire scm side of lily in a
+; more sane way, using namesspaces/modules?
+
 ;(debug-enable 'backtrace)
 
 ;;; library funtions
 ;(debug-enable 'backtrace)
 
 ;;; library funtions
   (string-append (number->string (car c)) " "
                 (number->string (cdr c)) " "))
 
   (string-append (number->string (car c)) " "
                 (number->string (cdr c)) " "))
 
-
 (define (font i)
   (string-append
    "font"
    (make-string 1 (integer->char (+ (char->integer #\A) i)))
    ))
 
 (define (font i)
   (string-append
    "font"
    (make-string 1 (integer->char (+ (char->integer #\A) i)))
    ))
 
-
-
 (define (scm-scm action-name)
   1)
 
 (define (scm-scm action-name)
   1)
 
      (string-append "\\special{src:" (number->string line) ":"
         (number->string col) " " file "}"
         ;; arg, the clueless take over the mailing list...
      (string-append "\\special{src:" (number->string line) ":"
         (number->string col) " " file "}"
         ;; arg, the clueless take over the mailing list...
-        "\\special{-****-These-warnings-are-harmless-***}"
-        "\\special{-****-PLEASE-read-http://appel.lilypond.org/wiki/index.php3?PostProcessing-****}"
+;       "\\special{-****-These-warnings-are-harmless-***}"
+;       "\\special{-****-PLEASE-read-http://appel.lilypond.org/wiki/index.php3?PostProcessing-****}"
        )
 
      ; line numbers only:
        )
 
      ; line numbers only:
     (6 . 0)
     )
   )
     (6 . 0)
     )
   )
+
+(begin
+  (eval-string (ly-gulp-file "interface.scm"))
+  (eval-string (ly-gulp-file "slur.scm"))
+  (eval-string (ly-gulp-file "font.scm"))  
+  (eval-string (ly-gulp-file "generic-property.scm"))
+  (eval-string (ly-gulp-file "basic-properties.scm"))
+  (eval-string (ly-gulp-file "chord-names.scm"))
+  (eval-string (ly-gulp-file "element-descriptions.scm"))  
+ )
index 046d86ddcf97ec1c2c4d8899644ceec22b671870..2c10991f077dd4bf21e3b273a1b91ebe24b7eb9d 100644 (file)
     ))
 
 
     ))
 
 
-
+(define default-basic-slur-properties
+  `(
+   (molecule-callback . ,Slur::brew_molecule)
+   (thickness . 1.2)           
+   (spacing-procedure . ,Slur::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))
+   (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)))
+   (beautiful . 0.5)
+   (y-free . 0.75)
+   (attachment-offset . ((0 . 0) . (0 . 0)))
+   (slope-limit . 0.8)
+   (meta . ,(element-description "Slur" general-element-interface slur-interface))
+   )
+  )
index 44ca2adec6faf1fd21e993cec60d4e2bdc23b01d..563e0308dcb55dae5a4a54d3fb659cfeac1e3a0f 100644 (file)
@@ -501,14 +501,17 @@ class Staff:
                        gap = (0,1)
                        for m in self.measures[1:]:
                                if not m or not m.valid:
                        gap = (0,1)
                        for m in self.measures[1:]:
                                if not m or not m.valid:
+                                       sys.stderr.write ("Skipping non-existant measure")
                                        continue
 
                                fr = None
                                try:
                                        fr = m.frames[x]
                                except IndexError:
                                        continue
 
                                fr = None
                                try:
                                        fr = m.frames[x]
                                except IndexError:
-                                       pass
-                               
+                                       
+                                       sys.stderr.write ("Skipping nonexistent frame")
+                                       laystr = laystr + "% FOOBAR ! \n"
+                                       print laystr
                                if fr:
                                        first_frame = fr
                                        if gap <> (0,1):
                                if fr:
                                        first_frame = fr
                                        if gap <> (0,1):
@@ -1043,6 +1046,7 @@ for opt in options:
 
 identify()
 
 
 identify()
 
+e = None
 for f in files:
        if f == '-':
                f = ''
 for f in files:
        if f == '-':
                f = ''
index 587a514b06b5728fbeb8e3a19e2bcd52eeac5628..fa2ec8706e418d88472ae6f2588a3c1bda1728e3 100644 (file)
@@ -1,25 +1,8 @@
 #!@PYTHON@
 # vim: set noexpandtab:
 # TODO:
 #!@PYTHON@
 # vim: set noexpandtab:
 # TODO:
-# * Figure out clean set of options.
+# * Figure out clean set of options. Hmm, isn't it pretty ok now?
 # * add support for .lilyrc
 # * add support for .lilyrc
-# * %\def\preMudelaExample should be ignored by mudela-book because
-#   it is commented out
-# * if you run mudela-book once with --no-pictures, and then again
-#   without the option, then the pngs will not be created. You have
-#   to delete the generated .ly files and  rerun mudela-book.
-# * kontroller hvordan det skannes etter preMudelaExample i preamble
-#   det ser ut til at \usepackage{graphics} legges til bare hvis
-#   preMudelaExample ikke finnes.
-# * add suppoert for @c comments. Check that preamble scanning works after this.
-
-# * in LaTeX, commenting out blocks like this
-# %\begin{mudela}
-# %c d e
-# %\end{mudela} works as expected.
-# * \usepackage{landscape} is gone. Convince me it is really neede to get it back.
-# * We are calculating more of the linewidths, for example 2 col from 1 col.
-
 
 
 # This is was the idea for handling of comments:
 
 
 # This is was the idea for handling of comments:
@@ -368,15 +351,11 @@ output_dict= {
                }
        }
 
                }
        }
 
-def output_verbatim (body):#ugh .format
+def output_verbatim (body):
        if __main__.format == 'texi':
                body = re.sub ('([@{}])', '@\\1', body)
        return get_output ('output-verbatim') % body
 
        if __main__.format == 'texi':
                body = re.sub ('([@{}])', '@\\1', body)
        return get_output ('output-verbatim') % body
 
-def output_mbverbatim (body):#ugh .format
-       if __main__.format == 'texi':
-               body = re.sub ('([@{}])', '@\\1', body)
-       return get_output ('output-verbatim') % body
 
 re_dict = {
        'latex': {'input': r'(?m)^[^%\n]*?(?P<match>\\mbinput{?([^}\t \n}]*))',
 
 re_dict = {
        'latex': {'input': r'(?m)^[^%\n]*?(?P<match>\\mbinput{?([^}\t \n}]*))',
@@ -407,13 +386,11 @@ re_dict = {
                 'landscape': no_match,
                 'verbatim': r"""(?s)(?P<code>@example\s.*?@end example\s)""",
                 'verb': r"""(?P<code>@code{.*?})""",
                 'landscape': no_match,
                 'verbatim': r"""(?s)(?P<code>@example\s.*?@end example\s)""",
                 'verb': r"""(?P<code>@code{.*?})""",
-                'mudela-file': '(?P<match>@mudelafile(\[(?P<options>.*?)\])?{(?P<filename>[^}]+)})',
+                'mudela-file': '(?m)^(?!@c)(?P<match>@mudelafile(\[(?P<options>.*?)\])?{(?P<filename>[^}]+)})',
                 'mudela' : '(?m)^(?!@c)(?P<match>@mudela(\[(?P<options>.*?)\])?{(?P<code>.*?)})',
                 'mudela' : '(?m)^(?!@c)(?P<match>@mudela(\[(?P<options>.*?)\])?{(?P<code>.*?)})',
-                #ugh add check for @c
                 'mudela-block': r"""(?m)^(?!@c)(?P<match>(?s)(?P<match>@mudela(\[(?P<options>.*?)\])?\s(?P<code>.*?)@end mudela\s))""",
                  'option-sep' : ', *',
                  'intertext': r',?\s*intertext=\".*?\"',
                 'mudela-block': r"""(?m)^(?!@c)(?P<match>(?s)(?P<match>@mudela(\[(?P<options>.*?)\])?\s(?P<code>.*?)@end mudela\s))""",
                  'option-sep' : ', *',
                  'intertext': r',?\s*intertext=\".*?\"',
-                 #ugh fix
                  'multiline-comment': r"(?sm)^\s*(?!@c\s+)(?P<code>@ignore\s.*?@end ignore)\s",
                  'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>@c.*$\n+))",
                  'numcols': no_match,
                  'multiline-comment': r"(?sm)^\s*(?!@c\s+)(?P<code>@ignore\s.*?@end ignore)\s",
                  'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>@c.*$\n+))",
                  'numcols': no_match,
@@ -574,16 +551,24 @@ def scan_latex_preamble(chunks):
                                paperguru.set_geo_option(k, o[k])
                idx = idx + 1
 
                                paperguru.set_geo_option(k, o[k])
                idx = idx + 1
 
+def scan_texi_preamble (chunks):
+       # this is not bulletproof..., it checks the first 10 chunks
+       idx = 0
+       while 1:
+               if chunks[idx][0] == 'input':
+                       if string.find(chunks[idx][1], "@afourpaper") != -1:
+                               paperguru.m_papersize = 'a4'
+                       elif string.find(chunks[idx][1], "@afourwide") != -1:
+                               paperguru.m_papersize = 'a4wide'
+                       elif string.find(chunks[idx][1], "@smallbook") != -1:
+                               paperguru.m_papersize = 'smallbook'
+               idx = idx + 1
+               if idx == 10 or idx == len(chunks):
+                       break
+
 def scan_preamble (chunks):
        if __main__.format == 'texi':
 def scan_preamble (chunks):
        if __main__.format == 'texi':
-               #ugh has to be fixed when @c comments are implemented
-               # also the searching here is far from bullet proof.
-               if string.find(chunks[0][1], "@afourpaper") != -1:
-                       paperguru.m_papersize = 'a4'
-               elif string.find(chunks[0][1], "@afourwide") != -1:
-                       paperguru.m_papersize = 'a4wide'
-               elif string.find(chunks[0][1], "@smallbook") != -1:
-                       paperguru.m_papersize = 'smallbook'
+               scan_texi_preamble(chunks)
        else:
                assert __main__.format == 'latex'
                scan_latex_preamble(chunks)
        else:
                assert __main__.format == 'latex'
                scan_latex_preamble(chunks)
@@ -679,17 +664,6 @@ def make_mudela_block(m):
        else:
            options = []
        options = filter(lambda s: s != '', options)
        else:
            options = []
        options = filter(lambda s: s != '', options)
-       if 'mbverbatim' in options:#ugh this is ugly and only for texi format
-               s  = m.group()
-               im = get_re('intertext').search(s)
-               if im:
-                       s = s[:im.start()] + s[im.end():]
-               im = re.search('mbverbatim', s)
-               if im:
-                       s = s[:im.start()] + s[im.end():]
-               if s[:9] == "@mudela[]":
-                       s = "@mudela" + s[9:]
-               return [('mudela', m.group('code'), options, s)]
        return [('mudela', m.group('code'), options)]
 
 def do_columns(m):
        return [('mudela', m.group('code'), options)]
 
 def do_columns(m):
@@ -767,11 +741,7 @@ def schedule_mudela_block (chunk):
        TODO has format [basename, extension, extension, ... ]
        
        """
        TODO has format [basename, extension, extension, ... ]
        
        """
-       if len(chunk) == 3:
-               (type, body, opts) = chunk
-               complete_body = None
-       else:# mbverbatim
-               (type, body, opts, complete_body) = chunk
+       (type, body, opts) = chunk
        assert type == 'mudela'
        file_body = compose_full_body (body, opts)
        basename = `abs(hash (file_body))`
        assert type == 'mudela'
        file_body = compose_full_body (body, opts)
        basename = `abs(hash (file_body))`
@@ -784,7 +754,6 @@ def schedule_mudela_block (chunk):
                        else:
                            taken_file_names[basename] = taken_file_names[basename] + 1
                            basename = basename + "-%i" % taken_file_names[basename]
                        else:
                            taken_file_names[basename] = taken_file_names[basename] + 1
                            basename = basename + "-%i" % taken_file_names[basename]
-       # writes the file if necessary, returns true if it was written
        if not g_read_lys:
                update_file(file_body, os.path.join(g_outdir, basename) + '.ly')
        needed_filetypes = ['tex']
        if not g_read_lys:
                update_file(file_body, os.path.join(g_outdir, basename) + '.ly')
        needed_filetypes = ['tex']
@@ -795,18 +764,24 @@ def schedule_mudela_block (chunk):
        if 'eps' in opts and not ('eps' in needed_filetypes):
                needed_filetypes.append('eps')
        outname = os.path.join(g_outdir, basename)
        if 'eps' in opts and not ('eps' in needed_filetypes):
                needed_filetypes.append('eps')
        outname = os.path.join(g_outdir, basename)
-       if not os.path.isfile(outname + '.tex') \
-               or os.stat(outname+'.ly')[stat.ST_MTIME] > \
-                       os.stat(outname+'.tex')[stat.ST_MTIME]:
-               todo = needed_filetypes
-       else:
-               todo = []
-               
+       def f(base, ext1, ext2):
+               a = os.path.isfile(base + ext2)
+               if (os.path.isfile(base + ext1) and
+                   os.path.isfile(base + ext2) and
+                               os.stat(base+ext1)[stat.ST_MTIME] >
+                               os.stat(base+ext2)[stat.ST_MTIME]) or \
+                               not os.path.isfile(base + ext2):
+                       return 1
+       todo = []
+       if 'tex' in needed_filetypes and f(outname, '.ly', '.tex'):
+               todo.append('tex')
+       if 'eps' in needed_filetypes and f(outname, '.tex', '.eps'):
+               todo.append('eps')
+       if 'png' in needed_filetypes and f(outname, '.eps', '.png'):
+               todo.append('png')
        newbody = ''
        if 'verbatim' in opts:
                newbody = output_verbatim (body)
        newbody = ''
        if 'verbatim' in opts:
                newbody = output_verbatim (body)
-       elif 'mbverbatim' in opts:
-               newbody = output_mbverbatim (complete_body)
 
        for o in opts:
                m = re.search ('intertext="(.*?)"', o)
 
        for o in opts:
                m = re.search ('intertext="(.*?)"', o)