]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.61 release/1.3.61
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 17 Jun 2000 23:56:26 +0000 (01:56 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 17 Jun 2000 23:56:26 +0000 (01:56 +0200)
===========

* Webpage hacking

1.3.60.h

98 files changed:
CHANGES
Documentation/GNUmakefile
Documentation/Localisation.texi
Documentation/footer.html.in
Documentation/hacking.texi
Documentation/header.html.in
Documentation/index.texi
Documentation/misc/GNUmakefile
Documentation/regression-test.tely
Documentation/topdocs/index.tely
Documentation/user/glossary.tely
Documentation/user/refman.itely
Documentation/user/tutorial.itely
VERSION
buildscripts/ps-to-gifs.sh [deleted file]
input/test/hara-kiri-short.ly [new file with mode: 0644]
input/test/scales-fixme.ly [deleted file]
input/test/scales.ly [new file with mode: 0644]
input/trip.ly
lily/all-font-metrics.cc
lily/auto-beam-engraver.cc
lily/axis-group-engraver.cc
lily/bar-engraver.cc
lily/bar-number-engraver.cc
lily/bar.cc
lily/breathing-sign.cc
lily/chord-name-engraver.cc
lily/chord-name.cc
lily/clef-engraver.cc
lily/clef-item.cc
lily/dots.cc
lily/dynamic-engraver.cc
lily/extender-engraver.cc
lily/hara-kiri-engraver.cc
lily/hara-kiri-vertical-group-spanner.cc
lily/hyphen-engraver.cc
lily/hyphen-spanner.cc
lily/identifier.cc
lily/include/bar.hh
lily/include/extender-spanner.hh
lily/include/hara-kiri-vertical-group-spanner.hh
lily/include/hyphen-engraver.hh [deleted file]
lily/include/hyphen-spanner.hh
lily/include/identifier.hh
lily/include/lily-proto.hh
lily/include/lyric-engraver.hh
lily/include/midi-def.hh
lily/include/paper-def.hh
lily/include/slur.hh
lily/include/spanner.hh
lily/include/sustain-pedal.hh [deleted file]
lily/include/system-start-delimiter.hh
lily/include/text-item.hh
lily/include/tie.hh
lily/include/translator-group.hh
lily/include/translator.hh
lily/instrument-name-engraver.cc
lily/key-item.cc
lily/lexer.ll
lily/lily-guile.cc
lily/line-number-engraver.cc
lily/lyric-engraver.cc
lily/lyric-extender.cc
lily/mark-engraver.cc
lily/midi-def.cc
lily/note-heads-engraver.cc
lily/note-name-engraver.cc
lily/paper-def.cc
lily/paper-outputter.cc
lily/parser.yy
lily/piano-pedal-engraver.cc
lily/rest.cc
lily/scope.cc
lily/score-element.cc
lily/span-bar.cc
lily/stem.cc
lily/sustain-pedal.cc
lily/system-start-delimiter.cc
lily/text-engraver.cc
lily/text-item.cc
lily/translator.cc
lily/tuplet-spanner.cc
ly/declarations.ly
ly/engraver.ly
ly/init.ly
ly/params-as.ly
ly/params.ly
ly/scale-definitions.ly [new file with mode: 0644]
ly/scales.ly [deleted file]
make/lilypond-vars.make
make/mudela-rules.make
make/out/lilypond.lsm
make/out/lilypond.spec
make/toplevel.make.in
scm/lily.scm
scripts/abc2ly.py
stepmake/bin/add-html-footer.py
stepmake/stepmake/documentation-vars.make

diff --git a/CHANGES b/CHANGES
index 885fa95906361dddc3c098f9ed861a4e70dea431..652041d578466d45423d8eafb5d56367ae9f1215 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,29 +1,24 @@
---- ../lilypond-1.3.60.jcn1/CHANGES    Sat Jun 17 16:10:49 2000
-++ b/CHANGES   Sun Jun 18 16:18:28 2000
-@@ -1,3 +1,9 @@
-1.3.60.jcn2
-===========
-
-* Did som more webpage hacking and made some make website fixes, back links
-  should work again.
-
- 1.3.60.jcn1
- ===========
- --- ../lilypond-1.3.60/CHANGES        Fri Jun 16 16:45:48 2000
-++ b/CHANGES   Sat Jun 17 16:10:49 2000
-@@ -1,3 +1,8 @@
 1.3.60.jcn1
 ===========
 
 * Webpage hacking
 
- 1.3.59.hwn1
- ===========
- 1.3.60.mb1
+1.3.60.hwn1
 ===========
 
-* First attempt to reintroduce support for keys with different
-  accidentals in different octaves.
+* Junk int_identifier, real_identifier. Merged Midi_def_identifier and
+Paper_def_identifier.
+
+* Fixed bug with spanning barlines in combination with Hara-Kiri staffs.
+
+* Cleaned up Text_item, Hyphen_spanner, Lyric_extender and
+Sustain_pedal and reduced them to an Score_element interface (they are
+no longer Score_element derived types).
+
+* Some instances of brew_molecule routines have moved out of
+Score_element, and are now called scheme_molecule.
+
+* Moved lots of parameters from ly/params.ly to ly/engraver.ly
 
 1.3.59.hwn1
 ===========
index 40b54c886bcbf10c2beb67f487e45f383348d14f..72aeaddca76d010edb642e0e88fcabb4725e7b6c 100644 (file)
@@ -12,15 +12,8 @@ include $(depth)/make/stepmake.make
 
 default: local-doc
 
-local-WWW: copy-for-me txt-to-html $(outdir)/regression-test.ps.gz $(outdir)/regression-test.html footify
+local-WWW: copy-for-me $(outdir)/regression-test.ps.gz $(outdir)/regression-test.html footify
 
 copy-for-me:
-       $(foreach a, $(README_TOP_FILES), cp ../$(a) $(outdir)/$(a).txt && ) true
+       $(foreach a, $(README_TOP_FILES),cp ../$(a) $(outdir)/$(a).txt && ) true
 
-txt-to-html:
-       $(foreach a, $(README_TOP_FILES), \
-               echo "<html><body><xmp>" > $(outdir)/$(a).html;\
-               cat $(outdir)/$(a).txt >> $(outdir)/$(a).html;\
-               echo "</xmp></body></html>" >> $(outdir)/$(a).html\
-       && ) true
-       $(footify) $(addprefix $(outdir)/, $(addsuffix .html, $(README_TOP_FILES)))
index 672cbf65920118d7bf7881e87d6414e49c451ab9..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,180 +0,0 @@
-\input texinfo @c -*-texinfo-*- vim:tw=72
-@setfilename Localisation
-@settitle Localisation - User messages in LilyPond
-
-@node Top, , , (dir)
-@top
-
-@chapter Localisation - User messages in LilyPond
-
-@section Introduction
-
-This document provides some guidelines for uniformising user messages.
-In the absence of other standards, we'll be using these rules when coding
-for for LilyPond@footnote{
-In addition to the C++ coding standards that come with Lily
-}.  Hopefully, this can be replaced by general GNU
-guidelines in the future.  
-
-Not-preferred messages are marked with @code{+}.
-By convention, agrammatical examples are marked with @code{*}.
-
-
-@section Guidelines
-
-@itemize @bullet
-
-@item
-Every message to the user should be localised (and thus be marked
-for localisation).  This includes warning and error messages.
-
-@item
-Don't localise/gettextify:
-
-@itemize @minus
-@item @code{programming_error ()}s
-@item @code{programming_warning ()}s
-@item debug strings
-@item output strings (PostScript, TeX)@footnote{
-This may seem ridiculously obvious, however, makeinfo-3.12s localises
-output strings.  Sending bug report now ---jcn
-}
-@end itemize
-
-
-
-@item
-Messages to be localised must be encapsulated in @code{_ (STRING)}
-or @code{_f (FORMAT, ...)}.  Eg:
-
-@example
-warning (_ ("Need music in a score"));
-error (_f ("Can't open file: `%s'", file_name));
-@end example
-
-In some rare cases you may need to call @code{gettext ()} by hand.
-This happens when you pre-define (a list of) string constants for later
-use.  In that case, you'll probably also need to mark these string
-constants for translation, using @code{_i (STRING)}.  The @code{_i}
-macro is a no-op, it only serves as a marker for @file{xgettext}.
-
-@example
-char const* messages[] = @{
-  _i ("enable debugging output"),
-  _i ("ignore mudela version"),
-  0
-@};
-
-void
-foo (int i)
-@{
-  puts (gettext (messages [i]));
-@}
-@end example
-
-See also
-@file{flower/getopt-long.cc} and @file{lily/main.cc}.
-
-@item
-Don't use leading or trailing whitespace in messages.
-
-@item
-Messages containing a final verb, or a gerund (@code{-ing}-form)
-always start with a capital.  Other (simpler) messages start with
-a lowercase letter:
-
-@example
-The word `foo' is not declared.
-`foo': not declared.
-Not declaring: `foo'.
-@end example
-
-@item
-To avoid having a number of different messages for the same situation,
-we'll use quoting like this @code{"message: `%s'"} for all strings.
-Numbers are not quoted:
-
-@example
-_f ("Can't open file: `%s'", name_str)
-_f ("Can't find charater number: %d", i)
-@end example
-
-@item
-Think about translation issues.  
-In a lot of cases,it's better to translate a whole message.
-The english grammar mustn't be imposed on the translator.
-So, iso
-
-@example
-_ ("Stem at ") + moment.str () + _(" doen't fit in beam")
-@end example
-
-@noindent
-have
-
-@example
-_f ("Stem at %s doen't fit in beam", moment.str ())
-@end example
-
-@item
-Split up multi-sentence messages, whenever possible.  Instead of
-
-@example
-warning (_f ("out of tune!  Can't find: `%s', "Key_engraver"));
-
-warning (_f ("Can't find font `%s', loading default", 
-             font_name));
-@end example
-
-@noindent
-rather say:
-
-@example
-warning (_ ("out of tune:");
-warning (_f ("Can't find: `%s', "Key_engraver"));
-
-warning (_f ("Can't find font: `%s', font_name));
-warning (_f ("Loading default font"));
-@end example
-
-@item
-If you must have multiple-sentence messages, use full punctuation.
-Use two spaces after end of sentence punctuation.
-No punctuation (esp. period) is used at the end of simple messages.
-
-@example
-   _f ("Non-matching braces in text `%s', adding braces", text)
-   _ ("Debug output disabled.  Compiled with NPRINT.")
-   _f ("Huh?  Not a Request: `%s'.  Ignoring.", request)
-@end example
-
-@item
-Don't modularise too much; a lot of words cannot be translated
-without context.
-It's probably safe to treat most occurences of words like
-stem, beam, crescendo as separately translatable words.
-
-@item
-When translating, it is preferrable to put interesting information 
-at the end of the message, rather than embedded in the middle.
-This especially applies to frequently used messages, even if this
-would mean sacrificing a bit of eloquency.  This holds for original
-messages too, of course.
-
-@example
-    en: can't open: `foo.ly'
-+   nl: kan `foo.ly' niet openen (1)
-    kan niet openen: `foo.ly'*   (2)
-    niet te openen: `foo.ly'*    (3)
-@end example
-
-The first nl message, although gramatically and stylishly correct,
-is not friendly for parsing by humans (even if they speak dutch).
-I guess we'd prefer something like (2) or (3).
-
-@item
-Please don't run make po/po-update with GNU gettext < 0.10.35
-
-@end itemize
-
-@bye
index 205114b3354ee4c92d7fbf6ebbe08f8054f11676..bcae009876f14208e2ba654642626be628c3f6ff 100644 (file)
@@ -1,20 +1,27 @@
-<!--
-
-If this file ./Documentation/footer.html.in is present,
-it is included automatically by add-html-footer.py,
-which substitutes some @AT_VARIABLES@ as well.
 
-!-->
-
-<! Layout shamelessly inspired by Franc,ois Pinard's TP pages >
+<! shamefully inspired by Franc,ois Pinard's TP pages >
 
     </td>
   </tr>
+</table>
+
+<!--
+
+if this file ./Documentation/footer.html.in is present, it is included
 
-  <tr align=left valign=bottom>
-   <td align=left valign=middle colspan=3 width="100%" bgcolor="#e8e8ff">
+automatically by add-html-footer, and replaces the simple standard
+footer substitutions:
 
-Go <a href="@INDEX@">back</a> to index of LilyPond.
+ * index,
+ * package name
+ * package name
+ * ENV:WEBMASTER,
+ * ENV:WEBMASTER
+
+-->
+
+<hr>
+Go <a href=%s>back</a> to index of LilyPond.
 
 <p>
 Please send GNU LilyPond questions and comments to 
@@ -23,8 +30,12 @@ Please send GNU LilyPond questions and comments to
 <em>gnu-music-discuss@gnu.org</em></a>.
 <p>
 
+<!-- package %s %s -->
+
 Please send comments on these web pages to 
-<a href="mailto:@MAIL_ADDRESS@"><em>@MAIL_ADDRESS@</em></a>
+<a href="mailto:%s"><em>%s</em></a>
+
+
 
 <p>
 
@@ -35,6 +46,3 @@ Copyright (c) 1997, 1998, 1999, 2000 Han-Wen Nienhuys and Jan Nieuwenhuizen.
 Verbatim copying and distribution of this entire article is 
 permitted in any medium, provided this notice is preserved.<p>
 
-   </td>
-  </tr>
-</table>
index e7a09fe3f0ac239d7a432ede47dc5434c43ae3a5..8c6d9d0fffd7ae7a6a8bed4b477023ddf4d80335 100644 (file)
@@ -18,7 +18,7 @@
 * Future work::
 * Coding standards::
 * Making patches::
-
+* Localisation::
 @end menu
 
 @node LilyPond internals,  , Top, Top
@@ -563,63 +563,6 @@ The source is commented in the DOC++ style.  Check out doc++ at
        
 Unfortunately most of the code isn't really documented that good.
 
-@unnumberedsubsec Members (2)
-
-Standard methods:
-
-@example 
-
-       ///check that *this satisfies its invariants, abort if not.
-       void OK () const
-
-       /// print *this (and substructures) to debugging log
-       void print () const
-
-       /**
-       protected member. Usually invoked by non-virtual XXXX ()
-       */
-       virtual do_XXXX ()
-
-       /**add some data to *this.
-       Presence of these methods usually imply that it is not feasible to this
-       via  a constructor
-       */
-       add (..)
-
-       /// replace some data of *this
-       set (..)
-@end example 
-
-@unnumberedsubsec Constructor
-
-Every class should have a default constructor.  
-
-Don't use non-default constructors if this can be avoided:
-
-@example 
-
-       Foo f(1)
-@end example 
-
-is less readable than
-
-@example 
-
-       Foo f;
-       f.x = 1
-@end example 
-
-or 
-
-@example 
-
-       Foo f(Foo_convert::int_to_foo (1))
-@end example 
-
 @unnumberedsec Hungarian notation naming convention
 
 Proposed is a naming convention derived from the so-called
@@ -849,6 +792,183 @@ and don't forget to make automatically generated files:
     configure
  
 @end example 
+
+@node Localisation, , , Top 
+
+@chapter Localisation - User messages in LilyPond
+
+@section Introduction
+
+This document provides some guidelines for uniformising user messages.
+In the absence of other standards, we'll be using these rules when coding
+for for LilyPond@footnote{
+In addition to the C++ coding standards that come with Lily
+}.  Hopefully, this can be replaced by general GNU
+guidelines in the future.  
+
+Not-preferred messages are marked with @code{+}.
+By convention, agrammatical examples are marked with @code{*}.
+
+
+@section Guidelines
+
+@itemize @bullet
+
+@item
+Every message to the user should be localised (and thus be marked
+for localisation).  This includes warning and error messages.
+
+@item
+Don't localise/gettextify:
+
+@itemize @minus
+@item @code{programming_error ()}s
+@item @code{programming_warning ()}s
+@item debug strings
+@item output strings (PostScript, TeX)@footnote{
+This may seem ridiculously obvious, however, makeinfo-3.12s localises
+output strings.  Sending bug report now ---jcn
+}
+@end itemize
+
+
+
+@item
+Messages to be localised must be encapsulated in @code{_ (STRING)}
+or @code{_f (FORMAT, ...)}.  Eg:
+
+@example
+warning (_ ("Need music in a score"));
+error (_f ("Can't open file: `%s'", file_name));
+@end example
+
+In some rare cases you may need to call @code{gettext ()} by hand.
+This happens when you pre-define (a list of) string constants for later
+use.  In that case, you'll probably also need to mark these string
+constants for translation, using @code{_i (STRING)}.  The @code{_i}
+macro is a no-op, it only serves as a marker for @file{xgettext}.
+
+@example
+char const* messages[] = @{
+  _i ("enable debugging output"),
+  _i ("ignore mudela version"),
+  0
+@};
+
+void
+foo (int i)
+@{
+  puts (gettext (messages [i]));
+@}
+@end example
+
+See also
+@file{flower/getopt-long.cc} and @file{lily/main.cc}.
+
+@item
+Don't use leading or trailing whitespace in messages.
+
+@item
+Messages containing a final verb, or a gerund (@code{-ing}-form)
+always start with a capital.  Other (simpler) messages start with
+a lowercase letter:
+
+@example
+The word `foo' is not declared.
+`foo': not declared.
+Not declaring: `foo'.
+@end example
+
+@item
+To avoid having a number of different messages for the same situation,
+we'll use quoting like this @code{"message: `%s'"} for all strings.
+Numbers are not quoted:
+
+@example
+_f ("Can't open file: `%s'", name_str)
+_f ("Can't find charater number: %d", i)
+@end example
+
+@item
+Think about translation issues.  
+In a lot of cases,it's better to translate a whole message.
+The english grammar mustn't be imposed on the translator.
+So, iso
+
+@example
+_ ("Stem at ") + moment.str () + _(" doen't fit in beam")
+@end example
+
+@noindent
+have
+
+@example
+_f ("Stem at %s doen't fit in beam", moment.str ())
+@end example
+
+@item
+Split up multi-sentence messages, whenever possible.  Instead of
+
+@example
+warning (_f ("out of tune!  Can't find: `%s', "Key_engraver"));
+
+warning (_f ("Can't find font `%s', loading default", 
+             font_name));
+@end example
+
+@noindent
+rather say:
+
+@example
+warning (_ ("out of tune:");
+warning (_f ("Can't find: `%s', "Key_engraver"));
+
+warning (_f ("Can't find font: `%s', font_name));
+warning (_f ("Loading default font"));
+@end example
+
+@item
+If you must have multiple-sentence messages, use full punctuation.
+Use two spaces after end of sentence punctuation.
+No punctuation (esp. period) is used at the end of simple messages.
+
+@example
+   _f ("Non-matching braces in text `%s', adding braces", text)
+   _ ("Debug output disabled.  Compiled with NPRINT.")
+   _f ("Huh?  Not a Request: `%s'.  Ignoring.", request)
+@end example
+
+@item
+Don't modularise too much; a lot of words cannot be translated
+without context.
+It's probably safe to treat most occurences of words like
+stem, beam, crescendo as separately translatable words.
+
+@item
+When translating, it is preferrable to put interesting information 
+at the end of the message, rather than embedded in the middle.
+This especially applies to frequently used messages, even if this
+would mean sacrificing a bit of eloquency.  This holds for original
+messages too, of course.
+
+@example
+    en: can't open: `foo.ly'
++   nl: kan `foo.ly' niet openen (1)
+    kan niet openen: `foo.ly'*   (2)
+    niet te openen: `foo.ly'*    (3)
+@end example
+
+The first nl message, although gramatically and stylishly correct,
+is not friendly for parsing by humans (even if they speak dutch).
+I guess we'd prefer something like (2) or (3).
+
+@item
+Please don't run make po/po-update with GNU gettext < 0.10.35
+
+@end itemize
+
+@bye
+
     
 
 @bye
index f6a9b01c200ec19b2eedd8729e1dcdc42f72a4de..e96b3aaf299d11e2ad76acaef295f3edb6fa08bb 100644 (file)
-<!--
 
-If this file ./Documentation/header.html.in is present,
-it is included automatically by add-html-footer.py,
-which substitutes some @AT_VARIABLES@ as well.
+<! your header here >
+<! shamefully inspired by Franc,ois Pinard's TP pages >
 
-!-->
-
-<! Layout shamelessly inspired by Franc,ois Pinard's TP pages >
-
-<!--
-<table cellpadding=5 width="100%">
-  <tr align=left valign=bottom>
-   <td align=middle valign=middle colspan=3 width="100%" bgcolor="#e8ffe8">
-    <h1>
-    GNU LilyPond
-    </h1>
-    <h2>Welcome to the home of the GNU Music Typesetter</h2>
-   </td>
-  </tr>
-!-->
+<! ur* can't we generate this with @table from a .texi? >
 
+<bgcolor="grey">
 <table cellpadding=5 width="100%">
-  <tr align=left valign=bottom>
-    <td align=center valign=middle width="15%" bgcolor="#e8ffe8">
-      <img align=center valign=middle
-        src="@TOP@Documentation/pictures/out-www/lelie-icon.png" alt="[icon]">
-     </td>
-    <td align=center valign=middle width="85%" bgcolor="#e8ffe8">
-      <h1>GNU LilyPond</h1>
-      <h2>Welcome to the home of the GNU Music Typesetter</h2>
-    </td>
-  </tr>
-
   <tr>
-    <td align=left valign=top width="15%" bgcolor="#e8ffe8">
+    <td align=left valign=top width="15%" bgcolor="grey">
     <table align=left>
-      <tr><td bgcolor="#e8e8ff"><a href="@INDEX@"><b>Home</b></a></td></tr>
+      <tr><td bgcolor="cyan"><b>General info</b></td></tr>
       <tr><td><font size=-1>
-        <a href="http://appel.dyndns.org/lilypond">Hacking</a><br>
-        <a href="http://www.gnu.org">GNU Project</a><br>
-        <a href="http://www2.iro.umontreal.ca/~pinard/po/registry.cgi?domain=lilypond">Translations</a><br>
-        <a href="http://www.lilypond.org">LilyPond dot org</a><br>
-       <br>
-      </td></tr>
-      <tr><td bgcolor="#e8e8ff">
-       <a href="@TOP@Documentation/out-www/index.html"><b>Documentation</b></a>
-      </td></tr>
-      <tr><td><font size=-1>
-       <a href="@TOP@Documentation/out-www/CHANGES.html">News</a><br>
-       <a href="@TOP@Documentation/out-www/faq.html">FAQ</a><br>
-       <a href="@TOP@Documentation/user/out-www/lilypond.html">User manual</a><br>
-       <a href="@TOP@Documentation/out-www/regression-test.html">Features</a><br>
-       <a href="http://appel.dyndns.org/lilypond/todo.html">Todo</a><br>
-       <br>
-      </td></tr>
-      <tr><td bgcolor="#e8e8ff">
-       <a href="@INDEX@#download-source"><b>Download Source</b></a>
-      </td></tr>
-      <tr><td><font size=-1>
-        <a href="ftp://ftp.gnu.org/pub/gnu/lilypond">Stable</a><br>
-        <a href="ftp://ftp.cs.uu.nl/pub/gnu/LilyPond/development">Development</a><br>
-       <br>
-      </td></tr>
-      <tr><td bgcolor="#e8e8ff">
-       <a href="@INDEX@#download-binary"><b>Download Binary</b></a>
-      </td></tr>
-      <tr><td><font size=-1>
-       <a href="ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/RPMS/">RedHat i386</a><br>
-       <a href="ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/RPMS/">LinuxPPC</a><br>
-       <a href="ftp://ftp.debian.org/debian/dists/unstable/main/binary-i386/tex">Debian i386</a><br>
-       <a href="ftp://ftp.debian.org/debian/dists/unstable/main/binary-powerpc/tex">Debian PowerPC</a><br>
-       <a href="http://home.austin.rr.com/jbr/jeff/lilypond/">Windows Stable</a><br>
-       <a href="http://appel.dyndns.org/lilypond/gnu-windows/zip">Windows Testing</a><br>
-       <br>
-      </td></tr>
-      <tr><td bgcolor="#e8e8ff">
-       <a href="@INDEX@#music"><b>Music</b></a>
-      </td></tr>
-      <tr><td><font size=-1>
-       <a href="@TOP@short-examples.html">Short examples</a><br>
-       <a href="@TOP@long-examples.html">Longer examples</a><br>
-       <a href="http://sca.uwaterloo.ca/Mutopia/">Mutopia Project</a><br>
-       <a href="http://www.geocities.com/Vienna/Studio/1714/scarlattidwn.html">Jonh Sankey</a><br>
-       <a href="http://www4.smart.net/~jcovey/scores/">Jeff Covey</a><br>
-       <a href="http://www.alqualonde.de/lilypond.html">Dirk Lattermann</a><br>
-       <br>
-      </td></tr>
-      <tr><td bgcolor="#e8e8ff">
-        <a href="@INDEX@#mailing-lists"><b>Mailing Lists</b></a>
+          <a href="http://www.lilypond.org"><b>Entry page</b></a><br>
+          <a href="http://appel.dyndns.org/lilypond"><b>Hacking</b></a><br>
       </td></tr>
+      <tr><td bgcolor="cyan"><b>Download Source</b></td></tr>
       <tr><td><font size=-1>
-       <a href="http://www.mail-archive.com/gnu-music-discuss@gnu.org">Discussion</a><br>
-       <a href="http://www.mail-archive.com/help-gnu-music@gnu.org">Help</a><br>
-       <a href="http://www.mail-archive.com/bug-gnu-music@gnu.org">Bugs</a><br>
-       <br>
+          <a href="ftp://ftp.gnu.org/pub/gnu/lilypond"><b>Stable</b></a><br>
+          <a href="ftp://cs.uu.nl/pub/gnu/LilyPond/development"><b>Development</b></a><br>
       </td></tr>
-    </table>
-  <td align=left valign=top width="85%">
+  </table>
+  <! /tr >
+  <td align=left valign=top width="90%">
 
 
index feb58100c952ab7a7bc88fd87e81a79213265e9f..d3ee87f0cdc6a5b5c4610a4cb5d73a2cb81daa9b 100644 (file)
@@ -9,11 +9,11 @@
 @unnumberedsubsec General information
 
 @itemize @bullet 
-@item @uref{DEDICATION.html,Dedication}
+@item @uref{DEDICATION.txt,Dedication}
 @item @uref{../topdocs/out-www/AUTHORS.html, Authors}
 @item @uref{../topdocs/out-www/README.html, Readme file}
 @item @uref{../topdocs/out-www/INSTALL.html, Installation instructions}
-@item @uref{CHANGES.html, Things recently done}
+@item @uref{CHANGES.txt, Things recently done}
 @item @uref{faq.html,FAQ: Frequently asked questions}, with answers
 @end itemize
 
@@ -66,18 +66,18 @@ by computer}.
 @itemize @bullet
 @item @uref{hacking.html,Internals} details of the implementation
 @item @uref{README-W32.html,Compiling and running on Windows32}
-@item @uref{../misc/out-www/CHANGES-0.0.html, Change logs from 0.0 till 0.1 }
-@item @uref{../misc/out-www/CHANGES-0.1.html, Change logs from 0.1 till 1.0 }
-@item @uref{../misc/out-www/CHANGES-1.0.html, Change logs from 1.0 till 1.1 }
-@item @uref{../misc/out-www/CHANGES-1.1.html, Change logs from 1.1 till 1.2 }
-@item @uref{../misc/out-www/NEWS-1.2.html, summary of changes from 1.1 till 1.2 }
-@item @uref{../misc/out-www/ANNOUNCE-0.1.html, Announcement of 0.1 (includes summary of
+@item @uref{../misc/out-www/CHANGES-0.0.txt, Change logs from 0.0 till 0.1 }
+@item @uref{../misc/out-www/CHANGES-0.1.txt, Change logs from 0.1 till 1.0 }
+@item @uref{../misc/out-www/CHANGES-1.0.txt, Change logs from 1.0 till 1.1 }
+@item @uref{../misc/out-www/CHANGES-1.1.txt, Change logs from 1.1 till 1.2 }
+@item @uref{../misc/out-www/NEWS-1.2.txt, summary of changes from 1.1 till 1.2 }
+@item @uref{../misc/out-www/ANNOUNCE-0.1.txt, Announcement of 0.1 (includes summary of
 changes)}
-@item @uref{../misc/out-www/ANNOUNCE-1.0.html, Announcement of 1.0 (includes summary of
+@item @uref{../misc/out-www/ANNOUNCE-1.0.txt, Announcement of 1.0 (includes summary of
 changes)}
-@item @uref{../misc/out-www/ANNOUNCE-1.2.html, Announcement of 1.2 (includes summary of changes)}
-@item @uref{../misc/out-www/AIMS.html, Why LilyPond?}
-@item @uref{../misc/out-www/interview.html, Answers} to the Brave GNU world standard questions.
+@item @uref{../misc/out-www/ANNOUNCE-1.2.txt, Announcement of 1.2 (includes summary of changes)}
+@item @uref{../misc/out-www/AIMS.txt, Why LilyPond?}
+@item @uref{../misc/out-www/interview.txt, Answers} to the Brave GNU world standard questions.
 @end itemize
 
 
index ebcf4f2fd0eebc5191d182f322139d779215be89..003590955bb2f06eb1583a4fd4d755a0b48eed40 100644 (file)
@@ -11,20 +11,10 @@ include $(depth)/make/stepmake.make
 
 default: local-doc
 
-#urg default local-WWW target uses footify before its time; 
-# must add footify with txt-to-html target
-local-WWW:  $(addprefix $(outdir)/, $(addsuffix .txt, $(TEXTS))) $(OUT_HTMLFILES) txt-to-html
+local-WWW: $(addprefix $(outdir)/, $(addsuffix .txt, $(TEXTS)))
 
 copy-for-me:
-       $(foreach a, $(README_TOP_FILES), cp ../$(a) $(outdir)/$(a).txt && ) true
+       $(foreach a, $(README_TOP_FILES),cp ../$(a) $(outdir)/$(a).txt && ) true
 
 $(outdir)/%.txt: %
        cp $< $@
-
-txt-to-html:
-       $(foreach a, $(TEXTS),\
-               echo "<html><body><xmp>" > $(outdir)/$(a).html;\
-               cat $(outdir)/$(a).txt >> $(outdir)/$(a).html;\
-               echo "</xmp></body></html>" >> $(outdir)/$(a).html\
-       && ) true
-       $(footify) $(addprefix $(outdir)/, $(addsuffix .html, $(TEXTS)))
index 83848bfbdf4fa3f8571b0d3ee8f69306023c1484..661be6f850b8c247f5864171298e642b30309395 100644 (file)
@@ -328,6 +328,13 @@ two measures all have the same distance from each other:
 
 @mudelafile{breathing-sign.ly}
 
+Hara kiri staffs kill themselves if they are empty.  This example really
+contains two staffs, but the second contains only spaces, and is
+therefore removed. 
+
+@mudelafile{hara-kiri-short.ly}
+
+
 Fonts are  available in a default set of sizes: 11, 13, 16, 20, 23 and
 26pt staffheight.  Sizes of the text fonts and symbol fonts are made
 to match the staff dimensions.    
index 0f8eff1238358f07a5dafb489c7f5ce577d4e294..cd29b6442a5cb5b6f8f5d2b01c0e49719db8a2c1 100644 (file)
@@ -6,10 +6,9 @@
 @top
 
 @html
-<!----
 <p align=center>
 [
-    <a href="#download-source">Download</a>
+    <a href="#download">Download</a>
     |
     <a href="Documentation/out-www/faq.html">FAQ</a>
     |
     |
     <a href="#mailing-lists">Mailing lists</a>
     |
-    <a href="Documentation/out-www/CHANGES.html">News</a>
+    <a href="Documentation/out-www/CHANGES.txt">News</a>
 ]
-!---->
 @end html
 
 @html
 <p align=center>
 <img src="Documentation/pictures/out-www/lelie-logo.png" alt="[logo]">
 @end html
-
-@c @unnumberedsec LilyPond -- The GNU Project Music Typesetter
+@unnumberedsec LilyPond -- The GNU Project Music Typesetter
 
 @c something breaks on 3.12 f
 
@@ -47,10 +44,9 @@ The input to LilyPond is plain text. So, you can use your favorite text
 editor to enter it, you can put it in mail or embed it in an article like
 this:
 
-@c \relative c''{ \key es \major; r8 [c16 b] [c8 g] [as c16 b] [c8 d] | g,4 }
 @quotation
 @mudela[fragment,verbatim]
-\relative c''{ \key es \major; r8 c16 b c8 g as c16 b c8 d | g,4 }
+       \relative c'' { \key c \minor; r8 [c16 b] [c8 g] [as c16 b] [c8 d] | g,4 }
 @end mudela 
 @end quotation
 
@@ -69,21 +65,18 @@ almost no restrictions.  LilyPond is part of the
 @uref{http://www.gnu.org/,GNU Project}.
 
 The version numbers are in Linux-kernel style: even numbered versions
-are `stable'. The webpages for the stable version (1.2) reside at GNU,
-here: @uref{http://www.gnu.org/software/lilypond}. Big enhancements go
-into the latest odd numbered version (1.3), whose webpages are on 
- @uref{http://www.cs.uu.nl/~hanwen/lilypond/,Han-Wen's site}.
+are `stable'. The webpages for the stable version (1.2) reside
+@uref{http://www.gnu.org/software/lilypond, on the GNU servers}. Big
+enhancements go into the latest odd numbered version (1.3), whose
+webpages are on @uref{http://www.cs.uu.nl/~hanwen/lilypond/,Han-Wen's
+site}.  Information on the latest and greatest features can be found in
+the @uref{Documentation/out-www/CHANGES.txt, Change Log}.
 
 If want more information, you can browse the
 @uref{Documentation/user/out-www/lilypond.html, manual} or other
 @uref{Documentation/out-www/index.html, documentation}.
 
 
-@unnumberedsec News
-
-For the latest and greatest features, check out the
-@uref{Documentation/out-www/CHANGES.html, Change Log}.
-
 
 @html
 <a name="music">
@@ -109,80 +102,69 @@ Lattermann also put some works
 @uref{http://www.alqualonde.de/lilypond.html,on the web}.
 
 @html
-<a name="download-source">
+<a name="download">
 @end html
 @unnumberedsec Download
 
 If you want to compile LilyPond from source, download here:
 @itemize @bullet
 @item Download stable releases at
-@uref{ftp://ftp.gnu.org/gnu/lilypond/, GNU}
+@uref{ftp://ftp.gnu.org/gnu/lilypond/,GNU}
 @item Download development releases from
-@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/development/, the source}
+@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/development/,the source}
 @item @uref{http://sca.uwaterloo.ca/lilypond/, by http (Canadian
-mirror)} or @uref{ftp://sca.uwaterloo.ca/pub/, ftp (Canadian mirror)} 
-@item @uref{ftp://ftp.lilypond.org/pub/LilyPond/, mirror (Europe)}
+mirror)} and
+@uref{ftp://sca.uwaterloo.ca/pub/, ftp (Canadian  mirror)} 
+@item 
+@uref{ftp://ftp.lilypond.org/pub/LilyPond/,mirror (Europe)}
 @end itemize
 
 Installing and compiling requires many additional packages, which are
 listed in the @uref{Documentation/topdocs/out-www/INSTALL.html,
 installation instructions}.
 
-@html
-<a name="download-binary">
-@end html
-
 Binaries are available, but are not updated for every version released.
 @itemize @bullet
-@item @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/RPMS/, RedHat i386}
-@item @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/RPMS/, LinuxPPC}
-@item
-@uref{ftp://ftp.debian.org/debian/dists/unstable/main/binary-i386/tex,
-Debian GNU/Linux i386} 
+@item 
+@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/RPMS/,RedHat-i386 and Linuxppc RPMs:}
 @item
-@uref{ftp://ftp.debian.org/debian/dists/unstable/main/binary-powerpc/tex,
-Debian GNU/Linux PowerPC} 
-@item @uref{http://home.austin.rr.com/jbr/jeff/lilypond/, Windows Stable}
-@item @uref{http://appel.dyndns.org/lilypond/gnu-windows, Windows
-Testing}
+@uref{ftp://ftp.debian.org/pub/debian/dists/unstable/main/binary-i386/tex,
+ Debian binary} 
+@item @uref{http://home.austin.rr.com/jbr/jeff/lilypond/,Windows NT}
 @end itemize
 
 
 @html
 <a name="mailing-lists">
 @end html
-@unnumberedsec Mailing lists
+@unnumberedsec Mailing list
 
 If you have questions, do write to the mailing lists!
  (But don't forget to read the @uref{Documentation/out-www/faq.html,
 Frequently Asked Questions} first.)
 
 
-@table @samp
-@item info-gnu-music@@gnu.org
+@itemize @bullet
+@item @samp{info-gnu-music@@gnu.org} (@uref{http://www.mail-archive.com/info-gnu-music@@gnu.org,archive})
         is a moderated list for information on the GNU Music project, to
     subscribe: send mail with subject "subscribe" to
     info-gnu-music-request@@gnu.org.  
-
     This list is moderated; ask 
     @email{drl@@gnu.org, David R. Linn} or
     @email{hanwen@@cs.uu.nl, Han-Wen} to send announcements for this
 list.
 
-   This list is archived at 
-    @uref{http://www.mail-archive.com/info-gnu-music@@gnu.org}
 
-@item help-gnu-music@@gnu.org
+@item @samp{help-gnu-music@@gnu.org} (@uref{http://www.mail-archive.com/help-gnu-music@@gnu.org,archive}).
     For help with LilyPond music project. To subscribe: send
     mail with subject "subscribe" to
-    @email{help-gnu-music-request@@gnu.org} The archive is at 
-  @uref{http://www.mail-archive.com/help-gnu-music@@gnu.org}.
+    @email{help-gnu-music-request@@gnu.org} 
 
-@item bug-gnu-music@@gnu.org
+@item @samp{bug-gnu-music@@gnu.org} (@uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org,archive})
     If you have bugreports, you should send them to this list.  If you
 want to know about bugs, subscribe: send mail with subject "subscribe"
-to @email{bug-gnu-music-request@@gnu.org}. The archive is at
-@uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org}
+to @email{bug-gnu-music-request@@gnu.org}. 
+
 
         Please include in your bugreport the version of LilyPond that
 you experience the problem with, a description of your system and sample
@@ -190,28 +172,27 @@ input to reproduce the problem. Do not send output files over the list,
 they tend to be very big and don't help with describing the problem.
 
 
-@item gnu-music-discuss@@gnu.org,
+@item @samp{gnu-music-discuss@@gnu.org} (@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org,archive})
     For discussions concerning LilyPond, to subscribe: send
     mail with subject "subscribe" to
-    @email{gnu-music-discuss-request@@gnu.org}
-        The archive is at
-    @uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org}
-@end table
+    @email{gnu-music-discuss-request@@gnu.org}.
+
+
+@end itemize
 
 If you want to unsubscribe use the same procedure as subscribing, but
 substitute @code{unsubscribe} where you would put @code{subscribe}.
 
 @unnumberedsubsec Webmaster's Disclaimer
 
-These pages were entirely created from a @strong{development snapshots}
+These pages were entirely created from a @strong{development snapshot}
 of the LilyPond package.  The version of this webpage is printed at the
 bottom.
 
 @html
-<!----
 <p align=center>
 [
-    <a href="#download-source">Download</a>
+    <a href="#download">Download</a>
     |
     <a href="Documentation/out-www/faq.html">FAQ</a>
     |
@@ -221,9 +202,8 @@ bottom.
     |
     <a href="#mailing-lists">Mailing lists</a>
     |
-    <a href="Documentation/out-www/CHANGES.html">News</a>
+    <a href="Documentation/out-www/CHANGES.txt">News</a>
 ]
-!---->
 @end html
 
 @bye
index 3e63b48eaf0ac535d76919d4ebb87546722d80c1..81e16eb771c7bbbff20918c61d9c010ba7c885a4 100644 (file)
@@ -1519,7 +1519,7 @@ note value: double length of @w{@ar{}@strong{brevis}}. @w{@ar{}@strong{note valu
 @mudela[13pt,eps] 
 \property Score.barNonAuto = ##t 
 \notes\relative c'' { 
-  \property Voice.noteHeadStyle = "mensural"
+  \property Voice.noteHeadStyle = #'mensural
   g\longa 
 } 
 @end mudela
@@ -1768,9 +1768,9 @@ but sometimes (mostly in pre baroque music) the double length note value
 \property Voice.textStyle = "large"
 \property Score.barNonAuto = ##t
 \notes\relative c'' { 
-  \property Voice.noteHeadStyle = "mensural"
+  \property Voice.noteHeadStyle = #'mensural
   g\longa_"longa" g\breve_"breve" 
-  \property Voice.noteHeadStyle = ""
+  \property Voice.noteHeadStyle = ##f
   g1_"1/1" g2_"1/2" g4_"1/4" s16 g8_"1/8" s16
   g16_"1/16" s16 g32_"1/32" s16 g64_"1/64" s32 }
 @end mudela
index b7db980a02fadc184c31529360bac93eeacbcad4..d385fd0cdc1c14a844ba88a4040277b83ca13b79 100644 (file)
@@ -19,7 +19,7 @@
 * Note specification::                      notedesc
 * barlines::                      barlines
 * Manual beams::                  Manual beam
-* tremolo::                       tremolo
+* stem tremolo::                       tremolo
 * Compound music expressions::    Compound music expressions
 * relative::                      relative
 * Repeats::                      Repeats       
index f15f05f515fb1419cf48c7d9b9782856c78fb97c..a457b40368dc947063c360b0c094013623051b30 100644 (file)
@@ -937,7 +937,7 @@ hoomPahHoomPah = @{ [\hoomPah \hoomPah] @}
 Put two of these fragments in sequence, and beam them.@example 
 bassvoices = \notes \relative c' @{
 c4 g8. b,16
-\repeat unfold 4 {\hoomPahHoomPah
+\repeat unfold 4 @{\hoomPahHoomPah @
 @end example 
 Entering the bass part is easy: the hoomPahHoomPah variable is
 repeated four times; @code{unfold} means that all four repetitions
diff --git a/VERSION b/VERSION
index 9ec500aab86c045d0635b5cfc7bbbaf5a757aee3..5599f7aa07385ecc08b92af0c4de462366222685 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=60
-MY_PATCH_LEVEL=jcn2
+PATCH_LEVEL=61
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/buildscripts/ps-to-gifs.sh b/buildscripts/ps-to-gifs.sh
deleted file mode 100644 (file)
index e2a3da8..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/sh
-# ps-to-gifs, convert PS to multiple gifs or other bitmaps
-
-usage()
-{
-    cat <<EOF
-Convert PS to multiple gifs or other bitmaps
-Usage: ps-to-gifs.sh [OPTION]... [FILE]
-Options:
-  -h, --help         this help
-  -c, --crop         crop output
-  -o, --output=NAME  set output base
-  -p, --png          convert to png
-  -s, --size=SIZE    set papersize
-  -t, --transparent  change white to transparent
-EOF
-}
-
-if [ $# -lt 1 ]; then
-    usage;
-    exit 2;
-fi
-CROP=cat
-GIF=gif
-PNMTOGIF=ppmtogif
-
-while [ $# -gt 0 ]; do
-opt=$1
-shift
-    case $opt in
-    -t|--t*)
-       color='-transparent white'
-       ;;
-    -h|--h*)
-       usage;
-       exit 0
-       ;;
-    -c|--c*)
-       CROP=" pnmcrop "
-       ;;
-    -o) OUTFILE=$2; shift
-        ;;
-    --o*=*) OUTFILE=`echo $opt | sed -e s/"^.*="//`
-        ;;
-    -p|--p*)
-       GIF=png
-       PNMTOGIF=pnmtopng
-       ;;
-    -s) SIZE="-sPAPERSIZE=$2"; shift
-        ;;
-    --s*=*)
-        SIZE="-sPAPERSIZE=`echo $opt | sed -e s/"^.*="//`"
-       ;;
-    -*)
-        echo "ps-to-gifs: unknown option: \`$opt'"
-       exit 1
-       ;;
-    *)
-       FILE=$opt
-       ;;
-    esac
-done
-
-if [ "x$TRANSPARENT_IS_BROKEN" != "x" ]; then
-       color=
-fi
-
-if [ "x$OUTFILE" = "x" ]; then
-       BASE=`dirname $FILE`/`basename $FILE .ps`
-else
-       BASE=`dirname $OUTFILE`/`basename $OUTFILE .$GIF`
-fi
-
-# urg, pipe breaks
-rm -f $BASE{.ppm,.$GIF} $BASE-page*{.ppm,.$GIF}
-
-cat $FILE | gs -sDEVICE=pgm $SIZE -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile="$BASE-page%d.ppm" -r90 -dNOPAUSE - -c quit $FILE
-# quant is soo slow
-# cat $PPMFILE | ppmquant 2 | pnmscale 0.3333 | pnmcrop | $PNMTOGIF $color > $OUTFILE
-PPMS=`ls $BASE*ppm`
-for i in $PPMS; do
-    o=`dirname $i`/`basename $i .ppm`.$GIF
-    cat $i | $CROP | $PNMTOGIF $color > $o
-    rm $i
-done
-
-if [ "x$OUTFILE" != "x" ]; then
-       mv $BASE-page1.$GIF $BASE.$GIF
-fi
-
diff --git a/input/test/hara-kiri-short.ly b/input/test/hara-kiri-short.ly
new file mode 100644 (file)
index 0000000..52b24f0
--- /dev/null
@@ -0,0 +1,33 @@
+
+\version "1.3.59";
+zager = \context Staff = zager \notes \relative c'' {
+       \clef treble;
+       c1
+}
+
+zoger = \context Staff = zoger \notes \relative c'' {
+       \clef treble;
+       \skip 1* 1;
+}
+
+zagers = \context GrandStaff <
+       \zager
+       \zoger
+>
+\score{
+       <
+               \context StaffGroup = zagers <
+                       \zagers
+               >
+       >
+       \paper{
+               linewidth = 80.0\mm;
+
+               \translator { \HaraKiriStaffContext }
+%uh?
+
+       }
+}
+
+
diff --git a/input/test/scales-fixme.ly b/input/test/scales-fixme.ly
deleted file mode 100644 (file)
index 92b696b..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-%
-% URG: this file was named 'scales.ly' but now that we have a
-%      ly/scales.ly, that name doesn't compile anymore.
-%
-
-\score { 
-  \context Voice \notes\relative c {
-    % sharp-major 
-       % c g d a e b fis cis
-       
-       \key c \major;
-       c' d e f g a b c
-       
-       \key g\major;
-       g a b c d e fis g
-       
-       \key d\major;
-       d, e fis g a b cis d
-       
-       \key a\major;
-       a b cis d e fis gis a
-       
-       \key e\major;
-       e, fis gis a b cis dis e
-       
-       \key b\major;
-       b cis dis e fis gis ais b
-       
-       \key fis\major;
-       fis, gis ais b cis dis eis fis
-       
-       \key cis\major;
-       cis, dis eis fis gis ais bis cis
-       
-       % sharp-minor
-       % a e b fis cis gis dis ais
-       
-       \key a\minor;
-       a b c d e f gis a
-       
-       \key e\minor;
-       e, fis g a b c dis e
-       
-       \key b\minor;
-       b cis d e fis g ais b
-       
-       \key fis\minor;
-       fis, gis a b cis d eis fis
-       
-       \key cis\minor;
-       cis, dis e fis gis a bis cis
-       
-       \key gis\minor;
-       gis ais b cis dis e fisis gis
-       
-       \key dis\minor;
-       dis, eis fis gis ais b cisis dis
-       
-       \key ais\minor;
-       ais bis cis dis eis fis gisis ais
-       
-       % flat-major 
-       % c f bes es as des ges ces
-       
-       \key f\major;
-       f, g a bes c d e f
-       
-       \key bes\major;
-       bes, c d es f g a bes
-       
-       \key es\major;
-       es,, f g as bes c d es 
-       
-       \key as\major;
-       as, bes c des es f g as
-       
-       \key des\major;
-       des,, es f ges as bes c des
-       
-       \key ges\major;
-       ges, as bes ces des es f ges
-       
-       \key ces\major;
-       ces,, des es fes ges as bes ces
-       
-       % flat-minor 
-       % a d g c f bes es as
-       
-       \key d\minor;
-       d, e f g a bes cis d 
-       
-       \key g\minor;
-       g, a bes c d es fis g
-       
-       \key c\minor;
-       c,, d es f g as b c
-       
-       \key f\minor;
-       f, g as bes c des e f
-       
-       \key bes\minor;
-       bes, c des es f ges a bes
-       
-       \key es\minor;
-       es,, f ges as bes ces d es
-       
-       \key as\minor;
-       as, bes ces des es fes g as
-       
-       
-  }
-  \paper { }  
-  \midi { }
-}
diff --git a/input/test/scales.ly b/input/test/scales.ly
new file mode 100644 (file)
index 0000000..d31e9ca
--- /dev/null
@@ -0,0 +1,109 @@
+\score { 
+  \context Voice \notes\relative c {
+    % sharp-major 
+       % c g d a e b fis cis
+       
+       \key c;
+       c' d e f g a b c
+       
+       \key g;
+       g a b c d e fis g
+       
+       \key d;
+       d, e fis g a b cis d
+       
+       \key a;
+       a b cis d e fis gis a
+       
+       \key e;
+       e, fis gis a b cis dis e
+       
+       \key b;
+       b cis dis e fis gis ais b
+       
+       \key fis;
+       fis, gis ais b cis dis eis fis
+       
+       \key cis;
+       cis, dis eis fis gis ais bis cis
+       
+       % sharp-minor
+       % a e b fis cis gis dis ais
+       
+       \key a\minor;
+       a b c d e f gis a
+       
+       \key e\minor;
+       e, fis g a b c dis e
+       
+       \key b\minor;
+       b cis d e fis g ais b
+       
+       \key fis\minor;
+       fis, gis a b cis d eis fis
+       
+       \key cis\minor;
+       cis, dis e fis gis a bis cis
+       
+       \key gis\minor;
+       gis ais b cis dis e fisis gis
+       
+       \key dis\minor;
+       dis, eis fis gis ais b cisis dis
+       
+       \key ais\minor;
+       ais bis cis dis eis fis gisis ais
+       
+       % flat-major 
+       % c f bes es as des ges ces
+       
+       \key f;
+       f, g a bes c d e f
+       
+       \key bes;
+       bes, c d es f g a bes
+       
+       \key es;
+       es,, f g as bes c d es 
+       
+       \key as;
+       as, bes c des es f g as
+       
+       \key des;
+       des,, es f ges as bes c des
+       
+       \key ges;
+       ges, as bes ces des es f ges
+       
+       \key ces;
+       ces,, des es fes ges as bes ces
+       
+       % flat-minor 
+       % a d g c f bes es as
+       
+       \key d\minor;
+       d, e f g a bes cis d 
+       
+       \key g\minor;
+       g, a bes c d es fis g
+       
+       \key c\minor;
+       c,, d es f g as b c
+       
+       \key f\minor;
+       f, g as bes c des e f
+       
+       \key bes\minor;
+       bes, c des es f ges a bes
+       
+       \key es\minor;
+       es,, f ges as bes ces d es
+       
+       \key as\minor;
+       as, bes ces des es fes g as
+       
+       
+  }
+  \paper { }  
+  \midi { }
+}
\ No newline at end of file
index eaa76f65688255726937c7c5cd495902a1919d00..70ff8a02976048788f845d2498cc09f6a5d08c86 100644 (file)
@@ -19,6 +19,7 @@ TODO:
 
 %}
 
+\version "1.3.59";
 praeludiumRight =  \notes {
    \key e \major;
   \clef violin;
index 966546c2d986b151848b722886f0595cd7a9ff2e..eba97b0ec6b0d2819805cb80f90fa21228f6fd39 100644 (file)
@@ -119,8 +119,8 @@ All_font_metrics::find_font (String name)
   if (f)
     return f;
 
-  error (_f ("can't find default font: `%s'", def_name.ch_C ()));
-  error (_f ("(search path: `%s')", search_path_.str ()));
+  non_fatal_error (_f ("can't find default font: `%s'", def_name.ch_C ()));
+  non_fatal_error (_f ("(search path: `%s')", search_path_.str ()));
   error (_ ("Giving up"));
 
   return 0;
index c906fc6ac1012bb06735b4330036fb5f1d35810a..7e939e7c8e4ce4976b744087ec5f56558628bab7 100644 (file)
@@ -119,11 +119,11 @@ Auto_beam_engraver::consider_end_and_begin (Moment test_mom)
   /*
     second guess: property generic time exception
   */
-  SCM begin = get_property (time_str + "beamAutoBegin");
+  SCM begin = get_property ((time_str + "beamAutoBegin").ch_C());
   if (unsmob_moment (begin))
     begin_mom = * unsmob_moment (begin);
 
-  SCM end = get_property (time_str + "beamAutoEnd");
+  SCM end = get_property ((time_str + "beamAutoEnd").ch_C());
   if (unsmob_moment (end))
     end_mom = * unsmob_moment (end);
 
@@ -132,11 +132,11 @@ Auto_beam_engraver::consider_end_and_begin (Moment test_mom)
   */
   if (type_str.length_i ())
     {
-      SCM end_mult = get_property ( time_str + "beamAutoEnd" + type_str);
+      SCM end_mult = get_property ((time_str + "beamAutoEnd" + type_str).ch_C());
       if (unsmob_moment (end_mult))
        end_mom = * unsmob_moment (end_mult);
 
-      SCM begin_mult = get_property (time_str + "beamAutoBegin" + type_str);
+      SCM begin_mult = get_property ((time_str + "beamAutoBegin" + type_str).ch_C());
       if (unsmob_moment (begin_mult))
        begin_mom = * unsmob_moment (begin_mult);
     }
@@ -159,11 +159,11 @@ Auto_beam_engraver::consider_end_and_begin (Moment test_mom)
   */
   if (type_str.length_i ())
     {
-      SCM end_mult = get_property (String ("beamAutoEnd") + type_str);
+      SCM end_mult = get_property ((String ("beamAutoEnd") + type_str).ch_C());
       if (unsmob_moment (end_mult))
        end_mom = * unsmob_moment (end_mult);
 
-      SCM begin_mult = get_property (String ("beamAutoBegin") + type_str);
+      SCM begin_mult = get_property ((String ("beamAutoBegin") + type_str).ch_C());
       if (unsmob_moment (begin_mult))
        begin_mom = * unsmob_moment (begin_mult);
     }
index 6ffe752dda66415ca5c614e4d244c53309fa13ca..25b16bba20969d46cdcbb2cd26c6ca16d56f5a47 100644 (file)
@@ -42,7 +42,7 @@ void
 Axis_group_engraver::do_removal_processing ()
 {
   String type = daddy_grav_l ()->type_str_ ;
-  SCM dims = get_property (type  + "VerticalExtent");
+  SCM dims = get_property ((type  + "VerticalExtent").ch_C());
   
   if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
       && gh_number_p (gh_cdr (dims)))
@@ -51,12 +51,12 @@ Axis_group_engraver::do_removal_processing ()
       staffline_p_->set_elt_property ("extent-Y", dims);
     }
 
-  dims = get_property (type + "MinimumVerticalExtent");
+  dims = get_property ((type + "MinimumVerticalExtent").ch_C());
   if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
       && gh_number_p (gh_cdr (dims)))
     staffline_p_->set_elt_property ("minimum-extent-Y", dims);
 
-  dims = get_property (type + "ExtraVerticalExtent");
+  dims = get_property ((type + "ExtraVerticalExtent").ch_C());
   if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
       && gh_number_p (gh_cdr (dims)))
     staffline_p_->set_elt_property ("extra-extent-Y", dims);
index 075cd5612931060c8b237870a0aff52b9cdc6b2e..b7a240b604cdb0ff99a208227e677b7fcb0b7c75 100644 (file)
@@ -28,7 +28,7 @@ Bar_engraver::create_bar ()
 {
   if (!bar_p_)
     {
-      bar_p_ = new Staff_bar (get_property ("basicBarlineProperties"));
+      bar_p_ = new Staff_bar (get_property ("basicBarProperties"));
 
       
       // urg: "" != empty...
index f2961ee47f8a77c43b8193df71ad7ad8bb9823de..13b50e0a6e48b0bc12675fbf804710f6e45da9a6 100644 (file)
@@ -12,7 +12,7 @@
 #include "paper-def.hh"
 #include "side-position-interface.hh"
 #include "staff-symbol.hh"
-#include "text-item.hh"
+#include "item.hh"
 #include "moment.hh"
 #include "engraver.hh"
 #include "protected-scm.hh"
@@ -20,7 +20,7 @@
 class Bar_number_engraver : public Engraver
 {
 protected:
-  Text_item* text_p_;
+  Item* text_p_;
 
   Protected_scm staffs_;
 
@@ -107,7 +107,7 @@ Bar_number_engraver::create_items ()
     return;
 
   SCM b = get_property ("basicBarNumberProperties");
-  text_p_ = new Text_item (b);
+  text_p_ = new Item (b);
   Side_position_interface staffside(text_p_);
   staffside.set_axis (Y_AXIS);
 
index 80c964c1a5c5a95caeb3bc9e257638c5d1194f5e..ea076435857e0096f56c8d37a1d758ac1c249185 100644 (file)
@@ -32,28 +32,39 @@ Bar::get_bar_size () const
 }
 
 
-Molecule 
-Bar::do_brew_molecule () const
+SCM 
+Bar::scheme_molecule (SCM smob) 
 {
-  SCM s = get_elt_property ("glyph");
+  Score_element * self = unsmob_element (smob);
+  Bar * fly = dynamic_cast<Bar*> (self);
+  SCM s = self->get_elt_property ("glyph");
   if (gh_string_p (s))
     {
       String str  =ly_scm2string (s);
-      return compound_barline (str, get_bar_size ());
+      return fly->compound_barline (str, fly->get_bar_size ()).create_scheme ();
     }
-  return Molecule ();
+  return SCM_EOL;
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Bar);
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Bar);
 
 Molecule
 Bar::compound_barline (String str, Real h) const
 {
-  Real kern = paper_l()->get_var ("bar_kern");
-  Real thinkern = paper_l()->get_var ("bar_thinkern");
+  Real kern = gh_scm2double (get_elt_property ("kern"));
+  Real thinkern = gh_scm2double (get_elt_property ("thin-kern"));
+  Real hair = gh_scm2double (get_elt_property ("hair-thickness"));
+  Real fatline = gh_scm2double (get_elt_property ("thick-thickness"));
 
-  Molecule thin = simple_barline (paper_l()->get_var ("barthick_thin"), h);
-  Molecule thick = simple_barline (paper_l()->get_var ("barthick_thick"), h);
+  Real staffline = paper_l ()->get_var ("stafflinethickness");
+
+  kern *= staffline;
+  thinkern *= staffline;
+  hair *= staffline;
+  fatline *= staffline;
+  
+  Molecule thin = simple_barline (hair, h);
+  Molecule thick = simple_barline (fatline, h);
   Molecule colon = lookup_l ()->afm_find ("dots-repeatcolon");  
 
   Molecule m;
index 887033422973394ca52a64c992701a06ff946e73..a78e6106450d7bb521548a410d086b4667d42358 100644 (file)
@@ -28,12 +28,13 @@ Breathing_sign::Breathing_sign (SCM  s)
 
 
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Breathing_sign);
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Breathing_sign);
 
-Molecule 
-Breathing_sign::do_brew_molecule () const
+SCM 
+Breathing_sign::scheme_molecule (SCM smob)
 {
-  Staff_symbol_referencer_interface si (this);
+  Score_element * sc = unsmob_element (smob);
+  Staff_symbol_referencer_interface si (sc);
   
   Real space = si.staff_space();
 
@@ -41,7 +42,7 @@ Breathing_sign::do_brew_molecule () const
   Interval i1(0, space / 6), i2(-space / 2, space / 2);
   Box b(i1, i2);
 
-  return lookup_l()->filledbox(b);
+  return sc->lookup_l()->filledbox(b).create_scheme ();
 }
 
 void
index b33e0f04ded517c4416c6f88b1e6e6c6da443522..cab0239b3c0921505fd51fcea83300a4eb77e51c 100644 (file)
@@ -14,7 +14,7 @@
 #include "paper-def.hh"
 #include "main.hh"
 #include "dimensions.hh"
-#include "text-item.hh"
+#include "item.hh"
 
 
 ADD_THIS_TRANSLATOR (Chord_name_engraver);
index 7e784aaa07c35afbe61e592369a8e99861c8b09d..b2ed2442674dcb42b82a8ed34c22b8e6a6caab0e 100644 (file)
@@ -128,24 +128,25 @@ Chord_name::ly_text2molecule (SCM text) const
   return mol;
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Chord_name);
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Chord_name);
 
-Molecule 
-Chord_name::do_brew_molecule () const
+SCM
+Chord_name::scheme_molecule (SCM smob) 
 {
-  SCM style = get_elt_property ("style");
+  Score_element *sc = unsmob_element (smob);
+  SCM style = sc->get_elt_property ("style");
   if (style == SCM_UNDEFINED)
     style = ly_str02scm ("banter");
 
-  SCM inversion = get_elt_property ("inversion");
+  SCM inversion = sc-> get_elt_property ("inversion");
   if (inversion == SCM_UNDEFINED)
     inversion = SCM_BOOL_F;
 
-  SCM bass = get_elt_property ("bass");
+  SCM bass =  sc->get_elt_property ("bass");
   if (bass == SCM_UNDEFINED)
     bass = SCM_BOOL_F;
 
-  SCM pitches = get_elt_property ("pitches");
+  SCM pitches =  sc->get_elt_property ("pitches");
 
   SCM text = scm_eval (gh_list (ly_symbol2scm ("chord::user-name"),
                                style,
@@ -153,7 +154,8 @@ Chord_name::do_brew_molecule () const
                                ly_quote_scm (gh_cons (inversion, bass)),
                                SCM_UNDEFINED));
 
-  return ly_text2molecule (text);
+  return dynamic_cast<Chord_name*> (sc)->
+    ly_text2molecule (text).create_scheme ();
 }
 
 Chord_name::Chord_name (SCM s)
index 7aa6e32f0b684a194a25b7a60a3502fe6f01469f..246d275d8b9ed6d03502fdc2c3f12f6dfdffdf52 100644 (file)
 #include "engraver.hh"
 #include "direction.hh"
 #include "side-position-interface.hh"
-#include "text-item.hh"
+#include "item.hh"
 
 /// where is c-0 in the staff?
 class Clef_engraver : public  Engraver {
   Clef_item * clef_p_;
-  Text_item * octavate_p_;
+  Item * octavate_p_;
   Clef_change_req * clef_req_l_;
   
   void create_clef();
@@ -190,7 +190,7 @@ Clef_engraver::create_clef()
   si.set_position (clef_position_i_);
   if (octave_dir_)
     {
-      Text_item * g = new Text_item (get_property ("basicOctavateEightProperties"));
+      Item * g = new Item (get_property ("basicOctavateEightProperties"));
       Side_position_interface spi (g);
       spi.set_axis (Y_AXIS);
       spi.add_support (clef_p_);
index 770694061d82b7744002573d4a77a0a3eac2fbdf..64df471244c0e382e22044c2c403ef914670fd56 100644 (file)
@@ -10,7 +10,7 @@
 #include "clef-item.hh"
 #include "string.hh"
 #include "molecule.hh"
-#include "text-item.hh"
+#include "item.hh"
 
 Clef_item::Clef_item (SCM s)
   : Item (s)
@@ -52,7 +52,8 @@ Clef_item::before_line_breaking ()
       return;
     }
 
-  // ugh. 
+  // ugh.
+  /* why not suicide? */
   if (style == "transparent")  // UGH. JUNKME
     {
       set_elt_property ("molecule-callback", SCM_BOOL_T);
index 303f8c15092e9f9d3504115eecebee6f85bba31c..c77175e0ad968b9a22c52e9c9a9f3fcdf3f66d4f 100644 (file)
@@ -16,7 +16,6 @@
 Dots::Dots (SCM s)
   : Item (s)
 {
-  set_elt_property ("dot-count", gh_int2scm (0));
 }
 
 void
@@ -35,17 +34,19 @@ Dots::after_line_breaking ()
     }
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Dots);
-Molecule  
-Dots::do_brew_molecule () const
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Dots);
+
+SCM  
+Dots::scheme_molecule (SCM d)
 {
-  Molecule mol (lookup_l ()->blank (Box (Interval (0,0),
+  Score_element *sc = unsmob_element (d);
+  Molecule mol (sc->lookup_l ()->blank (Box (Interval (0,0),
                                         Interval (0,0))));
 
-  SCM c = get_elt_property ("dot-count");
+  SCM c = sc->get_elt_property ("dot-count");
   if (gh_number_p (c))
     {
-      Molecule d = lookup_l ()->afm_find (String ("dots-dot"));
+      Molecule d = sc->lookup_l ()->afm_find (String ("dots-dot"));
 
       Real dw = d.extent (X_AXIS).length ();
       d.translate_axis (-dw, X_AXIS);
@@ -57,7 +58,7 @@ Dots::do_brew_molecule () const
          mol.add_molecule (d);
        }
     }
-  return mol;
+  return mol.create_scheme ();
 }
 
 
index 273aa105688c435fa9221f1b7b6643d7f96cb2fc..7c643490dd245e51f491bf2fb3081d417c2de758 100644 (file)
@@ -15,7 +15,7 @@
 #include "paper-column.hh"
 #include "staff-symbol.hh"
 #include "note-column.hh"
-#include "text-item.hh"
+#include "item.hh"
 #include "side-position-interface.hh"
 #include "engraver.hh"
 #include "stem.hh"
@@ -77,7 +77,7 @@ Dynamic_line_spanner::add_element (Score_element* e)
  */
 class Dynamic_engraver : public Engraver
 {
-  Text_item * text_p_;
+  Item * text_p_;
   Crescendo * finished_cresc_p_;
   Crescendo * cresc_p_;
 
@@ -262,7 +262,7 @@ Dynamic_engraver::do_process_music ()
     {
       String loud = text_req_l_->text_str_;
 
-      text_p_ = new Text_item (get_property ("basicDynamicTextProperties"));
+      text_p_ = new Item (get_property ("basicDynamicTextProperties"));
       text_p_->set_elt_property ("text", ly_str02scm (loud.ch_C ()));
       if (Direction d=text_req_l_->get_direction ())
        directional_element (text_p_).set (d);
@@ -309,7 +309,7 @@ Dynamic_engraver::do_process_music ()
             gh_int2scm ((span_req_l_drul_[START]->span_type_str_ == "crescendo")
                         ? BIGGER : SMALLER));
              
-         SCM s = get_property (span_req_l_drul_[START]->span_type_str_ + "Text");
+         SCM s = get_property ((span_req_l_drul_[START]->span_type_str_ + "Text").ch_C());
          if (gh_string_p (s))
            {
              cresc_p_->set_elt_property ("start-text", s);
@@ -317,7 +317,7 @@ Dynamic_engraver::do_process_music ()
                                            + "Text", SCM_UNDEFINED);
            }
 
-         s = get_property (span_req_l_drul_[START]->span_type_str_ + "Spanner");
+         s = get_property ((span_req_l_drul_[START]->span_type_str_ + "Spanner").ch_C());
 
 
          /*
index 8dab340163c7bf2dabbf2b617e3033c5c1e7a120..faf311ed83b254e24f5831f70211c4d20ee6111d 100644 (file)
@@ -10,7 +10,7 @@
 #include "musical-request.hh"
 #include "extender-spanner.hh"
 #include "paper-column.hh"
-#include "text-item.hh"
+#include "item.hh"
 #include "engraver.hh"
 #include "drul-array.hh"
 #include "extender-spanner.hh"
   typesets a nice centred extender of varying length depending on the
   gap between syllables.
 
-  We remember the last Text_item that come across. When we get a
+  We remember the last Item that come across. When we get a
   request, we create the spanner, and attach the left point to the
   last lyrics, and the right point to any lyrics we receive by
   then.  */
 class Extender_engraver : public Engraver
 {
-  Text_item *  last_lyric_l_;
-  Text_item * current_lyric_l_;
+  Item *  last_lyric_l_;
+  Item * current_lyric_l_;
   Extender_req* req_l_;
-  Lyric_extender* extender_spanner_p_;
+  Spanner* extender_p_;
 public:
   Extender_engraver ();
   VIRTUAL_COPY_CONS (Translator);
@@ -54,21 +54,22 @@ Extender_engraver::Extender_engraver ()
 {
   current_lyric_l_ = 0;
   last_lyric_l_ = 0;
-  extender_spanner_p_ = 0;
+  extender_p_ = 0;
   req_l_ = 0;
 }
 
 void
 Extender_engraver::acknowledge_element (Score_element_info i)
 {
-  if (Text_item* t = dynamic_cast<Text_item*> (i.elem_l_))
+  // -> text_item
+  if (Item* t = dynamic_cast<Item*> (i.elem_l_))
     {
       current_lyric_l_ = t;
-      if (extender_spanner_p_
-         && !extender_spanner_p_->get_bound (RIGHT)
+      if (extender_p_
+         && !extender_p_->get_bound (RIGHT)
            )
          {
-           extender_spanner_p_->set_textitem (RIGHT, t);
+           Lyric_extender(extender_p_).set_textitem (RIGHT, t);
          }
     }
 }
@@ -91,10 +92,10 @@ Extender_engraver::do_try_music (Music* r)
 void
 Extender_engraver::do_removal_processing ()
 {
-  if (extender_spanner_p_)
+  if (extender_p_)
     {
       req_l_->warning (_ ("unterminated extender"));
-      extender_spanner_p_->set_bound(RIGHT, get_staff_info ().command_pcol_l ());
+      extender_p_->set_bound(RIGHT, get_staff_info ().command_pcol_l ());
     }
 }
 
@@ -109,9 +110,11 @@ Extender_engraver::do_process_music ()
          return;
        }
       
-      extender_spanner_p_ = new Lyric_extender (get_property ("basicLyricExtenderProperties"));
-      extender_spanner_p_->set_textitem  (LEFT, last_lyric_l_);
-      announce_element (Score_element_info (extender_spanner_p_, req_l_));
+      extender_p_ = new Spanner (get_property ("basicLyricExtenderProperties"));
+      extender_p_->set_extent_callback (Score_element::point_dimension_callback, Y_AXIS);
+
+      Lyric_extender (extender_p_).set_textitem  (LEFT, last_lyric_l_);
+      announce_element (Score_element_info (extender_p_, req_l_));
     }
 }
 
@@ -119,10 +122,10 @@ Extender_engraver::do_process_music ()
 void
 Extender_engraver::do_pre_move_processing ()
 {
-  if (extender_spanner_p_)
+  if (extender_p_)
     {
-      typeset_element (extender_spanner_p_);
-      extender_spanner_p_ = 0;
+      typeset_element (extender_p_);
+      extender_p_ = 0;
     }
 
   if (current_lyric_l_)
index 29211b6234afa56d09faaf3e04de38299eb24b21..cab10f8cb34090c6555cd6f3aeb1be508f070bca 100644 (file)
@@ -20,6 +20,9 @@ void
 Hara_kiri_engraver::acknowledge_element (Score_element_info i)
 {
   Axis_group_engraver::acknowledge_element (i);
+
+  i.elem_l_->add_offset_callback (Hara_kiri_group_spanner::force_hara_kiri_callback, Y_AXIS);
+  
   if (Rhythmic_head *h = dynamic_cast<Rhythmic_head *> (i.elem_l_))
     {
       dynamic_cast<Hara_kiri_group_spanner*> (staffline_p_)
index c01b068cba500797673005e8e059cb4c166f422f..21746accfd4374d45c95b67baa2e345744f82821 100644 (file)
@@ -13,6 +13,8 @@
 #include "debug.hh"
 #include "item.hh"
 
+/*
+ */
 Hara_kiri_group_spanner::Hara_kiri_group_spanner(SCM s)
   : Spanner (s)
 {
@@ -24,12 +26,16 @@ Hara_kiri_group_spanner::add_interesting_item (Item* n)
 {
   add_dependency (n);
   Pointer_group_interface (this, "items-worth-living").add_element (n);
+
 }
 
 void 
 Hara_kiri_group_spanner::after_line_breaking ()
 {
   SCM worth = get_elt_pointer ("items-worth-living");
+  /*
+    worth == self_scm  is a stupid way to signal that we're done.
+   */
   if (gh_pair_p (worth))
     return;
 
@@ -42,9 +48,31 @@ Hara_kiri_group_spanner::after_line_breaking ()
        programming_error ("Killing other children too");
       s->suicide ();
     }
-  set_extent_callback (0, X_AXIS);
-  set_extent_callback (0, Y_AXIS);  
+
+  /*
+    very appropriate name here :-)
+   */
+  suicide ();
 }
 
 
 
+/*
+  We can't rely on offsets and dimensions of elements in a hara-kiri
+  group. Use a callback to make sure that hara-kiri has been done
+  before asking for offsets.  */
+Real
+Hara_kiri_group_spanner::force_hara_kiri_callback (Score_element const  *elt, Axis a)
+{
+  while (elt && !dynamic_cast<Hara_kiri_group_spanner const*> (elt))
+    elt = elt->parent_l(a);
+
+  if (elt)
+    {
+      Hara_kiri_group_spanner const  * seppuku = dynamic_cast<Hara_kiri_group_spanner const*> (elt);
+
+      ((Hara_kiri_group_spanner*)seppuku)->after_line_breaking ();
+    }
+
+  return 0.0;
+}
index 6193fa81dc2e8b9de557587b48c1e14ad3e00a3c..9fbbb77f5b95bee47d76c4655230a4c36e600a3d 100644 (file)
@@ -6,10 +6,40 @@
 
 #include "proto.hh"
 #include "musical-request.hh"
-#include "hyphen-engraver.hh"
 #include "hyphen-spanner.hh"
 #include "paper-column.hh"
-#include "text-item.hh"
+#include "item.hh"
+#include "engraver.hh"
+
+/**
+  Generate an centred hyphen.  Should make a Hyphen_spanner that
+  typesets a nice centred hyphen of varying length depending on the
+  gap between syllables.
+
+  We remember the last Item that come across. When we get a
+  request, we create the spanner, and attach the left point to the
+  last lyrics, and the right point to any lyrics we receive by
+  then.  */
+class Hyphen_engraver : public Engraver
+{
+  Item *last_lyric_l_;
+  Item *current_lyric_l_;
+  Hyphen_req* req_l_;
+  Spanner* hyphen_p_;
+public:
+  Hyphen_engraver ();
+  VIRTUAL_COPY_CONS (Translator);
+
+protected:
+  virtual void acknowledge_element (Score_element_info);
+  virtual void do_removal_processing();
+  virtual void do_process_music();
+  virtual bool do_try_music (Music*);
+  virtual void do_pre_move_processing();
+  virtual void do_post_move_processing ();
+private:
+
+};
 
 ADD_THIS_TRANSLATOR (Hyphen_engraver);
 
@@ -17,21 +47,23 @@ Hyphen_engraver::Hyphen_engraver ()
 {
   current_lyric_l_ = 0;
   last_lyric_l_ = 0;
-  hyphen_spanner_p_ = 0;
+  hyphen_p_ = 0;
   req_l_ = 0;
 }
 
 void
 Hyphen_engraver::acknowledge_element (Score_element_info i)
 {
-  if (Text_item* t = dynamic_cast<Text_item*> (i.elem_l_))
+
+  // -> text-item
+  if (Item* t = dynamic_cast<Item*> (i.elem_l_))
     {
       current_lyric_l_ = t;
-      if (hyphen_spanner_p_
-         && !hyphen_spanner_p_->get_bound (RIGHT)
+      if (hyphen_p_
+         && !hyphen_p_->get_bound (RIGHT)
            )
          {
-           hyphen_spanner_p_->set_textitem (RIGHT, t);
+           Hyphen_spanner (hyphen_p_).set_textitem (RIGHT, t);
          }
     }
 }
@@ -54,10 +86,10 @@ Hyphen_engraver::do_try_music (Music* r)
 void
 Hyphen_engraver::do_removal_processing ()
 {
-  if (hyphen_spanner_p_)
+  if (hyphen_p_)
     {
       req_l_->warning (_ ("unterminated hyphen"));
-      hyphen_spanner_p_->set_bound(RIGHT, get_staff_info ().command_pcol_l ());
+      hyphen_p_->set_bound(RIGHT, get_staff_info ().command_pcol_l ());
     }
 }
 
@@ -72,9 +104,10 @@ Hyphen_engraver::do_process_music ()
          return;
        }
       
-      hyphen_spanner_p_ = new Hyphen_spanner (get_property ("basicHyphenSpannerProperties"));
-      hyphen_spanner_p_->set_textitem  (LEFT, last_lyric_l_);
-      announce_element (Score_element_info (hyphen_spanner_p_, req_l_));
+      hyphen_p_ = new Spanner (get_property ("basicHyphenSpannerProperties"));
+      hyphen_p_->set_extent_callback (Score_element::point_dimension_callback,Y_AXIS);
+      Hyphen_spanner (hyphen_p_).set_textitem  (LEFT, last_lyric_l_);
+      announce_element (Score_element_info (hyphen_p_, req_l_));
     }
 }
 
@@ -82,10 +115,10 @@ Hyphen_engraver::do_process_music ()
 void
 Hyphen_engraver::do_pre_move_processing ()
 {
-  if (hyphen_spanner_p_)
+  if (hyphen_p_)
     {
-      typeset_element (hyphen_spanner_p_);
-      hyphen_spanner_p_ = 0;
+      typeset_element (hyphen_p_);
+      hyphen_p_ = 0;
     }
 
   if (current_lyric_l_)
index a4ddc8c75014625cba86337adae040b8a93142bc..165c6c6b11b67220af834004f50ed99608c7e1d9 100644 (file)
@@ -8,80 +8,54 @@
   (adapted from extender-spanner)
 */
 
-/*
-  TODO: too complicated implementation.  Why the dx_drul?.
- */
-
 #include <math.h>
+
 #include "box.hh"
-#include "debug.hh"
 #include "lookup.hh"
 #include "molecule.hh"
-#include "paper-column.hh"
 #include "paper-def.hh"
 #include "hyphen-spanner.hh"
-#include "dimension-cache.hh"
+#include "spanner.hh"
+#include "item.hh"
 
-Hyphen_spanner::Hyphen_spanner (SCM s)
-  : Spanner (s)
-{
-  dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0;
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Hyphen_spanner)
 
-  set_extent_callback (Score_element::point_dimension_callback,Y_AXIS);
-}
-
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Hyphen_spanner)
-Molecule 
-Hyphen_spanner::do_brew_molecule () const
+SCM 
+Hyphen_spanner::scheme_molecule (SCM smob)
 {
+  Spanner * sp  =dynamic_cast<Spanner*> (unsmob_element (smob));
   Molecule  mol;
 
-  Real w = spanner_length ();
+  Real leftext = sp->get_bound (LEFT)->extent (X_AXIS).length ();
 
-  w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
+  Real ss = sp->paper_l ()->get_var ("staffspace");
+  Real lt = sp->paper_l ()->get_var ("stafflinethickness");
+  Real th = gh_scm2double (sp->get_elt_property ("thickness")) * lt ;
+  Real h = gh_scm2double (sp->get_elt_property ("height")) * ss;
+  Real l = gh_scm2double (sp->get_elt_property ("minimum-length")) * ss;  
+  Real w = sp->spanner_length () - leftext - ss/2; 
 
-  Real th = paper_l ()->get_var ("hyphen_thickness");
-  Real h = paper_l ()->get_var ("hyphen_height");
 
-  // UGH. First try: just make the hyphen take 1/3 of the available space  
-  // for length, use a geometric mean of the available space and some minimum
-  Real l = paper_l ()->get_var ("hyphen_minimum_length");
+  /* First try: just make the hyphen take 1/3 of the available space  
+   for length, use a geometric mean of the available space and some minimum
+  */
   if(l < w)
     l = sqrt(l*w);
-  Molecule a = lookup_l ()->filledbox ( Box (Interval ((w-l)/2,(w+l)/2), Interval (h,h+th)));
-  a.translate (Offset (dx_f_drul_[LEFT], 0));
-
-  mol.add_molecule (a);
 
-  return mol;
+  Box b  (Interval ( (w-l)/2, (w+l)/2), Interval (h,h+th));
+  mol.add_molecule (sp->lookup_l ()->filledbox (b));
+  mol.translate_axis(leftext, X_AXIS);
+  return mol.create_scheme ();
 }
-
-
-void
-Hyphen_spanner::after_line_breaking ()
-{
-  // UGH
-  Real gap = paper_l ()->get_var ("interline");
-
-  Direction d = LEFT;
-  do
-    {
-      Item* t = get_bound (d)
-       ? get_bound (d) : get_bound ((Direction)-d);
-      if (d == LEFT)
-        dx_f_drul_[d] += t->extent (X_AXIS).length ();
-      else
-       dx_f_drul_[d] -= d * gap / 2;
-    }
-  while (flip(&d) != LEFT);
-}
-
   
 void
 Hyphen_spanner::set_textitem (Direction d, Item* textitem_l)
 {
-  set_bound (d, textitem_l);
-  add_dependency (textitem_l);
+  elt_l_->set_bound (d, textitem_l);
+  elt_l_->add_dependency (textitem_l);
 }
 
-
+Hyphen_spanner::Hyphen_spanner (Spanner*s)
+{
+  elt_l_ = s;
+}
index 4c6284eb013d58f31fbdc75fc9bcf3a6e9b353b4..c35350b07d7a664572a80029956d505d6fa8efec 100644 (file)
@@ -10,9 +10,7 @@
   JUNKTHIS!
  */
 #include <assert.h>
-
-#include "midi-def.hh"
-#include "paper-def.hh"
+#include "music-output-def.hh"
 #include "score.hh"
 #include "identifier.hh"
 #include "my-lily-lexer.hh"
@@ -86,8 +84,7 @@ DEFAULT_PRINT(Translator_group);
 DEFAULT_PRINT(Music);
 DEFAULT_PRINT(Request);
 DEFAULT_PRINT(Score);
-DEFAULT_PRINT(Midi_def);
-DEFAULT_PRINT(Paper_def);
+DEFAULT_PRINT(Music_output_def);
 
 /* ugh. */
 #define DUMMY_STR(Class) \
@@ -101,8 +98,7 @@ DUMMY_STR(Translator_group);
 DUMMY_STR(Music);
 DUMMY_STR(Request);
 DUMMY_STR(Score);
-DUMMY_STR(Midi_def);
-DUMMY_STR(Paper_def);
+DUMMY_STR(Music_output_def);
 DUMMY_STR(Duration);
 
 #define STRING_PRINT(Class) \
@@ -114,8 +110,6 @@ Class ## _identifier::do_print () const\
 
 
 STRING_PRINT(Duration);
-STRING_PRINT(Real);
-STRING_PRINT(int);
   
 #define DEFAULT_STR(Class) \
 String \
@@ -124,9 +118,6 @@ Class ## _identifier::do_str () const\
   return to_str (*data_p_);\
 }
 
-DEFAULT_STR(int);
-DEFAULT_STR(Real);
-
   
 
 /*
@@ -163,22 +154,17 @@ Class ## _identifier::Class ## _identifier (Class ## _identifier const &s) \
 
 IMPLEMENT_ID_CLASS(Duration);
 IMPLEMENT_ID_CLASS(Translator_group);
-IMPLEMENT_ID_CLASS(int);
-IMPLEMENT_ID_CLASS(Real);
 IMPLEMENT_ID_CLASS(Music);
 IMPLEMENT_ID_CLASS(Score);
 IMPLEMENT_ID_CLASS(Request);
-IMPLEMENT_ID_CLASS(Midi_def);
-IMPLEMENT_ID_CLASS(Paper_def);
+IMPLEMENT_ID_CLASS(Music_output_def);
 VIRTUAL_ACCESSOR(Music);
 VIRTUAL_ACCESSOR(Request);
 VIRTUAL_ACCESSOR(Translator_group);
+VIRTUAL_ACCESSOR(Music_output_def);
 DEFAULT_ACCESSOR(Duration);
-DEFAULT_ACCESSOR(int);
-DEFAULT_ACCESSOR(Real);
 DEFAULT_ACCESSOR(Score);
-DEFAULT_ACCESSOR(Midi_def);
-DEFAULT_ACCESSOR(Paper_def);
+
 
 int
 Identifier::print_smob (SCM s, SCM p, scm_print_state*)
index bfb2ce7379f0bb3e3d061d38b64eaa15d9ff6c28..8d408c04b9313e6aac495d77c82ad15f93ff7cf4 100644 (file)
@@ -23,7 +23,7 @@ public:
 
 protected:
   virtual void before_line_breaking ();
-  Molecule  do_brew_molecule () const;
+
   virtual Real get_bar_size () const;
 };
 #endif // BAR_HH
index a86a3d0e03eb3286bbdf18575af2bf4929d75fdb..0fe3b35b66276d242ba285b816aa985cbede090b 100644 (file)
   extend beond, lasting the whole duration of the melissima
   (as in MUP, urg).
   */
-class Lyric_extender : public Spanner
+class Lyric_extender // interface
 {
 public:
-  Lyric_extender (SCM);
+  Spanner*elt_l_;
+  Lyric_extender (Spanner*);
   void set_textitem (Direction, Item*);
- static SCM scheme_molecule (SCM);
-  
-
-protected:
-  Molecule do_brew_molecule () const;
-  void after_line_breaking ();
-  VIRTUAL_COPY_CONS (Score_element);
-
-  Drul_array<Real> dx_f_drul_;
+  static SCM scheme_molecule (SCM);
 };
 
 #endif // EXTENDER_SPANNER_HH
index 1adc9480bf23d9a391d13e47419868d3b603ea24..abda869a39360594c5379863eecd09229d99e2ba 100644 (file)
@@ -27,6 +27,7 @@
 class Hara_kiri_group_spanner : public Spanner
 {
 public:
+  static Real force_hara_kiri_callback (Score_element const* , Axis);
   Hara_kiri_group_spanner (SCM);
   virtual void after_line_breaking ();
   void add_interesting_item (Item* n);
diff --git a/lily/include/hyphen-engraver.hh b/lily/include/hyphen-engraver.hh
deleted file mode 100644 (file)
index 160b9e2..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-  hyphen-engraver.hh -- declare Hyphen_engraver
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1999 Glen Prideaux <glenprideaux@iname.com>
-*/
-
-#ifndef HYPHEN_ENGRAVER_HH
-#define HYPHEN_ENGRAVER_HH
-
-#include "engraver.hh"
-#include "drul-array.hh"
-#include "hyphen-spanner.hh"
-#include "pqueue.hh"
-
-
-/**
-  Generate an centred hyphen.  Should make a Hyphen_spanner that
-  typesets a nice centred hyphen of varying length depending on the
-  gap between syllables.
-
-  We remember the last Text_item that come across. When we get a
-  request, we create the spanner, and attach the left point to the
-  last lyrics, and the right point to any lyrics we receive by
-  then.  */
-class Hyphen_engraver : public Engraver
-{
-  Text_item *  last_lyric_l_;
-  Text_item * current_lyric_l_;
-  Hyphen_req* req_l_;
-  Hyphen_spanner* hyphen_spanner_p_;
-public:
-  Hyphen_engraver ();
-  VIRTUAL_COPY_CONS (Translator);
-
-protected:
-  virtual void acknowledge_element (Score_element_info);
-  virtual void do_removal_processing();
-  virtual void do_process_music();
-  virtual bool do_try_music (Music*);
-  virtual void do_pre_move_processing();
-  virtual void do_post_move_processing ();
-private:
-
-};
-
-#endif // HYPHEN_ENGRAVER_HH
index 920c4c35fa2871638658a675a86e85938e746091..f1ef2ea45d4a04a6454fbc9c498154e8e234a5aa 100644 (file)
   The length of the hyphen line should stretch based on the
   size of the gap between syllables.
   */
-class Hyphen_spanner : public Spanner
+struct Hyphen_spanner // interface
 {
 public:
-  Hyphen_spanner (SCM);
+  Spanner* elt_l_;
+  Hyphen_spanner  (Spanner*);
   void set_textitem (Direction, Item*);
- static SCM scheme_molecule (SCM);
-  
-
-protected:
-  Molecule do_brew_molecule () const;
-  Interval do_height () const;
-
-  void after_line_breaking ();
-  VIRTUAL_COPY_CONS (Score_element);
-
-  Drul_array<Real> dx_f_drul_;
+  static SCM scheme_molecule (SCM);
 };
 
 #endif // HYPHEN_SPANNER_HH
index 94bceeebb8136903819f03af6f4e21d110bad1ba..e0e4c257692ab4313488c12884e2a8e434879db5 100644 (file)
 class Translator_group_identifier;
 class Music_identifier;
 class Articulation_req_identifier;
-class Midi_def_identifier;
-class Paper_def_identifier;
-class Real_identifier;
-class int_identifier;
+class Output_def_identifier;
 class Request_identifier;
 class Score_identifier;
 class Duration_identifier;
@@ -56,12 +53,9 @@ struct Identifier : public Input {
   String str () const;
   IDACCESSOR(Translator_group)
   IDACCESSOR(Music)
-  IDACCESSOR(Midi_def)
-  IDACCESSOR(Paper_def)
-  IDACCESSOR(Real)
+  IDACCESSOR(Music_output_def)
   IDACCESSOR(Request)
   IDACCESSOR(Score)
-  IDACCESSOR(int)
   IDACCESSOR(Duration)
   VIRTUAL_COPY_CONS(Identifier);
 
@@ -86,14 +80,11 @@ struct Class ## _identifier : Identifier {\
 
 DECLARE_ID_CLASS(Translator_group);
 DECLARE_ID_CLASS(Duration);
-DECLARE_ID_CLASS(Real);
 DECLARE_ID_CLASS(General_script_def);
 DECLARE_ID_CLASS(Music);
-DECLARE_ID_CLASS(int);
 DECLARE_ID_CLASS(Score);
 DECLARE_ID_CLASS(Request);
-DECLARE_ID_CLASS(Paper_def);
-DECLARE_ID_CLASS(Midi_def);
+DECLARE_ID_CLASS(Music_output_def);
 
 Identifier * unsmob_identifier (SCM);
 SCM smobify (Identifier*);
index 8f0e8c956f9c1b3f63a8531abe44fa5aace70a33..e2c3393a5b3a32703ee5adadbac960311a4dff4c 100644 (file)
@@ -243,8 +243,7 @@ struct Tex_font_metric_reader;
 struct Text_def;
 struct Text_engraver;
 struct Text_gob;
-struct Text_item ;
-struct Text_item;
+struct Item ;
 struct Text_req;
 struct Text_spanner;
 struct Tie;
index 1ef2eb7490c1ea1bdd45bddf27d880452b6626bc..d39ec7e558a90a36b032c35304e0f6d95f9eab85 100644 (file)
@@ -31,7 +31,7 @@ public:
 
 private:
   Lyric_req * req_l_;
-  Text_item* text_p_;
+  Item* text_p_;
 };
 
 
index 67cdcef24911ca37299bfe750f6a69a2c8387ddb..6d65f6baeae0c8a5765f5221990c4a576badadf6 100644 (file)
@@ -21,7 +21,7 @@
  */
 class Midi_def : public Music_output_def {
   static int default_count_i_;
-  int count_per_minute_i;  
+
 public:
   VIRTUAL_COPY_CONS(Music_output_def);
 
index 4970d49905f1182ee6fd33ee4c0c19f8a113365f..a91f53787962d5c4616590fe234d12b81118bff0 100644 (file)
@@ -10,7 +10,6 @@
 #ifndef PAPER_DEF_HH
 #define PAPER_DEF_HH
 
-#include <map>
 
 #include "lily-proto.hh"
 #include "lily-guile.hh"
@@ -56,19 +55,19 @@ protected:
 public:    
   virtual ~Paper_def ();
 
-  Array<Interval> shape_int_a_;
   /*
     JUNKME
    */
   Real get_realvar (SCM symbol) const;
   Real get_var (String id) const;
 
-  
+  SCM get_scmvar (String id)const; 
   void reinit ();
   Paper_def ();
   void set_lookup (int, Lookup*);
 
   Paper_def (Paper_def const&);
+
   /** The distance between beams of multiplicity_i
       JUNKME
   */
index 9a71f42d3f4bbe8267a5213e8b27a33a30b645e4..cefb249d732cc3b2284752af228e3a886881d96b 100644 (file)
@@ -28,6 +28,10 @@ protected:
   Molecule do_brew_molecule () const;
   virtual Array<Offset> get_encompass_offset_arr () const;
   Bezier get_curve () const;
+
+  /*
+    JUNKME
+   */
   Drul_array<Real> dy_f_drul_;
   Drul_array<Real> dx_f_drul_;
 
index 34339a18f96db4c95ce4027bc1f002c32e763748..2eb457e514a7b452d455c228d1f999495125a50e 100644 (file)
@@ -44,6 +44,7 @@ public:
   Spanner (Spanner const &);
   bool broken_b () const;
   void do_break ();
+  Real spanner_length () const;
 
   static int compare (Spanner * const &,Spanner * const &);
   virtual Array<Rod> get_rods () const;
@@ -57,7 +58,6 @@ protected:
 
   virtual void do_space_processing ();
   virtual void do_break_processing ();
-  Real spanner_length () const;
   virtual Line_of_score*line_l () const;
 };
 #endif
diff --git a/lily/include/sustain-pedal.hh b/lily/include/sustain-pedal.hh
deleted file mode 100644 (file)
index fe1a314..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*   
-  sustain-pedal.hh -- declare 
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef SUSTAIN_PEDAL_HH
-#define SUSTAIN_PEDAL_HH
-
-#include "item.hh" 
-
-
-/*
-  Urg.
-  This is almost text
-  Problem is:
-    * we have no kerning
-    * symbols are at wrong place in font
-
-
-
-  Properties:
-
-  glyph -- text string (TODO:   make one large glyph of the Ped symbol, removes need for do_brew_molecule ())
-
-*/
-
-class Sustain_pedal : public Item
-{
-public:
-   static SCM scheme_molecule (SCM);
-  
-  VIRTUAL_COPY_CONS (Score_element);
-  Sustain_pedal (SCM);
-protected:
-  // Molecule do_brew_molecule () const;
-  virtual void after_line_breaking ();
-};
-
-
-#endif /* SUSTAIN_PEDAL_HH */
-
index b3f545daf773afbb7907272470a84671457899d5..61d23efdb19080b625eaacee26b06a84e4ec1f30 100644 (file)
@@ -19,12 +19,12 @@ class System_start_delimiter : public Spanner
 {
 public:
   System_start_delimiter (SCM);
-   static SCM scheme_molecule (SCM);
+  static SCM scheme_molecule (SCM);
   
-VIRTUAL_COPY_CONS (Score_element);
+  VIRTUAL_COPY_CONS (Score_element);
 protected:
   virtual void after_line_breaking();
-  virtual  Molecule do_brew_molecule () const;
+  
   Molecule staff_bracket (Real) const;
   Molecule staff_brace (Real) const;
   Molecule simple_bar (Real) const;
index d69a23f0af7592ac6bdd27bc1764538ce5f1f412..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 (file)
@@ -1,30 +1 @@
-/*   
-  text-item.hh -- declare Text_item
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef Text_ITEM_HH
-#define Text_ITEM_HH
-
-#include "item.hh"
-
-/**
-   Print a text in specified style.
- */
-class Text_item : public Item
-{
-public:
-  VIRTUAL_COPY_CONS (Score_element);
-   static SCM scheme_molecule (SCM);
-  
-Text_item (SCM s);
-protected:
-  Molecule do_brew_molecule () const;
-};
-
-#endif /* Text_ITEM_HH */
 
index c6fc1c89040d777981a41ca2e9cb89935b5c35b2..e45a456b997d07bbee7c588fc11a2148dfb42c30 100644 (file)
@@ -35,6 +35,9 @@ protected:
   virtual Array<Offset> get_encompass_offset_arr () const;
   Bezier get_curve () const;
 
+  /*
+    JUNKME
+   */
   Drul_array<Real> dy_f_drul_;
   Drul_array<Real> dx_f_drul_;
 
index 2bfaad8823b449157339d761a81304073448c50b..47c2ef1135300cfee351aa2fd16971eae30e99ba 100644 (file)
@@ -29,7 +29,7 @@ typedef void (Translator::*Const_method_pointer)(void) const;
 class Translator_group : public virtual Translator {
   Array<String> consists_str_arr_;
   Array<String> accepts_str_arr_;
-    Array<String> consists_end_str_arr_;
+  Array<String> consists_end_str_arr_;
   Scheme_hash_table properties_dict_;
 
   int iterator_count_;
index c84c109ec4fcdddb264287e43db8d0a8266aba5d..6352c005dcd15f0f2f31ad9ede46bdf2ac27148c 100644 (file)
@@ -62,7 +62,7 @@ public:
     */
   Music_output_def *output_def_l () const;
 
-  SCM get_property (String) const;
+  SCM get_property (const char *) const;
   SCM get_property (SCM symbol) const;
   
   virtual Moment now_mom () const;  
index 1a9bd7da1f2a1cfe5053af60c01c9f41b7cd946e..010db52474e89e2f3ae45dba9d550541135bd7c0 100644 (file)
@@ -9,14 +9,14 @@
  */
 
 #include "engraver.hh"
-#include "text-item.hh"
+#include "item.hh"
 #include "bar.hh"
 #include "system-start-delimiter.hh"
 #include "side-position-interface.hh"
 
 class Instrument_name_engraver : public Engraver
 {
-  Text_item *text_;
+  Item *text_;
   System_start_delimiter * delim_ ;
 
   void create_text (SCM s);
@@ -55,7 +55,7 @@ Instrument_name_engraver::create_text (SCM txt)
 {
   if(!text_)
     {
-      text_ = new Text_item (get_property ("basicInstrumentNameProperties"));
+      text_ = new Item (get_property ("basicInstrumentNameProperties"));
       text_->set_elt_property ("text", txt);
 
       /*
index f29c4ecd39bdad80ca4263d7477e6b9ba006c559..46ad565f5044ef075a3e8623470e1f0e835f1fde 100644 (file)
@@ -36,43 +36,42 @@ const int SHARP_TOP_PITCH=4; /*  ais and bis typeset in lower octave */
 int
 Key_item::calculate_position(SCM pair) const
 {
-  SCM note = gh_car (pair);
-  if (gh_pair_p (note))
-    {
-      int o = gh_scm2int (gh_car (note));
-      int p = gh_scm2int (gh_cdr (note));
-      return p + o*7 + gh_scm2int (get_elt_property ("c0-position"));
-    }
-  int p = gh_scm2int (note);
+  int p = gh_scm2int (gh_car (pair));
   int a = gh_scm2int (gh_cdr (pair));  
   
-  // Find the c in the range -4 through 2
-  int from_bottom_pos = gh_scm2int (get_elt_property ("c0-position")) + 4;
-  from_bottom_pos = from_bottom_pos%7;
-  from_bottom_pos = (from_bottom_pos + 7)%7; // Precaution to get positive.
-  int c0 = from_bottom_pos - 4;
-  
-  
-  if ((a<0 && ((p>FLAT_TOP_PITCH) || (p+c0>4)) && (p+c0>1)) 
-      ||
-      (a>0 && ((p>SHARP_TOP_PITCH) || (p+c0>5)) && (p+c0>2))) 
+  if (to_boolean (get_elt_property ("multi-octave")))
     {
-      p -= 7; /* Typeset below c_position */
+      return p + gh_scm2int (get_elt_property ("c0-position"));
     }
-  /* Provide for the four cases in which there's a glitch 
-     it's a hack, but probably not worth  
-     the effort of finding a nicer solution.
-     --dl. */
-  if (c0==2 && a>0 && p==3)
-    p -= 7;
-  if (c0==-3 && a>0 && p==-1)
-    p += 7;
-  if (c0==-4 && a<0 && p==-1)
-    p += 7;
-  if (c0==-2 && a<0 && p==-3)
-    p += 7;
-  
-  return p + c0;
+  else {
+    // Find the c in the range -4 through 2
+    int from_bottom_pos = gh_scm2int (get_elt_property ("c0-position")) + 4;
+    from_bottom_pos = from_bottom_pos%7;
+    from_bottom_pos = (from_bottom_pos + 7)%7; // Precaution to get positive.
+    int c0 = from_bottom_pos - 4;
+
+    
+    if ((a<0 && ((p>FLAT_TOP_PITCH) || (p+c0>4)) && (p+c0>1)) 
+       ||
+       (a>0 && ((p>SHARP_TOP_PITCH) || (p+c0>5)) && (p+c0>2))) 
+      {
+       p -= 7; /* Typeset below c_position */
+      }
+    /* Provide for the four cases in which there's a glitch 
+       it's a hack, but probably not worth  
+       the effort of finding a nicer solution.
+       --dl. */
+    if (c0==2 && a>0 && p==3)
+      p -= 7;
+    if (c0==-3 && a>0 && p==-1)
+      p += 7;
+    if (c0==-4 && a<0 && p==-1)
+      p += 7;
+    if (c0==-2 && a<0 && p==-3)
+      p += 7;
+    
+    return p + c0;
+  }
 }
 
 MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Key_item)
index 57d9537bf137fef7023c4ade6d29e8ca51c10d6e..44209d00e3df2d37f24e78104b88e96aa81f25f2 100644 (file)
@@ -233,7 +233,8 @@ HYPHEN              --
        int n = 0;
        if (main_input_b_ && safe_global_b) {
                error (_ ("Can't evaluate Scheme in safe mode"));
-               return SCM_EOL;
+               yylval.scm =  SCM_EOL;
+               return SCM_T;
        }
        yylval.scm = ly_parse_scm (s, &n);
        DEBUG_OUT << "Scheme: ";
@@ -473,8 +474,12 @@ My_lily_lexer::scan_escaped_word (String str)
        if (gh_string_p (sid)) {
                yylval.scm = sid; 
                return STRING_IDENTIFIER;
+       } else if (gh_number_p (sid)) {
+               yylval.scm = sid;
+               return NUMBER_IDENTIFIER;
        }
 
+
        Identifier * id = unsmob_identifier (sid);
        if (id) {
                yylval.id = id;
index 6336f7dd1131f2397839bac238cbd46d4ebb8a6f..5c9c793c9e57a100ac407933ebe2e9ee40a1700b 100644 (file)
@@ -353,7 +353,7 @@ ly_number2string (SCM s)
 
   char str[100];                       // ugh.
 
-  if (scm_integer_p (s))
+  if (scm_integer_p (s) == SCM_BOOL_F)
     {
       Real r (gh_scm2double (s));
 
index 7a9e48a6f1dd8eead9f814e25d16f0861c9755e0..2c235080e31cc76b2dee5cd7cc9c29705f0094cc 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "engraver.hh"
-#include "text-item.hh"
+#include "item.hh"
 #include "side-position-interface.hh"
 #include "note-head.hh"
 #include "stem.hh"
@@ -36,7 +36,7 @@ Line_number_engraver::process_acknowledged ()
 {
   if (!text_item_p_ && interesting_.size ())
     {
-      text_item_p_ = new Text_item (get_property ("basicTextProperties") );
+      text_item_p_ = new Item (get_property ("basicTextProperties") );
       Side_position_interface si (text_item_p_);
       si.set_axis (Y_AXIS);
       text_item_p_->set_parent (interesting_[0].elem_l_, Y_AXIS);
index fce604816314f532ffc1c1f5857ab3ebf802dbff..64a306b3ed427a2ad07e3c92c9e6c63a83a6f922 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "lyric-engraver.hh"
 #include "musical-request.hh"
-#include "text-item.hh"
+#include "item.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
 
@@ -40,7 +40,7 @@ Lyric_engraver::do_process_music()
 {
   if (req_l_)
     {
-      text_p_=  new Text_item (get_property ("basicLyricTextProperties"));
+      text_p_=  new Item (get_property ("basicLyricTextProperties"));
       
       text_p_->set_elt_property ("text",
                                 ly_str02scm   ((req_l_->text_str_ + " ").ch_C ()));
index 879fa63772e81f72b36b0f0d80cf21c6f2b0415b..e20d7d1ea956c69d745591d48af29e0ff5c4d368 100644 (file)
@@ -3,13 +3,9 @@
   source file of the GNU LilyPond music typesetter
 
   (c)  1998--2000 Jan Nieuwenhuizen <janneke@gnu.org>
+  Han-Wen Nienhuys
 */
 
-/*
-  TODO: too complicated implementation.  Why the dx_drul?.
- */
-
-#
 #include "dimension-cache.hh"
 #include "box.hh"
 #include "debug.hh"
 #include "paper-def.hh"
 #include "extender-spanner.hh"
 
-Lyric_extender::Lyric_extender (SCM s)
-  : Spanner (s)
-
-{
-  dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0;
-  set_extent_callback (Score_element::point_dimension_callback, Y_AXIS);
-}
-
-
-
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Lyric_extender)
-Molecule 
-Lyric_extender::do_brew_molecule () const
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Lyric_extender)
+SCM 
+Lyric_extender::scheme_molecule (SCM smob) 
 {
-  Molecule  mol;
-
-  Real w = spanner_length ();
+  Spanner *sp = dynamic_cast<Spanner*> (unsmob_element (smob));
   
-  w += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
-  Real h = paper_l ()->get_var ("extender_height");
-  Molecule a = lookup_l ()->filledbox ( Box (Interval (0,w), Interval (0,h)));
-  a.translate (Offset (dx_f_drul_[LEFT], 0));
-
-  mol.add_molecule (a);
-
-  return mol;
+  Real leftext = sp->get_bound (LEFT)->extent (X_AXIS).length ();
+  Real ss = sp->paper_l ()->get_var ("staffspace");
+  Real w = sp->spanner_length () - leftext - ss/2;
+  
+  Real h = sp->paper_l ()->get_var ("extender_height");
+  Molecule  mol (sp->lookup_l ()->filledbox ( Box (Interval (0,w), Interval (0,h))));
+  mol.translate (Offset (leftext, 0));
+  return mol.create_scheme();
 }
 
-
-
 void
-Lyric_extender::after_line_breaking ()
+Lyric_extender::set_textitem (Direction d, Item* textitem_l)
 {
-  // UGH
-  Real gap = paper_l ()->get_var ("interline");
-
-  Direction d = LEFT;
-  do
-    {
-      Item* t = get_bound (d)
-       ? get_bound (d) : get_bound ((Direction)-d);
-      if (d == LEFT)
-        dx_f_drul_[d] += t->extent (X_AXIS).length ();
-      else
-       dx_f_drul_[d] -= d * gap / 2;
-    }
-  while (flip(&d) != LEFT);
+  elt_l_->set_bound (d, textitem_l);
+  elt_l_->add_dependency (textitem_l);
 }
 
-  
-void
-Lyric_extender::set_textitem (Direction d, Item* textitem_l)
+Lyric_extender::Lyric_extender (Spanner*s)
 {
-  set_bound (d, textitem_l);
-  add_dependency (textitem_l);
+  elt_l_ = s;
 }
 
-
index 88c15506066ca484f75b25f796f9596626d3a73c..92945681de34fb18447488dc9d1975ba5faa271d 100644 (file)
@@ -20,7 +20,7 @@
 #include "side-position-interface.hh"
 #include "staff-symbol-referencer.hh"
 #include "staff-symbol.hh"
-#include "text-item.hh"
+#include "item.hh"
 #include "group-interface.hh"
 
 /**
@@ -33,7 +33,7 @@ public:
   VIRTUAL_COPY_CONS(Translator);
   Mark_engraver ();
 protected:
-  Text_item* text_p_;
+  Item* text_p_;
   Protected_scm staffs_;
   
 protected:
@@ -77,7 +77,7 @@ Mark_engraver::acknowledge_element (Score_element_info inf)
     {
       /*
        Ugh. Figure out how to do this right at beginning of line, (without
-       creating class Bar_script : public Text_item).
+       creating class Bar_script : public Item).
       */
       text_p_->set_parent (s, X_AXIS);
     }
@@ -102,7 +102,7 @@ Mark_engraver::create_items (Request *rq)
     return;
 
   SCM s = get_property ("basicMarkProperties");
-  text_p_ = new Text_item (s);
+  text_p_ = new Item (s);
 
   Group_interface (text_p_, "interfaces").add_thing (ly_symbol2scm ("Mark"));
   Side_position_interface staffside(text_p_);
index 753976a9b605792e25913067387ab92d04c9787d..1915e8207153f3506f9bd7340e0f538c2153a630 100644 (file)
 #include "score-performer.hh"
 #include "debug.hh"
 
-// classes, alphasorted
-//     statics
-//     constructors
-//     destructor
-//     routines, alphasorted
-
 Midi_def::Midi_def()
 {
   // ugh
index 431c637b84b3bbda3e27693717b63cd77848ded8..067a3d3933d0c4f9c4ea959023648eabfda15fb5 100644 (file)
@@ -79,7 +79,11 @@ Note_heads_engraver::do_process_music()
          sd.set_interface ();
          
          note_p->add_dots (d);
-         d->set_elt_property ("dot-count", gh_int2scm (note_req_l->duration_.dots_i_));
+         
+         if (note_req_l->duration_.dots_i_
+             != gh_scm2int (d->get_elt_property ("dot-count")))
+           d->set_elt_property ("dot-count", gh_int2scm (note_req_l->duration_.dots_i_));
+         
          announce_element (Score_element_info (d,0));
          dot_p_arr_.push (d);
        }
index 1f03a0ea1a3eeb9788f057d6d6f2716647a6dbf4..d6e10628def18deb07a309dca2d4a24c1f372563 100644 (file)
@@ -9,14 +9,14 @@
 
 #include "engraver.hh"
 #include "musical-request.hh"
-#include "text-item.hh"
+#include "item.hh"
 
 class Note_name_engraver : public Engraver
 {
 public:
   VIRTUAL_COPY_CONS(Translator);
   Link_array<Note_req> req_l_arr_;
-  Link_array<Text_item> texts_;
+  Link_array<Item> texts_;
   virtual bool  do_try_music (Music*m);
   virtual void do_process_music ();
   virtual void do_pre_move_processing ();
@@ -46,7 +46,7 @@ Note_name_engraver::do_process_music ()
     }
   if (s.length_i())
     {
-      Text_item * t = new Text_item (SCM_EOL);
+      Item * t = new Item (SCM_EOL);
       t->set_elt_property ("text", ly_str02scm ( s.ch_C()));
       announce_element (Score_element_info (t, req_l_arr_[0]));
       texts_.push (t);
index c32c88f41565526b8e6d0933edd6360f56f6abc9..cc8bd881d636d2d58bc852cc6b958cd81040457d 100644 (file)
@@ -44,7 +44,6 @@ Paper_def::~Paper_def ()
 Paper_def::Paper_def (Paper_def const&s)
   : Music_output_def (s)
 {
-  shape_int_a_ = s.shape_int_a_;
   lookup_p_tab_p_ = new map<int, Lookup*>;
   
   for (map<int,Lookup*>::const_iterator ai = s.lookup_p_tab_p_->begin();
@@ -62,19 +61,30 @@ Paper_def::get_var (String s) const
   return get_realvar (ly_symbol2scm (s.ch_C()));
 }
 
+SCM
+Paper_def::get_scmvar (String s) const
+{
+  return  scope_p_->scm_elem (ly_symbol2scm (s.ch_C()));
+}
+
 Real
 Paper_def::get_realvar (SCM s) const
 {
   if (!scope_p_->elem_b (s))
-    error (_f ("unknown paper variable: `%s'", ly_symbol2string (s)));
-  Real * p = scope_p_->elem (s)->access_content_Real (false);
-  if (!p)
     {
-      error (_("not a real variable"));
+      programming_error ("unknown paper variable: " +  ly_symbol2string (s));
+      return 0.0;
+    }
+  SCM val = scope_p_->scm_elem (s);
+  if (gh_number_p (val))
+    {
+      return gh_scm2double (val);
+    }
+  else
+    {
+      non_fatal_error (_("not a real variable"));
       return 0.0;
     }
-
-  return *p;
 }
 
 /*
index 97b542168b6d064e8ff016a852e56af85f1c37b8..832905198153213e79695361adfd1da07473e6e8 100644 (file)
@@ -160,20 +160,13 @@ Paper_outputter::output_scope (Scope *scope, String prefix)
        {
          output_String_def (prefix + s, ly_scm2string (v));
        }
-      
-      Identifier * id = unsmob_identifier (v);
-      
-      if(dynamic_cast<Real_identifier*> (id))
+      else if (scm_integer_p (v) == SCM_BOOL_T)
        {
-         Real val  = *id->access_content_Real (false);
-
-         output_Real_def (prefix + s, val);      
+         output_int_def (prefix + s, gh_scm2int (v));    
        }
-      else if (dynamic_cast<int_identifier*> (id))
+      else if (gh_number_p (v))
        {
-         int val  = *id->access_content_int (false);     
-         
-         output_int_def (prefix + s, val);       
+         output_Real_def (prefix + s, gh_scm2double (v));        
        }
     }
 }
index e7d236127381142b7d89ec24f1c5bfbb7389a33f..fb8a04b9146c70bbb9b4314d034218a25a626c3a 100644 (file)
@@ -50,7 +50,7 @@ is_duration_b (int t)
 
 
 // mmm JUNKME ?
-Mudela_version oldest_version ("1.3.42");
+Mudela_version oldest_version ("1.3.59");
 
 void
 print_mudela_versions (ostream &os)
@@ -82,7 +82,6 @@ print_mudela_versions (ostream &os)
 %union {
     Array<Musical_pitch> *pitch_arr;
     Link_array<Request> *reqvec;
-    Array<int> *intvec;
     Duration *duration;
     Identifier *id;
     String * string;
@@ -96,13 +95,13 @@ print_mudela_versions (ostream &os)
     Musical_pitch * pitch;
     Midi_def* midi;
     Moment *moment;
-    Paper_def *paper;
     Real real;
     Request * request;
 
     /* We use SCMs to do strings, because it saves us the trouble of
 deleting them.  Let's hope that a stack overflow doesnt trigger a move
 of the parse stack onto the heap. */
+
     SCM scm;
 
     Tempo_req *tempo;
@@ -197,20 +196,18 @@ yylex (YYSTYPE *s,  void * v_l)
 %token <id>    IDENTIFIER
 %token <id>    MUSIC_IDENTIFIER
 %token <id>    REQUEST_IDENTIFIER
-%token <id>    REAL_IDENTIFIER
 %token <id>    TRANS_IDENTIFIER
-%token <id>    INT_IDENTIFIER
+%token <scm>   NUMBER_IDENTIFIER
+
 %token <id>    SCORE_IDENTIFIER
-%token <id>    MIDI_IDENTIFIER
-%token <id>    PAPER_IDENTIFIER
-%token <real>  REAL
+%token <id>    MUSIC_OUTPUT_DEF_IDENTIFIER
 
-%token <scm>   STRING_IDENTIFIER SCM_IDENTIFIER
+%token <scm>   STRING_IDENTIFIER SCM_IDENTIFIER 
 %token <scm>   DURATION RESTNAME
-%token <scm>   STRING
+%token <scm>   STRING 
 %token <scm>   SCM_T
 %token <i>     UNSIGNED
-
+%token <real>   REAL
 
 %type <outputdef> output_def
 %type <scope>  mudela_header mudela_header_body
@@ -220,14 +217,14 @@ yylex (YYSTYPE *s,  void * v_l)
 %type <music>  simple_element  request_chord command_element Simple_music  Composite_music 
 %type <music>  Alternative_music Repeated_music
 %type <i>      tremolo_type
-%type <i>      int unsigned
+%type <i>      bare_int  bare_unsigned
 %type <i>      script_dir
 
-%type <scm>    identifier_init
+%type <scm>    identifier_init 
 
 %type <duration> steno_duration optional_notemode_duration
 %type <duration> entered_notemode_duration explicit_duration
-%type <intvec>  int_list
+       
 %type <reqvec>  pre_requests post_requests
 %type <request> gen_text_def
 %type <pitch>   steno_musical_pitch musical_pitch absolute_musical_pitch
@@ -236,7 +233,6 @@ yylex (YYSTYPE *s,  void * v_l)
 %type <pitch_arr>      chord_additions chord_subtractions chord_notes chord_step
 %type <music>  chord
 %type <pitch>  chord_note chord_inversion chord_bass
-%type <midi>   midi_block midi_body
 %type <duration>       duration_length
 
 %type <scm>  embedded_scm scalar
@@ -244,14 +240,13 @@ yylex (YYSTYPE *s,  void * v_l)
 %type <music>  relative_music re_rhythmed_music
 %type <music>  property_def translator_change
 %type <music_list> Music_list
-%type <paper>  paper_block paper_def_body
-%type <real>   real real_with_dimension
+%type <outputdef>  music_output_def_body
 %type <request> shorthand_command_req
 %type <request>        post_request 
 %type <request> command_req verbose_command_req
 %type <request>        extender_req
 %type <request> hyphen_req
-%type <scm>    string
+%type <scm>    string bare_number number_expression
 %type <score>  score_block score_body
 
 %type <trans>  translator_spec_block translator_spec_body
@@ -290,15 +285,13 @@ toplevel_expression:
        | score_block {
                score_global_array.push ($1);
        }
-       | paper_block {
+       | output_def {
                Identifier * id = new
-                       Paper_def_identifier ($1, PAPER_IDENTIFIER);
-               THIS->lexer_p_->set_identifier ("$defaultpaper", smobify (id))
-       }
-       | midi_block {
-               Identifier * id = new
-                       Midi_def_identifier ($1, MIDI_IDENTIFIER);
-               THIS->lexer_p_->set_identifier ("$defaultmidi", smobify (id))
+                       Music_output_def_identifier ($1, MUSIC_OUTPUT_DEF_IDENTIFIER);
+               if (dynamic_cast<Paper_def*> ($1))
+                       THIS->lexer_p_->set_identifier ("$defaultpaper", smobify (id));
+               else if (dynamic_cast<Midi_def*> ($1))
+                       THIS->lexer_p_->set_identifier ("$defaultmidi", smobify (id));
        }
        | embedded_scm {
                // junk value
@@ -377,14 +370,9 @@ assignment:
 identifier_init:
        score_block {
                $$ = smobify (new Score_identifier ($1, SCORE_IDENTIFIER));
-               
        }
-       | paper_block {
-               $$ = smobify (new Paper_def_identifier ($1, PAPER_IDENTIFIER));
-       }
-       | midi_block {
-               $$ = smobify (new Midi_def_identifier ($1, MIDI_IDENTIFIER));
-
+       | output_def {
+               $$ = smobify (new Music_output_def_identifier ($1, MUSIC_OUTPUT_DEF_IDENTIFIER));
        }
        | translator_spec_block {
                $$ = smobify (new Translator_group_identifier ($1, TRANS_IDENTIFIER));
@@ -399,15 +387,12 @@ identifier_init:
        | explicit_duration {
                $$ = smobify (new Duration_identifier ($1, DURATION_IDENTIFIER));
        }
-       | real {
-               $$ = smobify (new Real_identifier (new Real ($1), REAL_IDENTIFIER));
+       | number_expression {
+               $$ = $1;
        }
        | string {
                $$ = $1;
        }
-       | int   {
-               $$ = smobify (new int_identifier (new int ($1), INT_IDENTIFIER));
-       }
        | embedded_scm  {
                $$ = $1;
        }
@@ -441,21 +426,12 @@ translator_spec_body:
                tg->set_property (ly_scm2string ($2), $4);
        }
        | translator_spec_body STRING '=' identifier_init semicolon     { 
-               Identifier* id = unsmob_identifier ($4);
-
-               Real_identifier *r= dynamic_cast<Real_identifier*>(id);
-               int_identifier *i = dynamic_cast<int_identifier*> (id);
-
-               SCM v;
-               if (gh_string_p ($4))
+               SCM v = gh_int2scm (0);
+               if (gh_string_p ($4) || gh_number_p ($4))
                        v = $4;
-               else if (i) v = gh_int2scm (*i->access_content_int (false));
-               else if (r) v = gh_double2scm (*r->access_content_Real (false));
                else 
                        THIS->parser_error (_("Wrong type for property value"));
 
-               if (id)
-                       delete id;
                /* ugh*/
                Translator_group* tg = dynamic_cast<Translator_group*> ($$);
                
@@ -490,7 +466,7 @@ score_block:
                {
                  Identifier *id =
                        unsmob_identifier (THIS->lexer_p_->lookup_identifier ("$defaultpaper"));
-                 $$->add_output (id ? id->access_content_Paper_def (true) : new Paper_def );
+                 $$->add_output (id ? id->access_content_Music_output_def (true) : new Paper_def );
                }
        }
        ;
@@ -515,148 +491,77 @@ score_body:
        }
        ;
 
-output_def:
-       paper_block {
-               $$ = $1;
-       }
-       |  midi_block           {
-               $$= $1;
-       }
-       ;
-
-
-/*
-       PAPER
-*/
-paper_block:
-       PAPER '{' paper_def_body '}'    { 
-               $$ = $3;
-               THIS-> lexer_p_->scope_l_arr_.pop ();
-       }
-       ;
-
-
-paper_def_body:
-       /* empty */                     {
-                 Identifier *id = unsmob_identifier (THIS->lexer_p_->lookup_identifier ("$defaultpaper"));
-                 Paper_def *p = id ? id->access_content_Paper_def (true) : new Paper_def;
-               THIS-> lexer_p_-> scope_l_arr_.push (p->scope_p_);
-               $$ = p;
-       }
-       | PAPER_IDENTIFIER      {
-               Paper_def *p = $1->access_content_Paper_def (true);
-               THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
-               $$ = p;
-       }
-       | paper_def_body int '=' FONT STRING            { // ugh, what a syntax
-               Lookup * l = new Lookup;
-               l->font_name_ = ly_scm2string ($5);
-               $$->set_lookup ($2, l);
-       }
-       | paper_def_body assignment semicolon {
-               
-       }
-       | paper_def_body translator_spec_block {
-               $$->assign_translator ($2);
-       }
-       | paper_def_body error {
-
-       }
-       ;
-
-
-
-real_with_dimension:
-       REAL CM_T       {
-               $$ = $1 CM;
-       }
-       | REAL PT_T     {
-               $$ = $1 PT;
-       }
-       | REAL IN_T     {
-               $$ = $1 INCH;
-       }
-       | REAL MM_T     {
-               $$ = $1 MM;
-       }
-       | REAL CHAR_T   {
-               $$ = $1 CHAR;
-       }
-       ;
 
-real:
-       REAL            {
-               $$ = $1;
-       }
-       | real_with_dimension
-       | REAL_IDENTIFIER               {
-               $$= *$1->access_content_Real (false);
-       }
-       | '-'  real %prec UNARY_MINUS {
-               $$ = -$2;
-       }
-       | real '*' real {
-               $$ = $1 * $3;
-       }
-       | real '/' real {
-               $$ = $1 / $3;
-       }
-       | real '+' real {
-               $$ = $1  + $3;
-       }
-       | real '-' real {
-               $$ = $1 - $3;
-       }
-       | '(' real ')'  {
-               $$ = $2;
-       }
-       ;
-               
 /*
        MIDI
 */
-midi_block:
-       MIDI
-       '{' midi_body '}'       {
-               $$ = $3;
+output_def:
+       music_output_def_body '}' {
+               $$ = $1;
                THIS-> lexer_p_-> scope_l_arr_.pop();
        }
        ;
 
-midi_body: /* empty */                 {
+music_output_def_body:
+       MIDI '{'    {
         Identifier *id = unsmob_identifier (THIS->lexer_p_->lookup_identifier ("$defaultmidi"));
-        Midi_def* p = id
-               ? id->access_content_Midi_def (true) : new Midi_def ;
+
+               
+        Midi_def* p =0;
+       if (id)
+               p = dynamic_cast<Midi_def*> (id->access_content_Music_output_def (true));
+       else
+               p = new Midi_def;
 
         $$ = p;
         THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
        }
-       | MIDI_IDENTIFIER       {
-               Midi_def * p =$1-> access_content_Midi_def (true);
+       | PAPER '{'     {
+                 Identifier *id = unsmob_identifier (THIS->lexer_p_->lookup_identifier ("$defaultpaper"));
+                 Paper_def *p = 0;
+               if (id)
+                       p = dynamic_cast<Paper_def*> (id->access_content_Music_output_def (true));
+               else
+                       p = new Paper_def;
+               THIS-> lexer_p_-> scope_l_arr_.push (p->scope_p_);
+               $$ = p;
+       }
+       | PAPER '{' MUSIC_OUTPUT_DEF_IDENTIFIER         {
+               Music_output_def *p = $3->access_content_Music_output_def (true);
+               THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
                $$ = p;
+       }
+       | MIDI '{' MUSIC_OUTPUT_DEF_IDENTIFIER  {
+               Music_output_def *p = $3->access_content_Music_output_def (true);
                THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
+               $$ = p;
        }
-       | midi_body assignment semicolon {
+       | music_output_def_body assignment semicolon {
 
        }
-       | midi_body translator_spec_block       {
+       | music_output_def_body translator_spec_block   {
                $$-> assign_translator ($2);
        }
-       | midi_body tempo_request semicolon {
+       | music_output_def_body tempo_request semicolon {
                /*
                        junk this ? there already is tempo stuff in
                        music.
                */
-               $$->set_tempo ($2->dur_.length_mom (), $2->metronome_i_);
+               dynamic_cast<Midi_def*> ($$)->set_tempo ($2->dur_.length_mom (), $2->metronome_i_);
                delete $2;
        }
-       | midi_body error {
+       | music_output_def_body bare_int '=' FONT STRING                { // ugh, what a syntax
+               Lookup * l = new Lookup;
+               l->font_name_ = ly_scm2string ($5);
+               dynamic_cast<Paper_def*> ($$)->set_lookup ($2, l);
+       }
+       | music_output_def_body error {
 
        }
        ;
 
 tempo_request:
-       TEMPO steno_duration '=' unsigned       {
+       TEMPO steno_duration '=' bare_unsigned  {
                $$ = new Tempo_req;
                $$->dur_ = *$2;
                delete $2;
@@ -695,7 +600,7 @@ Alternative_music:
 
 
 Repeated_music:
-       REPEAT STRING unsigned Music Alternative_music
+       REPEAT STRING bare_unsigned Music Alternative_music
        {
                Music_sequence* m = dynamic_cast <Music_sequence*> ($5);
                if (m && $3 < m->length_i ())
@@ -757,11 +662,11 @@ Simple_music:
        | MUSIC_IDENTIFIER { $$ = $1->access_content_Music (true); }
        | property_def
        | translator_change
-       | Simple_music '*' unsigned '/' unsigned        {
+       | Simple_music '*' bare_unsigned '/' bare_unsigned      {
                $$ = $1;
                $$->compress (Moment($3, $5 ));
        }
-       | Simple_music '*' unsigned              {
+       | Simple_music '*' bare_unsigned                 {
                $$ = $1;
                $$->compress (Moment ($3, 1));
        }
@@ -799,7 +704,7 @@ Composite_music:
                THIS->remember_spot ();
        }
        /* CONTINUED */ 
-               unsigned '/' unsigned Music     
+               bare_unsigned '/' bare_unsigned Music   
 
        {
                $$ = new Time_scaled_music ($3, $5, $6);
@@ -882,7 +787,7 @@ property_def:
 
 scalar:
        string          { $$ = $1; }
-       | int           { $$ = gh_int2scm ($1); }
+       | bare_int      { $$ = gh_int2scm ($1); }
        | embedded_scm  { $$ = $1; }
        ;
 
@@ -963,7 +868,7 @@ verbose_command_req:
        BAR STRING                      {
                $$ = new Bar_req (ly_scm2string ($2));
        }
-       | COMMANDSPANREQUEST int STRING {
+       | COMMANDSPANREQUEST bare_int STRING {
                Span_req * sp_p = new Span_req;
                sp_p-> span_dir_  = Direction($2);
                sp_p->span_type_str_ = ly_scm2string ($3);
@@ -980,19 +885,19 @@ verbose_command_req:
                $$ = m;
 
        }
-       | MARK unsigned {
+       | MARK bare_unsigned {
                Mark_req *m = new Mark_req;
                m->mark_label_ =  gh_int2scm ($2);
                $$ = m;
        }
 
-       | TIME_T unsigned '/' unsigned  {
+       | TIME_T bare_unsigned '/' bare_unsigned        {
                Time_signature_change_req *m = new Time_signature_change_req;
                m->beats_i_ = $2;
                m->one_beat_i_=$4;
                $$ = m;
        }
-       | PENALTY int   {
+       | PENALTY bare_int      {
                Break_req * b = new Break_req;
                b->penalty_f_ = $2 / 100.0;
                b->set_spot (THIS->here_input ());
@@ -1015,19 +920,6 @@ verbose_command_req:
                Key_change_req *key_p= new Key_change_req;
                $$ = key_p;
        }
-/*
-TODO: Support for minor/major keys; make `major-scale' settable.
-
-FIXME: force modality.
-*/
-/*
-       | KEY NOTENAME_PITCH    {
-               Key_change_req *key_p= new Key_change_req;
-               
-               key_p->pitch_alist_ = scm_eval (ly_symbol2scm ("major-scale"));
-               $$ = key_p; 
-       }
-*/
        | KEY NOTENAME_PITCH SCM_IDENTIFIER     {
                Key_change_req *key_p= new Key_change_req;
                
@@ -1090,9 +982,9 @@ verbose_request:
 
                $$ = ts_p;
        }
-       | SPANREQUEST int STRING {
+       | SPANREQUEST bare_int STRING {
                Span_req * sp_p = new Span_req;
-               sp_p-> span_dir_  = Direction($2);
+               sp_p->span_dir_  = Direction($2);
                sp_p->span_type_str_ = ly_scm2string ($3);
                sp_p->set_spot (THIS->here_input ());
                $$ = sp_p;
@@ -1172,15 +1064,15 @@ musical_pitch:
        ;
 
 explicit_duration:
-       DURATION '{' int_list '}'       {
+       DURATION embedded_scm   {
                $$ = new Duration;
-               Array<int> &a = *$3;
-               ARRAY_SIZE(a,2);
-                       
-               $$-> durlog_i_ = a[0];
-               $$-> dots_i_ = a[1];
-
-               delete &a;              
+               if (scm_ilength ($2) == 2)
+                       {
+                       $$-> durlog_i_ = gh_scm2int (gh_car($2));
+                       $$-> dots_i_ = gh_scm2int (gh_cadr($2));
+                       }
+               else
+                       THIS->parser_error (_("Must have 2 arguments for duration"));
        }
        ;
 
@@ -1309,10 +1201,10 @@ duration_length:
        steno_duration {
                $$ = $1;
        }
-       | duration_length '*' unsigned {
+       | duration_length '*' bare_unsigned {
                $$->tuplet_iso_i_ *= $3;
        }
-       | duration_length '/' unsigned {
+       | duration_length '/' bare_unsigned {
                $$->tuplet_type_i_ *= $3;
        }
        ;
@@ -1333,7 +1225,7 @@ optional_notemode_duration:
        ;
 
 steno_duration:
-       unsigned                {
+       bare_unsigned           {
                $$ = new Duration;
                if (!is_duration_b ($1))
                        THIS->parser_error (_f ("not a duration: %d", $1));
@@ -1354,7 +1246,7 @@ tremolo_type:
        ':'     {
                $$ =0;
        }
-       | ':' unsigned {
+       | ':' bare_unsigned {
                if (!is_duration_b ($2))
                        THIS->parser_error (_f ("not a duration: %d", $2));
                $$ = $2;
@@ -1386,7 +1278,6 @@ simple_element:
 
                delete $1;
                delete $4;
-
        }
        | RESTNAME optional_notemode_duration           {
                  Simultaneous_music* velt_p = new Request_chord;
@@ -1438,16 +1329,16 @@ simple_element:
        | STRING optional_notemode_duration     {
                if (!THIS->lexer_p_->lyric_state_b ())
                        THIS->parser_error (_ ("Have to be in Lyric mode for lyrics"));
-                 Simultaneous_music* velt_p = new Request_chord;
+               Simultaneous_music* velt_p = new Request_chord;
 
-                 Lyric_req* lreq_p = new Lyric_req;
-                 lreq_p ->text_str_ = ly_scm2string ($1);
-                 lreq_p->duration_ = *$2;
-                 lreq_p->set_spot (THIS->here_input());
+               Lyric_req* lreq_p = new Lyric_req;
+               lreq_p ->text_str_ = ly_scm2string ($1);
+               lreq_p->duration_ = *$2;
+               lreq_p->set_spot (THIS->here_input());
 
-                 velt_p->add_music (lreq_p);
+               velt_p->add_music (lreq_p);
 
-                 delete  $2;
+               delete  $2;
                $$= velt_p;
 
        }
@@ -1458,6 +1349,7 @@ simple_element:
        }
        ;
 
+
 chord:
        steno_tonic_pitch optional_notemode_duration chord_additions chord_subtractions chord_inversion chord_bass {
                 $$ = THIS->get_chord (*$1, $3, $4, $5, $6, *$2);
@@ -1529,19 +1421,19 @@ chord_step:
        ;
 
 chord_note:
-       unsigned {
+       bare_unsigned {
                $$ = new Musical_pitch;
                $$->notename_i_ = ($1 - 1) % 7;
                $$->octave_i_ = $1 > 7 ? 1 : 0;
                $$->accidental_i_ = 0;
         } 
-       | unsigned '+' {
+       | bare_unsigned '+' {
                $$ = new Musical_pitch;
                $$->notename_i_ = ($1 - 1) % 7;
                $$->octave_i_ = $1 > 7 ? 1 : 0;
                $$->accidental_i_ = 1;
        }
-       | unsigned CHORD_MINUS {
+       | bare_unsigned CHORD_MINUS {
                $$ = new Musical_pitch;
                $$->notename_i_ = ($1 - 1) % 7;
                $$->octave_i_ = $1 > 7 ? 1 : 0;
@@ -1552,48 +1444,91 @@ chord_note:
 /*
        UTILITIES
  */
-
-/*
-  FIXME: use scm.
-*/
-/*
-pitch_list:                    {
-               $$ = new Array<Musical_pitch>;
+number_expression:
+       bare_number {
+               $$ = $1;
        }
-       | pitch_list musical_pitch      {
-               $$->push (*$2);
-               delete $2;
+       | '-'  number_expression %prec UNARY_MINUS {
+               $$ = scm_difference ($2, SCM_UNDEFINED);
        }
-       ;
-*/
-
-int_list:
-       /**/                    {
-               $$ = new Array<int>
+       | number_expression '*' number_expression {
+               $$ = scm_product ($1, $3);
+       }
+       | number_expression '/' number_expression {
+               $$ = scm_divide ($1, $3);
+       }
+       | number_expression '+' number_expression {
+               $$ = scm_sum ($1, $3);
        }
-       | int_list int          {
-               $$->push ($2);          
+       | number_expression '-' number_expression {
+               $$ = scm_difference ($1, $3);
+       }
+       | '(' number_expression ')'     {
+               $$ = $2;
        }
        ;
 
-unsigned:
+bare_number:
        UNSIGNED        {
-               $$ = $1;
+               $$ = gh_int2scm ($1);
        }
        | DIGIT         {
+               $$ = gh_int2scm ($1);
+       }
+       | REAL          {
+               $$ = gh_double2scm ($1);
+       }
+       | NUMBER_IDENTIFIER             {
                $$ = $1;
        }
+       | REAL CM_T     {
+               $$ = gh_double2scm ($1 CM);
+       }
+       | REAL PT_T     {
+               $$ = gh_double2scm ($1 PT);
+       }
+       | REAL IN_T     {
+               $$ = gh_double2scm ($1 INCH);
+       }
+       | REAL MM_T     {
+               $$ = gh_double2scm ($1 MM);
+       }
+       | REAL CHAR_T   {
+               $$ = gh_double2scm ($1 CHAR);
+       }
        ;
 
-int:
-       unsigned {
-               $$ = $1;
+
+bare_unsigned:
+       bare_number {
+               if (scm_integer_p ($1) == SCM_BOOL_T) {
+                       $$ = gh_scm2int ($1);
+
+               } else {
+                       THIS->parser_error (_("need integer number arg"));
+                       $$ = 0;
+               }
+               if ($$ < 0) {
+                       THIS->parser_error (_("Must be positive integer"));
+                       $$ = -$$;
+                       }
+
        }
-       | '-' unsigned {
-               $$ = -$2;
+       ;
+bare_int:
+       bare_number {
+               if (scm_integer_p ($1) == SCM_BOOL_T)
+               {
+                       int k = gh_scm2int ($1);
+                       $$ = k;
+               } else
+               {
+                       THIS->parser_error (_("need integer number arg"));
+                       $$ = 0;
+               }
        }
-       | INT_IDENTIFIER        {
-               $$ = *$1->access_content_int (false);
+       | '-' bare_int {
+               $$ = -$2;
        }
        ;
 
@@ -1625,6 +1560,7 @@ questions:
 semicolon:
        ';'
        ;
+
 %%
 
 void
index b8a69703a7f9a9e985ca67bf98d6bdaa217b2611..8f43379ba51bede70572e67fd85c967d54e9e04e 100644 (file)
@@ -16,8 +16,8 @@
 #include "stem.hh"
 #include "side-position-interface.hh"
 #include "staff-symbol-referencer.hh"
-#include "text-item.hh"
-#include "sustain-pedal.hh"
+#include "item.hh"
+
 
 /*
    TODO:
@@ -159,7 +159,7 @@ Piano_pedal_engraver::do_process_music ()
            }
          else
            {
-             s = get_property ("stopStart" + String (p->name_ ));
+             s = get_property (("stopStart" + String (p->name_ )).ch_C());
            }
          p->start_req_l_ = p->req_l_drul_[START];
        }
@@ -171,14 +171,14 @@ Piano_pedal_engraver::do_process_music ()
            }
          else
            {
-             s = get_property ("stop" + String (p->name_ ));
+             s = get_property (("stop" + String (p->name_ )).ch_C());
            }
          p->start_req_l_ = 0;
        }
       else if (p->req_l_drul_[START])
        {
          p->start_req_l_ = p->req_l_drul_[START];
-         s = get_property ("start" + String (p->name_ ));
+         s = get_property (("start" + String (p->name_ )).ch_C());
        }
 
       if (gh_string_p (s))
@@ -186,14 +186,14 @@ Piano_pedal_engraver::do_process_music ()
          if (p->name_ == String ("Sustain"))
            {
              // fixme: Item should be sufficient.
-             p->item_p_ = new Text_item (get_property ("basicSustainPedalProperties"));
+             p->item_p_ = new Item (get_property ("basicSustainPedalProperties"));
            }
          else
            {
-             p->item_p_ = new Text_item (get_property ("basicPedalProperties"));
+             p->item_p_ = new Item (get_property ("basicPedalProperties"));
            }
-             p->item_p_->set_elt_property ("text", s);
-             // guh
+         p->item_p_->set_elt_property ("text", s);
+         // guh
 
          Side_position_interface si (p->item_p_);
          si.set_axis (Y_AXIS);
index 5270a355e3caecb03d949bb18fc0cc5745cfaeda..24bc4d084773f248b91bed8d829db87145badd26 100644 (file)
@@ -14,7 +14,7 @@
 #include "paper-score.hh"
 #include "staff-symbol-referencer.hh"
 
-
+// -> offset callback
 void
 Rest::after_line_breaking ()
 {
@@ -36,29 +36,35 @@ Rest::after_line_breaking ()
 }
 
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Rest)
-Molecule 
-Rest::do_brew_molecule () const
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Rest)
+
+SCM 
+Rest::scheme_molecule (SCM smob) 
 {
+  Score_element* sc = unsmob_element (smob);
+  
   bool ledger_b =false;
 
-  if (balltype_i () == 0 || balltype_i () == 1)
+  SCM balltype = sc->get_elt_property ("duration-log");
+  
+  if (balltype == gh_int2scm (0) || balltype == gh_int2scm (1))
     {
-      Staff_symbol_referencer_interface si(this);
-      ledger_b = abs(si.position_f ()  - (2* balltype_i () - 1))
+      Staff_symbol_referencer_interface si(sc);
+      ledger_b = abs(si.position_f ()  - (2* gh_scm2int (balltype) - 1))
        > si.line_count (); 
     }
   
   String style; 
-  SCM style_sym =get_elt_property ("style");
-  if (balltype_i () >= 2 &&gh_string_p ( style_sym))
+  SCM style_sym =sc->get_elt_property ("style");
+  if (gh_scm2int (balltype) >= 2 && gh_string_p (style_sym))
     {
       style = ly_scm2string (style_sym);
     }
 
-  String idx =  ("rests-") + to_str (balltype_i ()) + (ledger_b ? "o" : "") + style;
+  String idx =  ("rests-") + to_str (gh_scm2int (balltype))
+    + (ledger_b ? "o" : "") + style;
 
-  return lookup_l ()->afm_find (idx);
+  return sc-> lookup_l ()->afm_find (idx).create_scheme();
 }
 
 
index 96d1b86d336384b4b2b066bea165f67fde9432fb..c04878f93404c54865193ea6e60014e9224185df 100644 (file)
@@ -20,15 +20,6 @@ Scope::~Scope ()
 Scope::Scope (Scope const&s)
   : id_dict_ (new Scheme_hash_table (*s.id_dict_))
 {
-  /*
-    cloning not necessary.
-
-  id_dict_ = new Hash_table<Protected_scm,Identifier*> (*s.id_dict_);
-  for (Scope_iter ai (s); ai.ok(); ai++)
-    {
-      id_dict_->elem (ai.scm_key ()) = ai.val ()->clone ();
-    }
-  */
 }
 
 Scope::Scope ()
index 906c4c5a965c71a63f0276f6a1bc17927b54c959..a0a13eb5afa1532809d992cea194c95c4d35125b 100644 (file)
@@ -38,6 +38,7 @@ remove dynamic_cast<Spanner,Item> and put this code into respective
 */
 
 
+#define INFINITY_MSG "Infinity or NaN encountered"
 
 Score_element::Score_element(SCM basicprops)
 {
@@ -49,9 +50,6 @@ Score_element::Score_element(SCM basicprops)
   status_i_ = 0;
   self_scm_ = SCM_EOL;
   original_l_ = 0;
-#ifndef READONLY_PROPS
-  basic_property_list_ = basicprops;
-#endif READONLY_PROPS
   property_alist_ = basicprops;
   pointer_alist_ = SCM_EOL;
   
@@ -67,17 +65,7 @@ Score_element::Score_element (Score_element const&s)
   self_scm_ = SCM_EOL;
   original_l_ =(Score_element*) &s;
   property_alist_ = s.property_alist_;
-#ifndef READONLY_PROPS
-  basic_property_list_ = s.basic_property_list_;
-  /*
-    TODO: should copy the private part of the list.
-   */
-  SCM y ;
-  for (SCM *sp = &s.property_alist_;  *sp != basic_property_list_; sp = &SCM_CDR(*sp))
-    {
-      *sp = gh_cons (      
-    }
-#endif
+
   pointer_alist_ = SCM_EOL;
   
   status_i_ = s.status_i_;
@@ -138,24 +126,6 @@ void
 Score_element::set_elt_property (String k, SCM val)
 {
   SCM sym = ly_symbol2scm (k.ch_C ());
-#ifndef READONLY_PROPS
-  /*
-    destructive if found in my part of the list.
-   */
-  for (SCM s = property_alist_; s != basic_property_list_; s =gh_cdr (s))
-    {
-      if (gh_caar (s)== sym)
-       {
-         gh_set_cdr_x (gh_car (s), val);
-         return;
-       }
-    }
-/*
-    not found in private list. Override in private list.
-   */
-  
-#endif
-  
   property_alist_ = gh_cons (gh_cons (sym, val), property_alist_);
 }
 
@@ -298,25 +268,23 @@ Score_element::do_add_processing()
 }
 
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Score_element)
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Score_element)
 
-  /*
+/*
   ugh.
  */  
-
-Molecule 
-Score_element::do_brew_molecule () const
+SCM
+Score_element::scheme_molecule (SCM smob) 
 {
-  SCM glyph = get_elt_property ("glyph");
+  Score_element * sc = unsmob_element (smob);
+  SCM glyph = sc->get_elt_property ("glyph");
   if (gh_string_p (glyph))
     {
-      return lookup_l ()->afm_find (String (ly_scm2string (glyph)));
+      return sc->lookup_l ()->afm_find (String (ly_scm2string (glyph))).create_scheme ();
     }
   else
     {
-      Molecule m ;
-      m.set_empty (true);
-      return m;
+      return SCM_EOL;
     }
 }
 
@@ -500,7 +468,12 @@ Score_element::find_broken_piece (Line_of_score*) const
 void
 Score_element::translate_axis (Real y, Axis a)
 {
-  dim_cache_[a].offset_ += y;
+  if (isinf (y) || isnan (y))
+    programming_error (_(INFINITY_MSG));
+  else
+    {
+      dim_cache_[a].offset_ += y;
+    }
 }  
 
 Real
@@ -532,7 +505,7 @@ Score_element::get_offset (Axis a) const
       if (isinf (r) || isnan (r))
        {
          r = 0.0;
-         programming_error ("Infinity or NaN encountered");
+         programming_error (INFINITY_MSG);
        }
       me->dim_cache_[a].offset_ +=r;
     }
@@ -608,9 +581,9 @@ Score_element *
 Score_element::common_refpoint (Score_element const* s, Axis a) const
 {
   /*
-    I don't like the quadratic aspect of this code. Maybe this should
-    be rewritten some time, but the largest chain of parents might be
-    10 high or so, so it shouldn't be a real issue. */
+    I don't like the quadratic aspect of this code, but I see no other
+    way. The largest chain of parents might be 10 high or so, so
+    it shouldn't be a real issue. */
   for (Score_element const *c = this; c; c = c->dim_cache_[a].parent_l_)
     for (Score_element const * d = s; d; d = d->dim_cache_[a].parent_l_)
       if (d == c)
index da89393ba6c1f20e807f265a34734ed479f4484b..415f1cac8b33d4c93b4d2ef3a83049a3577e9f10 100644 (file)
@@ -50,8 +50,12 @@ Span_bar::before_line_breaking ()
 void
 Span_bar::after_line_breaking ()
 {
-  Bar::after_line_breaking ();
   Interval i (get_spanned_interval ());
+
+  /*
+    Bar::brew_molecule delivers a barline of y-extent (-h/2,h/2), so
+    we have to translate ourselves to be in the center of the 
+    interval that we span.  */
   translate_axis (i.center (), Y_AXIS);
 }
 
index 6c111feee18050b85a78676aee9ad67fdacc05cf..1ca3d9b3ebcb4acac4b707b117d4424e8ac89ffa 100644 (file)
@@ -623,7 +623,7 @@ Stem::calc_stem_info () const
 
   s = beam_l ()->get_elt_property ("shorten");
   if (gh_number_p (s))
-    info.idealy_f_ -= gh_double2scm (s);
+    info.idealy_f_ -= gh_scm2double (s);
 
   Real interstaff_f = -beam_dir* calc_interstaff_dist (this, beam_l ());
 
index 93e454441c9489a3e11bb757b3a9fc31c70be349..1906eb29ac6199257786b91cee2978439553e652 100644 (file)
@@ -6,27 +6,34 @@
   (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
-
-#include "sustain-pedal.hh"
-#include "side-position-interface.hh"
+#include "score-element.hh"
 #include "molecule.hh"
 #include "lookup.hh"
-#include "staff-symbol-referencer.hh"
 
-void
-Sustain_pedal::after_line_breaking ()
+// update comment --hwn 
+/*
+  Urg.
+  This is almost text
+  Problem is:
+    * we have no kerning
+    * symbols are at wrong place in font
+
+
+
+  Properties:
+
+  glyph -- text string (TODO:   make one large glyph of the Ped symbol, removes need for do_brew_molecule ())
+
+*/
+
+struct Sustain_pedal
 {
-  return ;
-  /*
-    UGH. Should work automatically via offset callback. 
-   */
-  Side_position_interface i (this);
-  Direction d =  i.get_direction ();
-  i.set_direction (d);
-}
+public:
+   static SCM scheme_molecule (SCM);
+};
 
-MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Sustain_pedal);
 
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Sustain_pedal);
 
 SCM
 Sustain_pedal::scheme_molecule (SCM smob) 
@@ -57,7 +64,3 @@ Sustain_pedal::scheme_molecule (SCM smob)
   return mol.create_scheme ();
 }
 
-Sustain_pedal ::Sustain_pedal(SCM s )
-  : Item (s)
-{
-}
index f02cab53d59c32562de15d8a2297442ee9e2fd38..884f44e3139efe855669d64086a1d98607cc00fc 100644 (file)
@@ -19,20 +19,22 @@ Molecule
 System_start_delimiter::staff_bracket (Real height) const 
 {
   Paper_def* p= paper_l ();
-  Real arc_height = p->get_var("bracket_arch_height");
+  SCM scmss = p->get_scmvar ("staffspace");
+  Real ss = gh_scm2double (scmss);
+  Real arc_height = gh_scm2double (get_elt_property("arch-height")) * ss ;
+  
   SCM at = gh_list (ly_symbol2scm ("bracket"),
-                   gh_double2scm (p->get_var("bracket_arch_angle")),
-                   gh_double2scm (p->get_var("bracket_arch_width")),
+                   scm_product (get_elt_property ("arch-angle"), scmss),
+                   scm_product (get_elt_property ("arch-width"), scmss),
                    gh_double2scm (arc_height),
-                   gh_double2scm (p->get_var("bracket_width")),
+                   scm_product (get_elt_property ("bracket-width"),scmss),
                    gh_double2scm (height),
-                   gh_double2scm (p->get_var("bracket_arch_thick")),
-                   gh_double2scm (p->get_var("bracket_thick")),
+                   scm_product (get_elt_property ("arch-thick"),scmss),
+                   scm_product (get_elt_property ("bracket-thick"),scmss),
                    SCM_UNDEFINED);
 
-  Real staff_space = p->get_var ("interline");
   Real h = height + 2 * arc_height;
-  Box b (Interval (0, 1.5 * staff_space), Interval (-h/2, h/2));
+  Box b (Interval (0, 1.5 * ss), Interval (-h/2, h/2));
   Molecule mol (b, at);
   mol.align_to (X_AXIS, CENTER);
   return mol;
@@ -48,7 +50,8 @@ System_start_delimiter::System_start_delimiter (SCM s)
 Molecule
 System_start_delimiter::simple_bar (Real h) const
 {
-  Real w = paper_l ()->get_var ("barthick_score");
+  Real w = paper_l ()->get_var ("stafflinethickness") *
+    gh_scm2double (get_elt_property ("thickness"));
   return lookup_l ()->filledbox (Box (Interval(0,w), Interval(-h/2, h/2)));
 }
 
@@ -63,41 +66,44 @@ System_start_delimiter::after_line_breaking ()
     }
 }
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(System_start_delimiter);
-Molecule
-System_start_delimiter::do_brew_molecule ()const
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(System_start_delimiter);
+
+SCM
+System_start_delimiter::scheme_molecule (SCM smob)
 {
-  Interval ext = Axis_group_interface::group_extent_callback (this, Y_AXIS);
+  Score_element * sc = unsmob_element (smob);
+
+  System_start_delimiter * ssd= dynamic_cast<System_start_delimiter*> (sc);
+  
+  Interval ext = Axis_group_interface::group_extent_callback (sc, Y_AXIS);
   Real l = ext.length (); 
   Molecule m;
 
-  SCM s = get_elt_property ("collapse-height");
+  SCM s = sc->get_elt_property ("collapse-height");
   if (gh_number_p (s) && l < gh_scm2double (s))
     {
-      System_start_delimiter * me = (System_start_delimiter*)this;
-      me->suicide ();
-      return m;
+      sc->suicide();
+      return SCM_EOL;
     }
 
-  
-  s = get_elt_property ("glyph");
+  s = sc->get_elt_property ("glyph");
   if (!gh_symbol_p(s))
-    return m;
+    return SCM_EOL;
   
   if (s == ly_symbol2scm ("bracket"))
-    m = staff_bracket (l);
-  else if ( s == ly_symbol2scm ("brace"))
-    m =  staff_brace (l);
+    m = ssd->staff_bracket (l);
+  else if (s == ly_symbol2scm ("brace"))
+    m = ssd-> staff_brace (l);
   else if (s == ly_symbol2scm ("bar-line"))
-    m = simple_bar (l);
+    m = ssd->simple_bar (l);
   
   
   m.translate_axis (ext.center (), Y_AXIS);
-  return m;
+  return m.create_scheme ();
 }
 
 /*
-  ugh. Suck me plenty.
+  Ugh. Suck me plenty.
  */
 Molecule
 System_start_delimiter::staff_brace (Real y)  const
index a0390bd6a2a92d2416afd5ae55fe4862ae21a0ad..3611f59dcc3da87a46a0d325d63a5db490097c93 100644 (file)
@@ -10,7 +10,7 @@
 #include "dimension-cache.hh"
 #include "engraver.hh"
 #include "side-position-interface.hh"
-#include "text-item.hh"
+#include "item.hh"
 #include "musical-request.hh"
 #include "note-head.hh"
 #include "stem.hh"
@@ -22,7 +22,7 @@
 class Text_engraver : public Engraver
 {
   Link_array<Text_script_req> reqs_;
-  Link_array<Text_item> texts_;
+  Link_array<Item> texts_;
 public:
 
   VIRTUAL_COPY_CONS(Translator);
@@ -78,7 +78,7 @@ Text_engraver::do_process_music ()
     {
       Text_script_req * r = reqs_[i];
 
-      Text_item *text = new Text_item (get_property ("basicTextScriptProperties"));
+      Item *text = new Item (get_property ("basicTextScriptProperties"));
       Side_position_interface stafy (text);
 
       SCM axisprop = get_property ("scriptHorizontal");
@@ -121,7 +121,7 @@ Text_engraver::do_pre_move_processing ()
 {
   for (int i=0; i < texts_.size (); i++)
     {
-      Text_item *ti = texts_[i];
+      Item *ti = texts_[i];
       Side_position_interface (ti).add_staff_support ();
       typeset_element (ti);
     }
index 35e5aa5c3dfca2e8242ea7c5f6d14183118374e2..ae3ea80b402c916e98cd0454450627f08533a833 100644 (file)
@@ -1,5 +1,5 @@
 /*   
-  text-item.cc -- implement Text_item
+  text-item.cc -- implement Item
 
   source file of the GNU LilyPond music typesetter
   
@@ -7,40 +7,41 @@
   
  */
 
-#include "text-item.hh"
 #include "debug.hh"
 #include "molecule.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
 #include "staff-symbol-referencer.hh"
 
-Text_item::Text_item (SCM s)
-  : Item (s)
+struct Text_item
 {
-  
-}
+  static SCM scheme_molecule (SCM);
+};
 
-MAKE_SCHEME_SCORE_ELEMENT_CALLBACKS(Text_item)
 
-Molecule 
-Text_item::do_brew_molecule () const
+MAKE_SCHEME_SCORE_ELEMENT_NON_DEFAULT_CALLBACKS(Text_item)
+
+SCM 
+Text_item::scheme_molecule (SCM sm) 
 {
-  SCM style = get_elt_property ("style");
+  Score_element * s = unsmob_element (sm);
+  
+  SCM style = s->get_elt_property ("style");
   String st = gh_string_p (style) ?  ly_scm2string (style) : "";
-  SCM txt = get_elt_property ("text");
+  SCM txt = s-> get_elt_property ("text");
   String t = gh_string_p (txt) ? ly_scm2string (txt) : "";
 
-  Molecule mol = paper_l ()->lookup_l(0)->text (st, t, paper_l ());
+  Molecule mol =  s->paper_l ()->lookup_l(0)->text (st, t, s->paper_l ());
 
-  SCM s = get_elt_property ("word-space");
-  if (gh_number_p (s))
+  SCM space =  s->get_elt_property ("word-space");
+  if (gh_number_p (space))
     {
       Molecule m;
       m.set_empty (false);
-      mol.add_at_edge (X_AXIS, RIGHT, m, gh_scm2double (s)*
-                      staff_symbol_referencer (this).staff_space ());
+      mol.add_at_edge (X_AXIS, RIGHT, m, gh_scm2double (space)*
+                      staff_symbol_referencer  (s).staff_space ());
     }
-  return mol; 
+  return mol.create_scheme ()
 }
 
 
index 9471666e8b4a94fe44b13e051a780514b8dbb3fc..579deaad472d4675736a4234d95e738814f1312d 100644 (file)
@@ -164,9 +164,9 @@ Translator::output_def_l () const
 }
 
 SCM
-Translator::get_property (String id) const
+Translator::get_property (char const * id) const
 {
-  return daddy_trans_l_->get_property (ly_symbol2scm (id.ch_C()));
+  return daddy_trans_l_->get_property (ly_symbol2scm (id));
 }
 
 SCM
index fbb5f04872a2530f174f15d54cba86bb181de47a..eeabe86e5b1f24f797a1645b6c36831bb8eb4cdc 100644 (file)
@@ -90,25 +90,26 @@ Tuplet_spanner::do_brew_molecule () const
          mol.add_molecule (num);
        }
       
-      Real thick = paper_l ()->get_var ("tuplet_thick");
       if (bracket_visibility)      
        {
-         Real gap = paper_l () -> get_var ("tuplet_spanner_gap");
-         Real height = staff_space;
+         SCM ss = paper_l ()->get_scmvar ("staffspace");
+         SCM lt =  paper_l ()->get_scmvar ("stafflinethickness");
+         
+         SCM thick = get_elt_property ("thick");
+         SCM gap = get_elt_property ("number-gap");
+         
          SCM at =gh_list(ly_symbol2scm ("tuplet"),
-                                      gh_double2scm (height),
-                                      gh_double2scm (gap),
-                                      gh_double2scm (w),
-                                      gh_double2scm (dy),
-                                      gh_double2scm (thick),
-                                      gh_int2scm (dir),
-                                      SCM_UNDEFINED);
+                         ss,
+                         scm_product (gap, ss),
+                         gh_double2scm (w),
+                         gh_double2scm (dy),
+                         scm_product (thick, lt),
+                         gh_int2scm (dir),
+                         SCM_UNDEFINED);
 
          Box b;
          mol.add_molecule (Molecule (b, at));
        }
-
-      //mol.translate_axis (dir * staff_space, Y_AXIS);
     }
   return mol;
 }
index c113cfec3cef20e8b40107f182e55a838ebd7f22..e6f16c153990b2bd36921c4a15db6494995cf6af 100644 (file)
@@ -1,8 +1,8 @@
 
   
-breve = \duration { -1 0 }
-longa = \duration { -2 0 }
-maxima = \duration { -3 0 }
+breve = \duration #'( -1 0)
+longa = \duration #'( -2 0 )
+maxima = \duration #'( -3 0 )
 
 #(eval-string (ly-gulp-file "generic-property.scm"))
 
@@ -25,7 +25,7 @@ center=0
 
 break =  \penalty  -1000000; 
 nobreak =  \penalty 1000000; 
-\include "scales.ly"
+\include "scale-definitions.ly"
 
 melisma = \property Staff.melismaBusy = ##t
 melismaEnd = \property Staff.melismaBusy = ##f
index 965321ee6c5d39408cfad673a973f4f4643d8fb2..4445e4afa7fdb149692182383ef2576dacd01471 100644 (file)
@@ -395,11 +395,25 @@ ScoreContext = \translator {
        % in alphabetical order
        % TODO: uniform naming.;  
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-       basicBarlineProperties = #`(
+
+       %
+       % distances are given in stafflinethickness (thicknesses) and staffspace (distances)
+       %
+       
+       
+       basicBarProperties = #`(
                (break-align-symbol . Staff_bar)
                (molecule-callback . ,Bar::scheme_molecule)        
                (visibility-lambda . ,begin-of-line-invisible)
                (breakable . #t)
+
+               ;;
+               ;; 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)
        )
 
        basicBarNumberProperties = #`(
@@ -444,6 +458,7 @@ ScoreContext = \translator {
        )
        basicDotsProperties = #`(
                (molecule-callback . ,Dots::scheme_molecule)
+               (dot-count . 1) 
        )
        basicDynamicLineSpannerProperties = #`(
 
@@ -459,6 +474,9 @@ ScoreContext = \translator {
          (breakable . #t)
        )
        basicHyphenSpannerProperties = #`(
+       (thickness . 1.0)
+       (height . 0.4)
+       (minimum-length .  0.5) 
                (molecule-callback . ,Hyphen_spanner::scheme_molecule)
        )
        basicKeyProperties = #`(
@@ -530,6 +548,13 @@ ScoreContext = \translator {
        basicSystemStartDelimiterProperties = #`(
                (molecule-callback . ,System_start_delimiter::scheme_molecule)
                (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)
        )
        basicStemProperties = #`(
                (molecule-callback . ,Stem::scheme_molecule)
@@ -556,6 +581,8 @@ ScoreContext = \translator {
                
        )
        basicTupletSpannerProperties = #`(
+               (number-gap . 2.0)   
+               (thick . 1.0) 
                (molecule-callback . ,Tuplet_spanner::scheme_molecule)
        )       
        basicStemTremoloProperties = #`(
index 27c3fa6612d0c95f8e3476eaf9740af216d237e3..fd0a20c87978f824b0e060856aae03a7e466f660 100644 (file)
@@ -1,4 +1,6 @@
 % Toplevel initialisation file. 
+
+foo = \tempo 4 = 100 ;
        
 \version "1.3.59";
 
index 974dae0b7b9a4359d31b1102d85546edc3bedd0f..f06f633e0f110d72db6c0eca60e09298be70bdc4 100644 (file)
@@ -44,12 +44,6 @@ arithmetic_basicspace = 2.;
 arithmetic_multiplier = 0.9 * \quartwidth ;
 
 
-#'Stem_tremolo::beam-width = 1.5 * \quartwidth ; 
-
-#'Clef_item::visibility-lambda = #postbreak-only-visibility
-#'Key_item::visibility-lambda = #postbreak-only-visibility
-#'Breathing_sign::visibility-lambda = #non-postbreak-visibility
-
 % catch suspect beam slopes, set slope to zero if
 % outer stem is lengthened more than
 beam_lengthened = 0.2 * \staffspace;
index 09e12e0680c13f5eba16b6241ce97095262b19dc..46e240e9865f0aa9f2b0be60a90a3ed527220db8 100644 (file)
@@ -158,35 +158,9 @@ method.
 %}
 gourlay_maxmeasures = 10.;
 
-
+% vertical space between lines.
 line_kern = \staffspace;
 
-%{ Ross. page 151 lists these values, but we think that thick lines
-and kernings are too thick.
-
-bar_kern = 0.5 * \staffspace;
-bar_thinkern = 0.75 * \staffspace;
-barthick_thick = 0.5* \staffspace;
-barthick_score = 0.13333* \staffspace;
-barthick_thin = 0.1*\staffspace;
-
-%}
-
-bar_kern = 3.0 * \stafflinethickness;
-bar_thinkern = 3.0 * \stafflinethickness;
-barthick_thick = 6.0* \stafflinethickness;
-barthick_thin = 1.6*\stafflinethickness;
-barthick_score = 1.6*\stafflinethickness;
-
-bracket_arch_thick = \staffspace / 4.0;
-bracket_width = 2.0 * \staffspace;
-bracket_thick = \staffspace / 4.0;
-bracket_arch_height = 1.5 * \staffspace;
-bracket_arch_width = \bracket_arch_height;
-bracket_arch_angle = 50.0;
-
-tuplet_spanner_gap = 2.0 * \staffspace;
-tuplet_thick = 1.0*\stafflinethickness;
 volta_thick = 1.6*\stafflinethickness;
 volta_spanner_height = 2.0 *\staffspace;
 
@@ -197,9 +171,6 @@ rulethickness = \stafflinethickness;
 
 extender_height = 0.8*\stafflinethickness;
 
-hyphen_thickness = 0.05*\font_normal;
-hyphen_height = 0.2*\font_normal;
-hyphen_minimum_length = 0.25*\font_normal;
 
 % Multi-measure rests
 multi_measure_rest_x_minimum = 2.5*\staffheight;
@@ -221,9 +192,6 @@ restcollision_minimum_beamdist = 1.5;
 % unit for note collision resolving
 collision_note_width = \notewidth;     %ugh.
 
-% deprecated!
-postBreakPadding = 0.0;
-
 % optical correction amount.
 stemSpacingCorrection = 0.5*\staffspace;
 
@@ -268,9 +236,6 @@ stem_default_neutral_direction = 1.0;
 % in staffspace
 articulation_script_padding_default = 1.0;
 
-% Backward compatibility -- has no function; 
-Gourlay = 0.0;
-Wordwrap =0.0;
 
 \include "engraver.ly";
 
diff --git a/ly/scale-definitions.ly b/ly/scale-definitions.ly
new file mode 100644 (file)
index 0000000..873f583
--- /dev/null
@@ -0,0 +1,32 @@
+
+
+major = #'(
+    (0 . 0)
+    (1 . 0)
+    (2 . 0)
+    (3 . 0)
+    (4 . 0)
+    (5 . 0)
+    (6 . 0)
+  
+  )
+minor = #'(
+    (0 . 0)
+    (1 . 0)
+    (2 . -1)
+    (3 . 0)
+    (4 . 0)
+    (5 . -1)
+    (6 . -1)
+    )
+  
+
+%{ OUTDATED: someone please fix these
+ionian = 0
+locrian = 1
+aeolian = 3
+mixolydian = 5
+lydian = 7
+phrygian = 8
+dorian = 10
+%}
diff --git a/ly/scales.ly b/ly/scales.ly
deleted file mode 100644 (file)
index 873f583..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-major = #'(
-    (0 . 0)
-    (1 . 0)
-    (2 . 0)
-    (3 . 0)
-    (4 . 0)
-    (5 . 0)
-    (6 . 0)
-  
-  )
-minor = #'(
-    (0 . 0)
-    (1 . 0)
-    (2 . -1)
-    (3 . 0)
-    (4 . 0)
-    (5 . -1)
-    (6 . -1)
-    )
-  
-
-%{ OUTDATED: someone please fix these
-ionian = 0
-locrian = 1
-aeolian = 3
-mixolydian = 5
-lydian = 7
-phrygian = 8
-dorian = 10
-%}
index aef58f1d525ddfd05ff824494d9a169436ae2188..f7017ed3448a1fffa66257372be20b1155bd4f56 100644 (file)
@@ -4,3 +4,5 @@ export MFINPUTS:=$(topdir)/mf/$(PATHSEP)$(MFINPUTS)$(PATHSEP)$(PATHSEP)
 export TEXINPUTS:=$(topdir)/mf/out/$(PATHSEP)$(topdir)/tex/$(PATHSEP)$(topdir)/ps/$(PATHSEP)$(TEXINPUTS)$(PATHSEP)..$(PATHSEP)$(PATHSEP)
 export LILYINCLUDE:=$(topdir)/ps$(PATHSEP)$(topdir)/scm$(PATHSEP)$(topdir)/ly$(PATHSEP)$(topdir)/mf/out$(PATHSEP)$(PATHSEP)$(TEX_TFMDIR)$(PATHSEP)$(LILYINCLUDE)
 
+
+export LILYPONDPREFIX:=$(depth)/
index fa170d169806b6292e9930ef69e7897dd82a38fa..9143c6bf45377bf247c8c2478125509077c67c9d 100644 (file)
@@ -5,9 +5,9 @@
 SUBST_TEXI_DEPS=sed 's! \.\./! !g' < $(basename $@).dep > $(outdir)/temp.dep ;         mv $(outdir)/temp.dep $(basename $@).dep 
 
 $(outdir)/%.latex: %.doc
-       cd $(outdir);  $(PYTHON) $(depth)/../scripts/mudela-book.py -I .. -I $(depth)/../input/test/ --dependencies --dep-prefix=$(outdir)/ ../$< 
+       cd $(outdir);LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(depth)/../scripts/mudela-book.py -I .. -I $(depth)/../input/test/ --dependencies --dep-prefix=$(outdir)/ ../$< 
        $(SUBST_TEXI_DEPS)
 
 $(outdir)/%.texi: %.tely
-       cd $(outdir); $(PYTHON) $(depth)/../scripts/mudela-book.py -I .. -I $(depth)/../input/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi ../$<
+       cd $(outdir); LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(depth)/../scripts/mudela-book.py -I .. -I $(depth)/../input/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi ../$<
        $(SUBST_TEXI_DEPS)
index 36373fbade9c97beb50ba513a79a7a7e9c0edb44..70160c080fbab77ed066240d7d2b86f2a3768691 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.60
-Entered-date: 16JUN00
+Version: 1.3.61
+Entered-date: 18JUN00
 Description: 
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.3.60.tar.gz 
+       1000k lilypond-1.3.61.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.60.tar.gz 
+       1000k lilypond-1.3.61.tar.gz 
 Copying-policy: GPL
 End
index 5599000b331bf5efb65e5e2b464f502d4ad32aa3..1caf25c93d3e754abe368bb98b3a5717dd8b5aa6 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.3.60
+Version: 1.3.61
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.60.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.61.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif
index dd38191b509f6bb52055d2bd3af45651a1a8901d..9cc19ff4b5c58f8cce22427d8b754126b012c542 100644 (file)
@@ -26,11 +26,7 @@ STEPMAKE_TEMPLATES=toplevel yolily-toplevel po
 include $(depth)/make/stepmake.make 
 #
 
-website: fonts htmldoc examples doc++ footify
-
-footify:
-       $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
-       $(footify-all-command)
+website: fonts htmldoc examples doc++
 
 fonts:
        $(MAKE) -C $(depth)/mf 
@@ -42,7 +38,6 @@ htmldoc:
        $(MAKE) out='www' local-WWW
        $(MAKE) out='www' -C Documentation WWW
        rm -f `find . -name \*.html~ -print`
-       $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
        $(footify-all-command)
        find `find Documentation -type d -name 'out-www'` -not -name '*dvi' -not -name '*ly' -not -name '*tex' -not -name '*.ps' -not -name 'out-www'  > wwwlist
        tar cfz $(outdir)/htmldoc.tar.gz  `cat wwwlist` `ls *.png $(ERRORLOG)`  index.html
@@ -50,12 +45,10 @@ htmldoc:
 examples:
        $(MAKE) out='www' -C input WWW
        $(MAKE) out='www' -C mutopia WWW
-       # arg, should not break concept of recursive make;
-       # this breaks links (and dependencies, see above)
+       $(footify-all-command)
        $(PYTHON) $(buildscripts)/mutopia-index.py -o short-examples.html input/
        $(PYTHON) $(buildscripts)/mutopia-index.py -o long-examples.html mutopia/
-       #$(footify-all-command)
-       $(footify) --index=./ `$(FIND) . -name '*.html' -print`
+
        tar --exclude='*.dvi' --exclude='*.tex' --exclude='*.ps' --exclude='*.ppm' -czf $(outdir)/examples.tar.gz *-examples.html  `find input mutopia -type d -name 'out-www' -print`
 
 
index 2b3d8b26c494a0608140853b92a88db835f8306b..80e3ffeb6ae74ac8903a06ce9146444c95a2ec4f 100644 (file)
    )
 )
 
+;; silly, use alist? 
 (define (find-notehead-symbol duration style)
   (case style
    ((cross) "2cross")
index 68073f20bae6a34d4d4f03b51bae744230d5ed3c..b206fcebdd7a5e23055e507d7c880e8356dd5f6e 100644 (file)
@@ -310,7 +310,7 @@ def lily_key (k):
                key = key + 'es'
                k = k[1:]
        if not k:
-               return(key)
+               return '%s \\major' % key
 
        type = k[0:3]
        if key_lookup.has_key(type):
@@ -512,11 +512,11 @@ def try_parse_header_line (ln, state):
                                m = re.match ('^([^ \t]*) *(.*)$', a) # seperate clef info
                                if m:
                                        __main__.global_key  =compute_key (m.group(1))# ugh.
-                                       voices_append ('\\key %s \\major;' % lily_key(m.group(1)))
+                                       voices_append ('\\key %s;' % lily_key(m.group(1)))
                                        check_clef(m.group(2))
                                else:
                                        __main__.global_key  =compute_key (a)# ugh.
-                                       voices_append ('\\key %s \\major;' % lily_key(a))
+                                       voices_append ('\\key %s;' % lily_key(a))
                if g == 'O': # Origin
                        header ['origin'] = a
                if g == 'X': # Reference Number
index 984bbc7c10d105dc64e68ba804247551599a7165..adb115208822fc8537e15520a52a258589652730 100644 (file)
@@ -10,9 +10,8 @@ import time
 import string 
 import getopt
 
-gcos = "unknown"
-index_url=''
-top_url=''
+fullname = "unknown"
+index_file=''
 changelog_file=''
 package_name = ''
 package_version = ''
@@ -34,14 +33,15 @@ footer_file = ''
 default_header = r"""
 """
 
-default_footer = r"""<hr>Please take me <a href=@INDEX@>back to the index</a>
-of @PACKAGE_NAME@
+default_footer = r"""<hr>Please take me <a href=%s>back to the index</a>
+of %s
+<!-- package name %s>
+ <!-- webmaster fields. %s %s>
 """
 
-built = r"""<hr><font size=-1>
-This page was built from @PACKAGE_NAME@-@PACKAGE_VERSION@ by 
-<address><br>@GCOS@ &lt<a href="mailto:%s">@MAIL_ADDRESS@</a>&gt,
-@LOCALTIME@.</address><p></font>"""
+builtstr = r"""<hr><font size=-1>
+This page was built from %s-%s by 
+<address><br>%s &lt<a href="mailto:%s">%s</a>&gt,  %s.</address><p></font>"""
 
 
 def gulp_file (f):
@@ -89,9 +89,8 @@ for opt in options:
                header_file = a
        elif o == '-h' or o == '--help':
                help ()
-       # urg, this is top!
        elif o == '--index':
-               index_url = a
+               index_file = a
        elif o == '--name':
                package_name = a
        elif o == '--version':
@@ -99,9 +98,8 @@ for opt in options:
        else:
                raise 'unknown opt ', o
 
-#burp?
-def set_gcos ():
-       global gcos
+def set_vars ():
+       global fullname
        os.environ["CONFIGSUFFIX"] = 'www';
        if os.name == 'nt':
                import ntpwd
@@ -112,29 +110,36 @@ def set_gcos ():
 
        f = pw[4]
        f = string.split (f, ',')[0]
-       gcos = f 
-
-def compose (default, file):
-       s = default
-       if file:
-               s = gulp_file (file)
+       fullname = f 
+
+#burp
+def compose_header ():
+       global default_header
+       head = default_header
+       if header_file:
+               head = gulp_file (header_file)
+       return head
+
+def compose_footer (index):
+       global default_footer
+       foot = default_footer
+
+       if footer_file:
+               foot = gulp_file (footer_file)
+
+       s = foot % (index, package_name, package_name, webmaster, webmaster)
+       s = s + builtstr % (package_name, package_version, fullname,
+                           mail_address, mail_address, 
+                           time.strftime ('%c %Z', time.localtime (time.time ())))
        return s
 
-set_gcos ()
-localtime = time.strftime ('%c %Z', time.localtime (time.time ()))
-
-if os.path.basename (index_url) != "index.html":
-       index_url = index_url + "/index.html"
-top_url = os.path.dirname (index_url) + "/"
-
-header = compose (default_header, header_file)
-footer = compose (default_footer, footer_file) + built
+set_vars ()
+header = compose_header ()
+footer = compose_footer (index_file)
 header_tag = '<! header_tag >'
 footer_tag = '<! footer_tag >'
 
-def do_file (f):
-       s = gulp_file (f)
-
+def do_file (s):
        if changelog_file:
                changes = gulp_file (changelog_file)
                # urg?
@@ -145,12 +150,12 @@ def do_file (f):
                s = re.sub ('top_of_ChangeLog', '<XMP>\n'+ changes  + '\n</XMP>\n', s)
 
        if re.search (header_tag, s) == None:
-               body = '<BODY BGCOLOR=WHITE><FONT COLOR=BLACK>'
+               body='<BODY BGCOLOR=WHITE><FONT COLOR=BLACK>'
                s = re.sub ('(?i)<body>', body, s)
                if re.search ('(?i)<BODY', s):
-                       s = re.sub ('(?i)<body[^>]*>', body + header, s, 1)
+                       s = re.sub ('(?i)<body[^>]*>', body + header, s)
                elif re.search ('(?i)<html', s):                
-                       s = re.sub ('(?i)<html>', '<HTML>' + header, s, 1)
+                       s = re.sub ('(?i)<html>', '<HTML>' + header, s)
                else:
                        s = header + s
 
@@ -160,33 +165,31 @@ def do_file (f):
                s = s + footer_tag
 
                if re.search ('(?i)</body', s):
-                       s = re.sub ('(?i)</body>', footer + '</BODY>', s, 1)
+                       s = re.sub ('(?i)</body>', footer + '</BODY>', s)
                elif re.search ('(?i)</html', s):               
-                       s = re.sub ('(?i)</html>', footer + '</HTML>', s, 1)
+                       s = re.sub ('(?i)</html>', footer + '</HTML>', s)
                else:
                        s = s + footer
 
-       #URUGRGOUSNGUOUNRIU
-       index = index_url
-       top = top_url
-       if os.path.basename (f) == "index.html":
-               cwd = os.getcwd ()
-               if os.path.basename (cwd) == "topdocs":
-                       index = "./index.html"
-                       top = "./"
-
-       s = re.sub ('@INDEX@', index, s)
-       s = re.sub ('@TOP@', top, s)
-       s = re.sub ('@PACKAGE_NAME@', package_name, s)
-       s = re.sub ('@PACKAGE_VERSION@', package_version, s)
-       s = re.sub ('@WEBMASTER@', webmaster, s)
-       s = re.sub ('@GCOS@', gcos, s)
-       s = re.sub ('@LOCALTIME@', localtime, s)
-       s = re.sub ('@MAIL_ADDRESS@', mail_address, s)
+       return s
+
 
+for f in files:
+       s = gulp_file (f)
+       s = do_file (s)
        open (f, 'w').write (s)
 
+if 0:
+       title = '<HEAD><TITLE>' \
+               + package_name + ' -- ' + os.path.basename (os.path.splitext(f)[0]) \
+               + '</TITLE></HEAD>'
+       s = check_tag ('<title>', title, s, 0)
+
+       s = check_tag ('<html', '', s, 0)
+       if regex.search ('<HTML', s) == -1:
+               s = '<HTML>\n' + s
+       s = check_tag ('</html>', '</HTML>', s, 1)
+
+       dump_file (f, s)
 
-for f in files:
-       do_file (f)
 
index bbed23c068c9857bbdff8f2336c75ad3c5bb8169..440e6b94100f39ab594d633c7fa25589e15b612b 100644 (file)
@@ -3,7 +3,7 @@ AT_FILES = $(BLURBS) #
 at-dir = $(doc-dir)/
 at-ext = .in
 
-footify=$(PYTHON) $(step-bindir)/add-html-footer.py --index=../$(depth)/ --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION) --header=$(depth)/Documentation/header.html.in --footer $(depth)/Documentation/footer.html.in
+footify=$(PYTHON) $(step-bindir)/add-html-footer.py --name $(PACKAGE_NAME) --version $(TOPLEVEL_VERSION) --header=$(depth)/Documentation/header.html.in --footer $(depth)/Documentation/footer.html.in
 
 footify-all-command=$(footify) `$(FIND) . -name '*.html' -print`