Generated by hanwen@cs.uu.nl,
From = lilypond-1.5.49, To = lilypond-1.5.50

usage 

    cd lilypond-source-dir; patch -E -p1 < lilypond-1.5.50.diff

Patches do not contain automatically generated files 
or (urg) empty directories, 
i.e., you should rerun autoconf, configure

diff -purN ../lilypond-1.5.49/.cvsignore ./.cvsignore
--- ../lilypond-1.5.49/.cvsignore	Wed Dec  5 14:53:27 2001
+++ ./.cvsignore	Tue Apr  2 00:48:00 2002
@@ -10,9 +10,22 @@ configure
 .gdbinit
 *~
 #*
-*.txt
+*.aux
+*.dvi
+*.eps
 *.html
+*.latex
+*.log
+*.ly
+*.midi
+*.pdf
 *.png
+*.ps
+*.tely
+*.tex
+*.txt
+*[0-9]pk
+ly2dvi.dir
 out
 out-www
 afm
diff -purN ../lilypond-1.5.49/ChangeLog ./ChangeLog
--- ../lilypond-1.5.49/ChangeLog	Fri Mar 29 13:04:20 2002
+++ ./ChangeLog	Tue Apr  2 00:56:31 2002
@@ -1,3 +1,122 @@
+2002-04-02  Han-Wen  <hanwen@cs.uu.nl>
+
+	* VERSION: release 1.5.50
+
+	* lily/spaceable-grob.cc (add_spring): change incorrect spring to
+	unit spring here. Reduces number of warning messages.
+
+	* lily/auto-beam-engraver.cc: change noAutoBeaming to autoBeaming.
+
+2002-04-01  Han-Wen  <hanwen@cs.uu.nl>
+
+	* scm/generic-property.scm: remove generic-property, property-engraver
+
+	* lily/volta-bracket.cc (brew_molecule): use Lookup::line() for bracket
+
+	* lily/hairpin.cc (brew_molecule): use Lookup::line() for hairpins.
+
+	* ps/music-drawing-routines.ps: remove volta, tuplet, hairpin routines.
+
+	* scm/*.scm: remove volta, hairpin and tuplet functions.
+
+	* lily/rhythmic-column-engraver.cc (acknowledge_grob): don't make
+	note column for notes/stems/dots that already have parents. Fixes
+	nested grace contexts.
+
+2002-04-01  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* input/mozart-hrn-3.ly: Tweak Slur.beautiful, so that we don't
+	get too curved slurs.
+
+	* scm/slur.scm (default-slur-extremity-offset-alist) 
+	(default-phrasing-slur-extremity-offset-alist): Move slur
+	attachments further away from note-head, vertically.  Also, leave
+	a horizontal gap between slur and stem end.
+
+	* lily/beam.cc (get_interbeam): Bugfix: don't look in empty list.
+
+2002-04-01  Han-Wen  <hanwen@cs.uu.nl>
+
+	* input/regression/spacing-grace-duration.ly: new file
+
+	* lily/spacing-engraver.cc (acknowledge_grob): ignore grace notes
+	for shortest durations.
+
+	* lily/multi-measure-rest.cc (set_spacing_rods): tune rods to the
+	extent of the mm rest. 
+
+	* lily/spacing-spanner.cc (get_duration_space): better spacing for
+	really short notes.
+
+	* lily/tuplet-bracket.cc (make_bracket): new function
+	(get_x_offset): new function; make tuplet brackets align on stems
+	if stem has same direction.
+	(parallel_beam): be anal about matching bracket to tuplet.
+
+	* lily/lookup.cc (line): new function Lookup::line(). 
+
+	* scm/tex.scm (dashed-line): change -line to -system in names.
+
+	* lily/box.cc (add_point): new function.
+
+	* flower/include/interval.hh: new function add_point ().
+	new function widen()
+	
+2002-04-01  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* input/mozart-hrn-3.ly: Mimic Breitkopf fonts and padding.
+
+	* scm/grob-property-description.scm (number-threshold): Add
+	description.
+
+	* lily/multi-measure-rest.cc (brew_molecule): Only put number over
+	rest if #measures > number-threshold.  Use padding (well, fake
+	using it, anyway).
+
+	* scm/font.scm (make-style-sheet): New styles: mark-number,
+	mark-letter.
+	(paper20-style-sheet-alist): Add bigger bold fonts.
+
+	* lily/mark-engraver.cc (process_music): Use style mark-number or
+	mark-letter.
+
+	* .cvsignore: Ignore all kinds of lilypond input and output.
+
+	* lily/beam.cc (ADD_INTERFACE): Add concaveness-gap.
+
+2002-04-01  Han-Wen  <hanwen@cs.uu.nl>
+
+	* lily/staff-symbol.cc (brew_molecule): make line thickness
+	adjustable.
+
+	* lily/*.cc: replace stafflinethickness by linethickness.
+
+2002-04-01  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* input/regression/beam-concave.ly: Add to-be-considered-concave
+	beam.
+
+	* lily/beam.cc (check_concave): Add check for large gap between an
+	inner notehead and the line through outer noteheads.
+
+	* scm/grob-description.scm (Beam): Add concaveness-gap, default
+	value 2.0 staff-space.
+	
+	* scm/grob-property-description.scm (concaveness-gap): Add
+	description.
+
+	* input/mozart-hrn3-allegro.ly: Fix typo.
+
+2002-03-31  Juergen Reuter  <reuter@ipd.uka.de>
+
+	* scm/ps.scm, ps/music-drawing-routines.ps, lily/lookup.cc,
+	lily/note-head-engraver: improved implementation of roundfilledbox
+	(according to Han-Wen's request)
+
+	* lily/include/spacing-spanner.hh, lily/spacing-spanner.cc,
+	lily/gourlay-breaking.cc, lily/staff-symbol.cc,
+	lily/simple-spacer.cc: ragged-right alignment
+
 2002-03-29  Han-Wen  <hanwen@cs.uu.nl>
 
 	* input/regression/spacing-note-flags.ly: new file
diff -purN ../lilypond-1.5.49/Documentation/regression-test.tely ./Documentation/regression-test.tely
--- ../lilypond-1.5.49/Documentation/regression-test.tely	Fri Mar 29 13:04:20 2002
+++ ./Documentation/regression-test.tely	Tue Apr  2 00:48:00 2002
@@ -237,6 +237,7 @@ Grace note do weird things with timing. 
 
 @lilypondfile[printfilename]{number-staff-lines.ly}
 
+@lilypondfile[printfilename]{staff-tweak.ly}
 
 
 @section Spacing
@@ -259,6 +260,10 @@ Grace note do weird things with timing. 
 
 @lilypondfile[printfilename]{spacing-rest.ly}
 
+@lilypondfile[printfilename]{spacing-short-notes.ly}
+
+@lilypondfile[printfilename]{spacing-grace-duration.ly}
+
 @lilypondfile[printfilename]{lyrics-bar.ly}
 
 @lilypondfile[printfilename]{spacing-knee.ly}
diff -purN ../lilypond-1.5.49/VERSION ./VERSION
--- ../lilypond-1.5.49/VERSION	Fri Mar 29 13:23:32 2002
+++ ./VERSION	Tue Apr  2 00:55:44 2002
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
-PATCH_LEVEL=49
+PATCH_LEVEL=50
 MY_PATCH_LEVEL=
 
 
diff -purN ../lilypond-1.5.49/buildscripts/lilypond-profile.sh ./buildscripts/lilypond-profile.sh
--- ../lilypond-1.5.49/buildscripts/lilypond-profile.sh	Sat Mar 23 00:17:51 2002
+++ ./buildscripts/lilypond-profile.sh	Tue Apr  2 00:48:01 2002
@@ -9,8 +9,10 @@
 
 datadir=`echo "@datadir@" | sed 's!//!/!g'`
 
+
 # For direct ps output: ps/lilyponddefs.ps
 GS_LIB="$datadir/ps:"${GS_LIB:=""}
+export GS_LIB
 
 # bit silly. for ly2dvi, overrules compiled-in datadir...
 # Better comment this out.  Compiled-in datadir serves exactly the
@@ -21,16 +23,14 @@ GS_LIB="$datadir/ps:"${GS_LIB:=""}
 # Add the installation directory to the teTeX system tree, 
 # see Documentation/misc/fontinstallation
 TEXMF="{$datadir,"`kpsexpand  \\$TEXMF`"}"
+export TEXMF
 
 # LILYPONDPREFIX="$datadir"
 # export LILYPONDPREFIX
 
 # For direct ps output fonts. Add all available TeX Type1 fonts
-GS_FONTPATH=`kpsewhich -expand-path=\$T1FONTS`:${GS_FONTPATH:=""}
-
-
-
-export GS_LIB GS_FONTPATH TEXMF
+GS_FONTPATH=`kpsewhich -expand-path=\\$T1FONTS`:${GS_FONTPATH:=""}
+export GS_FONTPATH
 
  	
 
diff -purN ../lilypond-1.5.49/flower/include/interval.hh ./flower/include/interval.hh
--- ../lilypond-1.5.49/flower/include/interval.hh	Thu Mar 14 19:54:59 2002
+++ ./flower/include/interval.hh	Tue Apr  2 00:48:01 2002
@@ -33,6 +33,11 @@ struct Interval_t : public Drul_array<T>
       elem (LEFT) += t;
       elem (RIGHT) += t;
     }
+  void widen (T t)
+  {
+    elem (LEFT) -= t;
+    elem (RIGHT) += t;    
+  }
   
   /**
     PRE
@@ -40,7 +45,10 @@ struct Interval_t : public Drul_array<T>
     */
   void unite (Interval_t<T> h);
   void intersect (Interval_t<T> h);
-
+  void add_point (T p) {
+    elem(LEFT) = elem (LEFT) <? p;
+    elem(RIGHT) = elem (RIGHT) >? p;
+  }
   T length () const;
   T delta () const;
   void set_empty () ;
diff -purN ../lilypond-1.5.49/input/GNUmakefile ./input/GNUmakefile
--- ../lilypond-1.5.49/input/GNUmakefile	Mon Mar 11 13:33:28 2002
+++ ./input/GNUmakefile	Tue Apr  2 00:49:11 2002
@@ -3,7 +3,7 @@ depth = ..
 SUBDIRS=bugs test regression tutorial no-notation ascii-art template
 
 # nereides is tweaked a lot, can't do (read webpage)
-examples=trip star-spangled-banner paddy twinkle baerenreiter-sarabande #nereides
+examples=trip star-spangled-banner paddy twinkle baerenreiter-sarabande mozart-hrn-3
 
 LOCALSTEPMAKE_TEMPLATES=ly mutopia
 EXTRA_DIST_FILES=paddy.abc
diff -purN ../lilypond-1.5.49/input/bugs/fermata.ly ./input/bugs/fermata.ly
--- ../lilypond-1.5.49/input/bugs/fermata.ly	Thu Jan  1 01:00:00 1970
+++ ./input/bugs/fermata.ly	Mon Apr  1 21:44:28 2002
@@ -0,0 +1,6 @@
+
+\header {
+    texidoc = "Fermata on rest doesn't go up"
+    }
+
+\score { \notes {  r4-\fermata }} 
diff -purN ../lilypond-1.5.49/input/bugs/nested-grace-beam.ly ./input/bugs/nested-grace-beam.ly
--- ../lilypond-1.5.49/input/bugs/nested-grace-beam.ly	Thu Jan  1 01:00:00 1970
+++ ./input/bugs/nested-grace-beam.ly	Mon Apr  1 21:44:28 2002
@@ -0,0 +1,25 @@
+
+
+\header{
+texidoc = "Grace notes may separate beams, underneath normal beams." 
+}
+
+%
+% TODO: add this to standard lilypond
+%
+
+\score{
+\notes\context Voice{
+        \time 6/8
+        \clef violin
+	\key es \major
+        [a'8 ( \context GraceVoice \grace { [bes'16 a'16] }  g'8 ) a'8] d''4 c''8 |
+}
+\paper { \translator { \VoiceContext
+		       \accepts GraceVoice
+	 }
+	 \translator { \VoiceContext \name GraceVoice }
+	 linewidth = -1. 
+    }
+}
+
diff -purN ../lilypond-1.5.49/input/mozart-hrn-3.ly ./input/mozart-hrn-3.ly
--- ../lilypond-1.5.49/input/mozart-hrn-3.ly	Fri Mar 29 13:04:21 2002
+++ ./input/mozart-hrn-3.ly	Tue Apr  2 00:48:01 2002
@@ -38,18 +38,46 @@ ritenuto = \textscript #'(italic  "rit."
 
 \version "1.5.47"
 
+#(define italic-bf '((font-shape . italic) (font-series . bold)))
+
+%% burp
+%% the very idea of a style sheet, is that it's easy to override
+#(define (set-style! sheet name style)
+  (set-cdr! (assoc 'mark-letter (cdr (assoc 'style-alist sheet))) style))
+
+#(define my-sheet (make-style-sheet 'paper20))
+#(set-style! my-sheet 'mark-letter '((font-family . roman)
+				     (font-series . bold)
+				     (font-shape . upright)
+				     (font-relative-size . 3)))
+  
+cresc = \notes {
+    \commandspanrequest \start "crescendo" 
+    \property Voice.crescendoText = #`(,italic-bf "cresc.")
+    \property Voice.crescendoSpanner = #'dashed-line
+}
+
 \paper{
- \translator { \ScoreContext
+    \stylesheet #my-sheet
+    \translator {
+	\ScoreContext
     	skipBars = ##t
 	midiInstrument = #"french horn"
-	RehearsalMark \override #'font-series = #'bold
-	Stem \override #'thickness = #1.3
-  }
- \translator { \StaffContext
-	       MinimumVerticalExtent = #'(-4.5 . 4.5)
-	       }
-  indent = 10. \mm
-  linewidth = 189. \mm
+	%% try to mimic Breitkopf
+	RehearsalMark \override #'padding = #1
+	MultiMeasureRest \override #'padding = #0.5
+	MultiMeasureRest \override #'number-threshold = #1
+	
+	Beam \override #'thickness = #0.6
+	Beam \override #'beam-space = #0.8
+	Slur \override #'beautiful = #0.3
+    }
+    \translator {
+	\StaffContext
+	MinimumVerticalExtent = #'(-4.5 . 4.5)
+    }
+    indent = 10. \mm
+    linewidth = 189. \mm
 }
 
 \include "mozart-hrn3-allegro.ly"
diff -purN ../lilypond-1.5.49/input/mozart-hrn3-allegro.ly ./input/mozart-hrn3-allegro.ly
--- ../lilypond-1.5.49/input/mozart-hrn3-allegro.ly	Fri Mar 29 13:04:21 2002
+++ ./input/mozart-hrn3-allegro.ly	Tue Apr  2 00:48:01 2002
@@ -41,7 +41,7 @@ allegro =
 	[ )fis8( e16 )d] d4-. r2 | 
 	\mark "B"
 	R1*3
-	r2 r4 [d8(_#'(italic "con espressione") )b ]
+	r2 r4 [d8(_#`(,italic-bf "con espressione") )b ]
 	[a( )g d'( )b] [a( )g e'( )c ]
 	[b8( )a] a4 r4 [a8-. a-.]
 	[a( \< b c \!cis\> ]  d4 \! )c
@@ -55,7 +55,7 @@ allegro =
 	d4. [e16 fis] [g () fis e d] [c() b a g]
 	\endcresc
 	< a1(-\trill
-1	  { s2 \grace{ [g16 a] } } >
+	  { s2 \grace{ [g16 a] } } >
 	\mark "C"
 	)g4 r r2
 	R1*15
@@ -120,7 +120,7 @@ allegro =
 	[dis()e] r e-. [e()f] r f-. |
 	g4-.-\f e-. c-. bes-. |
 	g-.\ff e-. c-. r |
-	a'2 ~ [a8_#'((font-shape . italic) "sempre " (dynamic "f")) b16 c] [d( e d )e]%TODO
+	a'2 ~ [a8_#`(,italic-bf "sempre " (dynamic "f")) b16 c] [d( e d )e]%TODO
 
 	f4. () d8 [f8 ()d f d]
 	[c (e] )g2 \grace  { \longgrace f16(  \endlonggrace }  [)e8( d16 )c]
diff -purN ../lilypond-1.5.49/input/regression/beam-concave.ly ./input/regression/beam-concave.ly
--- ../lilypond-1.5.49/input/regression/beam-concave.ly	Thu Mar 14 02:05:15 2002
+++ ./input/regression/beam-concave.ly	Tue Apr  2 00:48:01 2002
@@ -11,6 +11,7 @@ beams this way."
 \score{
   \notes\relative c'{
     \property Voice.Beam \set #'concaveness-threshold = #0.08
+    \property Voice.Beam \set #'concaveness-bt2 = #2.0
     
 %% This case seems easy: second beam should be horizontal.
     
@@ -54,7 +55,10 @@ beams this way."
 %     %% SCS-VI Prelude, m82
 %     %% slope = 0.1ss (possibly b.o. context?)
 %     [g, e' cis]
+
     
+%%% `Han-Wen': this should be concave
+    [a,16^"horiz." a' a a]
   }
   \paper{
     linewidth = -1.0
diff -purN ../lilypond-1.5.49/input/regression/hinterfleisch-gone.ly ./input/regression/hinterfleisch-gone.ly
--- ../lilypond-1.5.49/input/regression/hinterfleisch-gone.ly	Tue Aug 14 00:12:27 2001
+++ ./input/regression/hinterfleisch-gone.ly	Thu Jan  1 01:00:00 1970
@@ -1,16 +0,0 @@
-\version "1.3.148"
-\header {
-texidoc="The first and last notes of a measure should be spaced nicely."
-}
-% jij had zoon mooi tight spacing example,
-% kan zo'n harde space ook niet voor en na maatstreep!
-\score {
-	\notes \relative c'' {
-	\time 2/4
-	\property Voice.noAutoBeaming=##t
-	a4 a8
-	a32 a a a
-}
-%%set bit wide
-\paper {linewidth = 100.\mm}
-}
diff -purN ../lilypond-1.5.49/input/regression/number-staff-lines.ly ./input/regression/number-staff-lines.ly
--- ../lilypond-1.5.49/input/regression/number-staff-lines.ly	Tue Aug 14 13:41:27 2001
+++ ./input/regression/number-staff-lines.ly	Tue Apr  2 00:48:01 2002
@@ -8,7 +8,7 @@ adjusted.  "
 
 \score { 
 \context Voice \notes\relative c {
-	c' c c c | g' g g g 	
+	c' c c c | g' g g g 	\bar ":|"
   }
   \paper {
 
diff -purN ../lilypond-1.5.49/input/regression/spacing-grace-duration.ly ./input/regression/spacing-grace-duration.ly
--- ../lilypond-1.5.49/input/regression/spacing-grace-duration.ly	Thu Jan  1 01:00:00 1970
+++ ./input/regression/spacing-grace-duration.ly	Mon Apr  1 18:57:41 2002
@@ -0,0 +1,20 @@
+\header {
+
+    texidoc = "Spacing uses the duration of the notes, but disregards
+    grace notes for this. In this example, the 8ths around the grace
+    are spaced exactly as the other 8th notes.
+
+"
+}
+
+\score { \notes \relative c''
+	 \context Voice 
+{
+    [c8  c8]
+    \grace {  b16 }
+    [c8 c8] [c8 c8] 
+
+}
+
+	 \paper { linewidth = -1. }
+}
diff -purN ../lilypond-1.5.49/input/regression/spacing-note-flags.ly ./input/regression/spacing-note-flags.ly
--- ../lilypond-1.5.49/input/regression/spacing-note-flags.ly	Fri Mar 29 02:07:08 2002
+++ ./input/regression/spacing-note-flags.ly	Tue Apr  2 00:48:01 2002
@@ -7,7 +7,7 @@ texidoc = "The flags of 8th notes take s
 }
 
 \score { \notes \relative c'' \context Staff {
-    \property Voice.noAutoBeaming = ##t
+    \property Voice.autoBeaming = ##f
     [a8 a8 a8 a8] a8 a8 a8 a8
 }
 \paper {
@@ -15,3 +15,5 @@ texidoc = "The flags of 8th notes take s
 linewidth = -1
     }
      }
+
+\version "1.5.49"
diff -purN ../lilypond-1.5.49/input/regression/spacing-short-notes.ly ./input/regression/spacing-short-notes.ly
--- ../lilypond-1.5.49/input/regression/spacing-short-notes.ly	Thu Jan  1 01:00:00 1970
+++ ./input/regression/spacing-short-notes.ly	Mon Apr  1 16:57:55 2002
@@ -0,0 +1,22 @@
+\header {
+    
+texidoc = "Notes that are shorter than the common shortest note, Get a
+space (i.e. without the space needed for the note) proportional to
+their duration. So 16th notes get 1/2 of the space of an eigth note.
+The total distance for a 16th is (including note head) is 3/4 of the
+eighth note. "
+
+}
+
+\score { \notes \relative c''
+{
+    \time 2/4 
+    c16 c c c c4 c4
+    c8 c8 c8 c8
+    c8 c8 c4
+    c8 c8 c4
+
+}
+
+	 \paper { linewidth = -1. }
+}
diff -purN ../lilypond-1.5.49/input/regression/staff-tweak.ly ./input/regression/staff-tweak.ly
--- ../lilypond-1.5.49/input/regression/staff-tweak.ly	Thu Jan  1 01:00:00 1970
+++ ./input/regression/staff-tweak.ly	Mon Apr  1 01:12:18 2002
@@ -0,0 +1,20 @@
+\header {
+texidoc = "The staff is a grob, and may be adjusted as well: this one
+ shows a staff with 6 thick line, and a slightly large staffspace.
+Beams remain correctly quantized.
+
+"    
+}
+
+\score { \notes {
+    \property Score.StaffSymbol \set #'thickness = #2.0
+    \property Score.StaffSymbol \set #'line-count = #6
+    \property Score.StaffSymbol \set #'staff-space = #1.1
+    c'4 g'4 b'8  b'8  b'8  b'8  
+}
+	 
+\paper  { linewidth = -1.
+
+
+      } 
+     }
diff -purN ../lilypond-1.5.49/input/regression/tup.ly ./input/regression/tup.ly
--- ../lilypond-1.5.49/input/regression/tup.ly	Thu Apr  5 00:02:39 2001
+++ ./input/regression/tup.ly	Tue Apr  2 00:48:01 2002
@@ -1,16 +1,29 @@
 \version "1.3.146"
 \header{
+    
 texidoc="
 Tuplets are indicated by a bracket with a number.  There should be no
-bracket if there is one beam that matches  the length of the tuplet.
+bracket if there is a beam exactly  matching  the length of the tuplet.
 The bracket does not interfere with the stafflines, and the number is
 centered in the gap in the bracket.
+
+The bracket stops at the end of the stems, if the stems have the same
+direction as the
+
+
 "
+
 }
+
 \score{
 	\notes \context Voice \relative c'' {
 		 \times 2/3 { \times 2/3 { a8 b c}  c }
-		 \times 3/4 { c4 c4 c4 c4 }
+		 \times 2/3 { r8 [b f] }
+		 \times 2/3 { r8 b r8 }
+		 c4 |
+		 
+		 \times 3/4 { c4 c4 c4 c4 } c4 | 
+		 
 		 \time 6/8
 		 \times 6/9 { c8 c c c c c c c c }
 
diff -purN ../lilypond-1.5.49/input/scarlatti-properties.ly ./input/scarlatti-properties.ly
--- ../lilypond-1.5.49/input/scarlatti-properties.ly	Sun Mar 25 00:46:57 2001
+++ ./input/scarlatti-properties.ly	Tue Apr  2 00:48:01 2002
@@ -1,5 +1,7 @@
 %  include file for scarlatti-test
 
+\version "1.5.49"
+
 rh=\property Thread.NoteHead \override #'style = #'default
 lh=\property Thread.NoteHead \override #'style = #'diamond
 
@@ -27,5 +29,5 @@ srs= \property Voice.NoteColumn \overrid
 
 
 
-ab=\property Voice.noAutoBeaming=##f
-xb=\property Voice.noAutoBeaming=##t
+ab=\property Voice.autoBeaming = ##t
+xb=\property Voice.autoBeaming = ##f
diff -purN ../lilypond-1.5.49/input/scarlatti-test.ly ./input/scarlatti-test.ly
--- ../lilypond-1.5.49/input/scarlatti-test.ly	Wed Jul 11 16:59:16 2001
+++ ./input/scarlatti-test.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 %K000.ly LilyPond 1.2.16
 \header {
 title="John's Scarlatti quotes"
@@ -33,8 +33,8 @@ ls={\property Voice.forceHorizontalShift
 sls={\property Voice.forceHorizontalShift="-0.22"}
 rs={\property Voice.forceHorizontalShift="0.6"}
 srs={\property Voice.forceHorizontalShift="0.22"}
-ab={\property Voice.noAutoBeaming=##f}
-xb={\property Voice.noAutoBeaming=##t}
+ab={\property Voice.autoBeaming = ##t}
+xb={\property Voice.autoBeaming = ##f}
 %}
 
 
diff -purN ../lilypond-1.5.49/input/template/melody-lyrics-chords.ly ./input/template/melody-lyrics-chords.ly
--- ../lilypond-1.5.49/input/template/melody-lyrics-chords.ly	Fri Jul 13 22:10:12 2001
+++ ./input/template/melody-lyrics-chords.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.5.1"
+\version "1.5.49"
 
 \header {
   dedication = "dedication"
@@ -34,7 +34,7 @@ accompaniment = \chords {
     \context ChordNames \accompaniment
     \addlyrics
       \context Staff = one {
-        \property Staff.noAutoBeaming = ##t
+        \property Staff.autoBeaming = ##f
         \property Staff.automaticMelismata = ##t
         \melody
       }
diff -purN ../lilypond-1.5.49/input/template/melody-lyrics.ly ./input/template/melody-lyrics.ly
--- ../lilypond-1.5.49/input/template/melody-lyrics.ly	Fri Jul 13 22:10:12 2001
+++ ./input/template/melody-lyrics.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.5.1"
+\version "1.5.49"
 
 \header {
   dedication = "dedication"
@@ -29,7 +29,7 @@ text = \lyrics {
   <
     \addlyrics
       \context Staff = one {
-        \property Staff.noAutoBeaming = ##t
+        \property Staff.autoBeaming = ##f
         \property Staff.automaticMelismata = ##t
         \melody
       }
diff -purN ../lilypond-1.5.49/input/template/piano-melody-lyrics.ly ./input/template/piano-melody-lyrics.ly
--- ../lilypond-1.5.49/input/template/piano-melody-lyrics.ly	Fri Jul 13 22:10:12 2001
+++ ./input/template/piano-melody-lyrics.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.5.1"
+\version "1.5.49"
 
 \header {
   dedication = "dedication"
@@ -37,7 +37,7 @@ lower = \notes\relative c {
   <
     \addlyrics
       \context Staff = mel {
-        \property Staff.noAutoBeaming = ##t
+        \property Staff.autoBeaming = ##f
         \property Staff.automaticMelismata = ##t
         \melody
       }
diff -purN ../lilypond-1.5.49/input/test/ancient-font.ly ./input/test/ancient-font.ly
--- ../lilypond-1.5.49/input/test/ancient-font.ly	Sun Mar 24 23:20:13 2002
+++ ./input/test/ancient-font.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 \header {
     title	= "ancient font test"
     date	= "2000"
@@ -128,7 +128,7 @@ lowerVoice =  \context Staff = lowerNote
       #'line-count = #5
 
     \notes \transpose c' {
-	\property Voice.noAutoBeaming = ##t
+	\property Voice.autoBeaming = ##f
 	\property Staff.Clef \set #'font-family = #'ancient
 	\property Staff.KeySignature \set #'font-family = #'ancient
 	\property Staff.KeySignature \override #'style = #'mensural
@@ -248,12 +248,12 @@ lowerVoice =  \context Staff = lowerNote
 	\translator {
 	    \ScoreContext
 %	    \remove System_start_delimiter_engraver
-%	    SystemStartDelimiter \override #'glyph = #'brace
+%	    systemStartDelimiter \override #'glyph = #'brace
 	}
 	\translator {
 	    \ChoirStaffContext
 	    \remove System_start_delimiter_engraver
-%	    SystemStartDelimiter \override #'glyph = #'empty
+%	    systemStartDelimiter \override #'glyph = #'empty
 	}
     }
 }
diff -purN ../lilypond-1.5.49/input/test/auto-beam-override.ly ./input/test/auto-beam-override.ly
--- ../lilypond-1.5.49/input/test/auto-beam-override.ly	Thu Apr  5 00:02:39 2001
+++ ./input/test/auto-beam-override.ly	Tue Apr  2 00:48:01 2002
@@ -1,7 +1,5 @@
 \version "1.3.146"
 
-
-
 %{
   Currently (1.1.27.jcn3), the auto-beam engraver will only engrave
   sensible beams, which means that it will end a beam when:
@@ -29,7 +27,7 @@
       	c8 c c4
       	r8 c c c
 	% no autobeaming
-	\property Voice.noAutoBeaming = ##t
+	\property Voice.autoBeaming = ##f
       	c8 c c c
     }
     \paper{
diff -purN ../lilypond-1.5.49/input/test/hara-kiri-switch.ly ./input/test/hara-kiri-switch.ly
--- ../lilypond-1.5.49/input/test/hara-kiri-switch.ly	Fri Aug 10 14:56:43 2001
+++ ./input/test/hara-kiri-switch.ly	Tue Apr  2 00:48:01 2002
@@ -2,7 +2,7 @@
 \header {
 texidoc = "some instruments (notably: cello and double bass) are alternatively written on one and two staves. This is the way to do it:"
 }
-\version "1.3.146"
+\version "1.5.49"
 
 
 voiceOne =  \notes \relative c'' {
@@ -48,7 +48,7 @@ grandstaff =  \context GrandStaff = one 
 	\paper{
 		linewidth=80.0\mm
 
-		\translator { \VoiceContext noAutoBeaming = ##t }
+		\translator { \VoiceContext autoBeaming = ##f }
 		\translator { \HaraKiriStaffContext }
 		\translator { \OrchestralScoreContext skipBars = ##t }
 	}
diff -purN ../lilypond-1.5.49/input/test/slur-area.ly ./input/test/slur-area.ly
--- ../lilypond-1.5.49/input/test/slur-area.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-area.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 
 \score{
 \notes\relative c''{
@@ -17,7 +17,7 @@ a(a a a a a d)a
 c,(g' c e f d b)g 
 c,(g' c e f d b)g 
 
-\property Voice.noAutoBeaming = ##t
+\property Voice.autoBeaming = ##f
 \stemUp
 a8(a a a a a a)a
 
diff -purN ../lilypond-1.5.49/input/test/slur-attachment-override.ly ./input/test/slur-attachment-override.ly
--- ../lilypond-1.5.49/input/test/slur-attachment-override.ly	Tue May 15 16:13:29 2001
+++ ./input/test/slur-attachment-override.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 
 \header{
 texidoc="
@@ -8,7 +8,7 @@ In some cases, you may want to set slur 
 
 
 fragment = \notes {
-  \property Voice.noAutoBeaming = ##t
+  \property Voice.autoBeaming = ##f
   \property Voice.Stem \set #'direction = #1
   \property Voice.Slur \set #'direction = #1
   d'32( f'4 )d8..
diff -purN ../lilypond-1.5.49/input/test/slur-attachment.ly ./input/test/slur-attachment.ly
--- ../lilypond-1.5.49/input/test/slur-attachment.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-attachment.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 
 
 fragment = \notes {
diff -purN ../lilypond-1.5.49/input/test/slur-broken-cross-staff.ly ./input/test/slur-broken-cross-staff.ly
--- ../lilypond-1.5.49/input/test/slur-broken-cross-staff.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-broken-cross-staff.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 \header{
 texidoc="
 The same goes for slurs. They behave decently when broken across
diff -purN ../lilypond-1.5.49/input/test/slur-broken.ly ./input/test/slur-broken.ly
--- ../lilypond-1.5.49/input/test/slur-broken.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-broken.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 
 \score{
 	\notes\relative c''{
diff -purN ../lilypond-1.5.49/input/test/slur-damping.ly ./input/test/slur-damping.ly
--- ../lilypond-1.5.49/input/test/slur-damping.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-damping.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 % test damping
 
 
diff -purN ../lilypond-1.5.49/input/test/slur-dash.ly ./input/test/slur-dash.ly
--- ../lilypond-1.5.49/input/test/slur-dash.ly	Mon Apr 23 00:27:16 2001
+++ ./input/test/slur-dash.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 
 
 \score{
diff -purN ../lilypond-1.5.49/input/test/slur-follow-music.ly ./input/test/slur-follow-music.ly
--- ../lilypond-1.5.49/input/test/slur-follow-music.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-follow-music.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 
 \score { 
   \context Voice \notes\relative c {
diff -purN ../lilypond-1.5.49/input/test/slur-mininum.ly ./input/test/slur-mininum.ly
--- ../lilypond-1.5.49/input/test/slur-mininum.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-mininum.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 \header {
 texidoc = "" 
 }
diff -purN ../lilypond-1.5.49/input/test/slur-positions.ly ./input/test/slur-positions.ly
--- ../lilypond-1.5.49/input/test/slur-positions.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-positions.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 
 \score{
 	\notes\relative c''{
diff -purN ../lilypond-1.5.49/input/test/slur-proof.ly ./input/test/slur-proof.ly
--- ../lilypond-1.5.49/input/test/slur-proof.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-proof.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 
 
 x = {
diff -purN ../lilypond-1.5.49/input/test/slur-symmetry-2.ly ./input/test/slur-symmetry-2.ly
--- ../lilypond-1.5.49/input/test/slur-symmetry-2.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-symmetry-2.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 
 \header{
 % should look the same
diff -purN ../lilypond-1.5.49/input/test/slur-symmetry-3.ly ./input/test/slur-symmetry-3.ly
--- ../lilypond-1.5.49/input/test/slur-symmetry-3.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-symmetry-3.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 
 \header{
 % should look the same
diff -purN ../lilypond-1.5.49/input/test/slur-ugly.ly ./input/test/slur-ugly.ly
--- ../lilypond-1.5.49/input/test/slur-ugly.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slur-ugly.ly	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,4 @@
-\version "1.3.146"
+\version "1.5.49"
 
 \header {
 texidoc="You can get ugly slurs, if you want.
diff -purN ../lilypond-1.5.49/input/test/slurs.ly ./input/test/slurs.ly
--- ../lilypond-1.5.49/input/test/slurs.ly	Thu Apr  5 00:02:42 2001
+++ ./input/test/slurs.ly	Tue Apr  2 00:48:01 2002
@@ -1 +1 @@
-\version "1.3.146"
+\version "1.5.49"
diff -purN ../lilypond-1.5.49/input/tutorial/flowing.ly ./input/tutorial/flowing.ly
--- ../lilypond-1.5.49/input/tutorial/flowing.ly	Thu Apr  5 00:02:42 2001
+++ ./input/tutorial/flowing.ly	Tue Apr  2 00:48:01 2002
@@ -1,3 +1,4 @@
+\version "1.5.49"
 
 \header {
         title = "The river is flowing"
@@ -31,7 +32,7 @@ accompaniment =\chords {
 
           \addlyrics
              \context Staff = mel
-             {	\property Staff.noAutoBeaming = ##t
+             {	\property Staff.autoBeaming = ##f
 		\property Staff.automaticMelismata = ##t
           	\melody }
              \context Lyrics \text
diff -purN ../lilypond-1.5.49/lily/auto-beam-engraver.cc ./lily/auto-beam-engraver.cc
--- ../lilypond-1.5.49/lily/auto-beam-engraver.cc	Sun Mar  3 03:32:46 2002
+++ ./lily/auto-beam-engraver.cc	Tue Apr  2 00:48:01 2002
@@ -191,8 +191,8 @@ Auto_beam_engraver::test_moment (Directi
 void
 Auto_beam_engraver::consider_begin (Moment test_mom)
 {
-  bool off = to_boolean (get_property ("noAutoBeaming"));
-  if (!stem_l_arr_p_ && ! off)
+  bool on = to_boolean (get_property ("autoBeaming"));
+  if (!stem_l_arr_p_ && on)
     {
       bool b = test_moment (START, test_mom);
       if (b)
@@ -206,7 +206,7 @@ Auto_beam_engraver::consider_end (Moment
   if (stem_l_arr_p_)
     {
       /* Allow already started autobeam to end:
-	 don't check for noAutoBeaming */
+	 don't check for autoBeaming */
       bool b = test_moment (STOP, test_mom);
       if (b)
 	end_beam ();
@@ -481,5 +481,5 @@ stemRightBeamCount.
 ",
 /* creats*/       "Beam",
 /* acks  */       "stem-interface rest-interface beam-interface bar-line-interface",
-/* reads */       "noAutoBeaming autoBeamSettings subdivideBeams",
+/* reads */       "autoBeaming autoBeamSettings subdivideBeams",
 /* write */       "");
diff -purN ../lilypond-1.5.49/lily/bar-line.cc ./lily/bar-line.cc
--- ../lilypond-1.5.49/lily/bar-line.cc	Wed Mar 27 00:26:15 2002
+++ ./lily/bar-line.cc	Tue Apr  2 00:48:01 2002
@@ -5,6 +5,7 @@
 
   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
+
 #include <math.h>
 
 #include "lookup.hh"
@@ -52,7 +53,7 @@ Bar_line::compound_barline (Grob*me, Str
   Real hair = gh_scm2double (me->get_grob_property ("hair-thickness"));
   Real fatline = gh_scm2double (me->get_grob_property ("thick-thickness"));
 
-  Real staffline = me->paper_l ()->get_var ("stafflinethickness");
+  Real staffline = me->paper_l ()->get_var ("linethickness");
   Real staff_space = Staff_symbol_referencer::staff_space (me);
 
   kern *= staffline;
diff -purN ../lilypond-1.5.49/lily/beam-engraver.cc ./lily/beam-engraver.cc
--- ../lilypond-1.5.49/lily/beam-engraver.cc	Tue Mar 12 10:03:48 2002
+++ ./lily/beam-engraver.cc	Tue Apr  2 00:48:01 2002
@@ -88,8 +88,8 @@ Beam_engraver::try_music (Music *m)
 	  if (d == STOP)
 	    {
 	      SCM m = get_property ("automaticMelismata");
-	      SCM b = get_property ("noAutoBeaming");
-	      if (to_boolean (m) && to_boolean (b))
+	      SCM b = get_property ("autoBeaming");
+	      if (to_boolean (m) && !to_boolean (b))
 		{
 		  set_melisma (false);
 		}
@@ -179,8 +179,8 @@ Beam_engraver::start_translation_timeste
   if (beam_p_)
     {
       SCM m = get_property ("automaticMelismata");
-      SCM b = get_property ("noAutoBeaming");
-      if (to_boolean (m) && to_boolean (b))
+      SCM b = get_property ("autoBeaming");
+      if (to_boolean (m) && !to_boolean (b))
 	{
 	  set_melisma (true);
 	}
diff -purN ../lilypond-1.5.49/lily/beam.cc ./lily/beam.cc
--- ../lilypond-1.5.49/lily/beam.cc	Wed Mar 27 00:21:46 2002
+++ ./lily/beam.cc	Tue Apr  2 00:48:01 2002
@@ -74,12 +74,21 @@ Beam::add_stem (Grob *me, Grob *s)
 Real
 Beam::get_interbeam (Grob *me)
 {
-  Real slt = me->paper_l ()->get_var ("stafflinethickness");
+  int multiplicity = get_multiplicity (me);
   Real ss = Staff_symbol_referencer::staff_space (me);
-  Real thickness = gh_scm2double (me->get_grob_property ("thickness"))
-    * ss;
+  
+  SCM s = me->get_grob_property ("beam-space");
+  if (gh_number_p (s))
+    return gh_scm2double (s) * ss;
+  else if (s != SCM_EOL && gh_list_p (s))
+    return gh_scm2double (scm_list_ref (s,
+					gh_int2scm (multiplicity - 1
+						    <? scm_ilength (s) - 1)))
+      * ss;
+  
+  Real slt = me->paper_l ()->get_var ("linethickness");
+  Real thickness = gh_scm2double (me->get_grob_property ("thickness")) * ss;
 
-  int multiplicity = get_multiplicity (me);
   Real interbeam = multiplicity < 4
     ? (2*ss + slt - thickness) / 2.0
     : (3*ss + slt - thickness) / 3.0;
@@ -378,7 +387,7 @@ Beam::quanting (SCM smob)
 
   Real ss = Staff_symbol_referencer::staff_space (me);
   Real thickness = gh_scm2double (me->get_grob_property ("thickness")) / ss;
-  Real slt = me->paper_l ()->get_var ("stafflinethickness") / ss;
+  Real slt = me->paper_l ()->get_var ("linethickness") / ss;
 
 
   SCM sdy = me->get_grob_property ("least-squares-dy");
@@ -775,37 +784,64 @@ Beam::check_concave (SCM smob)
   if (stems.size () < 3)
     return SCM_UNSPECIFIED;
 
-  /* Concaveness try #2: Sum distances of inner noteheads that
-     fall outside the interval of the two outer noteheads */
-  Real concave = 0;
-  Interval iv (Stem::chord_start_f (stems[0]),
-	       Stem::chord_start_f (stems.top ()));
-  
-  if (iv[MAX] < iv[MIN])
-    iv.swap ();
-  
-  for (int i = 1; i < stems.size () - 1; i++)
-    {
-      Real c = 0;
-      Real f = Stem::chord_start_f (stems[i]);
-      if ((c = f - iv[MAX]) > 0)
-	concave += c;
-      else if ((c = f - iv[MIN]) < 0)
-	concave += c;
+  Direction dir = Directional_element_interface::get (me);
+  /* Concaveness #1: If distance of an inner notehead to line between
+     two outer noteheads is bigger than CONCAVENESS-GAP (2.0ss),
+     beam is concave (Heinz Stolba). */
+  bool concaveness1 = false;
+  Real r1 = gh_scm2double (me->get_grob_property ("concaveness-gap"));
+  if (r1 > 0)
+    {
+      Real dy = Stem::chord_start_f (stems.top ())
+	- Stem::chord_start_f (stems[0]);
+      Real slope = dy / (stems.size () - 1);
+      
+      Real y0 = Stem::chord_start_f (stems[0]);
+      for (int i = 1; i < stems.size () - 1; i++)
+	{
+	  Real c = (Stem::chord_start_f (stems[i]) - y0) - i * slope;
+	  if (c > r1)
+	    {
+	      concaveness1 = true;
+	      break;
+	    }
+	}
     }
 
-  Direction dir = Directional_element_interface::get (me);
-  concave *= dir;
+    
+  /* Concaveness #2: Sum distances of inner noteheads that fall
+     outside the interval of the two outer noteheads */
+  Real concaveness2 = 0;
+  Real r2 = gh_scm2double (me->get_grob_property ("concaveness-threshold"));
+  if (!concaveness1 && r2 > 0)
+    {
+      Real concave = 0;
+      Interval iv (Stem::chord_start_f (stems[0]),
+		   Stem::chord_start_f (stems.top ()));
       
-  Real concaveness = concave / (stems.size () - 2);
-  /* ugh: this is the a kludge to get input/regression/beam-concave.ly
-     to behave as baerenreiter. */
-  concaveness /= (stems.size () - 2);
-  
-  Real r = gh_scm2double (me->get_grob_property ("concaveness-threshold"));
+      if (iv[MAX] < iv[MIN])
+	iv.swap ();
+      
+      for (int i = 1; i < stems.size () - 1; i++)
+	{
+	  Real c = 0;
+	  Real f = Stem::chord_start_f (stems[i]);
+	  if ((c = f - iv[MAX]) > 0)
+	    concave += c;
+	  else if ((c = f - iv[MIN]) < 0)
+	    concave += c;
+	}
+      
+      concave *= dir;
 
+      concaveness2 = concave / (stems.size () - 2);
+      /* ugh: this is the a kludge to get input/regression/beam-concave.ly
+	 to behave as baerenreiter. */
+      concaveness2 /= (stems.size () - 2);
+    }
+  
   /* TODO: some sort of damping iso -> plain horizontal */
-  if (concaveness > r)
+  if (concaveness1 || concaveness2 > r2)
     {
       Interval pos = ly_scm2interval (me->get_grob_property ("positions"));
       Real r = pos.linear_combination (0);
@@ -1037,7 +1073,7 @@ Beam::stem_beams (Grob *me, Item *here, 
 	- prev->relative_coordinate (0, X_AXIS);
       Real stem_w = gh_scm2double (prev->get_grob_property ("thickness"))
 	// URG
-	* me->paper_l ()->get_var ("stafflinethickness");
+	* me->paper_l ()->get_var ("linethickness");
 
       w = w/2 <? nw_f;
       Molecule a;
@@ -1065,7 +1101,7 @@ Beam::stem_beams (Grob *me, Item *here, 
 
       Real stem_w = gh_scm2double (next->get_grob_property ("thickness"))
 	// URG
-	* me->paper_l ()->get_var ("stafflinethickness");
+	* me->paper_l ()->get_var ("linethickness");
 
       Molecule a = Lookup::beam (dydx, w + stem_w, thick);
       a.translate_axis (- stem_w/2, X_AXIS);
@@ -1355,5 +1391,5 @@ the ideal slope, how close the result is
 take the best scoring combination.
 
 ",
-  "concaveness-threshold dir-function quant-score auto-knee-gap gap chord-tremolo beamed-stem-shorten shorten least-squares-dy direction damping flag-width-function neutral-direction positions thickness");
+  "beam-space concaveness-gap concaveness-threshold dir-function quant-score auto-knee-gap gap chord-tremolo beamed-stem-shorten shorten least-squares-dy direction damping flag-width-function neutral-direction positions thickness");
 
diff -purN ../lilypond-1.5.49/lily/box.cc ./lily/box.cc
--- ../lilypond-1.5.49/lily/box.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/box.cc	Tue Apr  2 00:48:01 2002
@@ -61,3 +61,10 @@ Box::scale (Real s)
   interval_a_[X_AXIS] *= s;
   interval_a_[Y_AXIS] *= s;
 }
+
+void
+Box::add_point (Offset o)
+{
+  interval_a_[X_AXIS].add_point (o[X_AXIS]);
+  interval_a_[Y_AXIS].add_point (o[Y_AXIS]);  
+}
diff -purN ../lilypond-1.5.49/lily/gourlay-breaking.cc ./lily/gourlay-breaking.cc
--- ../lilypond-1.5.49/lily/gourlay-breaking.cc	Sun Mar 17 19:09:27 2002
+++ ./lily/gourlay-breaking.cc	Mon Apr  1 00:26:28 2002
@@ -76,6 +76,8 @@ Gourlay_breaking::do_solve () const
       
       Real minimal_demerits = infinity_f;
 
+      bool ragged = to_boolean (pscore_l_->paper_l_->get_scmvar ("raggedright"));
+
       for (int start_idx = break_idx; start_idx--;)
 	{
 	  Link_array<Grob> line = all.slice (breaks[start_idx], breaks[break_idx]+1);
@@ -89,7 +91,7 @@ Gourlay_breaking::do_solve () const
 	  Interval line_dims
 	    = pscore_l_->paper_l_->line_dimensions_int (optimal_paths[start_idx].line_i_);
 	  Simple_spacer * sp = generate_spacing_problem (line, line_dims);
-	  sp->solve (&cp);
+	  sp->solve (&cp, ragged);
 	  delete sp;
 
 	  if (fabs (cp.force_f_) > worst_force)
diff -purN ../lilypond-1.5.49/lily/hairpin.cc ./lily/hairpin.cc
--- ../lilypond-1.5.49/lily/hairpin.cc	Sun Mar 24 21:46:53 2002
+++ ./lily/hairpin.cc	Tue Apr  2 00:48:01 2002
@@ -14,6 +14,7 @@
 #include "paper-def.hh"
 #include "debug.hh"
 #include "paper-column.hh"
+#include "lookup.hh"
 
 MAKE_SCHEME_CALLBACK (Hairpin, brew_molecule, 1);
 
@@ -23,7 +24,7 @@ Hairpin::brew_molecule (SCM smob) 
   Grob *me= unsmob_grob (smob);
   Spanner *spanner = dynamic_cast<Spanner*> (me);
 
-  Real line = me->paper_l ()->get_var ("stafflinethickness");  
+  Real line = me->paper_l ()->get_var ("linethickness");  
   
   SCM s = me->get_grob_property ("grow-direction");
   if (!ly_dir_p (s))
@@ -35,7 +36,11 @@ Hairpin::brew_molecule (SCM smob) 
   Direction grow_dir = to_dir (s);
 
 
-  /* Ugh, must be same as Text_spanner::brew_molecule.  */  
+  /* Ugh, must be same as Text_spanner::brew_molecule.  */
+
+  /*
+    Ugh. property name is not general.
+   */
   Real padding = gh_scm2double (me->get_grob_property ("if-text-padding"));
  
   Drul_array<bool> broken;
@@ -110,27 +115,14 @@ Hairpin::brew_molecule (SCM smob) 
       starth = continued ? height/2 : 0.0;
       endh = height;
     }
-  
-  /*
-    TODO: junk this and, make a general
-
-    Lookup::line  (XY1, XY2).
-  */
-  SCM hairpin = scm_list_n (ly_symbol2scm ("hairpin"),
-			 gh_double2scm (thick),
-			 gh_double2scm (width),
-			 gh_double2scm (starth),
-			 gh_double2scm (endh),
-			 SCM_UNDEFINED);
 
-  /*
-    We make the hairpin too large in Y direction, so it stays at
-    proper distance from the staff.
-  */
-  Interval yext = 2* height  * Interval (-1,1);
-  Box b (Interval (0, width), yext);
-  Molecule mol (b, hairpin);
-  
+  Molecule mol  = Lookup::line (thick,
+				Offset (0, starth),
+				Offset (width, endh));
+  mol.add_molecule (Lookup::line (thick,
+				  Offset (0, -starth),
+				  Offset (width, -endh)));
+		    
   mol.translate_axis (x_points[LEFT]
 		      - bounds[LEFT]->relative_coordinate (common, X_AXIS),
 		      X_AXIS);
@@ -141,10 +133,6 @@ Hairpin::brew_molecule (SCM smob) 
 
 
 ADD_INTERFACE (Hairpin, "hairpin-interface",
-  "hairpin crescendo.
-
-padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf'
-
-",
-  "grow-direction thickness height padding");
+  "hairpin crescendo.",
+  "grow-direction thickness height if-text-padding");
 
diff -purN ../lilypond-1.5.49/lily/hyphen-spanner.cc ./lily/hyphen-spanner.cc
--- ../lilypond-1.5.49/lily/hyphen-spanner.cc	Sun Mar 24 21:46:53 2002
+++ ./lily/hyphen-spanner.cc	Tue Apr  2 00:48:01 2002
@@ -45,7 +45,7 @@ Hyphen_spanner::brew_molecule (SCM smob)
     }
   while (flip (&d) != LEFT);
   
-  Real lt = sp->paper_l ()->get_var ("stafflinethickness");
+  Real lt = sp->paper_l ()->get_var ("linethickness");
   Real th = gh_scm2double (sp->get_grob_property ("thickness")) * lt ;
   Real h = gh_scm2double (sp->get_grob_property ("height"));
 
diff -purN ../lilypond-1.5.49/lily/include/box.hh ./lily/include/box.hh
--- ../lilypond-1.5.49/lily/include/box.hh	Sun Mar 18 17:14:26 2001
+++ ./lily/include/box.hh	Tue Apr  2 00:48:01 2002
@@ -26,6 +26,7 @@ struct Box
   void translate (Offset o);
   /// smallest box enclosing #b#
   void set_empty ();
+  void add_point (Offset);
   void scale (Real r);
   void unite (Box b);
   Box ();
diff -purN ../lilypond-1.5.49/lily/include/lookup.hh ./lily/include/lookup.hh
--- ../lilypond-1.5.49/lily/include/lookup.hh	Mon Mar 25 23:47:03 2002
+++ ./lily/include/lookup.hh	Tue Apr  2 00:48:01 2002
@@ -30,6 +30,7 @@ struct Lookup
   static Molecule filledbox (Box b);
   static Molecule roundfilledbox (Box b, Real blotdiameter);
   static Molecule repeat_slash (Real w, Real slope, Real th);
+  static Molecule line (Real th, Offset from, Offset to);
 };
 
 #endif // LOOKUP_HH
diff -purN ../lilypond-1.5.49/lily/include/simple-spacer.hh ./lily/include/simple-spacer.hh
--- ../lilypond-1.5.49/lily/include/simple-spacer.hh	Mon Mar 11 01:49:51 2002
+++ ./lily/include/simple-spacer.hh	Mon Apr  1 00:26:28 2002
@@ -42,7 +42,7 @@ struct Simple_spacer
   
   Simple_spacer ();
   
-  void solve (Column_x_positions *) const;
+  void solve (Column_x_positions *, bool) const;
   void add_columns (Link_array<Grob>);
   void my_solve_linelen ();
   void my_solve_natural_len ();
diff -purN ../lilypond-1.5.49/lily/include/tuplet-bracket.hh ./lily/include/tuplet-bracket.hh
--- ../lilypond-1.5.49/lily/include/tuplet-bracket.hh	Sun Mar 24 21:46:53 2002
+++ ./lily/include/tuplet-bracket.hh	Tue Apr  2 00:48:01 2002
@@ -1,4 +1,3 @@
-
 /*
   tuplet-bracket.hh -- part of GNU LilyPond
 
@@ -25,12 +24,17 @@ public:
 
   static void add_column (Grob*me,Item*);
   static void add_beam (Grob*me,Grob*);
-
+  static Grob *parallel_beam (Grob *me, Link_array<Grob> cols, bool *equally_long);
   static void calc_dy (Grob*,Real *) ;
   static void calc_position_and_height (Grob*,Real*,Real *dy);
   
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM ));
 
+  DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
+  static Molecule make_bracket (Axis protusion_axis,
+				Real dx, Real dy, Real thick, Real lprotrusion,
+				Real rprotrusion, Real gap, Real left_widen,
+				Real right_widen);
   static Direction get_default_dir (Grob*);
 };
 
diff -purN ../lilypond-1.5.49/lily/line-spanner.cc ./lily/line-spanner.cc
--- ../lilypond-1.5.49/lily/line-spanner.cc	Sun Mar 24 21:46:54 2002
+++ ./lily/line-spanner.cc	Tue Apr  2 00:48:01 2002
@@ -244,7 +244,7 @@ Line_spanner::brew_molecule (SCM smob) 
       
       }
 
-  Real thick = me->paper_l ()->get_var ("stafflinethickness");  
+  Real thick = me->paper_l ()->get_var ("linethickness");  
 
   SCM s = me->get_grob_property ("thickness");
   if (gh_number_p (s))
diff -purN ../lilypond-1.5.49/lily/lookup.cc ./lily/lookup.cc
--- ../lilypond-1.5.49/lily/lookup.cc	Mon Mar 25 23:47:03 2002
+++ ./lily/lookup.cc	Tue Apr  2 00:48:01 2002
@@ -66,6 +66,28 @@ Lookup::dashed_slur (Bezier b, Real thic
 }
 
 Molecule
+Lookup::line (Real th, Offset f, Offset t)
+{
+  SCM at = (scm_list_n (ly_symbol2scm ("draw-line"),
+			gh_double2scm (th), 
+			gh_double2scm (f[X_AXIS]),
+			gh_double2scm (f[Y_AXIS]),
+			gh_double2scm (t[X_AXIS]),
+			gh_double2scm (t[Y_AXIS]),
+			SCM_UNDEFINED));
+
+  Box box;
+  box.add_point (f);
+  box.add_point (t);
+
+  box[X_AXIS].widen (th/2);
+  box[Y_AXIS].widen (th/2);  
+
+  return Molecule (box, at);
+}
+
+
+Molecule
 Lookup::blank (Box b) 
 {
   return Molecule (b, SCM_EOL);
@@ -87,11 +109,11 @@ Lookup::filledbox (Box b) 
 /*
  * round filled box:
  *
- *   __________________________
- *  /     \  ^           /     \
- * |         |blot              |
- * |   +   | |dia       |   +---|------
- * |         |meter             |     ^
+ *   __________________________________
+ *  /     \  ^           /     \      ^
+ * |         |blot              |     |
+ * |       | |dia       |       |     |
+ * |         |meter             |     |
  * |\ _ _ /  v           \ _ _ /|     |
  * |                            |     |
  * |                            |     | Box
@@ -101,19 +123,30 @@ Lookup::filledbox (Box b) 
  * |                            |     |
  * |  _ _                  _ _  |     |
  * |/     \              /     \|     |
- * | (0,0)                      |     v
- * |   x   |            |   +---|------
- * |   |                    |   |
- *  \__|__/______________\__|__/
- *     |                    |
- *     |                    |
- *     |                    |
- *     |<------------------>|
+ * |                            |     |
+ * |       |            |       |     |
+ * |                            |     |
+ * x\_____/______________\_____/|_____v
+ * |(0,0)                       |
+ * |                            |
+ * |                            |
+ * |<-------------------------->|
  *       Box extent(X_AXIS)
  */
 Molecule
 Lookup::roundfilledbox (Box b, Real blotdiameter)
 {
+  if (b.x ().length () < blotdiameter)
+    {
+      programming_error (_f ("round filled box horizontal extent smaller than blot; decreasing blot"));
+      blotdiameter = b.x ().length ();
+    }
+  if (b.y ().length () < blotdiameter)
+    {
+      programming_error (_f ("round filled box vertical extent smaller than blot; decreasing blot"));
+      blotdiameter = b.y ().length ();
+    }
+
   SCM at = (scm_list_n (ly_symbol2scm ("roundfilledbox"),
 			gh_double2scm (-b[X_AXIS][LEFT]),
 			gh_double2scm (b[X_AXIS][RIGHT]),
diff -purN ../lilypond-1.5.49/lily/lyric-extender.cc ./lily/lyric-extender.cc
--- ../lilypond-1.5.49/lily/lyric-extender.cc	Sun Mar 24 21:46:54 2002
+++ ./lily/lyric-extender.cc	Tue Apr  2 00:48:01 2002
@@ -26,7 +26,7 @@ Lyric_extender::brew_molecule (SCM smob)
   Real leftext = sp->get_bound (LEFT)->extent (sp->get_bound (LEFT),
 					       X_AXIS).length ();
 
-  Real sl = sp->paper_l ()->get_var ("stafflinethickness");  
+  Real sl = sp->paper_l ()->get_var ("linethickness");  
   Real righttrim = 0.5; // default to half a space gap on the right
   SCM righttrim_scm = sp->get_grob_property ("right-trim-amount");
   if (gh_number_p (righttrim_scm)) {
diff -purN ../lilypond-1.5.49/lily/mark-engraver.cc ./lily/mark-engraver.cc
--- ../lilypond-1.5.49/lily/mark-engraver.cc	Sun Mar  3 03:32:46 2002
+++ ./lily/mark-engraver.cc	Tue Apr  2 00:48:01 2002
@@ -174,12 +174,12 @@ Mark_engraver::process_music ()
 	  text_p_->set_grob_property ("text",
 				      ly_str02scm (t.ch_C ()));
 
-	  String style = "mark";
+	  String style = "mark-number";
 	  for (int i=0; i < t.length_i (); i++)
 	    {
 	      if (!isdigit (t[i])) 
 		{
-		  style = "large";
+		  style = "mark-letter";
 		  break;
 		}
 	    }
diff -purN ../lilypond-1.5.49/lily/multi-measure-rest.cc ./lily/multi-measure-rest.cc
--- ../lilypond-1.5.49/lily/multi-measure-rest.cc	Fri Mar 29 13:04:24 2002
+++ ./lily/multi-measure-rest.cc	Tue Apr  2 00:48:01 2002
@@ -117,15 +117,16 @@ Multi_measure_rest::brew_molecule (SCM s
       measures = gh_scm2int (m);
     }
 
-  if (measures > 1)
+  SCM s = me->get_grob_property ("number-threshold");
+  if (measures > gh_scm2int (s))
     {
       Molecule s = Text_item::text2molecule (me,
 					     ly_str02scm (to_str (measures).ch_C ()),
 					     alist_chain);
 
-      
       s.align_to (X_AXIS, CENTER);
-      s.translate_axis (3.0, Y_AXIS);
+      s.translate_axis (gh_scm2double (me->get_grob_property ("padding")) + 2,
+			Y_AXIS);
 
       s.translate_axis (mol.extent (X_AXIS).center (),  X_AXIS);
       mol.add_molecule (s);
@@ -196,7 +197,7 @@ Multi_measure_rest::big_rest (Grob *me, 
   Real thick = gh_scm2double (me->get_grob_property ("thickness"));
   Real ss = Staff_symbol_referencer::staff_space (me);
   
-  Real slt = me->paper_l ()->get_var ("stafflinethickness");
+  Real slt = me->paper_l ()->get_var ("linethickness");
   Real y = slt * thick/2 * ss;
   Box b(Interval (0, width), Interval (-y, y));
   Real ythick = slt * ss;
@@ -257,10 +258,15 @@ Multi_measure_rest::church_rest (Grob*me
       count ++;
     }
 
+  
 
   Real outer_padding_factor = 1.5; //     make outer padding this much bigger.
   Real inner_padding = (space - symbols_width) / (2 * outer_padding_factor + (count-1)); 
-
+  if (inner_padding < 0)
+    {
+      inner_padding = 1.0;
+    }
+  
   Molecule mol; 
   for (SCM  s = mols; gh_pair_p (s); s = gh_cdr(s))
     {
@@ -301,7 +307,9 @@ Multi_measure_rest::set_spacing_rods (SC
   Item * rb = r->find_prebroken_piece (LEFT);      
   
   Item* combinations[4][2]={{l,r}, {lb,r}, {l,rb},{lb,rb}};
-  Real staff_space = Staff_symbol_referencer::staff_space (me);
+
+  Real sym_width = symbol_molecule (me, 0.0).extent (X_AXIS).length ();
+  
   for (int i=0; i < 4; i++)
     {
       Item * l =  combinations[i][0];
@@ -313,8 +321,10 @@ Multi_measure_rest::set_spacing_rods (SC
       Rod rod;
       rod.item_l_drul_[LEFT] = l;
       rod.item_l_drul_[RIGHT] = r;
+
+      
       rod.distance_f_ = l->extent (l, X_AXIS)[BIGGER] - r->extent (r, X_AXIS)[SMALLER]
-	+ 4.0;			// magic!
+	+ sym_width  + 2.0;			// 2.0 = magic!
   
       rod.add_to_cols ();
     }
@@ -329,4 +339,4 @@ numbers, fields from font-interface may 
 
 
 ",
-  "thickness measure-count expand-limit");
+  "expand-limit measure-count number-threshold padding thickness");
diff -purN ../lilypond-1.5.49/lily/note-head.cc ./lily/note-head.cc
--- ../lilypond-1.5.49/lily/note-head.cc	Wed Mar 27 00:16:22 2002
+++ ./lily/note-head.cc	Mon Apr  1 00:26:28 2002
@@ -77,16 +77,13 @@ Note_head::brew_ledger_lines (Grob *me,
       Real blotdiameter = ledgerlinethickness;
       //	(me->paper_l ()->get_var ("blotdiameter"));
       Interval y_extent =
-	Interval (-0.5*(ledgerlinethickness - blotdiameter),
-		  +0.5*(ledgerlinethickness - blotdiameter));
+	Interval (-0.5*(ledgerlinethickness),
+		  +0.5*(ledgerlinethickness));
       Box ledger_line (x_extent, y_extent);
 
-      // FIXME: Currently need blotdiameter factor 2.0 to compensate
-      // for error somewhere else.  (Maybe draw_box confuses radius
-      // and diameter?)
 #if 1
-       Molecule proto_ledger_line =
-         Lookup::roundfilledbox (ledger_line, ledgerlinethickness );
+      Molecule proto_ledger_line =
+	Lookup::roundfilledbox (ledger_line, blotdiameter);
 #else
       Molecule proto_ledger_line = // if you like it the old way
 	Lookup::filledbox (ledger_line);
diff -purN ../lilypond-1.5.49/lily/porrectus.cc ./lily/porrectus.cc
--- ../lilypond-1.5.49/lily/porrectus.cc	Mon Mar 25 23:47:03 2002
+++ ./lily/porrectus.cc	Tue Apr  2 00:48:01 2002
@@ -182,7 +182,7 @@ Porrectus::brew_molecule (SCM smob)
       line_thickness = 1.0;
     }
   Real thickness =
-    line_thickness * me->paper_l ()->get_var ("stafflinethickness");
+    line_thickness * me->paper_l ()->get_var ("linethickness");
 
   SCM porrectus_width_scm = me->get_grob_property ("width");
   Real porrectus_width;
diff -purN ../lilypond-1.5.49/lily/property-engraver.cc ./lily/property-engraver.cc
--- ../lilypond-1.5.49/lily/property-engraver.cc	Wed Mar 20 02:20:46 2002
+++ ./lily/property-engraver.cc	Thu Jan  1 01:00:00 1970
@@ -1,161 +0,0 @@
-/*   
-  property-engraver.cc --  implement Property engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#include "lily-guile.hh"
-#include "engraver.hh"
-#include "dictionary.hh"
-#include "grob.hh"
-#include "scm-hash.hh"
-#include "translator-group.hh"
-#include "warn.hh" 
-
-/*
-  This is deprecated, since revert/override should be used
- */
-class Property_engraver : public Engraver
-{
-  Scheme_hash_table *prop_dict_;	// junkme
-  void apply_properties (SCM, Grob*, Translator_group *origin);
-
-protected:
-  virtual void acknowledge_grob (Grob_info ei);
-  virtual void initialize ();
-  virtual void finalize ();
-public:
-  ~Property_engraver ();
-  TRANSLATOR_DECLARATIONS(Property_engraver);
-};
-
-
-
-Property_engraver::Property_engraver ()
-{
-  prop_dict_ = 0;
-}
-void
-Property_engraver::finalize ()
-{
-  
-}
-
-Property_engraver::~Property_engraver ()
-{
-  if (prop_dict_)
-    scm_gc_unprotect_object (prop_dict_->self_scm ());
-}
-
-void
-Property_engraver::initialize ()
-{
-  prop_dict_ = new Scheme_hash_table;
-
-  SCM plist = get_property ("Generic_property_list");
-  for (; gh_pair_p (plist); plist = ly_cdr (plist))
-    {
-      SCM elt_props = ly_car (plist);
-      prop_dict_->set (ly_car (elt_props), ly_cdr (elt_props));
-    }
-}
-
-void
-Property_engraver::acknowledge_grob (Grob_info i)
-{
-  SCM ifs = i.grob_l_->get_grob_property ("interfaces");
-  SCM props;
-  for (; gh_pair_p (ifs); ifs = ly_cdr (ifs))
-    {      
-      if (prop_dict_->try_retrieve (ly_car (ifs), &props))
-	{
-	  apply_properties (props,i.grob_l_, i.origin_trans_l_->daddy_trans_l_);
-	}
-    }
-
-  if (prop_dict_->try_retrieve (ly_symbol2scm ("all"), &props))
-    {
-      apply_properties (props, i.grob_l_, i.origin_trans_l_->daddy_trans_l_);
-    }
-}
-
-
-void
-Property_engraver::apply_properties (SCM p, Grob *e, Translator_group*origin)
-{
-  for (; gh_pair_p (p); p = ly_cdr (p))
-    {
-      /*
-	Try each property in order; earlier descriptions take
-	precedence over later ones, and we don't touch elt-properties if
-	they're already set.
-      */
-      
-      SCM entry = ly_car (p);
-      SCM prop_sym = ly_car (entry);
-      SCM type_p   = ly_cadr (entry);
-      SCM elt_prop_sym = ly_caddr (entry);
-
-      SCM preset = scm_assq (elt_prop_sym, e->mutable_property_alist_);
-      if (preset != SCM_BOOL_F)
-	continue;
-  
-      SCM val = internal_get_property (prop_sym);
-
-      if (val == SCM_EOL)
-	;			// Not defined in context.
-      else if (gh_apply (type_p, scm_list_n (val, SCM_UNDEFINED))
-	       == SCM_BOOL_T)	// defined and  right type: do it
-	{
-	  e->internal_set_grob_property (elt_prop_sym, val);
-
-	  SCM meta = e->get_grob_property ("meta");
-	  SCM name = scm_assoc (ly_symbol2scm ("name"), meta);
-	  warning (_f ("`%s' is deprecated.  Use\n \\property %s.%s \\override #'%s = #%s",
-		       ly_symbol2string (prop_sym).ch_C (),
-		       origin->type_str_.ch_C (),
-		       ly_scm2string (ly_cdr (name)).ch_C (),
-		       ly_symbol2string (elt_prop_sym).ch_C (),
-		       ly_scm2string (ly_write2scm (val)).ch_C ()));
-	}
-      else
-
-	/*
-	    we don't print a warning if VAL == (), because we would
-	    get lots of warnings when we restore stuff to default, eg.
-
-	    slurDash = #1 [...] slurDash = ()
-
-	    should not cause "type error: slurDash expects number not
-	    boolean
-
-	*/
-	if (val != SCM_EOL)
-	  {			// not the right type: error message.
-	    SCM errport = scm_current_error_port ();
-	    SCM typefunc = scm_primitive_eval (ly_symbol2scm ("type-name"));
-	    SCM type_name = gh_call1 (typefunc, type_p);
-	    warning (_f ("Wrong type for property: %s, type: %s, value found: %s, type: %s",
-			 ly_symbol2string (prop_sym).ch_C (),
-			 ly_scm2string (type_name).ch_C (),
-			 ly_scm2string (ly_write2scm (val)).ch_C (),
-			 ly_scm2string (ly_type (val)).ch_C ()));
-	    scm_puts ("\n", errport);
-	  }
-    }
-}
-
-
-ENTER_DESCRIPTION(Property_engraver,
-/* descr */       "This is a engraver that converts property settings into
-back-end grob-property settings. Example: Voice.stemLength will set
-#'length in all Stem objects.
-
-Due to CPU and memory requirements, the use of this engraver is deprecated.",
-/* creats*/       "",
-/* acks  */       "grob-interface",
-/* reads */       "Generic_property_list",
-/* write */       "");
diff -purN ../lilypond-1.5.49/lily/rhythmic-column-engraver.cc ./lily/rhythmic-column-engraver.cc
--- ../lilypond-1.5.49/lily/rhythmic-column-engraver.cc	Sun Mar 24 21:46:54 2002
+++ ./lily/rhythmic-column-engraver.cc	Tue Apr  2 00:48:01 2002
@@ -132,15 +132,17 @@ void
 Rhythmic_column_engraver::acknowledge_grob (Grob_info i)
 {
   Item * item =  dynamic_cast <Item *> (i.grob_l_);
-  if (item && Stem::has_interface (item))
+  if (!item || item->get_parent (X_AXIS))
+    return ; 
+  if (Stem::has_interface (item))
     {
       stem_l_ = item;
     }
-  else if (item && Rhythmic_head::has_interface (item))
+  else if (Rhythmic_head::has_interface (item))
     {
       rhead_l_arr_.push (item);
     }
-  else if (item && Dot_column::has_interface (item))
+  else if (Dot_column::has_interface (item))
     {
       dotcol_l_ = item;
     }
diff -purN ../lilypond-1.5.49/lily/simple-spacer.cc ./lily/simple-spacer.cc
--- ../lilypond-1.5.49/lily/simple-spacer.cc	Sat Mar 23 02:43:29 2002
+++ ./lily/simple-spacer.cc	Tue Apr  2 00:48:01 2002
@@ -262,8 +262,6 @@ Simple_spacer::add_columns (Link_array<G
 	{
 	  programming_error ("Insane spring found. Setting to unit spring.");
 
-	  cout << "columns " << Paper_column::rank_i (cols[i])
-	       << " " << Paper_column::rank_i (cols[i+1]) << endl;
 	  desc.hooke_f_ = 1.0;
 	  desc.ideal_f_ = 1.0;
 	}
@@ -314,7 +312,7 @@ Simple_spacer::add_columns (Link_array<G
 #include <stdio.h>
 
 void
-Simple_spacer::solve (Column_x_positions *positions) const
+Simple_spacer::solve (Column_x_positions *positions, bool ragged) const
 {
   positions->force_f_ = force_f_;
   if ((force_f_ < 0))
@@ -333,7 +331,15 @@ Simple_spacer::solve (Column_x_positions
   positions->config_.push (indent_f_);
   for (int i=0; i <springs_.size (); i++)
     {
-      positions->config_.push (positions->config_.top () + springs_[i].length (force_f_));
+      if (ragged)
+        {
+	  // ragged right operation: do not apply any force
+	  positions->config_.push (positions->config_.top () + springs_[i].length (0.0));
+	}
+      else
+        {
+	  positions->config_.push (positions->config_.top () + springs_[i].length (force_f_));
+	}
     }
   positions->cols_ = spaced_cols_;
   positions->loose_cols_ = loose_cols_;
diff -purN ../lilypond-1.5.49/lily/slur.cc ./lily/slur.cc
--- ../lilypond-1.5.49/lily/slur.cc	Wed Mar 27 00:21:46 2002
+++ ./lily/slur.cc	Tue Apr  2 00:48:01 2002
@@ -338,7 +338,7 @@ Slur::get_attachment (Grob *me, Directio
 	       */
 	      Real stem_thickness =
 		gh_scm2double (stem->get_grob_property ("thickness"))
-		* stem->paper_l ()->get_var ("stafflinethickness");
+		* stem->paper_l ()->get_var ("linethickness");
 	      o += Offset (0.5 *
 			   x_extent * (1 + Stem::get_direction (stem))
 			   - ((dir + 1)/2) * stem_thickness
@@ -545,7 +545,7 @@ Slur::brew_molecule (SCM smob)
       return SCM_EOL;
     }
 
-  Real thick = me->paper_l ()->get_var ("stafflinethickness") *
+  Real thick = me->paper_l ()->get_var ("linethickness") *
     gh_scm2double (me->get_grob_property ("thickness"));
   Bezier one = get_curve (me);
 
diff -purN ../lilypond-1.5.49/lily/spaceable-grob.cc ./lily/spaceable-grob.cc
--- ../lilypond-1.5.49/lily/spaceable-grob.cc	Thu Mar 28 01:40:23 2002
+++ ./lily/spaceable-grob.cc	Tue Apr  2 00:48:01 2002
@@ -46,7 +46,9 @@ Spaceable_grob::add_spring (Grob*me, Gro
 {
   if (d < 0.0 || strength <= 0.0)
     {
-      programming_error ("Adding reverse spring!");
+      programming_error ("Adding reverse spring! Setting to unit spring");
+      d = 1.0;
+      strength = 1.0;
     }
   
 #ifndef NDEBUG
diff -purN ../lilypond-1.5.49/lily/spacing-engraver.cc ./lily/spacing-engraver.cc
--- ../lilypond-1.5.49/lily/spacing-engraver.cc	Mon Mar 11 01:49:52 2002
+++ ./lily/spacing-engraver.cc	Tue Apr  2 00:48:01 2002
@@ -43,7 +43,7 @@ class Spacing_engraver : public Engraver
   PQueue<Rhythmic_tuple> playing_durations_;
   Array<Rhythmic_tuple> now_durations_;
   Array<Rhythmic_tuple> stopped_durations_;
-
+  Moment now_;
   Spanner * spacing_p_;
   
   TRANSLATOR_DECLARATIONS(Spacing_engraver);
@@ -100,11 +100,18 @@ Spacing_engraver::acknowledge_grob (Grob
   
   if (to_boolean (i.grob_l_->get_grob_property ("non-rhythmic")))
     return;
-  
-  if (Rhythmic_req * r = dynamic_cast<Rhythmic_req*> (i.music_cause ()))
+
+  /*
+    only pay attention to durations that are not grace notes. 
+   */
+  if (!now_.grace_part_)
     {
-      Rhythmic_tuple t (i, now_mom () + r->length_mom ());
-      now_durations_.push (t);
+      if (Rhythmic_req * r = dynamic_cast<Rhythmic_req*> (i.music_cause ()))
+	{
+	  Moment len = r->length_mom ();
+	  Rhythmic_tuple t (i, now_mom () + len);
+	  now_durations_.push (t);
+	}
     }
 }
 
@@ -116,10 +123,7 @@ Spacing_engraver::stop_translation_times
   for (int i=0; i < playing_durations_.size (); i++)
     {
       Moment m = (playing_durations_[i].info_.music_cause ())->length_mom ();
-      if (m.to_bool ())
-	{
-	  shortest_playing = shortest_playing <? m;
-	}
+      shortest_playing = shortest_playing <? m;
     }
   
   Moment starter;
@@ -152,11 +156,11 @@ Spacing_engraver::stop_translation_times
 void
 Spacing_engraver::start_translation_timestep ()
 {
-  Moment now = now_mom ();
+  now_ = now_mom ();
   stopped_durations_.clear ();
-  while (playing_durations_.size () && playing_durations_.front ().end_ < now)
+  while (playing_durations_.size () && playing_durations_.front ().end_ < now_)
     playing_durations_.delmin ();
-  while (playing_durations_.size () && playing_durations_.front ().end_ == now)
+  while (playing_durations_.size () && playing_durations_.front ().end_ == now_)
     stopped_durations_.push (playing_durations_.get ());
 }
 
diff -purN ../lilypond-1.5.49/lily/spacing-spanner.cc ./lily/spacing-spanner.cc
--- ../lilypond-1.5.49/lily/spacing-spanner.cc	Fri Mar 29 13:04:25 2002
+++ ./lily/spacing-spanner.cc	Tue Apr  2 00:48:01 2002
@@ -11,6 +11,7 @@
 #include <stdio.h>
 
 #include "line-of-score.hh"
+#include "paper-def.hh"
 #include "paper-score.hh"
 #include "paper-column.hh"
 #include "item.hh"
@@ -440,7 +441,7 @@ Spacing_spanner::find_shortest (Link_arr
 	  max_count = counts[i];
 	}
 
-      //      printf ("Den %d/%d, c %d\n", durations[i].num (), durations[i].den (), counts[i]);
+      //      printf ("duration %d/%d, count %d\n", durations[i].num (), durations[i].den (), counts[i]);
     }
 
   /*
@@ -545,7 +546,6 @@ Spacing_spanner::musical_column_spacing 
 	  max_note_space = max_note_space >? space;
 	  max_fixed_note_space = max_fixed_note_space >? fixed;
 	}
-
     }
 
   if (max_note_space < 0)
@@ -554,7 +554,10 @@ Spacing_spanner::musical_column_spacing 
       max_fixed_note_space = increment;
     }
 
-  Spaceable_grob::add_spring (lc, rc, max_note_space,  1 / (max_note_space -max_fixed_note_space), expand_only);
+  bool ragged = to_boolean (me->paper_l ()->get_scmvar ("raggedright"));
+  Real strength = (ragged) ? 1.0 : 1 / (max_note_space - max_fixed_note_space);
+  Real distance = (ragged) ? max_fixed_note_space : max_note_space;
+  Spaceable_grob::add_spring (lc, rc, distance, strength, expand_only);
 }
 
 void
@@ -649,7 +652,10 @@ Spacing_spanner::breakable_column_spacin
     works on all architectures.
    */
   
-  Spaceable_grob::add_spring (l, r, max_space,  1/(max_space - max_fixed), false);  
+  bool ragged = to_boolean (me->paper_l ()->get_scmvar ("raggedright"));
+  Real strength = (ragged) ? 1.0 : 1 / (max_space - max_fixed);
+  Real distance = (ragged) ? max_fixed : max_space;
+  Spaceable_grob::add_spring (l, r, distance, strength, false);
 }
 
 
@@ -660,28 +666,44 @@ Real
 Spacing_spanner::get_duration_space (Grob*me, Moment d, Rational shortest, bool * expand_only) 
 {
   Real k = gh_scm2double (me->get_grob_property ("shortest-duration-space"));
-    
+  Real incr = gh_scm2double (me->get_grob_property ("spacing-increment"));
+  
   if (d < shortest)
     {
+      /*
+	We don't space really short notes using the log of the
+	duration, since it would disproportionally stretches the long
+	notes in a piece. In stead, we use geometric spacing with constant 0.5
+	(i.e. linear.)
+
+	This should probably be tunable, to use other base numbers.
+
+	In Mozart hrn3 by EB., we have 8th note = 3.9 mm (total), 16th note =
+	3.6 mm (total).  head-width = 2.4, so we 1.2mm for 16th, 1.5
+	mm for 8th. (white space), suggesting that we use
+
+	(1.2 / 1.5)^{-log2(duration ratio)}
+	
+
+       */
       Rational ratio = d.main_part_ / shortest;
       
       *expand_only = true;
-      return (0.5 + 0.5 * double (ratio)) * k ;
+      return ((k-1) + double (ratio)) * incr;
     }
   else
     {
       /*
-	  @see
-  John S. Gourlay. ``Spacing a Line of Music,'' Technical Report
-  OSU-CISRC-10/87-TR35, Department of Computer and Information Science,
-  The Ohio State University, 1987.
+	  John S. Gourlay. ``Spacing a Line of Music,'' Technical
+	  Report OSU-CISRC-10/87-TR35, Department of Computer and
+	  Information Science, The Ohio State University, 1987.
        */
       Real log =  log_2 (shortest);
       k -= log;
       Rational compdur = d.main_part_ + d.grace_part_ /Rational (3);
       *expand_only = false;      
    
-      return (log_2 (compdur) + k) * gh_scm2double (me->get_grob_property ("spacing-increment"));
+      return (log_2 (compdur) + k) * incr;
     }
 }
 
@@ -734,47 +756,17 @@ Spacing_spanner::note_spacing (Grob*me, 
 
 
 ADD_INTERFACE (Spacing_spanner,"spacing-spanner-interface",
-  " SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
-The space taken by a note is determined by the formula 
-
-
-
-where TIME is the amount of time a note occupies.  The value of C is
-chosen such that the smallest space within a measure is
-arithmetic_basicspace:
-
-C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) 
-
-The smallest space is the one following the shortest note in the
-measure, or the space following a hypothetical 1/8 note.  Typically
-arithmetic_basicspace is set to a value so that the shortest note
-takes about two noteheads of space (ie, is followed by a notehead of
-space):
-
-@example
-2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
-
-@{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
-@{ assuming: SHORTEST <= 1/8 @}
-
-= arithmetic_multiplier *
-( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
-
-= arithmetic_multiplier * arithmetic_basicspace
-
-@{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
-
-= quartwidth * arithmetic_basicspace
-
-=>	       
-
-arithmetic_basicspace = 2/1 = 2
-
-
-If you want to space your music wider, use something like:
-
-arithmetic_basicspace = 4.;
-
-@end example",
+  "
+The space taken by a note is dependent on its duration. Doubling a
+duration adds spacing-increment to the space. The most common shortest
+note gets shortest-duration-space. Notes that are even shorter are
+spaced proportonial to their duration.
+
+Typically, the increment is the width of a black note head.  In a
+piece with lots of 8th notes, and some 16th notes, the eighth note
+gets 2 note heads width (i.e. the space following a note is 1 note
+head width) A 16th note is followed by 0.5 note head width. The
+quarter note is followed by  3 NHW, the half by 4 NHW, etc.
+",
   "spacing-increment shortest-duration-space");
 
diff -purN ../lilypond-1.5.49/lily/staff-symbol.cc ./lily/staff-symbol.cc
--- ../lilypond-1.5.49/lily/staff-symbol.cc	Sun Mar 24 21:46:54 2002
+++ ./lily/staff-symbol.cc	Tue Apr  2 00:48:01 2002
@@ -27,13 +27,30 @@ Staff_symbol::brew_molecule (SCM smob)
   Grob * common
     = sp->get_bound (LEFT)->common_refpoint (sp->get_bound (RIGHT), X_AXIS);
   
-  Real width =
-    // right_shift     - left_shift
-    + sp->get_bound (RIGHT)->relative_coordinate (common , X_AXIS)
-    - sp->get_bound (LEFT)->relative_coordinate (common, X_AXIS)
-    ;
+  bool ragged = to_boolean (me->paper_l ()->get_scmvar ("raggedright"));
+  Real width;
+  if (ragged)
+    {
+      // *prevent* staff symbol from being ragged right
+      width =
+	me->paper_l ()->get_var ("linewidth")
+	- sp->get_bound (LEFT)->relative_coordinate (common, X_AXIS)
+	;
+    }
+  else
+    {
+      width =
+	// right_shift     - left_shift
+	+ sp->get_bound (RIGHT)->relative_coordinate (common , X_AXIS)
+	- sp->get_bound (LEFT)->relative_coordinate (common, X_AXIS)
+	;
+    }
 
-  Real t = me->paper_l ()->get_var ("stafflinethickness");
+  Real t = me->paper_l ()->get_var ("linethickness");
+  SCM my_thick = me->get_grob_property("thickness");
+  if (gh_number_p(my_thick))
+    t *= gh_scm2double (my_thick);
+  
   int l = Staff_symbol::line_count (me);
   
   Real height = (l-1) * staff_space (me) /2;
@@ -87,7 +104,8 @@ Staff_symbol::has_interface (Grob*m)
 
 
 ADD_INTERFACE (Staff_symbol,"staff-symbol-interface",
-  "This spanner draws the lines of a staff.  The middle line is
-position 0.",
-  "staff-space line-count invisible-staff");
+  "This spanner draws the lines of a staff.  The center (i.e. middle line
+or space) is position 0.",
+	       
+  "staff-space thickness line-count");
 
diff -purN ../lilypond-1.5.49/lily/stem-engraver.cc ./lily/stem-engraver.cc
--- ../lilypond-1.5.49/lily/stem-engraver.cc	Sun Mar 24 21:46:54 2002
+++ ./lily/stem-engraver.cc	Tue Apr  2 00:48:01 2002
@@ -149,6 +149,12 @@ Stem_engraver::stop_translation_timestep
 	 aargh: I don't get it.  direction is being set (and then set
 	 to forced), if we have a Chord_tremolo.
        */
+
+      /*
+	Why the separate check for forced directions? --hwn.
+
+	(docme)
+       */
       SCM dir = stem_p_->get_grob_property ("direction");
       if (gh_number_p (dir) && to_dir (dir))
 	{
diff -purN ../lilypond-1.5.49/lily/stem.cc ./lily/stem.cc
--- ../lilypond-1.5.49/lily/stem.cc	Fri Mar 29 13:04:25 2002
+++ ./lily/stem.cc	Tue Apr  2 00:48:01 2002
@@ -586,7 +586,7 @@ Stem::brew_molecule (SCM smob) 
     {
       Real stem_width = gh_scm2double (me->get_grob_property ("thickness"))
 	// URG
-	* me->paper_l ()->get_var ("stafflinethickness");
+	* me->paper_l ()->get_var ("linethickness");
       
       Molecule ss =Lookup::filledbox (Box (Interval (-stem_width/2, stem_width/2),
 					   Interval (stem_y[DOWN]*dy, stem_y[UP]*dy)));
@@ -633,7 +633,7 @@ Stem::off_callback (SCM element_smob, SC
 	{
 	  Real rule_thick
 	    = gh_scm2double (me->get_grob_property ("thickness"))
-	    * me->paper_l ()->get_var ("stafflinethickness");
+	    * me->paper_l ()->get_var ("linethickness");
 
 	  
 	  r += - d * rule_thick * 0.5;
diff -purN ../lilypond-1.5.49/lily/system-start-delimiter.cc ./lily/system-start-delimiter.cc
--- ../lilypond-1.5.49/lily/system-start-delimiter.cc	Sun Mar 24 21:46:54 2002
+++ ./lily/system-start-delimiter.cc	Tue Apr  2 00:48:01 2002
@@ -67,7 +67,7 @@ System_start_delimiter::has_interface (G
 Molecule
 System_start_delimiter::simple_bar (Grob*me,Real h) 
 {
-  Real w = me->paper_l ()->get_var ("stafflinethickness") *
+  Real w = me->paper_l ()->get_var ("linethickness") *
     gh_scm2double (me->get_grob_property ("thickness"));
   return Lookup::filledbox (Box (Interval (0,w), Interval (-h/2, h/2)));
 }
diff -purN ../lilypond-1.5.49/lily/system.cc ./lily/system.cc
--- ../lilypond-1.5.49/lily/system.cc	Sun Mar 24 21:46:54 2002
+++ ./lily/system.cc	Tue Apr  2 00:48:01 2002
@@ -428,7 +428,7 @@ System::post_processing (bool last_line)
   /*
     line preamble.
    */
-  output_scheme (scm_list_n (ly_symbol2scm ("start-line"),
+  output_scheme (scm_list_n (ly_symbol2scm ("start-system"),
 			  gh_double2scm (height),
 			  SCM_UNDEFINED));
   
@@ -472,11 +472,11 @@ System::post_processing (bool last_line)
   
   if (last_line)
     {
-      output_scheme (scm_list_n (ly_symbol2scm ("stop-last-line"), SCM_UNDEFINED));
+      output_scheme (scm_list_n (ly_symbol2scm ("stop-last-system"), SCM_UNDEFINED));
     }
   else
     {
-      output_scheme (scm_list_n (ly_symbol2scm ("stop-line"), SCM_UNDEFINED));
+      output_scheme (scm_list_n (ly_symbol2scm ("stop-system"), SCM_UNDEFINED));
     }
 }
 
diff -purN ../lilypond-1.5.49/lily/text-spanner.cc ./lily/text-spanner.cc
--- ../lilypond-1.5.49/lily/text-spanner.cc	Sun Mar 24 21:46:54 2002
+++ ./lily/text-spanner.cc	Tue Apr  2 00:55:07 2002
@@ -134,7 +134,7 @@ Text_spanner::brew_molecule (SCM smob) 
 
   /* ugh */
   
-  Real thick = me->paper_l ()->get_var ("stafflinethickness");  
+  Real thick = me->paper_l ()->get_var ("linethickness");  
   SCM st = me->get_grob_property ("thickness");
   if (gh_number_p (st))
     {
@@ -195,7 +195,7 @@ void 
 Text_spanner::setup_pedal_bracket(Spanner *me)
 {
 
-  Real thick = me->paper_l ()->get_var ("stafflinethickness");  
+  Real thick = me->paper_l ()->get_var ("linethickness");  
   SCM st = me->get_grob_property ("thickness");
   if (gh_number_p (st))
     {
@@ -205,6 +205,9 @@ Text_spanner::setup_pedal_bracket(Spanne
   Drul_array<bool> w, broken;
   Drul_array<Real> height, width, shorten, r;
 
+  /*
+    FIXME: too many new property names.
+   */
   SCM pa = me->get_grob_property ("if-text-padding");
   SCM ew = me->get_grob_property ("edge-width");
   SCM eh = me->get_grob_property ("edge-height");
@@ -302,5 +305,5 @@ ADD_INTERFACE (Pianopedal,"piano-pedal-i
 
 ADD_INTERFACE (Text_spanner,"text-spanner-interface",
   "generic text spanner",
-  "dash-period dash-length edge-height edge-width edge-text shorten-pair type");
+  "dash-period if-text-padding dash-length edge-height edge-width edge-text shorten-pair type");
 
diff -purN ../lilypond-1.5.49/lily/tie.cc ./lily/tie.cc
--- ../lilypond-1.5.49/lily/tie.cc	Sun Mar 24 21:46:54 2002
+++ ./lily/tie.cc	Tue Apr  2 00:48:01 2002
@@ -294,7 +294,7 @@ Tie::brew_molecule (SCM smob) 
   
   Real thick =
     gh_scm2double (me->get_grob_property ("thickness"))
-    * me->paper_l ()->get_var ("stafflinethickness");
+    * me->paper_l ()->get_var ("linethickness");
 
   Bezier b;
   int i = 0;
diff -purN ../lilypond-1.5.49/lily/tuplet-bracket.cc ./lily/tuplet-bracket.cc
--- ../lilypond-1.5.49/lily/tuplet-bracket.cc	Sun Mar 24 21:46:54 2002
+++ ./lily/tuplet-bracket.cc	Tue Apr  2 00:48:01 2002
@@ -6,6 +6,22 @@
   (c)  1997--2002 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
+/*
+  TODO:
+
+  - tuplet bracket should probably be subject to the same rules as
+  beam sloping/quanting.
+
+  - There is no support for kneed brackets, or nested brackets.
+
+  - number placement for parallel beams should be much more advanced:
+    for sloped beams some extra horizontal offset must be introduced.
+
+  - number placement is usually done over the center note, not the
+    graphical center.
+  
+ */
+
 #include <math.h>
 
 #include "beam.hh"
@@ -13,17 +29,57 @@
 #include "debug.hh"
 #include "font-interface.hh"
 #include "molecule.hh"
-#include "paper-column.hh"
 #include "paper-def.hh"
 #include "text-item.hh"
 #include "tuplet-bracket.hh"
 #include "stem.hh"
 #include "note-column.hh"
-#include "dimensions.hh"
 #include "group-interface.hh"
 #include "directional-element-interface.hh"
 #include "spanner.hh"
 #include "staff-symbol-referencer.hh"
+#include "lookup.hh"
+
+
+static Grob*
+get_x_bound_grob (Grob *g, Direction my_dir)
+{
+  if (Note_column::stem_l (g)
+      && Note_column::dir (g) == my_dir)
+    {
+      g = Note_column::stem_l (g);
+    }
+  return g;
+}
+
+
+
+Grob*
+Tuplet_bracket::parallel_beam (Grob *me, Link_array<Grob> cols, bool *equally_long)
+{
+  /*
+    ugh: code dup. 
+  */
+  Grob *s1 = Note_column::stem_l (cols[0]); 
+  Grob *s2 = Note_column::stem_l (cols.top());    
+
+  Grob*b1 = s1 ? Stem::beam_l (s1) : 0;
+  Grob*b2 = s2 ? Stem::beam_l (s2) : 0;
+  
+  Spanner*sp = dynamic_cast<Spanner*> (me);  
+
+  *equally_long= false;
+  if (! ( b1 && (b1 == b2) && !sp->broken_b() ))
+      return 0;
+
+  Link_array<Grob> beam_stems = Pointer_group_interface__extract_grobs
+    (b1, (Grob*)0, "stems");
+
+  
+  *equally_long = (beam_stems[0] == s1 && beam_stems.top() == s2);
+  return b1;
+}
+
 
 /*
   TODO:
@@ -32,8 +88,6 @@
   follow beam precisely for determining tuplet number location.
   
  */
-
-
 MAKE_SCHEME_CALLBACK (Tuplet_bracket,brew_molecule,1);
 SCM
 Tuplet_bracket::brew_molecule (SCM smob) 
@@ -41,29 +95,23 @@ Tuplet_bracket::brew_molecule (SCM smob)
   Grob *me= unsmob_grob (smob);
   Molecule  mol;
   Link_array<Grob> column_arr=
-    Pointer_group_interface__extract_grobs (me, (Grob*)0, "columns");
-
+    Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns");
 
   if (!column_arr.size ())
     return mol.smobbed_copy ();
 
+  bool equally_long = false;
+  Grob * par_beam = parallel_beam (me, column_arr, &equally_long);
 
-  Grob *b1 = Note_column::stem_l (column_arr[0]); 
-  Grob *b2 = Note_column::stem_l (column_arr.top());    
-
-  b1 = b1 ? Stem::beam_l (b1) : 0;
-  b2 = b2 ? Stem::beam_l (b2) : 0;
-
-  
   Spanner*sp = dynamic_cast<Spanner*> (me);  
 
-  // Default behaviour: number always, bracket when no beam!
-  bool par_beam = b1 && (b1 == b2) && !sp->broken_b() ;
-  
-  bool bracket_visibility = !par_beam;
+  bool bracket_visibility = !(par_beam && equally_long);
   bool number_visibility = true;
 
-  SCM bracket = me->get_grob_property ("tuplet-bracket-visibility");
+  /*
+    Fixme: the type of this prop is sucky.
+   */
+  SCM bracket = me->get_grob_property ("bracket-visibility");
   if (gh_boolean_p (bracket))
     {
       bracket_visibility = gh_scm2bool (bracket);
@@ -71,21 +119,28 @@ Tuplet_bracket::brew_molecule (SCM smob)
   else if (bracket == ly_symbol2scm ("if-no-beam"))
     bracket_visibility = !par_beam;
 
-  SCM numb = me->get_grob_property ("tuplet-number-visibility");  
+  SCM numb = me->get_grob_property ("number-visibility");  
   if (gh_boolean_p (numb))
     {
       number_visibility = gh_scm2bool (numb);
     }
   else if (numb == ly_symbol2scm ("if-no-beam"))
     number_visibility = !par_beam;
-  
 	
-  Real ncw = column_arr.top ()->extent (column_arr.top (), X_AXIS).length ();
-  Real w = sp->spanner_length () + ncw;
-
+  Grob * commonx = column_arr[0]->common_refpoint (column_arr.top (),X_AXIS);
   Direction dir = Directional_element_interface::get (me);
-  Real dy = gh_scm2double (me->get_grob_property ("delta-y"));
+
+  Grob * lgr = get_x_bound_grob (column_arr[0], dir);
+  Grob * rgr = get_x_bound_grob (column_arr.top(), dir);  
+  Real x0 = lgr->extent (commonx,X_AXIS)[LEFT];
+  Real x1 = rgr->extent (commonx,X_AXIS)[RIGHT];
+
+  Real w = x1 -x0;
+
+  Real ly = gh_scm2double (me->get_grob_property ("left-position"));
+  Real ry = gh_scm2double (me->get_grob_property ("right-position"));  
   SCM number = me->get_grob_property ("text");
+  
   if (gh_string_p (number) && number_visibility)
     {
       SCM properties = Font_interface::font_alist_chain (me);
@@ -94,35 +149,75 @@ Tuplet_bracket::brew_molecule (SCM smob)
       num.translate_axis (w/2, X_AXIS);
       num.align_to (Y_AXIS, CENTER);
 	
-      num.translate_axis (dy/2, Y_AXIS);
+      num.translate_axis ((ry-ly)/2, Y_AXIS);
 
       mol.add_molecule (num);
     }
       
   if (bracket_visibility)      
     {
-      Real  lt =  me->paper_l ()->get_var ("stafflinethickness");
-	  
-      SCM thick = me->get_grob_property ("thick");
-      SCM gap = me->get_grob_property ("number-gap");
-	  
-      SCM at =scm_list_n (ly_symbol2scm ("tuplet"),
-		       gh_double2scm (1.0),
-		       gap,
-		       gh_double2scm (w),
-		       gh_double2scm (dy),
-		       gh_double2scm (gh_scm2double (thick)* lt),
-		       gh_int2scm (dir),
-		       SCM_UNDEFINED);
+      Real  lt =  me->paper_l ()->get_var ("linethickness");
+  
+      SCM thick = me->get_grob_property ("thickness");
+      if (gh_number_p (thick))
+	lt *= gh_scm2double (thick);
+      
+      SCM gap = me->get_grob_property ("gap");
 
-      Box b;
-      mol.add_molecule (Molecule (b, at));
+      Real prot_size = 0.7;	// magic.
+
+      Molecule brack = make_bracket (Y_AXIS,
+				     w, ry-ly, lt,
+				     -prot_size*dir, -prot_size*dir,
+				     gh_scm2double (gap),
+				     0.0, 0.0);
+      mol.add_molecule (brack);
     }
 
+  mol.translate_axis (ly, Y_AXIS);
+  mol.translate_axis (x0  - sp->get_bound (LEFT)->relative_coordinate (commonx,X_AXIS),X_AXIS);
   return mol.smobbed_copy ();
 }
 
+/*
+  should move to lookup?
+ */
+Molecule
+Tuplet_bracket::make_bracket (Axis protusion_axis,
+			      Real dx, Real dy, Real thick, Real lprotrusion,
+			      Real rprotrusion, Real gap, Real left_widen,
+			      Real right_widen)
+{
+  Real len = Offset (dx,dy).length ();
+  Real gapx = dx*  (gap /  len);
+  Real gapy = dy*  (gap /  len);
+  Axis other = other_axis (protusion_axis);
+
+  Molecule l1 = Lookup::line (thick, Offset(0,0),
+			      Offset ( (dx - gapx)/2, (dy - gapy)/2 ));
+  Molecule l2 = Lookup::line (thick, Offset((dx + gapx) / 2,(dy + gapy) / 2),
+			      
+			      Offset (dx,dy));
+
+  Offset protusion;
+  protusion[other] = left_widen;
+  protusion[protusion_axis] = lprotrusion;
+  
+  Molecule p1 = Lookup::line (thick, Offset(0,0), protusion);
+
+  protusion[other] = right_widen;
+  protusion[protusion_axis] = rprotrusion;
+  Molecule p2 = Lookup::line (thick, Offset(dx,dy),Offset(dx,dy) + protusion);  
+
+
+  Molecule m;
+  m.add_molecule (p1);
+  m.add_molecule (p2);
+  m.add_molecule (l1);
+  m.add_molecule (l2);
 
+  return m;  
+}
 
 
 /*
@@ -132,13 +227,13 @@ void
 Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy) 
 {
   Link_array<Grob> column_arr=
-    Pointer_group_interface__extract_grobs (me, (Grob*)0, "columns");
+    Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns");
 
 
-  Grob * commony = me->common_refpoint (me->get_grob_property ("columns"), Y_AXIS);
-  Grob * commonx = me->common_refpoint (me->get_grob_property ("columns"), X_AXIS);  
+  Grob * commony = me->common_refpoint (me->get_grob_property ("note-columns"), Y_AXIS);
+  Grob * commonx = me->common_refpoint (me->get_grob_property ("note-columns"), X_AXIS);  
   
-  Direction d = Directional_element_interface::get (me);
+  Direction dir = Directional_element_interface::get (me);
 
   /*
     Use outer non-rest columns to determine slope
@@ -153,43 +248,49 @@ Tuplet_bracket::calc_position_and_height
   
   if (l < r)
     {
-      *dy = column_arr[r]->extent (commony, Y_AXIS) [d]
-	- column_arr[l]->extent (commony, Y_AXIS) [d] ;
+      *dy = column_arr[r]->extent (commony, Y_AXIS) [dir]
+	- column_arr[l]->extent (commony, Y_AXIS) [dir] ;
     }
   else
     * dy = 0;
 
 
-  *offset = - d * infinity_f;
+  *offset = - dir * infinity_f;
 
   if (!column_arr.size ())
     return;
+
+
   
-  Real x0 = column_arr[0]->relative_coordinate (commonx, X_AXIS);
-  Real x1 = column_arr.top ()->relative_coordinate (commonx, X_AXIS);
-  
+  Grob * lgr = get_x_bound_grob (column_arr[0], dir);
+  Grob * rgr = get_x_bound_grob (column_arr.top(), dir);  
+  Real x0 = lgr->extent (commonx,X_AXIS)[LEFT];
+  Real x1 = rgr->extent (commonx,X_AXIS)[RIGHT];
+
+
+    /*
+      Slope.
+    */
   Real factor = column_arr.size () > 1 ? 1/ (x1 - x0) : 1.0;
   
   for (int i = 0; i < column_arr.size ();  i++)
     {
-      Real notey = column_arr[i]->extent (commony, Y_AXIS)[d] 
+      Real notey = column_arr[i]->extent (commony, Y_AXIS)[dir] 
 	- me->relative_coordinate (commony, Y_AXIS);
 
       Real x = column_arr[i]->relative_coordinate (commonx, X_AXIS) - x0;
       Real tuplety =  *dy * x * factor;
 
-      if (notey * d > (*offset + tuplety) * d)
+      if (notey * dir > (*offset + tuplety) * dir)
 	*offset = notey - tuplety; 
     }
 
   // padding
-  *offset +=  1.0 *d;
+  *offset +=  gh_scm2double (me->get_grob_property ("padding")) *dir;
 
   
   /*
     horizontal brackets should not collide with staff lines.
-
-    
    */
   if (*dy == 0)
     {
@@ -199,7 +300,7 @@ Tuplet_bracket::calc_position_and_height
       
       *offset = rint (*offset);
       if (Staff_symbol_referencer::on_staffline (me, (int) rint (*offset)))
-	*offset += d;
+	*offset += dir;
 
       *offset *= 0.5 * ss;
     }
@@ -213,7 +314,7 @@ void
 Tuplet_bracket::calc_dy (Grob*me,Real * dy)
 {
   Link_array<Grob> column_arr=
-    Pointer_group_interface__extract_grobs (me, (Grob*)0, "columns");
+    Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns");
 
   /*
     ugh. refps.
@@ -222,54 +323,113 @@ Tuplet_bracket::calc_dy (Grob*me,Real * 
   *dy = column_arr.top ()->extent (column_arr.top (), Y_AXIS) [d]
     - column_arr[0]->extent (column_arr[0], Y_AXIS) [d];
 }
+
+
+/*
+  We depend on the beams if there are any.
+ */
+MAKE_SCHEME_CALLBACK (Tuplet_bracket,before_line_breaking,1);
+SCM
+Tuplet_bracket::before_line_breaking (SCM smob)
+{
+  Grob *me = unsmob_grob (smob);
+  Link_array<Grob> column_arr=
+    Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns");
+
+
+  for (int i = column_arr.size(); i--;)
+    {
+      Grob * s =Note_column::stem_l (column_arr[i]);
+      Grob * b = s ? Stem::beam_l (s): 0;
+      if (b)
+	me->add_dependency (b);
+    }
+  return SCM_UNDEFINED;
+}
+
 MAKE_SCHEME_CALLBACK (Tuplet_bracket,after_line_breaking,1);
 
 SCM
 Tuplet_bracket::after_line_breaking (SCM smob)
 {
   Grob * me = unsmob_grob (smob);
-  Link_array<Note_column> column_arr=
-    Pointer_group_interface__extract_grobs (me, (Note_column*)0, "columns");
+  Link_array<Grob> column_arr=
+    Pointer_group_interface__extract_grobs (me, (Grob*)0, "note-columns");
 
   if (!column_arr.size ())
     {
       me->suicide ();
       return SCM_UNSPECIFIED;
     }
-
-  Direction d = Directional_element_interface::get (me);
-  if (!d)
+  if (dynamic_cast<Spanner*> (me)->broken_b ())
     {
-      d = Tuplet_bracket::get_default_dir (me);
-      Directional_element_interface::set (me, d);
-
+      me->warning ( "Tuplet_bracket was across linebreak. Farewell cruel world.");
+      me->suicide();
+      return SCM_UNSPECIFIED;
+    }
+  
+  Direction dir = Directional_element_interface::get (me);
+  if (!dir)
+    {
+      dir = Tuplet_bracket::get_default_dir (me);
+      Directional_element_interface::set (me, dir);
     }
+  
+  bool equally_long = false;
+  Grob * par_beam = parallel_beam (me, column_arr, &equally_long);
+
   Real dy, offset;
+  if (!par_beam)
+    {
+      calc_position_and_height (me,&offset,&dy);
+    }
+  else
+    {
+      SCM ps =  par_beam->get_grob_property ("positions"); 
+
+      Real lp = gh_scm2double (gh_car (ps));
+      Real rp = gh_scm2double (gh_cdr (ps));
 
-  calc_position_and_height (me,&offset,&dy);
+      /*
+	duh. magic.
+       */
+      offset = lp + dir * (0.5 + gh_scm2double (me->get_grob_property ("padding")));
+      dy = rp- lp;
+    }
+  
+  
+  SCM lp =  me->get_grob_property ("left-position");
+  SCM rp = me->get_grob_property ("right-position");  
+  
+  if (gh_number_p (lp) && !gh_number_p (rp))
+    {
+      rp = gh_double2scm (gh_scm2double (lp) + dy);
+    }
+  else if (gh_number_p (rp) && !gh_number_p (lp))
+    {
+      lp = gh_double2scm (gh_scm2double (rp) - dy);
+    }
+  else if (!gh_number_p (rp) && !gh_number_p (lp))
+    {
+      lp = gh_double2scm (offset);
+      rp = gh_double2scm (offset +dy);
+    }
 
-  if (!gh_number_p (me->get_grob_property ("delta-y")))
-    me->set_grob_property ("delta-y", gh_double2scm (dy));
+  me->set_grob_property ("left-position", lp);
+  me->set_grob_property ("right-position", rp);
 
-  me->translate_axis (offset, Y_AXIS);
   return SCM_UNSPECIFIED;
 }
 
 
+/*
+  similar to slur.
+ */
 Direction
 Tuplet_bracket::get_default_dir (Grob*me)
 {
   Direction d = UP;
-  SCM dir_sym =me->get_grob_property ("dir-forced");
-  if (ly_dir_p (dir_sym))
-    {
-      d= to_dir (dir_sym);
-      if (d != CENTER)
-	return d;
-    }
-
-  d = UP ;
-  for (SCM s = me->get_grob_property ("columns"); gh_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_grob_property ("note-columns"); gh_pair_p (s); s = ly_cdr (s))
     {
       Grob * nc = unsmob_grob (ly_car (s));
       if (Note_column::dir (nc) < 0) 
@@ -278,14 +438,13 @@ Tuplet_bracket::get_default_dir (Grob*me
 	  break;
 	}
     }
-  
   return d;
 }
 
 void
 Tuplet_bracket::add_column (Grob*me, Item*n)
 {
-  Pointer_group_interface::add_grob (me, ly_symbol2scm ("columns"), n);
+  Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-columns"), n);
   me->add_dependency (n);
 
   add_bound_item (dynamic_cast<Spanner*> (me), n);
@@ -303,5 +462,5 @@ Tuplet_bracket::has_interface (Grob*me)
 
 ADD_INTERFACE (Tuplet_bracket,"tuplet-bracket-interface",
   "A bracket with a number in the middle, used for tuplets.",
-  "columns number-gap delta-y tuplet-bracket-visibility tuplet-number-visibility thick direction");
+  "note-columns padding gap left-position right-position bracket-visibility number-visibility thickness direction");
 
diff -purN ../lilypond-1.5.49/lily/volta-bracket.cc ./lily/volta-bracket.cc
--- ../lilypond-1.5.49/lily/volta-bracket.cc	Sun Mar 24 21:46:54 2002
+++ ./lily/volta-bracket.cc	Tue Apr  2 00:48:01 2002
@@ -19,7 +19,7 @@
 #include "group-interface.hh"
 #include "side-position-interface.hh"
 #include "directional-element-interface.hh"
-
+#include "lookup.hh"
 
 /*
   this is too complicated. Yet another version of side-positioning,
@@ -59,7 +59,7 @@ Volta_bracket_interface::brew_molecule (
     (strcmp(cs,":|")!=0 && strcmp(cs,"|:")!=0 && strcmp(cs,"|.")!=0
      && strcmp(cs,":|:")!=0 && strcmp(cs,".|")!=0);
 
-  Real staff_thick = me->paper_l ()->get_var ("stafflinethickness");  
+  Real staff_thick = me->paper_l ()->get_var ("linethickness");  
   Real half_space = 0.5;
 
   Item * bound = dynamic_cast<Spanner*> (me)->get_bound (LEFT);
@@ -85,19 +85,18 @@ Volta_bracket_interface::brew_molecule (
   Real h =  gh_scm2double (me->get_grob_property ("height"));
   Real t =  staff_thick * gh_scm2double (me->get_grob_property ("thickness"));
 
-  /*
-    ugh: should build from line segments.
-   */
-  SCM at = (scm_list_n (ly_symbol2scm ("volta"),
-		     gh_double2scm (h),
-		     gh_double2scm (w),
-		     gh_double2scm (t),
-		     gh_int2scm (no_vertical_start),
-		     gh_int2scm (no_vertical_end),
-		     SCM_UNDEFINED));
 
-  Box b (Interval (0, w), Interval (0, h));
-  Molecule mol (b, at);
+  Molecule start,end ;
+  if (!no_vertical_start)
+    start = Lookup::line (t, Offset (0,0), Offset (0, h)); 
+  
+  if (!no_vertical_end)
+    end = Lookup::line (t, Offset (w, 0), Offset (w,h));
+
+  Molecule mol = Lookup::line (t, Offset (0, h), Offset (w,h));
+  mol.add_molecule (start);
+  mol.add_molecule (end);
+  
   SCM text = me->get_grob_property ("text");
   SCM properties = scm_list_n (me->mutable_property_alist_,
 			       me->immutable_property_alist_,SCM_UNDEFINED);
diff -purN ../lilypond-1.5.49/ly/engraver-init.ly ./ly/engraver-init.ly
--- ../lilypond-1.5.49/ly/engraver-init.ly	Sat Mar 23 02:43:29 2002
+++ ./ly/engraver-init.ly	Tue Apr  2 00:48:01 2002
@@ -8,7 +8,6 @@ StaffContext=\translator {
 	\type "Engraver_group_engraver"
 	\name Staff 
 	\consists "Output_property_engraver"	
-	Generic_property_list = #generic-staff-properties
 	
 	\consists "Bar_engraver"
  % Bar_engraver must be first so default bars aren't overwritten
@@ -92,7 +91,7 @@ RhythmicStaffContext=\translator{
 	
 	\consists "Output_property_engraver"	
 
-	Generic_property_list = #generic-staff-properties
+
 	MinimumVerticalExtent = ##f
 	ExtraVerticalExtent = ##f
 	VerticalExtent = ##f 
@@ -122,7 +121,7 @@ VoiceContext = \translator {
 	\type "Engraver_group_engraver"
 	\name Voice
 
-	Generic_property_list = #generic-voice-properties
+
 	localKeySignature = #'()
 	\consists "Font_size_engraver"
 	
@@ -176,7 +175,7 @@ ThreadContext = \translator{
 	\consists "Rest_engraver"
 	\consists "Note_head_line_engraver"
 	\consists "Output_property_engraver"	
-	Generic_property_list = #generic-thread-properties
+
 }
 
 GrandStaffContext=\translator{
@@ -187,7 +186,7 @@ GrandStaffContext=\translator{
 	\consists "Span_arpeggio_engraver"
 	\consists "System_start_delimiter_engraver"
 	systemStartDelimiter = #'SystemStartBrace
-	Generic_property_list = #generic-grand-staff-properties
+
 	\accepts "Staff"
 }
 
@@ -272,7 +271,7 @@ LyricsContext = \translator {
 	\type "Engraver_group_engraver"
 	\name Lyrics
 	\consists Vertical_align_engraver %need this for getting folded repeats right.
-	Generic_property_list = #generic-lyrics-properties
+
 
 	\consistsend "Axis_group_engraver"
 	MinimumVerticalExtent = ##f
@@ -287,7 +286,7 @@ ChordNamesContext = \translator {
 	\type "Engraver_group_engraver"
 	\name ChordNames
 
-	Generic_property_list = #generic-chord-staff-properties
+
 
 
 	\consists "Output_property_engraver"	
@@ -377,13 +376,13 @@ ScoreContext = \translator {
 	centralCPosition = #-6
 	
         automaticPhrasing = ##t
-
+	
 	defaultBarType = #"|"
 
 	explicitClefVisibility = #all-visible
 	explicitKeySignatureVisibility = #all-visible
 	autoBeamSettings = #auto-beam-settings
-
+	autoBeaming = ##t
 	scriptDefinitions = #default-script-alist
 
 	verticalAlignmentChildCallback = #Align_interface::alignment_callback
diff -purN ../lilypond-1.5.49/ly/params-init.ly ./ly/params-init.ly
--- ../lilypond-1.5.49/ly/params-init.ly	Tue Mar 26 01:40:35 2002
+++ ./ly/params-init.ly	Tue Apr  2 00:48:01 2002
@@ -20,9 +20,9 @@ paperfile = \papersize + "-init.ly"
 
 unit = "mm"
 staffspace = \staffheight / 4.0
-stafflinethickness = \staffspace / 10.0
+linethickness = \staffspace / 10.0
 outputscale = \staffheight / 4.0
-ledgerlinethickness = 2.0 * \stafflinethickness
+ledgerlinethickness = 2.0 * \linethickness
 
 
 
diff -purN ../lilypond-1.5.49/ly/property-init.ly ./ly/property-init.ly
--- ../lilypond-1.5.49/ly/property-init.ly	Thu Mar 21 01:44:50 2002
+++ ./ly/property-init.ly	Tue Apr  2 00:48:01 2002
@@ -119,8 +119,8 @@ endincipit = \notes{
     \bar ""
 }
 
-autoBeamOff = \property Voice.noAutoBeaming = ##t
-autoBeamOn = \property Voice.noAutoBeaming = ##f
+autoBeamOff = \property Voice.autoBeaming = ##f
+autoBeamOn = \property Voice.autoBeaming = ##t
 
 emptyText = \property Voice.textNonEmpty = ##f
 fatText = \property Voice.textNonEmpty = ##t
diff -purN ../lilypond-1.5.49/mutopia/F.Schubert/standchen.ly ./mutopia/F.Schubert/standchen.ly
--- ../lilypond-1.5.49/mutopia/F.Schubert/standchen.ly	Tue Jul  3 13:54:38 2001
+++ ./mutopia/F.Schubert/standchen.ly	Tue Apr  2 00:48:01 2002
@@ -41,7 +41,7 @@ instrument = "Piano"
  footer = "Mutopia-2001/04/27-xx"
 } 
 
-\version "1.3.146"
+\version "1.5.49"
 
 dynamicUp = \property Voice.DynamicLineSpanner \override #'direction = #1
 dynamicRevert = \property Voice.DynamicLineSpanner \revert #'direction
@@ -376,7 +376,7 @@ lyricStaff = \context Lyrics {
 vocals = \context Voice \notes {
 	\clef treble
  	% certainly no auto-beaming for vocals
- 	\property Voice.noAutoBeaming = ##t
+ 	\property Voice.autoBeaming = ##f
 	\property Staff.automaticMelismata= ##t
 
 	\dynamicUp
diff -purN ../lilypond-1.5.49/ps/lilyponddefs.ps ./ps/lilyponddefs.ps
--- ../lilypond-1.5.49/ps/lilyponddefs.ps	Thu Mar 21 01:44:02 2002
+++ ./ps/lilyponddefs.ps	Tue Apr  2 00:48:01 2002
@@ -5,7 +5,7 @@
 % hmm
 % /setgray { 1 add } bind def
 
-/staff-line-thickness lilypondpaperstafflinethickness def
+/staff-line-thickness lilypondpaperlinethickness def
 /staff-height lilypondpaperstaffheight def
 /line-width lilypondpaperlinewidth def
 
@@ -56,7 +56,7 @@ output-scale output-scale scale
 	grestore
 } bind def
 
-/start-line % height
+/start-system % height
 {
 	dup base-line-skip gt {
 		/line-height exch def
@@ -72,7 +72,7 @@ output-scale output-scale scale
 	line-x line-y translate
 } bind def
 
-/stop-line
+/stop-system
 { 
 	/the-line exch def
 	the-line
diff -purN ../lilypond-1.5.49/ps/music-drawing-routines.ps ./ps/music-drawing-routines.ps
--- ../lilypond-1.5.49/ps/music-drawing-routines.ps	Sun Mar 17 19:38:01 2002
+++ ./ps/music-drawing-routines.ps	Tue Apr  2 00:48:01 2002
@@ -52,6 +52,33 @@
 	} ifelse
 } bind def
 
+/draw_round_box % breapth width depth height blot
+{
+	/blot exch def
+
+	0 setlinecap
+	blot setlinewidth
+	1 setlinejoin
+
+	blot 2 div sub /h exch def
+	blot 2 div sub /d exch def
+	blot 2 div sub /w exch def
+	blot 2 div sub /b exch def
+
+	b neg d neg moveto
+	b w add 0 rlineto
+	0 d h add rlineto
+	b w add neg 0 rlineto
+	0 d h add neg rlineto
+
+	currentdict /testing known {
+		%% outline only, for testing:
+		stroke
+	}{
+		closepath gsave stroke grestore fill
+	} ifelse
+} bind def
+
 % Nice beam with rounded corners
 /draw_beam % slope width thick 
 {
@@ -102,47 +129,6 @@
 	closepath fill
 } bind def
 
-/draw_hairpin % width start_h end_h thick
-{
-	1 setlinecap
-	1 setlinejoin
-
-	setlinewidth
-	/end_h exch def 
-	/start_h exch def
-	/wid exch def
-	0 start_h moveto
-	wid end_h lineto
-	stroke
-	0 start_h neg moveto
-	wid end_h neg lineto
-	stroke
-} bind def
-
-/draw_tuplet % height gap dx dy thick dir 
-{ 
-	1 setlinecap 
-	1 setlinejoin 
-
-	/dir exch def 
-	setlinewidth 
-	/tuplet_dy exch def 
-	/tuplet_dx exch def 
-	/tuplet_gapx exch def 
-	/tuplet_h exch def 
-	tuplet_dy tuplet_dx div tuplet_gapx mul /tuplet_gapy exch def 
-
-
-	0 tuplet_h neg dir mul moveto 
-	0 0 lineto  
-	tuplet_dx tuplet_gapx sub 2 div  
-		tuplet_dy tuplet_gapy sub 2 div  lineto 
-	tuplet_dx tuplet_gapx add 2 div  
-		tuplet_dy tuplet_gapy add 2 div  moveto 
-	tuplet_dx tuplet_dy lineto 
-	tuplet_dx tuplet_dy tuplet_h dir neg mul add lineto 
-	stroke 
-} bind def 
 
 /draw_ez_ball % ch letter_col ball_col font
 {
@@ -196,28 +182,6 @@
 	show
 } bind def
 
-/draw_volta % h w thick vert_start vert_end 
-{ 
-	1 setlinecap 
-	1 setlinejoin 
-
-	/vert_end exch def 
-	/vert_start exch def 
-	setlinewidth 
-	/volta_w exch def 
- 	/volta_h exch def 
-	vert_start 0 eq { 
-		0 0 moveto 
-		0 volta_h lineto 
-	} if 
-	0 volta_h moveto 
-	volta_w volta_h lineto 
-	vert_end 0 eq { 
-		volta_w 0 lineto 
-	} if 
-	stroke 
-} bind def 
-
 % this is for drawing slurs. 
 /draw_bezier_sandwich  % thickness controls 
 { 
diff -purN ../lilypond-1.5.49/scm/ascii-script.scm ./scm/ascii-script.scm
--- ../lilypond-1.5.49/scm/ascii-script.scm	Mon Mar 25 23:47:03 2002
+++ ./scm/ascii-script.scm	Tue Apr  2 00:48:01 2002
@@ -203,14 +203,14 @@
 	"")				; issue no command
     (func "select-font" (car name-mag-pair))))
 
-(define (start-line height)
-  (func "start-line" height))
+(define (start-system height)
+  (func "start-system" height))
 
-(define (stop-line)
-  (func "stop-line"))
+(define (stop-system)
+  (func "stop-system"))
 
-(define (stop-last-line)
-  (func "stop-line"))
+(define (stop-last-system)
+  (func "stop-system"))
 
 
 (define (text s)
@@ -218,21 +218,3 @@
 
 (define (tuplet ht gap dx dy thick dir) "")
 
-(define (volta h w thick vert-start vert-end)
-  ;; urg
-  (string-append
-   (func "set-line-char" "|")
-   (func "rmove-to" 0 -4)
-   ;; definition strange-way around
-   (if (= 0 vert-start)
-       (func "v-line" h)
-       "")
-   (func "rmove-to" 1 h)
-   (func "set-line-char" "_")
-   (func "h-line" (- w 1))
-   (func "set-line-char" "|")
-   (if (= 0 vert-end)
-       (string-append
-	(func "rmove-to" (- w 1) (* -1 h))
-	(func "v-line" (* -1 h)))
-       "")))
diff -purN ../lilypond-1.5.49/scm/basic-properties.scm ./scm/basic-properties.scm
--- ../lilypond-1.5.49/scm/basic-properties.scm	Sun Mar  3 03:32:46 2002
+++ ./scm/basic-properties.scm	Tue Apr  2 00:48:01 2002
@@ -10,10 +10,6 @@
 (define (end-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f)))
 
 
-(define mark-visibility end-of-line-invisible)
-
-
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; Bar lines.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff -purN ../lilypond-1.5.49/scm/font.scm ./scm/font.scm
--- ../lilypond-1.5.49/scm/font.scm	Thu Feb 21 13:28:42 2002
+++ ./scm/font.scm	Tue Apr  2 00:48:01 2002
@@ -90,7 +90,9 @@
     ((-2 medium italic roman 7) . "cmti7")
     ((-3 medium italic roman 7) . "cmti7")    
 
-    ((2 bold upright roman 12) . "cmbx12")
+    ((4 bold upright roman 17) . "cmbx17")
+    ((3 bold upright roman 17) . "cmbx17")
+    ((2 bold upright roman 14) . "cmbx14")
     ((1 bold upright roman 12) . "cmbx12")
     ((0 bold upright roman 10) . "cmbx10")
     ((-1 bold upright roman 8) . "cmbx8")
@@ -218,7 +220,12 @@
 	(mmrest . ((font-family . number) ))
 	(mmrest-symbol . ((font-family . music) ))
 
-	(mark . ((font-family . number) (font-relative-size . 1)))
+	(mark-number . ((font-family . number) (font-relative-size . 1)))
+	(mark-letter . ((font-family . roman)
+			(font-series . bold)
+			(font-shape . upright)
+			(font-relative-size . 2)))
+	
 	(script . ((font-family . roman) (font-relative-size . -1)))
 	(large . ((font-family . roman) (font-relative-size . 1)))
 	(Large . ((font-series . bold) (font-family . roman)
diff -purN ../lilypond-1.5.49/scm/generic-property.scm ./scm/generic-property.scm
--- ../lilypond-1.5.49/scm/generic-property.scm	Mon Sep 10 12:30:19 2001
+++ ./scm/generic-property.scm	Thu Jan  1 01:00:00 1970
@@ -1,312 +0,0 @@
-
-
-
-
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; DEPRECATED -- DO NOT UPDATE ! -- DO NOT USE !
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-
-;
-; Format: 
-; (cons 'Type name
-;    (list PROPERTYDESCRIPTIONS))
-; 
-; where
-; PROPERTYDESCRIPTION
-; is
-;
-;  (list 'translatorPropertySymbol type-predicate backend-property-symbol)
-;
-; Descriptions earlier in the list take precedence over later descriptions.
-;
-
-
-(define generic-beam-properties
-  (cons 'beam-interface
-	(list
-	 (list 'beamSlopeDamping number? 'damping)
-	 (list 'autoKneeGap number? 'auto-knee-gap)
-	 (list 'autoInterstaffKneeGap number? 'auto-interstaff-knee-gap)
-	 (list 'beamDirAlgorithm symbol? 'beam-dir-algorithm)
-	 (list 'beamHeight number? 'height)
-	 (list 'beamVerticalPosition number? 'staff-position)
-	 )
-	)
-  )
-
-
-(define generic-stem-properties
-  (cons 'stem-interface
-	(list
-	 (list 'stemVerticalDirection dir? 'direction)
-	 (list 'verticalDirection dir? 'direction)	 
-	 (list 'stemLength number? 'length)
-	 (list 'flagStyle string? 'flag-style)
-	 (list 'style symbol? 'style)
-	 (list 'noStemExtend boolean? 'no-stem-extend)
-	 (list 'stemShorten number? 'shorten)
-	 ))
-  )
-
-(define generic-dot-properties
-  (cons 'dot-interface
-	(list
-		(list 'dotDirection dir? 'direction)
-		(list 'verticalDirection dir? 'direction)
-		)
-	))
-
-(define generic-script-properties
-  (cons 'script-interface
-	(list
-		  (list 'articulationScriptVerticalDirection dir? 'direction)
-		  (list 'articulationScriptPadding number? 'padding)
-
-		  ))
-  )
-
-
-
-(define generic-text-properties
-  (cons 'text-item-interface
-	(list
-		     (list 'textStyle string? 'style)
-		     (list 'lyricAlignment dir? 'self-alignment-X)
-		     (list 'textScriptPadding number? 'padding)
-		     (list 'textVerticalAlignment dir? 'self-alignment-Y)
-		     (list 'textHorizontalAlignment dir? 'self-alignment-X)
-		     (list 'textScriptWordSpace number? 'word-space)
-		     )
-	))
-
-(define generic-sustain-pedal-properties
-  (cons 'sustain-pedal-interface
-	(list
-	 (list 'sustainPedalPadding number? 'padding))))
-
-(define generic-chord-name-properties
-  (cons 'chord-name-interface
-	(list
-	 (list 'textScriptWordSpace number? 'word-space)
-	 (list 'chordNameWordSpace number? 'word-space)
-	 (list 'chordNameStyle string? 'style))))
-
-(define generic-crescendo-properties
-  (cons 'crescendo-interface
-	(list
-	 (list 'dynamicDirection dir? 'direction)
-	 (list 'verticalDirection dir? 'direction)
-	 (list 'dynamicPadding number? 'padding) 
-	 (list 'dynamicMinimumSpace number? 'minimum-space) 
-	 )))
-
-(define generic-dynamic-line-spanner-properties
-  (cons 'dynamic-interface
-	(list
-		     (list 'dynamicDirection dir? 'direction)
-		     (list 'verticalDirection dir? 'direction)
-		     (list 'dynamicPadding number? 'padding) 
-		     (list 'dynamicMinimumSpace number? 'minimum-space) 
-		     )))
-  
-(define generic-volta-spanner-properties
-  (cons 'volta-spanner-interface (list
-		     (list 'voltaVerticalDirection dir? 'direction)
-		     (list 'voltaPadding number? 'padding) 
-		     (list 'voltaMinimumSpace number? 'minimum-space) 
-		     )))
-  
-(define generic-bar-properties
-  (cons 'staff-bar-interface
-	(list
-	 (list 'barSize number? 'bar-size))
-	)
-  )	
-
-(define generic-bar-number-properties
-  (cons 'bar-number-interface
-	(list
-	 (list 'barNumberScriptPadding number? 'padding)
-	 (list 'barNumberDirection dir? 'direction)	 
-	 )
-	
-	)
-  )
-
-  
-; don't do this yet. Depends on whennn the staff is really announced
-(define generic-staff-symbol-properties
-  (cons 'staff-symbol-interface
-	(list
-	 )
-	)
-  )
-
-(define generic-breathing-sign-properties
-  (cons 'breathing-sign-interface
-	(list
-	 (list 'breathingSignVerticalDirection dir? 'direction)
-	 (list 'verticalDirection dir? 'direction)
-	 )))
-
-(define generic-clef-properties
-  (cons 'clef-interface
-	(list
-	 (list 'clefStyle string? 'style))
-	)
-  )
-
-(define generic-All-properties
-  (cons 'all
-	(list (list 'fontSize number? 'font-relative-size))))
-
-
-(define generic-notehead-properties
-  (cons 'note-head-interface
-	(list (list 'noteHeadStyle symbol? 'style))))
-
-(define generic-notename-properties
-  (cons 'note-name-interface
-	(list (list 'noteNameStyle symbol? 'style))))
-
-
-(define generic-porrectus-properties
-  (cons 'porrectus-interface
-	(list
-	 (list 'porrectusStyle symbol? 'style)
-	 (list 'porrectusSolid boolean? 'solid)
-	 (list 'porrectusAddStem boolean? 'add-stem)
-	 (list 'porrectusStemDirection dir? 'stem-direction)
-	 )))
-
-
-(define generic-rest-properties
-  (cons 'rest-interface
-	(list (list 'restStyle string? 'reststyle))))
-
-(define generic-rest-collision-properties
-  (cons 'rest-collision-interface
-	(list (list 'maximumRestCount number? 'maximum-rest-count))))
-
-(define generic-tie-properties
-  (cons 'tie-interface
-	(list
-	       (list 'tieVerticalDirection dir? 'direction)
-	       (list 'verticalDirection dir? 'direction)
-(list 'tieDash number? 'dashed)
-  )))
-
-(define generic-tie-column-properties
-  (cons 'tie-column-interface (list
-		      (list 'tieVerticalDirection dir? 'direction)
-		      (list 'verticalDirection dir? 'direction)
-  )))
-
-(define generic-note-column-properties
-  (cons 'note-column-interface
-	(list
-	 (list 'horizontalNoteShift number? 'horizontal-shift)
-	 (list 'forceHorizontalShift number? 'force-hshift)
-	 )))
-
-(define generic-collision-properties
-  (cons 'collision-interface
-	(list
-	 (list 'collisionMergeDotted boolean? 'merge-differently-dotted)
-	 )
-	)
-  )
-  
-(define generic-slur-properties
-  (cons 'slur-interface
-	(list
-	 (list 'slurVerticalDirection dir? 'direction)
-	 (list 'verticalDirection dir? 'direction)	 
-	 (list 'slurDash number? 'dashed))))
-
-(define generic-timesig-properties
-  (cons 'time-signature-interface
-	(list
-	 (list 'timeSignatureStyle string? 'style))))
-
-(define (symbol-or-boolean? s)
-  (or (boolean? s) (symbol? s)))
-
-(define generic-tuplet-spanner-properties
-  (cons 'tuplet-spanner-interface
-	(list
-	 (list 'tupletDirection dir? 'direction)
-	 (list 'tupletNumberVisibility symbol-or-boolean? 'tuplet-number-visibility)
-	 (list 'tupletBracketVisibility symbol-or-boolean? 'tuplet-bracket-visibility)
-	))
-)
-
-
-
-
-
-;;;;;;;;;;
-;; don't forget to add these to the Generic_property_list property in
-;; engraver.ly
-
-(define generic-voice-properties
-  (list
-   generic-stem-properties
-   generic-breathing-sign-properties
-   generic-crescendo-properties
-   generic-dynamic-line-spanner-properties
-   generic-tie-properties
-   generic-tie-column-properties   
-   generic-tuplet-spanner-properties
-   generic-notehead-properties
-   generic-porrectus-properties
-   generic-rest-properties
-   generic-slur-properties
-   generic-beam-properties
-   generic-text-properties
-   generic-sustain-pedal-properties
-   generic-note-column-properties
-   generic-script-properties
-   generic-All-properties
-   ))
-
-(define generic-grace-properties generic-voice-properties)
-(define generic-staff-properties
-  (list
-   generic-text-properties   
-   generic-bar-properties
-   generic-timesig-properties
-   generic-clef-properties
-   generic-collision-properties
-   generic-sustain-pedal-properties
-   generic-rest-collision-properties
-   generic-volta-spanner-properties
-;   generic-staff-symbol-properties
-   generic-All-properties      
-   )
-  )
-(define generic-grand-staff-properties
-  (list
-   generic-text-properties   
-   generic-bar-properties
-   ))
-
-(define generic-thread-properties
-  (list generic-All-properties
-        generic-notehead-properties
-	generic-dot-properties
-	)
-
-  )
-   
-(define generic-lyrics-properties
-  (list generic-text-properties
-  )
-)
-
-(define generic-chord-staff-properties
-  (list generic-chord-name-properties
-  )
-)
diff -purN ../lilypond-1.5.49/scm/grob-description.scm ./scm/grob-description.scm
--- ../lilypond-1.5.49/scm/grob-description.scm	Fri Mar 29 14:13:42 2002
+++ ./scm/grob-description.scm	Tue Apr  2 00:48:01 2002
@@ -101,6 +101,7 @@
 	;; todo: clean this up a bit: the list is getting
 	;; rather long.
 	(molecule-callback . ,Beam::brew_molecule)
+	(concaveness-gap . 2.0)
 	(concaveness-threshold . 0.08)
 	(positions . (#f . #f))
 	(position-callbacks . (,Beam::least_squares
@@ -417,9 +418,6 @@
 
 	(direction . 1)
 	(breakable . #t)
-	(font-family . roman)
-	(font-shape . upright)
-	(font-relative-size . 1)
 	(visibility-lambda . ,end-of-line-invisible)
 	(padding . 0.8)
 	(meta . ((interfaces . (text-interface font-interface mark-interface side-position-interface))))
@@ -432,8 +430,11 @@
 	(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
 	(staff-position . 0)
 	(expand-limit . 10)
+	(number-threshold . 0)
+	(padding . 1)
 	(thickness . 6.6)
 	(font-family . number)
+	(padding . 1)
 	(meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface))))
 	))
 
@@ -648,12 +649,9 @@
     (SpacingSpanner
      . (
 	(spacing-procedure .  ,Spacing_spanner::set_springs)
-	(grace-space-factor . 0.5)
-
+	(grace-space-factor . 0.6)
 	(shortest-duration-space . 2.0)
 	(spacing-increment . 1.2)
-	
-
 	(meta . ((interfaces . (spacing-spanner-interface))))
 	))
 
@@ -706,7 +704,6 @@
     (StaffSymbol
      . (
 	(molecule-callback . ,Staff_symbol::brew_molecule)
-	(staff-space . 1.0)
 	(line-count . 5)
 	(layer . 0)
 	(meta . ((interfaces . (staff-symbol-interface))))
@@ -913,12 +910,15 @@
 
     (TupletBracket
      . (
-	(number-gap . 2.0)   
-	(thick . 1.0)
+	(gap . 2.0)
+	(padding . 0.9)
+	(thickness . 1.6)
+	(before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
 	(after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
 	(molecule-callback . ,Tuplet_bracket::brew_molecule)
 	(font-family . roman)
 	(font-shape . italic)
+
 	(font-relative-size . -1)
 	(meta .  ((interfaces . (text-interface tuplet-bracket-interface font-interface))))
 	))
diff -purN ../lilypond-1.5.49/scm/grob-property-description.scm ./scm/grob-property-description.scm
--- ../lilypond-1.5.49/scm/grob-property-description.scm	Thu Mar 28 01:40:24 2002
+++ ./scm/grob-property-description.scm	Tue Apr  2 00:55:07 2002
@@ -68,6 +68,7 @@ In the case of alignment grobs, this sho
 (grob-property-description 'bass list? " musical-pitch, optional.")
 (grob-property-description 'beam ly-grob? "pointer to the beam, if applicable.")
 (grob-property-description 'beam-thickness number? "thickness, measured in staffspace.")
+(grob-property-description 'beam-space (or number? list?) "the vertical distance between two beams, indexed by multiplicity")
 (grob-property-description 'beam-width number? "width of the tremolo sign.")
 (grob-property-description 'beamed-lengths list? "list of stem lengths given beam multiplicity .")
 (grob-property-description 'beamed-minimum-lengths list? "list of minimum stem lengths given beam multiplicity.")
@@ -90,6 +91,9 @@ column as start/begin point. Only column
 (grob-property-description 'center-element ly-grob? "grob which will
 be at the center of the group after aligning (when using
 Align_interface::center_on_element). .")
+(grob-property-description 'concaveness-gap number? "A beam is
+considered to be concave if the distance of an inner notehead to the
+line between two outer noteheads is bigger than this gap.")
 (grob-property-description 'concaveness-threshold number? "A beam is
 considered to be concave is concaveness is bigger than this threshold.
 Concaveness is calculated as the sum of the vertical distances of
@@ -99,7 +103,7 @@ square of the inner notes involved.")
 (grob-property-description 'bar-line-collapse-height number? "Minimum height of system start delimiter bar-line glyphs.  If equal or smaller, the bar-line is removed.")
 (grob-property-description 'brace-collapse-height number? "Minimum height of system start delimiter brace glyphs.  If equal or smaller, the brace is removed.")
 (grob-property-description 'bracket-collapse-height number? "Minimum height of system start delimiter bracket glyphs.  If equal or smaller, the bracket is removed.")
-(grob-property-description 'columns list? "list of grobs, typically containing paper-columns, list of note-columns.")
+(grob-property-description 'columns list? "list of grobs, typically containing paper-columns.")
 (grob-property-description 'control-points list? "List of 4 offsets (number-pairs) that form control points for the  tie/slur shape.")
 (grob-property-description 'damping integer? "amount of beam slope damping should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams .")
 (grob-property-description 'dash-length number? "the length of a dash.")
@@ -109,8 +113,6 @@ square of the inner notes involved.")
 
 (grob-property-description 'neutral-direction dir? "Where to go if we're on the neutral position of the staff (by default, the middle of the staff; see also grob-property neutral-position).  [Ross] has the following to say about this: Some engravers consider the middle line neutral, and take the option of using either up- or down-stems for notes that fall on it. However, more up-to-date engraving no longer permits an option; now a down-stem is always appropriate.")
 (grob-property-description 'neutral-position number? "Position (in half staff spaces) where to flip the direction of stems: by default, custodes above this position get their stems downwards; custodes below this position get their stems upwards.  A value of 0 designates the center of the staff.  Use property neutral-direction to control the behaviour of stems on the neutral position itself.  (Note: currently, neutral-position is supported only for custodes; for stems of note heads, neutral-position is currently fixed to 0, i.e. the middle of the staff.)")
-
-(grob-property-description 'delta-y number? "amount of ascension.")
 (grob-property-description 'dependencies list? "list of score-grob pointers that indicate who to compute first for certain global passes.")
 (grob-property-description 'details list? "alist of parameters for detailed grob behavior.")
 (grob-property-description 'dir-forced boolean? "set if direction has been forced; read by Beam.")
@@ -194,7 +196,6 @@ FIXME: in Tie this is a pair of grob poi
 (grob-property-description 'ideal-distances list? "(OBJ . (DIST . STRENGTH)) pairs.")
 (grob-property-description 'interfaces list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.")
 (grob-property-description 'inversion list? " musical-pitch, optional.")
-(grob-property-description 'invisible-staff boolean? "is staff invisible?")
 (grob-property-description 'items-worth-living list? "list of interesting items. If empty in a particular system, clear that system.")
 (grob-property-description 'kern number? "amount of extra white space to add.
 
@@ -203,6 +204,8 @@ For text,  this is `relative'(?) to the 
 For barline, space after a thick line.")
 (grob-property-description 'layer number? "The output layer [0..2].  The default is 1.")
 
+(grob-property-description 'left-position number? "position of left part of spanner.")
+(grob-property-description 'right-position number? "position of right part of spanner.")
 (grob-property-description 'left-padding number? "space left of accs.")
 (grob-property-description 'right-head ly-grob? "")
 (grob-property-description 'left-head ly-grob? "")
@@ -254,7 +257,7 @@ FIXME: also pair? (cons LEFT RIGHT)
 (grob-property-description 'non-default boolean? "not set because of existence of a bar?.")
 (grob-property-description 'note-width number? "unit for horizontal translation, measured in staff-space.")
 (grob-property-description 'note-heads list? "List of note head grobs")
-(grob-property-description 'number-gap number? "size of the gap for tohe number in a tuplet.")
+(grob-property-description 'number-threshold number? "only put numbers bigger than this threshold over multi measuer rest.")
 (grob-property-description 'old-accidentals list? "list of (pitch, accidental) pairs.")
 (grob-property-description 'padding number? "add this much extra space between objects that are next to each other.")
 (grob-property-description 'paren-cautionaries boolean? "Whether to add parenthesis around cautionary accidentals.")
@@ -375,7 +378,6 @@ The following abbreviations are currentl
 @end table
 .")
 (grob-property-description 'text-start boolean? "Indicator for whether a piano pedal bracket has leading text, such as Ped.")
-(grob-property-description 'thick number? "thickness, in stafflinethickness.")
 (grob-property-description 'thick-thickness number? "thickness, measured in stafflinethickness.")
 (grob-property-description 'thickness number? "thickness, measured in stafflinethickness.")
 (grob-property-description 'thin-kern number? "space after a hair-line.")
@@ -386,13 +388,13 @@ The following abbreviations are currentl
 same as setting molecule-callback to #f, but this retains the
 dimensions of this grob, which means that you can erase grobs
 individually. .")
-(grob-property-description 'tuplet-bracket-visibility boolean-or-symbol? "
+(grob-property-description 'bracket-visibility boolean-or-symbol? "
 This controls the visibility of the tuplet bracket.
 Setting it to false will prevent printing of the
 bracket. Setting the property to #'if-no-beam will make it
 print only if there is no beam associated with this tuplet bracket.")
-(grob-property-description 'tuplet-number-visibility boolean-or-symbol? "
-Like @code{tuplet-bracket-visibility}, but for the number.")
+(grob-property-description 'number-visibility boolean-or-symbol? "
+Like @code{bracket-visibility}, but for the number.")
 (grob-property-description 'type symbol? "one of: line, dashed-line or dotted-line.")
 (grob-property-description 'visibility-lambda procedure? "a function that takes the break direction and returns a  cons of booleans containing (TRANSPARENT . EMPTY).")
 (grob-property-description 'when moment? "when does this column happen?.")
@@ -438,8 +440,11 @@ columns.
 (grob-property-description 'chord pair? "?")
 (grob-property-description 'begin-of-line-visible boolean? "?")
 
-(grob-property-description 'quant-score number? "Beam quanting score")
-
+(grob-property-description 'quant-score number? "Beam quanting score
+-- can be stored for debugging")
 (grob-property-description 'least-squares-dy number? 
  "ideal beam slope, without damping.")
 (grob-property-description 'stem-info pair? "caching of stem parameters")
+(grob-property-description 'note-columns pair? "list of NoteColumn grobs.")
+
+(grob-property-description 'if-text-padding number? "padding in case texts are there.")
diff -purN ../lilypond-1.5.49/scm/lily.scm ./scm/lily.scm
--- ../lilypond-1.5.49/scm/lily.scm	Fri Mar  1 01:41:05 2002
+++ ./scm/lily.scm	Tue Apr  2 00:48:01 2002
@@ -174,7 +174,6 @@
 	   "music-functions.scm"
 	   "music-property-description.scm"
 	   "auto-beam.scm"
-	   "generic-property.scm"
 	   "basic-properties.scm"
 	   "chord-name.scm"
 	   "grob-description.scm"
diff -purN ../lilypond-1.5.49/scm/pdf.scm ./scm/pdf.scm
--- ../lilypond-1.5.49/scm/pdf.scm	Mon Mar 25 23:47:03 2002
+++ ./scm/pdf.scm	Tue Apr  2 00:48:01 2002
@@ -4,138 +4,143 @@
 ;;; 
 ;;; (c) 2001 Stephen Peters <portnoy@portnoy.org>
 
-; currently no font commands; this is a helper for pdftex.scm.
 
-(define (pdf-scm action-name)
-  ; simple commands to store and update currentpoint.  This makes the
-  ; other procedures simple rewrites of the PostScript code.
-  (define currentpoint (cons 0 0))
-  (define (showcp) 
-    (string-append (ly-number->string (car currentpoint)) " " 
-		   (ly-number->string (cdr currentpoint)) " "))
-  (define (moveto x y)
-    (set! currentpoint (cons x y))
-    (string-append (showcp) "m "))
-  (define (moveto-pair pair)
-    (moveto (car pair) (cdr pair)))
-  (define (rmoveto x y)
-    (moveto (+ x (car currentpoint)) (+ y (cdr currentpoint))))
-  (define (lineto x y)
-    (set! currentpoint (cons x y))
-    (string-append (showcp) "l "))
-  (define (lineto-pair pair)
-    (lineto (car pair) (cdr pair)))
-  (define (rlineto x y)
-    (lineto (+ x (car currentpoint)) (+ y (cdr currentpoint))))
-  (define (curveto x1 y1 x2 y2 x y)
-    (set! currentpoint (cons x y))
-    (string-append (ly-number->string x1) (ly-number->string y1)
-		   (ly-number->string x2) (ly-number->string y2)
-		   (ly-number->string x) (ly-number->string y) "c "))
-  (define (curveto-pairs pt1 pt2 pt)
-    (curveto (car pt1) (cdr pt1) (car pt2) (cdr pt2) (car pt) (cdr pt)))
-  (define (closefill) "h f ")
-  (define (closestroke) "S ")
-  (define (setlinewidth w) (string-append (ly-number->string w) "w "))
-  (define (setgray g) (string-append (ly-number->string g) "g "))
-  (define (setlineparams) "1 j 1 J ")
-  
-  (define (beam width slope thick)
-    (let ((ht (* slope width)))
-      (string-append (moveto 0 (- (/ thick 2)))
-		     (rlineto width ht)
-		     (rlineto 0 thick)
-		     (lineto 0 (/ thick 2))
-		     (closefill))))
-
-  (define (comment s) 
-    (string-append "% " s "\n"))
-
-  (define (brack-traject pair ds alpha)
-    (let ((alpha-rad (* alpha (/ 3.141592654 180))))
-      (cons (+ (car pair) (* (cos alpha-rad) ds))
-	    (+ (cdr pair) (* (sin alpha-rad) ds)))))
-    
-  (define (bracket arch_angle arch_width arch_height height arch_thick thick)
-    (let* ((halfht (+ (/ height 2) thick))
-	   (farpt (cons (+ thick arch_height) 
-			(+ (- halfht arch_thick) arch_width)))
-	   (halfbrack 
-	    (string-append (moveto 0 0)
-			   (lineto thick 0)
-			   (lineto thick (- halfht arch_thick))
-			   (curveto-pairs
-			    (brack-traject (cons thick 
-						 (- halfht arch_thick))
-					   (* 0.4 arch_height) 0)
-			    (brack-traject farpt 
-					   (* -0.25 arch_height) 
-					   arch_angle)
-			    farpt)
-			   (curveto-pairs 
-			    (brack-traject farpt
-					   (* -0.15 arch_height)
-					   arch_angle)
-			    (brack-traject (cons (/ thick 2) halfht)
-					   (/ arch_height 2) 0)
-			    (cons 0 halfht))
-			   (lineto 0 0)
-			   (closefill))))
-      (string-append (setlinewidth (/ thick 2))
-		     (setlineparams)
-		     "q 1 0 0 -1 0 0 cm " ; flip coords
-		     halfbrack
-		     "Q " ; grestore
-		     halfbrack)))
-  
-  (define (char i)
-    (invoke-char " show" i))
-
-  (define (hairpin thick width starth endh )
-    (string-append (setlinewidth thick)
-		   (moveto 0 starth)
-		   (lineto width endh)
-		   (moveto 0 (- starth))
-		   (lineto width (- endh))
-		   (closestroke)))
-
-  (define (dashed-slur thick dash l)
-    (string-append (setlineparams)
-		   "[ " (ly-number->string dash) " "
-		   (ly-number->string (* 10 thick)) " ] 0 d "
-		   (setlinewidth thick)
-		   (moveto-pair (car l))
-		   (apply curveto (cdr l))
-		   (closestroke)))
-		   
-  (define (dashed-line thick on off dx dy)
-    (string-append (setlineparams)
-		   "[ " (ly-number->string on) " "
-		   (ly-number->string off) " ] 0 d "
-		   (setlinewidth thick)
-		   (moveto 0 0)
-		   (lineto dx dy)
-		   (closestroke)))
-
-  (define (repeat-slash width slope beamthick)
-    (let* ((height (/ beamthick slope))
-	   (xwid (sqrt (+ (* beamthick beamthick) (* height height)))))
-      (string-append (moveto 0 0)
-		     (rlineto xwid 0)
-		     (rlineto width (* slope width))
-		     (rlineto (- xwid) 0)
-		     (closefill))))
-
-  (define (end-output) "")
-  
-  (define (experimental-on) "")
-  
-  (define (filledbox breadth width depth height) 
-    (string-append (ly-number->string (- breadth))
-		   (ly-number->string (- depth))
-		   (ly-number->string (+ breadth width))
-		   (ly-number->string (+ depth height))
-		   " re f "))
+;currently no font commands; this is a helper for pdftex.scm.
+
+(define-module (scm pdf)
+  )
+
+
+(define this-module (current-module))
+
+(use-modules
+ (guile)
+ )
+
+
+
+					; simple commands to store and update currentpoint.  This makes the
+					; other procedures simple rewrites of the PostScript code.
+(define currentpoint (cons 0 0))
+(define (showcp) 
+  (string-append (ly-number->string (car currentpoint)) " " 
+		 (ly-number->string (cdr currentpoint)) " "))
+(define (moveto x y)
+  (set! currentpoint (cons x y))
+  (string-append (showcp) "m "))
+(define (moveto-pair pair)
+  (moveto (car pair) (cdr pair)))
+(define (rmoveto x y)
+  (moveto (+ x (car currentpoint)) (+ y (cdr currentpoint))))
+(define (lineto x y)
+  (set! currentpoint (cons x y))
+  (string-append (showcp) "l "))
+(define (lineto-pair pair)
+  (lineto (car pair) (cdr pair)))
+(define (rlineto x y)
+  (lineto (+ x (car currentpoint)) (+ y (cdr currentpoint))))
+(define (curveto x1 y1 x2 y2 x y)
+  (set! currentpoint (cons x y))
+  (string-append (ly-number->string x1) (ly-number->string y1)
+		 (ly-number->string x2) (ly-number->string y2)
+		 (ly-number->string x) (ly-number->string y) "c "))
+(define (curveto-pairs pt1 pt2 pt)
+  (curveto (car pt1) (cdr pt1) (car pt2) (cdr pt2) (car pt) (cdr pt)))
+(define (closefill) "h f ")
+(define (closestroke) "S ")
+(define (setlinewidth w) (string-append (ly-number->string w) "w "))
+(define (setgray g) (string-append (ly-number->string g) "g "))
+(define (setlineparams) "1 j 1 J ")
+
+(define (beam width slope thick)
+  (let ((ht (* slope width)))
+    (string-append (moveto 0 (- (/ thick 2)))
+		   (rlineto width ht)
+		   (rlineto 0 thick)
+		   (lineto 0 (/ thick 2))
+		   (closefill))))
+
+(define (comment s) 
+  (string-append "% " s "\n"))
+
+(define (brack-traject pair ds alpha)
+  (let ((alpha-rad (* alpha (/ 3.141592654 180))))
+    (cons (+ (car pair) (* (cos alpha-rad) ds))
+	  (+ (cdr pair) (* (sin alpha-rad) ds)))))
+
+(define (bracket arch_angle arch_width arch_height height arch_thick thick)
+  (let* ((halfht (+ (/ height 2) thick))
+	 (farpt (cons (+ thick arch_height) 
+		      (+ (- halfht arch_thick) arch_width)))
+	 (halfbrack 
+	  (string-append (moveto 0 0)
+			 (lineto thick 0)
+			 (lineto thick (- halfht arch_thick))
+			 (curveto-pairs
+			  (brack-traject (cons thick 
+					       (- halfht arch_thick))
+					 (* 0.4 arch_height) 0)
+			  (brack-traject farpt 
+					 (* -0.25 arch_height) 
+					 arch_angle)
+			  farpt)
+			 (curveto-pairs 
+			  (brack-traject farpt
+					 (* -0.15 arch_height)
+					 arch_angle)
+			  (brack-traject (cons (/ thick 2) halfht)
+					 (/ arch_height 2) 0)
+			  (cons 0 halfht))
+			 (lineto 0 0)
+			 (closefill))))
+    (string-append (setlinewidth (/ thick 2))
+		   (setlineparams)
+		   "q 1 0 0 -1 0 0 cm " ; flip coords
+		   halfbrack
+		   "Q " ; grestore
+		   halfbrack)))
+
+(define (char i)
+  (invoke-char " show" i))
+
+
+(define (dashed-slur thick dash l)
+  (string-append (setlineparams)
+		 "[ " (ly-number->string dash) " "
+		 (ly-number->string (* 10 thick)) " ] 0 d "
+		 (setlinewidth thick)
+		 (moveto-pair (car l))
+		 (apply curveto (cdr l))
+		 (closestroke)))
+
+(define (dashed-line thick on off dx dy)
+  (string-append (setlineparams)
+		 "[ " (ly-number->string on) " "
+		 (ly-number->string off) " ] 0 d "
+		 (setlinewidth thick)
+		 (moveto 0 0)
+		 (lineto dx dy)
+		 (closestroke)))
+
+(define (repeat-slash width slope beamthick)
+  (let* ((height (/ beamthick slope))
+	 (xwid (sqrt (+ (* beamthick beamthick) (* height height)))))
+    (string-append (moveto 0 0)
+		   (rlineto xwid 0)
+		   (rlineto width (* slope width))
+		   (rlineto (- xwid) 0)
+		   (closefill))))
+
+(define (end-output) "")
+
+(define (experimental-on) "")
+
+(define (filledbox breadth width depth height) 
+  (string-append (ly-number->string (- breadth))
+		 (ly-number->string (- depth))
+		 (ly-number->string (+ breadth width))
+		 (ly-number->string (+ depth height))
+		 " re f "))
 
 ;; TODO:
 ;;
@@ -158,150 +163,72 @@
 ;;
 ;; WORKAROUND:
 ;;
-  (define (roundfilledbox breadth width depth height) 
-    (filledbox breadth width depth height))
+(define (roundfilledbox breadth width depth height) 
+  (filledbox breadth width depth height))
 ;;
 
-  (define (font-def i s) "")
+(define (font-def i s) "")
 
-  (define (font-switch i) "")
+(define (font-switch i) "")
 
-  (define (header-end) "")
-  
-  (define (lily-def key val) "")
-
-  (define (header creator generate) "")
-  
-  (define (invoke-char s i)
-    (string-append 
-     "(\\" (inexact->string i 8) ") " s " " ))
-  
-  (define (placebox x y s) "")
-
-  (define (bezier-sandwich l thick)
-    (string-append (setlinewidth thick)
-		   (moveto-pair (list-ref l 7))
-		   (curveto-pairs (list-ref l 4)
-				  (list-ref l 5)
-				  (list-ref l 6))
-		   (lineto-pair (list-ref l 3))
-		   (curveto-pairs (list-ref l 0)
-				  (list-ref l 1)
-				  (list-ref l 2))
-		   "B "))
-
-  (define (start-line height) "")
-  
-  (define (stem breadth width depth height) 
-    (filledbox breadth width depth height))
+(define (header-end) "")
 
-  (define (stop-line) "")
+(define (lily-def key val) "")
 
-  (define (text s) "")
+(define (header creator generate) "")
+
+(define (invoke-char s i)
+  (string-append 
+   "(\\" (inexact->string i 8) ") " s " " ))
+
+(define (placebox x y s) "")
+
+(define (bezier-sandwich l thick)
+  (string-append (setlinewidth thick)
+		 (moveto-pair (list-ref l 7))
+		 (curveto-pairs (list-ref l 4)
+				(list-ref l 5)
+				(list-ref l 6))
+		 (lineto-pair (list-ref l 3))
+		 (curveto-pairs (list-ref l 0)
+				(list-ref l 1)
+				(list-ref l 2))
+		 "B "))
+
+(define (start-system height) "")
+
+(define (stem breadth width depth height) 
+  (filledbox breadth width depth height))
+
+(define (stop-system) "")
+
+(define (text s) "")
+
+
+(define (unknown) "\n unknown\n")
+
+					; Problem here -- we're using /F18 for the font, but we don't know
+					; for sure that that will exist.
+(define (ez-ball ch letter-col ball-col)
+  (let ((origin (cons 0.45 0)))
+    (string-append (setgray 0)
+		   (setlinewidth 1.1)
+		   (moveto-pair origin) (lineto-pair origin)
+		   (closestroke)
+		   (setgray ball-col)
+		   (setlinewidth 0.9)
+		   (moveto-pair origin) (lineto-pair origin)
+		   (closestroke)
+		   (setgray letter-col)
+		   (moveto-pair origin)
+		   "BT "
+		   "/F18 0.85 Tf "
+		   "-0.28 -0.30 Td " ; move for text block
+		   "[(" ch ")] TJ ET ")))
+
+(define (define-origin a b c ) "")
+(define (no-origin) "")
 
-  (define (volta h w thick vert_start vert_end)
-    (string-append (setlinewidth thick)
-		   (setlineparams)
-		   (if (= vert_start 0) 
-		       (string-append (moveto 0 0)
-				      (lineto 0 h))
-		       (moveto 0 h))
-		   (lineto w h)
-		   (if (= vert_end 0) (lineto w 0) "")
-		   (closestroke)))
-
-  (define (tuplet ht gap dx dy thick dir)
-    (let ((gapy (* (/ dy dx) gap)))
-      (string-append (setlinewidth thick)
-		     (setlineparams)
-		     (moveto 0 (- (* ht dir)))
-		     (lineto 0 0)
-		     (lineto (/ (- dx gap) 2)
-			     (/ (- dy gapy) 2))
-		     (moveto (/ (+ dx gap) 2)
-			     (/ (+ dy gapy) 2))
-		     (lineto dx dy)
-		     (lineto dx (- dy (* ht dir)))
-		     (closestroke))))
-
-  (define (unknown) "\n unknown\n")
-
-  ; Problem here -- we're using /F18 for the font, but we don't know
-  ; for sure that that will exist.
-  (define (ez-ball ch letter-col ball-col)
-    (let ((origin (cons 0.45 0)))
-      (string-append (setgray 0)
-		     (setlinewidth 1.1)
-		     (moveto-pair origin) (lineto-pair origin)
-		     (closestroke)
-		     (setgray ball-col)
-		     (setlinewidth 0.9)
-		     (moveto-pair origin) (lineto-pair origin)
-		     (closestroke)
-		     (setgray letter-col)
-		     (moveto-pair origin)
-		     "BT "
-		     "/F18 0.85 Tf "
-		     "-0.28 -0.30 Td " ; move for text block
-		     "[(" ch ")] TJ ET ")))
-
-  (define (define-origin a b c ) "")
-  (define (no-origin) "")
-  
-  ;; PS
-  (cond ((eq? action-name 'all-definitions)
-	 `(begin
-	    (define beam ,beam)
-	    (define tuplet ,tuplet)
-	    (define bracket ,bracket)
-	    (define char ,char)
-	    (define volta ,volta)
-	    (define bezier-sandwich ,bezier-sandwich)
-	    (define dashed-line ,dashed-line) 
-	    (define dashed-slur ,dashed-slur) 
-	    (define hairpin ,hairpin) 
-	    (define end-output ,end-output)
-	    (define experimental-on ,experimental-on)
-	    (define filledbox ,filledbox)
-	    (define roundfilledbox ,roundfilledbox)
-	    (define font-def ,font-def)
-	    (define font-switch ,font-switch)
-	    (define header-end ,header-end)
-	    (define lily-def ,lily-def)
-	    (define font-load-command ,font-load-command)
-	    (define header ,header) 
-	    (define invoke-char ,invoke-char) 
-
-	    (define placebox ,placebox)
-	    (define repeat-slash ,repeat-slash) 
-	    (define select-font ,select-font)
-	    (define start-line ,start-line)
-	    (define stem ,stem)
-	    (define stop-line ,stop-line)
-	    (define stop-last-line ,stop-line)
-	    (define text ,text)
-	    (define no-origin ,no-origin)
-	    (define define-origin ,define-origin)
-	    (define ez-ball ,ez-ball)
-	    ))
-	((eq? action-name 'tuplet) tuplet)
-	((eq? action-name 'beam) beam)
-	((eq? action-name 'bezier-sandwich) bezier-sandwich)
-	((eq? action-name 'bracket) bracket)
-	((eq? action-name 'char) char)
-	((eq? action-name 'dashed-line) dashed-line) 
-	((eq? action-name 'dashed-slur) dashed-slur) 
-	((eq? action-name 'hairpin) hairpin)
-	((eq? action-name 'experimental-on) experimental-on)
-	((eq? action-name 'ez-ball) ez-ball)	
-	((eq? action-name 'filledbox) filledbox)
-	((eq? action-name 'roundfilledbox) roundfilledbox)
-	((eq? action-name 'repeat-slash) repeat-slash)
-	((eq? action-name 'select-font) select-font)
-	((eq? action-name 'volta) volta)
-	(else (error "unknown tag -- PDF-SCM " action-name))
-	)
-  )
 
 (define (scm-pdf-output)
   (primitive-eval (pdf-scm 'all-definitions)))
diff -purN ../lilypond-1.5.49/scm/pdftex.scm ./scm/pdftex.scm
--- ../lilypond-1.5.49/scm/pdftex.scm	Mon Mar 25 23:47:03 2002
+++ ./scm/pdftex.scm	Tue Apr  2 00:48:01 2002
@@ -10,239 +10,170 @@
 
 ;; TODO: port this  to the new module framework.
 
-(define (pdftex-scm action-name)
-  (define (unknown) 
-    "%\n\\unknown%\n")
-
-
-  (define (select-font name-mag-pair)
-    (let*
-	(
-	 (c (assoc name-mag-pair font-name-alist))
-	 )
-
-      (if (eq? c #f)
-	  (begin
-	    (display "FAILED\n")
-	    (display (object-type (car name-mag-pair)))
-	    (display (object-type (caaar font-name-alist)))
-
-	    (ly-warn (string-append
-		      "Programming error: No such font known "
-		      (car name-mag-pair) " "
-		      (ly-number->string (cdr name-mag-pair))
-		      ))
-	    "") ; issue no command
-	  (string-append "\\" (cddr c)))
-      
-      
-      ))
-  
-  (define (beam width slope thick)
-    (embedded-pdf ((pdf-scm 'beam) width slope thick)))
-
-  (define (bracket arch_angle arch_width arch_height height arch_thick thick)
-    (embedded-pdf ((pdf-scm 'bracket) arch_angle arch_width arch_height height arch_thick thick)))
-
-  (define (dashed-slur thick dash l)
-    (embedded-pdf ((pdf-scm 'dashed-slur)  thick dash l)))
-
-  (define (hairpin thick w sh eh)
-    (embedded-pdf ((pdf-scm 'hairpin) thick w sh eh)))
-
-  (define (char i)
-    (string-append "\\char" (inexact->string i 10) " "))
-  
-  (define (dashed-line thick on off dx dy)
-    (embedded-pdf ((pdf-scm 'dashed-line) thick on off dx dy)))
-
-  (define (font-load-command name-mag command)
-    (string-append
-     "\\font\\" command "="
-     (car name-mag)
-     " scaled "
-     (ly-number->string (inexact->exact (* 1000  (cdr name-mag))))
-     "\n"))
-
-  (define (ez-ball c l b)
-    (embedded-pdf ((pdf-scm 'ez-ball) c  l b)))
-
-  (define (embedded-pdf s)
-    (string-append "\\embeddedpdf{ " s "}"))
-
-  (define (comment s)
-    (string-append "% " s))
-  
-  (define (end-output) 
+(define-module (scm pdftex))
+
+(define (unknown) 
+  "%\n\\unknown%\n")
+
+
+(define (select-font name-mag-pair)
+  (let*
+      (
+       (c (assoc name-mag-pair font-name-alist))
+       )
+
+    (if (eq? c #f)
 	(begin
-; uncomment for some stats about lily memory	  
-;		(display (gc-stats))
+	  (display "FAILED\n")
+	  (display (object-type (car name-mag-pair)))
+	  (display (object-type (caaar font-name-alist)))
+
+	  (ly-warn (string-append
+		    "Programming error: No such font known "
+		    (car name-mag-pair) " "
+		    (ly-number->string (cdr name-mag-pair))
+		    ))
+	  "") ; issue no command
+	(string-append "\\" (cddr c)))
+    
+    
+    ))
+
+(define (beam width slope thick)
+  (embedded-pdf ((pdf-scm 'beam) width slope thick)))
+
+(define (bracket arch_angle arch_width arch_height height arch_thick thick)
+  (embedded-pdf ((pdf-scm 'bracket) arch_angle arch_width arch_height height arch_thick thick)))
+
+(define (dashed-slur thick dash l)
+  (embedded-pdf ((pdf-scm 'dashed-slur)  thick dash l)))
+
+(define (char i)
+  (string-append "\\char" (inexact->string i 10) " "))
+
+(define (dashed-line thick on off dx dy)
+  (embedded-pdf ((pdf-scm 'dashed-line) thick on off dx dy)))
+
+(define (font-load-command name-mag command)
+  (string-append
+   "\\font\\" command "="
+   (car name-mag)
+   " scaled "
+   (ly-number->string (inexact->exact (* 1000  (cdr name-mag))))
+   "\n"))
+
+(define (ez-ball c l b)
+  (embedded-pdf ((pdf-scm 'ez-ball) c  l b)))
+
+(define (embedded-pdf s)
+  (string-append "\\embeddedpdf{ " s "}"))
+
+(define (comment s)
+  (string-append "% " s))
+
+(define (end-output) 
+  (begin
+					; uncomment for some stats about lily memory	  
+					;		(display (gc-stats))
     (string-append "\n\\EndLilyPondOutput"
-		   ; Put GC stats here.
+					; Put GC stats here.
 		   )))
-  
-  (define (experimental-on)
-    "")
-
-  (define (repeat-slash w a t)
-    (embedded-pdf ((pdf-scm 'repeat-slash) w a t)))
-  
-  (define (font-switch i)
-    (string-append
-     "\\" (font i) "\n"))
-
-  (define (font-def i s)
-    (string-append
-     "\\font" (font-switch i) "=" s "\n"))
-
-  (define (header-end)
-    (string-append
-     "\\input lilyponddefs\\newdimen\\outputscale \\outputscale=\\lilypondpaperoutputscale pt"
-     "\\turnOnPostScript"
-     "\\pdfcompresslevel=0"))
-
-  ;; Note: this string must match the string in ly2dvi.py!!!
-  (define (header creator generate) 
-    (string-append
-     "% Generated automatically by: " creator generate "\n"))
-
-  (define (invoke-char s i)
-    (string-append 
-     "\n\\" s "{" (inexact->string i 10) "}" ))
-
-  ;;
-  ;; need to do something to make this really safe.
-  ;;
-  (define (output-tex-string s)
-      (if security-paranoia
-	  (if use-regex
-	      (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
-	      (begin (display "warning: not paranoid") (newline) s))
-	  s))
-      
-  (define (lily-def key val)
-    (let ((tex-key
-	   (if use-regex
-	       (regexp-substitute/global 
-		#f "_" (output-tex-string key) 'pre "X" 'post)      
-	       (output-tex-string key)))
-	  (tex-val (output-tex-string val)))
-      (if (equal? (sans-surrounding-whitespace tex-val) "")
-	  (string-append "\\let\\" tex-key "\\undefined\n")
-	  (string-append "\\def\\" tex-key "{" tex-val "}\n"))))
-
-  (define (number->dim x)
-    (string-append
-     ;;ugh ly-* in backend needs compatibility func for standalone output
-     (ly-number->string x) " \\outputscale "))
-
-  (define (placebox x y s) 
-    (string-append 
-     "\\placebox{"
-     (number->dim y) "}{" (number->dim x) "}{" s "}\n"))
-
-  (define (bezier-sandwich l thick)
-    (embedded-pdf ((pdf-scm 'bezier-sandwich) l thick)))
-
-  (define (start-line ht)
-      (string-append"\\vbox to " (number->dim ht) "{\\hbox{%\n"))
-
-  (define (stop-line) 
-    "}\\vss}\\interscoreline\n")
-  (define (stop-last-line)
-    "}\\vss}")
-  (define (filledbox breapth width depth height) 
-    (string-append 
-     "\\kern" (number->dim (- breapth))
-     "\\vrule width " (number->dim (+ breapth width))
-     "depth " (number->dim depth)
-     "height " (number->dim height) " "))
-
-  (define (roundfilledbox x width y height blotdiam)
-    (embedded-pdf ((pdf-scm 'roundfilledbox) x width y height blotdiam)))
-
-  (define (text s)
-    (string-append "\\hbox{" (output-tex-string s) "}"))
-  
-  (define (tuplet ht gapx dx dy thick dir)
-    (embedded-pdf ((pdf-scm 'tuplet) ht gapx dx dy thick dir)))
-
-  (define (volta h w thick vert_start vert_end)
-    (embedded-pdf ((pdf-scm 'volta) h w thick vert_start vert_end)))
-
-  (define (define-origin file line col)
-    (if (procedure? point-and-click)
-	(string-append "\\special{src:\\string:"
-		       (point-and-click line col file)
-		       "}" )
-	"")
-    )
-
-  ; no-origin not supported in PDFTeX
-  (define (no-origin) "")
-
-  ;; The procedures listed below form the public interface of
-  ;; PDFTeX-scm.  (should merge the 2 lists)
-  (cond ((eq? action-name 'all-definitions)
-	 `(begin
-	    (define font-load-command ,font-load-command)
-	    (define beam ,beam)
-	    (define bezier-sandwich ,bezier-sandwich)
-	    (define bracket ,bracket)
-	    (define char ,char)
-	    (define dashed-line ,dashed-line) 
-	    (define dashed-slur ,dashed-slur) 
-	    (define hairpin ,hairpin)
-	    (define end-output ,end-output)
-	    (define experimental-on ,experimental-on)
-	    (define filledbox ,filledbox)
-	    (define font-def ,font-def)
-	    (define font-switch ,font-switch)
-	    (define header-end ,header-end)
-	    (define lily-def ,lily-def)
-	    (define ez-ball ,ez-ball)
-	    (define header ,header) 
-	    (define invoke-char ,invoke-char) 
-
-	    (define placebox ,placebox)
-	    (define select-font ,select-font)
-	    (define start-line ,start-line)
-	    (define stop-line ,stop-line)
-	    (define stop-last-line ,stop-last-line)
-	    (define text ,text)
-	    (define tuplet ,tuplet)
-	    (define volta ,volta)
-	    (define define-origin ,define-origin)
-	    (define no-origin ,no-origin)
-	    (define repeat-slash ,repeat-slash)
-	    ))
-
-	((eq? action-name 'beam) beam)
-	((eq? action-name 'tuplet) tuplet)
-	((eq? action-name 'bracket) bracket)
-	((eq? action-name 'hairpin) hairpin)
-	((eq? action-name 'dashed-line) dashed-line) 
-	((eq? action-name 'dashed-slur) dashed-slur) 
-	((eq? action-name 'end-output) end-output)
-	((eq? action-name 'experimental-on) experimental-on)
-	((eq? action-name 'font-def) font-def)
-	((eq? action-name 'font-switch) font-switch)
-	((eq? action-name 'header-end) header-end)
-	((eq? action-name 'lily-def) lily-def)
-	((eq? action-name 'header) header) 
-	((eq? action-name 'invoke-char) invoke-char) 
-
-	((eq? action-name 'placebox) placebox)
-	((eq? action-name 'bezier-sandwich) bezier-sandwich)
-	((eq? action-name 'start-line) start-line)
-	((eq? action-name 'stem) stem)
-	((eq? action-name 'stop-line) stop-line)
-	((eq? action-name 'stop-last-line) stop-last-line)
-	((eq? action-name 'volta) volta)
-	((eq? action-name 'repeat-slash) repeat-slash)
-	(else (error "unknown tag -- PDFTEX " action-name))
-	)
+
+(define (experimental-on)
+  "")
+
+(define (repeat-slash w a t)
+  (embedded-pdf ((pdf-scm 'repeat-slash) w a t)))
+
+(define (font-switch i)
+  (string-append
+   "\\" (font i) "\n"))
+
+(define (font-def i s)
+  (string-append
+   "\\font" (font-switch i) "=" s "\n"))
+
+(define (header-end)
+  (string-append
+   "\\input lilyponddefs\\newdimen\\outputscale \\outputscale=\\lilypondpaperoutputscale pt"
+   "\\turnOnPostScript"
+   "\\pdfcompresslevel=0"))
+
+;; Note: this string must match the string in ly2dvi.py!!!
+(define (header creator generate) 
+  (string-append
+   "% Generated automatically by: " creator generate "\n"))
+
+(define (invoke-char s i)
+  (string-append 
+   "\n\\" s "{" (inexact->string i 10) "}" ))
+
+;;
+;; need to do something to make this really safe.
+;;
+(define (output-tex-string s)
+  (if security-paranoia
+      (if use-regex
+	  (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
+	  (begin (display "warning: not paranoid") (newline) s))
+      s))
+
+(define (lily-def key val)
+  (let ((tex-key
+	 (if use-regex
+	     (regexp-substitute/global 
+	      #f "_" (output-tex-string key) 'pre "X" 'post)      
+	     (output-tex-string key)))
+	(tex-val (output-tex-string val)))
+    (if (equal? (sans-surrounding-whitespace tex-val) "")
+	(string-append "\\let\\" tex-key "\\undefined\n")
+	(string-append "\\def\\" tex-key "{" tex-val "}\n"))))
+
+(define (number->dim x)
+  (string-append
+   ;;ugh ly-* in backend needs compatibility func for standalone output
+   (ly-number->string x) " \\outputscale "))
+
+(define (placebox x y s) 
+  (string-append 
+   "\\placebox{"
+   (number->dim y) "}{" (number->dim x) "}{" s "}\n"))
+
+(define (bezier-sandwich l thick)
+  (embedded-pdf ((pdf-scm 'bezier-sandwich) l thick)))
+
+(define (start-system ht)
+  (string-append"\\vbox to " (number->dim ht) "{\\hbox{%\n"))
+
+(define (stop-system) 
+  "}\\vss}\\interscoreline\n")
+(define (stop-last-system)
+  "}\\vss}")
+(define (filledbox breapth width depth height) 
+  (string-append 
+   "\\kern" (number->dim (- breapth))
+   "\\vrule width " (number->dim (+ breapth width))
+   "depth " (number->dim depth)
+   "height " (number->dim height) " "))
+
+(define (roundfilledbox x width y height blotdiam)
+  (embedded-pdf ((pdf-scm 'roundfilledbox) x width y height blotdiam)))
+
+(define (text s)
+  (string-append "\\hbox{" (output-tex-string s) "}"))
+
+
+(define (define-origin file line col)
+  (if (procedure? point-and-click)
+      (string-append "\\special{src:\\string:"
+		     (point-and-click line col file)
+		     "}" )
+      "")
   )
 
+					; no-origin not supported in PDFTeX
+(define (no-origin) "")
+
+
 (define (scm-pdftex-output)
   (primitive-eval (pdftex-scm 'all-definitions)))
diff -purN ../lilypond-1.5.49/scm/ps.scm ./scm/ps.scm
--- ../lilypond-1.5.49/scm/ps.scm	Mon Mar 25 23:47:03 2002
+++ ./scm/ps.scm	Tue Apr  2 00:48:01 2002
@@ -118,10 +118,6 @@
   (invoke-char " show" i))
 
 
-(define (hairpin thick width starth endh )
-  (string-append 
-   (numbers->string (list width starth endh thick))
-   " draw_hairpin"))
 
 ;; what the heck is this interface ?
 (define (dashed-slur thick dash l)
@@ -147,6 +143,24 @@
    (ly-number->string off)
    " ] 0 draw_dashed_line"))
 
+(define (draw-line thick x1 y1 x2 y2)
+
+  (string-append 
+  "	1 setlinecap
+	1 setlinejoin "
+  (ly-number->string thick)
+	" setlinewidth "
+   (ly-number->string x1)
+   " "
+   (ly-number->string y1)
+   " moveto "
+   (ly-number->string x2)
+   " "
+   (ly-number->string y2)
+   " lineto stroke"
+
+  ))
+
 (define (repeat-slash wid slope thick)
   (string-append (numbers->string (list wid slope thick))
 		 " draw_repeat_slash"))
@@ -160,20 +174,16 @@
   (string-append (numbers->string (list breapth width depth height))
 		 " draw_box" ))
 
+(define (roundfilledbox x width y height blotdiam)
+   (string-append " "
+      (numbers->string
+         (list x width y height blotdiam)) " draw_round_box"))
+
 (define (dot x y radius)
     (string-append " "
      (numbers->string
       (list x y radius)) " draw_dot"))
 
-(define (roundfilledbox x width y height blotdiam)
-   (string-append " "
-      (dot (- 0 x) (- 0 y) (/ blotdiam 2))
-      (dot width (- 0 y) (/ blotdiam 2))
-      (dot width height (/ blotdiam 2))
-      (dot (- 0 x) height (/ blotdiam 2))
-      (filledbox (+ x (/ blotdiam 2)) (+ width (/ blotdiam 2)) y height)
-      (filledbox x width (+ y (/ blotdiam 2)) (+ height (/ blotdiam 2)))))
-
 ;; obsolete?
 (define (font-def i s)
   (string-append
@@ -241,11 +251,11 @@
 
 					; TODO: use HEIGHT argument
 
-  (define (start-line height)
+  (define (start-system height)
   (string-append
    "\n"
    (ly-number->string height)
-   " start-line {
+   " start-system {
 set-ps-scale-to-lily-scale
 
 "))
@@ -254,27 +264,16 @@ set-ps-scale-to-lily-scale
   (string-append (numbers->string (list breapth width depth height))
 		 " draw_box" ))
 
-(define (stop-line)
-  "}\nstop-line\n")
+(define (stop-system)
+  "}\nstop-system\n")
 
-(define (stop-last-line)
-  "}\nstop-line\n")
+(define (stop-last-system)
+  "}\nstop-system\n")
 
 (define (text s)
   (string-append "(" s ") show  "))
 
 
-(define (volta h w thick vert_start vert_end)
-  (string-append 
-   (numbers->string (list h w thick (inexact->exact vert_start) (inexact->exact vert_end)))
-   " draw_volta"))
-
-(define (tuplet ht gap dx dy thick dir)
-  (string-append 
-   (numbers->string (list ht gap dx dy thick (inexact->exact dir)))
-   " draw_tuplet"))
-
-
 (define (unknown) 
   "\n unknown\n")
 
diff -purN ../lilypond-1.5.49/scm/sketch.scm ./scm/sketch.scm
--- ../lilypond-1.5.49/scm/sketch.scm	Mon Mar 18 01:11:27 2002
+++ ./scm/sketch.scm	Tue Apr  2 00:48:01 2002
@@ -170,11 +170,6 @@
    (sketch-numbers->string (map mul-scale (list x y)))
    "))\n"))
 
-(define (hairpin x y thick width starth endh )
-  (string-append
-   "#"
-   (numbers->string (list width starth endh thick))
-   " draw_hairpin"))
 
 ;; what the heck is this interface ?
 (define (dashed-slur thick dash l)
@@ -240,7 +235,7 @@ layer('Layer 1',1,1,0,0,(0,0,0))
    sketch-beziers (list x y (primitive-eval l) thick)))
 
 ; TODO: use HEIGHT argument
-(define (start-line height)
+(define (start-system height)
    "G()\n"
    )
 
@@ -254,29 +249,18 @@ layer('Layer 1',1,1,0,0,(0,0,0))
 (define (stem x y z w) (filledbox x y z w))
 
 
-(define (stop-line)
+(define (stop-system)
     "G_()\n")
 
 ;; huh?
-(define (stop-last-line)
-   (stop-line))
+(define (stop-last-system)
+   (stop-system))
 
 (define (text x y s)
   (string-append "txt('" s "',(" (sketch-numbers->string
 				  (map mul-scale (list x y))) "))\n"))
 
 
-(define (volta x y h w thick vert_start vert_end)
-  (string-append "#"
-   (numbers->string (list h w thick (inexact->exact vert_start) (inexact->exact vert_end)))
-   " draw_volta"))
-
-(define (tuplet x y ht gap dx dy thick dir)
-  (string-append "#"
-   (numbers->string (list ht gap dx dy thick (inexact->exact dir)))
-   " draw_tuplet"))
-
-
 (define (unknown) 
   "\n unknown\n")
 
diff -purN ../lilypond-1.5.49/scm/slur.scm ./scm/slur.scm
--- ../lilypond-1.5.49/scm/slur.scm	Fri Mar 15 13:28:13 2002
+++ ./scm/slur.scm	Tue Apr  2 00:48:01 2002
@@ -93,13 +93,13 @@
 ;; stem: Default position is on stem X, at stem end Y
 (define default-slur-extremity-offset-alist
   '(
-    ((head 1 1) . (-0.25 . 0.25))
-    ((head 1 -1) . (-0.25 . 0.25))
-    ((head -1 1) . (-0.25 . 0.25))
-    ((head -1 -1) . (-0.85 . 0.25))
+    ((head 1 1) . (-0.25 . 0.75))
+    ((head 1 -1) . (-0.25 . 0.75))
+    ((head -1 1) . (-0.25 . 0.75))
+    ((head -1 -1) . (-0.85 . 0.75))
 
-    ((stem 1 1) . (0 . 0.5))
-    ((stem -1 -1) . (0 . 0.5))
+    ((stem 1 1) . (-0.125 . 0.5))
+    ((stem -1 -1) . (-0.125 . 0.5))
 
     ((loose-end 1 1) . (-0.4 . 0))
     ((loose-end 1 -1) . (-0.4 . 0))
@@ -118,8 +118,8 @@
     ((head -1 1) . (-0.25 . 1.25))
     ((head -1 -1) . (-0.85 . 1.25))
 
-    ((stem 1 1) . (0 . 1.5))
-    ((stem -1 -1) . (0 . 1.5))
+    ((stem 1 1) . (-0.25 . 1.5))
+    ((stem -1 -1) . (-0.25 . 1.5))
 
     ((loose-end 1 1) . (-0.4 . 0))
     ((loose-end 1 -1) . (-0.4 . 0))
diff -purN ../lilypond-1.5.49/scm/tex.scm ./scm/tex.scm
--- ../lilypond-1.5.49/scm/tex.scm	Mon Mar 25 23:47:03 2002
+++ ./scm/tex.scm	Tue Apr  2 00:48:01 2002
@@ -85,10 +85,6 @@
 (define (dashed-slur thick dash l)
   (embedded-ps (list 'dashed-slur thick dash `(quote ,l))))
 
-(define (hairpin thick w sh eh)
-  (embedded-ps (list 'hairpin thick w sh eh))
-)
-
 (define (char i)
   (string-append "\\char" (inexact->string i 10) " "))
 
@@ -229,13 +225,13 @@
 (define (bezier-sandwich l thick)
   (embedded-ps (list 'bezier-sandwich  `(quote ,l) thick)))
 
-(define (start-line ht)
+(define (start-system ht)
   (string-append "\\vbox to " (number->dim ht) "{\\hbox{"
 		 "%\n"))
 
-(define (stop-line) 
+(define (stop-system) 
   "}\\vss}\\interscoreline\n")
-(define (stop-last-line)
+(define (stop-last-system)
   "}\\vss}")
 
 (define (filledbox breapth width depth height)
@@ -258,8 +254,9 @@
 (define (tuplet ht gapx dx dy thick dir)
   (embedded-ps (list 'tuplet  ht gapx dx dy thick dir)))
 
-(define (volta h w thick vert_start vert_end)
-  (embedded-ps (list 'volta  h w thick vert_start vert_end)))
+(define (draw-line thick fx fy tx ty)
+  (embedded-ps (list 'draw-line thick fx fy tx ty)))
+
 (define (between-system-string string)
   string
   )
diff -purN ../lilypond-1.5.49/scm/translator-property-description.scm ./scm/translator-property-description.scm
--- ../lilypond-1.5.49/scm/translator-property-description.scm	Thu Mar 21 01:44:50 2002
+++ ./scm/translator-property-description.scm	Tue Apr  2 00:48:01 2002
@@ -17,13 +17,6 @@
 
 (translator-property-description 'ExtraVerticalExtent
 				 number-pair? "extra vertical extent, same format as  MinimumVerticalExtent")
-(translator-property-description 'Generic_property_list list? "description of the conversion.
-
-Defines names and types for generic properties. These are properties
-than can be plugged into the backend directly. See the init file
-@file{generic-property.scm} for details.  For internal use only,
-deprecated.
-")
 (translator-property-description 'MinimumVerticalExtent number-pair?
 				 "minimum vertical extent, same format as VerticalExtent")
 (translator-property-description 'VerticalExtent number-pair?
@@ -270,10 +263,8 @@ top of those automatically detected. ")
 MIDI instrument to use ")
 (translator-property-description 'midiMinimumVolume number? "[DOCUMENT-ME]")
 (translator-property-description 'midiMaximumVolume number? "[DOCUMENT-ME]")
-
-
-(translator-property-description 'noAutoBeaming boolean? "If set to true then beams are not generated automatically.
-")
+(translator-property-description 'autoBeaming boolean? "If set to true
+then beams are generated automatically.")
 (translator-property-description 'noDirection boolean? "Don't set directions by a2-engraver when part-combining.")
 (translator-property-description 'oneBeat moment? "  How long does one beat in the current time signature last?")
 (translator-property-description 'pedalSustainStrings list? "List of   string to print for sustain-pedal. Format is
diff -purN ../lilypond-1.5.49/scripts/convert-ly.py ./scripts/convert-ly.py
--- ../lilypond-1.5.49/scripts/convert-ly.py	Mon Mar 11 01:49:52 2002
+++ ./scripts/convert-ly.py	Tue Apr  2 00:48:01 2002
@@ -840,6 +840,13 @@ if 1:
 	
 	conversions.append (((1,5,38), conv, 'SystemStartDelimiter -> systemStartDelimiter'))
 
+if 1:
+	def conv (str):
+		str = re.sub ('noAutoBeaming *= *##f', 'autoBeaming = ##t', str)
+		str = re.sub ('noAutoBeaming *= *##t', 'autoBeaming = ##f', str)
+		return str
+	
+	conversions.append (((1,5,49), conv, 'noAutoBeaming -> autoBeaming'))
 
 ################################
 #	END OF CONVERSIONS	
