Generated by hanwen@cs.uu.nl,
From = lilypond-1.5.66, To = lilypond-1.5.67

usage 

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

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

diff -purN ../lilypond-1.5.66/ChangeLog ./ChangeLog
--- ../lilypond-1.5.66/ChangeLog	Sun Jul  7 17:27:16 2002
+++ ./ChangeLog	Sat Jul 13 20:44:27 2002
@@ -1,5 +1,116 @@
+2002-07-13  Han-Wen  <hanwen@cs.uu.nl>
+
+	* lily/beam.cc (calc_stem_y): fix beams on quarter notes.
+
+	* lily/stem-tremolo.cc (brew_molecule): add code for stem tremolos.
+
+	* lily/auto-beam-engraver.cc (create_beam_p): remember Beam
+	settings at the start of a potential auto beam.
+
+	* lily/include/sequential-iterator.hh (class Sequential_iterator):
+	bugfix: protect music list from GC.
+
+	* Documentation/user/introduction.itely: misc fixes.
+
+	* scripts/ly2dvi.py (run_latex): show latex error log. Ask for
+	bugreport if lilypond is killed by a signal. 
+
+	* input/regression/beam-funky.ly:  new file
+
+	* lily/input-smob.cc (make_input): GUILE 1.7 compatibility fixes.
+
+	* lily/beam.cc: complete rewrite of multiplicity. This fixes 16th
+	knees code.
+	(quanting): add french beaming support (property french-beaming)
+	(stem_beams): removed.
+
+i2002-07-12  Mats Bengtsson  <matsb@s3.kth.se>
+
+	* lily/beam.cc (after_line_breaking): Set correct stem lengths
+	also when beam positions are set manually.
+	(consider_auto_knees): Do not use automatic knees if the directions
+	are set manually by the user.
+
+2002-07-12  Han-Wen  <hanwen@cs.uu.nl>
+
+	* input/regression/grace-auto-beam.ly: new file
+
+	* input/regression/grace-unfold-repeat.ly: new file
+
+	* lily/auto-beam-engraver.cc (test_moment): never start on grace moments.
+
+	* lily/forbid-break-engraver.cc (start_translation_timestep): skip
+	grace notes for break-forbidding. Breaks during grace notes are
+	handled by Bar_engraver.	
+
+	* lily/unfolded-repeat-iterator.cc: Reimplement
+	Unfolded_repeat_iterator, Volta_repeat_iterator using
+	Sequential_iterator. All grace functionality from {} carries over
+	to repeats as well.
+
+	* lily/sequential-iterator.cc: new file: form baseclass for
+	sequential music iterator and unfolded/volta repeat iterator.
+
+2002-07-11  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* lily/include/debug.hh: deprecate.
+
+	* lily/spacing-spanner.cc (set_springs): add support for
+	common-shortest-duration field.
+
+	* lily/parser.yy (translator_spec_body): allow \set in \translator
+	{}  block. This is the same as \override, here.
+
+	* lily/score-engraver.cc (one_time_step): don't warn about columns
+	when skipTypesetting == #t.
+
+	* lily/spacing-spanner.cc (musical_column_spacing): change
+	ragged right function to produce natural spacing.
+
+2002-07-10  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* lily/paper-column.cc (before_line_breaking): update
+	#'bounded-by-me field for suicided items.  This fixes crazy
+	spacing in \partcombine scores.
+
+2002-07-10  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* config.hh.in: Add HAVE_SSTREAM.
+	
+	* configure.in: Add check for sstream header.
+
+2002-07-09  Mats Bengtsson  <matsb@s3.kth.se>
+ 
+ 	* flower/source-file.cc: Fix compatibility with older g++.
+ 
+2002-07-09  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* input/twinkle.ly: Bugfix: no automaticMelismata.
+
+2002-07-08  Han-Wen  <hanwen@cs.uu.nl>
+
+	* mutopia/J.S.Bach/Cembalo-Partitas/: remove
+
+	* ly/engraver-init.ly (ScoreContext): turn on automaticMelismata
+	by default.
+
+	* lily/voice-devnull-engraver.cc (try_music):
+	lily/thread-devnull-engraver.cc: use proper spelling for #'always.
+
+	* lily/unfolded-repeat-iterator.cc (Unfolded_repeat_iterator):
+	copy here_mom_ too. This fixes an obscure bug with combining
+	partcombine and repeat
+
+	* lily/chord-tremolo-iterator.cc (Chord_tremolo_iterator): copy
+	factor too. 
+
 2002-07-07  Han-Wen  <hanwen@cs.uu.nl>
 
+	* mutopia/J.S.Bach/pa.ly: remove
+	* mutopia/J.S.Bach/Duette/: remove  
+	
+	* scm/font.scm (change-rhs-size): add support for "paper19.ly"
+
 	* VERSION: 1.5.66 released
 
 	* scm/grob-description.scm (all-grob-descriptions): add
diff -purN ../lilypond-1.5.66/Documentation/GNUmakefile ./Documentation/GNUmakefile
--- ../lilypond-1.5.66/Documentation/GNUmakefile	Tue Apr 23 15:53:02 2002
+++ ./Documentation/GNUmakefile	Fri Jul 12 13:01:04 2002
@@ -5,7 +5,7 @@ SUBDIRS=user bibliography pictures topdo
 STEPMAKE_TEMPLATES=documentation texinfo tex
 LOCALSTEPMAKE_TEMPLATES=lilypond ly
 LILYPOND_BOOK_FLAGS=--extra-options '-e "(set-lily-option (quote internal-type-checking) \#t)"'
-README_TOP_FILES=NEWS DEDICATION CHANGES 
+README_TOP_FILES=NEWS DEDICATION ChangeLog
 EXTRA_DIST_FILES=
 
 include $(depth)/make/stepmake.make 
diff -purN ../lilypond-1.5.66/Documentation/index.texi ./Documentation/index.texi
--- ../lilypond-1.5.66/Documentation/index.texi	Tue Apr 23 15:53:02 2002
+++ ./Documentation/index.texi	Fri Jul 12 13:01:04 2002
@@ -81,7 +81,7 @@ the mailing lists.
 
 
 @itemize @bullet
-@item @uref{CHANGES.html, CHANGES} Things recently done.
+@item @uref{ChangeLog.html, ChangeLog} Things recently done.
 
 @c download sites?
 
diff -purN ../lilypond-1.5.66/Documentation/regression-test.tely ./Documentation/regression-test.tely
--- ../lilypond-1.5.66/Documentation/regression-test.tely	Sun Jul  7 15:44:55 2002
+++ ./Documentation/regression-test.tely	Sat Jul 13 19:39:19 2002
@@ -145,9 +145,17 @@ Grace note do weird things with timing. 
 
 @lilypondfile[printfilename]{grace-bar-number.ly}
 
+@lilypondfile[printfilename]{grace-auto-beam.ly}
+
+@lilypondfile[printfilename]{grace-unfold-repeat.ly}
+
 
 @section Beams
 
+@lilypondfile[printfilename]{beams.ly}
+
+@lilypondfile[printfilename]{beam-funky.ly}
+
 @lilypondfile[printfilename]{beaming.ly}
 
 @lilypondfile[printfilename]{beam-concave.ly}
diff -purN ../lilypond-1.5.66/Documentation/topdocs/AUTHORS.texi ./Documentation/topdocs/AUTHORS.texi
--- ../lilypond-1.5.66/Documentation/topdocs/AUTHORS.texi	Tue Jul  2 21:07:15 2002
+++ ./Documentation/topdocs/AUTHORS.texi	Mon Jul  8 11:45:26 2002
@@ -21,8 +21,7 @@ list is alphabetically ordered.
 
 @itemize @bullet
 @item @email{tca@@gnu.org, Tom Cato Amundsen},
-    cembalo-partita in lilypond, accordion symbols, some
-lilypond-book.py
+ accordion symbols, some lilypond-book.py
 @item  @email{jiba@@tuxfamily.org,Jean-Baptiste Lamy }
    Tablature support
 @item @email{matsb@@s3.kth.se, Mats Bengtsson},
@@ -82,12 +81,11 @@ lilypond-book.py
         ancient clefs, etc.)
 @item @email{daboys@@austin.rr.com, Jeffrey B. Reed},
     Windows-NT support.
-@item Shay Rojanski
-    Some lilypond input.
 @item @email{august@@infran.ru, August S.Sigov}
     Russian translation
 @item @email{rune@@zedeler.dk, Rune Zedeler}
-    Drum notation, beaming and auto-accidental changes. Font updates. Misc fixes.
+    Drum notation, beaming and auto-accidental code. Font
+updates. Miscellaneous fixes.
 @end itemize
 
 @bye
diff -purN ../lilypond-1.5.66/Documentation/user/introduction.itely ./Documentation/user/introduction.itely
--- ../lilypond-1.5.66/Documentation/user/introduction.itely	Sun Jul  7 15:44:56 2002
+++ ./Documentation/user/introduction.itely	Sat Jul 13 19:39:19 2002
@@ -3,86 +3,80 @@
 @node Introduction
 @chapter Introduction
 
-LilyPond is a program to print sheet music. If you have used such
+LilyPond is a program to print sheet music. If you have used notation
 programs before, then the way to use this program might be surprising
 at first sight. To print music with lilypond, you have to enter
 musical codes in a file. Then you run LilyPond on the file, and the
-music is produced without any user intervention. For example,
-something like this:
+music is produced without any intervention. For example, something
+like this:
 
 @lilypond[fragment,verbatim, relative 1, intertext="produces this"]
 \key c \minor r8 c16 b c8 g as c16 b c8 d | g,4 
 @end lilypond
 
-We can very well imagine that encoding music using letters may appear
-strange, intimidating or even clumsy at first. Nevertheless, when you
-take the effort to learn the codes and the program you will find that
-it is not so difficult as it seems, entering music can be done
-quickly, and you never have to remember how you made the program do
-something complicated: it's all in the input code, and you only have
-read the file to see how it works. Moreover, when you use LilyPond,
-you are rewarded with very nicely looking output.
-
-This form of computing (produce the output in one go, without user
-intervention), is called @emph{batch} computing, and the program that
-is used is normally called a @emph{compiler}. In contrast, it is now
-fashionable to produce interactive programs that rely on a Graphical
-User Interface (GUI).
-
-When we started with developing LilyPond in a time that were studying
-at the university. Back then GUIs were not as ubiquitous as they are
-today, and we were immersed in the UNIX operating system, where it is
-very common to use compilers to achieve computing tasks, so our
+ Encoding music using letters and digits may appear strange,
+intimidating or even clumsy at first. Nevertheless, when you take the
+effort to learn the codes and the program you will find that it is
+easier than it seems.  Entering music can be done quickly, and you
+never have to remember how you made the program do something
+complicated: it's all in the input code, and you only have to read the
+file to see how it works. Moreover, when you use LilyPond, you are
+rewarded with very nicely looking output.
+
+When we started with developing LilyPond, we were interested in music
+notation, not as publishers or musicians, but as students and
+scientists. We wanted tried to figure to what extent formatting sheet
+music could be automated.  This was when we were still studying at the
+university. Back then GUIs were not as ubiquitous as they are today,
+and we were immersed in the UNIX operating system, where it is very
+common to use compilers to achieve computing tasks, so our
 computerized music engraving experiment took on the form of a
 compiler.
 
 One other decision was also motivated by our academic background. In
 the scientific community it has always been a tradition to share
-knowledge, and to a lesser extent, to share the software you
-wrote. One of the most visible groups that stimulated this philosopy,
-was the Free Software Foundation, whose GNU project aimed to replace
-the closed and proprietary computing solutions with free (as in
-"Libre") variants. We jumped on that bandwagon, and that is the reason
-that you can still get LilyPond at no cost, and with no strings
-attached.
-
-When we started, we were interested in music notation, not as
-publishers or musicians, but as students and scientists. We wanted
-tried to figure to what extent formatting sheet music could be
-automated.  Making sheet music may seem trivial at first (``you print
-5 lines, and then put in the notes at different heights''),
-@emph{music engraving}, i.e. professional music typography, is in
-another ballpark.
+knowledge, and, to a lesser extent, the software you wrote. One of the
+most visible groups that stimulated this philosopy, was the Free
+Software Foundation, whose GNU project aimed to replace closed and
+proprietary computing solutions with free (as in ``Libre'')
+variants. We jumped on that bandwagon, and that is the reason that you
+can still get LilyPond at no cost without any strings attached.
 
-The term music engraving derives from the traditional process of music
-printing.  A few decades ago, sheet music was made by cutting and
+
+Making sheet music may seem trivial at first (``you print 5 lines, and
+then put in the notes at different heights''), @emph{music engraving},
+i.e. professional music typography, is in another ballpark.  The term
+music engraving derives from the traditional process of music
+printing.  Only a few decades ago, sheet music was made by cutting and
 stamping the music mirrored into zinc or pewter plates. The plate
 would be inked, and the depressions caused by the cutting and stamping
-would hold ink thus forming an positive image. Stamping and cutting
-was completely done by hand, and making corrections was cumbersome, so
-engraving had to be correct in one go. As you can imagine this was a
-highly specialized skill, much more so than the traditional process of
-printing books.
-
-In fact, the traditional german craftmanship required six years of
-full-time training, before a student could call himself a master of
-the art. After that many more years of practical experience were
+would hold ink.  A positive image was formed by pressing paper to the
+plate. Stamping and cutting was completely done by hand, and making
+corrections was cumbersome, so engraving had to be correct in one
+go. As you can imagine this was a highly specialized skill, much more
+so than the traditional process of printing books.
+
+In fact, in the traditional German craftmanship six years of full-time
+training were required, before a student could call himself a master
+of the art. After that many more years of practical experience were
 needed to become an established music engraver.  Even today, in the
 era of high-speed computers, music requires lots of manual fine tuning
 before it acceptable to be published.
 
-The first step of making music prints is to have the symbols
-available.  Unfortunately, most of the knowledge about music engraving
-has not been laid down in an easily accessible form, so when we wanted
-to write a computer program to do create music typography, we
-encountered the first problem: there were no sets of musical symbols
-available: either they were not available freely, or they didn't look
-well to our subtle tastes. That was the reason for us to create a font
-of musical symbols, relying mostly on nice printouts of hand-engraved
-music.
+When we wanted to write a computer program to do create music
+typography, we encountered the first problem: there were no sets of
+musical symbols available: either they were not available freely, or
+they didn't look well to our taste. That was the reason for us to
+create a font of musical symbols, relying mostly on nice printouts of
+hand-engraved music.  It was a good decision to design our own
+font. The experience helps develop a typographical taste, and it makes
+one appreciate subtle design details. Without that experience, we
+would not have realized how ugly the fonts were that we admired at
+first.
+
 
 @lilypond
-#(define magfact 2.0)
+#(define magfact 3.0)
 \score {  \notes { as'2 r4 }
 	  \paper {
 	      linewidth = -1. 
@@ -99,19 +93,14 @@ music.
 		  } } }
 @end lilypond
 
-In the figure above, a few notable glyphs are shown. For example, the
+The figure above shows a few notable glyphs. For example, the
 half-notehead is not elliptic but slightly diamond shaped.  The stem
 of a flat symbol should be slightly brushed, i.e. becoming wider at
 the top. Fine endings, such as the one on the bottom of the quarter
 rest, should not end in sharp points, but rather in rounded shapes.
-The blackness of the font must be carefully tuned to the thickness of
-lines, beams and slurs to give a strong yet balanced overall
-impression.
-
-It was a good decision to design our own font. The experience helps
-develop a typographical taste, and it makes one appreciate subtle
-design details. Without that experience, we would not have realized
-how ugly the fonts were that we admired at first.
+Taken together, the blackness of the font must be carefully tuned
+together with the thickness of lines, beams and slurs to give a strong
+yet balanced overall impression.
 
 Producing a strong and balanced look is the real challenge of music
 engraving. It is a recurring theme with many variations. One of these
@@ -127,13 +116,13 @@ which is which?
       \property Staff.NoteSpacing \set #'stem-spacing-correction
         = #0.6
       c'4 e''4 e'4 b'4 |
-      c'4 e''4 e'4 b'4 |
+      b'4 e''4 b'4 e''4|
       \property Staff.NoteSpacing \override #'stem-spacing-correction
       = #0.0
       \property Staff.StaffSpacing \override #'stem-spacing-correction
       = #0.0
       c'4 e''4 e'4 b'4 |
-      c'4 e''4 e'4 b'4 |            
+      b'4 e''4 b'4 e''4|      
     }
     \paper { linewidth = -1. } }
 @end lilypond
@@ -143,59 +132,81 @@ played in a constant regular rhythm. The
 that. Unfortunately, the eye deceives us a little: the eye not only
 notices the distance between note heads, but also between consecutive
 stems. Depending on the different vertical positions, the notes of a
-upstem-downstem should be put farther apart, and the notes of a
-down-up combination should be put closer. The first two measures are
-printed with this correction, the last two measures without. The notes
-in the last two measures form downstem/upstems clumps of notes.
-
-Experts have the knowledge to make such adjustments themselves by
-hand. For a skilled engraver, a computer drawing program is sufficient
-to produce excellent music typography. However, laypeople don't have
-the knowledge to think of such details. For a musician, the interface
-of a program should be familiar. This is a place where there is a
-choice of two paradigms: most musicians are familiar with notation,
-and with music.  Most graphically oriented programs offer an interface
-that shows notation, and allow you to enter the music by placing notes
-on a staff. 
-
-
-Interactive programs always have to load and save their data from
-files on the disk.  In a program that deals with music notation, the
-notation always has to converted to some kind of representation of the
-music inside.
-
-[todo]
-
-
-When we view the problem of making beautiful sheet music for a given
-piece of music as a scientific puzzle, then we can only solve that
-puzzle if it is well-stated. Hence, when we design an input format, we
-want it to be neatly defined and have precise semantics. Such formats
-also have the advantage of being easier to write code for. 
-
-
-Many music encodings exist today but most of the encodings have not
-been tailored either for human use, or for processing it with a
-computer.  By its nature, LilyPond input has both features: it is
-concise, suitable for human input, and it can be processed
-automatically: it may be converted into MIDI or into print.
-
-
-However, one big problem with music, is that there are no standards
-for encoding music. Sure, you can record performances using MIDI, but
-that offers far too little information for adequate musicological
-purposes. With LilyPond we've taken a reverse approach: we have tried
-to come up with musical format that can cater virtually all music as
-long as it can be notated.
-
-LilyPond input focuses on musical concepts such as pitch, duration and
-music expressions.  Musical data is rhythmic, and implies an ordering
-of events. This ordering is used to create compound musical concepts:
-Large musical structures are built recursively from smaller
-expressions: a sequence of music expressions forms a new, longer and
-bigger music expression. In this sense, the input is recursive. It
-shares this property with very music encodings. The recursive nature
-will appeal to the more hackerish musician.
+upstem-downstem combination should be put farther apart, and the notes
+of a down-up combination should be put closer together. The first two
+measures are printed with this correction, the last two measures
+without. The notes in the last two measures form downstem/upstems
+clumps of notes.
+
+We hope that these examples serve to show that music typography is a
+subtle business, and that it requires skill and knowledge to produce
+good engraving.  It was our challenge to see if we could put such
+knowledge into a computer program.
+ 
+One of the first questions that pop up when you design such a program,
+is what kind of input the program should expect. Many music notation
+programs offer a graphical interface that shows notation, and allow
+you to enter the music by placing notes on a staff. Although this is a
+obvious way to design a program, from our point of view, this is
+cheating. After all, the core message of a piece of music notation
+simply is the music itself. If you start by offering notation to the
+user, you have already skipped one conversion, even if it perhaps is
+implicit. If we want to generate music notation from something else,
+then the obvious candidate for the source should be the music itself.
+
+Of course, on paper this theory sounds very good. In practice, it
+opens a can of worms. What really @emph{is} music? Many philosophical
+treatises must have been written on the subject. Even if you are more
+practically inclined, you will notice that an enormous number of
+different ways to represent music in a computer exist, and they are
+much more incompatible than the formats for wordprocessors and
+spreadsheets.  Anyone who has tried to exchange data files from
+between different notation programs can attest to this.
+
+The cause of this problem is that music is inherently two-dimensional:
+in polyphonic music, notes have time and pitch as their two
+coordinates, and they often are related in both directions. Computer
+files on the other hand are essentially one-dimensional: they are a
+long stream of characters. When you represent music in a file, then
+you have to flatten this two-dimensional information breaking either
+timing or pitch relations, and there is no universal agreement on how
+to do this.
+
+Luckily, our application has guided us a little with the design of the
+format: we want to produce a printed score from a music
+representation.  A music representation is about @emph{music}, so it
+should be free from notation as much as possible: the format is about
+pitches and durations, not about symbols and offsets.  Since LilyPond
+is a compiler, the input format is its user interface, and users have
+to key in the music into the file directly, requiring that the input
+format has a friendly syntax. We, as programmers and scientists want a
+clean formal definition. After all, producing music notation is a
+difficult problem, and in the scientific world, difficult problems
+always must be well-specified. Moreover, formally defined formats are
+easier to write programs for. Finally, enough information should be
+present to be able to produce a printed score.
+
+These ideas shaped our music representation which elegantly builds
+complex musical constructs from simple entities like notes and rests,
+in much the same way that one builds complex formulae from simple
+expressions such as numbers and mathematical operators.
+
+The strict separation between musical information and typesetting also
+gives a blueprint of the program: first it reads the music
+representation, then it interprets the music---reading it
+`left-to-right', and translating the musical information to a layout
+specification. When the layout is computed, the resulting symbols are
+written to an output file.
+
+Much more could be said about the inner working of the program, but we
+will leave it at this. Those who are interested can inspect the source
+code, which is available freely, or inquire on the development mailing
+list.
+
+We hope that you understand where LilyPond came from, and what we
+tried to achieve. The rest of this manual less philosophical: it
+instructs you how use the input language to print beautiful music.
+
 
 
 
diff -purN ../lilypond-1.5.66/Documentation/user/macros.itexi ./Documentation/user/macros.itexi
--- ../lilypond-1.5.66/Documentation/user/macros.itexi	Sun Jul  7 15:44:56 2002
+++ ./Documentation/user/macros.itexi	Sat Jul 13 19:39:19 2002
@@ -48,7 +48,7 @@
 @iftex
 @macro texisharp {word}
 @tex
-$\\sharp$
+$\\sharp$%
 @end tex
 @end macro
 @end iftex
diff -purN ../lilypond-1.5.66/Documentation/user/preface.itely ./Documentation/user/preface.itely
--- ../lilypond-1.5.66/Documentation/user/preface.itely	Sun Jul  7 15:44:56 2002
+++ ./Documentation/user/preface.itely	Sat Jul 13 19:39:19 2002
@@ -34,6 +34,11 @@ Jeremie Lumbroso, 
 @end ignore
 
 
+We always maintain that wrote this program to satisfy our curiosity,
+to have fun together, to help people, but ultimately, LilyPond is a
+way to express our deep love for music. May it help you create lots of
+beautiful music!
+
 Han-Wen and Jan
 
 Utrecht/Eindhoven, The Netherlands, July 2002.
diff -purN ../lilypond-1.5.66/Documentation/user/tutorial.itely ./Documentation/user/tutorial.itely
--- ../lilypond-1.5.66/Documentation/user/tutorial.itely	Sun Jul  7 15:44:56 2002
+++ ./Documentation/user/tutorial.itely	Sat Jul 13 19:39:19 2002
@@ -12,6 +12,7 @@
 @menu
 * First steps::                 Music language of LilyPond
 * Running LilyPond::            Printing music
+* More basics::                 
 * Printing lyrics::             
 * A melody with chords ::       
 * More stanzas::                
@@ -34,19 +35,12 @@ LilyPond to produce printed output; you 
 your first sheets of music. The tutorial continues with more and more
 complex examples.
 
-Some of the examples discussed are included as separate files in the
-distribution, in the subdirectory @file{input/tutorial/} of the source
-package.
-
 @node First steps
 @section First steps
 
-In this section, we show how to make small, very simple pieces of
-music in LilyPond.  If you have not seen LilyPond input files before,
-this section is for you.
-
-You get a simple note by typing its note name, from @code{a} through
-@code{g}. So if you enter
+We tsart off with showing how very simple music is entered in
+LilyPond:  you get a simple note by typing its note name, from
+@code{a} through @code{g}. So if you enter
 @quotation
 @example
 c d e f g a b
@@ -241,8 +235,127 @@ LilyPond source file looks like:
 @separate
 
 
+@node Running LilyPond
+@section Running LilyPond
+
+In the last section, we explained what kind of things you could enter
+in a lilypond file.  In this section we explain how to run LilyPond,
+and how view or print the output.  If you have not used LilyPond
+before, want to test your setup of LilyPond, or try to run an example
+file yourself, then read this section.  The instructions that follow
+are for running LilyPond on Unix-like systems.  Some additional
+instructions for running LilyPond on Windows are given at the end of
+this section.
+
+You begin with opening a terminal window, and start up a text editor.
+For example, open an xterm and execute @code{joe}.  In your text editor,
+enter the following input, and save the file as @file{test.ly}:
+
+@quotation
+@example
+\score @{
+  \notes @{ c'4 e' g' @}
+@} 
+@end example
+@end quotation
+
+@cindex ly2dvi
+
+@c now this is weird, running ly2dvi to run LilyPond
+@c (therefore name change proposal) 
+
+LilyPond is the program that computes the sheet music. All other
+things, such as adding titles, page breaking and other page layout,
+are done by a small wrapper program called
+@code{ly2dvi}. @code{ly2dvi} calls lilypond to render the music, and
+then adds the titling and page layout instructions.  To process
+@file{test.ly} with ly2dvi, proceed as follows:
+
+@quotation
+@example
+ly2dvi -P test.ly
+@end example
+@end quotation
+
+You will see the following on your screen:
+
+@quotation
+@example
+GNU LilyPond 1.4.0
+Now processing: `/home/fred/ly/test.ly'
+Parsing...
+Interpreting music...[1]
+ @emph{ ... more interesting stuff ... }
+PS output to `test.ps'...
+DVI output to `test.dvi'...
+@end example
+@end quotation
+@cindex DVI file
+@cindex Viewing music
+@cindex xdvi
+
+The results of the ly2dvi run are two files, @file{test.dvi} and
+@file{test.ps}.  The PS file (@file{test.ps}) is the one you can print.
+You can view the PS file using the program ghostview.  If a version of
+ghostview is installed on your system, one of these commands will
+produce a window with some music notation on your screen:
+@c eeek
+@quotation
+@example
+  gv test.ps
+  ghostview test.ps
+  ggv test.ps
+  kghostview test.ps
+@end example
+@end quotation
+If you are satisfied with the looks of the music displayed on your
+screen, you can print the PS file by clicking File/Print inside
+ghostview.
+
+The DVI file (@file{test.dvi}) contains the same sheet music in a
+different format. DVI files are more easily processed by the computer,
+so viewing them usually is quicker.  Execute @code{xdvi test.dvi}
+to view the DVI file.
+
+If your DVI viewer does not have a "Print" button, you can print the
+file by executing @code{lpr test.ps}.
+
+@c volgende alinea schrappen?  
+
+If you can't get the examples to print, then you should look into
+installing and configuring ghostscript.  Refer to GhostScript's website
+at @uref{http://www.ghostscript.com}.
+
+@cindex GhostScript
+@cindex @code{lpr}
+@cindex Printing output
+@cindex PostScript
+
+@unnumberedsubsec Windows users
+Windows users start the terminal by clicking on the LilyPond or Cygwin
+icon.  Notepad is sufficient for editing the LilyPond file.  Viewing
+the PS file can be done with:
+@quotation
+@example
+@code{gsview32 test.ps}
+@end example
+@end quotation
+You can also print from the command line by executing:
+@quotation
+@example
+@code{gsview32 /s test.ps}
+@end example
+@end quotation
+
+
 @strong{SUMMARY}
 
+To run LilyPond, enter a file, and run the command @code{ly2dvi} on
+that file. The resulting files are either DVI or PostScript, and can
+be viewed with @code{xdvi} (unix) and ghostview (unix and windows)
+respectively. The following table summarizes the constructs that were
+discussed in the previous two sections.
+
 @multitable @columnfractions  .3 .3 .4  
 
 @item @b{Syntax}
@@ -302,12 +415,12 @@ s16_" "
 @end multitable
 
 
-@c maybe legend here?
-
+@node More basics
+@section More basics 
 
 We continue with the introduction of the remaining musical constructs.
-
-Normal rests are entered just like notes with the name ``@code{r}'':
+Normal rests are entered just like notes, but use the name
+``@code{r}'':
 
 @quotation
 @example
@@ -483,6 +596,8 @@ For example: @code{c f,} goes down; @cod
 
 @strong{SUMMARY}
 
+The following table  summarizes the syntax learned in this section.
+
 @multitable @columnfractions .3 .3 .4  
 
 @item @b{Syntax}
@@ -842,117 +957,6 @@ lyrics, chords, orchestral scores and pa
 polyphonic music, and integrating text and music.
 
 
-@node Running LilyPond
-@section Running LilyPond
-
-In the last section, we explained what kind of things you could enter
-in a lilypond file.  In this section we explain how to run LilyPond,
-and how view or print the output.  If you have not used LilyPond
-before, want to test your setup of LilyPond, or try to run an example
-file yourself, then read this section.  The instructions that follow
-are for running LilyPond on Unix-like systems.  Some additional
-instructions for running LilyPond on Windows are given at the end of
-this section.
-
-You begin with opening a terminal window, and start up a text editor.
-For example, open an xterm and execute @code{joe}.  In your text editor,
-enter the following input, and save the file as @file{test.ly}:
-
-@quotation
-@example
-\score @{
-  \notes @{ c'4 e' g' @}
-@} 
-@end example
-@end quotation
-
-@cindex ly2dvi
-
-@c now this is weird, running ly2dvi to run LilyPond
-@c (therefore name change proposal) 
-
-LilyPond is the program that computes the sheet music. All other
-things, such as adding titles, page breaking and other page layout,
-are done by a small wrapper program called
-@code{ly2dvi}. @code{ly2dvi} calls lilypond to render the music, and
-then adds the titling and page layout instructions.  To process
-@file{test.ly} with ly2dvi, proceed as follows:
-
-@quotation
-@example
-ly2dvi -P test.ly
-@end example
-@end quotation
-
-You will see the following on your screen:
-
-@quotation
-@example
-GNU LilyPond 1.4.0
-Now processing: `/home/fred/ly/test.ly'
-Parsing...
-Interpreting music...[1]
- @emph{ ... more interesting stuff ... }
-PS output to `test.ps'...
-DVI output to `test.dvi'...
-@end example
-@end quotation
-@cindex DVI file
-@cindex Viewing music
-@cindex xdvi
-
-The results of the ly2dvi run are two files, @file{test.dvi} and
-@file{test.ps}.  The PS file (@file{test.ps}) is the one you can print.
-You can view the PS file using the program ghostview.  If a version of
-ghostview is installed on your system, one of these commands will
-produce a window with some music notation on your screen:
-@c eeek
-@quotation
-@example
-  gv test.ps
-  ghostview test.ps
-  ggv test.ps
-  kghostview test.ps
-@end example
-@end quotation
-If you are satisfied with the looks of the music displayed on your
-screen, you can print the PS file by clicking File/Print inside
-ghostview.
-
-The DVI file (@file{test.dvi}) contains the same sheet music in a
-different format. DVI files are more easily processed by the computer,
-so viewing them usually is quicker.  Execute @code{xdvi test.dvi}
-to view the DVI file.
-
-If your DVI viewer does not have a "Print" button, you can print the
-file by executing @code{lpr test.ps}.
-
-@c volgende alinea schrappen?  
-
-If you can't get the examples to print, then you should look into
-installing and configuring ghostscript.  Refer to GhostScript's website
-at @uref{http://www.ghostscript.com}.
-
-@cindex GhostScript
-@cindex @code{lpr}
-@cindex Printing output
-@cindex PostScript
-
-@unnumberedsubsec Windows users
-Windows users start the terminal by clicking on the LilyPond or Cygwin
-icon.  Notepad is sufficient for editing the LilyPond file.  Viewing
-the PS file can be done with:
-@quotation
-@example
-@code{gsview32 test.ps}
-@end example
-@end quotation
-You can also print from the command line by executing:
-@quotation
-@example
-@code{gsview32 /s test.ps}
-@end example
-@end quotation
 
 
 
@@ -1083,7 +1087,7 @@ The complete file is listed here:
 @section A melody with chords
 
 In this section we show how to typeset a melody with chord
-accompaniment. This file is included as @file{flowing.ly}.
+accompaniment. This file is included as @file{input/tutorial/flowing.ly}.
 
 @example 
 \include "paper16.ly"
@@ -1658,7 +1662,7 @@ lily version.
 Our fourth subject is a piece of piano music.  The fragment in the
 input file is a piano reduction of the G major Sinfonia by Giovanni
 Battista Sammartini.  It was composed around 1740.  It's in the source
-package under the name @file{sammartini.ly}.
+package under the name @file{input/tutorial/sammartini.ly}.
 
 @lilypondfile[verbatim]{sammartini.ly}
 
@@ -1920,8 +1924,8 @@ to the page layout of this document.
 
 In this section, we show some ways to fine tune the final output of a
 piece. We do so using a single measure of a moderately complex piano
-piece: a Brahms intermezzo (opus 119, no. 1).
-@cindex Brahms, Johannes
+piece: a Brahms intermezzo (opus 119, no. 1). Both fragments (the
+tuned and the untuned are in the @file{input/tutorial/}).
 
 The code for the untuned example shows us some new things.
 
@@ -2283,8 +2287,8 @@ for transposing instruments.
 @subsection The full score
 
 
-The second file, @file{os-score.ly} reads the definitions of the first
-(@file{os-music.ly}), and defines the @code{\score} block for the full
+The second file, @file{input/tutorial/os-score.ly} reads the definitions of the first
+(@file{input/tutorial/os-music.ly}), and defines the @code{\score} block for the full
 conductor's score.
 
 
diff -purN ../lilypond-1.5.66/Documentation/windows/lilypond.hint ./Documentation/windows/lilypond.hint
--- ../lilypond-1.5.66/Documentation/windows/lilypond.hint	Sun Jul  7 15:44:56 2002
+++ ./Documentation/windows/lilypond.hint	Wed Jul 10 15:27:39 2002
@@ -1,6 +1,7 @@
 sdesc: "A program for printing sheet music"
 category: Publishing
-requires: ash bash libguile14 libintl2 python tetex-beta texmf-tiny
+# actually, guile needs libtool-devel 
+requires: ash bash libguile14 libintl2 libtool-devel python tetex-beta texmf-tiny
 #suggests: emacs gsview lilypond-doc rxvt xdvi texmf-base
 ldesc: "A program for printing sheet music.
 LilyPond prints beautiful sheet music.  It produces music notation
diff -purN ../lilypond-1.5.66/GNUmakefile.in ./GNUmakefile.in
--- ../lilypond-1.5.66/GNUmakefile.in	Wed Jun 26 18:09:29 2002
+++ ./GNUmakefile.in	Mon Jul  8 12:00:36 2002
@@ -122,6 +122,7 @@ builddir-setup: $(depth)/$(builddir)/sha
 
 $(depth)/$(builddir)/share/lilypond/$(TOPLEVEL_VERSION)-force:
 	# Preparing LilyPond tree for builddir exec
+	@echo Making $(depth)/$(builddir)/share 
 	@cd $(depth)/$(builddir) && rm -rf share
 	@cd $(depth)/$(builddir) && mkdir -p share/lilypond
 	@cd $(depth)/$(builddir)/share/lilypond && mkdir -p $(TOPLEVEL_VERSION)
diff -purN ../lilypond-1.5.66/VERSION ./VERSION
--- ../lilypond-1.5.66/VERSION	Sun Jul  7 15:45:39 2002
+++ ./VERSION	Sat Jul 13 19:39:47 2002
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
-PATCH_LEVEL=66
+PATCH_LEVEL=67
 MY_PATCH_LEVEL=
 
 # Use the above to send patches: MY_PATCH_LEVEL is always empty for a
diff -purN ../lilypond-1.5.66/autogen.sh ./autogen.sh
--- ../lilypond-1.5.66/autogen.sh	Wed Jun 19 21:21:30 2002
+++ ./autogen.sh	Sat Jul 13 19:40:53 2002
@@ -1,11 +1,14 @@
 #!/bin/sh
-# WARNING WARNING WARNING
-# do not edit! this is autogen.sh, generated from stepmake/autogen.sh
-#!/bin/sh
 # Run this to generate configure and initial GNUmakefiles
 
 srcdir=`dirname $0`
 
+if [ stepmake/autogen.sh -nt autogen.sh ]; then
+    echo "stepmake/autogen.sh is newer. Copying file." 
+    cp -f stepmake/autogen.sh autogen.sh
+    exec ./autogen.sh
+fi
+
 # Be paranoid: check for autoconf == 2.13
 # Some setups have both autoconf 2.13 and 2.50 available through
 # a wrapper script: /usr/bin/autoconf.
@@ -13,7 +16,7 @@ srcdir=`dirname $0`
 # advertises itself as autoconf 2.13.
 # If you have such a setup, invoke this script as:
 #   autoconf=autoconf2.13 ./autogen.sh
-for i in autoconf autoconf2.13 false; do
+for i in autoconf-2.13 autoconf2.13 autoconf  false; do
   version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'`
   if test "0$version" -eq 213; then
     autoconf=$i
diff -purN ../lilypond-1.5.66/buildscripts/lilypond-profile.sh ./buildscripts/lilypond-profile.sh
--- ../lilypond-1.5.66/buildscripts/lilypond-profile.sh	Mon Jun 17 10:02:27 2002
+++ ./buildscripts/lilypond-profile.sh	Fri Jul 12 13:54:20 2002
@@ -12,19 +12,30 @@
 if [ "$LILYPONDPREFIX" == "" ] ; then
     datadir=`echo "@datadir@" | sed 's!//!/!g'`
 else
-## to support development from ~/usr/src/lilypon.
-    datadir=$LILYPONDPREFIX
+    if [ -d "$LILYPONDPREFIX/fonts" ] ; then
+	datadir=$LILYPONDPREFIX
+    else
+	eval `cat $LILYPONDPREFIX/VERSION`
+	FULLVERSION="$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL"
+	if [ "" != "$MY_PATCH_LEVEL" ]; then
+	    FULLVERSION="$FULLVERSION.$MY_PATCH_LEVEL"
+	fi 
+	
+	datadir="$LILYPONDPREFIX/share/lilypond/$FULLVERSION"
+    fi
+    echo "Setting tree to $datadir"
 fi
 
+# Add the installation directory to the teTeX system tree, 
+# see Documentation/misc/fontinstallation
+TEXMF="{$datadir,"`kpsexpand  \\$TEXMF`"}"
+export TEXMF
+
 # For direct ps output: ps/lilyponddefs.ps
 GS_LIB="$datadir/ps:"${GS_LIB:=""}
 export GS_LIB
 
 
-# Add the installation directory to the teTeX system tree, 
-# see Documentation/misc/fontinstallation
-TEXMF="{$datadir,"`kpsexpand  \\$TEXMF`"}"
-export TEXMF
 
 
 # For direct ps output fonts. Add all available TeX Type1 fonts
diff -purN ../lilypond-1.5.66/config.hh.in ./config.hh.in
--- ../lilypond-1.5.66/config.hh.in	Thu Jun 20 13:59:04 2002
+++ ./config.hh.in	Wed Jul 10 15:27:21 2002
@@ -73,6 +73,8 @@
 /* define if you have sys/stat.h */
 #define STAT_MACROS_BROKEN 0
 
+/* define if you have sstream */
+#define HAVE_SSTREAM 0
 
 /* GUILE only includes version in headers (libguile/version.h) as of
    1.5.x.  For some strange reason, they call it SCM.*VERSION. */
diff -purN ../lilypond-1.5.66/configure.in ./configure.in
--- ../lilypond-1.5.66/configure.in	Mon Jul  1 15:54:23 2002
+++ ./configure.in	Wed Jul 10 15:27:21 2002
@@ -35,8 +35,7 @@ STEPMAKE_MAKEINFO(REQUIRED)
 STEPMAKE_PYTHON_DEVEL(REQUIRED)
 
 
-# AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h)
-AC_HAVE_HEADERS(assert.h sys/stat.h)
+AC_HAVE_HEADERS(assert.h sys/stat.h sstream)
 AC_HEADER_STAT
 
 AC_FUNC_MEMCMP
diff -purN ../lilypond-1.5.66/flower/source-file.cc ./flower/source-file.cc
--- ../lilypond-1.5.66/flower/source-file.cc	Sun Jul  7 15:44:56 2002
+++ ./flower/source-file.cc	Wed Jul 10 15:27:52 2002
@@ -9,7 +9,12 @@
 
 
 #include <assert.h>
+#if HAVE_SSTREAM
 #include <sstream>
+#else
+#include <strstream.h>
+#define istringstream(x) istrstream(x, length_i ()) 
+#endif
 
 #include "string.hh"
 #include "flower-proto.hh"
@@ -45,7 +50,7 @@ Source_file::istream_l ()
   if (!istream_p_)
     {
       if (length_i ()) // can-t this be done without such a hack?
-	istream_p_ = new std::stringstream (ch_C ());
+	istream_p_ = new std::istringstream (ch_C ());
       else
 	{
 	  istream_p_ = new std::istringstream ("");
diff -purN ../lilypond-1.5.66/input/regression/beam-french.ly ./input/regression/beam-french.ly
--- ../lilypond-1.5.66/input/regression/beam-french.ly	Thu Jan  1 01:00:00 1970
+++ ./input/regression/beam-french.ly	Sat Jul 13 03:30:00 2002
@@ -0,0 +1,14 @@
+
+\header {
+    texidoc = "French style beaming. In french beaming, the stems do not go to the outer beams."
+}
+
+\score { \notes
+\relative c'
+	 {
+	     \property Voice.Beam \override #'french-beaming = ##t
+	     [c16 c c c]
+	[c8 c16 c16 c8]
+	[c8 c16 e16 g8]
+
+    }}
diff -purN ../lilypond-1.5.66/input/regression/beam-funky.ly ./input/regression/beam-funky.ly
--- ../lilypond-1.5.66/input/regression/beam-funky.ly	Thu Jan  1 01:00:00 1970
+++ ./input/regression/beam-funky.ly	Sat Jul 13 20:44:30 2002
@@ -0,0 +1,31 @@
+\header {
+    texidoc = "Knee beaming. (funky)"
+}
+
+\score { \notes
+\relative c'
+	 {
+	     \property Voice.Beam \set #'auto-knee-gap = #7
+	     \property Voice.subdivideBeams = ##t	     
+	     \time 8/8
+	     [c,16  g'''16  
+	     c,,,16  g'''16 
+	     c,,,16  g'''16 	     	     
+	     c,,,16  g'''16 ]
+
+	     [c,,,16 c c c
+	      b'''   b b b]
+
+	     \transpose a, { \relative b'' { [g,16  g'''16  
+	     g,,,16  g'''16 
+	     g,,,16  g'''16 	     	     
+	     g,,,16  g'''16
+	     g g,,,
+	     g''' g,,,
+	     g''' g,,,
+	     g''' g,,,]	    }  }
+	     
+	 }
+\paper { linewidth = -1. } 
+
+     }
diff -purN ../lilypond-1.5.66/input/regression/beams.ly ./input/regression/beams.ly
--- ../lilypond-1.5.66/input/regression/beams.ly	Thu Jan  1 01:00:00 1970
+++ ./input/regression/beams.ly	Sat Jul 13 03:30:00 2002
@@ -0,0 +1,12 @@
+\header {
+    texidoc = "beams (simple)"
+}
+\score { \notes
+\relative c'
+	 {
+	[c16 c8.]
+	[c8. c16]
+	[c8 c16 c16 c8]
+	[c8 c16 e16 g8]
+
+    }}
diff -purN ../lilypond-1.5.66/input/regression/grace-auto-beam.ly ./input/regression/grace-auto-beam.ly
--- ../lilypond-1.5.66/input/regression/grace-auto-beam.ly	Thu Jan  1 01:00:00 1970
+++ ./input/regression/grace-auto-beam.ly	Fri Jul 12 01:07:08 2002
@@ -0,0 +1,12 @@
+\header
+{
+    texidoc = "The autobeamer is not confusde by grace notes."
+}
+
+\score{
+  \notes\context Voice \relative c'{
+
+    \grace a8 g16 f e f \grace a8 g16 f e f \grace a8 g16 f e f 
+        \grace a8 g16 f e f |
+  }
+}
diff -purN ../lilypond-1.5.66/input/regression/grace-unfold-repeat.ly ./input/regression/grace-unfold-repeat.ly
--- ../lilypond-1.5.66/input/regression/grace-unfold-repeat.ly	Thu Jan  1 01:00:00 1970
+++ ./input/regression/grace-unfold-repeat.ly	Fri Jul 12 01:07:08 2002
@@ -0,0 +1,15 @@
+\header {
+    texidoc = "Grace notes and unfolded repeats.
+Line breaks may happen before  grace  notes.
+"
+}
+    
+
+\score{
+  \notes\context Voice \relative c'{
+
+    % Bug 2: What happens with the grace notes here?
+    \repeat unfold  10 {\grace d8 c4 d e f}
+
+  }
+}
diff -purN ../lilypond-1.5.66/input/twinkle.ly ./input/twinkle.ly
--- ../lilypond-1.5.66/input/twinkle.ly	Wed May 15 13:36:29 2002
+++ ./input/twinkle.ly	Tue Jul  9 11:56:18 2002
@@ -114,6 +114,7 @@ textiii =  \lyrics{
 
 \score{
 	\notes <
+	        \property Score.automaticMelismata = ##f
 		\context Staff=i s1
 		\context Lyrics=top s1
 		\context GrandStaff <
diff -purN ../lilypond-1.5.66/lily/a2-engraver.cc ./lily/a2-engraver.cc
--- ../lilypond-1.5.66/lily/a2-engraver.cc	Sun Jul  7 15:44:57 2002
+++ ./lily/a2-engraver.cc	Wed Jul 10 15:33:34 2002
@@ -207,6 +207,6 @@ up for the musicexpr called @code{one}, 
 ",
 /* creats*/       "TextScript",
 /* acks  */       "multi-measure-rest-interface
-slur-interface stem-interface tie-interface note-head-interface"
+slur-interface stem-interface tie-interface note-head-interface dynamic-interface text-interface"
 ,/* reads */       "combineParts noDirection soloADue soloText soloIIText aDueText split-interval unison solo unisilence unirhythm",
 /* write */       "");
diff -purN ../lilypond-1.5.66/lily/all-font-metrics.cc ./lily/all-font-metrics.cc
--- ../lilypond-1.5.66/lily/all-font-metrics.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/all-font-metrics.cc	Thu Jul 11 12:51:30 2002
@@ -10,7 +10,7 @@
 #include "config.h"
 #include "main.hh"
 #include "all-font-metrics.hh"
-#include "debug.hh"
+
 #include "warn.hh"
 #include "afm.hh"
 #include "tfm.hh"
diff -purN ../lilypond-1.5.66/lily/audio-column.cc ./lily/audio-column.cc
--- ../lilypond-1.5.66/lily/audio-column.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/audio-column.cc	Thu Jul 11 12:51:30 2002
@@ -10,7 +10,7 @@
 #include "audio-item.hh"
 #include "performance.hh"
 
-#include "debug.hh"
+
 
 Audio_column::Audio_column (Moment at_mom)
 {
diff -purN ../lilypond-1.5.66/lily/audio-element.cc ./lily/audio-element.cc
--- ../lilypond-1.5.66/lily/audio-element.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/audio-element.cc	Thu Jul 11 12:51:30 2002
@@ -7,7 +7,7 @@
 */
 
 #include "audio-element.hh"
-#include "debug.hh"
+
 
 Audio_element::Audio_element ()
 {
diff -purN ../lilypond-1.5.66/lily/audio-item.cc ./lily/audio-item.cc
--- ../lilypond-1.5.66/lily/audio-item.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/audio-item.cc	Thu Jul 11 12:51:30 2002
@@ -5,7 +5,7 @@
 
   (c)  1997--2002 Jan Nieuwenhuizen <janneke@gnu.org>
 */
-#include "debug.hh"
+
 #include "audio-item.hh"
 #include "midi-item.hh"
 #include "audio-column.hh"
diff -purN ../lilypond-1.5.66/lily/auto-beam-engraver.cc ./lily/auto-beam-engraver.cc
--- ../lilypond-1.5.66/lily/auto-beam-engraver.cc	Sun Jul  7 15:44:57 2002
+++ ./lily/auto-beam-engraver.cc	Sat Jul 13 19:39:19 2002
@@ -11,7 +11,7 @@
 #include "musical-request.hh"
 #include "beam.hh"
 #include "stem.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "engraver-group-engraver.hh"
 #include "bar-line.hh"
 #include "rest.hh"
@@ -66,7 +66,9 @@ private:
   Moment beat_length_;
   
   // We act as if beam were created, and start a grouping anyway.
-  Beaming_info_list*grouping_p_;  
+  Beaming_info_list*grouping_p_;
+  SCM beam_settings_ ;		// ugh. should protect ? 
+  
   Beaming_info_list*finished_grouping_p_;
 };
 
@@ -80,6 +82,7 @@ Auto_beam_engraver::Auto_beam_engraver (
   finished_beam_p_ = 0;
   finished_grouping_p_ = 0;
   grouping_p_ = 0;
+  beam_settings_ = SCM_EOL;  
 }
 
 /*
@@ -109,6 +112,13 @@ Auto_beam_engraver::Auto_beam_engraver (
 bool
 Auto_beam_engraver::test_moment (Direction dir, Moment test_mom)
 {
+  Moment now = now_mom();
+  if (dir == START
+      && now.grace_part_)
+    {
+      return false;
+    }
+  
   SCM wild = scm_list_n (ly_symbol2scm ("*"), ly_symbol2scm ("*"), SCM_UNDEFINED);
   SCM function;
   if (dir == START)
@@ -186,6 +196,7 @@ Auto_beam_engraver::test_moment (Directi
 	/* but ending is not */
 	r = 1;
     }
+
   return !r;
 }
 
@@ -222,7 +233,7 @@ Auto_beam_engraver::create_beam_p ()
      return 0;
     }
   
-  Spanner* beam_p = new Spanner (get_property ("Beam"));
+  Spanner* beam_p = new Spanner (beam_settings_);
   for (int i = 0; i < stem_l_arr_p_->size (); i++)
     {
       /*
@@ -248,6 +259,8 @@ Auto_beam_engraver::begin_beam ()
   stem_l_arr_p_ = new Link_array<Item>;
   assert (!grouping_p_);
   grouping_p_ = new Beaming_info_list;
+  beam_settings_ = get_property ("Beam");
+  
   beam_start_moment_ = now_mom ();
   beam_start_location_ = *unsmob_moment (get_property ("measurePosition"));
   subdivide_beams_ = gh_scm2bool(get_property("subdivideBeams"));
@@ -264,7 +277,8 @@ Auto_beam_engraver::junk_beam () 
   stem_l_arr_p_ = 0;
   delete grouping_p_;
   grouping_p_ = 0;
-
+  beam_settings_ = SCM_EOL;
+  
   shortest_mom_ = Moment (Rational (1, 8));
 }
 
@@ -284,6 +298,7 @@ Auto_beam_engraver::end_beam ()
       delete stem_l_arr_p_;
       stem_l_arr_p_ = 0;
       grouping_p_ = 0;
+      beam_settings_ = SCM_EOL;
     }
 
   shortest_mom_ = Moment (Rational (1, 8));
diff -purN ../lilypond-1.5.66/lily/bar-line.cc ./lily/bar-line.cc
--- ../lilypond-1.5.66/lily/bar-line.cc	Fri May 17 00:38:04 2002
+++ ./lily/bar-line.cc	Thu Jul 11 12:51:30 2002
@@ -17,7 +17,7 @@
 #include "molecule.hh"
 #include "paper-def.hh"
 #include "font-interface.hh"
-#include "debug.hh"
+
 #include "all-font-metrics.hh"
 #include "item.hh"
 #include "staff-symbol-referencer.hh"
diff -purN ../lilypond-1.5.66/lily/beam.cc ./lily/beam.cc
--- ../lilypond-1.5.66/lily/beam.cc	Sat Jun  8 03:19:32 2002
+++ ./lily/beam.cc	Sat Jul 13 20:44:31 2002
@@ -9,21 +9,26 @@
 */
 
 /*
-  [TODO]
+TODO:
+
 
-  * Fix TODO
-  
   * Junk stem_info.
+
+  * Use Number_pair i.s.o Interval to represent (yl, yr).
+
+  * cross staff 
   
-  * Remove #'direction from beam.  A beam has no direction per se.
-    It may only set directions for stems.
+  - Determine auto knees based on positions if it's set by the user.
 
-  * Rewrite stem_beams.
 
-  * Use Number_pair i.s.o Interval to represent (yl, yr).
+Notes:
+
 
+ - Stems run to the Y-center of the beam.
   
-  */
+ - beam_space is the offset between Y centers of the beam.
+
+*/
 
 
 #include <math.h> // tanh.
@@ -84,33 +89,32 @@ Beam::add_stem (Grob *me, Grob *s)
 }
 
 Real
-Beam::get_interbeam (Grob *me)
+Beam::get_beam_space (Grob *me)
 {
   SCM func = me->get_grob_property ("space-function");
-  SCM s = gh_call2 (func, me->self_scm (), gh_int2scm (get_multiplicity (me)));
+  SCM s = gh_call2 (func, me->self_scm (), gh_int2scm (get_beam_count (me)));
   return gh_scm2double (s);
 }
 
 /*
-  Maximum multiplicity.
+  Maximum beam_count.
  */
 int
-Beam::get_multiplicity (Grob *me) 
+Beam::get_beam_count (Grob *me) 
 {
   int m = 0;
   for (SCM s = me->get_grob_property ("stems"); gh_pair_p (s); s = ly_cdr (s))
     {
       Grob *sc = unsmob_grob (ly_car (s));
-
-      if (Stem::has_interface (sc))
-	m = m >? Stem::beam_count (sc, LEFT) >? Stem::beam_count (sc, RIGHT);
+      
+      m = m >? (Stem::beam_multiplicity (sc).length () + 1);
     }
   return m;
 }
 
 MAKE_SCHEME_CALLBACK (Beam, space_function, 2);
 SCM
-Beam::space_function (SCM smob, SCM multiplicity)
+Beam::space_function (SCM smob, SCM beam_count)
 {
   Grob *me = unsmob_grob (smob);
   
@@ -119,11 +123,11 @@ Beam::space_function (SCM smob, SCM mult
   Real thickness = gh_scm2double (me->get_grob_property ("thickness"))
     * staff_space;
   
-  Real interbeam = gh_scm2int (multiplicity) < 4
+  Real beam_space = gh_scm2int (beam_count) < 4
     ? (2*staff_space + line - thickness) / 2.0
     : (3*staff_space + line - thickness) / 3.0;
   
-  return gh_double2scm (interbeam);
+  return gh_double2scm (beam_space);
 }
 
 
@@ -174,12 +178,267 @@ Beam::before_line_breaking (SCM smob)
 
       consider_auto_knees (me, d);
       set_stem_directions (me, d);
+
+      connect_beams (me);
+
       set_stem_shorten (me);
     }
 
   return SCM_EOL;
 }
 
+
+
+void
+Beam::connect_beams (Grob *me)
+{
+  Link_array<Grob> stems=
+    Pointer_group_interface__extract_grobs (me, (Grob*)0, "stems");
+
+  Slice last_int;
+  last_int.set_empty();
+  for (int i = 0; i< stems.size(); i++)
+    {
+      Grob *this_stem = stems[i];
+      SCM this_beaming = this_stem->get_grob_property ("beaming");
+
+      Direction this_dir = Directional_element_interface::get(this_stem);
+      if (i > 0)
+	{
+	  int start_point = last_int [this_dir];
+	  
+	  Direction d = LEFT;
+	  Slice new_slice ; 
+	  do
+	    {
+	      if (d == RIGHT && i == stems.size()-1)
+		continue;
+	      
+	      new_slice.set_empty();
+	      SCM s = index_get_cell (this_beaming, d);
+	      for (; gh_pair_p (s); s = gh_cdr (s))
+		{
+		  int new_beam_pos =
+		    start_point - this_dir * gh_scm2int (gh_car (s));
+
+		  new_slice.add_point (new_beam_pos);
+		  gh_set_car_x (s, gh_int2scm (new_beam_pos));
+		}
+	    }
+	  while (flip (&d) != LEFT);
+
+	  if (!new_slice.empty_b())
+	    last_int =  new_slice;
+	}
+      else
+	{
+	  SCM s = gh_cdr (this_beaming);
+	  for (; gh_pair_p (s); s = gh_cdr (s))
+	    {
+	      int np = - this_dir * gh_scm2int (gh_car(s));
+	      gh_set_car_x (s, gh_int2scm (np));
+	      last_int.add_point (np);
+	    }
+	}
+    }
+}
+
+MAKE_SCHEME_CALLBACK (Beam, brew_molecule, 1);
+SCM
+Beam::brew_molecule (SCM grob)
+{
+  Grob *me = unsmob_grob (grob);
+  Link_array<Grob> stems=
+    Pointer_group_interface__extract_grobs (me, (Grob*)0, "stems");
+  Grob* xcommon = common_refpoint_of_array (stems, me, X_AXIS);
+
+  Real x0, dx;
+  if (visible_stem_count (me))
+    {
+      // ugh -> use commonx
+      x0 = first_visible_stem (me)->relative_coordinate (xcommon, X_AXIS);
+      dx = last_visible_stem (me)->relative_coordinate (xcommon, X_AXIS) - x0;
+    }
+  else
+    {
+      x0 = stems[0]->relative_coordinate (xcommon, X_AXIS);
+      dx = stems.top ()->relative_coordinate (xcommon, X_AXIS) - x0;
+    }
+
+  SCM posns = me->get_grob_property ("positions");
+  Interval pos;
+  if (!ly_number_pair_p (posns))
+    {
+      programming_error ("No beam posns");
+      pos = Interval (0,0);
+    }
+  else
+    pos= ly_scm2interval (posns);
+
+  Real dy = pos.delta ();
+  Real dydx = dy && dx ? dy/dx : 0;
+  
+  Real thick = gh_scm2double (me->get_grob_property ("thickness"));
+  Real bdy = get_beam_space (me);
+
+  SCM last_beaming = SCM_EOL;;
+  Real last_xposn = -1;
+  Real last_width = -1 ;
+
+
+  SCM gap = me->get_grob_property ("gap");
+  Molecule the_beam;
+  Real lt = me->paper_l ()->get_var ("linethickness");
+  for (int i = 0; i< stems.size(); i++)
+    {
+      Grob * st =stems[i];
+      
+      SCM this_beaming = st->get_grob_property ("beaming");
+      Real xposn = st->relative_coordinate (xcommon, X_AXIS);
+      Real stem_width = gh_scm2double (st->get_grob_property ("thickness")) *lt;
+
+      if (i > 0)
+	{
+	  SCM left = gh_cdr (last_beaming);
+	  SCM right = gh_car (this_beaming);
+
+	  Array<int> fullbeams;
+	  Array<int> lfliebertjes;
+	  Array<int> rfliebertjes;	  
+
+	  for (SCM s = left;
+	       gh_pair_p (s); s =gh_cdr (s))
+	    {
+	      int b = gh_scm2int (gh_car (s));
+	      if (scm_memq (gh_car(s), right) != SCM_BOOL_F)
+		{
+		  fullbeams.push (b);
+		}
+	      else
+		{
+		  lfliebertjes.push (b); 
+		}
+	    }
+	  for (SCM s = right;
+	       gh_pair_p (s); s =gh_cdr (s))
+	    {
+	      int b = gh_scm2int (gh_car (s));
+	      if (scm_memq (gh_car(s), left) == SCM_BOOL_F)
+		{
+		  rfliebertjes.push (b);
+		}
+	    }
+
+	  
+	  Real w = xposn - last_xposn;
+	  Real stem_offset = 0.0;
+	  Real width_corr = 0.0;
+	  if (i == 1)
+	    {
+	      stem_offset -= last_width/2;
+	      width_corr += last_width/2;
+	    }
+	  
+	  if (i == stems.size() -1)
+	    {
+	      width_corr += stem_width/2;
+	    }
+
+	  if (gh_number_p (gap))
+	    {
+	      Real g = gh_scm2double (gap);
+	      stem_offset += g;
+	      width_corr -= 2*g; 
+	    }
+	  
+	  Molecule whole = Lookup::beam (dydx, w + width_corr, thick);
+	  for (int j = fullbeams.size(); j--;)
+	    {
+	      Molecule b (whole);
+	      b.translate_axis (last_xposn -  x0 + stem_offset, X_AXIS);
+	      b.translate_axis (dydx * (last_xposn - x0) + bdy * fullbeams[j], Y_AXIS);
+	      the_beam.add_molecule (b);	      
+	    }
+
+	  if (lfliebertjes.size() || rfliebertjes.size())
+	    {
+
+	      Real nw_f;
+	      if (!Stem::first_head (st))
+		nw_f = 0;
+	      else
+		{
+		  int t = Stem::duration_log (st); 
+
+		  SCM proc = me->get_grob_property ("flag-width-function");
+		  SCM result = gh_call1 (proc, gh_int2scm (t));
+		  nw_f = gh_scm2double (result);
+		}
+	      
+	      /* Half beam should be one note-width,
+		 but let's make sure two half-beams never touch */
+	      
+	      Real w = xposn - last_xposn;
+	      w = w/2 <? nw_f;
+
+	      Molecule half = Lookup::beam (dydx, w, thick);
+	      for (int j = lfliebertjes.size(); j--;)
+		{
+		  Molecule b (half);
+		  b.translate_axis (last_xposn -  x0, X_AXIS);
+		  b.translate_axis (dydx * (last_xposn-x0) + bdy * lfliebertjes[j], Y_AXIS);
+		  the_beam.add_molecule (b);	      
+		}
+	      for (int j = rfliebertjes.size(); j--;)
+		{
+		  Molecule b (half);
+		  b.translate_axis (xposn -  x0 - w , X_AXIS);
+		  b.translate_axis (dydx * (xposn-x0 -w) + bdy * rfliebertjes[j], Y_AXIS);
+		  the_beam.add_molecule (b);	      
+		}
+	    }
+      	}
+
+      last_xposn = xposn;
+      last_width = stem_width;
+      last_beaming = this_beaming;
+    }
+
+  the_beam.translate_axis (x0 - me->relative_coordinate (xcommon, X_AXIS), X_AXIS);
+  the_beam.translate_axis (pos[LEFT], Y_AXIS);
+
+#if (DEBUG_QUANTING)
+    {
+      /*
+	This code prints the demerits for each beam. Perhaps this
+	should be switchable for those who want to twiddle with the
+	parameters.
+      */
+      String str;
+      if (1)
+	{
+	  str += to_str (gh_scm2int (me->get_grob_property ("best-idx")));
+	  str += ":";
+	}
+      str += to_str (gh_scm2double (me->get_grob_property ("quant-score")),
+		     "%.2f");
+
+      SCM properties = Font_interface::font_alist_chain (me);
+
+      
+      Molecule tm = Text_item::text2molecule (me, ly_str02scm (str.ch_C ()), properties);
+      the_beam.add_at_edge (Y_AXIS, UP, tm, 5.0);
+    }
+#endif
+    
+  
+  
+  return the_beam.smobbed_copy();
+}
+  
+
+
+
 Direction
 Beam::get_default_dir (Grob *me) 
 {
@@ -295,9 +554,10 @@ Beam::consider_auto_knees (Grob *me, Dir
 	{
 	  for (int i=0; i < stems.size (); i++)
 	    {
-	      if (Stem::invisible_b (stems[i]))
-		continue;
 	      Item *s = stems[i];	  
+	      if (Stem::invisible_b (s) || 
+		  s->get_grob_property ("dir-forced") == SCM_BOOL_T)
+		continue;
 	      Real y = Stem::extremal_heads (stems[i])[d]
 		->relative_coordinate (common, Y_AXIS);
 
@@ -326,7 +586,7 @@ Beam::set_stem_shorten (Grob *m)
 
   Real forced_fraction = forced_stem_count (me) / visible_stem_count (me);
 
-  int multiplicity = get_multiplicity (me);
+  int beam_count = get_beam_count (me);
 
   SCM shorten = me->get_grob_property ("beamed-stem-shorten");
   if (shorten == SCM_EOL)
@@ -336,7 +596,7 @@ Beam::set_stem_shorten (Grob *m)
   
   Real staff_space = Staff_symbol_referencer::staff_space (me);
   SCM shorten_elt = scm_list_ref (shorten,
-				  gh_int2scm (multiplicity <? (sz - 1)));
+				  gh_int2scm (beam_count <? (sz - 1)));
   Real shorten_f = gh_scm2double (shorten_elt) * staff_space;
 
   /* your similar cute comment here */
@@ -360,13 +620,14 @@ Beam::after_line_breaking (SCM smob)
   SCM s = ly_deep_copy (me->get_grob_property ("positions"));
   me->set_grob_property ("positions", s);
 
-  if (ly_car (s) != SCM_BOOL_F)
-    return SCM_UNSPECIFIED;
+  if (ly_car (s) == SCM_BOOL_F)
+    {
 
-  // one wonders if such genericity is necessary  --hwn.
-  SCM callbacks = me->get_grob_property ("position-callbacks");
-  for (SCM i = callbacks; gh_pair_p (i); i = ly_cdr (i))
-    gh_call1 (ly_car (i), smob);
+      // one wonders if such genericity is necessary  --hwn.
+      SCM callbacks = me->get_grob_property ("position-callbacks");
+      for (SCM i = callbacks; gh_pair_p (i); i = ly_cdr (i))
+	gh_call1 (ly_car (i), smob);
+    }
 
   set_stem_lengths (me);  
   return SCM_UNSPECIFIED;
@@ -441,16 +702,18 @@ Beam::quanting (SCM smob)
   Array<Real> rbase_lengths;  
 
   Drul_array<bool> dirs_found(0,0);
+
+  bool french = to_boolean (me->get_grob_property ("french-beaming"));
   for (int i= 0; i < stems.size(); i++)
     {
       Grob*s = stems[i];
       stem_infos.push (Stem::calc_stem_info (s));
       dirs_found[stem_infos.top ().dir_] = true;
 
-      Real b = calc_stem_y (me, s, Interval (1,0), false);
+      Real b = calc_stem_y (me, s, Interval (1,0), french && i > 0&& (i < stems.size  () -1));
       lbase_lengths.push (b);
 
-      Real a = calc_stem_y (me, s, Interval (0,1), false);
+      Real a = calc_stem_y (me, s, Interval (0,1),  french && i > 0&& (i < stems.size  () -1));
       rbase_lengths.push (a);
     }
 
@@ -503,8 +766,8 @@ Beam::quanting (SCM smob)
       }
 
   Real rad = Staff_symbol_referencer::staff_radius (me);
-  int multiplicity = get_multiplicity (me);
-  Real interbeam = multiplicity < 4
+  int beam_count = get_beam_count (me);
+  Real beam_space = beam_count < 4
     ? (2*ss + slt - thickness) / 2.0
      : (3*ss + slt - thickness) / 3.0;
 
@@ -513,8 +776,8 @@ Beam::quanting (SCM smob)
       {
 	qscores[i].demerits
 	  += score_forbidden_quants (me, qscores[i].yl, qscores[i].yr,
-				     rad, slt, thickness, interbeam,
-				     multiplicity, ldir, rdir); 
+				     rad, slt, thickness, beam_space,
+				     beam_count, ldir, rdir); 
       }
 
 
@@ -623,8 +886,8 @@ Beam::score_forbidden_quants (Grob*me,
 			      Real yl, Real yr,
 			      Real rad,
 			      Real slt,
-			      Real thickness, Real interbeam,
-			      int multiplicity,
+			      Real thickness, Real beam_space,
+			      int beam_count,
 			      Direction ldir, Direction rdir)
 {
   Real dy = yr - yl;
@@ -635,8 +898,8 @@ Beam::score_forbidden_quants (Grob*me,
   if (fabs (yr) < rad && fabs ( my_modf (yr) - 0.5) < 1e-3)
     dem += INTER_QUANT_PENALTY;
 
-  // todo: use multiplicity of outer stems.
-  if (multiplicity >= 2)
+  // todo: use beam_count of outer stems.
+  if (beam_count >= 2)
     {
      
       Real straddle = 0.0;
@@ -645,10 +908,10 @@ Beam::score_forbidden_quants (Grob*me,
       Real hang = 1.0 - (thickness - slt) / 2;
       
 
-      if (fabs (yl - ldir * interbeam) < rad
+      if (fabs (yl - ldir * beam_space) < rad
 	  && fabs (my_modf (yl) - inter) < 1e-3)
 	dem += SECONDARY_BEAM_DEMERIT;
-      if (fabs (yr - rdir * interbeam) < rad
+      if (fabs (yr - rdir * beam_space) < rad
 	  && fabs (my_modf (yr) - inter) < 1e-3)
 	dem += SECONDARY_BEAM_DEMERIT;
 
@@ -665,7 +928,7 @@ Beam::score_forbidden_quants (Grob*me,
 
 
       // hmm, without Interval/Drul_array, you get ~ 4x same code...
-      if (fabs (yl - ldir * interbeam) < rad + inter)
+      if (fabs (yl - ldir * beam_space) < rad + inter)
 	{
 	  if (ldir == UP && dy <= eps
 	      && fabs (my_modf (yl) - sit) < eps)
@@ -676,7 +939,7 @@ Beam::score_forbidden_quants (Grob*me,
 	    dem += SECONDARY_BEAM_DEMERIT;
 	}
 
-      if (fabs (yr - rdir * interbeam) < rad + inter)
+      if (fabs (yr - rdir * beam_space) < rad + inter)
 	{
 	  if (rdir == UP && dy >= eps
 	      && fabs (my_modf (yr) - sit) < eps)
@@ -687,9 +950,9 @@ Beam::score_forbidden_quants (Grob*me,
 	    dem += SECONDARY_BEAM_DEMERIT;
 	}
       
-      if (multiplicity >= 3)
+      if (beam_count >= 3)
 	{
-	  if (fabs (yl - 2 * ldir * interbeam) < rad + inter)
+	  if (fabs (yl - 2 * ldir * beam_space) < rad + inter)
 	    {
 	      if (ldir == UP && dy <= eps
 		  && fabs (my_modf (yl) - straddle) < eps)
@@ -700,7 +963,7 @@ Beam::score_forbidden_quants (Grob*me,
 		dem += SECONDARY_BEAM_DEMERIT;
 	}
 	  
-	  if (fabs (yr - 2 * rdir * interbeam) < rad + inter)
+	  if (fabs (yr - 2 * rdir * beam_space) < rad + inter)
 	    {
 	      if (rdir == UP && dy >= eps
 		  && fabs (my_modf (yr) - straddle) < eps)
@@ -1062,24 +1325,30 @@ Beam::slope_damping (SCM smob)
   return SCM_UNSPECIFIED;
 }
 
+Slice
+where_are_the_whole_beams(SCM beaming)
+{
+  Slice l; 
+  
+  for( SCM s = gh_car (beaming); gh_pair_p (s) ; s = gh_cdr (s))
+    {
+      if (scm_memq (gh_car (s), gh_cdr (beaming)) != SCM_BOOL_F)
+	
+	l.add_point (gh_scm2int (gh_car (s)));
+    }
+
+  return l;
+}
+
 /*
   Calculate the Y position of the stem-end, given the Y-left, Y-right
   in POS, and for stem S.
-
-  If CORRECT, correct for multiplicity of beam in case of knees.
-
-
-  TODO: junk CORRECT from this.
  */
 Real
-Beam::calc_stem_y (Grob *me, Grob* s, Interval pos, bool correct)
+Beam::calc_stem_y (Grob *me, Grob* s, Interval pos, bool french) 
 {
-  int beam_multiplicity = get_multiplicity (me);
-  int stem_multiplicity = (Stem::duration_log (s) - 2) >? 0;
-  
-
   Real thick = gh_scm2double (me->get_grob_property ("thickness"));
-  Real interbeam = get_interbeam (me);
+  Real beam_space = get_beam_space (me);
 
   // ugh -> use commonx
   Grob * fvs = first_visible_stem (me);
@@ -1089,58 +1358,30 @@ Beam::calc_stem_y (Grob *me, Grob* s, In
   Real dx = fvs ? lvs->relative_coordinate (0, X_AXIS) - x0 : 0.0;
   Real r = s->relative_coordinate (0, X_AXIS) - x0;
   Real dy = pos.delta ();
-  Real stem_y = (dy && dx
-		 ? r / dx
-		 * dy
-		 : 0) + pos[LEFT];
+  Real stem_y_beam0 = (dy && dx
+		       ? r / dx
+		       * dy
+		       : 0) + pos[LEFT];
 
-  Direction my_dir = Directional_element_interface::get (s);
-  Direction first_dir = fvs? Directional_element_interface::get (fvs) : my_dir;
 
-  if (correct && my_dir != first_dir)
+  
+  Direction my_dir = Directional_element_interface::get (s);
+  SCM beaming = s->get_grob_property ("beaming");
+ 
+  Real stem_y = stem_y_beam0;
+  if (french)
     {
-      /*
-	WTF is happening here ?
-
-	 It looks as if this is some kind of fixup for multiple kneed
-	 beams to get a piece of stem at the #.
-	 
-
-                x
-	        |
-         =======|
-	 |======#
-	 |
-	 |
-	x 
-
-	Rules for this kind of stuff are hairy. In any event, the
-	current stem should look at the multiplicity of its
-	predecessor.
-
-	--hwn.
-	
-       */
-      
-      // FIXME, hairy stuff
-      stem_y += my_dir * (thick / 2 + (beam_multiplicity - 1) * interbeam);
-
-      // huh, why not for first visible?
-
-      /*
-	What the heck is happening here?? 
-       */
-      Grob *last_visible = last_visible_stem (me);
-      if (last_visible)
-	{
-	  if ( Staff_symbol_referencer::staff_symbol_l (s)
-	       != Staff_symbol_referencer::staff_symbol_l (last_visible))
-	    stem_y += Directional_element_interface::get (me)
-	      * (beam_multiplicity - stem_multiplicity) * interbeam;
-	}
-      else
-	programming_error ("No last visible stem");
+      Slice bm = where_are_the_whole_beams (beaming);
+      if (!bm.empty_b())
+	stem_y += beam_space * bm[-my_dir];
+    }
+  else
+    {
+      Slice bm = Stem::beam_multiplicity(s);
+      if (!bm.empty_b())
+	stem_y +=bm[my_dir] * beam_space;
     }
+
   return stem_y;
 }
 
@@ -1165,30 +1406,16 @@ Beam::set_stem_lengths (Grob *me)
   Interval pos = ly_scm2interval (me->get_grob_property ("positions"));
   Real staff_space = Staff_symbol_referencer::staff_space (me);
 
-  /*
-    DOCUMENT THIS.
-   */
-#if 0
-  Real thick = gh_scm2double (me->get_grob_property ("thickness"));
-  Direction dir = Directional_element_interface::get (me);
-  bool ps_testing = to_boolean (ly_symbol2scm ("ps-testing"));
-#endif
-  
+  bool french = to_boolean (me->get_grob_property ("french-beaming"));
+ 
   for (int i=0; i < stems.size (); i++)
     {
       Item* s = stems[i];
       if (Stem::invisible_b (s))
 	continue;
 
-      Real stem_y = calc_stem_y (me, s, pos, true);
+      Real stem_y = calc_stem_y (me, s, pos, french && i > 0&& (i < stems.size  () -1));
 
-#if 0
-      // doesn't play well with dvips
-      if (ps_testing)
-	if (Stem::get_direction (s) == dir)
-	  stem_y += Stem::get_direction (s) * thick / 2;
-#endif
-      
       /* caution: stem measures in staff-positions */
       Real id = me->relative_coordinate (common, Y_AXIS)
 	- stems[i]->relative_coordinate (common, Y_AXIS);
@@ -1205,13 +1432,21 @@ Beam::set_beaming (Grob *me, Beaming_inf
   Direction d = LEFT;
   for (int i=0; i  < stems.size (); i++)
     {
+      /*
+	Don't overwrite user settings.
+       */
+      
       do
 	{
-	  /* Don't overwrite user override (?) */
-	  if (Stem::beam_count (stems[i], d) == -1
-	      /* Don't set beaming for outside of outer stems */
-	      && ! (d == LEFT && i == 0)
-	      && ! (d == RIGHT && i == stems.size () -1))
+	  /* Don't set beaming for outside of outer stems */	  
+	  if ((d == LEFT && i == 0)
+	      ||(d == RIGHT && i == stems.size () -1))
+	    continue;
+
+
+	  SCM beaming_prop = stems[i]->get_grob_property ("beaming");
+	  if (beaming_prop == SCM_EOL ||
+	      index_get_cell (beaming_prop, d) == SCM_EOL)
 	    {
 	      int b = beaming->infos_.elem (i).beams_i_drul_[d];
 	      Stem::set_beaming (stems[i], b, d);
@@ -1221,239 +1456,6 @@ Beam::set_beaming (Grob *me, Beaming_inf
     }
 }
 
-
-
-/*
-  beams to go with one stem.
-
-  FIXME: clean me up:
-
-  The beam should be constructed by one function that knows where the
-  X and Y points are, and only inspects the stems to obtain
-  multiplicity and stem directions.
-  
-  */
-Molecule
-Beam::stem_beams (Grob *me, Item *here, Item *next, Item *prev, Real dydx)
-{
-  // ugh -> use commonx
-  if ((next
-       && ! (next->relative_coordinate (0, X_AXIS)
-	    > here->relative_coordinate (0, X_AXIS)))
-      || (prev
-	  && ! (prev->relative_coordinate (0, X_AXIS)
-	       < here->relative_coordinate (0, X_AXIS))))
-    programming_error ("Beams are not left-to-right");
-
-  Real thick = gh_scm2double (me->get_grob_property ("thickness"));
-  Real bdy = get_interbeam (me);
-  
-  Molecule leftbeams;
-  Molecule rightbeams;
-
-  Real nw_f;
-  if (!Stem::first_head (here))
-    nw_f = 0;
-  else
-    {
-      int t = Stem::duration_log (here); 
-
-      SCM proc = me->get_grob_property ("flag-width-function");
-      SCM result = gh_call1 (proc, gh_int2scm (t));
-      nw_f = gh_scm2double (result);
-    }
-
-
-  /* [Tremolo] beams on whole notes may not have direction set? */
-  Direction dir = Directional_element_interface::get (here);
-
-  /* half beams extending to the left. */
-  if (prev)
-    {
-      int lhalfs= lhalfs = Stem::beam_count (here, LEFT)
-	- Stem::beam_count (prev, RIGHT);
-      int lwholebeams= Stem::beam_count (here, LEFT)
-	<? Stem::beam_count (prev, RIGHT);
-      
-      /* Half beam should be one note-width,
-	 but let's make sure two half-beams never touch */
-
-      // FIXME: TODO (check) stem width / sloped beams
-      Real w = here->relative_coordinate (0, X_AXIS)
-	- prev->relative_coordinate (0, X_AXIS);
-      Real stem_w = gh_scm2double (prev->get_grob_property ("thickness"))
-	// URG
-	* me->paper_l ()->get_var ("linethickness");
-
-      w = w/2 <? nw_f;
-      Molecule a;
-      if (lhalfs)		// generates warnings if not
-	a =  Lookup::beam (dydx, w + stem_w, thick);
-      a.translate (Offset (-w, -w * dydx));
-      a.translate_axis (-stem_w/2, X_AXIS);
-      for (int j = 0; j  < lhalfs; j++)
-	{
-	  Molecule b (a);
-	  b.translate_axis (-dir * bdy * (lwholebeams+j), Y_AXIS);
-	  leftbeams.add_molecule (b);
-	}
-    }
-
-  if (next)
-    {
-      int rhalfs  = Stem::beam_count (here, RIGHT)
-	- Stem::beam_count (next, LEFT);
-      int rwholebeams= Stem::beam_count (here, RIGHT)
-	<? Stem::beam_count (next, LEFT);
-
-      Real w = next->relative_coordinate (0, X_AXIS)
-	- here->relative_coordinate (0, X_AXIS);
-
-      Real stem_w = gh_scm2double (next->get_grob_property ("thickness"))
-	// URG
-	* me->paper_l ()->get_var ("linethickness");
-
-      Molecule a = Lookup::beam (dydx, w + stem_w, thick);
-      a.translate_axis (- stem_w/2, X_AXIS);
-      int j = 0;
-      Real gap_f = 0;
-      
-      SCM gap = me->get_grob_property ("gap");
-      if (gh_number_p (gap))
-	{
-	  int gap_i = gh_scm2int ((gap));
-	  int nogap = rwholebeams - gap_i;
-	  
-	  for (; j  < nogap; j++)
-	    {
-	      Molecule b (a);
-	      b.translate_axis (-dir  * bdy * j, Y_AXIS);
-	      rightbeams.add_molecule (b);
-	    }
-	  if (Stem::invisible_b (here))
-	    gap_f = nw_f;
-	  else
-	    gap_f = nw_f / 2;
-	  w -= 2 * gap_f;
-	  a = Lookup::beam (dydx, w + stem_w, thick);
-	}
-
-      for (; j  < rwholebeams; j++)
-	{
-	  Molecule b (a);
-	  Real tx = 0;
-	  if (Stem::invisible_b (here))
-	    // ugh, see chord-tremolo.ly
-	    tx = (-dir + 1) / 2 * nw_f * 1.5 + gap_f/4;
-	  else
-	    tx = gap_f;
-	  b.translate (Offset (tx, -dir * bdy * j));
-	  rightbeams.add_molecule (b);
-	}
-
-      w = w/2 <? nw_f;
-      if (rhalfs)
-	a = Lookup::beam (dydx, w, thick);
-
-      for (; j  < rwholebeams + rhalfs; j++)
-	{
-	  Molecule b (a);
-	  b.translate_axis (- dir * bdy * j, Y_AXIS);
-	  rightbeams.add_molecule (b);
-	}
-
-    }
-  leftbeams.add_molecule (rightbeams);
-
-  return leftbeams;
-}
-
-
-MAKE_SCHEME_CALLBACK (Beam, brew_molecule, 1);
-SCM
-Beam::brew_molecule (SCM smob)
-{
-  Grob *me =unsmob_grob (smob);
-
-  Molecule mol;
-  if (!gh_pair_p (me->get_grob_property ("stems")))
-    return SCM_EOL;
-  Real x0, dx;
-  Link_array<Item>stems = 
-    Pointer_group_interface__extract_grobs (me, (Item*) 0, "stems");  
-  if (visible_stem_count (me))
-    {
-      // ugh -> use commonx
-      x0 = first_visible_stem (me)->relative_coordinate (0, X_AXIS);
-      dx = last_visible_stem (me)->relative_coordinate (0, X_AXIS) - x0;
-    }
-  else
-    {
-      x0 = stems[0]->relative_coordinate (0, X_AXIS);
-      dx = stems.top ()->relative_coordinate (0, X_AXIS) - x0;
-    }
-
-  SCM posns = me->get_grob_property ("positions");
-  Interval pos;
-  if (!ly_number_pair_p (posns))
-    {
-      programming_error ("No beam posns");
-      pos = Interval (0,0);
-    }
-  else
-    pos= ly_scm2interval (posns);
-  Real dy = pos.delta ();
-  Real dydx = dy && dx ? dy/dx : 0;
-
-
-  for (int i=0; i < stems.size (); i++)
-    {
-      Item *item = stems[i];
-      Item *prev = (i > 0)? stems[i-1] : 0;
-      Item *next = (i < stems.size ()-1) ? stems[i+1] :0;
-
-
-      
-      Molecule sb = stem_beams (me, item, next, prev, dydx);
-      Real x = item->relative_coordinate (0, X_AXIS) - x0;
-      sb.translate (Offset (x, x * dydx + pos[LEFT]));
-
-
-      mol.add_molecule (sb);
-    }
-  
-  mol.translate_axis (x0 
-		      - dynamic_cast<Spanner*> (me)
-		      ->get_bound (LEFT)->relative_coordinate (0, X_AXIS),
-		      X_AXIS);
-
-#if (DEBUG_QUANTING)
-    {
-      /*
-	This code prints the demerits for each beam. Perhaps this
-	should be switchable for those who want to twiddle with the
-	parameters.
-      */
-      String str;
-      if (1)
-	{
-	  str += to_str (gh_scm2int (me->get_grob_property ("best-idx")));
-	  str += ":";
-	}
-      str += to_str (gh_scm2double (me->get_grob_property ("quant-score")),
-		     "%.2f");
-
-      SCM properties = Font_interface::font_alist_chain (me);
-
-      
-      Molecule tm = Text_item::text2molecule (me, ly_str02scm (str.ch_C ()), properties);
-      mol.add_at_edge (Y_AXIS, UP, tm, 5.0);
-    }
-#endif
-    
-  return mol.smobbed_copy ();
-}
-
 int
 Beam::forced_stem_count (Grob *me) 
 {
@@ -1609,6 +1611,6 @@ the ideal slope, how close the result is
 take the best scoring combination.
 
 ",
-  "position-callbacks concaveness-gap concaveness-threshold dir-function quant-score auto-knee-gap gap chord-tremolo beamed-stem-shorten shorten least-squares-dy damping flag-width-function neutral-direction positions space-function thickness");
+  "french-beaming position-callbacks concaveness-gap concaveness-threshold dir-function quant-score auto-knee-gap gap chord-tremolo beamed-stem-shorten shorten least-squares-dy damping flag-width-function neutral-direction positions space-function thickness");
 
 
diff -purN ../lilypond-1.5.66/lily/break-algorithm.cc ./lily/break-algorithm.cc
--- ../lilypond-1.5.66/lily/break-algorithm.cc	Sun Apr 21 15:52:03 2002
+++ ./lily/break-algorithm.cc	Fri Jul 12 12:28:07 2002
@@ -9,7 +9,6 @@
 #include "paper-column.hh"
 #include "break-algorithm.hh"
 #include "paper-def.hh"
-#include "debug.hh"
 #include "system.hh"
 #include "paper-score.hh"
 #include "paper-column.hh"
diff -purN ../lilypond-1.5.66/lily/breathing-sign.cc ./lily/breathing-sign.cc
--- ../lilypond-1.5.66/lily/breathing-sign.cc	Sun Mar 24 21:46:53 2002
+++ ./lily/breathing-sign.cc	Thu Jul 11 12:51:30 2002
@@ -16,7 +16,7 @@
 #include "molecule.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
-#include "debug.hh"
+
 #include "dimensions.hh"
 #include "direction.hh"
 
diff -purN ../lilypond-1.5.66/lily/change-iterator.cc ./lily/change-iterator.cc
--- ../lilypond-1.5.66/lily/change-iterator.cc	Mon Feb  4 00:12:07 2002
+++ ./lily/change-iterator.cc	Thu Jul 11 12:52:02 2002
@@ -9,7 +9,8 @@
 #include "change-iterator.hh"
 #include "translator-group.hh"
 #include "music.hh"
-#include "debug.hh"
+#include "warn.hh"
+
 
 
 void
diff -purN ../lilypond-1.5.66/lily/chord-tremolo-iterator.cc ./lily/chord-tremolo-iterator.cc
--- ../lilypond-1.5.66/lily/chord-tremolo-iterator.cc	Sun May  5 15:44:49 2002
+++ ./lily/chord-tremolo-iterator.cc	Mon Jul  8 11:12:20 2002
@@ -34,6 +34,7 @@ Chord_tremolo_iterator::Chord_tremolo_it
 Chord_tremolo_iterator::Chord_tremolo_iterator (Chord_tremolo_iterator const &src)
   : Music_iterator (src)
 {
+  factor_ = src.factor_;
   child_iter_p_ = src.child_iter_p_ ? src.child_iter_p_->clone () : 0; 
 }
 
diff -purN ../lilypond-1.5.66/lily/chord.cc ./lily/chord.cc
--- ../lilypond-1.5.66/lily/chord.cc	Sun May 19 02:12:03 2002
+++ ./lily/chord.cc	Thu Jul 11 12:51:30 2002
@@ -9,7 +9,7 @@
 #include "chord.hh"
 #include "musical-request.hh"
 #include "warn.hh"
-#include "debug.hh"
+
 #include "music-list.hh"
 #include "musical-request.hh"
 
diff -purN ../lilypond-1.5.66/lily/clef-engraver.cc ./lily/clef-engraver.cc
--- ../lilypond-1.5.66/lily/clef-engraver.cc	Fri Jun 21 11:34:28 2002
+++ ./lily/clef-engraver.cc	Thu Jul 11 12:51:30 2002
@@ -14,7 +14,7 @@
 
 #include "bar-line.hh"
 #include "staff-symbol-referencer.hh"
-#include "debug.hh"
+
 #include "engraver.hh"
 #include "direction.hh"
 #include "side-position-interface.hh"
diff -purN ../lilypond-1.5.66/lily/column-x-positions.cc ./lily/column-x-positions.cc
--- ../lilypond-1.5.66/lily/column-x-positions.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/column-x-positions.cc	Thu Jul 11 12:51:30 2002
@@ -8,7 +8,7 @@
 
 #include "column-x-positions.hh"
 #include "real.hh"
-#include "debug.hh"
+
 
 Column_x_positions::Column_x_positions ()
 {
diff -purN ../lilypond-1.5.66/lily/command-request.cc ./lily/command-request.cc
--- ../lilypond-1.5.66/lily/command-request.cc	Thu Feb 28 18:29:52 2002
+++ ./lily/command-request.cc	Thu Jul 11 12:51:30 2002
@@ -7,7 +7,7 @@
 */
 
 #include "command-request.hh"
-#include "debug.hh"
+
 #include "musical-request.hh"
 
 Tempo_req::Tempo_req ()
diff -purN ../lilypond-1.5.66/lily/custos.cc ./lily/custos.cc
--- ../lilypond-1.5.66/lily/custos.cc	Wed Apr 10 19:25:36 2002
+++ ./lily/custos.cc	Thu Jul 11 12:52:31 2002
@@ -24,7 +24,7 @@
 #include "staff-symbol-referencer.hh"
 #include "custos.hh"
 #include "molecule.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "note-head.hh"
 #include "item.hh"
 #include "font-interface.hh"
diff -purN ../lilypond-1.5.66/lily/cxx-function-smob.cc ./lily/cxx-function-smob.cc
--- ../lilypond-1.5.66/lily/cxx-function-smob.cc	Sun May 19 02:12:04 2002
+++ ./lily/cxx-function-smob.cc	Sat Jul 13 19:39:19 2002
@@ -50,11 +50,7 @@ SCM
 smobify_cxx_function (Cxx_function cb)
 {
   SCM z;
-  
-  SCM_NEWCELL (z);
-  SCM_SETCDR (z, (SCM)cb);
-  SCM_SETCAR (z, (SCM)callback_tag);
-
+  SCM_NEWSMOB(z,callback_tag, cb) ;
   return z;
 }
 
diff -purN ../lilypond-1.5.66/lily/dimensions.cc ./lily/dimensions.cc
--- ../lilypond-1.5.66/lily/dimensions.cc	Fri Oct 23 14:23:14 1998
+++ ./lily/dimensions.cc	Thu Jul 11 12:52:31 2002
@@ -1,7 +1,7 @@
 // dimensions.cc
 
 #include "dimensions.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "string.hh"
 
 String
diff -purN ../lilypond-1.5.66/lily/duration.cc ./lily/duration.cc
--- ../lilypond-1.5.66/lily/duration.cc	Sun May 19 02:12:04 2002
+++ ./lily/duration.cc	Sat Jul 13 19:39:19 2002
@@ -70,7 +70,14 @@ Duration::length_mom () const
 String
 Duration::str () const
 {
-  String s =  to_str (durlog_i_) + to_str ('.', dots_i_);
+  String s;
+
+  if (durlog_i_ < 0  )
+    s = "log = "  + to_str (durlog_i_);
+  else
+    s = to_str (1 << durlog_i_);
+  
+  s += to_str ('.', dots_i_);
   if (factor_ != Moment (Rational (1,1)))
     {
       s += "*" + factor_.str ();
@@ -88,8 +95,6 @@ Duration::mark_smob (SCM)
 }
 
 IMPLEMENT_SIMPLE_SMOBS (Duration);
-
-
 int
 Duration::print_smob (SCM s, SCM port, scm_print_state *)
 {
diff -purN ../lilypond-1.5.66/lily/dynamic-engraver.cc ./lily/dynamic-engraver.cc
--- ../lilypond-1.5.66/lily/dynamic-engraver.cc	Thu Jul  4 13:03:24 2002
+++ ./lily/dynamic-engraver.cc	Thu Jul 11 12:52:31 2002
@@ -5,7 +5,7 @@
 
   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
-#include "debug.hh"
+#include "warn.hh"
 #include "dimensions.hh"
 #include "hairpin.hh"
 #include "musical-request.hh"
diff -purN ../lilypond-1.5.66/lily/engraver-group-engraver.cc ./lily/engraver-group-engraver.cc
--- ../lilypond-1.5.66/lily/engraver-group-engraver.cc	Sun Jul  7 16:44:26 2002
+++ ./lily/engraver-group-engraver.cc	Thu Jul 11 12:52:31 2002
@@ -9,7 +9,7 @@
 #include "flower-proto.hh"
 #include "engraver-group-engraver.hh"
 #include "engraver.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "paper-score.hh"
 #include "grob.hh"
 
diff -purN ../lilypond-1.5.66/lily/forbid-break-engraver.cc ./lily/forbid-break-engraver.cc
--- ../lilypond-1.5.66/lily/forbid-break-engraver.cc	Mon Jun 17 00:43:05 2002
+++ ./lily/forbid-break-engraver.cc	Fri Jul 12 12:27:34 2002
@@ -29,7 +29,7 @@ Forbid_line_break_engraver::start_transl
   SCM busy = get_property ("busyGrobs");
 
   Moment now = now_mom();
-  while (gh_pair_p (busy) && *unsmob_moment (gh_caar (busy)) == now)
+  while (gh_pair_p (busy) && unsmob_moment (gh_caar (busy))->main_part_ == now.main_part_)
     busy = gh_cdr (busy);
 
   
diff -purN ../lilypond-1.5.66/lily/global-translator.cc ./lily/global-translator.cc
--- ../lilypond-1.5.66/lily/global-translator.cc	Wed Jun 19 19:56:16 2002
+++ ./lily/global-translator.cc	Thu Jul 11 12:52:31 2002
@@ -7,7 +7,7 @@
 */
 #include <stdio.h>
 
-#include "debug.hh"
+#include "warn.hh"
 #include "music.hh"
 #include "request.hh"
 #include "music-list.hh"
diff -purN ../lilypond-1.5.66/lily/gourlay-breaking.cc ./lily/gourlay-breaking.cc
--- ../lilypond-1.5.66/lily/gourlay-breaking.cc	Fri Jun  7 19:01:56 2002
+++ ./lily/gourlay-breaking.cc	Thu Jul 11 12:52:56 2002
@@ -9,7 +9,8 @@
 
 #include "gourlay-breaking.hh"
 #include "column-x-positions.hh"
-#include "debug.hh"
+#include "warn.hh"
+#include "main.hh"
 #include "paper-column.hh"
 #include "paper-score.hh"
 #include "paper-def.hh"
diff -purN ../lilypond-1.5.66/lily/grob-property.cc ./lily/grob-property.cc
--- ../lilypond-1.5.66/lily/grob-property.cc	Thu Jul  4 14:33:34 2002
+++ ./lily/grob-property.cc	Fri Jul 12 12:27:34 2002
@@ -13,7 +13,7 @@
 #include "paper-score.hh"
 #include "paper-def.hh"
 #include "grob.hh"
-#include "debug.hh"
+
 #include "spanner.hh"
 #include "item.hh"
 #include "misc.hh"
diff -purN ../lilypond-1.5.66/lily/grob.cc ./lily/grob.cc
--- ../lilypond-1.5.66/lily/grob.cc	Thu Jul  4 13:03:24 2002
+++ ./lily/grob.cc	Fri Jul 12 12:28:56 2002
@@ -12,21 +12,18 @@
 
 #include "main.hh"
 #include "input-smob.hh"
-
+#include "warn.hh"
 #include "group-interface.hh"
 #include "misc.hh"
 #include "paper-score.hh"
-#include "paper-def.hh"
 #include "molecule.hh"
 #include "grob.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "spanner.hh"
 #include "system.hh"
 #include "item.hh"
-#include "paper-column.hh"
 #include "molecule.hh"
 #include "misc.hh"
-#include "paper-outputter.hh"
 #include "music.hh"
 #include "item.hh"
 
diff -purN ../lilypond-1.5.66/lily/hairpin.cc ./lily/hairpin.cc
--- ../lilypond-1.5.66/lily/hairpin.cc	Mon Apr  1 21:43:39 2002
+++ ./lily/hairpin.cc	Thu Jul 11 12:52:31 2002
@@ -12,7 +12,7 @@
 #include "font-interface.hh"
 #include "dimensions.hh"
 #include "paper-def.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "paper-column.hh"
 #include "lookup.hh"
 
diff -purN ../lilypond-1.5.66/lily/hara-kiri-group-spanner.cc ./lily/hara-kiri-group-spanner.cc
--- ../lilypond-1.5.66/lily/hara-kiri-group-spanner.cc	Wed Apr 10 19:25:36 2002
+++ ./lily/hara-kiri-group-spanner.cc	Thu Jul 11 12:52:31 2002
@@ -10,7 +10,7 @@
 #include "axis-group-interface.hh"
 #include "spanner.hh"
 #include "hara-kiri-group-spanner.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "item.hh"
 
 
diff -purN ../lilypond-1.5.66/lily/includable-lexer.cc ./lily/includable-lexer.cc
--- ../lilypond-1.5.66/lily/includable-lexer.cc	Sun Jul  7 15:44:58 2002
+++ ./lily/includable-lexer.cc	Thu Jul 11 12:52:31 2002
@@ -13,7 +13,7 @@
 #include "includable-lexer.hh"
 #include "source-file.hh"
 #include "source.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "main.hh"
 
 #ifndef YY_BUF_SIZE
diff -purN ../lilypond-1.5.66/lily/include/beam.hh ./lily/include/beam.hh
--- ../lilypond-1.5.66/lily/include/beam.hh	Mon Jun  3 10:40:36 2002
+++ ./lily/include/beam.hh	Sat Jul 13 19:39:20 2002
@@ -24,13 +24,14 @@ public:
   static void add_stem (Grob*,Grob*);
   static void set_beaming (Grob*,Beaming_info_list *);
   static void set_stemlens (Grob*);
-  static int get_multiplicity (Grob*me);
-  static Real get_interbeam (Grob*me);
+  static int get_beam_count (Grob*me);
+  static Real get_beam_space (Grob*me);
+  static void connect_beams (Grob*me);
   DECLARE_SCHEME_CALLBACK (space_function, (SCM, SCM));
   DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
   DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
-
+  
   /* position callbacks */
   DECLARE_SCHEME_CALLBACK (least_squares, (SCM));
   DECLARE_SCHEME_CALLBACK (check_concave, (SCM));
@@ -47,15 +48,12 @@ public:
 				      int, Direction, Direction);
   
   
-  static Molecule stem_beams (Grob*,Item *here, Item *next, Item *prev,
-			      Real dydx);
-
 private:
   static Direction get_default_dir (Grob*);
   static void set_stem_directions (Grob*, Direction );
   static void consider_auto_knees (Grob*, Direction d);
   static void set_stem_shorten (Grob*);
-  static Real calc_stem_y (Grob*, Grob* s, Interval pos, bool correct);
+  static Real calc_stem_y (Grob*, Grob* s, Interval pos, bool french);
   static void set_stem_lengths (Grob*);
   static int forced_stem_count (Grob*);
 };
diff -purN ../lilypond-1.5.66/lily/include/debug.hh ./lily/include/debug.hh
--- ../lilypond-1.5.66/lily/include/debug.hh	Sun Apr  1 15:04:08 2001
+++ ./lily/include/debug.hh	Thu Jan  1 01:00:00 1970
@@ -1,16 +0,0 @@
-/*
-  Argh! this sux! implementation not liblily
- */
-
-#ifndef DEBUG_HH
-#define DEBUG_HH
-
-#include <assert.h>
-
-#include "real.hh"
-#include "lily-proto.hh"
-#include "warn.hh"
-
-void progress_indication (String);
-
-#endif
diff -purN ../lilypond-1.5.66/lily/include/hairpin.hh ./lily/include/hairpin.hh
--- ../lilypond-1.5.66/lily/include/hairpin.hh	Fri Feb  1 19:16:22 2002
+++ ./lily/include/hairpin.hh	Thu Jul 11 12:52:44 2002
@@ -11,6 +11,7 @@
 #define HAIRPIN_HH
 
 #include "lily-guile.hh"
+#include "lily-proto.hh"
 /**
   The hairpin symbol. 
  */
diff -purN ../lilypond-1.5.66/lily/include/lily-guile.hh ./lily/include/lily-guile.hh
--- ../lilypond-1.5.66/lily/include/lily-guile.hh	Sun Jul  7 15:44:58 2002
+++ ./lily/include/lily-guile.hh	Sat Jul 13 20:05:59 2002
@@ -69,6 +69,10 @@ inline SCM scm_c_make_vector  (int k, SC
 
 #endif
 
+#if GUILE_MINOR_VERSION < 7
+#define scm_gc_unregister_collectable_memory(a,b,c) scm_done_free(b)
+#define scm_gc_register_collectable_memory(a,b,c) scm_done_malloc(b)
+#endif
 
 #include "direction.hh"
 #include "flower-proto.hh"
@@ -142,6 +146,7 @@ Offset ly_scm2offset (SCM);
 SCM ly_assoc_chain (SCM key, SCM achain);
 SCM ly_assoc_cdr (SCM key, SCM alist);
 Interval ly_scm2interval (SCM);
+Slice int_list_to_slice (SCM l);
 SCM ly_interval2scm (Drul_array<Real>);
 
 void taint (SCM *);
@@ -207,8 +212,8 @@ bool to_boolean (SCM s);
 void init_ly_protection ();
 unsigned int ly_scm_hash (SCM s);
 
-SCM index_cell (SCM cellp, Direction d);
-SCM index_set_cell (SCM cellp, Direction d, SCM val);
+SCM index_get_cell (SCM cell, Direction d);
+SCM index_set_cell (SCM cell, Direction d, SCM val);
 
 
 
diff -purN ../lilypond-1.5.66/lily/include/ly-smobs.icc ./lily/include/ly-smobs.icc
--- ../lilypond-1.5.66/lily/include/ly-smobs.icc	Sun May 19 02:12:09 2002
+++ ./lily/include/ly-smobs.icc	Sat Jul 13 19:39:20 2002
@@ -54,7 +54,7 @@ SCM CL::smobbed_self () const					\
 {								\
   SCM s;							\
   s = gh_cons (SCM_PACK (CL::smob_tag_), SCM_PACK (this));	\
-  scm_done_malloc (sizeof (CL));				\
+  scm_gc_register_collectable_memory ((CL*)this, sizeof (CL), #CL " smob");				\
 								\
   return s;							\
 }								\
@@ -62,9 +62,10 @@ size_t  							\
 CL::free_smob (SCM ses)						\
 {								\
   CL * s = (CL*) SCM_CDR (ses);					\
-   delete s;							\
-  return sizeof (CL);						\
-}								\
+  delete s;							\
+  scm_gc_unregister_collectable_memory (s, sizeof (CL), #CL " smob");  \
+  return 0;\
+}\
 ADD_SCM_INIT_FUNC (CL, CL::init_smobs)
 
 #define IMPLEMENT_SMOBS(CL)							\
@@ -87,12 +88,10 @@ CL::unprotected_smobify_self ()								\
     deal half-initialized objects: scm_done_malloc ( ) might trigger GC.		\
     the warning in smobs.hh is just to be doubleplus goodly sure		\
    */										\
-  SCM s;										\
-  SCM_NEWCELL (s);								\
-  SCM_SETCAR (s,CL::smob_tag_);							\
-  SCM_SETCDR (s, SCM_PACK (this));						\
+  SCM s;\
+  SCM_NEWSMOB (s, CL::smob_tag_, this);\
   self_scm_ = s;								\
- scm_done_malloc (sizeof (CL));							\
+ scm_gc_register_collectable_memory (this, sizeof (CL), #CL " smob");							\
   return s;									\
 }
 
diff -purN ../lilypond-1.5.66/lily/include/main.hh ./lily/include/main.hh
--- ../lilypond-1.5.66/lily/include/main.hh	Fri May 17 00:38:06 2002
+++ ./lily/include/main.hh	Thu Jul 11 12:51:14 2002
@@ -20,6 +20,7 @@ String find_file (String);
 void call_constructors ();
 extern Array<String> get_inclusion_names ();
 extern void set_inclusion_names (Array<String>);
+void progress_indication (String);
 
 /* options */
 extern bool dependency_global_b;
diff -purN ../lilypond-1.5.66/lily/include/paper-column.hh ./lily/include/paper-column.hh
--- ../lilypond-1.5.66/lily/include/paper-column.hh	Wed Apr 10 19:25:36 2002
+++ ./lily/include/paper-column.hh	Wed Jul 10 15:16:24 2002
@@ -24,13 +24,14 @@ public:
   virtual void do_break_processing ();
   virtual Paper_column *column_l () const;
   virtual System *line_l () const;
-
+  
   /// if lines are broken then this column is in #line#
   System *line_l_;
 
   static int rank_i (Grob*);
 
   DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM));
+  DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM));
   
   Paper_column (SCM);
   static bool musical_b (Grob *);
diff -purN ../lilypond-1.5.66/lily/include/rod.hh ./lily/include/rod.hh
--- ../lilypond-1.5.66/lily/include/rod.hh	Fri Feb  1 19:16:23 2002
+++ ./lily/include/rod.hh	Fri Jul 12 12:29:19 2002
@@ -9,12 +9,11 @@
 
 #ifndef ROD_HH
 #define ROD_HH
+
 #include "lily-proto.hh"
 #include "direction.hh"
 #include "drul-array.hh"
 
-
-
 struct Rod
 {
   Drul_array <Item*> item_l_drul_;
@@ -29,5 +28,6 @@ struct Rod
 
   Rod ();
 };
+
 #endif /* ROD_HH */
 
diff -purN ../lilypond-1.5.66/lily/include/sequential-iterator.hh ./lily/include/sequential-iterator.hh
--- ../lilypond-1.5.66/lily/include/sequential-iterator.hh	Thu Jan  1 01:00:00 1970
+++ ./lily/include/sequential-iterator.hh	Sat Jul 13 19:39:20 2002
@@ -0,0 +1,83 @@
+/*   
+  sequential-iterator.hh -- declare Sequential_iterator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#ifndef SEQUENTIAL_ITERATOR_HH
+#define SEQUENTIAL_ITERATOR_HH
+
+#include "music-iterator.hh"
+#include "protected-scm.hh"
+
+/*
+
+  This is a lookahead list for grace notes.
+
+   {  ... X \grace Y  Z ... }
+
+   normally, the ending of X is the start of Z. In case of a grace
+   note, we take off a little at the end of X. What is stored: START
+   (start point of X), LENGTH (length of X), GRACE_START (start_music
+   of Y), and the next fixup element.
+
+  This is also done for nested musics, i.e.
+
+  voiceA = \notes { \grace b16 c'2 }
+  voiceB = \notes { c'2 \voiceA }
+
+  the iterator for voiceB will contain a fixup entry with (START=0/1,
+  LENGTH=2/1, GRACE_START=(0G-1/16) ) 
+   
+  Graces at the start of a sequential music iterator are handled
+  by initting here_mom_ with Music::start_music (); no fixups are needed.
+
+*/
+struct Grace_fixup 
+{
+  Moment start_;
+  Moment length_;
+
+  Rational grace_start_;  
+  Grace_fixup *next_;
+};
+
+/** Sequential_music iteration: walk each element in turn, and
+  construct an iterator for every element.
+  
+ */
+class Sequential_iterator :  public Music_iterator
+{
+public:
+  Grace_fixup * grace_fixups_;
+  
+  VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function;
+  Sequential_iterator ();
+  Sequential_iterator (Sequential_iterator const&);
+  virtual ~Sequential_iterator ();
+
+  virtual void construct_children ();
+  virtual Moment pending_moment () const;
+  virtual bool ok () const;
+  virtual void skip (Moment);
+  virtual SCM get_music (Moment)const;
+
+protected:
+  virtual void process (Moment);
+  virtual Music_iterator *try_music_in_children (Music *) const;
+
+protected:
+  Moment here_mom_;
+  Music_iterator * iter_p_;
+  Protected_scm  list_;
+  SCM cursor_;
+  
+  virtual void next_element (bool side_effect);
+  virtual void descend_to_child ();
+  virtual SCM get_music_list ()const;
+};
+
+#endif /* SEQUENTIAL_ITERATOR_HH */
diff -purN ../lilypond-1.5.66/lily/include/sequential-music-iterator.hh ./lily/include/sequential-music-iterator.hh
--- ../lilypond-1.5.66/lily/include/sequential-music-iterator.hh	Fri Feb  1 19:16:23 2002
+++ ./lily/include/sequential-music-iterator.hh	Fri Jul 12 12:27:36 2002
@@ -9,73 +9,20 @@
 #ifndef SEQUENTIAL_MUSIC_ITERATOR_HH
 #define SEQUENTIAL_MUSIC_ITERATOR_HH
 
-#include "music-iterator.hh"
-
-
-/*
-
-  This is a lookahead list for grace notes.
-
-   {  ... X \grace Y  Z ... }
-
-   normally, the ending of X is the start of Z. In case of a grace
-   note, we take off a little at the end of X. What is stored: START
-   (start point of X), LENGTH (length of X), GRACE_START (start_music
-   of Y), and the next fixup element.
-
-  This is also done for nested musics, i.e.
-
-  voiceA = \notes { \grace b16 c'2 }
-  voiceB = \notes { c'2 \voiceA }
-
-  the iterator for voiceB will contain a fixup entry with (START=0/1,
-  LENGTH=2/1, GRACE_START=(0G-1/16) ) 
-   
-  Graces at the start of a sequential music iterator are handled
-  by initting here_mom_ with Music::start_music (); no fixups are needed.
-
-*/
-struct Grace_fixup 
-{
-  Moment start_;
-  Moment length_;
-
-  Rational grace_start_;  
-  Grace_fixup *next_;
-};
+#include "sequential-iterator.hh"
 
 /** Sequential_music iteration: walk each element in turn, and
   construct an iterator for every element.
   
  */
-class Sequential_music_iterator :  public Music_iterator
+class Sequential_music_iterator :  public Sequential_iterator
 {
 public:
-  Grace_fixup * grace_fixups_;
-  
   VIRTUAL_COPY_CONS (Music_iterator);
   static SCM constructor_cxx_function;
-  Sequential_music_iterator ();
-  Sequential_music_iterator (Sequential_music_iterator const&);
-  virtual ~Sequential_music_iterator ();
-
-  virtual void construct_children ();
-  virtual Moment pending_moment () const;
-  virtual bool ok () const;
-  virtual void skip (Moment);
-  virtual SCM get_music (Moment)const;
-
-protected:
-  virtual void process (Moment);
-  virtual Music_iterator *try_music_in_children (Music *) const;
-
 private:
-  Moment here_mom_;
-  SCM cursor_;
-  Music_iterator * iter_p_;
-
-  void next_element ();
-  void descend_to_child ();
+  virtual SCM get_music_list()const;
+  virtual void descend_to_child ();
 };
 
 #endif // SEQUENTIAL_MUSIC_ITERATOR_HH
diff -purN ../lilypond-1.5.66/lily/include/stem.hh ./lily/include/stem.hh
--- ../lilypond-1.5.66/lily/include/stem.hh	Wed May 29 11:05:19 2002
+++ ./lily/include/stem.hh	Sat Jul 13 20:05:59 2002
@@ -19,7 +19,6 @@ public:
 
   static Array<int> note_head_positions (Grob*);
   static  int duration_log (Grob*) ;
-  static int beam_count (Grob*,Direction) ;
   static void set_beaming (Grob*,int,  Direction d);
   static Grob * beam_l (Grob*);
   static Grob * first_head (Grob*) ;
@@ -32,6 +31,7 @@ public:
   static Direction get_direction (Grob*) ;
   static void set_stemend (Grob *,Real);
   static Direction get_default_dir (Grob *) ;
+  static Slice Stem::beam_multiplicity (Grob *stem);
 
   static int head_count (Grob *) ;
   static bool invisible_b (Grob *) ;
diff -purN ../lilypond-1.5.66/lily/input-smob.cc ./lily/input-smob.cc
--- ../lilypond-1.5.66/lily/input-smob.cc	Sun May 19 02:12:04 2002
+++ ./lily/input-smob.cc	Sat Jul 13 19:39:19 2002
@@ -80,10 +80,7 @@ make_input (Input ip)
   Input * nip =  new Input (ip);
   SCM z;
   
-  SCM_NEWCELL (z);
-  SCM_SETCAR (z, (SCM)input_tag);
-  SCM_SETCDR (z, (SCM)nip);
-				// fixme: done_malloc
+  SCM_NEWSMOB (z, input_tag, nip);
   return z;
 }
 
diff -purN ../lilypond-1.5.66/lily/item.cc ./lily/item.cc
--- ../lilypond-1.5.66/lily/item.cc	Thu Jul  4 13:03:24 2002
+++ ./lily/item.cc	Thu Jul 11 12:52:31 2002
@@ -8,7 +8,7 @@
 
 
 #include "paper-score.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "item.hh"
 #include "paper-column.hh"
 #include "spanner.hh"
diff -purN ../lilypond-1.5.66/lily/lexer.ll ./lily/lexer.ll
--- ../lilypond-1.5.66/lily/lexer.ll	Sun Jul  7 15:44:58 2002
+++ ./lily/lexer.ll	Thu Jul 11 12:52:30 2002
@@ -37,7 +37,7 @@
 #include "interval.hh"
 #include "lily-guile.hh"
 #include "parser.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "main.hh"
 #include "musical-request.hh"
 #include "version.hh"
diff -purN ../lilypond-1.5.66/lily/lily-guile.cc ./lily/lily-guile.cc
--- ../lilypond-1.5.66/lily/lily-guile.cc	Thu Jul  4 13:03:24 2002
+++ ./lily/lily-guile.cc	Sat Jul 13 20:05:58 2002
@@ -18,7 +18,7 @@
 #include "main.hh"
 #include "simple-file-storage.hh"
 #include "file-path.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "direction.hh"
 #include "offset.hh"
 #include "interval.hh"
@@ -218,7 +218,7 @@ ly_scm2string (SCM s)
 }
 
 SCM
-index_cell (SCM s, Direction d)
+index_get_cell (SCM s, Direction d)
 {
   assert (d);
   return (d == LEFT) ? ly_car (s) : ly_cdr (s);
@@ -797,3 +797,18 @@ display_list (SCM s)
   scm_puts (")", p);
   return SCM_UNSPECIFIED;
 }
+
+Slice
+int_list_to_slice (SCM l)
+{
+  Slice s;
+  s.set_empty ();
+  for (; gh_pair_p (l); l = gh_cdr (l))
+    {
+      if (gh_number_p (gh_car (l)))
+	s.add_point (gh_scm2int (gh_car (l))); 
+    }
+
+  return s;
+}
+
diff -purN ../lilypond-1.5.66/lily/lyric-extender.cc ./lily/lyric-extender.cc
--- ../lilypond-1.5.66/lily/lyric-extender.cc	Mon Apr  1 01:12:19 2002
+++ ./lily/lyric-extender.cc	Thu Jul 11 12:52:31 2002
@@ -8,7 +8,7 @@
 
 
 #include "box.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "lookup.hh"
 #include "molecule.hh"
 #include "paper-column.hh"
diff -purN ../lilypond-1.5.66/lily/main.cc ./lily/main.cc
--- ../lilypond-1.5.66/lily/main.cc	Sun Jul  7 15:44:58 2002
+++ ./lily/main.cc	Thu Jul 11 12:52:31 2002
@@ -29,7 +29,7 @@
 #include "main.hh"
 #include "file-path.hh"
 #include "file-results.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "lily-guile.hh"
 #include "paper-def.hh"
 #include "midi-def.hh"
diff -purN ../lilypond-1.5.66/lily/midi-def.cc ./lily/midi-def.cc
--- ../lilypond-1.5.66/lily/midi-def.cc	Sat Mar 23 03:42:23 2002
+++ ./lily/midi-def.cc	Thu Jul 11 12:52:31 2002
@@ -10,7 +10,7 @@
 #include "misc.hh"
 #include "midi-def.hh"
 #include "performance.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "scm-hash.hh"
 
 Midi_def::Midi_def ()
diff -purN ../lilypond-1.5.66/lily/midi-item.cc ./lily/midi-item.cc
--- ../lilypond-1.5.66/lily/midi-item.cc	Tue Feb 26 19:26:15 2002
+++ ./lily/midi-item.cc	Thu Jul 11 12:52:31 2002
@@ -6,7 +6,7 @@
   (c)  1997--2002 Jan Nieuwenhuizen <janneke@gnu.org>
  */
 
-#include "debug.hh"
+#include "warn.hh"
 #include "main.hh"
 #include "misc.hh"
 #include "string.hh"
diff -purN ../lilypond-1.5.66/lily/midi-stream.cc ./lily/midi-stream.cc
--- ../lilypond-1.5.66/lily/midi-stream.cc	Sun Jul  7 15:44:58 2002
+++ ./lily/midi-stream.cc	Thu Jul 11 12:52:31 2002
@@ -14,7 +14,7 @@
 #include "misc.hh"
 #include "midi-item.hh"
 #include "midi-stream.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "scm-option.hh"
 
 Midi_stream::Midi_stream (String filename)
diff -purN ../lilypond-1.5.66/lily/midi-walker.cc ./lily/midi-walker.cc
--- ../lilypond-1.5.66/lily/midi-walker.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/midi-walker.cc	Thu Jul 11 12:52:31 2002
@@ -13,7 +13,7 @@
 #include "audio-staff.hh"
 #include "midi-item.hh"
 #include "midi-stream.hh"
-#include "debug.hh"
+#include "warn.hh"
 
 Midi_note_event::Midi_note_event () 
 { 
diff -purN ../lilypond-1.5.66/lily/molecule.cc ./lily/molecule.cc
--- ../lilypond-1.5.66/lily/molecule.cc	Tue Jul  2 20:21:35 2002
+++ ./lily/molecule.cc	Thu Jul 11 12:52:31 2002
@@ -14,7 +14,7 @@
 #include "interval.hh"
 #include "string.hh"
 #include "molecule.hh"
-#include "debug.hh"
+#include "warn.hh"
 
 
 #include "ly-smobs.icc"
diff -purN ../lilypond-1.5.66/lily/moment.cc ./lily/moment.cc
--- ../lilypond-1.5.66/lily/moment.cc	Sun Jul  7 15:44:58 2002
+++ ./lily/moment.cc	Sat Jul 13 19:39:19 2002
@@ -13,7 +13,6 @@
 #include "warn.hh"
 #include "ly-smobs.icc"
 
-
 IMPLEMENT_SIMPLE_SMOBS (Moment);
 IMPLEMENT_TYPE_P (Moment, "moment?");
 
diff -purN ../lilypond-1.5.66/lily/multi-measure-rest.cc ./lily/multi-measure-rest.cc
--- ../lilypond-1.5.66/lily/multi-measure-rest.cc	Fri Jun 14 19:03:35 2002
+++ ./lily/multi-measure-rest.cc	Thu Jul 11 12:52:31 2002
@@ -8,7 +8,7 @@
  */
 
 #include "multi-measure-rest.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "paper-def.hh"
 #include "paper-column.hh" // urg
 #include "font-interface.hh"
diff -purN ../lilypond-1.5.66/lily/music-iterator.cc ./lily/music-iterator.cc
--- ../lilypond-1.5.66/lily/music-iterator.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/music-iterator.cc	Thu Jul 11 12:52:31 2002
@@ -9,7 +9,7 @@
 /*
   UGH. too many includes.
  */
-#include "debug.hh"
+#include "warn.hh"
 #include "music-iterator.hh"
 #include "translator-group.hh"
 #include "music-wrapper.hh"
diff -purN ../lilypond-1.5.66/lily/music-output-def.cc ./lily/music-output-def.cc
--- ../lilypond-1.5.66/lily/music-output-def.cc	Sat Mar 23 03:42:23 2002
+++ ./lily/music-output-def.cc	Thu Jul 11 12:52:31 2002
@@ -9,7 +9,7 @@
 #include "scm-hash.hh"
 
 #include "dictionary.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "music-output-def.hh"
 #include "global-translator.hh"
 #include "translator-def.hh"
diff -purN ../lilypond-1.5.66/lily/music-sequence.cc ./lily/music-sequence.cc
--- ../lilypond-1.5.66/lily/music-sequence.cc	Mon Feb 25 00:29:30 2002
+++ ./lily/music-sequence.cc	Thu Jul 11 12:52:31 2002
@@ -7,7 +7,7 @@
   
  */
 #include "music-list.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "pitch.hh"
 
 
diff -purN ../lilypond-1.5.66/lily/music.cc ./lily/music.cc
--- ../lilypond-1.5.66/lily/music.cc	Wed Jun 19 21:30:28 2002
+++ ./lily/music.cc	Thu Jul 11 12:52:31 2002
@@ -10,7 +10,7 @@
 #include "input-smob.hh"
 #include "music.hh"
 #include "music-list.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "pitch.hh"
 #include "ly-smobs.icc"
 
diff -purN ../lilypond-1.5.66/lily/musical-request.cc ./lily/musical-request.cc
--- ../lilypond-1.5.66/lily/musical-request.cc	Wed Jun 19 21:30:51 2002
+++ ./lily/musical-request.cc	Thu Jul 11 12:52:31 2002
@@ -8,7 +8,7 @@
 
 #include "musical-request.hh"
 #include "misc.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "music-list.hh"
 
 
diff -purN ../lilypond-1.5.66/lily/my-lily-lexer.cc ./lily/my-lily-lexer.cc
--- ../lilypond-1.5.66/lily/my-lily-lexer.cc	Sun Jul  7 15:44:58 2002
+++ ./lily/my-lily-lexer.cc	Thu Jul 11 12:52:31 2002
@@ -18,7 +18,7 @@
 #include "parser.hh"
 #include "keyword.hh"
 #include "my-lily-lexer.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "source-file.hh"
 #include "main.hh"
 #include "input.hh"
diff -purN ../lilypond-1.5.66/lily/my-lily-parser.cc ./lily/my-lily-parser.cc
--- ../lilypond-1.5.66/lily/my-lily-parser.cc	Fri Jun 14 16:32:12 2002
+++ ./lily/my-lily-parser.cc	Thu Jul 11 12:52:31 2002
@@ -9,7 +9,7 @@
 
 #include "my-lily-parser.hh"
 #include "my-lily-lexer.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "main.hh"
 #include "parser.hh"
 #include "file-results.hh"
diff -purN ../lilypond-1.5.66/lily/note-collision.cc ./lily/note-collision.cc
--- ../lilypond-1.5.66/lily/note-collision.cc	Mon Jun 24 01:26:23 2002
+++ ./lily/note-collision.cc	Thu Jul 11 12:52:31 2002
@@ -7,7 +7,7 @@
   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "debug.hh"
+#include "warn.hh"
 #include "note-collision.hh"
 #include "note-column.hh"
 #include "note-head.hh"
diff -purN ../lilypond-1.5.66/lily/note-column.cc ./lily/note-column.cc
--- ../lilypond-1.5.66/lily/note-column.cc	Sun Apr 21 15:52:03 2002
+++ ./lily/note-column.cc	Thu Jul 11 12:52:31 2002
@@ -10,7 +10,7 @@
 #include "axis-group-interface.hh"
 #include "note-column.hh"
 #include "stem.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "paper-def.hh"
 #include "group-interface.hh"
 #include "staff-symbol-referencer.hh"
diff -purN ../lilypond-1.5.66/lily/note-head.cc ./lily/note-head.cc
--- ../lilypond-1.5.66/lily/note-head.cc	Tue May 21 00:05:05 2002
+++ ./lily/note-head.cc	Thu Jul 11 12:52:31 2002
@@ -11,7 +11,7 @@
 #include "misc.hh"
 #include "dots.hh"
 #include "note-head.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "font-interface.hh"
 #include "molecule.hh"
 #include "musical-request.hh"
diff -purN ../lilypond-1.5.66/lily/note-performer.cc ./lily/note-performer.cc
--- ../lilypond-1.5.66/lily/note-performer.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/note-performer.cc	Thu Jul 11 12:52:31 2002
@@ -11,7 +11,7 @@
 #include "audio-item.hh"
 #include "audio-column.hh"
 #include "global-translator.hh"
-#include "debug.hh"
+#include "warn.hh"
 
 /**
 Convert reqs to audio notes.
diff -purN ../lilypond-1.5.66/lily/paper-column.cc ./lily/paper-column.cc
--- ../lilypond-1.5.66/lily/paper-column.cc	Mon Jun 17 10:02:30 2002
+++ ./lily/paper-column.cc	Thu Jul 11 12:53:13 2002
@@ -9,7 +9,7 @@
 #include "moment.hh"
 #include "paper-column.hh"
 #include "paper-score.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "axis-group-interface.hh"
 #include "spaceable-grob.hh"
 #include "molecule.hh"
@@ -48,6 +48,7 @@ Paper_column::do_break_processing ()
   Item::do_break_processing ();
 }
 
+
 int
 Paper_column::rank_i (Grob*me) 
 {
@@ -132,3 +133,38 @@ Paper_column::brew_molecule (SCM p)
   return t.smobbed_copy ();						
 }
 
+/*
+  This is all too hairy. We use bounded-by-me to make sure that some
+  columns are kept "alive". Unfortunately, when spanners are suicided,
+  this falls apart again. (sigh.)
+
+  THIS IS BROKEN KLUDGE. WE SHOULD INVENT SOMETHING BETTER. 
+ */
+MAKE_SCHEME_CALLBACK(Paper_column,before_line_breaking,1);
+SCM
+Paper_column::before_line_breaking (SCM grob)
+{
+  Grob *me = unsmob_grob (grob);
+
+  SCM c = me->get_grob_property ("bounded-by-me");
+  SCM *ptrptr = &c;
+
+  while (gh_pair_p (c))
+    {
+      Grob * g = unsmob_grob (gh_car (c));
+
+      if (!g || !g->live ())
+	{
+	  *ptrptr = gh_cdr (c);
+	}
+      else
+	{
+	  ptrptr = SCM_CDRLOC (c);
+	}
+      
+      c = gh_cdr (c);
+    }
+
+  me->set_grob_property ("bounded-by-me", c);
+  return SCM_UNSPECIFIED;
+}
diff -purN ../lilypond-1.5.66/lily/paper-def.cc ./lily/paper-def.cc
--- ../lilypond-1.5.66/lily/paper-def.cc	Sat Mar 23 03:42:23 2002
+++ ./lily/paper-def.cc	Fri Jul 12 12:27:35 2002
@@ -12,7 +12,7 @@
 #include "string.hh"
 #include "misc.hh"
 #include "paper-def.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "scaled-font-metric.hh"
 #include "main.hh"
 #include "scm-hash.hh"
diff -purN ../lilypond-1.5.66/lily/paper-outputter.cc ./lily/paper-outputter.cc
--- ../lilypond-1.5.66/lily/paper-outputter.cc	Fri May 17 00:38:05 2002
+++ ./lily/paper-outputter.cc	Thu Jul 11 12:52:31 2002
@@ -16,7 +16,7 @@
 #include "molecule.hh"
 #include "array.hh"
 #include "string-convert.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "font-metric.hh"
 #include "main.hh"
 #include "scm-hash.hh"
diff -purN ../lilypond-1.5.66/lily/paper-score.cc ./lily/paper-score.cc
--- ../lilypond-1.5.66/lily/paper-score.cc	Wed Apr 10 19:25:36 2002
+++ ./lily/paper-score.cc	Thu Jul 11 12:52:31 2002
@@ -7,7 +7,7 @@
 */
 
 #include "main.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "font-metric.hh"
 #include "spanner.hh"
 #include "paper-def.hh"
diff -purN ../lilypond-1.5.66/lily/parser.yy ./lily/parser.yy
--- ../lilypond-1.5.66/lily/parser.yy	Sun Jul  7 15:44:58 2002
+++ ./lily/parser.yy	Thu Jul 11 12:52:30 2002
@@ -36,7 +36,7 @@ this.
 #include "midi-def.hh"
 #include "main.hh"
 #include "file-path.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "dimensions.hh"
 #include "command-request.hh"
 #include "musical-request.hh"
@@ -510,6 +510,10 @@ translator_spec_body:
 		unsmob_translator_def ($$)
 			->add_push_property (scm_string_to_symbol ($2), $4, $6);
 	}
+	| translator_spec_body STRING SET embedded_scm '=' embedded_scm {
+		unsmob_translator_def ($$)
+			->add_push_property (scm_string_to_symbol ($2), $4, $6);
+	}
 	| translator_spec_body STRING REVERT embedded_scm  {
 	  unsmob_translator_def ($$)->add_pop_property (
 		scm_string_to_symbol ($2), $4);
diff -purN ../lilypond-1.5.66/lily/part-combine-music.cc ./lily/part-combine-music.cc
--- ../lilypond-1.5.66/lily/part-combine-music.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/part-combine-music.cc	Mon Jul  8 11:12:20 2002
@@ -25,8 +25,6 @@ Part_combine_music::transpose (Pitch p)
   second_l () ->transpose (p);
 }
 
-
-
 Moment
 Part_combine_music::length_mom () const
 {
diff -purN ../lilypond-1.5.66/lily/performance.cc ./lily/performance.cc
--- ../lilypond-1.5.66/lily/performance.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/performance.cc	Thu Jul 11 12:52:31 2002
@@ -7,7 +7,7 @@
 */
 
 #include <time.h>
-#include "debug.hh"
+#include "warn.hh"
 #include "string.hh"
 #include "string-convert.hh"
 #include "main.hh"
diff -purN ../lilypond-1.5.66/lily/performer-group-performer.cc ./lily/performer-group-performer.cc
--- ../lilypond-1.5.66/lily/performer-group-performer.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/performer-group-performer.cc	Thu Jul 11 12:52:31 2002
@@ -10,7 +10,7 @@
 #include "performer-group-performer.hh"
 
 #include "audio-element.hh"
-#include "debug.hh"
+#include "warn.hh"
 
 
 ENTER_DESCRIPTION(Performer_group_performer,
diff -purN ../lilypond-1.5.66/lily/performer.cc ./lily/performer.cc
--- ../lilypond-1.5.66/lily/performer.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/performer.cc	Thu Jul 11 12:52:31 2002
@@ -9,7 +9,7 @@
 
 
 #include "performer-group-performer.hh"
-#include "debug.hh"
+#include "warn.hh"
 
 void 
 Performer::play_element (Audio_element* p) 
diff -purN ../lilypond-1.5.66/lily/phrasing-slur-engraver.cc ./lily/phrasing-slur-engraver.cc
--- ../lilypond-1.5.66/lily/phrasing-slur-engraver.cc	Mon Jul  1 12:02:11 2002
+++ ./lily/phrasing-slur-engraver.cc	Thu Jul 11 12:52:31 2002
@@ -6,7 +6,7 @@
 
 #include "musical-request.hh"
 #include "slur.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "note-column.hh"
 #include "translator-group.hh"
 #include "engraver.hh"
diff -purN ../lilypond-1.5.66/lily/pitch.cc ./lily/pitch.cc
--- ../lilypond-1.5.66/lily/pitch.cc	Wed May 29 11:05:18 2002
+++ ./lily/pitch.cc	Thu Jul 11 12:52:31 2002
@@ -7,7 +7,7 @@
   
  */
 #include "pitch.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "main.hh"
 #include "ly-smobs.icc"
 
diff -purN ../lilypond-1.5.66/lily/porrectus.cc ./lily/porrectus.cc
--- ../lilypond-1.5.66/lily/porrectus.cc	Mon Apr  1 01:12:19 2002
+++ ./lily/porrectus.cc	Thu Jul 11 12:52:31 2002
@@ -14,7 +14,7 @@
 #include "molecule.hh"
 #include "pitch.hh"
 #include "lookup.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "dimensions.hh"
 #include "direction.hh"
 #include "bezier.hh"
diff -purN ../lilypond-1.5.66/lily/relative-octave-music.cc ./lily/relative-octave-music.cc
--- ../lilypond-1.5.66/lily/relative-octave-music.cc	Tue May 21 00:05:05 2002
+++ ./lily/relative-octave-music.cc	Thu Jul 11 12:52:31 2002
@@ -8,7 +8,7 @@
  */
 
 #include "relative-music.hh"
-#include "debug.hh"
+#include "warn.hh"
 
 Pitch
 Relative_octave_music::to_relative_octave (Pitch)
diff -purN ../lilypond-1.5.66/lily/repeated-music.cc ./lily/repeated-music.cc
--- ../lilypond-1.5.66/lily/repeated-music.cc	Fri Mar 22 01:28:43 2002
+++ ./lily/repeated-music.cc	Thu Jul 11 12:52:31 2002
@@ -10,7 +10,7 @@
 #include "repeated-music.hh"
 #include "music-list.hh"
 #include "pitch.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "music-sequence.hh"
 
 Music *
diff -purN ../lilypond-1.5.66/lily/request-chord-iterator.cc ./lily/request-chord-iterator.cc
--- ../lilypond-1.5.66/lily/request-chord-iterator.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/request-chord-iterator.cc	Thu Jul 11 12:52:31 2002
@@ -7,7 +7,7 @@
 */
 
 #include "translator-group.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "request-chord-iterator.hh"
 #include "music-list.hh"
 #include "request.hh"
diff -purN ../lilypond-1.5.66/lily/request.cc ./lily/request.cc
--- ../lilypond-1.5.66/lily/request.cc	Sat Mar  2 02:53:32 2002
+++ ./lily/request.cc	Thu Jul 11 12:52:31 2002
@@ -7,7 +7,7 @@
 */
 
 #include "request.hh"
-#include "debug.hh"
+#include "warn.hh"
 
 bool
 Request::equal_b (Request const* r) const
diff -purN ../lilypond-1.5.66/lily/rest-collision-engraver.cc ./lily/rest-collision-engraver.cc
--- ../lilypond-1.5.66/lily/rest-collision-engraver.cc	Wed Jun 19 20:30:54 2002
+++ ./lily/rest-collision-engraver.cc	Thu Jul 11 12:52:31 2002
@@ -6,7 +6,7 @@
   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "debug.hh"
+#include "warn.hh"
 #include "rest-collision.hh"
 #include "engraver.hh"
 #include "note-collision.hh"
diff -purN ../lilypond-1.5.66/lily/rest-collision.cc ./lily/rest-collision.cc
--- ../lilypond-1.5.66/lily/rest-collision.cc	Sun Apr 21 15:52:03 2002
+++ ./lily/rest-collision.cc	Thu Jul 11 12:52:31 2002
@@ -8,7 +8,7 @@
 
 #include <math.h>		// ceil.
 
-#include "debug.hh"
+#include "warn.hh"
 #include "rest-collision.hh"
 #include "note-column.hh"
 #include "stem.hh"
diff -purN ../lilypond-1.5.66/lily/rhythmic-head.cc ./lily/rhythmic-head.cc
--- ../lilypond-1.5.66/lily/rhythmic-head.cc	Tue May 21 00:05:05 2002
+++ ./lily/rhythmic-head.cc	Thu Jul 11 12:52:31 2002
@@ -7,7 +7,7 @@
 */
 
 #include "rhythmic-head.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "rest.hh"
 #include "stem.hh"
 #include "staff-symbol-referencer.hh"
diff -purN ../lilypond-1.5.66/lily/rod.cc ./lily/rod.cc
--- ../lilypond-1.5.66/lily/rod.cc	Fri Feb  1 19:16:15 2002
+++ ./lily/rod.cc	Thu Jul 11 12:52:31 2002
@@ -8,7 +8,7 @@
  */
 #include "rod.hh"
 #include "paper-column.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "dimensions.hh"
 #include "spaceable-grob.hh"
 
diff -purN ../lilypond-1.5.66/lily/score-engraver.cc ./lily/score-engraver.cc
--- ../lilypond-1.5.66/lily/score-engraver.cc	Sun Jul  7 16:44:28 2002
+++ ./lily/score-engraver.cc	Thu Jul 11 12:53:25 2002
@@ -6,8 +6,8 @@
   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "debug.hh"
-
+#include "warn.hh"
+#include "main.hh"
 #include "system.hh"
 #include "item.hh"
 #include "score-engraver.hh"
@@ -66,11 +66,15 @@ Score_engraver::prepare (Moment w)
 {
   Global_translator::prepare (w);
 
+  /*
+    TODO: don't make columns when skipTypesetting is true.
+   */
   make_columns ();
-
+  
   command_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ());
   musical_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ());
 
+  
   Translator_group::start_translation_timestep();
 }
 
@@ -140,10 +144,14 @@ Score_engraver::one_time_step ()
   for (int i = announce_info_arr_.size(); i--;)
     {
       Grob *g = announce_info_arr_[i].grob_l_;
-      String msg= "Grob "
-	+ g->name()
-	+ " was created too late!";
-      g->programming_error (msg);
+      if (!dynamic_cast<Paper_column*> (g)) // ugh.
+	{
+      
+	  String msg= "Grob "
+	    + g->name()
+	    + " was created too late!";
+	  g->programming_error (msg);
+	}
     }
   announce_info_arr_.clear ();
 }
@@ -301,7 +309,8 @@ Score_engraver::forbid_breaks ()
   /*
     result is junked.
    */
-  command_column_l_->remove_grob_property ("breakable");
+  if (command_column_l_)
+    command_column_l_->remove_grob_property ("breakable");
 }
   
 void
diff -purN ../lilypond-1.5.66/lily/score-performer.cc ./lily/score-performer.cc
--- ../lilypond-1.5.66/lily/score-performer.cc	Sun Jul  7 15:44:58 2002
+++ ./lily/score-performer.cc	Thu Jul 11 12:52:31 2002
@@ -13,7 +13,7 @@
 #include "performance.hh"
 #include "midi-stream.hh"
 #include "string-convert.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "translator-def.hh"
 
 
diff -purN ../lilypond-1.5.66/lily/score.cc ./lily/score.cc
--- ../lilypond-1.5.66/lily/score.cc	Mon Jun 24 01:26:23 2002
+++ ./lily/score.cc	Thu Jul 11 12:52:31 2002
@@ -11,7 +11,7 @@
 #include "ly-smobs.icc"
 
 #include "score.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "music-output-def.hh"
 #include "music-output.hh"
 #include "music-iterator.hh"
diff -purN ../lilypond-1.5.66/lily/scores.cc ./lily/scores.cc
--- ../lilypond-1.5.66/lily/scores.cc	Wed May 15 12:33:48 2002
+++ ./lily/scores.cc	Thu Jul 11 12:52:31 2002
@@ -22,7 +22,7 @@
 #include "score.hh"
 #include "string.hh"
 #include "paper-def.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "parray.hh"
 #include "file-path.hh"
 #include "file-results.hh"
diff -purN ../lilypond-1.5.66/lily/script.cc ./lily/script.cc
--- ../lilypond-1.5.66/lily/script.cc	Wed May 22 11:32:07 2002
+++ ./lily/script.cc	Sat Jul 13 19:39:19 2002
@@ -7,7 +7,7 @@
   
  */
 
-#include "debug.hh"
+#include "warn.hh"
 #include "script.hh"
 #include "font-interface.hh"
 #include "side-position-interface.hh"
@@ -28,7 +28,7 @@ Script_interface::get_molecule (Grob * m
   if (key == ly_symbol2scm ("feta"))
     {
       return Font_interface::get_default_font (me)->find_by_name ("scripts-" +
-				    ly_scm2string (index_cell (ly_cdr (s), d)));
+				    ly_scm2string (index_get_cell (ly_cdr (s), d)));
     }
   else if (key == ly_symbol2scm ("accordion"))
     {
diff -purN ../lilypond-1.5.66/lily/separation-item.cc ./lily/separation-item.cc
--- ../lilypond-1.5.66/lily/separation-item.cc	Wed Apr 10 19:25:36 2002
+++ ./lily/separation-item.cc	Thu Jul 11 12:52:31 2002
@@ -9,7 +9,7 @@
 
 #include "separation-item.hh"
 #include "paper-column.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "group-interface.hh"
 
 
diff -purN ../lilypond-1.5.66/lily/sequential-iterator.cc ./lily/sequential-iterator.cc
--- ../lilypond-1.5.66/lily/sequential-iterator.cc	Thu Jan  1 01:00:00 1970
+++ ./lily/sequential-iterator.cc	Sat Jul 13 19:39:19 2002
@@ -0,0 +1,362 @@
+/*
+  Sequential_iterator.cc -- implement Sequential_iterator
+
+  source file of the GNU LilyPond music typesetter
+
+  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
+
+#include "translator-group.hh"
+
+#include "sequential-iterator.hh"
+#include "music-list.hh"
+
+Grace_fixup *copy_grace_fixups (Grace_fixup* src);
+Grace_fixup *get_grace_fixups (SCM cursor);
+
+/*
+  
+  TODO: handling of grace notes is exquisite pain.  This handling
+  should be formally specified and then the implementation verified.
+
+*/
+
+/*
+
+  TODO: the grace note handling hasn't been done for skip() and
+  get_music(), meaning that staff-switching and partcombining will be
+  broken with grace notes.
+  
+ */
+/*
+
+  TODO: the grace note handling hasn't been done for skip() and
+  get_music(), meaning that staff-switching and partcombining will be
+  broken with grace notes.
+  
+ */
+/*
+  Invariant for the data structure.
+
+
+  if (gh_pair_p (cursor_))
+    iter_p_->music_l_ == unsmob_music (ly_car (cursor_))
+  else
+    iter_p_ == 0;
+
+  The length of musiclist from start to up to cursor_ (cursor_ not
+  including), is summed
+
+  here_mom_  = sum (length (musiclist [start ... cursor>))  %)  
+  
+ */
+Sequential_iterator::Sequential_iterator ()
+{
+  here_mom_ = Moment (0);
+  grace_fixups_ = 0;
+  iter_p_ =0;
+}
+
+SCM 
+Sequential_iterator::get_music_list () const
+{
+  return SCM_EOL;
+}
+
+Sequential_iterator::Sequential_iterator (Sequential_iterator const &src)
+  : Music_iterator (src)
+{
+  grace_fixups_ = copy_grace_fixups (src.grace_fixups_);
+  cursor_ = src.cursor_;
+  list_ = src.cursor_;
+  here_mom_ = src.here_mom_;
+  if (src.iter_p_)
+    iter_p_ = src.iter_p_->clone ();
+  else
+    iter_p_ = 0;
+}
+
+Sequential_iterator::~Sequential_iterator ()
+{
+  delete iter_p_;
+}
+
+
+Grace_fixup *
+get_grace_fixups (SCM cursor)
+{
+  Moment here;
+  Moment last (-1);
+  Grace_fixup *head = 0;
+  Grace_fixup **tail = &head;
+
+  for (; gh_pair_p (cursor); cursor = ly_cdr (cursor))
+    {
+      Music * mus = unsmob_music (ly_car (cursor));
+      Moment s = mus->start_mom ();
+      Moment l =mus->length_mom () - s;
+
+      if (s.grace_part_)
+	{
+	  if (last != Moment (-1))
+	    {
+	      Grace_fixup *p =new Grace_fixup;
+	      p->start_ = last;
+	      p->length_ = here - last;
+	      p->grace_start_ = s.grace_part_;
+	      p->next_ = 0;
+	      *tail = p;
+	      tail = &(*tail)->next_; 
+	    }
+
+	  here.grace_part_ = s.grace_part_;
+	}
+      
+      if (l.to_bool())
+	{
+	  last = here;
+	  here += l;
+	}
+    }
+  return  head;
+}
+
+Grace_fixup *
+copy_grace_fixups (Grace_fixup* src)
+{
+  Grace_fixup * head = 0;
+  Grace_fixup **dest = &head;
+
+  while (src)
+    {
+      *dest = new Grace_fixup (*src);
+      dest = & (*dest)->next_;
+      src = src ->next_;
+    }
+
+  return head;
+}
+
+void
+Sequential_iterator::construct_children ()
+{
+  list_ = get_music_list ();
+  cursor_ = list_; 
+
+  iter_p_ = gh_pair_p (cursor_) ?  get_iterator_p (unsmob_music (ly_car (cursor_))) : 0;
+  while (iter_p_ && !iter_p_->ok ())
+    {
+      next_element (true);
+    }
+
+  here_mom_ = music_l ()->start_mom ();
+  grace_fixups_ = get_grace_fixups (cursor_);
+
+  /*
+    iter_p_->ok () is tautology, but what the heck.
+   */
+  if (iter_p_ && iter_p_->ok ()) 
+    descend_to_child ();
+}
+
+
+/*
+  maintain invariants: change cursor, iter and here_mom_ in one fell
+  swoop.
+*/
+void
+Sequential_iterator::next_element (bool side_effect)
+{
+  Moment len =iter_p_->music_length_mom () - iter_p_->music_start_mom ();
+  assert (!grace_fixups_  || grace_fixups_->start_ >= here_mom_);
+  
+  if (len.main_part_ && grace_fixups_ &&
+      grace_fixups_->start_ == here_mom_)
+    {
+      here_mom_ += grace_fixups_->length_;
+      here_mom_.grace_part_ += grace_fixups_->grace_start_;
+
+      Grace_fixup * n =grace_fixups_->next_;
+      delete grace_fixups_;
+      grace_fixups_ = n;
+    }
+  else if (len.grace_part_ && !len.main_part_)
+    {
+      here_mom_.grace_part_ =0;
+    }
+  else
+    {
+      /*
+	!len.grace_part_ || len.main_part_
+
+	We skip over a big chunk (mainpart != 0). Any starting graces
+	in that chunk should be in len.grace_part_
+
+      */
+      here_mom_ += len;
+    }
+  
+  delete iter_p_;
+  cursor_ = ly_cdr (cursor_);
+
+  if (gh_pair_p (cursor_))
+    iter_p_ = get_iterator_p (unsmob_music (ly_car (cursor_)));
+  else
+    iter_p_ = 0;
+}
+
+/*
+  move to context of child iterator if it is deeper down in the
+  hierarchy.
+  */
+void
+Sequential_iterator::descend_to_child ()
+{
+}
+
+
+/*
+  Retrieve all music (starting at HERE), until a music with length L >
+  0 is found.  From the precondition, we know that UNTIL is later than
+  the earliest event. Hence we know
+  
+  L >= (UNTIL - HERE)
+
+  so something that comes after this thing with L > 0 happens after
+
+  HERE + L >= HERE + (UNTIL - HERE) = UNTIL
+
+  Hence all events after the one with L>0 are uninteresting, so we
+  ignore them.
+  
+*/
+
+SCM
+Sequential_iterator::get_music (Moment until)const
+{
+  SCM s = SCM_EOL;
+  if (until <  pending_moment ())
+    return s;
+
+  Sequential_iterator * me =
+    dynamic_cast<Sequential_iterator*> (clone ());
+  while (me->ok ())
+    {
+      SCM nm = me->iter_p_->get_music (until - me->here_mom_);
+      s = gh_append2 (nm, s);
+      
+      Moment m = 0;
+      for (SCM i = nm; gh_pair_p (i); i = ly_cdr (i))
+	{
+	  Music *mus=unsmob_music (ly_car (i));
+	  m = m >? (mus->length_mom () - mus->start_mom ());
+	}
+      if (m > Moment (0))
+	break ;
+      else
+	me->next_element (false);
+    }
+  delete me;
+  
+  return s;
+}
+
+
+/*
+  Skip events till UNTIL. We don't do any other side effects such as
+  descending to child iterator contexts, because they might depend on
+  \context specs and \translator changes being executed
+
+  TODO: check support for grace notes here.
+ */
+void
+Sequential_iterator::skip (Moment until)
+{
+  while (ok ())
+    {
+      if (grace_fixups_ &&
+	  grace_fixups_->start_ == here_mom_
+	  && (grace_fixups_->start_ + grace_fixups_->length_
+	      + Moment (Rational (0), grace_fixups_->grace_start_) == until))
+	{
+	  /*
+	    do the stuff/note/rest preceding a grace.
+	   */
+	  iter_p_->skip (iter_p_->music_length_mom ());
+	}
+      else if (iter_p_->music_length_mom () >= until - here_mom_)
+	iter_p_->skip (until - here_mom_ + iter_p_->music_start_mom ());
+
+      if (iter_p_->ok ())
+	return ; 
+
+      next_element (false);
+    }
+}
+
+void
+Sequential_iterator::process (Moment until)
+{
+  while (iter_p_)
+    {
+      if (grace_fixups_ &&
+	  grace_fixups_->start_ == here_mom_
+	  && (grace_fixups_->start_ + grace_fixups_->length_
+	      + Moment (Rational (0), grace_fixups_->grace_start_) == until))
+	{
+	  /*
+	    do the stuff/note/rest preceding a grace.
+	   */
+	  iter_p_->process (iter_p_->music_length_mom ());
+	}
+      else
+	iter_p_->process (until - here_mom_ + iter_p_->music_start_mom ());
+
+      /*
+	if the iter is still OK, there must be events left that have
+	
+	  TIME > LEFT
+	  
+      */
+      if (iter_p_->ok ())
+	return ;
+
+      descend_to_child ();
+      next_element (true);
+    }
+}
+
+Moment
+Sequential_iterator::pending_moment () const
+{
+  Moment cp = iter_p_->pending_moment ();
+
+  /*
+    Fix-up a grace note halfway in the music.
+  */
+  if (grace_fixups_ && here_mom_ == grace_fixups_->start_
+      && grace_fixups_->length_ + iter_p_->music_start_mom () == cp)
+    {
+      return here_mom_ + grace_fixups_->length_ + Moment (0, grace_fixups_->grace_start_);
+    }
+
+  /*
+    Fix-up a grace note at  the start of the music.
+  */
+  return cp + here_mom_ - iter_p_->music_start_mom ();
+}
+
+
+bool
+Sequential_iterator::ok () const
+{
+  return iter_p_;
+}
+
+Music_iterator*
+Sequential_iterator::try_music_in_children (Music *m) const
+{ 
+  return iter_p_ ? iter_p_->try_music (m) : 0;
+}
+
+IMPLEMENT_CTOR_CALLBACK (Sequential_iterator);
diff -purN ../lilypond-1.5.66/lily/sequential-music-iterator.cc ./lily/sequential-music-iterator.cc
--- ../lilypond-1.5.66/lily/sequential-music-iterator.cc	Wed Jun 19 19:50:33 2002
+++ ./lily/sequential-music-iterator.cc	Fri Jul 12 12:27:35 2002
@@ -7,198 +7,10 @@
 */
 
 #include "translator-group.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "sequential-music-iterator.hh"
 #include "music-list.hh"
 
-Grace_fixup *copy_grace_fixups (Grace_fixup* src);
-Grace_fixup *get_grace_fixups (SCM cursor);
-
-/*
-  
-  TODO: handling of grace notes is exquisite pain.  This handling
-  should be formally specified and then the implementation verified.
-
-*/
-
-/*
-
-  TODO: the grace note handling hasn't been done for skip() and
-  get_music(), meaning that staff-switching and partcombining will be
-  broken with grace notes.
-  
- */
-/*
-
-  TODO: the grace note handling hasn't been done for skip() and
-  get_music(), meaning that staff-switching and partcombining will be
-  broken with grace notes.
-  
- */
-/*
-  Invariant for the data structure.
-
-
-  if (gh_pair_p (cursor_))
-    iter_p_->music_l_ == unsmob_music (ly_car (cursor_))
-  else
-    iter_p_ == 0;
-
-  The length of musiclist from start to up to cursor_ (cursor_ not
-  including), is summed
-
-  here_mom_  = sum (length (musiclist [start ... cursor>))  %)  
-  
- */
-Sequential_music_iterator::Sequential_music_iterator ()
-{
-  cursor_ = SCM_EOL;
-  here_mom_ = Moment (0);
-  grace_fixups_ = 0;
-  iter_p_ =0;
-}
-
-Sequential_music_iterator::Sequential_music_iterator (Sequential_music_iterator const &src)
-  : Music_iterator (src)
-{
-  grace_fixups_ = copy_grace_fixups (src.grace_fixups_);
-  cursor_ = src.cursor_;
-  here_mom_ = src.here_mom_;
-  if (src.iter_p_)
-    iter_p_ = src.iter_p_->clone ();
-  else
-    iter_p_ = 0;
-}
-
-Sequential_music_iterator::~Sequential_music_iterator ()
-{
-  delete iter_p_;
-}
-
-
-Grace_fixup *
-get_grace_fixups (SCM cursor)
-{
-  Moment here;
-  Moment last (-1);
-  Grace_fixup *head = 0;
-  Grace_fixup **tail = &head;
-
-  for (; gh_pair_p (cursor); cursor = ly_cdr (cursor))
-    {
-      Music * mus = unsmob_music (ly_car (cursor));
-      Moment s = mus->start_mom ();
-      Moment l =mus->length_mom () - s;
-
-      if (s.grace_part_)
-	{
-	  if (last != Moment (-1))
-	    {
-	      Grace_fixup *p =new Grace_fixup;
-	      p->start_ = last;
-	      p->length_ = here - last;
-	      p->grace_start_ = s.grace_part_;
-	      p->next_ = 0;
-	      *tail = p;
-	      tail = &(*tail)->next_; 
-	    }
-
-	  here.grace_part_ = s.grace_part_;
-	}
-      
-      if (l.to_bool())
-	{
-	  last = here;
-	  here += l;
-	}
-    }
-  return  head;
-}
-
-Grace_fixup *
-copy_grace_fixups (Grace_fixup* src)
-{
-  
-  Grace_fixup * head = 0;
-  Grace_fixup **dest = &head;
-
-  while (src)
-    {
-      *dest = new Grace_fixup (*src);
-      dest = & (*dest)->next_;
-      src = src ->next_;
-    }
-
-  return head;
-}
-
-void
-Sequential_music_iterator::construct_children ()
-{
-  cursor_ = dynamic_cast<Music_sequence const*> (music_l ())->music_list ();
-
-  iter_p_ = gh_pair_p (cursor_) ?  get_iterator_p (unsmob_music (ly_car (cursor_))) : 0;
-  while (iter_p_ && !iter_p_->ok ())
-    {
-      next_element ();
-    }
-
-  here_mom_ = music_l ()->start_mom ();
-  grace_fixups_ = get_grace_fixups (cursor_);
-
-  /*
-    iter_p_->ok () is tautology, but what the heck.
-   */
-  if (iter_p_ && iter_p_->ok ()) 
-    descend_to_child ();
-}
-
-
-/*
-  maintain invariants: change cursor, iter and here_mom_ in one fell
-  swoop.
-*/
-void
-Sequential_music_iterator::next_element ()
-{
-  Moment len =iter_p_->music_length_mom () - iter_p_->music_start_mom ();
-  assert (!grace_fixups_  || grace_fixups_->start_ >= here_mom_);
-  
-  if (len.main_part_ && grace_fixups_ &&
-      grace_fixups_->start_ == here_mom_)
-    {
-      here_mom_ += grace_fixups_->length_;
-      here_mom_.grace_part_ += grace_fixups_->grace_start_;
-
-      Grace_fixup * n =grace_fixups_->next_;
-      delete grace_fixups_;
-      grace_fixups_ = n;
-    }
-  else if (len.grace_part_ && !len.main_part_)
-    {
-      here_mom_.grace_part_ =0;
-    }
-  else
-    {
-      /*
-	!len.grace_part_ || len.main_part_
-
-	We skip over a big chunk (mainpart != 0). Any starting graces
-	in that chunk should be in len.grace_part_
-
-      */
-      here_mom_ += len;
-    }
-  
-  delete iter_p_;
-  cursor_ = ly_cdr (cursor_);
-
-  if (gh_pair_p (cursor_))
-    iter_p_ = get_iterator_p (unsmob_music (ly_car (cursor_)));
-  else
-    iter_p_ = 0;
-}
-
 /*
   move to context of child iterator if it is deeper down in the
   hierarchy.
@@ -220,147 +32,10 @@ Sequential_music_iterator::descend_to_ch
 }
 
 
-/*
-  Retrieve all music (starting at HERE), until a music with length L >
-  0 is found.  From the precondition, we know that UNTIL is later than
-  the earliest event. Hence we know
-  
-  L >= (UNTIL - HERE)
-
-  so something that comes after this thing with L > 0 happens after
-
-  HERE + L >= HERE + (UNTIL - HERE) = UNTIL
-
-  Hence all events after the one with L>0 are uninteresting, so we
-  ignore them.
-  
-*/
+IMPLEMENT_CTOR_CALLBACK (Sequential_music_iterator);
 
 SCM
-Sequential_music_iterator::get_music (Moment until)const
+Sequential_music_iterator::get_music_list()const
 {
-  SCM s = SCM_EOL;
-  if (until <  pending_moment ())
-    return s;
-
-  Sequential_music_iterator * me =
-    dynamic_cast<Sequential_music_iterator*> (clone ());
-  while (me->ok ())
-    {
-      SCM nm = me->iter_p_->get_music (until - me->here_mom_);
-      s = gh_append2 (nm, s);
-      
-      Moment m = 0;
-      for (SCM i = nm; gh_pair_p (i); i = ly_cdr (i))
-	{
-	  Music *mus=unsmob_music (ly_car (i));
-	  m = m >? (mus->length_mom () - mus->start_mom ());
-	}
-      if (m > Moment (0))
-	break ;
-      else
-	me->next_element ();
-    }
-  delete me;
-  
-  return s;
+  return  dynamic_cast<Music_sequence const*> (music_l ())->music_list ();
 }
-
-
-/*
-  Skip events till UNTIL. We don't do any other side effects such as
-  descending to child iterator contexts, because they might depend on
-  \context specs and \translator changes being executed
-
-  TODO: check support for grace notes here.
- */
-void
-Sequential_music_iterator::skip (Moment until)
-{
-  while (ok ())
-    {
-      if (grace_fixups_ &&
-	  grace_fixups_->start_ == here_mom_
-	  && (grace_fixups_->start_ + grace_fixups_->length_
-	      + Moment (Rational (0), grace_fixups_->grace_start_) == until))
-	{
-	  /*
-	    do the stuff/note/rest preceding a grace.
-	   */
-	  iter_p_->skip (iter_p_->music_length_mom ());
-	}
-      else if (iter_p_->music_length_mom () >= until - here_mom_)
-	iter_p_->skip (until - here_mom_ + iter_p_->music_start_mom ());
-
-      if (iter_p_->ok ())
-	return ; 
-
-      next_element ();
-    }
-}
-
-void
-Sequential_music_iterator::process (Moment until)
-{
-  while (iter_p_)
-    {
-      if (grace_fixups_ &&
-	  grace_fixups_->start_ == here_mom_
-	  && (grace_fixups_->start_ + grace_fixups_->length_
-	      + Moment (Rational (0), grace_fixups_->grace_start_) == until))
-	{
-	  /*
-	    do the stuff/note/rest preceding a grace.
-	   */
-	  iter_p_->process (iter_p_->music_length_mom ());
-	}
-      else
-	iter_p_->process (until - here_mom_ + iter_p_->music_start_mom ());
-
-      /*
-	if the iter is still OK, there must be events left that have
-	
-	  TIME > LEFT
-	  
-      */
-      if (iter_p_->ok ())
-	return ;
-
-      descend_to_child ();
-      next_element ();
-    }
-}
-
-Moment
-Sequential_music_iterator::pending_moment () const
-{
-  Moment cp = iter_p_->pending_moment ();
-
-  /*
-    Fix-up a grace note halfway in the music.
-  */
-  if (grace_fixups_ && here_mom_ == grace_fixups_->start_
-      && grace_fixups_->length_ + iter_p_->music_start_mom () == cp)
-    {
-      return here_mom_ + grace_fixups_->length_ + Moment (0, grace_fixups_->grace_start_);
-    }
-
-  /*
-    Fix-up a grace note at  the start of the music.
-  */
-  return cp + here_mom_ - iter_p_->music_start_mom ();
-}
-
-
-bool
-Sequential_music_iterator::ok () const
-{
-  return iter_p_;
-}
-
-Music_iterator*
-Sequential_music_iterator::try_music_in_children (Music *m) const
-{ 
-  return iter_p_ ? iter_p_->try_music (m) : 0;
-}
-IMPLEMENT_CTOR_CALLBACK (Sequential_music_iterator);
diff -purN ../lilypond-1.5.66/lily/side-position-interface.cc ./lily/side-position-interface.cc
--- ../lilypond-1.5.66/lily/side-position-interface.cc	Mon Jul  1 12:02:11 2002
+++ ./lily/side-position-interface.cc	Thu Jul 11 12:52:31 2002
@@ -9,7 +9,7 @@
 #include <math.h>		// ceil.
 
 #include "side-position-interface.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "warn.hh"
 #include "dimensions.hh"
 #include "staff-symbol-referencer.hh"
diff -purN ../lilypond-1.5.66/lily/simple-spacer.cc ./lily/simple-spacer.cc
--- ../lilypond-1.5.66/lily/simple-spacer.cc	Mon Jun 17 10:47:38 2002
+++ ./lily/simple-spacer.cc	Thu Jul 11 12:23:03 2002
@@ -365,6 +365,9 @@ Simple_spacer::solve (Column_x_positions
 
   positions->satisfies_constraints_b_ =
     positions->satisfies_constraints_b_ && break_satisfy;
+
+  if (ragged && force_f_ < 0)
+    positions->satisfies_constraints_b_ = false;
 }
 
 /****************************************************************/
diff -purN ../lilypond-1.5.66/lily/simultaneous-music-iterator.cc ./lily/simultaneous-music-iterator.cc
--- ../lilypond-1.5.66/lily/simultaneous-music-iterator.cc	Fri Feb  1 19:16:16 2002
+++ ./lily/simultaneous-music-iterator.cc	Thu Jul 11 12:52:31 2002
@@ -7,7 +7,7 @@
 */
 
 #include "translator-group.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "simultaneous-music-iterator.hh"
 #include "music-list.hh"
 #include "killing-cons.tcc"
diff -purN ../lilypond-1.5.66/lily/slur-bezier-bow.cc ./lily/slur-bezier-bow.cc
--- ../lilypond-1.5.66/lily/slur-bezier-bow.cc	Fri Feb  1 19:16:16 2002
+++ ./lily/slur-bezier-bow.cc	Thu Jul 11 12:52:31 2002
@@ -6,7 +6,7 @@
   (c) 2000--2002  Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
-#include "debug.hh"
+#include "warn.hh"
 #include "paper-def.hh"
 #include "slur-bezier-bow.hh"
 #include "main.hh"
diff -purN ../lilypond-1.5.66/lily/slur-engraver.cc ./lily/slur-engraver.cc
--- ../lilypond-1.5.66/lily/slur-engraver.cc	Mon Jul  1 12:02:11 2002
+++ ./lily/slur-engraver.cc	Thu Jul 11 12:52:30 2002
@@ -6,7 +6,7 @@
 
 #include "musical-request.hh"
 #include "slur.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "note-column.hh"
 #include "translator-group.hh"
 #include "engraver.hh"
diff -purN ../lilypond-1.5.66/lily/slur.cc ./lily/slur.cc
--- ../lilypond-1.5.66/lily/slur.cc	Fri May 24 15:03:26 2002
+++ ./lily/slur.cc	Sat Jul 13 19:39:19 2002
@@ -30,7 +30,7 @@
 #include "stem.hh"
 #include "paper-column.hh"
 #include "molecule.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "slur-bezier-bow.hh"
 #include "main.hh"
 #include "group-interface.hh"
@@ -159,8 +159,8 @@ Slur::check_slope (Grob *me)
 	  Direction d = (Direction) (- dir * (sign (dy)));
 	  SCM a = me->get_grob_property ("attachment-offset");
 	  Drul_array<Offset> o;
-	  o[LEFT] = ly_scm2offset (index_cell (a, LEFT));
-	  o[RIGHT] = ly_scm2offset (index_cell (a, RIGHT));
+	  o[LEFT] = ly_scm2offset (index_get_cell (a, LEFT));
+	  o[RIGHT] = ly_scm2offset (index_get_cell (a, RIGHT));
 	  o[d][Y_AXIS] -= (limit - slope) * dx * dir / staff_space;
 
 	  o[d][Y_AXIS] *= Directional_element_interface::get (me);
@@ -196,7 +196,7 @@ Slur::set_extremities (Grob *me)
   do 
     {
     
-      if (!gh_symbol_p (index_cell (att, dir)))
+      if (!gh_symbol_p (index_get_cell (att, dir)))
 	{
 	  for (SCM s = me->get_grob_property ("extremity-rules");
 	       s != SCM_EOL; s = ly_cdr (s))
@@ -290,7 +290,7 @@ Slur::get_attachment (Grob *me, Directio
 		      Grob **common) 
 {
   SCM s = me->get_grob_property ("attachment");
-  if (!gh_symbol_p (index_cell (s, dir)))
+  if (!gh_symbol_p (index_get_cell (s, dir)))
     {
       s = set_extremities (me);
     }
@@ -393,7 +393,7 @@ Slur::get_attachment (Grob *me, Directio
 	- me->relative_coordinate (common[Y_AXIS], Y_AXIS);
     }
 
-  Offset off = ly_scm2offset (index_cell (me->get_grob_property
+  Offset off = ly_scm2offset (index_get_cell (me->get_grob_property
 					  ("attachment-offset"),
 					  dir)) * staff_space;
 
@@ -642,8 +642,8 @@ Slur::get_curve (Grob*me) 
 
   
   if (!Directional_element_interface::get (me)
-      || ! gh_symbol_p (index_cell (attach, LEFT))
-      || ! gh_symbol_p (index_cell (attach, RIGHT)))
+      || ! gh_symbol_p (index_get_cell (attach, LEFT))
+      || ! gh_symbol_p (index_get_cell (attach, RIGHT)))
     set_extremities (me);
   
   if (!gh_pair_p (me->get_grob_property ("control-points")))
diff -purN ../lilypond-1.5.66/lily/spaceable-grob.cc ./lily/spaceable-grob.cc
--- ../lilypond-1.5.66/lily/spaceable-grob.cc	Thu Jul  4 13:03:24 2002
+++ ./lily/spaceable-grob.cc	Mon Jul  8 11:12:20 2002
@@ -6,6 +6,8 @@
   (c) 2000--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
+#include <stdio.h> 
+#include <math.h>
 
 #include "spaceable-grob.hh"
 #include "grob.hh"
@@ -24,6 +26,9 @@ Spaceable_grob::get_minimum_distances (G
 void
 Spaceable_grob::add_rod (Grob *me , Grob * p, Real d)
 {
+  //  printf ("rod %lf\n", d);
+
+  
   SCM mins = get_minimum_distances (me);
   SCM newdist = gh_double2scm (d);
   for (SCM s = mins; gh_pair_p (s); s = ly_cdr (s))
@@ -44,13 +49,25 @@ Spaceable_grob::add_rod (Grob *me , Grob
 void
 Spaceable_grob::add_spring (Grob*me, Grob * p, Real d, Real strength, bool expand_only)
 {
-  if (d < 0.0 || strength <= 0.0)
+  //  printf ("dist %lf, str %lf\n", d, strength); 
+  if (d <= 0.0 || strength <= 0.0)
     {
       programming_error ("Adding reverse spring! Setting to unit spring");
       d = 1.0;
       strength = 1.0;
     }
   
+  if (isinf (d) || isnan(d)
+      || isnan (strength))
+    {
+      /*
+	strength == INF is possible. It means fixed distance.
+       */
+      programming_error ("Insane distance found.");
+      d = 1.0;
+      strength = 1.0;
+    }
+    
 #ifndef NDEBUG
   SCM mins = me->get_grob_property ("ideal-distances");
   for (SCM s = mins; gh_pair_p (s); s = ly_cdr (s))
diff -purN ../lilypond-1.5.66/lily/spacing-spanner.cc ./lily/spacing-spanner.cc
--- ../lilypond-1.5.66/lily/spacing-spanner.cc	Sun Jul  7 16:44:29 2002
+++ ./lily/spacing-spanner.cc	Thu Jul 11 12:52:30 2002
@@ -10,7 +10,9 @@
 #include <math.h>
 #include <stdio.h>
 
+#include "main.hh"
 #include "system.hh"
+#include "warn.hh"
 #include "paper-def.hh"
 #include "paper-score.hh"
 #include "paper-column.hh"
@@ -366,7 +368,20 @@ Spacing_spanner::set_springs (SCM smob)
 
   set_explicit_neighbor_columns (all);
 
-  Rational global_shortest = find_shortest (me, all);
+  SCM preset_shortest = me->get_grob_property ("common-shortest-duration");
+  Rational global_shortest;
+  if (unsmob_moment (preset_shortest))
+    {
+      global_shortest = unsmob_moment (preset_shortest)->main_part_;
+    }
+  else
+    {
+      global_shortest = find_shortest (me, all);
+      if (verbose_global_b)
+	{
+	  progress_indication (_f("Global shortest duration is %s\n", global_shortest.str())); 
+	}
+    }
   prune_loose_colunms (me, &all, global_shortest);
   set_implicit_neighbor_columns (all);
 
@@ -590,9 +605,25 @@ Spacing_spanner::musical_column_spacing 
     Maybe it should be continuous?
   */
   max_fixed_note_space = max_fixed_note_space <?  max_note_space;
-  
+#if 0
+  /*
+    This doesn't make sense. For ragged right we want to have the same
+    spacing. Otherwise  the option should be called differently.
+
+    ragged-righted-and-weird-spacing. Whatever.
+
+  */
   Real strength = (ragged) ? 1.0 : 1 / (max_note_space - max_fixed_note_space);
   Real distance = (ragged) ? max_fixed_note_space : max_note_space;
+#else
+
+  /*
+        TODO: make sure that the space doesn't exceed the right margin.
+   */
+  Real strength = 1 / (max_note_space - max_fixed_note_space);
+  Real distance = max_note_space;
+#endif
+
   //  Spaceable_grob::add_spring (lc, rc, distance, strength, expand_only);
 
   Spaceable_grob::add_spring (lc, rc, distance, strength, false);  
@@ -751,8 +782,10 @@ Spacing_spanner::get_duration_space (Gro
 
        */
       Rational ratio = d.main_part_ / shortest;
-      
+
+#if 0
       *expand_only = true;
+#endif
       return ((k-1) + double (ratio)) * incr;
     }
   else
@@ -840,7 +873,7 @@ gets 2 note heads width (i.e. the space 
 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.
 ",
-  "grace-space-factor spacing-increment base-shortest-duration shortest-duration-space");
+  "grace-space-factor spacing-increment base-shortest-duration shortest-duration-space common-shortest-duration");
 
 
 
diff -purN ../lilypond-1.5.66/lily/spanner.cc ./lily/spanner.cc
--- ../lilypond-1.5.66/lily/spanner.cc	Thu Jul  4 13:03:24 2002
+++ ./lily/spanner.cc	Thu Jul 11 12:52:30 2002
@@ -9,7 +9,7 @@
 #include <libc-extension.hh>
 
 
-#include "debug.hh"
+#include "warn.hh"
 #include "spanner.hh"
 #include "paper-column.hh"
 #include "paper-score.hh"
diff -purN ../lilypond-1.5.66/lily/spring-smob.cc ./lily/spring-smob.cc
--- ../lilypond-1.5.66/lily/spring-smob.cc	Mon Mar 11 01:49:52 2002
+++ ./lily/spring-smob.cc	Thu Jul 11 12:52:30 2002
@@ -8,7 +8,7 @@
  */
 
 #include "spring.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "ly-smobs.icc"
 
 Spring_smob::Spring_smob()
diff -purN ../lilypond-1.5.66/lily/staff-performer.cc ./lily/staff-performer.cc
--- ../lilypond-1.5.66/lily/staff-performer.cc	Fri Feb  1 19:16:16 2002
+++ ./lily/staff-performer.cc	Thu Jul 11 12:52:30 2002
@@ -7,7 +7,7 @@
  */
 
 #include "translator-group.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "audio-column.hh"
 #include "audio-item.hh"
 #include "audio-staff.hh"
diff -purN ../lilypond-1.5.66/lily/staff-symbol.cc ./lily/staff-symbol.cc
--- ../lilypond-1.5.66/lily/staff-symbol.cc	Mon May 27 11:21:11 2002
+++ ./lily/staff-symbol.cc	Thu Jul 11 12:52:30 2002
@@ -10,7 +10,7 @@
 #include "dimensions.hh"
 #include "paper-def.hh"
 #include "molecule.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "item.hh"
 #include "staff-symbol.hh"
 #include "staff-symbol-referencer.hh"
diff -purN ../lilypond-1.5.66/lily/stem-tremolo.cc ./lily/stem-tremolo.cc
--- ../lilypond-1.5.66/lily/stem-tremolo.cc	Fri May 24 15:03:26 2002
+++ ./lily/stem-tremolo.cc	Sat Jul 13 20:05:58 2002
@@ -8,7 +8,7 @@
  */
 
 #include "stem-tremolo.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "beam.hh"
 #include "paper-def.hh"
 #include "lookup.hh"
@@ -107,23 +107,26 @@ Stem_tremolo::brew_molecule (SCM smob)
 
     --hwn.
    */
-  Real interbeam = beam ? Beam::get_interbeam (beam) : 0.81;
+  Real beam_space = beam ? Beam::get_beam_space (beam) : 0.81;
 
   Molecule mol; 
   for (int i = 0; i < tremolo_flags; i++)
     {
       Molecule b (a);
-      b.translate_axis (interbeam * i, Y_AXIS);
+      b.translate_axis (beam_space * i, Y_AXIS);
       mol.add_molecule (b);
     }
   Direction stemdir = Stem::get_direction (stem);
   Interval mol_ext = mol.extent (Y_AXIS);
 
   // ugh, rather calc from Stem_tremolo_req
-  int beams_i = (beam)
-    ? (Stem::beam_count (stem, RIGHT) >? Stem::beam_count (stem, LEFT))
-    : 0;
-  
+  int beams_i = (beam) ? (Stem::beam_multiplicity (stem).length ()+ 1): 0;
+
+  /*
+    TODO.
+   */
+
+
   Real beamthickness = 0.0;
   SCM sbt = (beam) ? beam->get_grob_property ("thickness") : SCM_EOL ;
   if (gh_number_p (sbt))
@@ -134,7 +137,7 @@ Stem_tremolo::brew_molecule (SCM smob)
   Real end_y
     = Stem::stem_end_position (stem) *ss/2 
     - stemdir * (beams_i * beamthickness
-		 + ((beams_i -1) >? 0) * interbeam);
+		 + ((beams_i -1) >? 0) * beam_space);
 
   /*
     the 0.33 ss is to compensate for the size of the note head
@@ -142,7 +145,7 @@ Stem_tremolo::brew_molecule (SCM smob)
   Real chord_start_y = Stem::chord_start_y (stem) +
     0.33 * ss * stemdir;
 
-  Real padding = interbeam;
+  Real padding = beam_space;
 
   /*
     if there is not enough space, center on remaining space,
@@ -154,7 +157,7 @@ Stem_tremolo::brew_molecule (SCM smob)
     }
   else
     {
-      mol.translate_axis (end_y - stemdir * interbeam
+      mol.translate_axis (end_y - stemdir * beam_space
 			  -mol_ext [stemdir]
 			  , Y_AXIS);
     }
diff -purN ../lilypond-1.5.66/lily/stem.cc ./lily/stem.cc
--- ../lilypond-1.5.66/lily/stem.cc	Thu Jul  4 13:03:24 2002
+++ ./lily/stem.cc	Sat Jul 13 20:05:58 2002
@@ -19,7 +19,7 @@
 #include "directional-element-interface.hh"
 #include "note-head.hh"
 #include "stem.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "paper-def.hh"
 #include "rhythmic-head.hh"
 #include "font-interface.hh"
@@ -35,28 +35,25 @@
 #include "dot-column.hh"
 
 void
-Stem::set_beaming (Grob*me ,int i,  Direction d)
+Stem::set_beaming (Grob*me, int beam_count,  Direction d)
 {
   SCM pair = me->get_grob_property ("beaming");
   
   if (!gh_pair_p (pair))
     {
-      pair = gh_cons (gh_int2scm (-1),gh_int2scm (-1));
-      me->      set_grob_property ("beaming", pair);
+      pair = gh_cons (SCM_EOL, SCM_EOL);
+      me->set_grob_property ("beaming", pair);
     }
-  index_set_cell (pair, d, gh_int2scm (i));
-}
 
-int
-Stem::beam_count (Grob*me,Direction d)
-{
-  SCM p=me->get_grob_property ("beaming");
-  if (gh_pair_p (p))
-    return gh_scm2int (index_cell (p,d));
-  else
-    return -1;
+  SCM l = index_get_cell (pair, d);
+  for( int i = 0; i<  beam_count; i++)
+    {
+      l = gh_cons (gh_int2scm (i), l);
+    }
+  index_set_cell (pair, d, l);		
 }
 
+
 Interval
 Stem::head_positions (Grob*me) 
 {
@@ -807,8 +804,8 @@ Stem::calc_stem_info (Grob*me) 
   Real half_space = staff_space / 2;
 
   Grob * beam = beam_l (me);
-  int multiplicity = Beam::get_multiplicity (beam);
-  Real interbeam_f = Beam::get_interbeam (beam);
+  int beam_count = Beam::get_beam_count (beam);
+  Real beam_space_f = Beam::get_beam_space (beam);
 
   Real thick = gh_scm2double (beam->get_grob_property ("thickness"));
   
@@ -830,14 +827,14 @@ Stem::calc_stem_info (Grob*me) 
     a.push (gh_scm2double (ly_car (q)));
 
 
-  Real minimum_length = a[multiplicity <? (a.size () - 1)] * staff_space;
+  Real minimum_length = a[beam_count <? (a.size () - 1)] * staff_space;
   s = me->get_grob_property ("beamed-lengths");
 
   a.clear ();
   for (SCM q = s; q != SCM_EOL; q = ly_cdr (q))
     a.push (gh_scm2double (ly_car (q)));
 
-  Real stem_length =  a[multiplicity <? (a.size () - 1)] * staff_space;
+  Real stem_length =  a[beam_count <? (a.size () - 1)] * staff_space;
 
   Grob *fvs = Beam::first_visible_stem (beam);
 
@@ -848,8 +845,8 @@ Stem::calc_stem_info (Grob*me) 
 
   // FIXME, hairy.  see beam::calc_stem_y, for knees it's not trival
   // to calculate where secondary, ternary beams will go.
-  if (multiplicity && first_dir == mydir)
-    ideal_y += thick + (multiplicity - 1) * interbeam_f;
+  if (beam_count && first_dir == mydir)
+    ideal_y += thick + (beam_count - 1) * beam_space_f;
 
   ideal_y += stem_length;
 
@@ -876,8 +873,8 @@ Stem::calc_stem_info (Grob*me) 
       shortest_y =
 	shortest_y >? 0
 	>? (- 2 * half_space - thick
-	    + (multiplicity > 0) * thick
-	    + interbeam_f * (multiplicity - 1));
+	    + (beam_count > 0) * thick
+	    + beam_space_f * (beam_count - 1));
     }
     
   
@@ -887,6 +884,7 @@ Stem::calc_stem_info (Grob*me) 
   if (gh_number_p (s))
     ideal_y -= gh_scm2double (s);
 
+#if 0
   Grob *common = me->common_refpoint (beam, Y_AXIS);
 
   /*
@@ -904,7 +902,8 @@ Stem::calc_stem_info (Grob*me) 
   
   ideal_y += interstaff_f;
   shortest_y += interstaff_f;
-
+#endif
+  
   ideal_y *= mydir;
   shortest_y *= mydir; 
   
@@ -921,7 +920,22 @@ Stem::calc_stem_info (Grob*me) 
   return si;
 }
 
+
+// move to stem?
+Slice
+Stem::beam_multiplicity (Grob *stem)
+{
+  SCM beaming= stem->get_grob_property ("beaming");
+  Slice l = int_list_to_slice (gh_car (beaming));
+  Slice r = int_list_to_slice (gh_cdr (beaming));
+  l.unite (r);
+
+  return l;
+}
+
+
 ADD_INTERFACE (Stem,"stem-interface",
   "A stem",
   "up-to-staff avoid-note-head adjust-if-on-staffline thickness stem-info beamed-lengths beamed-minimum-lengths lengths beam stem-shorten duration-log beaming neutral-direction stem-end-position support-head note-heads direction length style no-stem-extend flag-style dir-forced");
 
+
diff -purN ../lilypond-1.5.66/lily/system.cc ./lily/system.cc
--- ../lilypond-1.5.66/lily/system.cc	Mon Jun 24 01:26:23 2002
+++ ./lily/system.cc	Thu Jul 11 12:52:30 2002
@@ -8,7 +8,7 @@
 
 #include "input-smob.hh"
 #include "axis-group-interface.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "system.hh"
 #include "main.hh"
 #include "paper-column.hh"
@@ -73,7 +73,7 @@ System::output_lines ()
 	    }
 	  g->suicide ();
 	}
-      else
+      else if (g->live ())
 	g->do_break_processing ();
     }
 
diff -purN ../lilypond-1.5.66/lily/text-item.cc ./lily/text-item.cc
--- ../lilypond-1.5.66/lily/text-item.cc	Wed Jun 26 18:09:33 2002
+++ ./lily/text-item.cc	Thu Jul 11 12:52:30 2002
@@ -8,7 +8,7 @@
  */
 #include <math.h>
 
-#include "debug.hh"
+#include "warn.hh"
 #include "text-item.hh"
 #include "paper-def.hh"
 #include "font-interface.hh"
diff -purN ../lilypond-1.5.66/lily/text-spanner.cc ./lily/text-spanner.cc
--- ../lilypond-1.5.66/lily/text-spanner.cc	Mon Jun 24 17:19:44 2002
+++ ./lily/text-spanner.cc	Sat Jul 13 19:39:19 2002
@@ -15,7 +15,7 @@ source file of the GNU LilyPond music ty
 #include "font-interface.hh"
 #include "dimensions.hh"
 #include "paper-def.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "paper-column.hh"
 #include "staff-symbol-referencer.hh"
 
@@ -101,7 +101,7 @@ Text_spanner::brew_molecule (SCM smob) 
 	  /*  Don't repeat edge text for broken end */
 	  if (!broken[d])
 	    {
-	      SCM text = index_cell (edge_text, d);
+	      SCM text = index_get_cell (edge_text, d);
 	      edge[d] = Text_item::text2molecule (me, text, properties);
 	      if (!edge[d].empty_b ())
 		edge[d].align_to (Y_AXIS, CENTER);
@@ -152,9 +152,9 @@ Text_spanner::brew_molecule (SCM smob) 
       do
 	{
 	  Real dx = ( gh_pair_p (ew)  ? 
-		      gh_scm2double (index_cell (ew, d)) * d :  
+		      gh_scm2double (index_get_cell (ew, d)) * d :  
 		      0 );
-	  Real dy = gh_scm2double (index_cell (s, d)) * - dir;
+	  Real dy = gh_scm2double (index_get_cell (s, d)) * - dir;
 	  if (dy)
 	    {
 	      edge_line[d] = Line_spanner::line_molecule (me, thick, dx, dy);
@@ -230,11 +230,11 @@ Text_spanner::setup_pedal_bracket(Spanne
       height[d] =  0;
       shorten[d] = 0;
       if ( ly_number_pair_p (ew) )
-	width[d] +=  gh_scm2double (index_cell (ew, d));
+	width[d] +=  gh_scm2double (index_get_cell (ew, d));
       if ( !broken[d] && (ly_number_pair_p (eh) ) )
-	height[d] += gh_scm2double (index_cell (eh, d));
+	height[d] += gh_scm2double (index_get_cell (eh, d));
       if ( ly_number_pair_p (sp) )
-	shorten[d] +=  gh_scm2double (index_cell (sp, d));
+	shorten[d] +=  gh_scm2double (index_get_cell (sp, d));
     }
   while (flip (&d) != LEFT);
   
diff -purN ../lilypond-1.5.66/lily/tfm-reader.cc ./lily/tfm-reader.cc
--- ../lilypond-1.5.66/lily/tfm-reader.cc	Fri Feb  1 19:16:16 2002
+++ ./lily/tfm-reader.cc	Thu Jul 11 12:52:30 2002
@@ -11,7 +11,7 @@
 
 #include "tfm-reader.hh"
 #include "string-convert.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "warn.hh"
 
 #define format_str String_convert::form_str
diff -purN ../lilypond-1.5.66/lily/tfm.cc ./lily/tfm.cc
--- ../lilypond-1.5.66/lily/tfm.cc	Mon Mar 18 01:11:27 2002
+++ ./lily/tfm.cc	Thu Jul 11 12:52:30 2002
@@ -12,7 +12,7 @@
 #include "tfm.hh"
 #include "tfm-reader.hh"
 #include "string-convert.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "warn.hh"
 #include "dimensions.hh"
 
diff -purN ../lilypond-1.5.66/lily/thread-devnull-engraver.cc ./lily/thread-devnull-engraver.cc
--- ../lilypond-1.5.66/lily/thread-devnull-engraver.cc	Fri Feb  1 19:16:16 2002
+++ ./lily/thread-devnull-engraver.cc	Mon Jul  8 11:12:21 2002
@@ -26,13 +26,14 @@ void
 Thread_devnull_engraver::acknowledge_grob (Grob_info i)
 {
   SCM s = get_property ("devNullThread");
+
 #if 0
   /* No need, next if will never be true */
   if (s == ly_symbol2scm ("never"))
     return;
 #endif
 
-  if (s == ly_symbol2scm ("allways")
+  if (s == ly_symbol2scm ("always")
       || (s == SCM_EOL
 	  && daddy_trans_l_->id_str_.left_str (3) == "two"
 	  && (to_boolean (get_property ("unison"))
diff -purN ../lilypond-1.5.66/lily/tie.cc ./lily/tie.cc
--- ../lilypond-1.5.66/lily/tie.cc	Mon Jun 24 01:26:23 2002
+++ ./lily/tie.cc	Sat Jul 13 19:39:19 2002
@@ -15,7 +15,7 @@
 #include "rhythmic-head.hh"
 #include "bezier.hh"
 #include "paper-column.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "staff-symbol-referencer.hh"
 #include "directional-element-interface.hh"
 #include "molecule.hh"
@@ -57,7 +57,7 @@ Grob*
 Tie::head (Grob*me, Direction d) 
 {
   SCM c = me->get_grob_property ("heads");
-  c = index_cell (c, d);
+  c = index_get_cell (c, d);
 
   return unsmob_grob (c);
 }
diff -purN ../lilypond-1.5.66/lily/timing-translator.cc ./lily/timing-translator.cc
--- ../lilypond-1.5.66/lily/timing-translator.cc	Thu Mar 28 01:40:24 2002
+++ ./lily/timing-translator.cc	Thu Jul 11 12:52:30 2002
@@ -7,7 +7,7 @@
   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
-#include "debug.hh"
+#include "warn.hh"
 #include "timing-translator.hh"
 #include "command-request.hh"
 #include "translator-group.hh"
diff -purN ../lilypond-1.5.66/lily/translator-ctors.cc ./lily/translator-ctors.cc
--- ../lilypond-1.5.66/lily/translator-ctors.cc	Sun May 19 02:12:08 2002
+++ ./lily/translator-ctors.cc	Thu Jul 11 12:52:30 2002
@@ -8,7 +8,7 @@
 
 #include "translator.hh"
 #include "dictionary.hh"
-#include "debug.hh"
+#include "warn.hh"
 
 /*
   should delete these after exit.
diff -purN ../lilypond-1.5.66/lily/translator-group.cc ./lily/translator-group.cc
--- ../lilypond-1.5.66/lily/translator-group.cc	Sun Jul  7 15:44:58 2002
+++ ./lily/translator-group.cc	Thu Jul 11 12:52:30 2002
@@ -9,7 +9,7 @@
 #include "music-output-def.hh"
 #include "translator-group.hh"
 #include "translator.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "moment.hh"
 #include "scm-hash.hh"
 #include "translator-def.hh"
diff -purN ../lilypond-1.5.66/lily/translator.cc ./lily/translator.cc
--- ../lilypond-1.5.66/lily/translator.cc	Sun Jul  7 15:44:58 2002
+++ ./lily/translator.cc	Thu Jul 11 12:52:30 2002
@@ -8,7 +8,7 @@
 
 
 #include "translator.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "translator-group.hh"
 #include "translator-def.hh"
 
diff -purN ../lilypond-1.5.66/lily/transposed-music.cc ./lily/transposed-music.cc
--- ../lilypond-1.5.66/lily/transposed-music.cc	Fri Feb  1 19:16:16 2002
+++ ./lily/transposed-music.cc	Thu Jul 11 12:52:30 2002
@@ -8,7 +8,7 @@
  */
 
 #include "transposed-music.hh"
-#include "debug.hh"
+#include "warn.hh"
 
 Transposed_music::Transposed_music (SCM l)
   : Music_wrapper (l)
diff -purN ../lilypond-1.5.66/lily/tuplet-bracket.cc ./lily/tuplet-bracket.cc
--- ../lilypond-1.5.66/lily/tuplet-bracket.cc	Wed Jun 19 20:05:13 2002
+++ ./lily/tuplet-bracket.cc	Sat Jul 13 19:39:20 2002
@@ -26,7 +26,7 @@
 
 #include "beam.hh"
 #include "box.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "font-interface.hh"
 #include "molecule.hh"
 #include "paper-def.hh"
@@ -178,11 +178,11 @@ Tuplet_bracket::brew_molecule (SCM smob)
       do {
 	width[d] =  height[d] = shorten[d] = 0.0;
 	if ( ly_number_pair_p (ew) )
-	  width[d] +=  gh_scm2double (index_cell (ew, d));
+	  width[d] +=  gh_scm2double (index_get_cell (ew, d));
 	if ( ly_number_pair_p (eh) )
-	  height[d] += gh_scm2double (index_cell (eh, d)) * - dir;
+	  height[d] += gh_scm2double (index_get_cell (eh, d)) * - dir;
 	if ( ly_number_pair_p (sp) )
-	  shorten[d] +=  gh_scm2double (index_cell (sp, d));
+	  shorten[d] +=  gh_scm2double (index_get_cell (sp, d));
       }
       while (flip (&d) != LEFT);
       
diff -purN ../lilypond-1.5.66/lily/unfolded-repeat-iterator.cc ./lily/unfolded-repeat-iterator.cc
--- ../lilypond-1.5.66/lily/unfolded-repeat-iterator.cc	Fri Feb  1 19:16:16 2002
+++ ./lily/unfolded-repeat-iterator.cc	Fri Jul 12 12:27:35 2002
@@ -1,292 +1,108 @@
 /*   
-  unfolded-repeat-iterator.cc --  implement Unfolded_repeat_iterator
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-/*
-  This is too hairy.  Maybe split into subclasses for volta and full
-  unfold?
-  
- */
-#include "music-iterator.hh"
-#include "repeated-music.hh"
-#include "music-list.hh"
-#include "debug.hh"
-#include "translator-group.hh"
-
-/**
-   Iterate repeats.  First do body, then alternatives one by one,
-   optionally interspersed by the body.
- */
-class Unfolded_repeat_iterator : public Music_iterator
-{
-  void add_repeat_command (SCM);
+unfolded-repeat-iterator.cc --  implement Unfolded_repeat_iterator, Volta_repeat_iterator
 
-public:
-  VIRTUAL_COPY_CONS (Music_iterator);
-  /**
-     How often have we done the body (assuming bodies are interspersed.)?
+source file of the GNU LilyPond music typesetter
 
-     In volta: the number to print in the bracket.
-   */
-  int done_count_;
-  static SCM constructor_cxx_function; 
 
-  /*
-    are we now busy doing the body?
+(c) 2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+*/
 
-   */
-  bool do_main_b_;
 
-  /*
-    are we doing volta's?
-   */
-  bool volta_b_;
-
-  /** How far have we progressed into the repeat.
-      This excludes the elt currently being iterated.
-  */
-  Moment here_mom_;
-  int alternative_count_i_;
-  Music_iterator * current_iter_p_;
-  
-  /// pointer to the alternative that will be processed next.
-  SCM alternative_cons_;
-  ~Unfolded_repeat_iterator ();
-  Unfolded_repeat_iterator ();
-  Unfolded_repeat_iterator (Unfolded_repeat_iterator const &);
-protected:  
-  virtual void construct_children ();
-  virtual Moment pending_moment () const;
-  virtual void process (Moment);
-  virtual Music_iterator *try_music_in_children (Music *) const;
-  virtual void skip (Moment);
-  virtual SCM get_music (Moment) const;
-  
-  virtual bool ok () const;
-  virtual void next_element (bool side_effect);
-};
+#include "music.hh"
+#include "sequential-iterator.hh"
+#include "translator-group.hh"
 
-class Volta_repeat_iterator : public Unfolded_repeat_iterator
+class Unfolded_repeat_iterator : public Sequential_iterator
 {
 public:
-  Volta_repeat_iterator ();
   static  SCM constructor_cxx_function;
   VIRTUAL_COPY_CONS (Music_iterator);
+protected:
+  virtual SCM get_music_list () const;
 };
 
 
-
-Unfolded_repeat_iterator::~Unfolded_repeat_iterator ()
-{
-  delete current_iter_p_;
-}
-
-Unfolded_repeat_iterator::Unfolded_repeat_iterator (Unfolded_repeat_iterator const &src)
-  : Music_iterator (src)
-{
-  done_count_ = src.done_count_;
-  current_iter_p_ = (src.current_iter_p_)? src.current_iter_p_->clone () : 0;
-  do_main_b_ = src.do_main_b_;
-  volta_b_ = src.volta_b_;
-  alternative_count_i_ = src.alternative_count_i_;
-  alternative_cons_ = src.alternative_cons_;
-}
-
-Unfolded_repeat_iterator::Unfolded_repeat_iterator ()
-{
-  done_count_ =0;
-  current_iter_p_ =0;
-  volta_b_ = false;
-  do_main_b_ = false;
-  alternative_count_i_ =0;
-  alternative_cons_ = SCM_EOL;
-}
-
-/**
-
-If we are in the body of the repeat always go to the current alternative.
-
-If we are not in the body, then we are in an alternative.  If we are
-fully unfolding, advance the current alternative and go back to main.
-If we are semi-unfolding, advance the current alternative, and go to
-the  alternative just set.
-   
- */
-void
-Unfolded_repeat_iterator::next_element (bool side_effect) 
+SCM
+Unfolded_repeat_iterator::get_music_list () const
 {
-  Repeated_music * repmus =dynamic_cast<Repeated_music *> (music_l ());
-  delete current_iter_p_;
-  current_iter_p_ =0;
-
-  bool do_repcommands = side_effect && volta_b_;
+  SCM l = SCM_EOL;
+  SCM *tail = &l;
   
-  if (do_main_b_)
-    {
-      /*
-	we were busy doing the main body, so
-
-	- go to alternative if we're a volta
-
-	- make a :| if there are no alternatives   
-	
-	- do something intelligent when we're fully unfolding (fixcomment)
-       */
-      
-      here_mom_ += repmus->body ()->length_mom ();
+  SCM body = music_l ()->get_mus_property ("element");
+  SCM alts = music_l ()->get_mus_property ("elements");
+  int alt_count = scm_ilength (alts);
+  int rep_count = gh_scm2int (music_l ()->get_mus_property ("repeat-count"));
 
-      if (!volta_b_)
-	done_count_ ++;
-     
-      if (gh_pair_p (alternative_cons_))
-	{
-	  current_iter_p_ = get_iterator_p (unsmob_music (ly_car (alternative_cons_)));
-	  do_main_b_ = false;
+  for (int i = 0; i < rep_count; i++)
+    {
+      if (unsmob_music (body))
+	*tail = gh_cons (body, SCM_EOL) ;
 
-	  if (volta_b_)
-	    {
-	      String repstr = to_str (done_count_ + 1) + ".";
+      tail = SCM_CDRLOC (*tail);
 
-	      /*
-		we're coming in from main, so we're always on the first repeat.
-	       */
-	      assert (done_count_ == 0);
-
-	      if (done_count_ == 0
-		  && alternative_count_i_ < repmus->repeat_count ())
-		{
-		  done_count_ += repmus->repeat_count () - alternative_count_i_;		  
-		  repstr = "1.--" + to_str (done_count_ + 1) + ".";		  
-		}		  
-	      
-	      if (do_repcommands)
-		add_repeat_command (scm_list_n (ly_symbol2scm ("volta"),
-					     ly_str02scm (repstr.ch_C ()), SCM_UNDEFINED));
-	    }	  
-	}
-      else if (volta_b_)
-	{
-	  add_repeat_command (ly_symbol2scm ("end-repeat"));
-	}
-      else if (done_count_ <  repmus->repeat_count ())
+      if (alt_count)
 	{
-	  current_iter_p_ = get_iterator_p (repmus->body ());
-	  do_main_b_ = true;
-	}
+	  *tail = gh_cons (gh_car (alts), SCM_EOL);
+	  tail = SCM_CDRLOC (*tail);
+	  if (i >= rep_count - alt_count)
+	    
+	    alts = gh_cdr (alts);
+	}      
     }
-  else
-    {
-      /*
-	we're not in the main part. So we're either in an alternative, or
-	we just finished.
-      */
-
-      /*
-	we're in the alternatives.  We move the pointer to the
-	next alternative.
-       */
-      if (alternative_cons_)
-	{
-	  here_mom_ += unsmob_music (ly_car (alternative_cons_))->length_mom ();
-
-	  if (volta_b_ || 
-	      repmus->repeat_count () - done_count_  < alternative_count_i_)
-	    alternative_cons_ = ly_cdr (alternative_cons_);
-	  
-	  if (do_repcommands)
-	    add_repeat_command (scm_list_n (ly_symbol2scm ("volta"), SCM_BOOL_F, SCM_UNDEFINED));
-
-	  
-	  
-	  /*
-	    we've done the main body as well, but didn't go over the other
-	    increment.  */
-	  if (volta_b_)
-	    done_count_ ++;
-	}
-
-      /*
-	We still have alternatives left, so
 
-	if we're volta: traverse them
+  return l; 
+}
 
-	if we're full unfold: go back to main body.
-       */
-      
-      if (done_count_ < repmus->repeat_count () && gh_pair_p (alternative_cons_))
-	{
-	  if (do_repcommands)
-	    {
-	      String repstr = to_str (done_count_ + 1) + ".";
-	      add_repeat_command (scm_list_n (ly_symbol2scm ("volta"),
-					   ly_str02scm (repstr.ch_C ()), SCM_UNDEFINED));
-	      add_repeat_command (ly_symbol2scm ("end-repeat"));
-	    }
+class Volta_repeat_iterator : public Sequential_iterator
+{
+public:
+  static  SCM constructor_cxx_function;
+  VIRTUAL_COPY_CONS (Music_iterator);
+  Volta_repeat_iterator();
 
-	  
-	  if (volta_b_)
-	    current_iter_p_ = get_iterator_p (unsmob_music (ly_car (alternative_cons_)));
-	  else
-	    {
-	      current_iter_p_ = get_iterator_p (repmus->body ());
-	      do_main_b_ = true;
-	    }
-	}
-    }
-}
+  void add_repeat_command (SCM);
+protected:
+  virtual SCM get_music_list () const;
+  virtual void next_element (bool);
+  virtual void construct_children();
+  virtual void process (Moment);
+  
+  int alt_count_;
+  int rep_count_;
+  int done_count_;
+};
 
 
-bool
-Unfolded_repeat_iterator::ok () const
+Volta_repeat_iterator::Volta_repeat_iterator()
 {
-  return current_iter_p_;
+  done_count_ = alt_count_ = rep_count_= 0;
 }
 
-Moment
-Unfolded_repeat_iterator::pending_moment () const
+SCM
+Volta_repeat_iterator::get_music_list()const
 {
-  return here_mom_ + current_iter_p_->pending_moment ();
+  return gh_cons (music_l ()->get_mus_property ("element"),
+		  music_l ()->get_mus_property ("elements"));
 }
 
 void
-Unfolded_repeat_iterator::construct_children ()
+Volta_repeat_iterator::construct_children ()
 {
-  Repeated_music * mus =dynamic_cast<Repeated_music *> (music_l ());
+  Sequential_iterator::construct_children();
   
-  alternative_cons_ = (mus->alternatives ())
-    ? mus->alternatives ()
-    : SCM_EOL;
-
-  for (SCM p = alternative_cons_; gh_pair_p (p); p = ly_cdr (p))
-    alternative_count_i_ ++;
+  SCM alts = music_l ()->get_mus_property ("elements");
 
-  if (mus->body ())
-    {
-      current_iter_p_  = get_iterator_p (mus->body ());
-      do_main_b_ = true;
-    }
-  else if (gh_pair_p (alternative_cons_))
-    {
-      current_iter_p_ = get_iterator_p (unsmob_music (ly_car (alternative_cons_)));
-      do_main_b_ = false;
-    }
-
-  while (current_iter_p_ && !current_iter_p_-> ok ())
-    {
-      next_element (true);
-    }
+  alt_count_ = scm_ilength (alts);
+  rep_count_ = gh_scm2int (music_l ()->get_mus_property ("repeat-count"));
+  done_count_ = 0;
 }
 
+
 /*
   TODO: add source information for debugging
  */
 void
-Unfolded_repeat_iterator::add_repeat_command (SCM what)
+Volta_repeat_iterator::add_repeat_command (SCM what)
 {
   SCM reps = ly_symbol2scm ("repeatCommands");
   SCM current_reps = report_to_l ()->internal_get_property (reps);
@@ -300,91 +116,56 @@ Unfolded_repeat_iterator::add_repeat_com
     }
 }
 
-void
-Unfolded_repeat_iterator::process (Moment m) 
-{
-  if (!m.to_bool ())
-    {
-      if (volta_b_)
-	add_repeat_command (ly_symbol2scm ("start-repeat"));
-    }
-  while (1)
-    {
-      while (!current_iter_p_->ok ())
-	{
-	  next_element (true);
-
-	  if (!current_iter_p_)
-	    return;
-	}
-      
-      if (m - here_mom_ >= current_iter_p_->pending_moment ())
-	current_iter_p_->process (m - here_mom_);
-      else
-	return;
-    }
-}
 
 void
-Unfolded_repeat_iterator::skip (Moment until)
+Volta_repeat_iterator::next_element (bool side_effect)
 {
-  while (current_iter_p_)
-    {
-      Moment l =current_iter_p_->music_length_mom ();
-      if (l >= until - here_mom_)
-	current_iter_p_->skip (until - here_mom_);
+  done_count_ ++;
 
-      if (current_iter_p_->ok ())
-	return ; 
-
-      next_element (false);
-    }
-}
+  Sequential_iterator::next_element (side_effect);
 
-SCM
-Unfolded_repeat_iterator::get_music (Moment until)const
-{
-  SCM s = SCM_EOL;
-  if (until <  pending_moment ())
-    return s;
+  if (side_effect)
+    {    
+      if (alt_count_)
+	{
+	  String repstr = to_str (rep_count_ - alt_count_ + done_count_) + ".";
+	  if (done_count_ > 1)
+	    {
+	      add_repeat_command (scm_list_n (ly_symbol2scm ("volta"), SCM_BOOL_F, SCM_UNDEFINED));
 
+	      if (done_count_ - 1 < alt_count_)
+		add_repeat_command (ly_symbol2scm ("end-repeat"));
+	    }
 
-  Unfolded_repeat_iterator * me
-    = dynamic_cast<Unfolded_repeat_iterator*> (this->clone ());
-  
-  while (me->ok ())
-    {
-      SCM nm = me->current_iter_p_->get_music (until -
-					       me->here_mom_);
-      
-      s = gh_append2 (nm, s);
+	  
       
-      Moment m = 0;
-      for (SCM i = nm; gh_pair_p (i); i = ly_cdr (i))
-	m = m >? unsmob_music (ly_car (i))->length_mom ();
+	  if (done_count_ == 1 && alt_count_ < rep_count_)
+	    {
+	      repstr = "1.--" + to_str (rep_count_ - alt_count_ + done_count_) + ".";
+	    }
 
-      if (m > Moment (0))
-	break ;
+	  if (done_count_ <= alt_count_)
+	    add_repeat_command (scm_list_n (ly_symbol2scm ("volta"),
+					    ly_str02scm (repstr.ch_C ()), SCM_UNDEFINED));
+	}
       else
-	me->next_element (false);
+	{
+	  add_repeat_command (ly_symbol2scm ("end-repeat"));
+	}
     }
-
-  delete me;
-  
-  return s;
 }
 
 
-Music_iterator* 
-Unfolded_repeat_iterator::try_music_in_children (Music  * m) const
+void
+Volta_repeat_iterator::process (Moment m)
 {
-  return  current_iter_p_->try_music (m);
+  if (!m.to_bool ())
+    {
+      add_repeat_command (ly_symbol2scm ("start-repeat"));
+    }
+  Sequential_iterator::process(m);
 }
 
-IMPLEMENT_CTOR_CALLBACK (Unfolded_repeat_iterator);
-IMPLEMENT_CTOR_CALLBACK (Volta_repeat_iterator);
 
-Volta_repeat_iterator::Volta_repeat_iterator ()
-{
-  volta_b_ = true;
-}
+IMPLEMENT_CTOR_CALLBACK(Volta_repeat_iterator);
+IMPLEMENT_CTOR_CALLBACK(Unfolded_repeat_iterator);
diff -purN ../lilypond-1.5.66/lily/voice-devnull-engraver.cc ./lily/voice-devnull-engraver.cc
--- ../lilypond-1.5.66/lily/voice-devnull-engraver.cc	Fri Jun 21 12:46:50 2002
+++ ./lily/voice-devnull-engraver.cc	Mon Jul  8 11:12:21 2002
@@ -36,13 +36,14 @@ bool
 Voice_devnull_engraver::try_music (Music *m)
 {
   SCM s = get_property ("devNullVoice");
+
 #if 0
   /* No need */
   if (gh_equal_p (s, ly_symbol2scm ("never")))
     return;
 #endif
 
-  if (gh_equal_p (s, ly_symbol2scm ("allways"))
+  if (gh_equal_p (s, ly_symbol2scm ("always"))
       || (s == SCM_EOL
 	  && daddy_trans_l_->id_str_.left_str (3) == "two"
 	  && (to_boolean (get_property ("unison"))
diff -purN ../lilypond-1.5.66/lily/volta-bracket.cc ./lily/volta-bracket.cc
--- ../lilypond-1.5.66/lily/volta-bracket.cc	Thu Jul  4 13:03:24 2002
+++ ./lily/volta-bracket.cc	Thu Jul 11 12:52:30 2002
@@ -9,7 +9,7 @@
 #include <string.h>
 
 #include "box.hh"
-#include "debug.hh"
+#include "warn.hh"
 #include "font-interface.hh"
 #include "molecule.hh"
 #include "paper-column.hh"
diff -purN ../lilypond-1.5.66/ly/paper19.ly ./ly/paper19.ly
--- ../lilypond-1.5.66/ly/paper19.ly	Thu Jan  1 01:00:00 1970
+++ ./ly/paper19.ly	Sun Jul  7 18:23:32 2002
@@ -0,0 +1,14 @@
+% paper20-init.ly
+
+
+\version "1.5.49"
+
+paperNineteen = \paper {
+	staffheight = 19.0\pt
+	\stylesheet #(make-style-sheet 'paper19)
+	
+	\include "params-init.ly"
+}
+
+\paper { \paperNineteen }
+
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Cembalo-Partitas/GNUmakefile ./mutopia/J.S.Bach/Cembalo-Partitas/GNUmakefile
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Cembalo-Partitas/GNUmakefile	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Cembalo-Partitas/GNUmakefile	Thu Jan  1 01:00:00 1970
@@ -1,8 +0,0 @@
-# mutopia/J.S.Bach/Petites-Preludes/Makefile
-
-depth = ../../..
-
-
-LOCALSTEPMAKE_TEMPLATES=ly mutopia
-
-include $(depth)/make/stepmake.make
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly ./mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly	Thu Jan  1 01:00:00 1970
@@ -1,148 +0,0 @@
-\header{
-	enteredby = "Tom Cato Amundsen"
-	copyright = "Public Domain"
-	piece = "Allemande"
-}
-
-\version "1.3.146"
-
-global =  \notes{
-	\time 4/4
-	\partial 8*3
-	\key es \major
-	\skip 1*15
-	\skip 4*3
-	\skip 16*4
-	\bar ":|:"
-	\skip 16*3
-	\skip 1*16
-	\bar ":|"
-}
-
-hoyreEn =  \notes\relative c'''{
-%	\partial 4. 
-	[as16 g f] |
-	[g16 d es b][c f es d][es b c g][as d c b] |
-	[c g as es][f es' d c][b8. a16][g8 b] |
-	[c16 d es8][f,16 es' d c][d es f8][g,16 f' es d] |
-	[es16 f g8][as,16 g' f es][f g as8][b,16  as' g f] |
-%5
-	\context Staff < { 
-		\stemUp es4~ [es8. c16] d4~ [d8. b16] |
-		c4.~ [c16 b] c4~ [c16 c bes as] |
-		\stemBoth [g c32 d es16 c][g8 as] \stemUp bes4~ [bes8 g'~] |
-		\stemBoth [g16 c,32 d es16 c][a f' c32 d es16] \stemUp d4~ [d8 d] |
-		[d8 c] r16 [fis g a][es8 d] r16 [g a bes] |
-		[f8 e] r16 [a bes c][g8 fis] r16 [es d c] |
-	} {
-		\stemDown r16 [b c g][as es f8] r16 [g as f][g d es8~] |
-%TODO når du får tak i en til urtekst må denne og neste takt sammenliknes.
-		[es16 f32 g as16 f][d f8.~][f16 f es d][es8 f] |
-		s4 r4 r16 [f g d] es8 r |
-		s2 r16 [a bes8~][bes fis] |
-		g4 r a r |
-		bes r c r
-	} >
-%11
-	[d16 a bes fis][g c bes a][bes fis g d][es a g fis] |
-	[g d es b][c f es d][es c d fis][a es d c] |
-	[bes d g bes~][bes fis g bes,][c es g bes~][bes fis g c,] |
-	[d fis g bes~][bes fis g d][es fis g bes~][bes fis g bes] |
-	[e a, bes fis][g bes a g][fis d es bes][c es d c] |
-	\context Staff <
-		{ \stemUp [bes8 d'][bes a16 g] g4~ g16 }
-		{ \stemUp s2 s16 d8.~ d16 }
-		{ \stemDown r8 <g d> <[g d><fis c>] r16 [d16 b8~] b16 }
-	>
-	[es'16 d c] |
-%17
-	[d a b g][as f es d][es( f32 )g c,8] r16 [as'' g f] |
-	[g d e c][des bes as g][as( bes32 )c f,8] r16 [c f g] |
-	[as e f c][des c' bes as][bes f g d][e des' c bes] |
-	[c g as e][f es' des c][des a bes g] g'4~ |
-	[g16( )c, f( )e][as( g f )e][f( )c es( )des][bes'( as g )f] |
-%22
-	[e16( f32 )g c,16 bes][as f' g, e'] f4~ [f32 g f e f16 g] |
-	[as16 e f c][as f es' c][d a bes d][f as g f] |
-	[g d es bes][g es d' b][c g as c][es g f es] |
-	[f c d as][f d c' a][b fis g b][d f es d] |
-	[es b c as][g f es' d][c b c d][g,8 d'] |
-	[es16 g c g][es d c b][c es g8~][g16 bes, as g] |
-%28
-	[as c f c][as g f e][f b d8~][d16 f, es d] |
-	[c8 es'( as, )g][d f'( as, )g] |
-	[es g'( as, )g][f as'16( g][as g fis )g] |
-	fis4.~ [fis16 e32 fis][g16 d f es][d c b a] |
-	\context Staff <
-		{ \stemUp [g8 g'][es d16 c] c4. }
-		{ \stemDown r8 <g c es> <[g c> <f b>] <es4. g> } 
-	>	s8
-}
-
-venstreEn =  \notes\relative c{
-	\clef bass 
-%	\partial 4. 
-	r16 r8 |
-	[c8 c,] \clef treble r16 [as''' g f][g d es b][c f es d] |
-	\clef bass [es b c g][as8 f][g g,~][g16 f' es d] |
-	[es b c g][as g' f es][f c d a][bes as' g f] |
-	[g d es b][c bes' as g][as es f c][d8 b'] |
-%5
-	[c8 es][f, as][b, d][es, g] |
-	[as f][g g'][c, g']
-	\context Staff <
-		{ \stemUp [c8 d] | es4 }
-		{ \stemDown c4 ~ | [c8. g32 f] }
-	>
-	\stemBoth [es, f g16 c,32 d es16][g,8. bes32 as][g as bes16 es,32 f g16] |
-%8
-	[a,8 c][f a][bes8. f''32 es][d es f16 bes,32 c d16] |
-	[es, g a bes][c d es c][fis, a bes c][d e fis d] |
-	[g, bes c d][e fis g es][a, c d es][d c bes a] |
-	[bes c d a][bes es d c][d a bes fis][g c bes a] |
-	[bes fis g d][es32 f g16 c,32 d es16] fis,4 r8 d8 |
-%13
-	[g8 bes'( es, )d][a c'( es, )d] |
-	[bes d'( es, )d][c es'( es, )d] |
-	<cis4 cis,> r8 cis8 [d a][fis d] |
-%16
-	[g16 a bes c][d8 d,]
-	\context Staff <
-		{ \stemUp r8 r16 d' g }
-		{ \stemDown g,4~ g16 }
-	>
-	r16 r8 |
-%17
-	[g,8 g'] r16 [as g f][g d es b][c f, es d] |
-	[c8 c'] r16 [des' c bes][c g as e][f bes, as g] |
-	[f g as8][bes,16 as' g f][g as bes8][c,16 bes' as g] |
-	[as bes c8][des,16 c' bes as][bes c des8][e,16 des' c bes] |
-	[as8 c][f, as][des f g, bes~] |
-%22
-	[bes8 as16 bes][c8 c,][f16 c' f g][as f as c] |
-	[f8 as, c f,][bes f' d bes] |
-	[es g, bes es,][as es' c as] |
-	[d f, as d,][g d'][b g] |
-	[c es,][as f][g g,~][g16 as' g f] |
-	[g d es b][c f es d][es b c g][as des c bes] |
-%28
-	[c g as e][f bes as g][as f g b][d as g f] |
-	[es( g c )es~][es b c es,][f( as c )es~][es b c f,] |
-	[g( b c )es~][es b c g][as b c es~][es b c es] |
-	[a d, es b][c es d c][b g as es][f as g f] |
-	[es g c es][g8 g,] <c4. c,> s8
-}
-
-\score{
-	\context GrandStaff <
-		\context Staff = treble <
-			\global
-			\hoyreEn
-		>
-		\context Staff = bass <
-			\global
-			\venstreEn
-		>
-	>
-	\paper{}
-}
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly ./mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly	Thu Jan  1 01:00:00 1970
@@ -1,498 +0,0 @@
-\header{
-	enteredby = "Tom Cato Amundsen"
-	copyright = "Public Domain"
-	piece = "Capriccio"
-}
-
-%% I takt 22 foretar jeg et stemmekryss mellom stemme en og to, pga at den 
-%% stemmen som tidligere har vært andre stemme, kommeri resten av stykket
-%% ligge øverst og følgelig er første stemme.
-%% 
-%% Noe liknende skjer også i mellom andre og tredje stemme i takt 28
-
-\version "1.3.146"
-
-global =  \notes{
-	\time 2/4
-	\key es \major
-	s2*48
-	\bar ":|:"
-	s2*48
-	\bar "|."
-}
-
-vOne =  \context Voice = voiceOne \notes\relative c''{
-	r8 g c4~ |	
-	[c8 d16 c][b a g f] |
-	[es8 g' d, f'] |
-	[es16 d c d][e fis g a] |
-%5
-	[bes g fis g][d g fis g] |
-	[c g fis g][a g fis e] |
-	d8 g4 fis8 |
-	g r r4 |
-%9
-	r16 [c, fis, g][a bes c8~] |
-	[c16 bes a bes][c d e fis] |
-	[g8 fis16 g~] g4~ |
-	[g8 e16 g~] g4~ |
-	[g8 e16 f~] f4~ |
-	[f8~ d16 f~] f4~ |
-	[f16 es d f][es d c b] |
-	[c b c d][es f g8~]
-%17
-	[g16 f es g ][f es d c] |
-	[b a b c][d es f8~] |
-	[f16 as g f][es d c bes!] |
-	[as c f es][d c b d] |
-%21
-	[g f es g][f es d f] |
-%stemmekryss ugh
-	r16 [c b c][g c b c] |
-	[es c a' es][c' es, d c] |
-	[d bes a bes][f bes a bes] |
-%25
-	[d bes g' d][bes' d, c bes] |
-	[c a g a][fis a g a] |
-	[c a fis' c][a' c, bes a] |
-	[bes8 d] g4~ |
-%29
-	[g8 a16 g][fis e d c] |
-	[bes8 d' a, c'] |
-	[g, bes'16 a][g8 bes] |
-	[e, g bes, e] |
-%33
-	[f, as'16 g][f8 as] |
-	[d, f as, d] |
-	es,4 r8 c' |
-	as4 r |
-%37
-	r8 g c4~ |
-	[c8 d16 c][b a g f] |
-	[es8 g' d, f'~] |
-	[f16 es d f][es d c bes] |
-%41
-	[as g as bes][c d es8~] |
-	[es16 d c es][d c bes as] |
-	[g f g as][bes c des8~] |
-	[des16 c bes des][c bes as g] |
-%45
-	as2~ |
-	[as8 g] g4~ |
-	[g8 as16 g][f es d c] |
-	g'2 |
-%49
-	r8 d' g,4~|
-	[g8 f16 g][a b c d] |
-	[es8 c, f' d,]
-	[g'16 as g f][es d c bes] |
-%53
-	[as8 f' g, e'] |
-	[f16 c' e, f] r [c' e, f~] |
-	f4 r |
-	r8 [f16 g][as bes c d,] |
-%57
-	es8 r r4 |
-	r8 [es16 f][g as bes! g] |
-	as8 r r4 |
-	r16 [g f es][d c b a] |
-%61
-	[b c d es] f4~ |
-	[f16 es b c] r [es b c] |
-	r [d b c] r [c b c~] |
-	[c8 g' d f~] |
-%65
-	[f es16 f] g4~ |
-	[g8 f c es~] |
-	[es d16 es] f4~ |
-	[f8 es16 d][c bes a g] |
-	c2~ |
-	c4. c8 |
-	bes4 a |
-	r16 [a' fis g] r16 [a fis g] |
-%73
-	r8 g es4~ |
-	es8 d4 c8~ |
-	[c es d c] |
-	[bes g'][a, fis'] |
-%77
-	g4 r8 f! |
-	b,4 r |
-	r8 g' c,4~ |
-	[c8 bes16 c][d e f g] |
-%81
-	[as16 c8.][as16 c bes c] |
-	[as c8.][as16 bes as bes] |
-	[g bes8.][g16 bes as bes] |
-	[g bes8.][g16 as g as] |
-%85
-	[f as8.][f16 as g as] |
-	[f as8.][f16 g f g] |
-	[es g d g][c, f bes, es] |
-	[as, c f es] f4 |
-%89
-	r8 c g'4~ |
-	[g8 as16 g][f es d c] |
-	b4 r8 es |
-	c4 r |
-%93
-	r8 g f'4~ |
-	[f8 d g <f as,>] |
-	<es4 g,> <d f,> |
-	<c2 g es>
-}
-
-vTwo =  \context Voice = voiceTwo \notes\relative c{
-	es4 r8 es |
-	f4 r8 bes |
-	c4. b8 |
-	c r r4 |
-%5
-	r8 d g4~ |
-	[g8 a16 g][fis e d c] | 
-	[bes8 d' a, c'~] |
-	[c16 bes a c][bes a g f!] |
-%9
-	[es8 c] r8 fis! |
-	g r r a! |
-	[bes16 d8.][bes16 des c des] |
-	[bes16 des8.][bes16 c bes c] |
-%13	
-	[as c8.][as16 c bes c] |
-	[as bes8.][as16 bes as bes] |
-	g8 r r4 |
-	r8 [es16 f][g a b! c] |
-%17
-	d8 r r4 |
-	r8 [d,16 es][f g a! b!] |
-	c8 r r4 |
-	r2 |
-%21
-	r8 c4 b8 |
-	es4 r |
-	s2*5 |
-	r16 [g,, fis g][d g fis g]
-%29
-	[c, g' fis g][a g fis e] |
-	d8 g4 fis8 |
-	r16 [g fis g][d g fis g] |
-	[bes g e' bes][g' bes, as g] |
-%33
-	[as f e f][c f e f] |
-	[as f d' as][f' as, g f] |
-	[g8 bes] es4~
-	[es8 f16 es][d c bes as] |
-%37
-	g4 r8 c |
-	f4 r |
-	r8 [es, f g~] |
-	[g g] c4~ |
-%41
-	[c8 c16 d][es f g as] |
-	bes8 f, bes4~ | % HACK vil bruke [...] her
-	[bes8 bes16 c][des es f g] |
-	as8 [g, f e] |  % HACK vil bruke [...] her
-%45
-	[f16 f' e g][f es d! c] |
-	b4 r8 es |
-	c2 |
-	b2 |
-%49
-	b4 r8 d |
-	g, c4 b8 |
-	r16 [g as g] r [f g f] |
-	es8 g' c,4~ | % HACK vil egentlig bruke [...]
-%53
-	[c8 bes16 c][d e f g] |
-	[as8 f,][bes' g,] |
-	[c'16 des c bes][as g f es!] |
-	[d!16 c d es][f g as8~] |
-%57
-	[as16 c bes as][g f es d] |
-	[c b c d][es f g8~] |
-	[g16 bes as g][f es d c] |
-	b8 r r4 |
-%61
-	r4 r8 d'8 |
-	g,4 f |
-	es d |
-	[es8 es' b d~] |
-%65
-	d4. [c16 bes] |
-	a4. c8 |
-	c4. [bes16 as] |
-	g4 r |
-%69
-	r8 [bes as g] |
-	[fis a] d,4~ |
-	[d8 c16 d][e fis g a!] |
-	[bes8 g,][c' a,]
-%73
-	d'4. c8 |
-	fis, bes4 a8~ |
-	[a fis g a] |
-	d, r r16 [es' d c] |
-%77
-	[b8 d] g,4~ |
-	[g8 f16 g][a b! c d] |
-	[es b, c d][es f g as!] |
-	[bes! as g as][bes c d e!] |
-%81
-	[f8 e16 f~] f4~ |
-	[f8 e16 f~] f4~ |
-	[f8 d16 es!~] es4~ |
-	[es8 d16 es~] es4~ |
-%85
-	[es8 c16 d~] d4~ |
-	[d8 c16 d~] d4 |
-	[c8 bes! as g] |
-	f4 r16 [c' b d] |
-%89
-	g,4 r8 es' |
-	c4 r |
-	r8 d, g4~ |
-	[g8 as16 g][f es d c] |
-%93
-	b4 r8 d' |
-	[g, b c d~] |
-% ???
-% What have i misunderstood? I want the note_head not to collide with
-% i hotehead i vOne
-	\property Voice.horizontalNoteShift = -1
-	d 
-	\property Voice.horizontalNoteShift = 0
-	c4 b8 |
-}
-vThree =  \context Voice = voiceThree \notes\relative c{
-	\stemDown
-	c4 r8 c |
-	d4 r |
-	r8 [es f g] |
-	[c, c' bes! a] |
-%5
-	g4 r8 g |
-	a4 r |
-	r8 [bes, c d] |
-	[g, d'] g4~ |
-%9
-	[g8 a16 g][fis e d c] |
-	[bes8 d' a, c'] |
-	[g, bes' f,! as'!] |
-	[e, g' c,, e']
-%13
-	[f, as' es,! g'] |
-	[d, f' bes,, d'] |
-	[es, es' f g] |
-	as r8 r4 |
-%17
-	r8 [d, es f] |
-	g r8 r4 |
-	r8 g c4~ |
-	[c8 d16 c][b a g f] |
-%21
-	[es8 g' d, f'] |
-	[c, es'16 d][c8 es] |
-	[a, c f, a] |
-	[bes, d'16 c][bes8 d] |
-%25
-	[g, bes es, g] |
-	[a, c'16 bes][a8 c] |
-	[fis, a d, fis] |
-	g,8 r bes r |
-%29
-	a r c r |
-	r [bes c d] |
-	g, r bes r |
-	r4 c8 r |
-%33
-	f r as, r |
-	r4 bes8 r |
-	r16 [f'16 es d][c bes as g] |
-	[f es' d c][bes as g f] |
-%37
-	[es d' c bes][as g f es] |
-	[d c' b a][g f es d] |
-	c8 c'4 b8 |
-	c4 r16 [c d es] |
-%41
-	f8 r r4 |
-	bes,4 r16 [bes c d] |
-	es8 r r4 |
-	r8 [as, bes c] |
-%45
-	[f, c'] f4~ |
-	[f16 es d f][es d c bes] |
-	[as8 g] as4^\mordent |
-	g2
-%49
-	g'4 r8 f |
-	es4 d |
-	c8 r d r |
-	es4 r8 e |
-%53
-	f4 [bes8 c] |
-	f8 r g r |
-	[as f,g as] |
-	bes r r4 |
-%57
-	r8 [es, f g] |
-	as r r4 |
-	r8 [d, es f] |
-	[g d] g,4~ |
-%61
-	[g8 f16 g][a b c d] |
-	[es8 c, f' d,] |
-	[g' es, as' f,] |
-	[g'16 g, g' as][g f es d] |
-%65
-	[c g' c d][c bes a g] |
-	[f f, f' g][f es d c] |
-	[bes f' bes c][bes as! g f] |
-	[es es, es' f][es d c bes] |
-%69
-	[a g a bes][c d es c] |
-	[d c d e][fis g a fis] |
-	[g8 es c d] |
-	g, r es' r |
-%73
-	[bes16 g' fis g][c, a' fis g] |
-	[d bes' fis g][es c' fis, g] |
-	[fis, es' d c][bes a g fis] |
-	[g f! es d][c8 d] |
-%77
-	[g16 fis g a][b c d es] |
-	[f es d es][f g a b] |
-	c8 r r c |
-	e, r r c' |
-%81
-	[f, as' es, g'] |
-	[d, f' bes,, d'] |
-	[es, g' d, f'] |
-	[c, es' as,, c'] |
-%85
-	[d,8 f' c, es'] |
-	[b, d' g,, b'] |
-	[c, g'] c4~ |
-	[c8 d16 c][b a g f] |
-%89
-	[es d c d][es f g es] |
-	[as g f g] as4~ |
-	[as16 as g f][es d c bes!] |
-	[as g' f es][d c b a] |
-%93
-	[g es' d c][b a g f] |
-	[es as g f][es d es f] |
-	[g c es fis][g8 g,] |
-	<c2 c,>
-}
-
-vOneSwitch =  \context Voice = voiceOne \notes{
-	s2*4
-%5
-	\stemUp	s2*17
-%22
-	\stemDown s16*1
-	\stemBoth s16*7
-%23
-	s2*12 
-%35
-	s4 \stemUp s4 
-	s2*3
-%39
-	\stemBoth s2*2
-%41
-	\stemUp s2*8
-%49
-	\stemBoth s2*3
-%52
-	\stemUp s2*8
-%60
-	\stemBoth s2
-%61
-	\stemUp s2*35
-%96
-	\stemBoth
-}
-
-vTwoSwitch =  \context Voice = voiceTwo \notes{
-	\stemUp	s2*4 
-%5
-	\stemDown \translator Staff = treble s2*17
-%22
-	\stemUp
-	s2*6
-%28
-	\translator Staff = bass s2*7
-%35
-	s4 \translator Staff = treble \stemDown s4
-	s2*3
-%39	
-	\translator Staff = bass \stemUp s2*2
-%41
-	s4 \translator Staff = treble \stemDown s4
-%42
-	s8 \translator Staff = bass \stemUp s8*3 
-%43
-	s4 \translator Staff = treble \stemDown s4
-%44
-	s8 \translator Staff = bass \stemUp s8*3
-%45
-	\translator Staff = treble \stemDown s2*4
-%49
-	\stemUp \translator Staff = bass s2*3
-%52
-	s8*1 \stemDown \translator Staff = treble \stemDown s8*3
-	s2*7
-%60
-	\stemUp \translator Staff = bass s2
-%61
-	\translator Staff = treble \stemDown s2*35
-}
-
-vThreeSwitch =  \context Voice = voiceThree \notes{
-	\stemDown s2*6
-%7
-	\stemBoth s2*21
-%28
-	\stemDown s2*7
-%35
-	s4 \stemBoth s4
-%36
-	s2*3
-%39
-	\stemDown s2*7
-%46
-	\stemBoth s2*3
-%49
-	\stemDown s2*3
-%52
-	s4 \stemBoth s4
-	s2
-%54
-	s2*2 %HACK evt endre her, sammenlikne med Henle	
-%56
-	s2*4
-%60
-	\stemDown 
-}
-
-\score{
-	\context GrandStaff<
-		\context Staff = treble <
-			\global
-			\vOneSwitch
-			\vOne
-		>
-		\context Staff = bass <			
-			\clef bass
-			\global
-			\vTwoSwitch
-			\vTwo
-			\vThreeSwitch
-			\vThree
-		>
-	>
-	\paper{
-	}
-	\midi{\tempo 4 =60}
-}
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly ./mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly	Thu Jan  1 01:00:00 1970
@@ -1,341 +0,0 @@
-\header {
-  filename =    ""
-  title =       "Partita II"
-  piece =       "Sinfonia"
-  description = "6 Partite per il clavicembalo, Partita II (c-minor)"
-  opus =        "BWV 826"
-  source =      "Editio Musica Budapest (Urtext)"
-  composer =    "Johann Sebastian Bach (1685-1750)"
-  enteredby =   "Tom Cato Amundsen"
-  copyright =   "Public Domain"
-}
-
-\version "1.3.146"
-
-global =  \notes {
-	\time 4/4
-	\key es \major
-	\skip 1*7
-	\bar "||"
-	\skip 1*22
-	\time 3/4
-	\skip 2.*62
-	\bar "|."
-}
-  
-hoyreOpp =  \notes\relative c''  {
-	\stemUp
-	es4^"Grave adagio" r16 [es d16. es32] f4 r16 [f16 f16. g32] |
-	[as8. as16] [as16 g32 f g16. d32] es4 r16 [g g16. as32] |
-%3
-	bes4 r16 [bes,16 bes16. c32] [des8. des16] 
-	\context Staff < 
-		{ \stemUp e4 }
-		{ \stemUp \property Voice.horizontalNoteShift = 1 [des16 c32 bes c16. g32] }
-	>
-%4
-	f4 \stemBoth r16 [f g16. as32] \stemUp d,4 r16 [d g16. es32] |
-	c4 ~ [c32 es des c des16. f32] [b,16. c32 b16. c32] d4 ~ |
-	d2 ~ [d16. g,32 a16. b32] [c16. <b32 g> <c16. a> <d32 b>] |
-	<[es8. c> <es16 c>]
-	\context Staff <
-		{ \stemUp fis4 }
-		{ \stemUp \property Voice.horizontalNoteShift = 1 [es16 d32 c d16. a32] }
-	> g2
-}
-
-hoyreNed =  \notes\relative c'' {
-	\clef violin
-	\stemDown
-	<c4 g> r16 [c b16. c32] d4 r16 [d d16. es32] |
-	[f8. f16] f8 r <c4 g> r16 [es16 es16. f32] |
-	<c4 g' > r16 [g16 g16. as32] [bes8. bes16] bes8 r |
-	<c4 as> r16 s16*3 r16 [f, f16. g32] g4 |
-%5
-	r16 [es es16. f32] f4 [g16. a32 g16. a32] b4 ~ |
-	[b8. d,16] [f8. as16] [g16. f32 es16. d32] [es16. d32 es16. f32] |
-	g4 <c8 a> r <d2 b>
-}
-
-venstreOpp =  \notes\relative c' {
-	\clef bass
-	\stemUp
-	<c4 g es> r <b as f d> r |
-	r <b f d> <c g es> r |
-	<c g e> r r <c g> |
-	<c as f> r r16 <[as d,><as16. d,><g32 d>] <g4 d> |
-%5
-	r16 <[g c,><g16. c,><f32 c>] 
-	\context Staff <
-		{\stemUp f4~ f}
-		{\stemUp c4 d}
-	> r16 [f f16. g32] |
-%6
-	[as8. as16]~ [as g32 f g16 d] <es4 c> r |
-	r <a es c> <g2 d>
-}
-
-venstreNed =  \notes\relative c{
-	\stemDown
-	c4 r c r | r c c r | c r r c | c r r16 [c c16. bes32] bes4 |
-	r16 [bes bes16. as32] as4_"tr" g r16 [d' d16. es32] |
-	\context Staff <
-		{ \stemDown \property Voice.horizontalNoteShift = 1 [f8. f16] [b,8. b16] g4 r | }
-		{ \stemDown s4 g}
-	>
-	r g g2	
-}
-
-andanteEn =  \notes\relative c''{
-	[g16^"andante" c32 d es8~] [es16 d32 c es d c b] [c16 g as f] [g c g f] |
-	[es16 c'32 d es d c16] [g' c, as' c,] [b c d b] g16 r16 r8 |
-%10
-	\stemUp [g'32 f es d c16 bes~] [bes des8 c16] 
-	[as'32 g f e f8~] [f32 g as g f es d es] |
-	[f es d c bes16 as~] [as c8 bes16] 
-	[g'32 f es d es8~] [es32 f g f es d c b]
-%12
-	\stemBoth
-	[c bes as g f16 es'~] [es d32 c es d c b]
-	[c d es f g16 c,~] [c b32 c d c b c] |
-	[as'32 g f e f16 des~] [des c32 des es des c des]
-	[g f es d es16 c~] [c b32 c d c b c]
-%14
-	[f c b a b16 d] [f32 bes, as g as16 c] 
-	[f32 as, g f g8~] [g32 f' g as g16 f] |
-	[g16 b,8 c16~] [c16 bes32 as g f es d] [es g f es f es d es] [d8 c] |
-%16
-	r8 g'~ [g32 as g f g16 as] [bes16 d es8~] [es32 bes es f g16 es] |
-	[des16 c f8~] [f32 c f g as16 f] [es c d8~] [d32 f g as bes as g as] |
-%18
-	[bes32 as g16~] [g32 f e16~] [e32 d c16~] [c32 g' as bes] 
-	[as g f16~] [f32 es des16~] [des32 c bes16] [bes32 f' g as] |
-%19
-	[g f e f bes f e f] [as f e f g f e f] f4~ [f32 es d es f d es f] |
-	[bes,32 d f g as8~] [as32 g f as g f es d] 
-	[es bes es f g8~] [g32 f es g f es d c] |
-%21
-	[c'32( a g )fis es16 d~] [d32 g a bes cis,16 d] ~
-	[d32 fis g a c, es d c] [fis d e fis g a bes c] |
-%22
-	[bes32 a g fis ~ fis16 g~] [g d8 es16~] 
-	[es16 b8 c16~] [c32 bes as g as16 c]
-%23
-	[fis,32 es' d c bes'16. a32] [g8( )fis16.-\prall g32] g4~ 
-	[g32 f g as g f es d ] |
-	[f32 es d c g'8~] [g32 es f g f es d c] [es d c bes g'8~] 
-	[g32 d es f es d c bes] |
-%25
-	[d c bes a g'8~] [g32 c, d es d c bes a] [c bes a g g'8~] 
-	[g32 bes, c d c bes a g] |
-	as4~ [as32 as g as bes as g as] es'4~ [es32 c b c d c b c] |
-	[fis16 es8 d16] [g16 d8 c16] [a'16 c,8 bes16~] [bes32 d c bes g' bes, a g]
-%28
-	[bes'8-\fermata~ bes32 a g fis] [g bes a g fis e d c] [bes d c es d g fis e]
-	[d c bes a bes d bes g] |
-	r16 [e'32 fis fis16.-\prall \times 2/3 { e64 fis g] }  
-	\context Staff <
-	 	{	\stemUp  
-			[bes,32 a g fis g32 bes16.~] [bes16 c32 bes a bes c a] [fis8. g16] }
-		{	\stemDown s8 g8 ~ g4 d}
-   >
-}
-
-andanteTo =  \notes\relative c{
-%8
-	[c8 c'] [f, g] [es c] [es g] |
-	[c as] [es f] [g g,]
-	\stemDown \translator Staff = treble r16 [f''16 es d] |
-%10
-	[es8 g] [e c] [f as] [f c] | 
-	[d f] [d bes] [es g] [es c] |
-	\stemBoth \translator Staff = bass [as c] [f as,] [g c] [es g,] | 
-	[f as] [g f] [es g] [f es] |
-%14
-	[d f] [as c,] [b d] [g d] | 
-	[es as,] [f g] c,4~ [c16 d32 es f g a b] |
-	[c8 c'] [bes as] [g bes] [g es] |
-	[as c] [as f] [bes as] [g f] |
-	[e g] [c e,] [f as] [f des] |
-	[bes g] [c c,] [f16 g32 as bes c d e] [f8 es] |
-	[d f] [d bes] [g' bes] [es, g] |
-	[a, fis'] [g g,] [d' a'] [c d,] |
-%22
-	[g a] [bes b] [c d] [es c] |
-	[a g] [d' d,] [g a] [b g] |
-	[c es] [c a] [bes d] [bes g] |
-	[a c] [a fis] [g bes] [g es] |
-%26
-	[c16 d32 es f g as bes] [c16 c, c'8~] [c32 c, d es f g as bes][c16 c, c'8~]|
-	[c c,] [bes bes'] [fis d] [g es] |
-	\context Staff <
-		{ 	\stemUp <g4 e> r <d'2 bes g> |
-			cis4~ [cis8. cis16] [d8 c16 bes] 
-			\context Staff <	
-				{ \stemUp [a bes c8] }
-				{ \stemDown a4 } >
-		| }
-		{ 	\slurdown \stemDown cis,4 r d2( | )d1 \slurboth }
-	>
-}
-
-allegroEn =  \notes\relative c''{
-%30
-	[g8^"allegro" g16 a] [b8 c d es] |
-	[f16 es d es] [f8 g as d,] |
-	[f b, d g,] [g'16 f es d] |
-	es8 c'4 [bes16 as] [g f es d] |
-	c4~ [c16 d e f] [g as bes g] |
-	[e8 des'~] [des16 g, as bes] [as g f e] |
-	[f g as8~] [as16 g f es] [d c d f] |
-%37
-	[es f g8~] [g16 f es d] [c b c es] |
-	[d as' d, c] [d es f g] [ f es d c] |
-	[b g' f es] [d f d c] [b d b a] |
-	[g a b c] [d c b c] [d es f d] |
-	[b c d es] [f as g f] [es d c b] |
-	[c d es c] [a8 c] [f, es'] |
-%43
-	[bes16 c d bes] [g8 bes] [es, d'] |
-	[a16 bes c a] [fis8 a] [d, c'] |
-	[g16 a bes g] [es g d g] [cis, bes' a g] |
-	[fis e d e] [fis8 g a bes] |
-	[c16 bes a bes] [c8 d] [es a,] |
-	[c fis,] [a d,] [d'16 c bes a]
-%49
-	[bes a g a] [bes8 c d es] | 
-	[f16 es d c] [bes f' c bes] [as f' bes, as] |
-	[g16 f es f] [g8 a b c] | 
-	[d16 c b a] [g d' as g] [f d' g, f] |
-	[es c' g f] [es f g as] [g c g f] | 
-	[es c' g f] [es f g as] [g c g f]
-%55
-	[e bes' g f] [e f g as] [g bes g f] | 
-	[e bes' g f] [e g bes des] [c bes as g]|
-	[as f' c bes] \stemUp [as bes c des] [ c f c bes] | 
-	[as f' c bes] \stemBoth [as bes c des] [c f c bes] |
-	[a es' c bes] \stemUp [a bes c des] [c es c bes] |
-	[a es' c bes] \stemBoth [a c es ges] [f es des c] |
-%61
-	[des8 bes c des es des] | 
-	[c as bes c des c] [bes as bes g as bes] |
-	[e,16 d c d] [e8 f g as] | 
-	[bes16 as g as] [bes8 c] [des g,] |
-	[bes e,] [g c,] [c'16 bes as g]
-%67
-	[as g f8~] [f16 as g f] [es d c bes] | 
-	[g' f es8~] [es16 g f es] [d c b c] |
-	[f es d8~] [d16 f es d] [c b a g] | 
-	[es' f g8~] [g f16 es] [d a' b c] |
-	[d c b c] [d g f es] [d c b a] | 
-	g4~ [g16 a b c] [d es f d]
-%73
-	[b8 as'~] [as16 d, es f] [es d c b] | 
-	c4~ [c16 g' des c] [bes es bes as] |
-	[g as bes c] [des8 bes] g'4~ | 
-	[g8 c,16 bes] [as f' bes, as] [g des' g, f] |
-	[e f g as] [bes8 g] [e'8.-\prallprall d32 e] |
-%78
-	[f8 f,16 g] [as8 bes c d] | 
-	[es16 d c d] [es8 f g as] |
-	[b,16 g' d c] \stemUp [b c d es] [d g d c] | 
-	[b g' d c] [b c d es] [d g d c] |
-	[b f' d c] [b c d es] [d f d c] | 
-	[b f' d c] [b d f as] [g f es d] |
-%84
-	[es f g es] [c g' f es] [d c bes as] | 
-	\stemBoth [g as bes8~] [bes16 c bes as] [g f e d] | 
-	[c g' c, bes] [c d e f] [es g c, bes] |
-	[c g' f e] [f c f g] [as bes c d] | [es d c d] [es8 f16 g] [as8 des,] |
-	[f b,] [d g,] [g'16 f es d] | 
-	\context Staff <
-		{ \stemUp [es8. c16] c4 ~ [b8.-\prall c16] | c2-\fermata }
-		{ \stemDown r8 r16 <a16 es> <g2 d> | <g es> }
-	>
-}
-allegroTo =  \notes\relative c'{
-	\clef bass
-%30
-	\context Staff <
-		{ \stemUp <b8 g> r r4 r }
-		{ \stemDown g,8 r8 r4 r }
-	>
-	r2. | r2. | 	
-	\clef treble r8 [c16 d] [es8 f] [g as] |
-	[bes16 as g as][bes8 c] [des g,]  
-	[bes e,][g c,][c'16 bes as g] | [as8 f g as][bes as] | 
-	[g es f g as g] | [f es f d es f] | [g g,16 a] [b8 c] [d es] |
-	[f16 es d es][f8 g][as d,] |
-	[f b,][d g,][g'16 f es d] | \clef bass
-	[es d c8~][c16 es d c][bes a g f] |
-%43
-	[d' c bes8~][bes16 d c bes][a g fis g] |
-	[c bes a8~][a16 c bes a][g fis e d] | [bes'8 d][g, bes][e, cis'] |
-	[d8 d,~][d c16 bes][a g fis e] | d4~ [d16 e fis g][a bes c a]
-%48
-	[fis8 es'~][es16 a, bes c][bes a g fis] |
-	g4 r16 [g' as bes][as g f es] | [d8 f][d bes][c d] |
-	[es es,] r16 [es' f g][f es d c] | [b8 d][b g][a b] |
-	[c c,] r16 [d''16 es f][es8 d] | [c c,] r16 [as' bes c][bes8 as] |
-	[g c,] r16 [d' e f][e8 d] | [c c,] r16 [d e f][e8 c]
-%57
-	[f f,] \stemDown \translator Staff = treble r16 [g'' as bes][as8 g] |
-	[f  \stemBoth \translator Staff = bass f,] r16 [des'16 es f][es8 des] |
-	[c f,] \stemDown \translator Staff = treble r16 [g' a bes][a8 g] | 
-	[f \stemDown \translator Staff = bass f,] \stemBoth r16 [g a bes][a8 f] |
-	[bes16 c des8~][des16 c bes as][g f g bes] |
-%62
-	[as bes c8~][c16 bes as g][f e f as] | 
-	[g des' g, f][g as bes c][bes as g f] | 
-	[c'8 bes16 as][g c bes as][g f e d] |
-	c4~ [c16 d e f][g as bes g] | 
-	[e8 des'~][des16 g, as bes][as g f e] |
-%67
-	[f g as f][d8 f][bes, as'] | 
-	[es16 f g es][c8 es][as, g'] |
-	[d16 es f d][b8 d][g, f'] | 
-	[c16 d es c][as c g c][fis, es' d c] |
-	[b a g a][b8 c d es] | 
-	[f16 es d es][f8 g as d,] |
-%73
-	[f b,][d g,][g'16 f es d] | 
-	[es d c d][es8 f g as] |
-	[bes16 as g f][es bes' f es][des bes' es, des] |
-	[c bes as bes][c8 d e f] | 
-	[g16 f e d][c g' des c][bes g' c, bes] |
-	[as f' as, g][f c' des g,][a es' f b,]
-%79
-	[c f es d][c g' as d,][es b' c f,] | 
-	[g8 g,] \stemDown \translator Staff = treble r16 [a'' b c][b8 a] |
-	[g \translator Staff = bass g,] \translator Staff = treble
-		r16 [es' f g][f8 es] | 
-	[d \stemBoth \translator Staff = bass g,] r16 [a b c][b8 a] |
-	[g8 g,] \stemDown \translator Staff = treble r8 [g''16 f][es d c b] |
-	[c8 \stemBoth \translator Staff = bass c,16 d][es8 f g as] | 
-	[bes16 as g as][bes8 c des g,] |
-%86
-	[bes e,][g c,][c'16 bes as g] | as4~ [as16 bes as g][f g as f] |
-	[g f es d][c bes as g][f f' e f] | [as f e f][b, f' es d][es g c, es] |
-	[fis,8. fis'16] g4 g, | c,2-\fermata
-}
-
-\score {
-     \context GrandStaff < 
-      \context Staff = treble < 
-        \global 
-        { \hoyreOpp \andanteEn \allegroEn }
-        \hoyreNed
-      >
-      \context Staff = bass <
-        \global
-        { \venstreOpp \andanteTo \allegroTo }
-	\venstreNed
-      >
-    >
-  \paper {}
-}
-
-% EOF
-
-
-
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/GNUmakefile ./mutopia/J.S.Bach/Duette/GNUmakefile
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/GNUmakefile	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/GNUmakefile	Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-# mutopia/J.S.Bach/Duette/GNUmakefile
-
-depth = ../../..
-
-SUBDIRS =
-EXTRA_DIST_FILES=
-
-LOCALSTEPMAKE_TEMPLATES=ly mutopia
-examples=
-
-include $(depth)/make/stepmake.make
-
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/global-i.ly ./mutopia/J.S.Bach/Duette/global-i.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/global-i.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/global-i.ly	Thu Jan  1 01:00:00 1970
@@ -1,6 +0,0 @@
-\version "1.3.146"
-
-globalI =  \notes{
-	\time 12/8
-	\key g \major
-}
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/global-ii.ly ./mutopia/J.S.Bach/Duette/global-ii.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/global-ii.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/global-ii.ly	Thu Jan  1 01:00:00 1970
@@ -1,7 +0,0 @@
-\version "1.3.146"
-
-globalIi =  \notes{
-	\time 4/4
-	\property Staff.TimeSignature \override #'style = #'C2/2
-	\key a\minor
-}
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/viola-i.ly ./mutopia/J.S.Bach/Duette/viola-i.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/viola-i.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/viola-i.ly	Thu Jan  1 01:00:00 1970
@@ -1,22 +0,0 @@
-\header{
-filename = 	 "viola-i.ly"
-title = 	 	 "Vier Duette"
-description = 	 "Four duets for Violino and Violoncello (Viola)"
-opus =            "BWV"
-composer = 	 "Johann Sebastian Bach (1685-1750)"
-enteredby = 	 "jcn"
-copyright = 	 "Public Domain"
-}
-
-\version "1.3.146"
-
-\include "global-i.ly"
-\include "violoncello-i.ly"
-
-violaIStaff =  \context Staff = viola <
-  \property Staff.instrument = "viola"
-  %\property Staff.instrument = "violin"
-  \notes\transpose c'' \violoncelloI
-  \clef alto
-  \globalI
->
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/viola-ii.ly ./mutopia/J.S.Bach/Duette/viola-ii.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/viola-ii.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/viola-ii.ly	Thu Jan  1 01:00:00 1970
@@ -1,22 +0,0 @@
-\header{
-filename = 	 "viola-ii.ly"
-title = 	 	 "Vier Duette"
-description = 	 "Four duets for Violino and Violoncello (Viola)"
-opus =            "BWV"
-composer = 	 "Johann Sebastian Bach (1685-1750)"
-enteredby = 	 "jcn"
-copyright = 	 "Public Domain"
-}
-
-\version "1.3.146"
-
-\include "global-ii.ly"
-\include "violoncello-ii.ly"
-
-violaIiStaff =  \context Staff = viola <
-  \property Staff.instrument = "viola"
-  %\property Staff.instrument = "violin"
-  \clef alto
-  \globalIi
-  \notes\transpose c'' \violoncelloIi
->
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/viola-part.ly ./mutopia/J.S.Bach/Duette/viola-part.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/viola-part.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/viola-part.ly	Thu Jan  1 01:00:00 1970
@@ -1,46 +0,0 @@
-\header{
-filename = 	 "viola-part.ly"
-title = 	 	 "Vier Duette"
-description = 	 "Four duets for Violino and Violoncello (Viola)"
-opus =            "BWV"
-composer = 	 "Johann Sebastian Bach (1685-1750)"
-enteredby = 	 "jcn"
-copyright = 	 "Public Domain"
-}
-
-\version "1.3.146"
-
-% {
-
-\include "global-i.ly"
-\include "viola-i.ly"
-
-\score{
-  \violaIStaff
-  \paper{
-    %\translator { \BarNumberingStaffContext }
-  }
-  \midi{
-%urg, real/duration
-%    \tempo 4. = 69
-    \tempo 4 . = 50
-  }
-}
-
-% }
-
-\include "global-ii.ly"
-\include "viola-ii.ly"
-
-\score{
-  \violaIiStaff
-  \paper{
-%    castingalgorithm=0.0
-    %\translator { \BarNumberingStaffContext }
-    %\translator { \ScoreContext skipBars = 1 }
-  }
-  \midi{
-%    \tempo 2 = 96
-    \tempo 2 = 75
-  }
-}
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violino-i.ly ./mutopia/J.S.Bach/Duette/violino-i.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violino-i.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/violino-i.ly	Thu Jan  1 01:00:00 1970
@@ -1,109 +0,0 @@
-\header{
-filename = 	"violino-i.ly"
-title = 		 "Vier Duette"
-description = 	"Four duets for Violino and Violoncello (Viola)"
-opus = 		"BWV"
-composer = 	"Johann Sebastian Bach (1685-1750)"
-enteredby = 	"jcn"
-copyright = 	"Public Domain"
-}
-
-\version "1.3.146"
-
-violinoI =  \notes\relative c'' {
-  \property Voice.autoBeamSettings \override #'(end * * * *) = #(make-moment 3 8)\property Voice.autoBeamSettings \override #'(end 1 8 * *) = #(make-moment 1 16)
-  %{
-     should fix autobeamer: not only check shortest type's end in beam,
-     but also the newly added type's end
-  
-     Normally, we want
-
-         [c8 c c] and [c16 c  c c  c c],
-
-     ie '(end *) = 3/8
-
-     However, we don't want
-
-         [c16 c  c c  c8] c8,  TODO: manually correct these
-
-     but rather
-
-         [c16 c  c c]  c8 c8,
-
-     ie '(end X) = 1/4
-	 
-    X can't be 1/16 or 1/8
-
-    Hmm.
-   %}
-   
-  r4 r8 g16(fis e)d b'8 a r r g16(fis e)d c'8 |
-  b r r d16(b)a g(e')c d(b)a g(c)a c(b)a g(a)fis |
-  g d(e fis g a )b d(c b c a )b g(a b c d )e g()fis e(d)cis |
-  a'd,(e fis g a )b a(g fis g e )fis a(g fis e )d 
-  %%cis d e fis <g8 { \grace a, } { \grace d, } >~|
-  cis d e fis <g8 a, d,>~|
-%5
-  %%<\grace a,16 \grace d, g'16 > e(fis)d cis d 
-  <g16 a, d,> e(fis)d cis d 
-  g,8 <f'4 g, g,>~f16 d(e)c b c fis,!8 <e'4 fis,>~|
-  <e16 fis,> c(d)b a b e, b'(c)a g a d, a'(b)g fis g c, g'(a)fis e fis |
-  b,(d)e fis(g)a b(d)c b(a)g fis(g)a b(c)d e(a)g fis e d |
-  g d(e)fis g a b g(fis)g c, a' b, g'(fis)g a, c fis, g(a)b <c8( d, a>~|
-  <c d, a> )b r d16(b a)g e'8 d r r c16(b a)g g'8 | 
-%10
-  <fis a, d,> r r g16(fis)e d(b')g a(fis)e d(g)e g(fis)e d(e)cis |
-  <d4. d,>~<d16 d,> fis,(g e d)e <c'!4. d,>~<c16 d,> e,(fis d cis)d |
-  <b'4. g g,>~<b16 g g,> e,(dis)e fis g a8 b <c fis,>~ <c16 fis,> b(a)g fis e |
-  dis e fis g <a8 fis>~<a16 fis> fis(g)e d e b e(g)e dis e b e(g)e d e |
-  cis d e fis <g8 a,>~<g16 a,> e(fis)d cis d a d(fis)d cis d a d(fis)d c d |
-%15
-  b c d e <f8 g,>~<f16 g,> e(dis)e a e cis' a(gis)a dis a fis'8 [b,()a] |
-  g16 b(cis dis e fis )g b( a g fis e)dis cis( dis e fis g)a fis(e dis cis b |
-  )e g(fis)e a fis g b(a)g a fis g b(a)g fis e [dis()e fis()c] <a'8( b, fis b,>~|
-  <a b,> <)g b,> r [b,16(a g)fis] c'8 b r r [a16(g fis)e] e'8 |
-  dis8 r r e16 d(cis b g' e)fis d(cis b e cis)e d(cis b cis)ais |
-%20
-  <b4. d, g>~<b16 d,> ais( b d cis)e d8 [b()cis\prall] d [gis()b] |
-  <d,4. e,>~<d16 e,> gis,(a c! b)d <c8 e,> [a()b\prall] c [fis()a]|
-  <c,4. d,>~<c16 d,> a(b)g fis g e b'(c)a g a fis c'(d)b a b |
-  g d'(e)c b c a e'(f)d c d b8 <g'4 g, g,>~<g16 g,>c,(f! e d c |
-  )b c(f, a g f)e g(f e d c )g c(d e f g )a d(c)b a g |
-%25
-  c16 g a b c d e g(f)e f d e  c'(b)c a f g  c,(b)c <f8 g, g,>~|
-  <f16 g,> d(e)c b c fis8 a <c d, d,>~<c16 d, d,> c,(d)b a b e,8 <d'4 e,> ~|
-  <d16 e,> b(c)a gis a e' b(c)a g a fis' c(d)b a b g' d(e)c b c |
-  a' g(fis e d c)b d(c b a g)fis e'(d c b)a \breathe g(fis e)d b'8|
-  a r r r16 a, b c d(e)fis g a b c d g,(fis e)d c'8 | 
-%30
-  b r r r4 r8 r4 r8 d16 b(a g e')c|
-  d b(a g c a)b d(c f c a)b g(fis g a fis)g b(a g a fis|
-  )g e(d)c f d e g(f)e f d e f(g)a d, f e a(b)c e, g|
-  fis g(a)b e, g fis b(c)d fis, a g a(b)c fis, a g c(d)e g, b|
-  a g(a b c)d c(b a)g <f'8 g, g,> <e g, g,> r r d16(c b)a <g'8 a, d,> |
-%35
-  <fis a, d,> r r a16( fis e)d <c'8 a, d,> <b16 b, d, g,> g(a)b e,(g)c,
-  fis(g)a d,(fis|
-  )b, d(e)f b,(d)g, b(c)d g,(b)d, g(a)b d,(g)b, d(e)f b,(d|
-  )g,8 r r e'16(d c)b f'8 e r r g16(fis e)d c'8 |
-  <c4.\prall>~c16 b(a g)e' c()d b(a g)c a()c b(a)g
-  \context Staff<
-    %\context Voice { a16 f | g1. }
-    \context Voice { \stemUp\slurUp\tieUp a16 fis | g1. }
-    \context Voice=x { \stemDown\slurDown\tieDown c,16 c | b1. }
-  >
-  \bar "|."
-}
-
-\include "global-i.ly"
-
-violinoIStaff =  \context Staff = violino <
-  %urg
-  % \notes\property Voice.TextScript \set #'font-style = #'large s4^"Moderato"
-  % \notes {s4. \property Voice.TextScript \set #'font-style = #'large s4^"Moderato"}
-  % urg, timidity violino patches broken?
-  %\property Staff.instrument = "violin"
-  \property Staff.instrument = "viola"
-  \violinoI
-  \globalI
->
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violino-ii.ly ./mutopia/J.S.Bach/Duette/violino-ii.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violino-ii.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/violino-ii.ly	Thu Jan  1 01:00:00 1970
@@ -1,104 +0,0 @@
-\header{
-filename = 	"violino-ii.ly"
-title = 		 "Vier Duette"
-description = 	"Four duets for Violino and Violoncello (Viola)"
-opus = 		"BWV"
-composer = 	"Johann Sebastian Bach (1685-1750)"
-enteredby = 	"jcn"
-copyright = 	"Public Domain"
-}
-
-\version "1.3.146"
-
-violinoIi =  \notes\relative c''{
-  R1*8 |
-  r2 e | 
-%10
-  fis a,|c8(b)a2 b8()cis|d e f2 e8()dis|e(b e)fis e(b e)g|
-  fis(b,fis')g fis(b,fis')a|
-%15
-  g(b,g')a g(b,g')b|fis(b,fis')g fis(b,fis')a|g fis e2 d4|cis bes'(a\prall)g|
-  bes, g'(f\prall)e|
-%20
-  g, e'(d\prall)cis|d8 g,(f)e d4 c'|b as'(g\prall)f|as, f'(e\prall)d|
-  f, d'(c\prall)b|
-%25
-  c8 f,(e)d c4 bes'(|)a8 g'(f)e f d a4~|a8 g(a)b g c e4| f,8(e'd)c d b f4~|
-  f8 e(f)g e g c4|
-%30
-  d,8(c'b)a b gis d4|d8 c(d)e c f e d|e4 a,2()gis4|a2 a'|c e,|
-%35
-  f8(e)d2 e8()fis|g a bes2 a8()gis|a(e a)b a(e a)c|b(e,b')c b(e,b')d|
-  c(e,c')d c(e,c')d|
-%40
-  b(e,b')c b(e,b')d| c(b)a2 gis4|a8()c b d c()b c a|e4 fis g fis8()e|fis4 gis a2~
-%45
-  a4 g8 fis g4 e~|e dis8 cis dis2\prall|e4 b' e2|e dis\prall|e4. d16(e f8)e d c|
-%50
-  b c d4. c8(b)a|gis a b4. a8(g)fis|gis()e gis a b()c d b|c()b a b c()d es c|
-  a b c4. b8(a)g|
-%55
-  fis g a4.g8(fis)e| fis()d fis g a()b c a|b()a g a b()c d b|c4 e()a, c(|
-  )fis, g8 a b4 g(|
-%60
-  )a c()fis, a(|)d, e8 fis g4 e(|)fis a()dis, fis(|)b, cis8 dis e2~|
-  e4 d8 cis d2~|
-%65
-  d4 e8 fis g2(|)g4 f8 e f2~|f4 g8 a bes2~|bes4 a8 gis a2~|
-  a gis\prall|
-%70
-  a e'|f a,|c8(b)a2 b8()cis|d e f2 e8()dis|e(b e)fis e(c)e g|
-%75
-  fis(b,fis')g fis(b,fis')a|g(b,g')a g(b,g')b|fis(b,fis')g fis(b,fis')a|
-  g\prall b,(e)fis g()a b()g|e f g4. f8(e)d|
-%80
-  cis d e4. d8(c)b|cis a cis d e()f g()e|f e d cis d4 c|b as'(g\prall)f|
-  as, f'(e\prall)d|
-%85
-  f, d'(c\prall)b| c8(g)c d c fis,(a)c|b(dis,)b' c b f,(b')d|
-  cis(a)cis dis e g,(c)e|d(f,)d' es d g,(d')f|
-%90
-  e(c)e fis g bes,(es)g|f(a,)f' g f bes,(d)f|e(gis,)e' f e a,(e')g|
-  f()g f e d()c b a|gis e()fis()g e gis a b|
-%95
-  c2 e,|f8 e(d)cis d e fis gis|a e a2 gis4(|)a b()c b8 a|b4()cis <d2 d,>~|
-%100
-  <d4 d,> c8 b c4 <a a,>~|<a a,> gis8 fis g2\prall|
-  <a4 e a,> <e' a,> <a a,> <a c,>|
-  %<a2 b, d4><gis\prall b,4 d>| checkme
-  \context Staff<
-    \context Voice { 
-      \stemUp\slurUp\tieUp
-      <a2 b,>gis\prall|a8 g f4~f8 e(d)cis|
-%105
-      d c bes4~bes8 a(gis)fis|gis4 e <e' a,><f a,>|
-      %c2 b()\grace a|
-      c2 b|
-      a1|
-    }
-    \context Voice=x { 
-      \stemDown\slurDown\tieDown
-      d,4 s<d b'>s|<a2 d> s2|
-%105
-      <d g,> s2|s1|
-      %e2 d ()\grace c|
-      e2 d|
-      c1|
-    }
-  >
-  \bar "|."
-}
-
-\include "global-ii.ly"
-
-violinoIiStaff =  \context Staff = violino <
-  %urg
-  % \notes\property Voice.TextScript \set #'font-style = #'large s4^"Moderato"
-  % \notes {s4. \property Voice.TextScript \set #'font-style = #'large s4^"Moderato"}
-  % urg, timidity violino patches broken?
-  %\property Staff.instrument = "violin"
-  \property Staff.instrument = "viola"
-  \violinoIi
-  \globalIi
->
-\version "1.3.146"
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violino-part.ly ./mutopia/J.S.Bach/Duette/violino-part.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violino-part.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/violino-part.ly	Thu Jan  1 01:00:00 1970
@@ -1,45 +0,0 @@
-\header{
-filename = 	 "violino-part.ly"
-title = 	 	 "Vier Duette"
-description = 	 "Four duets for Violino and Violoncello (Viola)"
-opus =            "BWV"
-composer = 	 "Johann Sebastian Bach (1685-1750)"
-enteredby = 	 "jcn"
-copyright = 	 "Public Domain"
-}
-
-\version "1.3.146"
-
-% {
-
-\include "global-i.ly"
-\include "violino-i.ly"
-
-\score{
-  \violinoIStaff
-  \paper{
-    %\translator { \BarNumberingStaffContext }
-  }
-  \midi{
-%    \tempo 4. = 69
-    \tempo 4 . = 50
-  }
-}
-
-% }
-
-\include "global-ii.ly"
-\include "violino-ii.ly"
-
-\score{
-  \violinoIiStaff
-  \paper{
-    %\translator { \BarNumberingStaffContext }
-%    castingalgorith=0
-  }
-  \midi{
-%    \tempo 2 = 96
-    \tempo 2 = 75
-  }
-}
-
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violino-viola.ly ./mutopia/J.S.Bach/Duette/violino-viola.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violino-viola.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/violino-viola.ly	Thu Jan  1 01:00:00 1970
@@ -1,55 +0,0 @@
-#(set! point-and-click line-column-location)
-\header{
-filename = 	 "violino-viola.ly"
-title = 	 	 "Vier Duette"
-description = 	 "Four duets for Violino and Violoncello (Viola)"
-opus =            "BWV"
-composer = 	 "Johann Sebastian Bach (1685-1750)"
-enteredby = 	 "jcn"
-copyright = 	 "Public Domain"
-}
-
-\version "1.3.146"
-
-% { 
-\include "violino-i.ly"
-\include "viola-i.ly"
-
-\score{
-  \context GrandStaff <
-    \violinoIStaff
-    \violaIStaff
-  >
-  \paper{
-    \translator {
-      \OrchestralScoreContext
-    }
-  }
-  \midi{
-%urg real/duration
-%    \tempo 4. = 69
-    \tempo 4 . = 50
-  }
-}
-
-% }
-
-\include "violino-ii.ly"
-\include "viola-ii.ly"
-
-\score{
-  \context GrandStaff <
-    \violinoIiStaff
-    \violaIiStaff
-  >
-  \paper{
-    \translator {
-      \OrchestralScoreContext
-    }
-  }
-  \midi{
-%    \tempo 2 = 96
-    \tempo 2 = 75
-  }
-}
-
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violino-violoncello.ly ./mutopia/J.S.Bach/Duette/violino-violoncello.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violino-violoncello.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/violino-violoncello.ly	Thu Jan  1 01:00:00 1970
@@ -1,54 +0,0 @@
-\header{
-filename = 	 "violino-violoncello.ly"
-title = 	 	 "Vier Duette"
-description = 	 "Four duets for Violino and Violoncello (Viola)"
-opus =            "BWV"
-composer = 	 "Johann Sebastian Bach (1685-1750)"
-enteredby = 	 "jcn"
-copyright = 	 "Public Domain"
-}
-
-\version "1.3.146"
-
-% {
-\include "violino-i.ly"
-\include "violoncello-i.ly"
-
-\score{
-  \context GrandStaff <
-    \violinoIStaff
-    \violoncelloIStaff
-  >
-  \paper{
-    \translator {
-      \OrchestralScoreContext
-    }
-  }
-  \midi{
-%urg, real/duration
-%    \tempo 4. = 69
-    \tempo 4 . = 50
-  }
-}
-
-% }
-
-\include "violino-ii.ly"
-\include "violoncello-ii.ly"
-
-\score{
-  \context GrandStaff <
-    \violinoIiStaff
-    \violoncelloIiStaff
-  >
-  \paper{
-    \translator {
-      \OrchestralScoreContext
-    }
-  }
-  \midi{
-%    \tempo 2 = 96
-    \tempo 2 = 75
-  }
-}
-
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violoncello-i.ly ./mutopia/J.S.Bach/Duette/violoncello-i.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violoncello-i.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/violoncello-i.ly	Thu Jan  1 01:00:00 1970
@@ -1,75 +0,0 @@
-\header{
-filename = 	"violoncello-i.ly"
-title = 		"Vier Duette"
-description = 	"Four duets for Violino and Violoncello (Viola)"
-opus =  		"BWV"
-composer = 	"Johann Sebastian Bach (1685-1750)"
-enteredby = 	"jcn"
-copyright = 	"Public Domain"
-}
-
-\version "1.3.146"
-
-violoncelloI =  \notes\relative c{
-  \property Voice.autoBeamSettings \override #'(end * * * *) = #(make-moment 3 8)
-  % too many [c8 c c] stuff here some manual beaming
-  %\property Voice.autoBeamSettings \override #'(end 1 8 * *) = #(make-moment 1 16)
-
-  g8()a d, g b()g d()fis a d a()fis |
-  g()d b' g b()c b()e fis g d()d, |
-  g r r [d'16(b a )g] e'8 d r r [c16(b a )b] g'8 |
-  fis r r g16 fis( e d b' g )a fis( e d g)e g fis( e d e)cis |
-%5
-  d8 d'()a b16 c(d)b g b c,8 c'()g a16 b(c)a fis a |
-  b,8()b' fis g a()e fis g()d e fis()d |
-  g r r [g,16(fis e)d] b'8 a r r [g16(fis e )d] c'8 |
-  b r r d16 b(a)g e' c d b(a)g c a c b(a)g a fis |
-  g d( e fis g a )b d(c b c )a b g(a b c b )e g( fis e d cis |
-%10
-  )a'16 d,( e fis g a)b a(g fis g e)fis a(g fis e d)cis d(e)fis g8~ |
-  g16 e(fis)d cis d b'4.~b16 d,(e)c b c a'4.~|
-  a16 fis(g)e dis e c'4.~c16 b(a)g fis e dis8(e)c |
-  b b'16(a g)fis e8 e,()fis g()b a g e()e' |
-  a,16 b(cis)d e cis d8 d,()e fis a()g fis d()d' |
-%15
-  g,16(a b)c! d b c8 c'()fis, a dis,()fis b,16 cis(dis e)fis d |
-  e8 e, r [e'16( dis cis)b] g'8 fis r r [e16(dis cis)b] a'8 |
-  g r r b16 g(fis)e c'! a b g(fis)e a fis a g(fis)e fis dis |
-  e b(cis dis)e fis g b(a)g a fis g e(fis)g a b cis e(dis)c b ais |
-  fis b,(cis)dis e fis g fis(e)d e cis d8()d, g' e fis()fis,|
-%20
-  b16 fis'(gis)ais b cis d cis(d)b ais b fis b(d)b ais b f b(d)b a b |
-  e, b'(e)d c b a b(c)a gis a e a(c)a gis a es a(c)a g a|
-  d, a'(d)c b a g8()g, b c a()c d()b d |
-  e c()e f g, f'~f16 e(f b, a)b e8()a f |
-  g g, r [c16(b a)g] e'8 d r r [c16(b a)g] f'8|
-%25
-  e r r g16 e(d)c a' f g e(d)c f d f e(d)c d b |
-  c8 c'()g a16 b(c)a g fis b8 b,()fis' gis16 a(b)g fis e |
-  a,8()a' b c b()c d()b d e [c()a]|
-  fis()d r [g16(fis e)d] b'8 a r r b16 d(c)b a g |
-  e e'(d)c b a [g(fis e)d] c'8 b r r r16 b, c d e fis |
-%30
-  g a(b c d)e d b(a g e')c d b(a g c)a b d(c b c)a|
-  b g(fis e a fis)g b(a g a fis)g b(a g c a)b g(fis e fis dis|
-  )e g(f)e a fis g e(d)c d c c8()c' b c a()c |
-  d,()d' cis d b()d e,()e' dis e c()e |
-  fis,()e d g [c,16(b a)g] c g'(a c b)d e8 [d,16(cis b)a]|
-%35
-  d a'(b cis d)e fis8 [g,16( fis e)d] g8()e c a d()d,|
-  g r r r16 d''(e)f b,(d)g, b(c)d g,(b)d, f(g)a d,(f|
-  )b, d(e)f b,(d)g,8 a()b c16 d(e f g a)b d(c b a)g|
-  % FIXME?
-  fis [a(g)fis e d] g8()e c g'8 b, e c d d, |
-  g1.|
-  \bar "|."
-}
-
-\include "global-i.ly"
-
-violoncelloIStaff =  \context Staff = violoncello <
-  \property Staff.instrument = "cello"
-  \violoncelloI
-  \clef bass
-  \globalI
->
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violoncello-ii.ly ./mutopia/J.S.Bach/Duette/violoncello-ii.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violoncello-ii.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/violoncello-ii.ly	Thu Jan  1 01:00:00 1970
@@ -1,79 +0,0 @@
-\header{
-filename = 	"violoncello-ii.ly"
-title = 		"Vier Duette"
-description = 	"Four duets for Violino and Violoncello (Viola)"
-opus =  		"BWV"
-composer = 	"Johann Sebastian Bach (1685-1750)"
-enteredby = 	"jcn"
-copyright = 	"Public Domain"
-}
-
-\version "1.3.146"
-
-violoncelloIi =  \notes\relative c{
-  r2 a'2|c e,| f8(e)d2 e8()fis| g a bes2 a8()gis|
-%5
-  a(e)a b a(e)a c|b(e,b')c b(e,b')d|c(e,c')d c(e,c')e|b(e,b')c b(e,b')d|
-  c(b)a2 gis4|
-%10
-  a8()c b d c()b c a|e4 fis g fis8()e|fis4 gis a2~|a4 g8(fis)g4 e~|
-  e dis8 cis dis2\prall|
-%15
-  e4 b' e2~|e dis\prall|e4 e,8()fis g a bes g|e f g4. f8(e)d|cis d e4.d8(cis)b|
-%20
-  cis()a cis d e()f g e|f()e d e f()g as f|d e f4. e8(d)c|b c d4. c8(b)a|
-  b()g b c d()e f d|
-%25
-  e()d c d e()f g e|f4 a()d, f(|)b, c8 d e4 c(|)d f()b, d(|)a a8 b c4 a(|
-%30
-  )b d()gis, b(|)e, fis8()gis a4 b|c2 e,|f8 e d4~d8 e(fis)gis|a e a2 gis4|
-%35
-  a b c b8()a|b4 c d2~|d4 c8 b c4 a~|a gis8 gis gis2\prall|a4 e' a2~|
-%40
-  a gis\prall|a e|f a,|c8(b)a2 b8 cis|d()e f2 e8()dis|
-%45
-  e(b e)fis e(b e)g|fis(b,fis')g fis(b,fis')a|g(b,g')a g(b,g')b|
-  fis(b,fis')g fis(b,fis')a|g(fis)e2 fis4|
-%50
-  gis f'!(e\prall)d |f, d'(c\prall)b|d, b'(a\prall)gis|a8 d,(c)b a4 g'|
-  fis es'(d\prall)c|
-%55
-  es, c'(b\prall)a|c, a'(g\prall)fis|g8 c,(b)a g4 f'(|)e8 e'(c)b c()a e4~|
-  e8 d e fis d()g b4|
-%60
-  c,8(b'a)g a()fis c4~|c8 b c d b()d g4|a,8(g'fis)e fis()dis a4~|
-  a8 g a b g d' e g|fis(ais,fis')g fis(b,fis')g|
-%65
-  gis(e gis)ais b(e,g)b|a(cis,a')bes a(d,a')c|b(g c)cis d f,(bes)d|
-  c e,(c')d c f,(a)c|b d,(b')c b e,(b')d|
-%70
-  c a(c)e c a()b gis(|)a c(b)d c b(c)a|e4 fis g fis8()e|fis4 gis a2~|
-  a4 g8 fis g4 e~|
-%75
-  e dis8 cis dis2\prall|e4 b' e2~|e dis\prall|e r4 d|cis bes(a\prall)g|
-%80
-  %FIXME: did Bach really use phrasing marks?
-  bes, g'\(()f\prall\)e|g, e'\(()d\prall\)cis|d8()a d e f g as f|d e f4.(e8 d)c|
-  b c d4.(c8 b)a|
-%85
-  b()g b c d()e b d|e4 e, a2~|a4 g8 fis g2~|g4 a8 b c2~|c4 bes8 a bes2~|
-%90
-  bes4 c8 d es2~|es4 d8 cis d2~|d cis\prall|d4 e f d|e d' c b|
-%95
-  a8()e a2 gis4\prall| a2 b|c e,|c8(e)d2 e8()fis|g a bes2 a8()gis|
-%100
-  a(e a)b a(e a)c| b(e,b')c b(e,b')d|c(e,c')d c(e,c')e|
-  b(e,b')c b(e,b')d| c(a b)cis d()e f g|
-%105
-  f e d cis d4 d,~|d c8 b c4 d|e d e e,|<e'1 a,>
-  \bar "|."
-}
-
-\include "global-ii.ly"
-
-violoncelloIiStaff =  \context Staff = violoncello <
-  \property Staff.instrument = "cello"
-  \violoncelloIi
-  \clef bass
-  \globalIi
->
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violoncello-part.ly ./mutopia/J.S.Bach/Duette/violoncello-part.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/Duette/violoncello-part.ly	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/Duette/violoncello-part.ly	Thu Jan  1 01:00:00 1970
@@ -1,46 +0,0 @@
-\header{
-filename = 	 "violoncello-part.ly"
-title = 	 	 "Vier Duette"
-description = 	 "Four duets for Violino and Violoncello (Viola)"
-opus =            "BWV"
-composer = 	 "Johann Sebastian Bach (1685-1750)"
-enteredby = 	 "jcn"
-copyright = 	 "Public Domain"
-}
-
-\version "1.3.146"
-
-% {
-
-\include "global-i.ly"
-\include "violoncello-i.ly"
-
-\score{
-  \violoncelloIStaff
-  \paper{
-    %\translator { \BarNumberingStaffContext }
-  }
-  \midi{
-%urg, real/duration
-%    \tempo 4. = 69
-    \tempo 4 . = 69
-  }
-}
-
-% }
-
-\include "global-ii.ly"
-\include "violoncello-ii.ly"
-
-\score{
-  \violoncelloIiStaff
-  \paper{
-    %castingalgorithm=0.
-    %\translator { \BarNumberingStaffContext }
-  }
-  \midi{
-%    \tempo 2 = 96
-    \tempo 2 = 75
-  }
-}
-
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/GNUmakefile ./mutopia/J.S.Bach/GNUmakefile
--- ../lilypond-1.5.66/mutopia/J.S.Bach/GNUmakefile	Thu Apr  5 19:20:58 2001
+++ ./mutopia/J.S.Bach/GNUmakefile	Mon Jul  8 11:44:49 2002
@@ -2,7 +2,7 @@
 
 depth = ../..
 
-SUBDIRS = Petites-Preludes Cembalo-Partitas Duette
+SUBDIRS = Petites-Preludes 
 EXTRA_DIST_FILES=
 
 
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/pa.ly ./mutopia/J.S.Bach/pa.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/pa.ly	Mon May 14 18:00:51 2001
+++ ./mutopia/J.S.Bach/pa.ly	Thu Jan  1 01:00:00 1970
@@ -1,269 +0,0 @@
-\version "1.3.146"
-\header {
-  filename =  "pa.ly"
-  title =    "Wachet auf, ruft uns die Stimme"
-  opus =    "BWV"
-  composer =  "Johann Sebastian Bach 1685-1750 "
-  enteredby =  "JCN"
-  copyright =  "public domain"
-}
-
-
-
-commands = \notes {
-  \time 4/4
-  \property Staff.TimeSignature \override #'style = #'C
-  \key es \major
-  \partial 8
-}
-
-right = \notes \relative c' {
-  \commands 
-%if urtekst
-  \clef "alto"
-%  \clef "violin"
-
-%if stable
-%  \property Voice."beamAutoEnd_8" = "1/4"
-  \property Voice.autoBeamSettings \override #'(end 1 8 * *) = #(make-moment 1 4)
-  bes8 |
-  es16 f g8 g f as g bes, as |
-  \repeat "volta" 2 {
-  g'16 es f8 as, g d' es r bes |
-  es16 f g8 g f as g bes, as|
-  g'16 es f8 as, g d' es r bes' |
-  bes4 as16 g f es f es d c bes8 c16 d |
-  es f g f  as g f es g8 f r bes, |
-  g' a4 bes8 \grace f8()es16 d es8 r c |
-  a'8 bes4 c8 \grace f,()es16 d es8 r \grace{\slurDown [c'16( d ]}\stemBoth)es8 |
-  d16 c bes8 bes16\prall a bes8 ~bes16 a g f es d c bes|
-  c d es8 \grace f()es16 d es8~es16 a bes c bes a g f |
-  bes8 f d\trill c16 bes bes es d c d8 bes|
-  \grace a()g8. a16 a8.\prallprall g32 a bes4 r8 bes|
-  es16 f g8 g f as g bes, as|
-  g'16es f8 as, g d' es r bes|
-  es16 f g8 g f as g bes, as|
-  g'16 es f8 as , g d' es r f |
-  g a4 bes8 \grace f()es16 d es8 r es|
-  a bes4 c8 \grace g()f16 es f8 r4 |
-  r r8 bes bes4 as16 g f es|
-  f es d c bes8 c16 d es f g f as g f es
-  }
-  \alternative { 
-  { g8 f r4 r r8 bes,| es16 f g8 g f as g bes, as }
-  { g8 f r4 r r8 bes | } }
-  bes'4 as16 g f es f es d c bes8 c16 d |
-  es f g f as g f es g8 f r bes, |
-  g' a4 bes8 \grace {f(}) es16 d es8 r c |
-  a' bes4 c8 \grace {f,(})es16 d es8 r es' |
-  d16 c bes8 bes16\prall a bes8~bes16 a g f es d c bes|
-  c d es8 es16\prall d es8~es16 a bes c bes a g f|
-  bes8 f d\trill c16 bes bes es d c d8 bes|
-  g8. a16 a8.\prallprall g32 a bes4 r8 d|
-  es f4 g8 bes,16\prall as bes8 r bes'|
-  bes4 as16 g f es f es d c bes8 c16 d|
-  es f g f as g f es g8 f r4|
-  r r8 g c16 d es8 es d |
-  f es g, f es'16 c d8 f, es|
-  b' c r g g4 f16 es d c |
-  d c b a g8 a16 b c d es d f es d c|
-  es8 d r g, es'fis4 g8|
-  \grace d()c16 bes c8 r a fis' g4 a8|
-  \grace d,() c16 bes c8 r c' bes16 a g8~g16\trill fis g8~|
-  g16 f es d c bes a g a bes c8~c16\trill bes c8~|
-  c16 fis g a g fis e d g8 d bes\trill a16 g |
-  g4 r r r8 bes|
-  es16 f g8 g f as g bes, as|
-  g'16 es f8 as, g d' es r4|
-  r r8 bes' bes4 as16 g f es|
-  f es d c bes8 c16 d es f g f as g f es |
-  g8 f r es c' d4 es8|
-  as,16\prall g as8 r c d es4 f8|
-  \grace bes,() as16 g as8 r f g16 f es8~es16\trill d es8~|
-  es16 des' c bes as g f es f g as8~as16\trill g as8~|
-  as16 d, es f es d c bes bes'8 es, g16 f es d |
-  es as g f g8 es \grace d()c8. d16 d8. es16|
-  es1|
-  \bar "|."
-}
-
-clefs = \notes{
-  \clef "alto"
-  \partial 8
-  \skip 8
-%testin'
-%  \clef "violin"
-  \skip 1
-%  \clef "alto"
-  \repeat "volta" 2 { \skip 1*19 }
-  \alternative {
-  { \skip 1*2 }
-  { \skip 1*1 } }
-  \skip 1*11
-  s4 \clef "violin"
-  s4 s2
-  s1
-  s4 s8 \clef "alto" s8 s2
-  \skip 1*12
-  s4 r8 \clef "violin" s8 s2 \clef "alto"
-}
-
-left = \notes \relative c {
-  \commands 
-%if urtekst
-  \clef "tenor"
-%  \clef "bass"
-
-%if stable
-%  \property Staff.noVoltaBraces = 1 
-%  \property Voice."beamAutoEnd_8" = "1/4"
-  \property Voice.autoBeamSettings \override #'(end 1 8 * *) = #(make-moment 1 4)
-%  \property Staff.noVoltaBraces = ##t
-  \property Staff.VoltaBracket = \turnOff
-  r8 
-  R1
-  \repeat "volta" 2 {
-  R1*11
-  r2 es4 g |
-  bes bes bes bes|
-  c2 bes |
-  r r4 bes|
-  es bes es8 f g4|
-  f4. es8 d4 c8.\prallprall bes32 c|
-  bes2 r|
-  r4 bes \grace bes8() es4 bes|
-  }
-  \alternative {
-  { c g8. as32 bes as8 g f4\trill| es2 r | }
-  { c4 g8. as32 bes as8 g f4\trill |} }
-  es,2 r |
-  R1*6 |
-  r2 r4 bes'4|
-  bes as g f\trill |
-  es2 r|
-  r4 bes' bes as|
-  g f\trill es2|
-  R1|
-  f4 g as2\trill|
-  g r|
-  R1*5|
-  r4 bes c d|
-  es2 r|
-  r r4 es8 f|
-  g4 f\trill es2|
-  R1|
-  r4 bes es bes|
-  c g as8 g f4\trill|
-  es1|
-  R1*4
-  \bar "|."
-}
-
-pedal = \notes \relative c, {
-  \commands 
-%if stable
-%  \property Staff.noVoltaBraces = 1
-%  \property Staff.noVoltaBraces = ##t
-  \property Staff.VoltaBracket = \turnOff
-  \clef "bass"
-  r8 |
-  es4 es es g
-  \repeat "volta" 2 {
-  as bes es, r|
-  es es es g | 
-  as bes es, r | 
-  g c bes as |
-  g es bes' d |
-  es d c es|
-  f g a f|
-  bes a g f |
-  es d c es|
-  d8 bes f' f, g a bes d,|
-  es c f4 bes8 c bes as|
-  g f es d c4 c'|
-  g bes es, g |
-  as as' d, es |
-  c d es d|
-  c g c8 d es4~|
-  es8 d g, a bes d, es f|
-  bes a bes c d bes es4|
-  bes as! g es |}
-  \alternative {
-  { as8 bes c4 f, bes8 as| g4 es' d es |}
-  { as8 bes c4 f, bes8 as}}
-  g4 c bes as |
-  g es bes' d|
-  es d c es|
-  f g a f|
-  bes a g f|
-  es  d c es|
-  d8 bes f' f, g a bes d,|
-  es c f4 bes8 c bes as!|
-  g f es d es g as bes|
-  c d es4 bes as |
-  g es bes'8 c d bes |
-  es d c b c g' c bes!|
-  as4 es f g|
-  as8 g f e f es d c|
-  b g g' f es4 c|
-  g' b c bes|
-  a c, d es|
-  fis, d g f|
-  es' d c bes|
-  a c bes8 g d' d,|
-  g es f g as g as bes|
-  c bes c d es4 c|
-  as bes c8 bes c d |
-  es d es f g f g as|
-  d, bes bes'as g4 es|
-  bes'8 as g4 as g|
-  f es f bes, |
-  c as bes g|
-  as8 g f es d4 f|
-  bes8 c bes as g c as bes|
-  c d es g as f bes bes,|
-  es1
-  \bar "|."
-}
-
-
-
-
-% these should be two separate scores...
-\score{
-  \context Score <
-   \context StaffGroup<
-   \context PianoStaff <
-    \context Staff = treble {
-     \property Score.midiInstrument = "church organ"
-     <
-%if urtekst
-     \context Voice=i \clefs
-     \context Voice=ii \right
-     >
-    }
-    \context Staff = bass \left
-   > 
-   \context Staff = pedal \pedal
-   >
-  >
-
-\paper {
-  %textheight = 280.0 \mm
-  % landscape:
-%  textheight = 160.0 \mm
-  orientation = "landscape"
-  linewidth = 280.0 \mm
-  \translator { 
-    \StaffGroupContext
-    VerticalExtent = #'(4 . 4)
-  }
-  \translator { 
-    \PianoStaffContext
-    VerticalExtent = #'(2.5 . 2.5)
-   }
-  }
-  \midi {
-   \tempo 4 = 69
-  }
-}
diff -purN ../lilypond-1.5.66/mutopia/J.S.Bach/wtk1-fugue2.ly ./mutopia/J.S.Bach/wtk1-fugue2.ly
--- ../lilypond-1.5.66/mutopia/J.S.Bach/wtk1-fugue2.ly	Tue Sep 18 12:07:05 2001
+++ ./mutopia/J.S.Bach/wtk1-fugue2.ly	Mon Jul  8 11:12:23 2002
@@ -20,27 +20,39 @@
     ".\\\\Unrestricted modification and redistribution is permitted
     and encouraged---copy this music and share it.}"
   tagline = \mutopiapublicdomain
-  lastupdated = "2000/Feb/14"
+  lastupdated = "2002/July/7"
+  footer = "Mutopia-2002/07/07-6"
+
 }
 
 
-% It would be nice to squeeze this onto two pages, but I am not sure
-% if it would work with US paper.
+%{
+ We really want this piece on 2 pages.
+
+ tweaks:  we use 19 iso. 20 pt staff space, and squeeze up the spacing a bit.
+
+ the few forced linebreaks were an earlier attempt to get the spacing
+ to match up.
+ 
+%}
+
+\include "paper19.ly"
+\version "1.5.65"
+
+
 
-\version "1.3.146"
 
-  
 dux =  \context Voice=two \notes \relative c''{
   \voiceTwo
   \clef violin
 
   r8 c16 b c8 g as c16 b c8 d |
   g, c16 b c8 d f,16 g as4 g16 f |
-  es c' b a g f! es d c8 es' d c |
+  es c' b a g f! es d c8 es' d c | \break 
   bes a bes c fis, g a fis |
 %%5
   g4 r16 c, d es f g as8~ as16 d, es f |
-  g a bes8 ~ bes16 es, f g as g f es d8 c'16 b! |
+  g a bes8 ~ bes16 es, f g as g f es d8 c'16 b! |  \break
           % forced accident!
   c4 r4 r8 f es d |
   r8 as g f g f16 es f8 d | 
@@ -63,13 +75,13 @@ dux =  \context Voice=two \notes \relati
   d, g16 fis g8 a! c,16 d es4 d16 c |  % forced accident!
   bes8 r8 r16 d e fis g a bes8 ~ bes16 e, f g |
   a bes c8 ~ c16 fis,16 g a bes8 es,!16 d es8 g, |
+  \break 
   as f'16 es f8 a,8 bes g'16 f g8 b, |
 %%20
-  c16 f \translator Staff = bass
-  \stemBoth \stemUp
-     es d c bes! as g 
+  c16 f es d
+  \translator Staff = bass
+   c bes! as g 
   f8 \translator Staff = treble
-  \stemBoth \stemDown
   as' g f |
   es d es f b, c d b |
   c4 r8 e8 f f16 e f8 c |
@@ -89,6 +101,7 @@ dux =  \context Voice=two \notes \relati
 
 comes =  \context Voice=one \notes \relative c'' {
   \voiceOne
+  \property Voice.MultiMeasureRest \override #'staff-position = #6 
   R1 |
   R1 |
   r8 g'16 fis g8 c, es g16 fis g8 a |
@@ -167,10 +180,9 @@ bassdux =  \context Voice=three \notes \
   f,16 g as4 g16 f es4 r8 es' |
   d c g' g, 
 %%30
-  \context Staff=bass <
-    { \voiceOne c2 ~ | c1 ~ | c1 }
-    \context Voice=four { \voiceTwo  c,2 ~ | c1 ~ | c1 }
-  >
+  < {  c2 ~ | c1 ~ | c1 } \\
+    {   c,2 ~ | c1 ~ | c1 }
+  > 
 }
 
 \score {
@@ -179,7 +191,6 @@ bassdux =  \context Voice=three \notes \
         \property Score.TimeSignature \override #'style = #'C
 	\context Staff = treble <
 	    \key c \minor
-%	\key es \major
 	    \dux
 	    { \comes \bar "|." }
 	      \time 4/4
@@ -192,6 +203,10 @@ bassdux =  \context Voice=three \notes \
 
     \paper {
         linewidth = 18.0 \cm
+	\translator { \ScoreContext
+	SpacingSpanner \override #'spacing-increment = #1.0
+	SpacingSpanner \override #'shortest-duration-space = #1.9	
+	}
     }
     \header{
 	opus = "BWV 847"
diff -purN ../lilypond-1.5.66/scm/c++.scm ./scm/c++.scm
--- ../lilypond-1.5.66/scm/c++.scm	Mon Jun 24 01:26:23 2002
+++ ./scm/c++.scm	Fri Jul 12 12:27:38 2002
@@ -142,6 +142,7 @@ is the  first to satisfy CRIT "
 	`(("volta" . ((iterator-ctor . ,Volta_repeat_iterator::constructor)
 		      (start-moment-function .  ,Repeated_music::first_start)
 		      (length . ,Repeated_music::volta_music_length)))
+	  
 	    ("unfold" . ((iterator-ctor . ,Unfolded_repeat_iterator::constructor)
 			 (start-moment-function .  ,Repeated_music::first_start)			 
 			 (length . ,Repeated_music::unfolded_music_length)))
diff -purN ../lilypond-1.5.66/scm/font.scm ./scm/font.scm
--- ../lilypond-1.5.66/scm/font.scm	Tue Jul  2 20:38:48 2002
+++ ./scm/font.scm	Mon Jul  8 11:12:23 2002
@@ -139,7 +139,6 @@
     ((2 * * music 26) . "feta26")
     ((1 * * music 23) . "feta23")
     ((0 * * music 20) . "feta20")
-    ((-0.5 * * music 20) . "feta19")    
     ((-1 * * music 16) . "feta16")
     ((-2 * * music 13) . "feta13")
     ((-3 * * music 11) . "feta11")
@@ -148,7 +147,6 @@
     ((2 * * ancient 26) . "parmesan26")
     ((1 * * ancient 23) . "parmesan23")
     ((0 * * ancient 20) . "parmesan20")
-    ((-0.5 * * ancient 20) . "parmesan19")    
     ((-1 * * ancient 16) . "parmesan16")
     ((-2 * * ancient 13) . "parmesan13")
     ((-3 * * ancient 11) . "parmesan11")
@@ -166,6 +164,13 @@
   (cons (- (car font-desc) decrement) (cdr font-desc))
   )
 
+(define (change-rhs-size font-desc from to )
+  (cons (car font-desc)
+	(regexp-substitute/global #f from (cdr font-desc) 'pre to 'post))
+
+  )
+
+  
 ;; 
 (define (map-alist-keys func list)
   "map a  function FUNC over the keys of an alist LIST, leaving the vals. "
@@ -196,13 +201,19 @@
 		  '((paper11 . -3)
 		    (paper13 . -2)
 		    (paper16 . -1)
-		    (paper19 . -0.5)	
 		    (paper20 . 0)
 		    (paper23 . 1)
 		    (paper26 . 2)
 		    ))
   )
 
+(set! font-list-alist
+      (cons
+       (cons
+	'paper19
+	(map (lambda (x) (change-rhs-size x "20" "19"))
+	     paper20-style-sheet-alist))
+       font-list-alist))
 
 (define (make-style-sheet sym)
   `((fonts . ,(append paper-style-sheet-alist
diff -purN ../lilypond-1.5.66/scm/grob-description.scm ./scm/grob-description.scm
--- ../lilypond-1.5.66/scm/grob-description.scm	Sun Jul  7 16:48:53 2002
+++ ./scm/grob-description.scm	Sat Jul 13 20:44:34 2002
@@ -147,6 +147,7 @@
 	(flag-width-function . ,default-beam-flag-width-function)
 	(damping . 1)
 	(auto-knee-gap . 7)
+	
 	(font-name . "cmr10")
 	(space-function . ,Beam::space_function)
 	(meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
@@ -577,6 +578,7 @@
     (PaperColumn
      . (
 	(axes . (0))
+	(before-line-breaking-callback . ,Paper_column::before_line_breaking)
 	(X-extent-callback . ,Axis_group_interface::group_extent_callback)
 
 ;	        (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
@@ -610,7 +612,7 @@
      . (
 	(axes . (0))
 	(X-extent-callback . ,Axis_group_interface::group_extent_callback)
-
+	(before-line-breaking-callback . ,Paper_column::before_line_breaking)
 	;; debugging stuff: print column number.
 ;	(molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8")	(Y-extent-callback . #f)
 
diff -purN ../lilypond-1.5.66/scm/grob-property-description.scm ./scm/grob-property-description.scm
--- ../lilypond-1.5.66/scm/grob-property-description.scm	Thu Jul  4 14:29:20 2002
+++ ./scm/grob-property-description.scm	Sat Jul 13 19:39:20 2002
@@ -104,7 +104,13 @@ In the case of alignment grobs, this sho
 (grob-property-description 'beamed-lengths list? "list of stem lengths given beam multiplicity .")
 (grob-property-description 'beamed-minimum-lengths list? "list of minimum stem lengths given beam multiplicity.")
 (grob-property-description 'beamed-stem-shorten list? "shorten beamed stems in forced direction.")
-(grob-property-description 'beaming number-pair? "number of beams extending to left and right.")
+(grob-property-description 'beaming pair?
+			   "Pair of number lists. Each number list
+specifies which beams to make. 0 is the central beam, 1 is the next
+beam toward the note etc. This information is used to determine how to
+connect the beaming patterns from stem to stem inside a beam.")
+
+
 (grob-property-description 'beautiful number? "number that dictates when a slur should be de-uglyfied.  It correlates with the enclosed area between noteheads and slurs.  A value of 0.1 yields only undisturbed slurs, a value of 5 will tolerate quite high blown slurs.")
 (grob-property-description 'before-line-breaking-callback procedure? "Procedure taking grob as argument.
 This procedure is called (using dependency resolution) before line breaking, but after generating discretionary items. Return value is ignored.")
@@ -206,6 +212,8 @@ collision_note_width that overides autom
 is used by @ref{note-collision-interface}.")
 
 (grob-property-description 'fraction number-pair? "fraction of a time signature.")
+(grob-property-description 'french-beaming boolean? "Use French
+beaming style: stems stop at innermost beams.")
 (grob-property-description 'full-size-change boolean? "if set, don't make a change clef smaller.")
 
 (grob-property-description 'glyph string? "a string determining what (style) of  glyph is typeset. Valid choices depend on the function that is reading this property. .")
@@ -335,6 +343,9 @@ TODO: revise typing.")
 (grob-property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis.")
 (grob-property-description 'shorten number? "the amount of space that a stem should be shortened (DOCME!)")
 (grob-property-description 'shorten-pair number-pair? "the length on each side to shorten a text-spanner, for example a pedal bracket")
+(grob-property-description 'common-shortest-duration moment?
+			   "The most common shortest note length.
+This is used in spacing. Making this larger will make the score tighter.")
 (grob-property-description 'shortest-duration-space number? "Start
 with this much space for the shortest duration. This is explessed in @code{spacing-increment} as unit. See also
 @ref{spacing-spanner-interface}.")
diff -purN ../lilypond-1.5.66/scm/script.scm ./scm/script.scm
--- ../lilypond-1.5.66/scm/script.scm	Mon Jun 24 01:26:23 2002
+++ ./scm/script.scm	Sat Jul 13 19:39:20 2002
@@ -2,17 +2,15 @@
 ;;           follow-into-staff :: bool
 ;;           dir-relative-to-stem :: int
 ;;           force-dir :: int
-;;           priority :: int
 
-;;TODO?      extra padding :: Real (given in staff spaces)
 
+;;           priority :: int -- lower number means closer to the  note head. 
 
 ;; TODO: generate Grob types for this, by prepending appropriate props
 ;; on top of Script (?)  
 
 
 ;; TODO: don't use 2 level indiriection, simply set
-
 ;; thumb = \script #'((feta . ( . .. ) (follow-staff .  #f))
 
 
diff -purN ../lilypond-1.5.66/scm/slur.scm ./scm/slur.scm
--- ../lilypond-1.5.66/scm/slur.scm	Mon Apr  1 19:14:59 2002
+++ ./scm/slur.scm	Sat Jul 13 19:39:20 2002
@@ -69,7 +69,7 @@
 		       (let ((beaming (ly-get-grob-property stem 'beaming)))
 			 ;; (display "beaming (") (display dir) (display "): ") (write beaming) (newline)
 			 (if (pair? beaming)
-			     (>= (if (= dir -1) (cdr beaming) (car beaming))
+			     (>= (length (if (= dir -1) (cdr beaming) (car beaming)))
 				1)
 			     #f))))))
 	 'stem)
diff -purN ../lilypond-1.5.66/scripts/ly2dvi.py ./scripts/ly2dvi.py
--- ../lilypond-1.5.66/scripts/ly2dvi.py	Mon Jun 17 10:02:33 2002
+++ ./scripts/ly2dvi.py	Sat Jul 13 19:39:20 2002
@@ -226,7 +226,7 @@ def setup_temp ():
 	return temp_dir
 
 
-def system (cmd, ignore_error = 0):
+def system (cmd, ignore_error = 0, quiet =0):
 	"""Run CMD. If IGNORE_ERROR is set, don't complain when CMD returns non zero.
 
 	RETURN VALUE
@@ -242,7 +242,8 @@ def system (cmd, ignore_error = 0):
 		name = re.match ('[ \t]*([^ \t]*)', cmd).group (1)
 		msg = name + ': ' + _ ("command exited with value %d") % st
 		if ignore_error:
-			warning (msg + ' ' + _ ("(ignored)") + ' ')
+			if not quiet:
+				warning (msg + ' ' + _ ("(ignored)") + ' ')
 		else:
 			error (msg)
 
@@ -436,12 +437,12 @@ def print_environment ():
 	for (k,v) in os.environ.items ():
 		sys.stderr.write ("%s=\"%s\"\n" % (k,v)) 
 
-def quiet_system (cmd, name):
+def quiet_system (cmd, name, ignore_error = 0):
 	if not verbose_p:
 		progress ( _("Running %s...") % name)
 		cmd = cmd + ' 1> /dev/null 2> /dev/null'
 
-	return system (cmd)
+	return system (cmd, ignore_error, quiet = 1)
 
 
 def run_lilypond (files, outbase, dep_prefix):
@@ -470,8 +471,22 @@ def run_lilypond (files, outbase, dep_pr
 
 		# for better debugging!
 		print_environment ()
-	print opts, fs	
-	system ('lilypond %s %s ' % (opts, fs), 'lilypond')
+
+	cmd = 'lilypond %s %s ' % (opts, fs)
+	if  verbose_p:
+		progress ("Invoking `%s'"% cmd)
+	status = os.system (cmd)
+
+	signal = 0x0f & status
+	exit_status = status >> 8
+
+	# 2 == user interrupt.
+	if signal and  signal <> 2:
+		error("\n\nLilyPond crashed (signal %d). Please submit a bugreport to bug-lilypond@gnu.org\n" % signal)
+
+	if status:
+		error ("\n\nLilyPond failed on the input file. (exit status %d)\n" % exit_status)
+		
 
 def analyse_lilypond_output (filename, extra):
 	
@@ -669,8 +684,22 @@ None
 	f.close ()
 
 	cmd = 'latex \\\\nonstopmode \\\\input %s' % latex_fn
-	quiet_system (cmd, 'LaTeX')
+	status = quiet_system (cmd, 'LaTeX', ignore_error = 1)
 
+	signal = 0xf & status
+	exit_stat = status >> 8
+
+	if exit_stat:
+		logstr = open (outbase + '.log').read()
+		m = re.search ("\n!", logstr)
+		start = m.start (0)
+		logstr = logstr[start:start+200]
+		
+		sys.stderr.write(_("""LaTeX failed on the output file.
+The error log is as follows:
+%s...\n""" % logstr))
+		raise 'LaTeX error'
+	
 	if preview_p:
 		# make a preview by rendering only the 1st line.
 		preview_fn = outbase + '.preview.tex'
diff -purN ../lilypond-1.5.66/stepmake/autogen.sh ./stepmake/autogen.sh
--- ../lilypond-1.5.66/stepmake/autogen.sh	Wed Jun 19 12:21:22 2002
+++ ./stepmake/autogen.sh	Sat Jul 13 19:39:20 2002
@@ -3,6 +3,12 @@
 
 srcdir=`dirname $0`
 
+if [ stepmake/autogen.sh -nt autogen.sh ]; then
+    echo "stepmake/autogen.sh is newer. Copying file." 
+    cp -f stepmake/autogen.sh autogen.sh
+    exec ./autogen.sh
+fi
+
 # Be paranoid: check for autoconf == 2.13
 # Some setups have both autoconf 2.13 and 2.50 available through
 # a wrapper script: /usr/bin/autoconf.
@@ -10,7 +16,7 @@ srcdir=`dirname $0`
 # advertises itself as autoconf 2.13.
 # If you have such a setup, invoke this script as:
 #   autoconf=autoconf2.13 ./autogen.sh
-for i in autoconf autoconf2.13 false; do
+for i in autoconf-2.13 autoconf2.13 autoconf  false; do
   version=`$i --version 2>/dev/null | head -1 | awk '{print $NF}' | awk -F. '{print $1 * 100 + $2}'`
   if test "0$version" -eq 213; then
     autoconf=$i
