]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.107 release/1.3.107
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 12 Nov 2000 22:32:12 +0000 (23:32 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 12 Nov 2000 22:32:12 +0000 (23:32 +0100)
============

* Cross compilation and info build fixes, really cancel all builtin
rules, sigh.

* Generated documentation fixes: Generate all interface descriptions,
separately, don't list non-set interface properties with element
descriptions.

1.3.106.h

185 files changed:
AUTHORS.txt
CHANGES
Documentation/GNUmakefile
Documentation/bibliography/GNUmakefile
Documentation/hacking.texi
Documentation/index.texi
Documentation/regression-test.tely
Documentation/topdocs/AUTHORS.texi
Documentation/topdocs/GNUmakefile
Documentation/topdocs/INSTALL.texi
Documentation/topdocs/index.tely
Documentation/user/GNUmakefile
Documentation/user/convert-ly.itexi [new file with mode: 0644]
Documentation/user/convert-mudela.itexi [deleted file]
Documentation/user/glossary.tely
Documentation/user/invoking.itexi
Documentation/user/latex-lilypond-example.latex [new file with mode: 0644]
Documentation/user/latex-mudela-example.latex [deleted file]
Documentation/user/lilypond-book.tely [new file with mode: 0644]
Documentation/user/lilypond.tely
Documentation/user/ly2dvi.texi
Documentation/user/mudela-book.tely [deleted file]
Documentation/user/properties.itely
Documentation/user/refman.itely
Documentation/user/tutorial.itely
INSTALL.txt
VERSION
configure
input/test/allfontstyle.ly
input/test/beam-position.ly
input/test/chord-names.ly
input/test/collisions.ly
input/test/force-hshift.ly
input/test/hshift.ly
lily/auto-beam-engraver.cc
lily/auto-change-iterator.cc
lily/auto-change-music.cc
lily/bar-engraver.cc
lily/beam-engraver.cc
lily/change-iterator.cc
lily/chord-name-engraver.cc
lily/chord-tremolo-engraver.cc
lily/chord-tremolo-iterator.cc
lily/chord.cc
lily/clef-engraver.cc
lily/clef-item.cc
lily/command-request.cc
lily/context-specced-music.cc
lily/custos-engraver.cc
lily/duration.cc
lily/folded-repeat-iterator.cc
lily/grace-iterator.cc
lily/grace-music.cc
lily/identifier.cc
lily/include/auto-change-iterator.hh
lily/include/change-iterator.hh
lily/include/chord-tremolo-iterator.hh
lily/include/chord.hh
lily/include/command-request.hh
lily/include/context-specced-music.hh
lily/include/duration.hh
lily/include/folded-repeat-iterator.hh
lily/include/grace-iterator.hh
lily/include/identifier.hh
lily/include/lily-proto.hh
lily/include/lyric-combine-music-iterator.hh
lily/include/main.hh
lily/include/moment.hh
lily/include/mudela-version.hh [deleted file]
lily/include/music-iterator-ctor.hh
lily/include/music-iterator.hh
lily/include/music-list.hh
lily/include/music-output-def.hh
lily/include/music-output.hh
lily/include/music-wrapper-iterator.hh
lily/include/musical-pitch.hh
lily/include/musical-request.hh
lily/include/my-lily-lexer.hh
lily/include/note-column.hh
lily/include/output-property-music-iterator.hh
lily/include/part-combine-music-iterator.hh
lily/include/property-iterator.hh
lily/include/repeated-music.hh
lily/include/request-chord-iterator.hh
lily/include/sequential-music-iterator.hh
lily/include/simple-music-iterator.hh
lily/include/simultaneous-music-iterator.hh
lily/include/time-scaled-music-iterator.hh
lily/include/time-signature-performer.hh
lily/include/timing-translator.hh
lily/include/unfolded-repeat-iterator.hh
lily/key-engraver.cc
lily/lexer.ll
lily/lily-guile.cc
lily/local-key-engraver.cc
lily/local-key-item.cc
lily/lyric-combine-music-iterator.cc
lily/lyric-combine-music.cc
lily/midi-def.cc
lily/moment.cc
lily/music-iterator-ctor.cc
lily/music-iterator.cc
lily/music-list.cc
lily/music-wrapper-iterator.cc
lily/music.cc
lily/musical-pitch.cc
lily/musical-request.cc
lily/my-lily-parser.cc
lily/note-column.cc
lily/note-heads-engraver.cc
lily/note-name-engraver.cc
lily/note-performer.cc
lily/output-property-engraver.cc
lily/output-property-music-iterator.cc
lily/paper-outputter.cc
lily/paper-score.cc
lily/parser.yy
lily/part-combine-music-iterator.cc
lily/part-combine-music.cc
lily/property-iterator.cc
lily/repeated-music.cc
lily/request-chord-iterator.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/score-engraver.cc
lily/sequential-music-iterator.cc
lily/simple-music-iterator.cc
lily/simultaneous-music-iterator.cc
lily/spacing-engraver.cc
lily/stem-engraver.cc
lily/stem.cc
lily/tie-engraver.cc
lily/tie-performer.cc
lily/time-scaled-music-iterator.cc
lily/time-scaled-music.cc
lily/time-signature-performer.cc
lily/timing-engraver.cc
lily/timing-translator.cc
lily/unfolded-repeat-iterator.cc
lilypond-mode.el
ly/catalan.ly
ly/chord-modifiers.ly
ly/declarations-as.ly
ly/declarations.ly
ly/deutsch.ly
ly/english.ly
ly/italiano.ly
ly/midi.ly
ly/nederlands.ly
ly/norsk.ly
ly/svenska.ly
make/generic-vars.make
make/ly-rules.make [new file with mode: 0644]
make/ly-targets.make [new file with mode: 0644]
make/ly-vars.make [new file with mode: 0644]
make/mudela-rules.make [deleted file]
make/mudela-targets.make [deleted file]
make/mudela-vars.make [deleted file]
make/mutopia-targets.make
make/out/lilypond.lsm
make/out/lilypond.spec
ps/lilyponddefs.ps
scm/ascii-script.scm
scm/chord-names.scm
scm/element-descriptions.scm
scm/font.scm
scm/interface.scm
scm/lily.scm
scm/translator-description.scm
scripts/GNUmakefile
scripts/abc2ly.py
scripts/convert-ly.py [new file with mode: 0644]
scripts/convert-mudela.py [deleted file]
scripts/lilypond-book.py [new file with mode: 0644]
scripts/ly2dvi.py
scripts/mudela-book.py [deleted file]
scripts/musedata2ly.py
tex/headers.tex
tex/lily-pdf-defs.tex
tex/lily-ps-defs.tex
tex/lilypond-latex.tex
tex/lilypond-plaintex.tex
tex/lilyponddefs.tex
tex/mudela-book.tex
tex/titledefs.tex

index 789086681043faf5cc1b3a7c916feebc804840a5..4d2bed6671bf3c7d908a774672e32ca14a0d38cc 100644 (file)
@@ -6,8 +6,8 @@ AUTHORS - who did what on GNU LilyPond?
    This file lists authors of GNU LilyPond, and what they wrote.  This
 list is alphabetically ordered.
 
-   * Tom Cato Amundsen <tca@gnu.org>,     cembalo-partita in mudela,
-     accordion symbols, some mudela-book.py
+   * Tom Cato Amundsen <tca@gnu.org>,     cembalo-partita in lilypond,
+     accordion symbols, some lilypond-book.py
 
    * Mats Bengtsson <matsb@s3.kth.se>,
      `http://www.s3.kth.se/~matsb/'     lots of testing, fixes, general
@@ -73,7 +73,7 @@ list is alphabetically ordered.
 
    * Jeffrey B. Reed <daboys@austin.rr.com>,     Windows-NT support.
 
-   * Shay Rojanski     Some mudela source.
+   * Shay Rojanski     Some lilypond input.
 
    * August S.Sigov <august@infran.ru>     Russian translation
 
diff --git a/CHANGES b/CHANGES
index 7f51bc8c87177297e2633425728fecdb34d324e7..b4796d80bca6de57eb5fe6444d967603d7d40a7b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,13 +4,39 @@
 * Cross compilation and info build fixes, really cancel all builtin
 rules, sigh.
 
-1.3.106.jcn1
-============
-
 * Generated documentation fixes: Generate all interface descriptions,
 separately, don't list non-set interface properties with element
 descriptions.
 
+1.3.106.hwn1
+============
+
+* Deprecate `mudela' name: rename mudela to lilypond globally.
+
+* construct Music_iterators decentrally.
+
+* Make smob of Duration 
+
+* Make smob of Musical_pitch.
+
+* Move Repeated_music members into SCM. Length is computed via a SCM
+function. (todo: write SCM function to unfold all repeats. \apply for
+\midi)
+
+* Remove Time_signature_change_req, \time is disguise for \property
+Score.timeSignatureFraction = ...
+
+* \property barCheckNoSynchronize: don't reset measurePosition when
+finding a bbarcheck. This makes bar-checks for polyphonic music
+easier.
+
+* elt property full-size-change for clefs.
+
+* Bugfix: use Stem::dim_callback (), so brew_molecule () is not called
+too early.
+
+* Bugfix: use extent of Note_head (iso. Note_column) for rest
+collisions, so Stem::brew_molecule() is not called too early.
 
 1.3.105.jcn1
 ============
index 6a80c861652428c78bee4dd51dfb916567e9e33e..1b3462f69348b99ee79cf160b73745f460c22fcf 100644 (file)
@@ -3,7 +3,7 @@ depth = ..
 NAME = documentation
 SUBDIRS=user bibliography pictures topdocs ntweb misc
 STEPMAKE_TEMPLATES=documentation texinfo tex
-LOCALSTEPMAKE_TEMPLATES=lilypond mudela
+LOCALSTEPMAKE_TEMPLATES=lilypond ly
 
 README_TOP_FILES=NEWS DEDICATION CHANGES 
 EXTRA_DIST_FILES=
index bca6b910c87a5daaca1fcbef3a897d86d661fd90..2c193065bed937ef87bf80bc6949871ec57a87f9 100644 (file)
@@ -7,7 +7,7 @@ BIB_FILES= $(wildcard *.bib)
 EXTRA_DIST_FILES= $(BIB_FILES)
 
 STEPMAKE_TEMPLATES=tex documentation
-LOCALSTEPMAKE_TEMPLATES=lilypond mudela
+LOCALSTEPMAKE_TEMPLATES=lilypond ly
 
 export BIBINPUTS:=$(shell pwd)//$(PATHSEP)$(BIBINPUTS)
 include $(depth)/make/stepmake.make 
index f5116d400eb8245d3915794a3c05b372b655f62f..1377ebe9e92f3ff7b6d10126b86ec238db83adf6 100644 (file)
@@ -10,7 +10,6 @@
 @menu
 * LilyPond internals::
 * Overview::
-* mudela::                      
 * Request_engraver::            
 * Backend::
 * Coding standards::
@@ -22,7 +21,6 @@
 
 @menu
 * Overview::                      Overview
-* mudela::                        mudela
 * Request_engraver::              Request_engraver
 @end menu
 
@@ -100,21 +98,10 @@ scanning sheet music.
 @chapter LilyPond internals
 
 
-This documents some aspects of the internals of GNU LilyPond. Some of
-this stuff comes from e-mail I wrote, some from e-mail others wrote,
-some are large comments taken away from the headers. This page may be a
-little incoherent.  Unfortunately, it is also quite outdated.  A more
-thorough and understandable document is in the works.
-
-You should use @code{doc++} to take a peek at the sources.
-
-@node Overview, mudela, Top, Top
+@node Overview, , , Top
 @section Overview
 
-GNU LilyPond is a "multi-pass" system. The different passes have been
-created so that they do not depend on each other. In a later stage
-some parts may be moved into libraries, or seperate programs, or they
-might be integrated in larger systems.
+GNU LilyPond is a "multi-pass" system.
 
 @table @samp
 
@@ -183,48 +170,8 @@ staffs.
 
 @end table
 
-@node mudela, Request_engraver, Overview, Top
-@section mudela
-
-[FIXME: implementation has been generalised, so this is out of date]
-
-Most information is stored in the form of a request.  In music
-typesetting, the user might want to cram a lot more symbols on the
-paper than actually fits. To reflect this idea (the user asks more
-than we can do), the container for this data is called Request.
-
-In a lot of other formats this would be called an 'Event'
-
-@table @samp
-@item @code{Barcheck_req}
-    Checks during music processing if start of this voice element
-    coincides with the start of a measure. Handy to check if you left out
-    some voice elts.
-@item @code{Note_req}
-    LilyPond has to decide if the ball should be hanging left or
-    right. This influences the horizontal dimensions of a column, and this
-    is why request processing should be done before horizontal spacing.
-    Other voices' frivolities may cause the need for accidentals, so this
-    is also for the to decide. The engraver can decide on positioning based on
-    ottava commands and the appropriate clef.
-@item @code{Rest_req}
-    Typeset a rest.
-@item @code{Span_req}
-    This type of request typically results in the creation of a @code{Spanner}
-@item @code{Beam_req}
-    Start/stop a beam.
-    Engraver has to combine this request with the stem_request, since the
-    number of flags that a stem wants to carry will determine the
-    number of beams.
-@item @code{Dynamic}
-    Each dynamic is bound to one note (a crescendo spanning multiple
-    notes is thought to be made of two "dynamics": a start and a stop).
-    Dynamic changes can occur in a smaller time than the length of its
-    note, therefore each @code{Dynamic} request carries a time, measured
-    from the start of its note.
-@end table
 
-@node Request_engraver, , mudela, Top
+@node Request_engraver, , , Top
 @section Request_engraver
 
 In the previous section the idea of Request has been explained, but
@@ -307,7 +254,8 @@ blah blah blah
 @end menu
 
 
-@node Graphic elements, , , Backend 
+@node Graphic elements, , , Backend
+@unnumberedsubsec
 
 Music notation is composed of a sets of interrelated glyphs.  In
 Lilypond every glyph usually is represented by one object, a so-called
@@ -367,6 +315,7 @@ function as a parent.  The size of a Graphical_axis_groups group is the
 union of its children.
 
 @node Position and width Callbacks, , , Backend
+@unnumberedsubsec
 
 The positions are, as explained relative to a parent reference
 point. Most positions are not known when an object is created, so these
@@ -404,6 +353,7 @@ can be only one callback for each axis. No callback (the 0 ptr) means:
 "empty in this direction".
 
 @node Score_element properties, , , Backend
+@unnumberedsubsec
 
 Score elements can have other properties besides positioning, for
 example, text strings (for text objects) style settings, glyphs, padding
@@ -481,7 +431,8 @@ selection in most cases.
 
 
 
-@node Score elements, ,  , Backend
+@node Score elements, , , Backend
+@unnumberedsubsec
 
 [FIXME: we want to get rid of dependencies in the implementation.]
 
@@ -572,7 +523,7 @@ There are plans to unify Spanner and Item, so there will no longer be
 such a clear distinction between the two.  Right now, Score_elements are
 always either Item or either Spanner.
 
-@node Coding standards,  , , Top
+@node Coding standards, , , Top
 
 @chapter CodingStyle - standards while programming for GNU LilyPond
 
@@ -846,7 +797,7 @@ files, doing a release.
 
 Use them.
 
-@node Making patches,  , , Top
+@node Making patches, , , Top
 
 
 @unnumberedsec  Track and distribute your code changes
@@ -945,7 +896,7 @@ and don't forget to make automatically generated files:
  
 @end example 
 
-@node Localisation, , , Top 
+@node Localisation, , , Top
 
 @chapter Localisation - User messages in LilyPond
 
@@ -1003,7 +954,7 @@ macro is a no-op, it only serves as a marker for @file{xgettext}.
 @example
 char const* messages[] = @{
   _i ("enable debugging output"),
-  _i ("ignore mudela version"),
+  _i ("ignore lilypond version"),
   0
 @};
 
index bdc4f52267002598d4ef25aa955f0f5d31d7a618..16bdae85a3ea1da3891be0c3dd75021d901e7248 100644 (file)
@@ -25,9 +25,9 @@ also available in @uref{../user/out-www/lilypond.ps.gz,Postscript}
 @item LilyPond @uref{../user/out-www/lilypond-internals/lilypond-internals.html,internals}
 @item @uref{../user/out-www/glossary.html,A glossary of musical
 terms}, includes translations.  Also available in @uref{../user/out-www/glossary.ps.gz,Postscript})
-@item @uref{../user/out-www/mudela-book.html,mudela-book}, a tool for
+@item @uref{../user/out-www/lilypond-book.html,lilypond-book}, a tool for
 integrating text and music in LaTeX and texinfo; also available in
-@uref{../user/out-www/mudela-book.ps.gz,Postscript}
+@uref{../user/out-www/lilypond-book.ps.gz,Postscript}
 @item @uref{../user/out-www/ly2dvi.html,ly2dvi}  does page layout for
 LilyPond printout.
 @item @uref{../user/out-www/midi2ly.html,midi2ly} 
index 63774881e43a69a0e77c40a05c826bbdc6a2aaaf..a2d0289437172b7ea6f65c89deb5eee6f1fce6a3 100644 (file)
@@ -29,7 +29,7 @@ Rests.  Note that the dot of 8th, 16th and 32nd rests rest should be
 next to the top of the rest.  All rests except the whole rest are
 centered on the middle staff line.  
 
-@mudelafile{rest.ly}
+@lilypondfile{rest.ly}
 
 Note head shapes are settable.  The stem endings should be adjusted
 per note head.  If you want different note head styles on one stem,
@@ -39,7 +39,7 @@ Harmonic notes have a different shape and different
 dimensions. Nevertheless, noteheads in both styles can be combined, on
 either up or down stems.
 
-@mudelafile{noteheadstyle.ly}
+@lilypondfile{noteheadstyle.ly}
 
 Noteheads can have dots, and rests can too.  Augmentation dots should
 never be printed on a staff line, but rather be shifted vertically. They
@@ -47,12 +47,12 @@ should go up, but in case of multiple parts, the down stems have down
 shifted dots.  (Wanske p. 186) In case of chords, all dots should be in
 a column.  The dots go along as rests are shifted to avoid collisions.
 
-@mudelafile{dots.ly}
+@lilypondfile{dots.ly}
 
 Accidentals work: the second note does not get a sharp. The third and
 fourth show forced and courtesy accidentals
 
-@mudelafile{accidental.ly}
+@lilypondfile{accidental.ly}
 
 Multiple measure rests do not collide with barlines and clefs.  They
 are not expanded when you set @code{Score.skipBars}.  Although the
@@ -60,20 +60,20 @@ multi-measure-rest is a Spanner, minimum distances are set to keep it
 colliding from barlines. 
 
 
-@mudelafile{multi-measure-rest.ly}
+@lilypondfile{multi-measure-rest.ly}
 
 If @code{Score.skipBars} is set,
 the signs for four, two, and one measure rest are combined to
 produce the graphical representation of rests for up to 10 bars.
 The number of bars will be written above the sign.
 
-@mudelafile{mm-rests2.ly}
+@lilypondfile{mm-rests2.ly}
 
 A sharp sign after a double sharp sign, as well as a flat sign
 after a double flat sign is automatically prepended with a
 natural sign.
 
-@mudelafile{accidental-single-double.ly}
+@lilypondfile{accidental-single-double.ly}
 
 @section Stems
 
@@ -82,7 +82,7 @@ crossing stems.  If the stem is in a beam, the tremolo must be parallel
 to the beam.  If the stem is invisible (eg. on a whole note), the
 tremolo must be centered on the note.
 
-@mudelafile{stem-tremolo.ly}
+@lilypondfile{stem-tremolo.ly}
 
 Chord tremolos look like beams, but are a kind of repeat symbol.
 To avoid confusion, chord tremolo beams do not reach the stems, but 
@@ -90,7 +90,7 @@ leave a gap.  Chord tremolo beams on half notes are not ambiguous,
 as half notes cannot appear in a regular beam, and should reach the 
 stems.
   
-@mudelafile{chord-tremolo.ly}
+@lilypondfile{chord-tremolo.ly}
 
 Beams, stems and noteheads often have communication troubles, since
 the two systems for y dimensions (1 unit = staffspace, 1 unit = 1
@@ -100,28 +100,28 @@ Stems, beams, ties and slurs should behave similarly, when placed
 on the middle staff line. Of course stem-direction is down for high
 notes, and up for low notes.
 
-@mudelafile{stem-direction.ly}
+@lilypondfile{stem-direction.ly}
 
 Similarly, if @code{stem_default_neutral_direction} is set to @code{-1}.
 
-@mudelafile{stem-direction-down.ly}
+@lilypondfile{stem-direction-down.ly}
 
 @section Scripts
 
 The staccato dot (and all scripts with follow-into-staff set), must
 not be on staff lines.
 
-@mudelafile{staccato-pos.ly}
+@lilypondfile{staccato-pos.ly}
 
 Dynamics appear below or above the staff.  If multiple dynamics are
 linked with (de)crescendi, they should be on the same line.
 
-@mudelafile{dyn-line.ly}
+@lilypondfile{dyn-line.ly}
 
 
 Arpeggios are supported, both cross-staff and one-staff. 
 
-@mudelafile{arpeggio.ly}
+@lilypondfile{arpeggio.ly}
 
 
 
@@ -131,7 +131,7 @@ Chord names are generated from a list pitches, and are customisable
 from guile.  For some unlogical names, guile customisation is used
 by default.
 
-@mudelafile{chord-names.ly}
+@lilypondfile{chord-names.ly}
 
 @section Grace notes
 
@@ -147,7 +147,7 @@ main note.  Grace notes can also be positioned after the main note.
 Grace notes without beams should have a slash, if @code{flagStyle} is
 not set.  Main note scripts don't end up on the grace note.
 
-@mudelafile{grace.ly}
+@lilypondfile{grace.ly}
 
 @section Beams, slurs and other spanners
 
@@ -155,45 +155,45 @@ Beaming is generated automatically. Beams may cross bar lines. In that
 case, line breaks are forbidden.  Yet clef and key signatures are
 hidden just as with breakable bar lines.
 
-@mudelafile{beaming.ly}
+@lilypondfile{beaming.ly}
 
 Beams should behave reasonably well, even under extreme circumstances.
 Stems may be short, but noteheads should never touch the beam.
 
-@mudelafile{beam-extreme.ly}
+@lilypondfile{beam-extreme.ly}
 
 Beams should always reach the middle staff line.  The second beam
 counting from the note head side, should never be lower than the
 second staff line.  This does not hold for grace note beams.
 Override with @code{noStemExtend}.
 
-@mudelafile{beam-position.ly}
+@lilypondfile{beam-position.ly}
 
 Slurs should look nice and symmetric.  The curvature may increase
 only to avoid noteheads, and as little as possible.  Slurs never
 run through noteheads or stems.
 
-@mudelafile{slur-nice.ly}
-@mudelafile{slur-symmetry.ly}
-@mudelafile{slur-symmetry-1.ly}
+@lilypondfile{slur-nice.ly}
+@lilypondfile{slur-symmetry.ly}
+@lilypondfile{slur-symmetry-1.ly}
 
 Across line breaks, slurs behave nicely.  On the left, they extend to
 just after the preferatory matter, and on the right to the end of the
 staff.  A slur should follow the same vertical direction it would have
 in unbroken state.
 
-@mudelafile{slur-broken-trend.ly}
+@lilypondfile{slur-broken-trend.ly}
 
 Ties are strictly horizontal.  They are placed in between note heads.
 The horizontal middle should not overlap with a staffline.
 
-@mudelafile{tie.ly}
+@lilypondfile{tie.ly}
 
 When tieing chords, the outer slurs point outwards, the inner slurs
 point away from the center of the staff.  Override with
 @code{tieVerticalDirection}.
 
-@mudelafile{tie-chord.ly}
+@lilypondfile{tie-chord.ly}
 
 When tieing notes with accidentals across a bar boundary, the accidental
 must not be drawn on the note in the new bar.  Instead, the next note of
@@ -203,32 +203,32 @@ boundaries should be explicit.
 
 Pitches can be verified by printing them  with the @code{NoteNames} context.
 
-@mudelafile{tie-accidental.ly}
+@lilypondfile{tie-accidental.ly}
 
 Beams can be typeset over fixed distance aligned staffs, beam
 beautification doesn't really work, but knees do. Beams should be
 behave well, wherever the switching point is.
 
-@mudelafile{beam-cross-staff.ly}
+@lilypondfile{beam-cross-staff.ly}
 
 The same goes for slurs. They behave decently when broken across
 linebreak.
 
-@mudelafile{slur-cross-staff.ly}
+@lilypondfile{slur-cross-staff.ly}
 
 Tuplets are indicated by a bracket with a number.  There should be no
 bracket if there is one beam that matches  the length of the tuplet.
 The bracket does not interfere with the stafflines, and the number is
 centered in the gap in the bracket.
 
-@mudelafile{tup.ly}
+@lilypondfile{tup.ly}
 
 @section Property details
 
 More specific settings take precendence over less specific settings. The
 second slur has slurDirection set to down, overriding the stemup  setting.
 
-@mudelafile{generic-property-override.ly}
+@lilypondfile{generic-property-override.ly}
 
 @section Repeats
 
@@ -243,26 +243,26 @@ the number of repeats.
 
 Unfolded behavior:
 
-@mudelafile{repeat-unfold.ly}
+@lilypondfile{repeat-unfold.ly}
 
 Volta (Semi folded) behavior.  Voltas can start on non-barline moments.
 If they don't barlines should still be shown.
 
-@mudelafile{repeat-volta.ly}
+@lilypondfile{repeat-volta.ly}
 
 Folded.  This doesn't make sense without alternatives, but it works.
 
-@mudelafile{repeat-fold.ly}
+@lilypondfile{repeat-fold.ly}
 
 Across linebreaks, the left edge of a first and second alternative
 bracket should be equal
 
-@mudelafile{repeat-line-break.ly}
+@lilypondfile{repeat-line-break.ly}
 
 Auto change piano staff switches  voices  between up and down staffs
 automatically; rests are switched along with the coming note.
 
-@mudelafile{auto-change.ly}
+@lilypondfile{auto-change.ly}
 
 @section Lyrics
 
@@ -276,11 +276,11 @@ precook a chord of staffs/lyrics and label those.  Of course
 extenders do not assume anything about lyric lengths, so they continue
 to work.
 
-@mudelafile{lyric-combine.ly}
+@lilypondfile{lyric-combine.ly}
 
 Multiple stanzas
 
-@mudelafile{lyrics-multi-stanza.ly}
+@lilypondfile{lyrics-multi-stanza.ly}
 
 @section Multiple notes
 
@@ -290,26 +290,26 @@ inside the staff, and by half spaces outside.  Notice that the half
 and whole rests just outside the staff get ledger lines in different
 cases.
 
-@mudelafile{rest-collision.ly}
+@lilypondfile{rest-collision.ly}
 
 Normal collisions. We have support for polyphony, where the
 middle voices are horizontally shifted.
 
-@mudelafile{collisions.ly}
+@lilypondfile{collisions.ly}
 
 The number of stafflines of a staff can be set with the property
 numberOfStaffLines.  Ledger lines both on note heads and rests are
 adjusted.  Barlines also are adjusted.
 
 
-@mudelafile{number-staff-lines.ly}
+@lilypondfile{number-staff-lines.ly}
 
 @section Spacing
 
 In a limited number of cases, LilyPond corrects for optical spacing
 effects.  In this example, space for opposite pointed stems is adjusted
 
-@mudelafile{stem-spacing.ly}
+@lilypondfile{stem-spacing.ly}
 
 If there are accidentals in the music, we add space, but the space
 between note and accidentals is less than between the notes with the
@@ -323,25 +323,25 @@ must stretch like the space within the measure.
 
 Tight:
 
-@mudelafile{spacing-tight.ly}
+@lilypondfile{spacing-tight.ly}
 
 Natural:
 
-@mudelafile{spacing-natural.ly}
+@lilypondfile{spacing-natural.ly}
 
 Loose:
 
-@mudelafile{spacing-loose.ly}
+@lilypondfile{spacing-loose.ly}
 
 Adding a @code{Bar_engraver} to the LyricsVoice context makes sure that
 lyrics don't collide with barlines.
 
-@mudelafile{lyrics-bar.ly}
+@lilypondfile{lyrics-bar.ly}
 
 Text is set with empty horizontal dimensions.  The boolean property
 textNonEmpty is used to respect the horizontal size of text.
 
-@mudelafile{non-empty-text.ly}
+@lilypondfile{non-empty-text.ly}
 
 
 
@@ -355,19 +355,19 @@ textNonEmpty is used to respect the horizontal size of text.
 Breaks can be encouraged and discouraged using @code{\break} and
 @code{\nobreak}.  They are abbrevs for @code{\penalty} commands.
 
-@mudelafile{break.ly}
+@lilypondfile{break.ly}
 
 Markings that are attached to (invisible) barlines are 
 delicate: the are attached to the rest of the score without the score
 knowing it.  Consequently, they fall over  often.
 
-@mudelafile{bar-scripts.ly}
+@lilypondfile{bar-scripts.ly}
 
 Staff margins are also markings attached to barlines.  They should be
 left of the staff, and be centered vertically wrt the staff.  They may
 be on normal staffs, but also on compound staffs, like the PianoStaff
 
-@mudelafile{staff-margin.ly}
+@lilypondfile{staff-margin.ly}
 
 Breathing signs, also used for phrasing, do normally not influence
 global spacing -- only if space gets tight, notes are shifted to make
@@ -375,37 +375,37 @@ room for the breathing sign. Breathing signs break beams running
 through their voice. In the following example, the notes in the first
 two measures all have the same distance from each other:
 
-@mudelafile{breathing-sign.ly}
+@lilypondfile{breathing-sign.ly}
 
 Hara kiri staffs kill themselves if they are empty.  This example really
 contains two staffs, but the second contains only spaces, and is
 therefore removed. 
 
-@mudelafile{hara-kiri-short.ly}
+@lilypondfile{hara-kiri-short.ly}
 
 In orchestral scores and hymns, voices are traditionally combined onto
 one staff.  LilyPond has a part combiner, that combines or separates two
 voices according to actual rhythm and pitch.  User-defined texts such as
 ``solo'' and ``@`a2'' are typeset automagically, as appropriate.
 
-@mudelafile{part-combine.ly}
+@lilypondfile{part-combine.ly}
 
 
 Fonts are  available in a default set of sizes: 11, 13, 16, 20, 23 and
 26pt staffheight.  Sizes of the text fonts and symbol fonts are made
 to match the staff dimensions.    
 
-@mudelafile[nonfragment]{size11.ly}
+@lilypondfile[nonfragment]{size11.ly}
 
-@mudelafile[nonfragment]{size13.ly}
+@lilypondfile[nonfragment]{size13.ly}
 
-@mudelafile[nonfragment]{size16.ly}
+@lilypondfile[nonfragment]{size16.ly}
 
-@mudelafile[nonfragment]{size20.ly}
+@lilypondfile[nonfragment]{size20.ly}
 
-@mudelafile[nonfragment]{size23.ly}
+@lilypondfile[nonfragment]{size23.ly}
 
-@mudelafile[nonfragment]{size26.ly}
+@lilypondfile[nonfragment]{size26.ly}
 
 
 @section Clefs and Time Signatures
@@ -416,7 +416,7 @@ size. For octaviated clefs, the ``8'' should appear closely above or
 below the clef respectively.  The ``8'' is processed in a convoluted
 way, so this is fragile as well.
 
-@mudelafile{clefs.ly}
+@lilypondfile{clefs.ly}
 
 
 Key signatures appear on key  changes. They may also
@@ -424,7 +424,7 @@ appear without barlines.  The restoration accidentals are not printed at
 the start of the line. If @code{createKeyOnClefChange} is set, they're
 also created on a clef change.
 
-@mudelafile{keys.ly}
+@lilypondfile{keys.ly}
 
 
 
@@ -449,11 +449,11 @@ signatures.
 As a last resort, the placement of items can be adjusted manually, by
 setting the @code{extra-offset} of an output object.
 
-@mudelafile{generic-output-property.ly}
+@lilypondfile{generic-output-property.ly}
 
 The same mechanism can be  used  to force pagebreaks.
 
-@mudelafile{between-systems.ly}
+@lilypondfile{between-systems.ly}
 
 @bye
 
index c1fa0154915995fc9737e31df3fdcad3323bc906..de250b805c8e19294cff45b5f3699b33eb569f46 100644 (file)
@@ -17,7 +17,7 @@ list is alphabetically ordered.
 
 @itemize @bullet
 @item @email{tca@@gnu.org, Tom Cato Amundsen},
-    cembalo-partita in mudela, accordion symbols, some mudela-book.py
+    cembalo-partita in lilypond, accordion symbols, some lilypond-book.py
 @item @email{matsb@@s3.kth.se, Mats Bengtsson},
     @uref{http://www.s3.kth.se/~matsb/}
     lots of testing, fixes, general comments and contributions.
@@ -73,7 +73,7 @@ list is alphabetically ordered.
 @item @email{daboys@@austin.rr.com, Jeffrey B. Reed},
     Windows-NT support.
 @item Shay Rojanski
-    Some mudela source.
+    Some lilypond input.
 @item @email{august@@infran.ru, August S.Sigov}
     Russian translation
 @end itemize
index 254c98a837a33378c6d767a9af19ca39be0dc91b..cfef86420064dd6e8a84af05e85aa648460ad10c 100644 (file)
@@ -2,7 +2,7 @@ depth = ../..
 
 
 STEPMAKE_TEMPLATES=documentation tex texinfo yolily-topdoc
-LOCALSTEPMAKE_TEMPLATES=lilypond mudela
+LOCALSTEPMAKE_TEMPLATES=lilypond ly
 HTML_FILES=$(addprefix $(outdir)/, $(TEXI_FILES:.texi=.html) $(TELY_FILES:.tely=.html))
 
 
index c414acdcc574a97a3a210acc966e548ee9c4df01..e76f50d0eb04fe170ee00f1a7997325e7cb22f11 100644 (file)
@@ -172,14 +172,16 @@ This will install a number of files, something close to:
        /usr/local/man/man1/midi2ly.1
        /usr/local/man/man1/abc2ly.1
        /usr/local/man/man1/etf2ly.1
-       /usr/local/man/man1/convert-mudela.1
-       /usr/local/man/man1/mudela-book.1
+       /usr/local/man/man1/convert-ly.1
+       /usr/local/man/man1/lilypond-book.1
        /usr/local/man/man1/lilypond.1
        /usr/local/bin/lilypond
        /usr/local/bin/midi2ly
-       /usr/local/bin/convert-mudela
-       /usr/local/bin/mudela-book
+       /usr/local/bin/convert-ly
+       /usr/local/bin/lilypond-book
        /usr/local/bin/abc2ly
+       /usr/local/bin/pmx2ly
+       /usr/local/bin/musedata2ly
        /usr/local/bin/etf2ly
        /usr/local/share/lilypond/*
        /usr/local/share/locale/@{....@}/LC_MESSAGES/lilypond.mo
index 41261c78369cefa1f9f4dc66f147f4ceb99eae91..5082a16de6974507bdac9aed1151b8d1ed51d0a4 100644 (file)
@@ -29,9 +29,9 @@ editor to enter it, you can put it in mail or embed it in an article like
 this:
 
 @quotation
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
 \relative c'' { \key c \minor; r8 c16 b c8 g as c16 b c8 d | g,4 }
-@end mudela 
+@end lilypond 
 @end quotation
 
 The output looks very good: the font and the layout algorithms were
index 5fac94b489ef1179de27a2411e0f7d0214a84f53..98ee07346647e0e6a2cae0657258b7b77aac54f6 100644 (file)
@@ -21,7 +21,7 @@ PS_GZ_FILES= $(addsuffix .gz, $(PS_FILES))
 INFO_FILES = $(addprefix $(outdir)/, lilypond.info lilypond-internals.info)
 
 STEPMAKE_TEMPLATES=tex texinfo documentation
-LOCALSTEPMAKE_TEMPLATES=lilypond mudela
+LOCALSTEPMAKE_TEMPLATES=lilypond ly
 
 include $(depth)/make/stepmake.make 
 
diff --git a/Documentation/user/convert-ly.itexi b/Documentation/user/convert-ly.itexi
new file mode 100644 (file)
index 0000000..5c413c6
--- /dev/null
@@ -0,0 +1,36 @@
+@node convert-ly, , ,Top
+@chapter convert-ly
+@code{convert-ly} sequentially applies different
+lilypond-conversions to upgrade a Lilypond input file.  It uses
+@code{\version} statements in the file to detect the old version
+number.
+
+@example
+        convert-ly [options] [files]
+@end example
+
+@section Options
+@table @samp
+@item --output
+    The output file to write.  
+@item --edit
+    Do an inline edit of the input file. override @code{--output}
+@item --show-rules
+    shows all known conversions, and exit
+@item --from=@var{FROM_PATCHLEVEL}
+    Set the level to convert from. If this is not set, convert-ly will
+    guess this, on the basis of @code{\version} strings in the file
+@item --to=@var{TO_PATCHLEVEL}
+    Set the goal version of the conversion. It defaults to the latest
+    available version.
+@end table
+
+Not all language changes are handled. Multiple output options won't
+work.
+
+convert-ly is written in python, so you have install
+@uref{http://www.python.org,python}.  It was written by
+@email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}.
+
+
+
diff --git a/Documentation/user/convert-mudela.itexi b/Documentation/user/convert-mudela.itexi
deleted file mode 100644 (file)
index 02b13d8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-@node convert-mudela, , ,Top
-@chapter convert-mudela
-@code{convert-mudela} sequentially applies different
-mudela-conversions to upgrade a Mudela input file.  It uses
-@code{\version} statements in the file to detect the old version
-number.
-
-@example
-        convert-mudela [options] [files]
-@end example
-
-@section Options
-@table @samp
-@item --output
-    The output file to write.  
-@item --edit
-    Do an inline edit of the input file. override @code{--output}
-@item --show-rules
-    shows all known conversions, and exit
-@item --from=@var{FROM_PATCHLEVEL}
-    Set the level to convert from. If this is not set, convert-mudela will
-    guess this, on the basis of @code{\version} strings in the file
-@item --to=@var{TO_PATCHLEVEL}
-    Set the goal version of the conversion. It defaults to the latest
-    available version.
-@end table
-
-Not all language changes are handled. Multiple output options won't
-work.
-
-convert-mudela is written in python, so you have install
-@uref{http://www.python.org,python}.  It was written by
-@email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}.
-
-
-
index 484f9fa621205c48f39dd44cee97709e83143693..eb37c2d8ac3f54985e931b0c3cd3757adea58805 100644 (file)
@@ -60,7 +60,7 @@ accidental.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Score.barNonAuto = ##t
 \property Voice.textStyle = "large"
 \notes\relative c'' {
@@ -70,7 +70,7 @@ accidental.
   geses1_"db. flat" s s2 
   g!1_"natural" s2
 }
-@end mudela
+@end lilypond
 @item accelerando 
 I: accelerando, F: accelerando, en acc@'el@'erant, D: accelerando, Schneller,
 NL: accelerando, DK: accelerando, S: accelerando, N:
@@ -115,11 +115,11 @@ mode hell@'enique D: reines Moll, NL: , DK: ren mol, S: ren mollskala, N: .
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Score.barNonAuto = ##t
 \notes\relative c'' {
 a1 b c d e f g a }
-@end mudela
+@end lilypond
 
 @item andante
 I: andante, F: andante, D: Andante, NL: andante, DK: andante, S: andante,
@@ -139,7 +139,7 @@ the duration of the long a. is proportionate to that of the main note.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \emptyText
 %\property Voice.textEmptyDimension = ##t
 \property Voice.textStyle = "large"
@@ -155,13 +155,13 @@ fis8 e16 fis
 g8 fis16 g | a4 \bar "||"; }
 \notes\relative c'' {
 <d4_"performance" a fis> r g16 () fis e fis a () g fis g | a4 \bar "||"; }
-@end mudela
+@end lilypond
 
 An appoggiatura may have more notes preceding the main note.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \emptyText
 \property Voice.textStyle = "large"
 \notes\relative c'' {
@@ -175,7 +175,7 @@ An appoggiatura may have more notes preceding the main note.
     \context Voice = vb { \stemDown as16 ~ as8. as16 ~ as8. } >
   \bar "||";
 }
-@end mudela
+@end lilypond
 
 @item arpeggio
 I: arpeggio, F: arp@`ege, D: Arpeggio, Akkordbrechungen, gebrochener
@@ -183,7 +183,7 @@ Akkord, NL: gebroken akoord, DK: arpeggio, akkordbrydning, S: arpeggio, N:
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \context GrandStaff <
   \notes\relative c'' { 
     \time 4/4;
@@ -201,7 +201,7 @@ Akkord, NL: gebroken akoord, DK: arpeggio, akkordbrydning, S: arpeggio, N:
         c2 c | c c } >
   }
 >
-@end mudela
+@end lilypond
 
 @item ascending interval
 I: intervallo ascendente, F: intervalle ascendant, D: steigendes Intervall,
@@ -274,7 +274,7 @@ beams determine the note value of the connected notes.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Score.barNonAuto = ##t
 \emptyText
 \property Voice.textStyle = "large"
@@ -283,7 +283,7 @@ beams determine the note value of the connected notes.
   [g16_"1/16" g g g] s16
   [g32_"1/32" s32 g32 s32 g32 s32 g32] s16
   [g64_"1/64" s32 g64 s32 g64 s32 g64] s32 }
-@end mudela
+@end lilypond
 
 @item beat
 I: tempi, F: temps, D: Taktschlag, Zeit (im Takt), NL: tel, DK: (takt)slag, S:
@@ -295,13 +295,13 @@ start of the music.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \key g \major;
 \time 4/4;
 \notes\relative c'' { g4 c b a | g1 \bar "||";}
 \time 3/8;
 \notes\relative c'' { g8 d' c | b c a | g4. \bar "||";}
-@end mudela
+@end lilypond
 
 @item bind
 @w{@ar{}@strong{tie}}
@@ -316,22 +316,22 @@ orchestral or choral score.
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \context GrandStaff < 
   \property GrandStaff.minVerticalAlign = 12
   \notes\relative c'' { \clef treble; g4 e c2 }
   \notes\relative c { \clef bass; c1 \bar "|."; } > 
-@end mudela
+@end lilypond
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 %\context StaffGroup < 
 \context ChoirStaff < 
   \property StaffGroup.minVerticalAlign = 12
   \notes\relative c'' { \clef treble; g4 e c2 }
   \notes\relative c { \clef bass; c1 \bar "|."; } > 
-@end mudela
+@end lilypond
 
 @item brass
 I: ottoni, D: Blechbl@"aser, NL: koper (blazers), F: cuivres,
@@ -356,10 +356,10 @@ in pre-1650 music.
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t
 \notes\relative c'' { g\breve } 
-@end mudela
+@end lilypond
 
 @item C
 I: do, F: ut,  D: C, c, NL: c, DK: c, S: c, N: c
@@ -373,7 +373,7 @@ lines.
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t
 \property Staff.clefStyle = #"fullSizeChanges"
 \property Staff.textStyle = #"large"
@@ -389,7 +389,7 @@ lines.
 \context Lyrics \lyrics { 
   Soprano Mezzosoprano Alto Tenor Baritone 
 }
-@end mudela
+@end lilypond
 
 @item cadence 
 I: cadenza, F: cadence, D: Kadenz, NL: cadens, DK: kadence, S: kadens, N: .
@@ -433,7 +433,7 @@ chords are denoted open chords
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t
 \property Voice.textNonEmpty = ##t
 \property Voice.textStyle = "large"
@@ -446,7 +446,7 @@ chords are denoted open chords
   <g_"seventh-chord~" b d f>
   <g_"ninth-chord" b d f a> s s2
 }
-@end mudela
+@end lilypond
 
 @item chromatic scale
 I: scala cromatica, F: gamme chromatique, D: Chromatische Tonleiter, NL:
@@ -456,10 +456,10 @@ A scale consisting of all 11 @w{@ar{}@strong{semitone}}s.
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t 
 \notes\relative c' { c1 cis d dis e f fis g gis a ais b c }
-@end mudela
+@end lilypond
 
 @item chromaticism
 I: cromatismo, F: chromatisme, D: Chromatik, NL: chromatiek, DK: kromatik, S:
@@ -511,10 +511,10 @@ Melody moving in the narrow steps of the scale;
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \key g \major; \time 4/4;
 \notes\relative c'' { g4 g g a | b2 a | g4 b a a | g1 \bar "||"; }
-@end mudela
+@end lilypond
 
 @item consonance 
 I: consonanza, F: consonance, D: Konsonanz, NL: consonant, DK: konsonans, S:
@@ -542,7 +542,7 @@ composition methods.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Score.timeSignatureStyle = "C2/2"
 \context GrandStaff <
   \notes\relative c' { 
@@ -576,7 +576,7 @@ composition methods.
       } >
   }
 >
-@end mudela
+@end lilypond
 
 @item counter tenor
 I: controtenore, F: contre-tenor, D: Kontratenor, NL: contratenor, DK:
@@ -600,10 +600,10 @@ abbreviation "cresc.".
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \key g \major; \time 4/4;
 \notes\relative c'' { g4 \< a b c | \! d1 \bar "|."; }
-@end mudela
+@end lilypond
 
 @item cue-notes
 I: notine, F: petites notes pr@'ec@'edent l'entr@'ee d'in instrument,
@@ -631,11 +631,11 @@ frequently near the beginning marked by a sign:
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Voice.textStyle = "large"
 \key g \major; \time 4/4;
 \notes\relative c'' { d1 | g,4^\segno  a b c | b a g2_"d.s." \bar "|."; }
-@end mudela
+@end lilypond
 
 @item decrescendo
 I: decrescendo, D: Decrescendo, Leiser, NL: decrescendo, DK: decrescendo, S:
@@ -646,10 +646,10 @@ or the abbreviation "decresc.".
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \key g \major; \time 4/4;
 \notes\relative c'' { d4 \> c b a | \! g1 \bar "|."; }
-@end mudela
+@end lilypond
 
 @item descending interval
 I: intervallo discendente, F: intervalle descendant, D: fallendes Intervall,
@@ -671,7 +671,7 @@ also to some extent in newer jazz music.
  
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -684,9 +684,9 @@ also to some extent in newer jazz music.
   \property Voice.textScriptPadding = #-4
   b^"~~ S" c }
   \context Lyrics \lyrics { Ionian }
-@end mudela
+@end lilypond
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -700,9 +700,9 @@ also to some extent in newer jazz music.
   \property Voice.textScriptPadding = #-4
   b^"~~ S" c d }
   \context Lyrics \lyrics { Dorian }
-@end mudela
+@end lilypond
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -715,9 +715,9 @@ also to some extent in newer jazz music.
   \property Voice.textScriptPadding = #-4
   b^"~~ S" c d e }
   \context Lyrics \lyrics { Phrygian }
-@end mudela
+@end lilypond
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -730,9 +730,9 @@ also to some extent in newer jazz music.
   \property Voice.textScriptPadding = #0
   e^"~~ S" f }
   \context Lyrics \lyrics { Lydian }
-@end mudela
+@end lilypond
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -745,9 +745,9 @@ also to some extent in newer jazz music.
   \property Voice.textScriptPadding = #0
   e^"~~ S" f g }
   \context Lyrics \lyrics { Mixolydian }
-@end mudela
+@end lilypond
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -760,14 +760,14 @@ also to some extent in newer jazz music.
   \property Voice.textScriptPadding = #0
   e^"~~ S" f g a }
   \context Lyrics \lyrics { Aeolian }
-@end mudela
+@end lilypond
 
 From the beginning of the 17th century the scales used in European
 compositional music are primarily the major and the minor scales. In the
 harmonic minor scale type an augmented second (A) occurs between the 6th and
 7th tone.
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -780,9 +780,9 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and
   \property Voice.textScriptPadding = #-4
   b^"~~ S" c }
   \context Lyrics \lyrics { Major }
-@end mudela
+@end lilypond
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -795,9 +795,9 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and
   \property Voice.textScriptPadding = #0
   e^"~~ S" f g a }
   \context Lyrics \lyrics { "ancient minor" }
-@end mudela
+@end lilypond
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -814,9 +814,9 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and
   gis^"~~ S" 
   a }
   \context Lyrics \lyrics { "Harmonic minor" }
-@end mudela
+@end lilypond
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -834,7 +834,7 @@ harmonic minor scale type an augmented second (A) occurs between the 6th and
   c^"~~ S" b a
 }
   \context Lyrics \lyrics { "Melodic minor" }
-@end mudela
+@end lilypond
 
 @item diminished interval
 I: intervallo diminuito, F: intervalle diminu@'e, D: vermindertes Intervall,
@@ -859,13 +859,13 @@ scale. Opposite of @ar{}@strong{conjunct movement}.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \key a \major;
 \time 4/4;
 \notes\relative c' { 
   \partial 8; e8 | a4. gis8 b a e cis |
   fis2 d4. \bar "||"; }
-@end mudela
+@end lilypond
 
 @item dissonant interval; dissonance
 I: intervallo dissonante, dissonanza, F: dissonance, D: Dissonanz, NL:
@@ -1004,14 +1004,14 @@ Two notes, intervals, or scales are enharmonic if they have different names
 but equal pitch.
 
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Score.barNonAuto = ##t
 \property Voice.textStyle = "large"
 \notes\relative c'' {
   gis1_"g sharp" s as1_"a flat" s s
   < des_"dim fifth" g,! > s s < cis_"augm fourth" g! > s s
 }
-@end mudela
+@end lilypond
 
 @item equal temperament 
 I: temperamento equabile, F: temp@'erament @'egal, D: gleichschwebende
@@ -1044,7 +1044,7 @@ example bass recorder) while 8 below the clef symbol indicates playing an
 octave lower (for example on double bass @w{@ar{}@strong{strings}}).
 
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t 
 \property Staff.clefStyle = #"fullSizeChanges"
 \property Lyrics.textStyle = "large"
@@ -1071,7 +1071,7 @@ octave lower (for example on double bass @w{@ar{}@strong{strings}}).
   "octaved up" 
   "octaved down" 
 }
-@end mudela
+@end lilypond
 
 @item fermata
 I: corona, F: pause, D: Fermate, NL: fermate, DK: fermat, S: fermat, N: .
@@ -1079,11 +1079,11 @@ I: corona, F: pause, D: Fermate, NL: fermate, DK: fermat, S: fermat, N: .
 Prolonged note or rest of indefinite duration.
 
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \time 4/4;
 \notes\relative c'' {
 a4 b c2^\fermata \bar "|."; }
-@end mudela
+@end lilypond
 
 @item fifth
 I: quinta, F: quinte, D: Quinte, NL: kwint, DK: kvint, S: kvint, N:
@@ -1108,7 +1108,7 @@ Ornament at the end of the stem of a note used for notes with values less than
 a quarter note. The number of flags determines the @w{@ar{}@strong{note value}}.
 
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Score.barNonAuto = ##t
 \emptyText
 \property Voice.textStyle = "large"
@@ -1117,7 +1117,7 @@ a quarter note. The number of flags determines the @w{@ar{}@strong{note value}}.
   g16_"1/16" s8 
   g32_"1/32" s8 
   g64_"1/64" s8 }
-@end mudela
+@end lilypond
 
 @item flat
 I: bemolle, F: b@'emol, D: B, b, NL: mol, DK: b, S: bef@"ortecken, N: .
@@ -1155,7 +1155,7 @@ of the base chords.
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -1165,7 +1165,7 @@ of the base chords.
   < g1 e c > < a f d > < b g e > 
   < c a f > < d b g > < e c a > < f d b > }
 \context Lyrics \lyrics { T Sp Dp S D Tp "D{\\kern-5pt}$\\mid$" } 
-@end mudela
+@end lilypond
 
 @item G
 I: sol, F: sol, D: G, g, NL: g, DK: g, S: g, N: g.
@@ -1182,7 +1182,7 @@ that).
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t 
 \property Staff.clefStyle = #"fullSizeChanges"
 \property Lyrics.textStyle = "large"
@@ -1203,7 +1203,7 @@ that).
   "octaved up"
   "octaved down"
 }
-@end mudela
+@end lilypond
 
 @item glissando
 I: glissando, F: glissando, D: Glissando, NL: glissando, DK: glissando, S:
@@ -1253,7 +1253,7 @@ section. @ar{}@w{}@strong{functional harmony}
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \context GrandStaff < 
   \notes\relative c'' { 
     \time 4/4;
@@ -1266,7 +1266,7 @@ section. @ar{}@w{}@strong{functional harmony}
     \partial 4; c4 | f, g c2
     \bar "|."; } 
   \context Lyrics \lyrics { T S D T } > 
-@end mudela
+@end lilypond
 
 @item harmony
 I: armonia, F: harmonie, D: Harmonie, Zusammenklang, NL: harmonie, DK:
@@ -1279,7 +1279,7 @@ Consonances:
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t
 \property Voice.textStyle = "large"
 \notes\relative c'' {
@@ -1291,13 +1291,13 @@ Consonances:
   <g1_"octave" g'> s
   <g1_"decime" b'> s s
 }
-@end mudela
+@end lilypond
 
 Dissonances:
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t
 \property Voice.textStyle = "large"
 \notes\relative c'' {
@@ -1305,7 +1305,7 @@ Dissonances:
   <g1_"seventh" f'> s 
   <g1_"ninth" a'> s s
 }
-@end mudela
+@end lilypond
 
 Three note harmony @w{@ar{}@strong{chord}}
 
@@ -1328,7 +1328,7 @@ forms an octave.
 
 @ 
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t
 \property Lyrics.textStyle = "large"
 \property Voice.textStyle = "large"
@@ -1345,11 +1345,11 @@ forms an octave.
 }
 \context Lyrics \lyrics { 
   unisone second second second third third third third } 
-@end mudela
+@end lilypond
 
 @ 
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t
 \property Lyrics.textStyle = "large"
 \property Voice.textStyle = "large"
@@ -1366,11 +1366,11 @@ forms an octave.
 }
 \context Lyrics \lyrics { 
   fourth fourth fifth fifth sixth sixth sixth sixth } 
-@end mudela
+@end lilypond
 
 @ 
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t
 \property Lyrics.textStyle = "large"
 \property Voice.textStyle = "large"
@@ -1387,7 +1387,7 @@ forms an octave.
 }
 \context Lyrics \lyrics { 
   seventh seventh seventh octave none none decime decime } 
-@end mudela
+@end lilypond
 
 @item inverted interval
 I: intervallo rivolto, F: intervalle renvers@'e, D: umgekerhtes Intervall, NL:
@@ -1397,7 +1397,7 @@ The difference between an interval and an octave.
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t
 \property Voice.textStyle = "large"
 \notes\relative c'' {
@@ -1405,7 +1405,7 @@ The difference between an interval and an octave.
   < g,_"third" b > s < g'_"sixth" b, > s \bar "||";
   < g,_"fourth" c > s < g'_"fifth" c, > s \bar "||";
 }
-@end mudela
+@end lilypond
 
 @item just intonation
 I: intonazione giusta, F: intonation juste, D: reine Stimmung, NL: reine
@@ -1453,10 +1453,10 @@ A ledger line is an extension of the staff.
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t 
 \notes\relative c'' { a,1 s c'' } 
-@end mudela
+@end lilypond
 
 @item legato
 I: legato, F: legato, li@'e, D: legato, NL: legato, DK: legato, S: legato, N:
@@ -1468,7 +1468,7 @@ unlike @emph{leggiero} or @emph{non-legato} (b), @emph{portato} (c) and
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Score.barNonAuto = ##t
 \emptyText
 \property Lyrics.textStyle = "large"
@@ -1480,7 +1480,7 @@ unlike @emph{leggiero} or @emph{non-legato} (b), @emph{portato} (c) and
   c4-. d-. e-. \bar "||"; 
 }
 \context Lyrics \lyrics { a "" "" b "" "" c "" "" d  }
-@end mudela
+@end lilypond
 
 @item legato curve
 @w{@ar{}@strong{slur}} @w{@ar{}@strong{legato}}
@@ -1510,13 +1510,13 @@ note value: double length of @w{@ar{}@strong{brevis}}. @w{@ar{}@strong{note valu
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t 
 \notes\relative c'' { 
   \property Voice.noteHeadStyle = #'mensural
   g\longa 
 } 
-@end mudela
+@end lilypond
 
 @item major interval
 I: intervallo maggiore, F: intervalle majeur, D: gro@ss{}es Intervall, NL:
@@ -1573,28 +1573,28 @@ one speaks of @emph{duple} (2/2, 2/4, 2/8), @emph{triple} (3/2, 3/4, 3/8) or
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \notes\relative c'' { 
   \time 3/4;
   \key f \major;
   c es d | c bes8 a bes4 | c es d | c2 \bar "||";}
-@end mudela
+@end lilypond
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \notes\relative c' { 
   \time 6/8;
   \key f \major;
   f8 f f f a16 g a f | 
   c'8 c c c e16 d e c \bar "||";}
-@end mudela
+@end lilypond
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \notes\relative c'' { 
   \time 5/4;
   \key g \major;
   d4 b8 g b d d c a4 | 
   g8 g16 g g8 g16 g g8 fis16 g a8 fis16 e d4 \bar "||";}
-@end mudela
+@end lilypond
 
 @item metronome
 I: metronomo, F: m@'etronome, D: Metronom, NL: metronoom, 
@@ -1625,7 +1625,7 @@ First C below the 440 Hz A.
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t 
 \property Staff.clefStyle = #"fullSizeChanges"
 \notes\relative c' { 
@@ -1633,7 +1633,7 @@ First C below the 440 Hz A.
   \clef alto; c s
   \clef treble; c s
 } 
-@end mudela
+@end lilypond
 
 @item minor interval
 I: intervallo minore, F: intervalle mineur, D: kleines Intervall, NL: klein
@@ -1674,7 +1674,7 @@ subject.
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.timeSignatureStyle = "C2/2"
 \emptyText
 \property Voice.textStyle = "large"
@@ -1685,7 +1685,7 @@ subject.
   g8 d16_"------" c d8 g16 fis g8 b,16 a b8 g'16 fis |
   g8 g,16 a b8 cis d16 s 
 } 
-@end mudela
+@end lilypond
 
 @item movement
 I: movimento, F: mouvement, D: Satz, NL: deel, DK: sats, S: sats, N: .
@@ -1700,12 +1700,12 @@ mehrtaktige Pause, DK: flertaktspause, S: flertaktspaus, N: .
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \notes\relative c'' {
 a1
 \property Score.skipBars=##t R1*3 
 a1 }
-@end mudela
+@end lilypond
 
 @item mixolydian mode
 @w{@ar{}@strong{diatonic scale}}
@@ -1758,7 +1758,7 @@ but sometimes (mostly in pre baroque music) the double length note value
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Voice.textStyle = "large"
 \property Score.barNonAuto = ##t
 \notes\relative c'' { 
@@ -1767,30 +1767,30 @@ but sometimes (mostly in pre baroque music) the double length note value
   \property Voice.noteHeadStyle = ##f
   g1_"1/1" g2_"1/2" g4_"1/4" s16 g8_"1/8" s16
   g16_"1/16" s16 g32_"1/32" s16 g64_"1/64" s32 }
-@end mudela
+@end lilypond
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Voice.textStyle = "large"
 \property Score.barNonAuto = ##t
 \notes\relative c'' { 
   r\longa_"longa" r\breve_"breve" 
   r1_"1/1" r2_"1/2" r4_"1/4" s16 r8_"1/8" s16
   r16_"1/16" s16 r32_"1/32" s16 r64_"1/64" s32 }
-@end mudela
+@end lilypond
 
 An augmentation dot after a note multiplies the duration by one and a
 half. Another dot adds yet a fourth of the duration.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \emptyText
 \property Voice.textStyle = "large"
 \notes\relative c'' { 
   \time 4/4;
   g4._"pointed" g8 g2 | g4 () g8 g g2 \bar "||"; 
   g4.._"double pointed" g16 g2 | g4 () g8 () g16 g g2 \bar "||"; }
-@end mudela
+@end lilypond
 
 Alternatively note values may be subdivided by other ratios. Most common is
 subdivision by 3 (@emph{triplets}) and 5 (@emph{quintuplets}). Subdivisions by
@@ -1799,7 +1799,7 @@ frequently used.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Voice.textStyle = "large"
 \emptyText
 \notes\relative c'' { 
@@ -1811,7 +1811,7 @@ frequently used.
   g4 g g \bar "||";
   \times 6/4 {g8_"quadruplets" g g g} |
   g8 g g g g4 \bar "||";}
-@end mudela
+@end lilypond
 
 @
 
@@ -1834,7 +1834,7 @@ middle of the 19th century and onwards the trill is performed with the main
 note first while in the music from the preceding baroque and classic periods
 the upper note is played first.
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 <
   \context Staff = sa {
     \emptyText
@@ -1849,14 +1849,14 @@ the upper note is played first.
     c2. b32 c b c \times 4/5 { b c b c b } | c1
   }
 >
-@end mudela
+@end lilypond
 
 Other frequently used ornaments are the @emph{turn}, the @emph{mordent} and the
 @emph{prall} (inverted mordent).
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 <
   \context Staff = sa {
     \emptyText
@@ -1873,7 +1873,7 @@ Other frequently used ornaments are the @emph{turn}, the @emph{mordent} and the
     e'4 [e8 ~ e32 d e d] c2
   } 
 >
-@end mudela
+@end lilypond
 
 @w{@ar{}@strong{appoggiatura}}
 
@@ -2001,7 +2001,7 @@ the same @w{@ar{}@strong{signature}}.
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Voice.textStyle = "large"
@@ -2012,7 +2012,7 @@ the same @w{@ar{}@strong{signature}}.
   \key es \major;
   c,1_"c minor" d es f g a! b! c \bar "||";
 }
-@end mudela
+@end lilypond
 
 @item repeat
 I: ritornello, F: barre de reprise, D: Wiederholung, NL: herhaling, DK:
@@ -2020,13 +2020,13 @@ gen@-ta@-gel@-se, S: repris, N: .
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \key g \major;
 \time 4/4;
 \notes\relative c'' { 
   \repeat volta 2 {g4 g d' d | e e d2 | c4 c b b | a a g2 }
 }
-@end mudela
+@end lilypond
 
 @item rest
 I: pausa, F: silence, D: Pause, NL: rust, DK: pause, S: paus, N: .
@@ -2072,7 +2072,7 @@ sub@-do@-mi@-nant (S) and V = dominant (D).
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Lyrics.textStyle = "large"
@@ -2084,7 +2084,7 @@ sub@-do@-mi@-nant (S) and V = dominant (D).
   < { I II III IV V VI VII I } 
     { T "" "" S D } >
 }
-@end mudela
+@end lilypond
 
 @w{@ar{}@strong{functional harmony}}
 
@@ -2116,10 +2116,10 @@ semitones. @w{@ar{}@strong{interval}} @w{@ar{}@strong{chromatic scale}}
 
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \property Score.barNonAuto = ##t 
 \notes\relative c'' { g1 gis s a bes s b c }
-@end mudela
+@end lilypond
 
 @item seventh
 I: settima, F: septi@`eme, D: Septime, NL: septiem, DK: septim, S: septim, N: .
@@ -2232,14 +2232,14 @@ notehead.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \key d \major;
 \time 4/4;
 \notes\relative c'' { 
   \partial 8; a8 | 
   d4-\staccato cis-\staccato b-\staccato cis-\staccato | 
   d2. \bar "||"; }
-@end mudela
+@end lilypond
 
 @item staff
 I: pentagramma, rigo (musicale), F: port@'ee, D: Notensystem, NL: (noten)balk;
@@ -2259,7 +2259,7 @@ note. @w{@ar{}@strong{beam}}
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Score.noAutoBeaming = ##t
 \property Score.barNonAuto = ##t
 \emptyText
@@ -2270,7 +2270,7 @@ note. @w{@ar{}@strong{beam}}
   g,8_"1/8" g' s16
   g,16_"1/16" g' s16
 }
-@end mudela
+@end lilypond
 
 @item strings
 I: archi, F: cordes, D: Streicher, NL: strijkers, DK: strygere, S:
@@ -2335,7 +2335,7 @@ the underlaying (normal) pulse and the actual (abnormal) rhythm.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \emptyText
 \property Voice.textStyle = "large"
 \time 4/4;
@@ -2344,7 +2344,7 @@ the underlaying (normal) pulse and the actual (abnormal) rhythm.
   d8 dis |
   e c'4 e,8 c'4 e,8 c' ( | ) c2
 }
-@end mudela
+@end lilypond
 
 @item syntonic comma; dydimic comma
 
@@ -2420,7 +2420,7 @@ with figures designating the chief @w{@ar{}@strong{interval}}s and
  
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \context GrandStaff <
   \notes\relative c'' { 
     \time 4/4;
@@ -2448,7 +2448,7 @@ with figures designating the chief @w{@ar{}@strong{interval}}s and
       { "" "" "2" "" "2" "" "2" "" } >
   } 
 >
-@end mudela
+@end lilypond
 
 @item tie; bind
 I: legatura (di valore), F: liaison, D: Haltebogen, NL: overbinding, DK:
@@ -2460,10 +2460,10 @@ uniting them into a single sound equal to the combined durations.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \property Score.barNonAuto = ##t
 \notes\relative c'' { g2 ~ g4. }
-@end mudela
+@end lilypond
 
 @item time signature
 
@@ -2493,7 +2493,7 @@ Shifting a melody up or down in pitch, while keeping the same relative pitches.
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \context Staff {
   \time 3/4;
   \notes\relative c'' {
@@ -2503,7 +2503,7 @@ Shifting a melody up or down in pitch, while keeping the same relative pitches.
     \key g \major;
     d4 g,8 a b c | d4 g, g | e' c8 d e fis | g4 g, g \bar "|."; }
 }
-@end mudela
+@end lilypond
 
 @item treble clef
 I: chiave di violino, F: cl@'e de sol, D: Violinschl@"ussel,
@@ -2524,7 +2524,7 @@ a @w{@ar{}@strong{chord}}, usually in the distance of a third
  
 @
 
-@mudela[13pt,eps] 
+@lilypond[13pt,eps] 
 \emptyText
 \property Score.barNonAuto = ##t 
 \property Voice.textStyle = "large"
@@ -2533,7 +2533,7 @@ a @w{@ar{}@strong{chord}}, usually in the distance of a third
   % e2:32_"a" f:32 [ e8:16 f:16 g:16 a:16 ] s4 \repeat "tremolo" 16 { e32_"b" g }
   e2:32_"a" f:32 [ e8:16 f:16 g:16 a:16 ] s4 \repeat "tremolo" 8 { e32_"b" g }
 } 
-@end mudela
+@end lilypond
 
 @item triad
 I: triade, F: triade, accord parfait, accord de trois sons, D: Dreiklang, NL:
@@ -2592,13 +2592,13 @@ line. @w{@ar{}@strong{measure}} @w{@ar{}@strong{meter}}
 
 @
 
-@mudela[13pt,eps]
+@lilypond[13pt,eps]
 \key f \major;
 \time 4/4;
 \notes\relative c' { 
   \partial 4; f4 | bes4. a8 bes4 c | 
   bes () a g f | bes4. a8 bes4 c | f,2. \bar "||"; }
-@end mudela
+@end lilypond
 
 @item voice
 I: voce, F: voix, D: Stimme, NL: stem, DK: stemme, S: st@"amma, N: ,
index c0e8228338332fd3a0cafc8f2ee163f5de62d673..14786887a3ad22571d1122542d52f8bb9acd2206 100644 (file)
@@ -42,7 +42,7 @@ code and named output.
 @item --include, -I=DIRECTORY
     Add @file{DIRECTORY} to the search path for input files.
 @item --ignore-version, -V
-    Make the incompatible mudela version warning non-fatal.
+    Make the incompatible lilypond version warning non-fatal.
 @end table
 
 
diff --git a/Documentation/user/latex-lilypond-example.latex b/Documentation/user/latex-lilypond-example.latex
new file mode 100644 (file)
index 0000000..6906eab
--- /dev/null
@@ -0,0 +1,163 @@
+% kommentar
+\documentclass[a4paper, 12pt]{article}
+%\def\preMudelaExample{}
+%\def\postMudelaExample{}
+%\usepackage{graphics}
+%\usepackage{landscape}
+\begin{document}
+%uncomment this to try twocolumn mode
+%\twocolumn
+
+
+\section{Mudelabook + LaTeX}
+
+This is an examplefile for mixing Lilypond and Latex. It is also
+used to test lilypond-book. View the source to see how it is done.
+
+A simple scale:
+
+\begin{lilypond}
+\score{
+ \notes\relative c'{c d e f g a b c}
+}
+\end{lilypond}
+
+Lilypond-book search for the \verb|\score| command when it decides
+if the code is only a fragment. Thus, in the following code, you have
+to use \verb|fragment| option, because the comment confuses lilypond-book.
+
+\begin[fragment]{lilypond}
+c d e % \score
+\end{lilypond}
+
+There is also a shorthand version \verb|\lilypond{c' e' g'}|:
+
+\lilypond{c' e' g'}
+
+that is the same as writing
+\begin{verbatim}
+\begin[eps]{lilypond}
+c' e' g'
+\end{lilypond}
+\end{verbatim}
+
+This C major
+\begin[eps, 11pt]{lilypond}
+c' e' g'
+\end{lilypond}
+and C minor \lilypond[11pt]{c' es' g'}  chords are floating inside the text.
+
+\subsection{verb and verbatim}
+
+As you see, the begin/end verbatim command inside 
+does not confuse lilypond-book:
+
+\verb|\begin{lilypond}c d e\end{lilypond}|
+
+Neither does a verbatim inside verb:
+
+\verb|\begin{verbatim}\begin{lilypond}c d e\end{lilypond}\end{verbatim}|
+
+or verb inside verbatim:
+
+\begin{verbatim}
+\verb|\begin{lilypond}c d e\end{lilypond}|
+\end{verbatim}
+
+But this is just to stress \verb|lilypond-book|. What you need is:
+
+\verb|\lilypond{c' d' e'}|
+
+and
+
+\begin{verbatim}
+\begin{lilypond}
+c d e
+\end{lilypond}
+\end{verbatim}
+
+\subsection{The 'verbatim' and 'intertext' option}
+This shows the verbatim option:
+\begin[verbatim, intertext="gives this music:"]{lilypond}
+c' d' e'
+\end{lilypond}
+
+\subsection{LaTeX comments}
+This is a line with lilypond code after the comment char % \lilypond{<c' e' g'>}
+% \lilypond{<c' e' g'>}
+
+If you do not see any music from the heading 'LaTeX comments' and until
+this line, then lilypond-book is handling latex comments pretty well :-)
+
+\subsection{To float or not to float}
+This music
+\begin[eps]{lilypond}
+c' e' 
+\end{lilypond}
+should be floating inside the text by using the \verb|eps| options.
+
+This music
+
+\begin[eps]{lilypond}
+c' e'
+\end{lilypond}
+
+has also the \verb|eps| options, but is not floating because there
+are an emptry line before and after the lilypond block. That is
+correct behaviour because it follows La\TeX{} convention that an
+empty line signals a new paragraph. Note that the \verb|eps| option
+is not necessary when you want the music in a paragraph on its own.
+
+\subsection{More examples}
+
+Itemize environment:
+\begin{itemize}
+\item \lilypond[11pt]{ c'} do
+\item \lilypond[11pt]{d'} re
+\item \lilypond[11pt]{e'} mi
+\item \lilypond[11pt]{f'} fa
+\item \lilypond[11pt]{g'} sol
+\end{itemize}
+
+Tables\footnote{ and footnote: \lilypond[eps,11pt]{c' e' g'} }:
+\marginpar{ Yes, even as marginpar
+\lilypond[eps,11pt]{c' d' e'} }
+
+\begin{tabular}{|l|l|r|}
+\hline
+\em Notes & \em Name \\
+\hline
+\lilypond[11pt, filename="cdur"]{<c' e' g'>} & major \\
+\lilypond[11pt]{<c' es' g'>} & minor \\
+\lilypond[11pt]{<c' es' ges'>} & diminished \\
+\lilypond[11pt]{<c' e' gis'>} & augmented \\
+\hline
+\end{tabular}
+
+\pagebreak
+
+Testing of spacing. The next music is surrounded by an empty line.
+text text text text text text text text text text text text 
+text text text text text text text text text text text text 
+
+\begin{lilypond}
+\score{ \notes\relative c'{ c d e f g a b c} }
+\end{lilypond}
+
+text text text text text text text text text text text text 
+text text text text text text text text text text text text 
+text text text text text text text text text text text text 
+
+Next has no empty lines.
+text text text text text text text text text text text text 
+text text text text text text text text text text text text 
+text text text text text text text text text text text text 
+\begin{lilypond}
+\score{ \notes\relative c'{ c d e f g a b c} }
+\end{lilypond}
+text text text text text text text text text text text text 
+text text text text text text text text text text text text 
+
+
+
+\end{document}
diff --git a/Documentation/user/latex-mudela-example.latex b/Documentation/user/latex-mudela-example.latex
deleted file mode 100644 (file)
index 817a0f0..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-% kommentar
-\documentclass[a4paper, 12pt]{article}
-%\def\preMudelaExample{}
-%\def\postMudelaExample{}
-%\usepackage{graphics}
-%\usepackage{landscape}
-\begin{document}
-%uncomment this to try twocolumn mode
-%\twocolumn
-
-
-\section{Mudelabook + LaTeX}
-
-This is an examplefile for mixing Lilypond and Latex. It is also
-used to test mudela-book. View the source to see how it is done.
-
-A simple scale:
-
-\begin{mudela}
-\score{
- \notes\relative c'{c d e f g a b c}
-}
-\end{mudela}
-
-Mudela-book search for the \verb|\score| command when it decides
-if the code is only a fragment. Thus, in the following code, you have
-to use \verb|fragment| option, because the comment confuses mudela-book.
-
-\begin[fragment]{mudela}
-c d e % \score
-\end{mudela}
-
-There is also a shorthand version \verb|\mudela{c' e' g'}|:
-
-\mudela{c' e' g'}
-
-that is the same as writing
-\begin{verbatim}
-\begin[eps]{mudela}
-c' e' g'
-\end{mudela}
-\end{verbatim}
-
-This C major
-\begin[eps, 11pt]{mudela}
-c' e' g'
-\end{mudela}
-and C minor \mudela[11pt]{c' es' g'}  chords are floating inside the text.
-
-\subsection{verb and verbatim}
-
-As you see, the begin/end verbatim command inside 
-does not confuse mudela-book:
-
-\verb|\begin{mudela}c d e\end{mudela}|
-
-Neither does a verbatim inside verb:
-
-\verb|\begin{verbatim}\begin{mudela}c d e\end{mudela}\end{verbatim}|
-
-or verb inside verbatim:
-
-\begin{verbatim}
-\verb|\begin{mudela}c d e\end{mudela}|
-\end{verbatim}
-
-But this is just to stress \verb|mudela-book|. What you need is:
-
-\verb|\mudela{c' d' e'}|
-
-and
-
-\begin{verbatim}
-\begin{mudela}
-c d e
-\end{mudela}
-\end{verbatim}
-
-\subsection{The 'verbatim' and 'intertext' option}
-This shows the verbatim option:
-\begin[verbatim, intertext="gives this music:"]{mudela}
-c' d' e'
-\end{mudela}
-
-\subsection{LaTeX comments}
-This is a line with mudela code after the comment char % \mudela{<c' e' g'>}
-% \mudela{<c' e' g'>}
-
-If you do not see any music from the heading 'LaTeX comments' and until
-this line, then mudela-book is handling latex comments pretty well :-)
-
-\subsection{To float or not to float}
-This music
-\begin[eps]{mudela}
-c' e' 
-\end{mudela}
-should be floating inside the text by using the \verb|eps| options.
-
-This music
-
-\begin[eps]{mudela}
-c' e'
-\end{mudela}
-
-has also the \verb|eps| options, but is not floating because there
-are an emptry line before and after the mudela block. That is
-correct behaviour because it follows La\TeX{} convention that an
-empty line signals a new paragraph. Note that the \verb|eps| option
-is not necessary when you want the music in a paragraph on its own.
-
-\subsection{More examples}
-
-Itemize environment:
-\begin{itemize}
-\item \mudela[11pt]{ c'} do
-\item \mudela[11pt]{d'} re
-\item \mudela[11pt]{e'} mi
-\item \mudela[11pt]{f'} fa
-\item \mudela[11pt]{g'} sol
-\end{itemize}
-
-Tables\footnote{ and footnote: \mudela[eps,11pt]{c' e' g'} }:
-\marginpar{ Yes, even as marginpar
-\mudela[eps,11pt]{c' d' e'} }
-
-\begin{tabular}{|l|l|r|}
-\hline
-\em Notes & \em Name \\
-\hline
-\mudela[11pt, filename="cdur"]{<c' e' g'>} & major \\
-\mudela[11pt]{<c' es' g'>} & minor \\
-\mudela[11pt]{<c' es' ges'>} & diminished \\
-\mudela[11pt]{<c' e' gis'>} & augmented \\
-\hline
-\end{tabular}
-
-\pagebreak
-
-Testing of spacing. The next music is surrounded by an empty line.
-text text text text text text text text text text text text 
-text text text text text text text text text text text text 
-
-\begin{mudela}
-\score{ \notes\relative c'{ c d e f g a b c} }
-\end{mudela}
-
-text text text text text text text text text text text text 
-text text text text text text text text text text text text 
-text text text text text text text text text text text text 
-
-Next has no empty lines.
-text text text text text text text text text text text text 
-text text text text text text text text text text text text 
-text text text text text text text text text text text text 
-\begin{mudela}
-\score{ \notes\relative c'{ c d e f g a b c} }
-\end{mudela}
-text text text text text text text text text text text text 
-text text text text text text text text text text text text 
-
-
-
-\end{document}
diff --git a/Documentation/user/lilypond-book.tely b/Documentation/user/lilypond-book.tely
new file mode 100644 (file)
index 0000000..49fc1f8
--- /dev/null
@@ -0,0 +1,636 @@
+\input texinfo @c -*-texinfo-*-
+@setfilename lilypond-book.info
+@settitle lilypond-book Manual
+@afourpaper
+@titlepage
+@title lilypond-book Manual
+@subtitle Integrating lilypond with La@TeX{} and TeXinfo
+@author Tom Cato Amundsen and  Han-Wen Nienhuys
+
+     Copyright @copyright{} 1999 by the authors
+
+@vskip 0pt plus 1filll
+
+Permission is granted to make and distribute verbatim
+copies of this manual provided the copyright notice and
+this permission notice are preserved on all copies.
+
+Permission is granted to copy and distribute modified
+versions of this manual under the conditions for
+verbatim copying, provided also that the sections
+entitled ``Copying'' and ``GNU General Public License''
+are included exactly as in the original, and provided
+that the entire resulting derived work is distributed
+under the terms of a permission notice identical to this
+one.
+
+Permission is granted to copy and distribute
+translations of this manual into another language,
+under the above conditions for modified versions,
+except that this permission notice may be stated in a
+translation approved by the Free Software Foundation.
+
+@end titlepage
+
+@ifinfo
+This file documents GNU LilyPond.
+
+Copyright 1999 Tom Cato Amundsen and  Han-Wen Nienhuys
+
+
+Permission is granted to make and distribute verbatim
+copies of this manual provided the copyright notice and
+this permission notice are preserved on all copies.
+
+@ignore
+Permission is granted to process this file through TeX
+and print the results, provided the printed document
+carries a copying permission notice identical to this
+one except for the removal of this paragraph (this
+paragraph not being relevant to the printed manual).
+
+@end ignore
+
+Permission is granted to copy and distribute modified
+versions of this manual under the conditions for
+verbatim copying, provided also that the sections
+entitled ``Copying'' and ``GNU General Public License''
+are included exactly as in the original, and provided
+that the entire resulting derived work is distributed
+under the terms of a permission notice identical to this
+one.
+
+Permission is granted to copy and distribute
+translations of this manual into another language,
+under the above conditions for modified versions,
+except that this permission notice may be stated in a
+translation approved by the Free Software Foundation.
+
+@end ifinfo
+@tex
+\def\preLilypondExample{\vspace{0.5cm}}
+@end tex
+
+@contents
+@node Top, , , (dir)
+@top
+
+
+
+@section Introduction
+
+[ The tutorial part is at the moment commented out and moved to 
+the end of this document ]
+
+
+[TODO: THIS MANUAL IS NOT FINISHED YET. FIXME.]
+
+@command{lilypond-book} is a script that helps integrating lilypond with
+La@TeX{} or TeXinfo. @command{lilypond-book} runs Lilypond on fragments
+of lilypond in your source file, and includes the results into a
+document that can be processed with La@TeX{}, @command{makeinfo}
+or @command{texi2dvi}.
+The result is a text document with formatted music integrated.
+
+@command{lilypond-book} will do its best to try to align the music to
+the left and right margins. Currently the most used papersizes and
+one- and twocolumn mode is supported. But if you use some more
+advances features, like the geometry-package or change the margins in
+La@TeX{} or use @code{@@pagesize} in texinfo, will break.
+
+This document assumes you have basic knowledge of GNU LilyPond and
+La@TeX{} or texinfo.
+
+@section TeXinfo reference
+
+Your markup the lilypond code like this:
+@example
+@@lilypond[options, go, here]
+ YOUR LILYPOND CODE
+@@end lilypond
+@end example
+
+or
+
+@example
+@@lilypond[option, go, here]@{ YOUR LILYPOND CODE @}
+@end example
+
+@command{lilypond-book} knows the default margins, and a few papersizes.
+These commands should be in the beginning of the document:
+@itemize @bullet
+@item @code{@@afourpaper}
+@item @code{@@afourwide}
+@item @code{@@smallbook}
+@end itemize
+@code{@@pagesizes} are not supported.
+
+@subsection Examples
+
+Two simple examples. First a complete block:
+
+@example
+@@lilypond[26pt]
+c' d' e' f' g'2 g'
+@@end lilypond
+@end example
+
+produces this music:
+@lilypond
+c' d' e' f' g'2 g'
+@end lilypond
+
+Then the short version:
+@example
+@@lilypond[11pt]@{<c' e' g'>@}
+@end example
+
+and its music:
+
+@lilypond[11pt]{<c' e' g'>}
+
+
+@subsection @@example and @@code
+
+I'm not sure if this will go into the final documentation, this is
+here mostly to remember me on why things are the way they are.
+
+@command{lilypond-book} will do nothing with special with @code{@@code} and
+@code{@@example} environments. The 'code' and 'example' commands
+should work just as normal. People looking at document that should be
+processed by @command{lilypond-book}, should notice nothing special, except from
+some block like this:
+@example
+@@lilypond
+BLABLA
+@@end lilypond
+@end example
+
+or this:
+
+@code{@@lilypond@{ BLABLA @}}
+
+Anything other is a bug in @command{lilypond-book}.
+
+So to get this in the printed manual:
+
+@example
+@@lilypond[26pt]
+\relative c'@{c d e f g2 g@}
+@@end lilypond
+@end example
+
+you have to write this:
+
+@example
+@@example
+@@@@lilypond[26pt]
+\relative c'@@@{c d e f g2 g@@@}
+@@@@end lilypond
+@@end example
+@end example
+
+Simply explained, every '@{', '@}' and '@@' has to be written as '@@@{',
+'@@@}' and '@@@@'. This is how it works in plain texinfo too.
+
+@section La@TeX{} reference
+
+Your markup the lilypond code like this:
+@example
+\begin[option, go, here]@{lilypond@}
+ YOUR LILYPOND CODE
+\end@{lilypond@}
+@end example
+
+or 
+
+@example
+\lilypond@{ YOUR LILYPOND CODE @}
+@end example
+
+The 'geometry' package is is not supported. The most popular
+papersizes should work.
+
+Lilypond-book know about the @code{\onecolumn} and 
+@code{\twocolumn} commands.
+
+The music will be surrounded by @code{\preLilypondExample} and
+@code{\postLilypondExample}. The variables are 
+defined to nothing by default, and the user can redefine them
+to whatever he wants.
+@strong{[UGH: THIS DOES NOT HAPPEN WHEN
+YOU USE THE SHORT FORM, \LILYPOND@{ ... @}, CHECK OUT WHY]}
+
+@subsection @code{landscape} package 
+There is some simple support for landscape paper format, and this
+can be combined with the @code{\twocolumn} command. Only a4 and
+letter paper is supported, more to come...
+
+A more complete
+support, maybe also supporting the geometry package is planned, but
+there are more work that has to be done on @command{lilypond-book}
+first.
+
+This should work:
+@example
+\documentclass@{article@}
+\usepackage@{landscape@}
+\begin@{document@}
+\twocolumn
+BLA BLA BLA
+\end@{document@}
+@end example
+
+@subsection Examples 
+
+@example
+\begin[26pt]@{lilypond@}
+c' d' e' f' g'2 g'2
+\end@{lilypond@}
+@end example
+
+produces this music:
+
+@lilypond[26pt]
+c' d' e' f' g'2 g'2
+@end lilypond
+
+Then the short version:
+@example
+\lilypond[11pt]@{<c' e' g'>@}
+@end example
+
+and its music:
+
+@lilypond[11pt]{<c' e' g'>}
+
+
+@subsection \begin@{verbatim@} and \verb|\verb| 
+
+There work just as expected. Look at @file{mb-latex.tex} for details.
+
+@section Options
+
+@table @samp
+@item eps
+    the music is created as eps graphics that can be inserted in 
+    the middle of a text line, not only as a separate paragraph.
+    (La@TeX{} only)
+@item verbatim
+    CONTENTS is copied into the source enclosed in a verbatim block,
+    followed by any text given with the @code{intertext} option, then
+    the actual music is displayed. This option does not work with
+    the short version of the lilypond blocks:
+
+    @code{ @@lilypond@{ CONTENTS @} } and @code{ \lilypond@{ CONTENTS @} }
+    
+@item intertext="text inside apostrophs"
+    Used in conjunction with @code{verbatim} option.
+@item filename=FILENAME
+    Save the lilypond code to FILENAME instead of using a hash value
+    of CONTENTS.
+@item 11pt, 13pt, 16pt, 20pt, 26pt
+    set the fontsize to use for the music
+@item singleline
+  linewidth = -1.
+@item multiline
+  linewidth = textwidth
+@item fragment
+@item nonfragment
+    Override @command{lilypond-book} autodetection of what type of code is in the
+    lilypond block, voice contents or complete code.
+@end table
+
+@section Invocation
+
+When you run @command{lilypond-book} it will generate lots of small
+files that Lilypond will process. So to avoid all the garbage in
+your source directory, you should either change to a temporary
+directory, or use the @code{--outdir} commandline options:
+
+@code{cd out && lilypond-book ../yourfile.tex}
+
+@code{lilypond-book --outdir=out yourfile.tex}
+
+
+For latex input, the file to give to latex has ext @file{.latex}.
+TeXinfo input will be written to a file with ext @file{.texi}. So be
+careful, don't give the source file that ext, or the file will be
+overwritten.
+
+If you use @code{--outdir}, you should also @code{cd} to that directory
+before running LaTeX or makeinfo.
+
+@strong{[UGH: IS THIS THE BEST WAY TO DO IT. MAYBE ADD A COMMENT LINE TO THE
+GENERATED FILE, SO LILYPOND-BOOK CAN TEST IF THE FILE IT IS TO OVERWRITE
+IS GENERATED.]}
+
+@strong{About the input}
+
+If the file contains the ``block''
+
+@example 
+
+        \begin@{lilypond@}
+        CONTENTS
+        \end@{lilypond@}
+@end example 
+
+then LilyPond is run on CONTENTS.  @command{lilypond-book} puts the result back,
+surrounded by @code{\preLilypondExample} and @code{\postLilypondExample}
+commands. @code{\preLilypondExample} and @code{posLilypondExample} is
+defined to nothing by default, and the user can redefine them
+to whatever he wants.
+
+
+@subsection Command line options
+
+@table @samp
+
+@item @option{-f}, @option{--format=}
+    Specify the document type to process, @code{latex} or @code{texi}.
+    @command{lilypond-book} usually figure out this automatically.
+@item --default-music-fontsize=??pt
+    Set the fontsize to use for lilypond if no fontsize is given
+    as option.
+@item --force-music-fontsize=??pt
+    Force all lilypond to use this fontsize, overriding options
+    given to \begin@{lilypond@}
+@item -I DIR, --include=DIR
+    include path
+@item -M, --dependencies
+        Write dependencies to out-www/filename.dep
+@item --dep-prefix=PREF
+       prepend PREF before each -M dependency
+@item -n, --no-lily
+       don't run lilypond
+@item --no-pictures
+       don't generate pictures
+@item --read-lys
+       don't write ly files. This way you can do
+       @example
+       lilypond-book file.tely
+       convert-ly
+       lilypond-book --read-lys
+       @end example
+@item --outname=FILE
+    The name of La@TeX{} file to output. If this option  is not given,
+    the output name derived from the input name.
+@item --outdir=
+       where to place generated files
+@item --version
+       print version information
+@item --help
+       Print a short help message
+@end table
+
+
+
+@command{lilypond-book} is written in python 1.5, so you have to install
+@uref{http://www.python.org,python}.
+
+
+
+@section Bugs
+  
+The La@TeX{} \includeonly@{...@} command is ignored.
+
+Ignores almost all La@TeX{} commands that changes margins and linewidths.
+
+@section Authors
+
+@email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}, @uref{http://www.cs.uu.nl/people/hanwen}
+
+@email{tca@@gnu.org, Tom Cato Amundsen}
+
+@bye
+@ignore
+
+So what does this look like? Well, here is an example:
+@lilypond[veryverbatim, intertext="produces this music:"]
+\score{
+  \notes\relative c'{
+    \time 5/8;
+    [e16( g b c a g][e a b d] | )e2 d,8 |
+    [e16( g b c a g][e a b d] | )b2 [a16( f] |
+    [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] |
+    [f( a b d b a][f a b d] | )e2
+  }
+}
+@end lilypond
+If you are lucky, the above example show a nice feature of LilyPond
+and La@TeX{}. Since LilyPond can output the music as @TeX{} graphics,
+La@TeX{} can insert pagebreaks between the lines of music.
+
+Notice that there is no @code{\paper} statement in the example
+above. Lilypond-book will insert some code for you that defines the
+linewidth and the font to use. If you don't want to change the default, 
+there is no need to put an empty @code{\paper@{@}} inside the @code{\score}.
+In the example above, something like
+this might be inserted before your code:
+@example
+\include "paper16.ly"
+\paper@{ \paper_sixteen
+    linewidth = 390.\pt;
+    castingalgorithm = \Gourlay;
+@}
+@end example
+The actual values for linewidth will differ depending on papersize and
+number of columns. Also, if you use a different fontsize for the
+music, another file than @code{paper16.ly} will be included.
+
+If you want to make the music not so wide, you can insert a
+@code{\paper} statement that set the linewidth:
+
+@lilypond[veryverbatim, intertext="produces this music:"]
+\score{
+  \notes\relative c'{
+    \time 5/8;
+    [e16( g b c a g][e a b d] | )e2 d,8 |
+    [e16( g b c a g][e a b d] | )b2 [a16( f] |
+    [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] |
+    [f( a b d b a][f a b d] | )e2
+  }
+  \paper{linewidth = 10.\cm;}
+}
+@end lilypond
+
+Very often, if you mix music and text, the music is often only a 
+few notes or at most a few bars. This music should be as short as
+possible and not stretched to be aligned to the right margin.
+
+If you only write voice-contents in the lilypond block, @command{lilypond-book}
+will set the @code{linewidth} variable to -1, so Lilypond
+will make the music as short as possible but without breaking the
+line. Here is a well know harmonic progression:
+@lilypond[veryverbatim, intertext="produce a well known harmonic progression:"]
+  \context Voice { <c' e g> <b d g> <c2 e g> }
+@end lilypond
+
+If you want to place music examples in the text,
+@lilypond[eps]
+\context Voice {  <c' e g> <b d g> <c2 e g>}
+@end lilypond
+, you can use the @code{eps} option. This will create the music as
+eps graphics and include it into the document with the 
+@code{\includegraphics} command.
+
+The code used look like this:
+@example
+@@lilypond[eps]
+ \context Voice { <c' e g> <b d g> <c2 e g> }
+@@end lilypond
+@end example
+
+You can also use the @code{eps} option if the block is a complete
+lilypond source. This 5 cm long empty line, 
+@lilypond[eps]
+\score{
+  \notes{s}
+  \paper{ linewidth = 5.\cm;}
+}
+@end lilypond
+was created with this code:
+@example
+@@lilypond[eps]
+\score@{
+  \notes@{s@}
+  \paper@{ linewidth = 5.\cm;@}
+@}
+@@end lilypond
+@end example
+
+To avoid that La@TeX{} places the music on a line of its one, there should
+be no empty lines between the normal text and the lilypond
+environment. 
+
+You can also use @code{lilypondfile} (on a separate line, FIXME), to
+include another file.
+
+@section Fontsize options You can use all lilypond fontsizes in
+@command{lilypond-book}.  The default 16pt fontsize is probably to big to be
+included in the middle of the text, 11pt or 13pt is probably better.
+
+The code can look like this:
+@example
+@@lilypond[13pt, eps]
+<c' e g>
+@@end lilypond
+@end example
+
+The following options set the fontsize:
+@itemize
+@item @code{11pt}
+@lilypond[11pt, eps]
+  \relative c'{
+    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+    [d16 g, a b][c a b g][d'8 g f-\prall g]
+  }
+@end lilypond
+@item @code{13pt}
+@lilypond[13pt, eps]
+  \relative c'{
+    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+    [d16 g, a b][c a b g][d'8 g f-\prall g]
+  }
+@end lilypond
+@item @code{16pt}
+@lilypond[16pt, eps]
+  \relative c'{
+    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+    [d16 g, a b][c a b g][d'8 g f-\prall g]
+  }
+@end lilypond
+@item @code{20pt}
+@lilypond[20pt, eps]
+  \relative c'{
+    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+    [d16 g, a b][c a b g][d'8 g f-\prall g]
+  }
+@end lilypond
+@item @code{26pt}
+@lilypond[26pt, eps]
+  \relative c'{
+    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
+    [d16 g, a b][c a b g][d'8 g f-\prall g]
+  }
+@end lilypond
+@end itemize
+
+
+@section More options
+@itemize
+@item The @code{singleline} option set @code{linewidth} to -1.0.
+@item The @code{multiline} option set @code{linewidth} to a value letting
+the music be aligned to the right margin. The music can span several
+lines. 
+@end itemize
+
+@section Just in case...
+The options @code{fragment} and @code{nonfragment} will override
+@command{lilypond-book} when it scans the lilypond code to see if it is voice
+contents or complete code. This might be useful if @command{lilypond-book} choose
+wrong. 
+
+Since there is no finder's fee which doubles every year, there is no
+need to wait for the price money to grow. So send a bug report today
+if you need this one of these options.
+
+@section Examples
+
+This was all options to @code{\begin}. The rest of the lilypond
+document will show some ways you can use lilypond in
+La@TeX{} documents. It will also act as a simple test-suite for
+lilypond-book. You can place @code{eps} lilypond in and marginspars just
+as any other included eps graphics.
+
+@lilypond
+\score{
+  \notes\relative c'{ 
+        \time 12/8;  
+        r4-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
+        [f16-.( )f-. dis8-- gis16-.( )gis-.] cis4.-\fermata |
+        
+        r4.-\fermata [cis,16 cis g'8 f16 f b8][g16 g f8 b16 b] dis4.-\fermata
+  }
+  \paper{linewidth = 7.\cm;}
+}
+@end lilypond
+
+
+To the right you can see some bars from the trumpet fanfara from the
+beginning of the fantastic street opera ``Houdini the Great'', by the
+Danish composer Andy Pape. The music is put inside a
+@code{floatingfigure} environment, and the music will be aligned by
+the right marging if you set floatingfigure width and lilypond linewidth
+to the same value. The code looks like this:
+
+@lilypond[verbatim]
+\score{
+  \notes\relative c'{ 
+    \time 12/8;  
+    r4.-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
+    [f16-.( )f-. dis8-- gis16-.( )gis-.] cis8.-\fermata |
+        
+    r4.-\fermata [cis,16 cis g'8 f16 f b8]
+    [g16 g f8 b16 b] dis4.-\fermata
+  }
+  \paper{linewidth = 7.\cm;}
+}
+@end lilypond
+
+If you have a lot of small music examples like this in the middle of
+your text, you might get a nicer look by using ``double'' line
+spacing. Put the @code{\linespread@{1.6@}} command into the preamble of
+your document. Then the line spacing will not be increased between the
+lines where you have music printed with the smallest font size.
+
+Lilypond-book does know about @code{\onecolumn} and @code{\twocolumn}. 
+So the music will be adjusted to the new linewith:
+
+Verbatim environments will also ignore the page margins. That is
+a feature of La@TeX{}. (But you usually put things inside a verbatim
+environment when you don't want La@TeX{} to do any linebreaking)
+
+@end ignore
index 71a42333d1805023de2c6ca791ca0922d345d28f..b1a4a3a92c3b773ebe74ab56dc0651392909543d 100644 (file)
@@ -88,7 +88,7 @@ than the names being similar :-)"
 @c Move to Reference Manual?
 * Internals:(lilypond-internals).  Auto generated detailed documentation.
 * More information::               Where to turn to for more help.
-* convert-mudela::                 Upgrading input files.
+* convert-ly::                 Upgrading input files.
 @c Hmm, having the generated doco in a separate file,
 @c the index can't refer to that.
 * Index::                          Unified index.
@@ -118,7 +118,7 @@ than the names being similar :-)"
 
 @include moreinfo.itexi
 
-@include convert-mudela.itexi
+@include convert-ly.itexi
 
 @node Index, , , Top
 @unnumbered Index
index 89793cf69649ee52a398068b2719d7dd326945b2..94ac18a465c1b19260e8c5b5fbf98384871a56b7 100644 (file)
@@ -7,7 +7,7 @@
 @section DESCRIPTION
 ly2dvi is a Python script which creates input file for La@TeX{},
 based on information from the output files from LilyPond.
-The script handles multiple files. If a mudela file name is
+The script handles multiple files. If a lilypond file name is
 specified LilyPond is run to make an output (@TeX{}) file.
 
 One or more La@TeX{} files are created, based on information found
@@ -72,7 +72,7 @@ Arne Fagertun name @file{ly2dvi}.
 
 @section Features
 
-ly2dvi responds to several parameters specified in the mudela
+ly2dvi responds to several parameters specified in the lilypond
 file. They are overridden by corresponding command line options.
 
 @table @samp
@@ -102,7 +102,7 @@ file. They are overridden by corresponding command line options.
 @section Files
 
 @file{titledefs.tex} is inspected for definitions used to extract
-additional text definitions from the mudela file. In the current
+additional text definitions from the lilypond file. In the current
 version the following are defined:
 
 @table @samp
diff --git a/Documentation/user/mudela-book.tely b/Documentation/user/mudela-book.tely
deleted file mode 100644 (file)
index ae77afe..0000000
+++ /dev/null
@@ -1,636 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@setfilename mudela-book.info
-@settitle mudela-book Manual
-@afourpaper
-@titlepage
-@title mudela-book Manual
-@subtitle Integrating mudela with La@TeX{} and TeXinfo
-@author Tom Cato Amundsen and  Han-Wen Nienhuys
-
-     Copyright @copyright{} 1999 by the authors
-
-@vskip 0pt plus 1filll
-
-Permission is granted to make and distribute verbatim
-copies of this manual provided the copyright notice and
-this permission notice are preserved on all copies.
-
-Permission is granted to copy and distribute modified
-versions of this manual under the conditions for
-verbatim copying, provided also that the sections
-entitled ``Copying'' and ``GNU General Public License''
-are included exactly as in the original, and provided
-that the entire resulting derived work is distributed
-under the terms of a permission notice identical to this
-one.
-
-Permission is granted to copy and distribute
-translations of this manual into another language,
-under the above conditions for modified versions,
-except that this permission notice may be stated in a
-translation approved by the Free Software Foundation.
-
-@end titlepage
-
-@ifinfo
-This file documents GNU LilyPond.
-
-Copyright 1999 Tom Cato Amundsen and  Han-Wen Nienhuys
-
-
-Permission is granted to make and distribute verbatim
-copies of this manual provided the copyright notice and
-this permission notice are preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX
-and print the results, provided the printed document
-carries a copying permission notice identical to this
-one except for the removal of this paragraph (this
-paragraph not being relevant to the printed manual).
-
-@end ignore
-
-Permission is granted to copy and distribute modified
-versions of this manual under the conditions for
-verbatim copying, provided also that the sections
-entitled ``Copying'' and ``GNU General Public License''
-are included exactly as in the original, and provided
-that the entire resulting derived work is distributed
-under the terms of a permission notice identical to this
-one.
-
-Permission is granted to copy and distribute
-translations of this manual into another language,
-under the above conditions for modified versions,
-except that this permission notice may be stated in a
-translation approved by the Free Software Foundation.
-
-@end ifinfo
-@tex
-\def\preMudelaExample{\vspace{0.5cm}}
-@end tex
-
-@contents
-@node Top, , , (dir)
-@top
-
-
-
-@section Introduction
-
-[ The tutorial part is at the moment commented out and moved to 
-the end of this document ]
-
-
-[TODO: THIS MANUAL IS NOT FINISHED YET. FIXME.]
-
-@command{mudela-book} is a script that helps integrating mudela with
-La@TeX{} or TeXinfo. @command{mudela-book} runs Lilypond on fragments
-of mudela in your source file, and includes the results into a
-document that can be processed with La@TeX{}, @command{makeinfo}
-or @command{texi2dvi}.
-The result is a text document with formatted music integrated.
-
-@command{mudela-book} will do its best to try to align the music to
-the left and right margins. Currently the most used papersizes and
-one- and twocolumn mode is supported. But if you use some more
-advances features, like the geometry-package or change the margins in
-La@TeX{} or use @code{@@pagesize} in texinfo, will break.
-
-This document assumes you have basic knowledge of GNU LilyPond and
-La@TeX{} or texinfo.
-
-@section TeXinfo reference
-
-Your markup the mudela code like this:
-@example
-@@mudela[options, go, here]
- YOUR MUDELA CODE
-@@end mudela
-@end example
-
-or
-
-@example
-@@mudela[option, go, here]@{ YOUR MUDELA CODE @}
-@end example
-
-@command{mudela-book} knows the default margins, and a few papersizes.
-These commands should be in the beginning of the document:
-@itemize @bullet
-@item @code{@@afourpaper}
-@item @code{@@afourwide}
-@item @code{@@smallbook}
-@end itemize
-@code{@@pagesizes} are not supported.
-
-@subsection Examples
-
-Two simple examples. First a complete block:
-
-@example
-@@mudela[26pt]
-c' d' e' f' g'2 g'
-@@end mudela
-@end example
-
-produces this music:
-@mudela
-c' d' e' f' g'2 g'
-@end mudela
-
-Then the short version:
-@example
-@@mudela[11pt]@{<c' e' g'>@}
-@end example
-
-and its music:
-
-@mudela[11pt]{<c' e' g'>}
-
-
-@subsection @@example and @@code
-
-I'm not sure if this will go into the final documentation, this is
-here mostly to remember me on why things are the way they are.
-
-@command{mudela-book} will do nothing with special with @code{@@code} and
-@code{@@example} environments. The 'code' and 'example' commands
-should work just as normal. People looking at document that should be
-processed by @command{mudela-book}, should notice nothing special, except from
-some block like this:
-@example
-@@mudela
-BLABLA
-@@end mudela
-@end example
-
-or this:
-
-@code{@@mudela@{ BLABLA @}}
-
-Anything other is a bug in @command{mudela-book}.
-
-So to get this in the printed manual:
-
-@example
-@@mudela[26pt]
-\relative c'@{c d e f g2 g@}
-@@end mudela
-@end example
-
-you have to write this:
-
-@example
-@@example
-@@@@mudela[26pt]
-\relative c'@@@{c d e f g2 g@@@}
-@@@@end mudela
-@@end example
-@end example
-
-Simply explained, every '@{', '@}' and '@@' has to be written as '@@@{',
-'@@@}' and '@@@@'. This is how it works in plain texinfo too.
-
-@section La@TeX{} reference
-
-Your markup the mudela code like this:
-@example
-\begin[option, go, here]@{mudela@}
- YOUR MUDELA CODE
-\end@{mudela@}
-@end example
-
-or 
-
-@example
-\mudela@{ YOUR MUDELA CODE @}
-@end example
-
-The 'geometry' package is is not supported. The most popular
-papersizes should work.
-
-Mudela-book know about the @code{\onecolumn} and 
-@code{\twocolumn} commands.
-
-The music will be surrounded by @code{\preMudelaExample} and
-@code{\postMudelaExample}. The variables are 
-defined to nothing by default, and the user can redefine them
-to whatever he wants.
-@strong{[UGH: THIS DOES NOT HAPPEN WHEN
-YOU USE THE SHORT FORM, \MUDELA@{ ... @}, CHECK OUT WHY]}
-
-@subsection @code{landscape} package 
-There is some simple support for landscape paper format, and this
-can be combined with the @code{\twocolumn} command. Only a4 and
-letter paper is supported, more to come...
-
-A more complete
-support, maybe also supporting the geometry package is planned, but
-there are more work that has to be done on @command{mudela-book}
-first.
-
-This should work:
-@example
-\documentclass@{article@}
-\usepackage@{landscape@}
-\begin@{document@}
-\twocolumn
-BLA BLA BLA
-\end@{document@}
-@end example
-
-@subsection Examples 
-
-@example
-\begin[26pt]@{mudela@}
-c' d' e' f' g'2 g'2
-\end@{mudela@}
-@end example
-
-produces this music:
-
-@mudela[26pt]
-c' d' e' f' g'2 g'2
-@end mudela
-
-Then the short version:
-@example
-\mudela[11pt]@{<c' e' g'>@}
-@end example
-
-and its music:
-
-@mudela[11pt]{<c' e' g'>}
-
-
-@subsection \begin@{verbatim@} and \verb|\verb| 
-
-There work just as expected. Look at @file{mb-latex.tex} for details.
-
-@section Options
-
-@table @samp
-@item eps
-    the music is created as eps graphics that can be inserted in 
-    the middle of a text line, not only as a separate paragraph.
-    (La@TeX{} only)
-@item verbatim
-    CONTENTS is copied into the source enclosed in a verbatim block,
-    followed by any text given with the @code{intertext} option, then
-    the actual music is displayed. This option does not work with
-    the short version of the mudela blocks:
-
-    @code{ @@mudela@{ CONTENTS @} } and @code{ \mudela@{ CONTENTS @} }
-    
-@item intertext="text inside apostrophs"
-    Used in conjunction with @code{verbatim} option.
-@item filename=FILENAME
-    Save the mudela code to FILENAME instead of using a hash value
-    of CONTENTS.
-@item 11pt, 13pt, 16pt, 20pt, 26pt
-    set the fontsize to use for the music
-@item singleline
-  linewidth = -1.
-@item multiline
-  linewidth = textwidth
-@item fragment
-@item nonfragment
-    Override @command{mudela-book} autodetection of what type of code is in the
-    mudela block, voice contents or complete code.
-@end table
-
-@section Invocation
-
-When you run @command{mudela-book} it will generate lots of small
-files that Lilypond will process. So to avoid all the garbage in
-your source directory, you should either change to a temporary
-directory, or use the @code{--outdir} commandline options:
-
-@code{cd out && mudela-book ../yourfile.tex}
-
-@code{mudela-book --outdir=out yourfile.tex}
-
-
-For latex input, the file to give to latex has ext @file{.latex}.
-TeXinfo input will be written to a file with ext @file{.texi}. So be
-careful, don't give the source file that ext, or the file will be
-overwritten.
-
-If you use @code{--outdir}, you should also @code{cd} to that directory
-before running LaTeX or makeinfo.
-
-@strong{[UGH: IS THIS THE BEST WAY TO DO IT. MAYBE ADD A COMMENT LINE TO THE
-GENERATED FILE, SO MUDELA-BOOK CAN TEST IF THE FILE IT IS TO OVERWRITE
-IS GENERATED.]}
-
-@strong{About the input}
-
-If the file contains the ``block''
-
-@example 
-
-        \begin@{mudela@}
-        CONTENTS
-        \end@{mudela@}
-@end example 
-
-then LilyPond is run on CONTENTS.  @command{mudela-book} puts the result back,
-surrounded by @code{\preMudelaExample} and @code{\postMudelaExample}
-commands. @code{\preMudelaExample} and @code{posMudelaExample} is
-defined to nothing by default, and the user can redefine them
-to whatever he wants.
-
-
-@subsection Command line options
-
-@table @samp
-
-@item @option{-f}, @option{--format=}
-    Specify the document type to process, @code{latex} or @code{texi}.
-    @command{mudela-book} usually figure out this automatically.
-@item --default-music-fontsize=??pt
-    Set the fontsize to use for mudela if no fontsize is given
-    as option.
-@item --force-music-fontsize=??pt
-    Force all mudela to use this fontsize, overriding options
-    given to \begin@{mudela@}
-@item -I DIR, --include=DIR
-    include path
-@item -M, --dependencies
-        Write dependencies to out-www/filename.dep
-@item --dep-prefix=PREF
-       prepend PREF before each -M dependency
-@item -n, --no-lily
-       don't run lilypond
-@item --no-pictures
-       don't generate pictures
-@item --read-lys
-       don't write ly files. This way you can do
-       @example
-       mudela-book file.tely
-       convert-mudela
-       mudela-book --read-lys
-       @end example
-@item --outname=FILE
-    The name of La@TeX{} file to output. If this option  is not given,
-    the output name derived from the input name.
-@item --outdir=
-       where to place generated files
-@item --version
-       print version information
-@item --help
-       Print a short help message
-@end table
-
-
-
-@command{mudela-book} is written in python 1.5, so you have to install
-@uref{http://www.python.org,python}.
-
-
-
-@section Bugs
-  
-The La@TeX{} \includeonly@{...@} command is ignored.
-
-Ignores almost all La@TeX{} commands that changes margins and linewidths.
-
-@section Authors
-
-@email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}, @uref{http://www.cs.uu.nl/people/hanwen}
-
-@email{tca@@gnu.org, Tom Cato Amundsen}
-
-@bye
-@ignore
-
-So what does this look like? Well, here is an example:
-@mudela[veryverbatim, intertext="produces this music:"]
-\score{
-  \notes\relative c'{
-    \time 5/8;
-    [e16( g b c a g][e a b d] | )e2 d,8 |
-    [e16( g b c a g][e a b d] | )b2 [a16( f] |
-    [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] |
-    [f( a b d b a][f a b d] | )e2
-  }
-}
-@end mudela
-If you are lucky, the above example show a nice feature of LilyPond
-and La@TeX{}. Since LilyPond can output the music as @TeX{} graphics,
-La@TeX{} can insert pagebreaks between the lines of music.
-
-Notice that there is no @code{\paper} statement in the example
-above. Mudela-book will insert some code for you that defines the
-linewidth and the font to use. If you don't want to change the default, 
-there is no need to put an empty @code{\paper@{@}} inside the @code{\score}.
-In the example above, something like
-this might be inserted before your code:
-@example
-\include "paper16.ly"
-\paper@{ \paper_sixteen
-    linewidth = 390.\pt;
-    castingalgorithm = \Gourlay;
-@}
-@end example
-The actual values for linewidth will differ depending on papersize and
-number of columns. Also, if you use a different fontsize for the
-music, another file than @code{paper16.ly} will be included.
-
-If you want to make the music not so wide, you can insert a
-@code{\paper} statement that set the linewidth:
-
-@mudela[veryverbatim, intertext="produces this music:"]
-\score{
-  \notes\relative c'{
-    \time 5/8;
-    [e16( g b c a g][e a b d] | )e2 d,8 |
-    [e16( g b c a g][e a b d] | )b2 [a16( f] |
-    [e a b d] )e4 c8 | [es16( bes a as g es][d c b! )g] |
-    [f( a b d b a][f a b d] | )e2
-  }
-  \paper{linewidth = 10.\cm;}
-}
-@end mudela
-
-Very often, if you mix music and text, the music is often only a 
-few notes or at most a few bars. This music should be as short as
-possible and not stretched to be aligned to the right margin.
-
-If you only write voice-contents in the mudela block, @command{mudela-book}
-will set the @code{linewidth} variable to -1, so Lilypond
-will make the music as short as possible but without breaking the
-line. Here is a well know harmonic progression:
-@mudela[veryverbatim, intertext="produce a well known harmonic progression:"]
-  \context Voice { <c' e g> <b d g> <c2 e g> }
-@end mudela
-
-If you want to place music examples in the text,
-@mudela[eps]
-\context Voice {  <c' e g> <b d g> <c2 e g>}
-@end mudela
-, you can use the @code{eps} option. This will create the music as
-eps graphics and include it into the document with the 
-@code{\includegraphics} command.
-
-The code used look like this:
-@example
-@@mudela[eps]
- \context Voice { <c' e g> <b d g> <c2 e g> }
-@@end mudela
-@end example
-
-You can also use the @code{eps} option if the block is a complete
-mudela source. This 5 cm long empty line, 
-@mudela[eps]
-\score{
-  \notes{s}
-  \paper{ linewidth = 5.\cm;}
-}
-@end mudela
-was created with this code:
-@example
-@@mudela[eps]
-\score@{
-  \notes@{s@}
-  \paper@{ linewidth = 5.\cm;@}
-@}
-@@end mudela
-@end example
-
-To avoid that La@TeX{} places the music on a line of its one, there should
-be no empty lines between the normal text and the mudela
-environment. 
-
-You can also use @code{mudelafile} (on a separate line, FIXME), to
-include another file.
-
-@section Fontsize options You can use all lilypond fontsizes in
-@command{mudela-book}.  The default 16pt fontsize is probably to big to be
-included in the middle of the text, 11pt or 13pt is probably better.
-
-The code can look like this:
-@example
-@@mudela[13pt, eps]
-<c' e g>
-@@end mudela
-@end example
-
-The following options set the fontsize:
-@itemize
-@item @code{11pt}
-@mudela[11pt, eps]
-  \relative c'{
-    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
-    [d16 g, a b][c a b g][d'8 g f-\prall g]
-  }
-@end mudela
-@item @code{13pt}
-@mudela[13pt, eps]
-  \relative c'{
-    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
-    [d16 g, a b][c a b g][d'8 g f-\prall g]
-  }
-@end mudela
-@item @code{16pt}
-@mudela[16pt, eps]
-  \relative c'{
-    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
-    [d16 g, a b][c a b g][d'8 g f-\prall g]
-  }
-@end mudela
-@item @code{20pt}
-@mudela[20pt, eps]
-  \relative c'{
-    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
-    [d16 g, a b][c a b g][d'8 g f-\prall g]
-  }
-@end mudela
-@item @code{26pt}
-@mudela[26pt, eps]
-  \relative c'{
-    r16 [c d e][f d e c] [g'8 c][b-\prall c] |
-    [d16 g, a b][c a b g][d'8 g f-\prall g]
-  }
-@end mudela
-@end itemize
-
-
-@section More options
-@itemize
-@item The @code{singleline} option set @code{linewidth} to -1.0.
-@item The @code{multiline} option set @code{linewidth} to a value letting
-the music be aligned to the right margin. The music can span several
-lines. 
-@end itemize
-
-@section Just in case...
-The options @code{fragment} and @code{nonfragment} will override
-@command{mudela-book} when it scans the mudela code to see if it is voice
-contents or complete code. This might be useful if @command{mudela-book} choose
-wrong. 
-
-Since there is no finder's fee which doubles every year, there is no
-need to wait for the price money to grow. So send a bug report today
-if you need this one of these options.
-
-@section Examples
-
-This was all options to @code{\begin}. The rest of the mudela
-document will show some ways you can use mudela in
-La@TeX{} documents. It will also act as a simple test-suite for
-mudela-book. You can place @code{eps} mudela in and marginspars just
-as any other included eps graphics.
-
-@mudela
-\score{
-  \notes\relative c'{ 
-        \time 12/8;  
-        r4-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
-        [f16-.( )f-. dis8-- gis16-.( )gis-.] cis4.-\fermata |
-        
-        r4.-\fermata [cis,16 cis g'8 f16 f b8][g16 g f8 b16 b] dis4.-\fermata
-  }
-  \paper{linewidth = 7.\cm;}
-}
-@end mudela
-
-
-To the right you can see some bars from the trumpet fanfara from the
-beginning of the fantastic street opera ``Houdini the Great'', by the
-Danish composer Andy Pape. The music is put inside a
-@code{floatingfigure} environment, and the music will be aligned by
-the right marging if you set floatingfigure width and mudela linewidth
-to the same value. The code looks like this:
-
-@mudela[verbatim]
-\score{
-  \notes\relative c'{ 
-    \time 12/8;  
-    r4.-\fermata [b16-.( )b-.] [f'8-- dis16-.( )dis-. gis8--]
-    [f16-.( )f-. dis8-- gis16-.( )gis-.] cis8.-\fermata |
-        
-    r4.-\fermata [cis,16 cis g'8 f16 f b8]
-    [g16 g f8 b16 b] dis4.-\fermata
-  }
-  \paper{linewidth = 7.\cm;}
-}
-@end mudela
-
-If you have a lot of small music examples like this in the middle of
-your text, you might get a nicer look by using ``double'' line
-spacing. Put the @code{\linespread@{1.6@}} command into the preamble of
-your document. Then the line spacing will not be increased between the
-lines where you have music printed with the smallest font size.
-
-Mudela-book does know about @code{\onecolumn} and @code{\twocolumn}. 
-So the music will be adjusted to the new linewith:
-
-Verbatim environments will also ignore the page margins. That is
-a feature of La@TeX{}. (But you usually put things inside a verbatim
-environment when you don't want La@TeX{} to do any linebreaking)
-
-@end ignore
index 6f7adf1c022f7813917a5372e2e20b572fbbc083..3689d3e7d9777b50299640c9abec85c9c48e06d0 100644 (file)
@@ -22,11 +22,11 @@ property is listed in parentheses after the property name.
     Currently, the standard layout @code{""} and mensural notation
     @code{"mensural"} are available. Mensural rests of duration
     32 or shorter are not available.
-@mudela[verbatim]
+@lilypond[verbatim]
 r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 
 \property Staff.restStyle = "mensural"
 r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128 
-@end mudela
+@end lilypond
 
   @item @code{transposing}@indexcode{transposing} @propertytype{integer}
     Transpose the MIDI output.  Set this property to the number of
@@ -90,7 +90,7 @@ r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
     The different time signature characters are shown below with its
     names:
 
-@mudela[center,verbatim]
+@lilypond[center,verbatim]
 
       \score {
         \notes\relative c'' {
@@ -125,7 +125,7 @@ r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 r128
         }
       }
     
-@end mudela
+@end lilypond
 
 
 @end table
index 77f40dfcd7a5c318ffd1c2db4dbb0e30c0649ece..174e2d22177001851907c4488a40f6f3134422a2 100644 (file)
 @section Overview
 
 This document@footnote{This document has been revised for
-LilyPond 1.2.} describes the the GNU LilyPond input format, which is
-a language for defining music.  We call this language @emph{Music
-Definition Language} or @emph{Mudela}, for short.@footnote{If anybody
-comes up with a better name, we'd gladly take this.  Gourlay already
-uses a ``Musical Description Language,'' ISO standard 10743 defines a
-``Standard Music Description Language.''  We're not being original
-here.}
+LilyPond 1.2.} describes the the GNU LilyPond input format
 
-@emph{Mudela} is a language that allows you to
+with @emph{Lilypond}-input you can
 
 @itemize @bullet
   @item  create musical expressions by combining pitches, durations 
@@ -69,7 +63,7 @@ here.}
        you can enter them in manageable chunks.
 @end itemize
 
-@emph{Mudela} aims to define a piece of music completely, both from
+@emph{Lilypond} input aims to define a piece of music completely, both from
 typesetting and from a performance point of view.
 
 
@@ -302,7 +296,7 @@ filename including the @file{.ly} extension must be given,
 Specify the version of LilyPond that a file was written for.  The
 argument is a version string in quotes, for example @code{"1.2.0"}. 
 This is used to detect invalid input, and to aid
-@code{convert-mudela}, a tool that automatically upgrades input files.
+@code{convert-ly}, a tool that automatically upgrades input files.
 
 
 
@@ -338,7 +332,7 @@ subsection XREF-notenames [FIXME].
 
 @node modes, , ,  Reference Manual
 
-To simplify entering notes, lyrics, and chords, @emph{Mudela} has three
+To simplify entering notes, lyrics, and chords, @emph{Lilypond} has three
 special input modes on top of the default mode.  In each mode, words
 are identified on the input.  If @code{"word"} is encountered, it is
 treated as a string.  If @code{\word} is encountered, it is treated as
@@ -350,7 +344,7 @@ different modes have different rules for deciding what is a word.
   @item Normal mode.
 @cindex mode!normal
  
-    At the start of parsing, @emph{Mudela} is in Normal mode.  In Normal
+    At the start of parsing, @emph{Lilypond} is in Normal mode.  In Normal
     mode, a word is an alphabetic character followed by alphanumeric
     characters.  If @code{word} is encountered on the input it is
     treated as a string.
@@ -438,7 +432,7 @@ versions, thus the use of the dollar sign is discouraged.}
 
 @cindex types and identifiers
 
-@emph{Mudela} has a limited set of types:
+@emph{Lilypond} has a limited set of types:
 
 @itemize @bullet
   @item  integers
@@ -455,7 +449,7 @@ versions, thus the use of the dollar sign is discouraged.}
   @item  score definitions (@code{\score}@keyindex{score} blocks)
 @end itemize
 
-Type is a syntactical property: @emph{Mudela} has no real type system,
+Type is a syntactical property: @emph{Lilypond} has no real type system,
 so there is no support for generic expressions, functions, or user
 defined types.  For the same reason, it is not possible to mix reals
 and integers in arithmetic expressions, and ``type
@@ -469,7 +463,7 @@ Identifiers allow objects to be assigned to names.  To assign an
 identifier, you use `@var{name}=@var{value}' and to refer to an
 identifier, you preceed its name with a backslash:
 `@code{\}@var{name}'.  Identifier assignments must appear at top level
-in the @emph{Mudela} file.  Semicolons are forbidden after assignments
+in the @emph{Lilypond} file.  Semicolons are forbidden after assignments
 appearing at top level but they are obligatory after assignments
 appearing in the @code{\paper} block, see Section XREF-paper [FIXME].
 
@@ -505,7 +499,7 @@ reference to the first identifier useless.}
 
 @cindex music expressions
 
-Music in @emph{Mudela} is entered as a music expression.  Notes, rests,
+Music in @emph{Lilypond} is entered as a music expression.  Notes, rests,
 lyric syllables are music expressions (the atomic
 expressions)
 @cindex atomic music expressions
@@ -606,25 +600,25 @@ single quote (`@code{'}@indexcode{'}') characters or a series of comma
 (`@code{,}@indexcode{,}') characters.  Each @code{'} raises the pitch by one
 octave; each @code{,} lowers the pitch by an octave.
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   c' d' e' f' g' a' b' c''
-@end mudela
+@end lilypond
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   cis' dis' eis' fis' gis' ais' bis'
-@end mudela
+@end lilypond
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   ces' des' es' fes' ges' as' bes'
-@end mudela
+@end lilypond
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   cisis' eisis' gisis' aisis' beses'
-@end mudela
+@end lilypond
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   ceses' eses' geses' ases' beses'
-@end mudela
+@end lilypond
 
 Whenever a C-sharp is desired,  you must specify a C-sharp.  LilyPond
 will determine what accidentals to typeset depending on the key and
@@ -638,9 +632,9 @@ cautionary accidental,
 accidental within parentheses can be obtained by adding the question
 mark `@code{?}@indexcode{?}' after the pitch.
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   cis' d' e' cis'  c'? d' e' c'!
-@end mudela
+@end lilypond
 
 
 @cindex duration
@@ -659,7 +653,7 @@ c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
 
 @quotation
 
-@mudela[]
+@lilypond[]
 \score {
   \notes \relative c'' {
     a\longa a\breve  
@@ -673,7 +667,7 @@ c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
     } %}
   }
 }
-@end mudela
+@end lilypond
 @end quotation
 
 @quotation
@@ -687,7 +681,7 @@ r1 r2 r4 r8 r16 r32 r64 r64
 
 @quotation
 
-@mudela[]
+@lilypond[]
 \score {
   \notes \relative c'' {
     r\longa r\breve  
@@ -704,7 +698,7 @@ r1 r2 r4 r8 r16 r32 r64 r64
     }
   }
 }
-@end mudela
+@end lilypond
 @end quotation
 
 If the duration is omitted then it is set equal to the previous
@@ -712,9 +706,9 @@ duration.  If there is no previous duration, a quarter note is
 assumed.  The duration can be followed by a dot (`@code{.}@indexcode{.}')
 to obtain dotted note lengths.
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   a'4. b'4.
-@end mudela
+@end lilypond
 
 You can alter the length of duration by writing
 `@code{*}@var{fraction}' after it.  This will not affect the
@@ -791,13 +785,13 @@ formatting, this is the feature to use. The downside to this is that
 you need to know exactly how the backend works. Example:
 
 
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
 \relative c'' { c4
        \context Staff \outputproperty
                #(make-type-checker 'Note_head)
                #'extra-offset = #'(5.0 . 7.5)
 <c8 e g> }
-@end mudela
+@end lilypond
 
 This selects all note heads occurring at current staff level, and sets
 the extra-offset of those heads to (5,7.5), shifting them up and
@@ -962,7 +956,7 @@ clef:
 
 @quotation
 
-@mudela[]
+@lilypond[]
 \score {
   \notes {
     \cadenzaOn
@@ -978,12 +972,12 @@ clef:
     linewidth = -1.0;
   }
 }
-@end mudela
+@end lilypond
 @end quotation
 
 @quotation
 
-@mudela[]
+@lilypond[]
 \score {
   \notes {
        \cadenzaOn
@@ -997,7 +991,7 @@ clef:
     linewidth = 4.5 \in;
   }
 }
-@end mudela
+@end lilypond
 @end quotation
 
 The three clef symbols can also be obtained using the names `@code{G}', 
@@ -1023,16 +1017,16 @@ this has the same effect as the space rest `@code{s}'.
 A beam is specified by surrounding the beamed notes with brackets
 `@code{[}@indexcode{[}' and `@code{]}@indexcode{]}'.  
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   [a'8 a'] [a'16 a' a' a']
-@end mudela
+@end lilypond
 
 Some more elaborate constructions:
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   [a'16 <a' c''> c'' <a' c''>]
   \times 2/3 { [e'8 f' g'] }
-@end mudela
+@end lilypond
 
 Beaming can be generated automatically; see section XREF-autobeam [FIXME].
 
@@ -1046,14 +1040,14 @@ style.
 XREF-tremolo [FIXME]).
   
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   \repeat "tremolo" 8 { c16 d16 }
   \repeat "tremolo" 4 { c16 d16 }    
-@end mudela
+@end lilypond
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   c'4:32
-@end mudela
+@end lilypond
 
 
 @cindex --@@@code{-}@code{-}
@@ -1078,9 +1072,9 @@ Ties are indicated using the tilde symbol `@code{~}@indexcode{~}'.
 If you try to tie together chords which have no common pitches, a
 warning message will appear and no ties will be created.
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   e' ~ e' <c' e' g'> ~ <c' e' g'>
-@end mudela
+@end lilypond
 
 
 
@@ -1102,7 +1096,7 @@ forced to appear above or below the note by writing
 respectively.  Here is a chart showing symbols above notes, with the
 name of the corresponding symbol appearing underneath.
 
-@mudela[]
+@lilypond[]
 
   \score {
     < \notes {
@@ -1130,7 +1124,7 @@ name of the corresponding symbol appearing underneath.
     }
   }
 
-@end mudela
+@end lilypond
 
 In addition, it is possible to place arbitrary strings of text or
 @TeX{} above or below notes by using a string instead of an
@@ -1145,7 +1139,7 @@ To save typing, fingering instructions (digits 0 to 9 are
 supported) and single characters shorthands exist for a few
 common symbols
 
-@mudela[]
+@lilypond[]
 
   \score {
     \notes {
@@ -1167,7 +1161,7 @@ common symbols
     }
   }
 
-@end mudela
+@end lilypond
 
 Dynamic marks are specified by using an identifier after a note:
 `@code{c4-\ff}' (the dash is optional for dynamics: `@code{c4 \ff})'.  
@@ -1230,9 +1224,9 @@ the slur.  The terminal `@code{)}' appears to the left of the
 first note in the slur.  This makes it possible to put a note in
 slurs from both sides:
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   f'()g'()a' [a'8 b'(] a'4 g'2 )f'4
-@end mudela
+@end lilypond
 
 
 @cindex crescendo
@@ -1249,10 +1243,10 @@ and @code{\rced} go after the last note.  Because these marks are
 bound to notes, if you want to get several marks during one note, you
 must use spacer notes.
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   c'' \< \! c''   d'' \decr e'' \rced 
   < f''1 { s4 \< \! s2 \> \! s4 } >
-@end mudela
+@end lilypond
 
 
 @example
@@ -1270,10 +1264,10 @@ use the shorthands which are defined in the initialization file
 
 You can attach a (general) span request to a note using
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   c'4-\spanrequest \start "slur"
   c'4-\spanrequest \stop "slur"
-@end mudela
+@end lilypond
 
 The slur syntax with parentheses is a shorthand for this.
 
@@ -1290,9 +1284,9 @@ the note stem.  If the length is omitted, then the last value is
 used, or the value of the @code{tremoloFlags}@indexcode{tremoloFlags} property if there was
 no last value.
 
-@mudela[verbatim,fragment,center]
+@lilypond[verbatim,fragment,center]
   c'2:8 c':32
-@end mudela
+@end lilypond
 
 
 
@@ -1305,13 +1299,13 @@ Music expressions are compound data structures.  You can nest music
 expressions any way you like.  This simple example shows how three
 chords can be expressed in two different ways:
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   \notes \context Staff {
     \cadenzaOn
     <a c'> <b  d' > <c' e'>
     < { a b  c' } { c' d' e' } >
   }
-@end mudela
+@end lilypond
 
 @cindex context selection
 @c @keyindex{context}
@@ -1390,28 +1384,28 @@ elements.  The following shorthand is a common idiom:
 If you try to use a chord as the first thing in your score, you might
 get multiple staffs instead of a chord.
 
-@mudela[verbatim,center]
+@lilypond[verbatim,center]
   \score {
     \notes <c''4 e''>
     \paper {
       linewidth = -1.;
     }
   }
-@end mudela
+@end lilypond
 
 This happens because the chord is interpreted by a score context.
 Each time a note is encountered a default Voice context (along with a
 Staff context) is created.  The solution is to explicitly instantiate
 a Voice context:
 
-@mudela[verbatim,center]
+@lilypond[verbatim,center]
   \score {
     \notes\context Voice <c''4 e''>
     \paper {
       linewidth = -1.;
     }
   }
-@end mudela
+@end lilypond
 
 
 
@@ -1441,31 +1435,31 @@ specified that will act as the predecessor of the first note of
 
 Entering scales is straightforward in relative mode.
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   \relative c' {
     c d e f g a b c c,
   }
-@end mudela
+@end lilypond
 
 And octave changing marks are used for intervals greater than a fourth.
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   \relative c'' {
     c g c f, c' a, e'' }
-@end mudela
+@end lilypond
 
 If the preceding item is a chord, the first note of the chord is used
 to determine the first note of the next chord.  But other notes
 within the second chord are determined by looking at the immediately
 preceding note.
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   \relative c' {
     c <c e g> 
     <c' e g>
     <c, e' g>
   }
-@end mudela 
+@end lilypond 
 
 The pitch after the @code{\relative} contains a notename.  To parse
 the pitch as a notename, you have to be in note mode, so there must
@@ -1503,7 +1497,7 @@ must be separated by a dot (`@code{.}').
 
 @quotation
 
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
 \transpose c'' {
   \chords {
     c1  c:3-       c:7     c:8
@@ -1511,7 +1505,7 @@ must be separated by a dot (`@code{.}').
   }
 }
 
-@end mudela
+@end lilypond
 @end quotation
 
 The second type of modifier that may appear after the `@code{:}' is a
@@ -1524,14 +1518,14 @@ which replaces the 5th with a 4th.
 
 @quotation
 
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
 \transpose c'' {
   \chords {
     c1:m c:min7 c:maj c:aug c:dim c:sus
   }
 }
 
-@end mudela
+@end lilypond
 @end quotation
  
 
@@ -1539,13 +1533,13 @@ Chord subtractions are used to eliminate notes from a chord.  The
 notes to be subtracted are listed after a `@code{^}' character,
 separated by dots.
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   \transpose c'' {
     \chords {
       c1^3 c:7^5.3 c:8^7
     }
   }
-@end mudela 
+@end lilypond 
 
 Chord inversions can be specified by appending `@code{/}@indexcode{/}' and
 the name of a single note to a chord.  This has the effect of
@@ -1553,28 +1547,28 @@ lowering the specified note by an octave so it becomes the lowest
 note in the chord.  If the specified note is not in the chord, a
 warning will be printed.
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   \transpose c''' {
     \chords {
       c1 c/e c/g c:7/e
     }
   }
 
-@end mudela 
+@end lilypond 
 
 Bass notes can be added by `@code{/+}@indexcode{/+}' and
 the name of a single note to a chord.  This has the effect of
 adding the specified note to the chord, lowered by an octave,
 so it becomes the lowest note in the chord.
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   \transpose c''' {
     \chords {
       c1 c/+c c/+g c:7/+b
     }
   }
 
-@end mudela 
+@end lilypond 
 
 Throughout these examples, chords have been shifted around the staff
 using @code{\transpose}.
@@ -1599,9 +1593,9 @@ optionally with a bracket.  The most common tuplet is the triplet in
 which 3 notes have the length of 2, so the notes are 2/3 of
 their written length:
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   g'4 \times 2/3 {c'4 c' c'} d'4 d'4
-@end mudela
+@end lilypond
 
 
 
@@ -1630,13 +1624,13 @@ stem.  This behavior can be controlled with the
 
 @quotation
 
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
 \relative c'' {
   \grace c8 c4 \grace { [c16 c16] } c4
   \grace { \property Grace.flagStyle = "" c16 } c4
 }
 
-@end mudela
+@end lilypond
 @end quotation
 
 At present, nesting @code{\grace}@keyindex{grace} notes, e.g.
@@ -1701,24 +1695,24 @@ Normal notation repeats are used like this:
 
 @quotation
 
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
   c'1
   \repeat volta 2 { c'4 d' e' f' }
   \repeat volta 2 { f' e' d' c' }
 
-@end mudela
+@end lilypond
 @end quotation
 
 With alternative endings:
 
 @quotation
 
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
   c'1
   \repeat volta 2 {c'4 d' e' f'} 
   \alternative { {d'2 d'} {f' f} }
 
-@end mudela
+@end lilypond
 @end quotation
 
 Folded repeats look like this:@footnote{Folded repeats offer little
@@ -1728,17 +1722,17 @@ implemented.}
 
 @quotation
 
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
   c'1
   \repeat fold 2 {c'4 d' e' f'} 
   \alternative { {d'2 d'} {f' f} }
 
-@end mudela
+@end lilypond
 @end quotation
 
 @quotation
 
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
 \context Staff {
   \relative c' {
     \partial 4;
@@ -1747,7 +1741,7 @@ implemented.}
   }
 }
 
-@end mudela
+@end lilypond
 @end quotation
 
 If you don't give enough alternatives for all of the repeats, then
@@ -1756,7 +1750,7 @@ the specified number of repeats.
 
 @quotation
 
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
 \context Staff {
   \relative c' {
     \repeat volta 3 { \partial 4; e | c2 d2 | e2 f2 | }
@@ -1766,7 +1760,7 @@ the specified number of repeats.
   }
 }
 
-@end mudela
+@end lilypond
 @end quotation
 
 It is possible to nest @code{\repeat}.  This is not entirely
@@ -1797,7 +1791,7 @@ will print flats.
 
 @quotation
 
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
 \context Staff {
   \clef "F";
   { \key e \major; c d e f }
@@ -1806,7 +1800,7 @@ will print flats.
   \transpose cis'' { \key e \major; c d e f }
 }
 
-@end mudela
+@end lilypond
 @end quotation
 
 If you want to use both @code{\transpose} and @code{\relative}, then
@@ -1837,7 +1831,7 @@ notes.
 
 @quotation
 
-@mudela[verbatim,fragment]
+@lilypond[verbatim,fragment]
 \addlyrics
 \transpose c'' {
   \property Voice.automaticMelismata = ##t
@@ -1846,7 +1840,7 @@ notes.
 \context Lyrics \lyrics {
  do4 re mi fa }
 
-@end mudela
+@end lilypond
 @end quotation
 
 You should use a single rhythm melody, and single rhythm lyrics (a
@@ -1855,7 +1849,7 @@ undesired effects when using multiple stanzas:
 
 @quotation
 
-@mudela[verbatim,fragment]
+@lilypond[verbatim,fragment]
 \addlyrics
 \transpose c'' {
   c8 () cis d8. e16 f2
@@ -1864,7 +1858,7 @@ undesired effects when using multiple stanzas:
 < { do4 re mi fa }
   { do8 re mi fa } >
 
-@end mudela
+@end lilypond
 @end quotation
 
 It is valid (but probably not very useful) to use notes instead of
@@ -1973,7 +1967,7 @@ simultaneous music.
 
 @quotation
 
-@mudela[fragment,verbatim]
+@lilypond[fragment,verbatim]
 <
   \context ChordNames {
     \chords{a b c} \notes{<d f g>  <e g b>}
@@ -1983,14 +1977,14 @@ simultaneous music.
   }
 >
 
-@end mudela
+@end lilypond
 @end quotation
 
 LilyPond examines chords specified as lists of notes to determine a
 name to give the chord.  By default, LilyPond will not try to
 identify chord inversions:
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   <
     \context ChordNameVoice \notes {
       <e'1 g' c''>
@@ -1999,12 +1993,12 @@ identify chord inversions:
       <e'1 g' c''>
     }
   >
-@end mudela
+@end lilypond
 
 If you want inversions to be recognized, you must set the property
 @code{ChordNames.chordInversion}@indexcode{ChordNames.chordInversion}:
 
-@mudela[fragment,verbatim,center]
+@lilypond[fragment,verbatim,center]
   <
     \property Score.chordInversion = ##t
     \context ChordNameVoice \notes {
@@ -2014,7 +2008,7 @@ If you want inversions to be recognized, you must set the property
       <e'1 g' c''>
     }
   >
-@end mudela
+@end lilypond
 
 
 
@@ -2033,7 +2027,7 @@ Here is a full example:
 
 @quotation
 
-@mudela[verbatim]
+@lilypond[verbatim]
 \score {
   <
     \notes \transpose c'' {
@@ -2047,7 +2041,7 @@ Here is a full example:
   >
 }
 
-@end mudela
+@end lilypond
 @end quotation
 
 You may want a continuous line after the syllables to show melismata. 
@@ -2059,7 +2053,7 @@ shorten it by using a blank lyric (using `@code{_}').
 
 @quotation
 
-@mudela[verbatim]
+@lilypond[verbatim]
 \score {
   <
     \notes \relative c'' {
@@ -2071,7 +2065,7 @@ shorten it by using a blank lyric (using `@code{_}').
   >
 }
 
-@end mudela
+@end lilypond
 @end quotation
 
      
@@ -2084,7 +2078,7 @@ For example:
 
 @quotation
 
-@mudela[verbatim]
+@lilypond[verbatim]
 \score {
   <
     \notes \transpose c'' {
@@ -2098,7 +2092,7 @@ For example:
   >
 }
 
-@end mudela
+@end lilypond
 @end quotation
 
 
@@ -2170,14 +2164,14 @@ one is created.  For example,
 
 @quotation
 
-@mudela[verbatim]
+@lilypond[verbatim]
 \score {
   \notes \relative c'' {
     c4 <d4 \context Staff = "another" e4> f
   }
 }
 
-@end mudela
+@end lilypond
 @end quotation
 
 In this example, the @code{c} and @code{d} are printed on the
@@ -2217,7 +2211,7 @@ Lastly, you may wonder, why this:
 
 doesn't result in this:
 
-@mudela[]
+@lilypond[]
 
   \score {
     \notes \relative c'' {
@@ -2225,7 +2219,7 @@ doesn't result in this:
     }
   }
 
-@end mudela
+@end lilypond
 
 For the @code{c4}, a default @code{Staff} (with a contained
 @code{Voice}) context is created.  After the @code{c4} ends, no
index 2a6e64e63ab4b80acdf411b6eb4a39609c253d3f..cc4b30e881f399801cd43ffdd9aeb9f6ec69113a 100644 (file)
 LilyPond prints music from a specification that you, the user, supply.
 You have to give that specification using a @emph{language}.  This
 document is a gentle introduction to that language, which is called
-Mudela, an acronym of Music Definition Language.
+Lilypond, an acronym of Music Definition Language.
 
-This tutorial will demonstrate how to use Mudela by presenting
+This tutorial will demonstrate how to use Lilypond by presenting
 examples of input along with resulting output.  We will use English
 terms for notation.  In case you are not familiar with those, you may
 consult the glossary that is distributed with LilyPond.
 
 The examples discussed are included in the distribution, in the
 subdirectory @file{input/tutorial/}.  It is recommended that you
-experiment with writing Mudela input yourself, to get a feel for
+experiment with writing Lilypond input yourself, to get a feel for
 how LilyPond behaves.
 
 @node The first tune,  , , Tutorial
@@ -38,7 +38,7 @@ To demonstrate what LilyPond input looks like, we start off with a
 full fledged, yet simple example. It is a convoluted version
 of the famous menuet in J. S. Bach's @emph{Klavierbuechlein}.
 
-@mudela[verbatim]
+@lilypond[verbatim]
 % lines preceded by a percent are comments which
 % are ignored by Lilypond.
 \include "paper16.ly"
@@ -69,7 +69,7 @@ of the famous menuet in J. S. Bach's @emph{Klavierbuechlein}.
        linewidth = 14.0 \cm;
    }
 }
-@end mudela
+@end lilypond
 
 Enter it (or copy it, the filename is @file{menuet.ly}), compile it
 with LilyPond and view the output.  Details of this procedure may vary
@@ -123,7 +123,7 @@ that size, which is done.
         \score @{
  
 @end example 
-  A mudela file combines music with directions for outputting that
+  A lilypond file combines music with directions for outputting that
 music.  The music is combined with the output directions by putting
 them into a @code{\score} block.
 @example 
@@ -219,7 +219,7 @@ processing the music, LilyPond will verify that bar checks are found at
 the start of a measure.  This can help you track down errors.
 
  So far, no notes were chromatically altered.  Here is the first one
-that is: @code{fis}. Mudela by default uses Dutch note names, and
+that is: @code{fis}. Lilypond by default uses Dutch note names, and
 ``Fis'' is the Dutch note name for ``F sharp''.  However, there is no
 sharp sign in the output. The program keeps track of key signatures,
 and will only print accidentals if they are needed.
@@ -394,7 +394,7 @@ may differ, since the titling in this document is not generated by
 @center @strong{The river is flowing}
 @center Traditional 
 
-@mudela[center]
+@lilypond[center]
 \header {
         title = "The river is flowing";
         composer = "Traditional (?)";
@@ -435,7 +435,7 @@ accompaniment =\chords {
         \midi  { \tempo 4=72;}
         \paper { linewidth = 10.0\cm; }
 }
-@end mudela
+@end lilypond
 
 Again, we will dissect the file line by line.
 @example 
@@ -706,7 +706,7 @@ Our third 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. 
 
-@mudela[verbatim]
+@lilypond[verbatim]
 
 \version "1.3.60";
 \include "paper16.ly";
@@ -766,7 +766,7 @@ bassvoices = \notes \relative c' {
           indent = 0.0;
           linewidth = 15.0 \cm; }
 }
-@end mudela
+@end lilypond
 
 If it looks like incomprehensible gibberish to you@dots{} Then you are
 right.  The author has doctored this example to have as many quirks in
@@ -774,10 +774,10 @@ one system as possible.
 @example 
 \version "1.3.61";
 @end example 
-Lilypond and the Mudela language is still under development, therefore
+Lilypond and the Lilypond language is still under development, therefore
 it is useful to indicate the Lilypond version of the file. Lilypond 
 will check the version number and warn you when the syntax has
-changed. Also, the @code{convert-mudela} program will be able to 
+changed. Also, the @code{convert-ly} program will be able to 
 update most of the syntax changes automatically.
 @example 
 viola = \notes \relative c'  \context Voice = viola @{ 
index cf0e511331e8e1ce4525bea0c0ce2e0e41a7b681..9a95ed6b0d5d048eda106932abccb3a2bb0569d5 100644 (file)
@@ -165,14 +165,16 @@ Configuring and compiling
        /usr/local/man/man1/midi2ly.1
        /usr/local/man/man1/abc2ly.1
        /usr/local/man/man1/etf2ly.1
-       /usr/local/man/man1/convert-mudela.1
-       /usr/local/man/man1/mudela-book.1
+       /usr/local/man/man1/convert-ly.1
+       /usr/local/man/man1/lilypond-book.1
        /usr/local/man/man1/lilypond.1
        /usr/local/bin/lilypond
        /usr/local/bin/midi2ly
-       /usr/local/bin/convert-mudela
-       /usr/local/bin/mudela-book
+       /usr/local/bin/convert-ly
+       /usr/local/bin/lilypond-book
        /usr/local/bin/abc2ly
+       /usr/local/bin/pmx2ly
+       /usr/local/bin/musedata2ly
        /usr/local/bin/etf2ly
        /usr/local/share/lilypond/*
        /usr/local/share/locale/{....}/LC_MESSAGES/lilypond.mo
diff --git a/VERSION b/VERSION
index d004ba8d7ba0e4988e0337741cdf5f63bc0f1bb7..6ecffd3ce9b7ac7e571a43d3d9df3c87e812fbae 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=106
-MY_PATCH_LEVEL=jcn2
+PATCH_LEVEL=107
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index c79aba8915fd446f896a8618c81facfdbda4b498..1b953cd7cb38db0c787b831b1d1652f6e44df29e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1501,10 +1501,11 @@ fi
     
     
     
+    
 
 # AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h)
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1508: checking how to run the C preprocessor" >&5
+echo "configure:1509: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1519,13 +1520,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1523 "configure"
+#line 1524 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1536,13 +1537,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1540 "configure"
+#line 1541 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1553,13 +1554,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1557 "configure"
+#line 1558 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1587,17 +1588,17 @@ for ac_hdr in assert.h sys/stat.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1591: checking for $ac_hdr" >&5
+echo "configure:1592: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1596 "configure"
+#line 1597 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1624,12 +1625,12 @@ fi
 done
 
 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:1628: checking whether stat file-mode macros are broken" >&5
+echo "configure:1629: checking whether stat file-mode macros are broken" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1633 "configure"
+#line 1634 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -1690,7 +1691,7 @@ fi
 
 
 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1694: checking how to run the C++ preprocessor" >&5
+echo "configure:1695: checking how to run the C++ preprocessor" >&5
 if test -z "$CXXCPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1703,12 +1704,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
 cross_compiling=$ac_cv_prog_cxx_cross
   CXXCPP="${CXX-g++} -E"
   cat > conftest.$ac_ext <<EOF
-#line 1707 "configure"
+#line 1708 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1745,7 +1746,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1749: checking for $ac_word" >&5
+echo "configure:1750: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1777,7 +1778,7 @@ test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1781: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1782: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
 ac_ext=C
 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1788,12 +1789,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1792 "configure"
+#line 1793 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cxx_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1819,12 +1820,12 @@ if test $ac_cv_prog_cxx_works = no; then
   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1823: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1824: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 cross_compiling=$ac_cv_prog_cxx_cross
 
 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1828: checking whether we are using GNU C++" >&5
+echo "configure:1829: checking whether we are using GNU C++" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1833,7 +1834,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gxx=yes
 else
   ac_cv_prog_gxx=no
@@ -1852,7 +1853,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
 ac_save_CXXFLAGS="$CXXFLAGS"
 CXXFLAGS=
 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1856: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1857: checking whether ${CXX-g++} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1886,17 +1887,17 @@ fi
 
     ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:1890: checking for FlexLexer.h" >&5
+echo "configure:1891: checking for FlexLexer.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1895 "configure"
+#line 1896 "configure"
 #include "confdefs.h"
 #include <FlexLexer.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1947,12 +1948,12 @@ fi
 
 
     echo $ac_n "checking whether explicit instantiation is needed""... $ac_c" 1>&6
-echo "configure:1951: checking whether explicit instantiation is needed" >&5
+echo "configure:1952: checking whether explicit instantiation is needed" >&5
 if eval "test \"`echo '$''{'lily_cv_need_explicit_instantiation'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1956 "configure"
+#line 1957 "configure"
 #include "confdefs.h"
 
     template <class T> struct foo { static int baz; };
@@ -1962,7 +1963,7 @@ int main() {
  return foo<int>::baz; 
 ; return 0; }
 EOF
-if { (eval echo configure:1966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   lily_cv_need_explicit_instantiation=no
 else
@@ -1989,7 +1990,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1993: checking for $ac_word" >&5
+echo "configure:1994: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2032,7 +2033,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2036: checking for $ac_word" >&5
+echo "configure:2037: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2067,7 +2068,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2071: checking for $ac_word" >&5
+echo "configure:2072: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2135,7 +2136,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2139: checking for $ac_word" >&5
+echo "configure:2140: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2168,7 +2169,7 @@ test -n "$AR" || AR="error"
     # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2172: checking for $ac_word" >&5
+echo "configure:2173: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2224,7 +2225,7 @@ fi
 
 
     echo $ac_n "checking language""... $ac_c" 1>&6
-echo "configure:2228: checking language" >&5    
+echo "configure:2229: checking language" >&5    
     case "$language" in
       En* | en* | Am* | am* | US* | us*)
            lang=English;;
@@ -2260,7 +2261,7 @@ EOF
 
 
     echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
-echo "configure:2264: checking for gettext in -lintl" >&5
+echo "configure:2265: checking for gettext in -lintl" >&5
 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2268,7 +2269,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lintl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2272 "configure"
+#line 2273 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2282,7 +2283,7 @@ int main() {
 gettext()
 ; return 0; }
 EOF
-if { (eval echo configure:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2312,12 +2313,12 @@ fi
     for ac_func in gettext
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2316: checking for $ac_func" >&5
+echo "configure:2317: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2321 "configure"
+#line 2322 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2343,7 +2344,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2375,7 +2376,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2379: checking for $ac_word" >&5
+echo "configure:2380: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2406,7 +2407,7 @@ done
 test -n "$MSGFMT" || MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh "
 
     echo $ac_n "checking whether msgfmt accepts -o""... $ac_c" 1>&6
-echo "configure:2410: checking whether msgfmt accepts -o" >&5
+echo "configure:2411: checking whether msgfmt accepts -o" >&5
     msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
     if test "$msgfmt_output" = ""; then
        echo "$ac_t""yes" 1>&6
@@ -2434,7 +2435,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2438: checking for $ac_word" >&5
+echo "configure:2439: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_METAFONT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2470,7 +2471,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2474: checking for $ac_word" >&5
+echo "configure:2475: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MFONT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2508,7 +2509,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2512: checking for $ac_word" >&5
+echo "configure:2513: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_METAPOST'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2544,7 +2545,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2548: checking for $ac_word" >&5
+echo "configure:2549: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MPOST'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2583,7 +2584,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2587: checking for $ac_word" >&5
+echo "configure:2588: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_INIMETAFONT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2619,7 +2620,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2623: checking for $ac_word" >&5
+echo "configure:2624: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_INIMFONT'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2657,7 +2658,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2661: checking for $ac_word" >&5
+echo "configure:2662: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_INIMETAPOST'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2693,7 +2694,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2697: checking for $ac_word" >&5
+echo "configure:2698: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_INIMPOST'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2727,7 +2728,7 @@ test -n "$INIMPOST" || INIMPOST="-echo no inimp or inimpost"
     fi
 
     echo $ac_n "checking for working metafont mode""... $ac_c" 1>&6
-echo "configure:2731: checking for working metafont mode" >&5
+echo "configure:2732: checking for working metafont mode" >&5
     modelist='ljfour lj4 lj3 lj2 ljet laserjet'
     for MFMODE in $modelist; do
        $METAFONT "\mode:=$MFMODE; mode_setup; end." > /dev/null 2>&1
@@ -2738,7 +2739,7 @@ echo "configure:2731: checking for working metafont mode" >&5
     echo "$ac_t""$MFMODE" 1>&6
 
     echo $ac_n "checking for mfplain.mp""... $ac_c" 1>&6
-echo "configure:2742: checking for mfplain.mp" >&5
+echo "configure:2743: checking for mfplain.mp" >&5
     #
     # For now let people define these in their environments
     #
@@ -2746,7 +2747,7 @@ echo "configure:2742: checking for mfplain.mp" >&5
     echo "$ac_t""$MFPLAIN_MP" 1>&6
 
     echo $ac_n "checking for inimetapost flags""... $ac_c" 1>&6
-echo "configure:2750: checking for inimetapost flags" >&5
+echo "configure:2751: checking for inimetapost flags" >&5
     if test  ${INIMETAPOST} = "inimp" ; then
        : ${INIMETAPOST_FLAGS=''}
     else
@@ -2779,7 +2780,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2783: checking for $ac_word" >&5
+echo "configure:2784: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_KPSEWHICH'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2810,7 +2811,7 @@ done
 test -n "$KPSEWHICH" || KPSEWHICH="no"
 
     echo $ac_n "checking for tfm path""... $ac_c" 1>&6
-echo "configure:2814: checking for tfm path" >&5
+echo "configure:2815: checking for tfm path" >&5
 
     TFM_FONTS="cmr msam"
 
@@ -2838,13 +2839,13 @@ echo "configure:2814: checking for tfm path" >&5
 
     ## First, let's just see if we can find Guile at all.
     echo $ac_n "checking "for guile-config"""... $ac_c" 1>&6
-echo "configure:2842: checking "for guile-config"" >&5
+echo "configure:2843: checking "for guile-config"" >&5
     for guile_config in guile-config $target-guile-config $build-guile-config; do
        echo "$ac_t"""$guile_config"" 1>&6
        if ! $guile_config --version > /dev/null 2>&1 ; then
            echo "configure: warning: "cannot execute $guile_config"" 1>&2
            echo $ac_n "checking "if we are cross compiling"""... $ac_c" 1>&6
-echo "configure:2848: checking "if we are cross compiling"" >&5
+echo "configure:2849: checking "if we are cross compiling"" >&5
            guile_config=error
        else
            break
@@ -2855,7 +2856,7 @@ echo "configure:2848: checking "if we are cross compiling"" >&5
        exit 1
     fi
     echo $ac_n "checking "Guile version"""... $ac_c" 1>&6
-echo "configure:2859: checking "Guile version"" >&5
+echo "configure:2860: checking "Guile version"" >&5
     need_guile_version="1.3.4"
     need_guile_version_numeric=100304
     guile_version=`$guile_config --version 2>&1 | awk '{print $NF}'`
@@ -2874,7 +2875,7 @@ else {last =0}}
     
 ## The GUILE_FLAGS macro.
   echo $ac_n "checking for Guile""... $ac_c" 1>&6
-echo "configure:2878: checking for Guile" >&5
+echo "configure:2879: checking for Guile" >&5
   if ! $guile_config link > /dev/null ; then
       echo "$ac_t"""cannot execute $guile_config"" 1>&6
       { echo "configure: error: "cannot find guile-config; is Guile installed?"" 1>&2; exit 1; }
@@ -2889,7 +2890,7 @@ echo "configure:2878: checking for Guile" >&5
     # Extract the first word of "guile", so it can be a program name with args.
 set dummy guile; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2893: checking for $ac_word" >&5
+echo "configure:2894: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2939,17 +2940,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2943: checking for $ac_hdr" >&5
+echo "configure:2944: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2948 "configure"
+#line 2949 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2976,7 +2977,7 @@ fi
 done
 
        echo $ac_n "checking for kpse_find_file in -lkpathsea""... $ac_c" 1>&6
-echo "configure:2980: checking for kpse_find_file in -lkpathsea" >&5
+echo "configure:2981: checking for kpse_find_file in -lkpathsea" >&5
 ac_lib_var=`echo kpathsea'_'kpse_find_file | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2984,7 +2985,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lkpathsea  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2988 "configure"
+#line 2989 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2998,7 +2999,7 @@ int main() {
 kpse_find_file()
 ; return 0; }
 EOF
-if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3031,12 +3032,12 @@ fi
        for ac_func in kpse_find_file
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3035: checking for $ac_func" >&5
+echo "configure:3036: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3040 "configure"
+#line 3041 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3062,7 +3063,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3091,7 +3092,7 @@ done
 
     fi
     echo $ac_n "checking whether to use kpathsea""... $ac_c" 1>&6
-echo "configure:3095: checking whether to use kpathsea" >&5
+echo "configure:3096: checking whether to use kpathsea" >&5
     if test $kpathsea_b = yes; then
         echo "$ac_t""yes" 1>&6
        KPATHSEA=1
@@ -3109,7 +3110,7 @@ EOF
 
 
 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:3113: checking for 8-bit clean memcmp" >&5
+echo "configure:3114: checking for 8-bit clean memcmp" >&5
 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3117,7 +3118,7 @@ else
   ac_cv_func_memcmp_clean=no
 else
   cat > conftest.$ac_ext <<EOF
-#line 3121 "configure"
+#line 3122 "configure"
 #include "confdefs.h"
 #ifdef __cplusplus
 extern "C" void exit(int);
@@ -3130,7 +3131,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_memcmp_clean=yes
 else
@@ -3148,12 +3149,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
 
 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:3152: checking for vprintf" >&5
+echo "configure:3153: checking for vprintf" >&5
 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3157 "configure"
+#line 3158 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char vprintf(); below.  */
@@ -3179,7 +3180,7 @@ vprintf();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_vprintf=yes"
 else
@@ -3203,12 +3204,12 @@ fi
 
 if test "$ac_cv_func_vprintf" != yes; then
 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:3207: checking for _doprnt" >&5
+echo "configure:3208: checking for _doprnt" >&5
 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3212 "configure"
+#line 3213 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char _doprnt(); below.  */
@@ -3234,7 +3235,7 @@ _doprnt();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func__doprnt=yes"
 else
@@ -3261,12 +3262,12 @@ fi
 for ac_func in memmem snprintf vsnprintf gettext isinf
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3265: checking for $ac_func" >&5
+echo "configure:3266: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3270 "configure"
+#line 3271 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -3292,7 +3293,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:3296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -3331,7 +3332,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3335: checking for $ac_word" >&5
+echo "configure:3336: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3364,7 +3365,7 @@ test -n "$MAKEINFO" || MAKEINFO="error"
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3368: checking for $ac_word" >&5
+echo "configure:3369: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -3561,6 +3562,7 @@ s%@DIR_DATADIR@%$DIR_DATADIR%g
 s%@subdirs@%$subdirs%g
 s%@CC@%$CC%g
 s%@LD@%$LD%g
+s%@cross_compiling@%$cross_compiling%g
 s%@ICFLAGS@%$ICFLAGS%g
 s%@ILDFLAGS@%$ILDFLAGS%g
 s%@DEFINES@%$DEFINES%g
index f463eefda34a875ccba956508f4df17d18540f65..8c48cd1780fc580b3966d527ddb173f16b29bccb 100644 (file)
@@ -4,7 +4,7 @@
 \score {  \notes
        \relative c'' \context Staff {
                \emptyText
-               \repeat "semi" 2 { \time 4/4; c4^"cuivr\\'e"_\fermata }
+               \repeat volta 2 { \time 4/4; c4^"cuivr\\'e"_\fermata }
                 \alternative {
                        { \property Voice.textStyle = "italic" d-4_"cantabile" }
                        {  e }  } \grace { c16 }
index 940843afc5295b5268dedbe7dde1aaa37b19c4db..a8f63a9de28ecda60cca4eb272a27ae5983d96f1 100644 (file)
@@ -1,7 +1,7 @@
 \score { 
   \context Voice \notes\relative c {
     [f8 f]  [f64 f] \grace { [f8 e8] }
-       \property Voice.noStemExtend = ##t
+       \property Grace.Stem \push #'no-stem-extend = ##t
        [f8 f]
        
   }
index cccabf2568758efe3b9f5088de548dd53a8ae6cc..1d029981a8a63dafbf9c8f4bb8de9488c55cf9a9 100644 (file)
@@ -20,7 +20,7 @@ chord = \notes\transpose c''\chords{
            \context Staff \chord
     >
     \paper{
-       linewidth = -1.0;
+
                \translator { 
                        \ChordNamesContext
                        ChordName \push #'word-space = #1 
index 6ae299fb0b14c0e428577bdab9f0acde14880770..e2c3ce45f19590ae5380bc8718b7d4ee9e2a3cb5 100644 (file)
@@ -20,7 +20,8 @@ twovoicesteminvert = \context Staff \notes <
 
 threevoice = \context Staff \notes <
        \context Voice=i { \stemUp g4 f e f g a g2 }
-       \context Voice=ii { \stemUp \property Voice.horizontalNoteShift = 1 e2  e2  e2  e2 }
+       \context Voice=ii { \stemUp \property Voice.NoteColumn \push #'horizontal-shift = #1
+               e2  e2  e2  e2 }
        \context Voice=iii { \stemDown c4 d e d c d es }
 >
 
@@ -35,26 +36,28 @@ chordstest = \context Staff \notes <
 
 hairyChord = \context Staff \notes\relative c' <
      \context Voice=one {
      \property Voice.horizontalNoteShift=0
\property Voice.NoteColumn \push #'horizontal-shift = #0
        \stemUp 
        e4 
      }
      
      \context Voice=two {
        \stemUp
      \property Voice.horizontalNoteShift=1
\property Voice.NoteColumn \push #'horizontal-shift = #1
        cis
      }
      
      \context Voice=three {
-       \property Voice.horizontalNoteShift=2
+ \property Voice.NoteColumn \push #'horizontal-shift = #2
+
        \stemUp 
        ais
      }
      
      \context Voice=four {
         \stemDown
-       \property Voice.horizontalNoteShift=-1
+ \property Voice.NoteColumn \push #'horizontal-shift = #1
+
        fis
      }
 >
index 097ddc3812f55d56b40a1d66b436aeff80887682..715e9d580c5718dccc53d0feac7fd11017839035 100644 (file)
@@ -4,20 +4,18 @@
     
        \context Staff <
                \context Voice = VA {
-                       \property Voice.forceHorizontalShift = #0.1
+                       \property Voice.NoteColumn \push #'forced-hshift = #0.1
                        \stemUp
-                       \property Voice.horizontalNoteShift=1
+                       \property Voice.NoteColumn \push #'horizontal-shift = #1
                        <g' d'>
-               }       
-       
+               }
                \context Voice = VB {
                        \stemDown
-                       \property Voice.horizontalNoteShift=1
-                       \property Voice.forceHorizontalShift = #-0.1
+                       \property Voice.NoteColumn \push #'horizontal-shift = #1
+                       \property Voice.NoteColumn \push #'forced-hshift = #-0.1
                        <bes f'>
                }
        >
-       
   }
   \paper {
     linewidth=-1.0;
index be09c586ab434dd2ae6d494a963a328a1b203609..b9b011e87c609f3b9e9d80b22fb13a4dd5c56c6c 100644 (file)
@@ -1,16 +1,20 @@
+
+shiftI \property Voice.NoteColumn \push #'horizontal-shift = #0
+shiftII \property Voice.NoteColumn \push #'horizontal-shift = #1
+shiftIII \property Voice.NoteColumn \push #'horizontal-shift = #2
+shiftIV \property Voice.NoteColumn \push #'horizontal-shift = #3
+shiftV \property Voice.NoteColumn \push #'horizontal-shift = #4
+
 \score { 
   \context Voice \notes\relative c {
     
        \context Staff <
-               \context Voice =VA  {\property Voice.verticalDirection=1 \property Voice.horizontalNoteShift = 0 g'' }
-               \context Voice =VB  {\property Voice.verticalDirection=1 \property Voice.horizontalNoteShift = 1 e }
-               \context Voice =VC  {\property Voice.verticalDirection=1 \property Voice.horizontalNoteShift = 2 c }
-               \context Voice =VD  {\property Voice.verticalDirection=1 \property Voice.horizontalNoteShift = 3 a }
-               \context Voice =VE  {\property Voice.verticalDirection=1 \property Voice.horizontalNoteShift = 4 f }
-       >
-       
-       
-       
+               \context Voice =VA  {\stemUp \shiftI g'' }
+               \context Voice =VB  {\stemUp \shiftII e }
+               \context Voice =VC  {\stemUp \shiftIII c }
+               \context Voice =VD  {\stemUp \shiftIV a }
+               \context Voice =VE  {\stemUp \shiftV f }
+       >       
   }
   \paper { }  
   \midi { }
index d703831ed3bd4ed5c9b805ca038621c68c330edd..1ef88f13cc547dd95785aa0da3033660ac496b7b 100644 (file)
@@ -258,7 +258,7 @@ Auto_beam_engraver::end_beam ()
       shortest_mom_ = Moment (1, 8);
     }
 }
+
 void
 Auto_beam_engraver::typeset_beam ()
 {
@@ -364,7 +364,8 @@ Auto_beam_engraver::acknowledge_element (Score_element_info info)
          return ;
        }
              
-      int durlog  =rhythmic_req->duration_.durlog_i_;
+      int durlog  = unsmob_duration (rhythmic_req->get_mus_property ("duration"))->duration_log ();
+      
       if (durlog <= 2)
        {
          if (stem_l_arr_p_)
@@ -376,7 +377,7 @@ Auto_beam_engraver::acknowledge_element (Score_element_info info)
        if shortest duration would change
        reconsider ending/starting beam first.
       */
-      Moment mom = rhythmic_req->duration_.length_mom ();
+      Moment mom = unsmob_duration (rhythmic_req->get_mus_property ("duration"))->length_mom ();
       consider_end_and_begin (mom);
       if (!stem_l_arr_p_)
        return;
index 605363c488fcc022e57509dbd855aa1c8d873bec..183c5fece49aba68fc97182c4f6a45ad5650df36 100644 (file)
@@ -88,7 +88,7 @@ Auto_change_iterator::pending_pitch (Moment m) const
       for (SCM s = muses; gh_pair_p (s); s=gh_cdr (s))
        if (Note_req* nr = dynamic_cast<Note_req*> (unsmob_music (gh_car (s))))
          {
-           ps.push (nr->pitch_);
+           ps.push (*unsmob_pitch (nr->get_mus_property ("pitch")));
          }
 
       if (ps.size ())
@@ -135,3 +135,5 @@ Auto_change_iterator::Auto_change_iterator( )
 {
   where_dir_ = CENTER;
 }
+
+IMPLEMENT_CTOR_CALLBACK(Auto_change_iterator);
index c75cb9e605386a8717dc8ee008613086d8a8cc2d..71d134cb3c74d565b031ee51f02fbed8a61345f7 100644 (file)
@@ -1,6 +1,5 @@
-
 /*   
-  auto-switch-music.cc --  implement 
+  auto-switch-music.cc --  implement Auto_change_music
   
   source file of the GNU LilyPond music typesetter
   
@@ -9,9 +8,10 @@
  */
 
 #include "auto-change-music.hh"
+#include "auto-change-iterator.hh"
 
 Auto_change_music::Auto_change_music (Music * m)
   : Music_wrapper (m)
 {
-  set_mus_property ("type", ly_symbol2scm ("auto-change-music"));
+  set_mus_property ("type", Auto_change_iterator::constructor_cxx_function);
 }
index 9240449235279d0046929682529125b579fe29c1..dc2d162fc2c3dd5788539f87402e1083058f84e0 100644 (file)
@@ -10,9 +10,6 @@
 #include "bar.hh"
 #include "score-engraver.hh"
 #include "musical-request.hh"
-#include "multi-measure-rest.hh"
-#include "command-request.hh"
-
 #include "engraver-group-engraver.hh"
 #include "warn.hh"
 #include "item.hh"
 /*
   generate bars. Either user ("|:"), or default (new measure)
 
-  TODO
-
-  - document this
-
-  - document how barlines and line breaks interact.
   */
 class Bar_engraver : public Engraver
 {
index d79b545e410da95cb13ddf79d4bab8980b2fa9a7..84ff88a5dcde537d3d740facc2272f583bfda865 100644 (file)
@@ -257,7 +257,8 @@ Beam_engraver::acknowledge_element (Score_element_info info)
              return;
            }
 
-         if (rhythmic_req->duration_.durlog_i_<= 2)
+      int durlog  = unsmob_duration (rhythmic_req->get_mus_property ("duration"))-> duration_log ();
+         if (durlog <= 2)
            {
              rhythmic_req->origin ()->warning (_ ("stem doesn't fit in beam"));
              prev_start_req_->origin ()->warning (_ ("beam was started here"));
@@ -269,10 +270,10 @@ Beam_engraver::acknowledge_element (Score_element_info info)
            }
 
          stem_l->set_elt_property ("duration-log",
-                                   gh_int2scm (rhythmic_req->duration_.durlog_i_));
+                                   gh_int2scm (durlog));
          Moment stem_location = now_mom () - beam_start_mom_ + beam_start_location_;
          beam_info_p_->add_stem (stem_location,
-                                 (rhythmic_req->duration_.durlog_i_ - 2) >? 1);
+                                 (durlog- 2) >? 1);
          Beam::add_stem (beam_p_, stem_l);
        }
     }
index d1fc2006f00cde718030c36e883694abb8e838c8..3bf8101690301228e73bc3ab7727378678f872d3 100644 (file)
@@ -83,3 +83,5 @@ Change_iterator::process (Moment m)
 }
 
 
+
+IMPLEMENT_CTOR_CALLBACK(Change_iterator);
index aa5c6f27ee4309fb562127b14eb04854562696c6..50ece53329022d8efb8ac5d4816f1282295e27e2 100644 (file)
@@ -58,7 +58,7 @@ void
 Chord_name_engraver::acknowledge_element (Score_element_info i)
 {
   if (Note_req* n = dynamic_cast<Note_req*> (i.req_l_))
-    pitch_arr_.push (n->pitch_);
+    pitch_arr_.push (* unsmob_pitch (n->get_mus_property ("pitch")));
 }
 
 bool
@@ -66,7 +66,7 @@ Chord_name_engraver::do_try_music (Music* m)
 {
   if (Note_req* n = dynamic_cast<Note_req*> (m))
     {
-      pitch_arr_.push (n->pitch_);
+      pitch_arr_.push (* unsmob_pitch (n->get_mus_property ("pitch")));
       return true;
     }
   if (Tonic_req* t = dynamic_cast<Tonic_req*> (m))
@@ -123,14 +123,14 @@ Chord_name_engraver::create_chord_name ()
   */
   SCM plist = SCM_EOL;
   for (int i= chord_p_->pitch_arr_.size (); i--; )
-    plist = gh_cons (chord_p_->pitch_arr_[i].to_scm (), plist);
+    plist = gh_cons (chord_p_->pitch_arr_[i].smobbed_copy (), plist);
   
   chord_name_p_->set_elt_property ("pitches", plist);
   if (chord_p_->inversion_b_)
     chord_name_p_->set_elt_property ("inversion",
-                                    chord_p_->inversion_pitch_.to_scm ());
+                                    chord_p_->inversion_pitch_.smobbed_copy ());
   if (chord_p_->bass_b_)
-    chord_name_p_->set_elt_property ("bass", chord_p_->bass_pitch_.to_scm ());
+    chord_name_p_->set_elt_property ("bass", chord_p_->bass_pitch_.smobbed_copy ());
 }
 
 void
index f21bcb3150aefb677dc17e29de7efdc815d81900..ee310fb044ee84ef1f4b23ed2204f26a1157ef31 100644 (file)
@@ -19,6 +19,7 @@
 #include "note-head.hh"
 #include "spanner.hh"
 #include "item.hh"
+#include "chord-tremolo-iterator.hh"
 
 /**
   This acknowledges repeated music with "tremolo" style.  It typesets
@@ -75,7 +76,9 @@ bool
 Chord_tremolo_engraver::do_try_music (Music * m)
 {
   Repeated_music * rp = dynamic_cast<Repeated_music*> (m);
-  if (rp && rp->type_ == "tremolo" && !repeat_) 
+  if (rp
+      && rp->get_mus_property ("type") == Chord_tremolo_iterator::constructor_cxx_function
+      && !repeat_) 
     {
       Moment l = rp->body_length_mom ();
       repeat_ = rp;
index 0f86e33d98a77cd6899a22951ddaf4fc3bf73c19..5ddad9598321aebc7a199ec0747910797ec4e99f 100644 (file)
@@ -20,7 +20,7 @@ void
 Chord_tremolo_iterator::construct_children ()
 {
   Repeated_music * rep = dynamic_cast<Repeated_music*> (music_l_);
-  factor_  = Moment (1, rep->repeats_i_);
+  factor_  = Moment (1, rep->repeat_count ());
   child_iter_p_ = get_iterator_p (rep->body ());
 }
 
@@ -70,3 +70,6 @@ Chord_tremolo_iterator::try_music_in_children (Music  *m) const
 }
 
 
+
+IMPLEMENT_CTOR_CALLBACK(Chord_tremolo_iterator);
+
index 5cb2870461ee122a4a18c7c0a73470ca5b20a82a..26602a5e7804b56e250fca39719a02749e69d09e 100644 (file)
 #include "music-list.hh"
 #include "musical-request.hh"
 
+/*
+  UGH
+
+  should compare SCM lists.
+ */
 int
 compare (Chord* left, Chord* right)
 {
@@ -27,7 +32,20 @@ compare (Chord* left, Chord* right)
 /*
   FIXME: should use SCM iso. arrays and have-to-delete pointers.
 
-  FIXME: this contains memleaks.
+  FIXME: a real function looks like
+
+
+    Return_value func (Input_value),
+
+  not
+
+    void func (Input_value *);
+
+  FIXME:
+
+    pitch is really a tuple, hence an immutable object. We
+    should remove all mutating operations.
+
  */
   
 /*
@@ -41,7 +59,7 @@ to_chord (Musical_pitch tonic, Array<Musical_pitch>* add_arr_p, Array<Musical_pi
   for (int i=0; i < add_arr_p->size (); i++)
     {
       Musical_pitch* p = &(*add_arr_p)[i];
-      if (p->octave_i_ == -100)
+      if (p->octave_i ()  == -100)
         {
           p->octave_i_ = 0;
          dim_b = true;
@@ -75,7 +93,7 @@ to_chord (Musical_pitch tonic, Array<Musical_pitch>* add_arr_p, Array<Musical_pi
   else if (dim_b)
     {
       Musical_pitch* p = &add_arr_p->top ();
-      p->accidental_i_--;
+      p->alteration_i_--;
     }
 
   /*
@@ -92,7 +110,7 @@ to_chord (Musical_pitch tonic, Array<Musical_pitch>* add_arr_p, Array<Musical_pi
     {
       for (int i=0; i < missing_arr.size (); i++)
         {
-         missing_arr[i].accidental_i_--;
+         missing_arr[i].alteration_i_--;
        }
     }
 
@@ -112,7 +130,7 @@ to_chord (Musical_pitch tonic, Array<Musical_pitch>* add_arr_p, Array<Musical_pi
      C-sus (4) = c f g (1 4 5)
    */
   Musical_pitch sus = tonic;
-  sus.transpose (Musical_pitch (3));
+  sus.transpose (Musical_pitch (0,3,0));
   if (Chord::find_pitch_i (add_arr_p, sus) != -1)
     {
       int i = Chord::find_pitch_i (&missing_arr, third);
@@ -176,16 +194,17 @@ to_chord (Array<Musical_pitch> pitch_arr, Tonic_req* tonic_req, Inversion_req* i
 
   if (bass_req)
     {
-      assert (pitch_arr[0].notename_i_ == bass_req->pitch_.notename_i_);
+      assert (pitch_arr[0].notename_i_ == unsmob_pitch (bass_req->get_mus_property ("pitch"))->notename_i_);
       bass_p = new Musical_pitch (pitch_arr.get (0));
     }
     
   if (inversion_req)
     {
-      assert (pitch_arr[0].notename_i_ == inversion_req->pitch_.notename_i_);
-      inversion_p = new Musical_pitch (inversion_req->pitch_);
+      assert (pitch_arr[0].notename_i_ == unsmob_pitch (inversion_req->get_mus_property ("pitch"))->notename_i_);
+      inversion_p = new Musical_pitch (* unsmob_pitch (inversion_req->get_mus_property ("pitch")));
       assert (tonic_req);
-      int tonic_i = Chord::find_notename_i (&pitch_arr, tonic_req->pitch_);
+      int tonic_i = Chord::find_notename_i (&pitch_arr,
+                                           *unsmob_pitch (tonic_req->get_mus_property ("pitch")));
       if (tonic_i)
        Chord::rebuild_insert_inversion (&pitch_arr, tonic_i);
     }
@@ -193,7 +212,7 @@ to_chord (Array<Musical_pitch> pitch_arr, Tonic_req* tonic_req, Inversion_req* i
   if (find_inversion_b && !inversion_p)
     {
       int tonic_i = tonic_req
-       ? Chord::find_notename_i (&pitch_arr, tonic_req->pitch_
+       ? Chord::find_notename_i (&pitch_arr, *unsmob_pitch (tonic_req->get_mus_property ("pitch"))
        : Chord::find_tonic_i (&pitch_arr);
        
       if (tonic_i)
@@ -205,7 +224,7 @@ to_chord (Array<Musical_pitch> pitch_arr, Tonic_req* tonic_req, Inversion_req* i
 
   if (tonic_req)
     {
-      assert (pitch_arr[0].notename_i_ == tonic_req->pitch_.notename_i_);
+      assert (pitch_arr[0].notename_i_ == unsmob_pitch (tonic_req->get_mus_property ("pitch"))->notename_i_);
     }
 
   return Chord (pitch_arr, inversion_p, bass_p);
@@ -253,9 +272,9 @@ Chord::base_arr (Musical_pitch p)
 {
   Array<Musical_pitch> base;
   base.push (p);
-  p.transpose (Musical_pitch (2));
+  p.transpose (Musical_pitch (0,2,0));
   base.push (p);
-  p.transpose (Musical_pitch (2, -1));
+  p.transpose (Musical_pitch (0, 2, -1));
   base.push (p);
   return base;
 }
@@ -270,7 +289,7 @@ Chord::rebuild_transpose (Array<Musical_pitch>* pitch_arr_p, Musical_pitch tonic
       p.transpose (q);
       // duh, c7 should mean <c bes>
       if (fix7_b && (step_i (tonic, p) == 7))
-        p.accidental_i_--;
+        p.alteration_i_--;
       (*pitch_arr_p)[i] = p;
     }
   pitch_arr_p->sort (Musical_pitch::compare);
@@ -293,7 +312,7 @@ Chord::find_notename_i (Array<Musical_pitch> const* pitch_arr_p, Musical_pitch p
     {
       for (int i = 0; i < pitch_arr_p->size (); i++)
        {
-         p.octave_i_ = (*pitch_arr_p)[i].octave_i_;
+         p.octave_i_ = (*pitch_arr_p)[i].octave_i () ;
          if (p == (*pitch_arr_p)[i])
            return i;
        }
@@ -305,7 +324,7 @@ int
 Chord::step_i (Musical_pitch tonic, Musical_pitch p)
 {
   int i = p.notename_i_ - tonic.notename_i_
-    + (p.octave_i_ - tonic.octave_i_) * 7;
+    + (p.octave_i ()  - tonic.octave_i () ) * 7;
   while (i < 0)
     i += 7;
   i++;
@@ -324,7 +343,7 @@ Chord::missing_thirds_pitch_arr (Array<Musical_pitch> const* pitch_arr_p)
   /* is the third c-e, d-f, etc. small or large? */
   int minormajor_a[] = {0, -1, -1, 0,0,-1,-1};
   for (int i=0; i < 7; i++)
-    thirds.push (Musical_pitch( 2, minormajor_a[i]));
+    thirds.push (Musical_pitch( 0, 2, minormajor_a[i]));
 
   Musical_pitch tonic = (*pitch_arr_p)[0];
   Musical_pitch last = tonic;
@@ -343,7 +362,7 @@ Chord::missing_thirds_pitch_arr (Array<Musical_pitch> const* pitch_arr_p)
              if ((last.notename_i_ - tonic.notename_i_ + 7) % 7 == 6)
                {
                  Musical_pitch special_seven = last;
-                 Musical_pitch lower (0, -1);
+                 Musical_pitch lower (0, 0, -1);
                  special_seven.transpose (lower);
                  missing_arr.push (special_seven);
                }
@@ -378,7 +397,7 @@ Chord::to_pitch_arr () const
       for (; i < pitch_arr.size (); i++)
        {
          if ((pitch_arr[i].notename_i_ == inversion_pitch_.notename_i_)
-             && (pitch_arr[i].accidental_i_ == inversion_pitch_.accidental_i_))
+             && (pitch_arr[i].alteration_i_ == inversion_pitch_.alteration_i_))
            break;
        }
       if (i == pitch_arr.size ())
@@ -472,7 +491,7 @@ Chord::rebuild_from_base (Array<Musical_pitch>* pitch_arr_p, int base_i)
       Musical_pitch p = (*pitch_arr_p)[(base_i + i) % pitch_arr_p->size ()];
       if (p < last)
        {
-         p.octave_i_ = last.octave_i_;
+         p.octave_i_ = last.octave_i () ;
          if (p < last)
            p.octave_i_++;
        }
@@ -490,7 +509,7 @@ Chord::rebuild_insert_inversion (Array<Musical_pitch>* pitch_arr_p, int tonic_i)
   rebuild_from_base (pitch_arr_p, tonic_i - 1);
   if (pitch_arr_p->size ())
     {
-      inversion.octave_i_ = (*pitch_arr_p)[0].octave_i_ - 1;
+      inversion.octave_i_ = (*pitch_arr_p)[0].octave_i ()  - 1;
       while (inversion < (*pitch_arr_p)[0])
        inversion.octave_i_++;
     }
@@ -517,25 +536,40 @@ Chord::rebuild_with_bass (Array<Musical_pitch>* pitch_arr_p, int bass_i)
 
 // junk me
 Simultaneous_music *
-get_chord (Musical_pitch tonic,
-                          Array<Musical_pitch>* add_arr_p,
-                          Array<Musical_pitch>* sub_arr_p,
-                          Musical_pitch* inversion_p,
-                          Musical_pitch* bass_p,
-                          Duration d)
+get_chord (SCM stonic,
+          SCM sadd_arr_p,
+          SCM ssub_arr_p,
+          SCM sinversion_p,
+          SCM sbass_p,
+          SCM dur)
 {
+  Musical_pitch tonic = *unsmob_pitch (stonic);
+  
+  Musical_pitch *inversion_p = unsmob_pitch( sinversion_p);
+  Musical_pitch *bass_p = unsmob_pitch (sbass_p);
+       
+  Array<Musical_pitch> add_arr_p;
+  Array<Musical_pitch> sub_arr_p;
+
+  for (SCM s = sadd_arr_p ; gh_pair_p (s); s = gh_cdr (s))
+    add_arr_p.push (*unsmob_pitch (gh_car (s)));
+  for (SCM s = ssub_arr_p ; gh_pair_p (s); s = gh_cdr (s))
+    sub_arr_p.push (*unsmob_pitch (gh_car (s)));
+  
+  sub_arr_p.reverse ();
+  add_arr_p.reverse ();
 
   /*
     UARGAUGRAGRUAUGRUINAGRAUGIRNA
 
     ugh
    */
-  Chord chord = to_chord (tonic, add_arr_p, sub_arr_p, inversion_p, bass_p);
+  Chord chord = to_chord (tonic, &add_arr_p, &sub_arr_p, inversion_p, bass_p);
   inversion_p = 0;
   bass_p = 0;
 
   Tonic_req* t = new Tonic_req;
-  t->pitch_ = tonic;
+  t->set_mus_property ("pitch",  tonic.smobbed_copy ());
   SCM l = gh_cons (t->self_scm (), SCM_EOL);
 
   //urg
@@ -543,25 +577,29 @@ get_chord (Musical_pitch tonic,
       && Chord::find_notename_i (&chord.pitch_arr_, chord.inversion_pitch_) > 0)
     {
       Inversion_req* i = new Inversion_req;
-      i->pitch_ = chord.inversion_pitch_;
+      i->set_mus_property ("pitch",  chord.inversion_pitch_.smobbed_copy ());
       l = gh_cons (i->self_scm (), l);
+      scm_unprotect_object (i->self_scm ());
     }
 
   if (chord.bass_b_)
     {
       Bass_req* b = new Bass_req;
-      b->pitch_ = chord.bass_pitch_;
-      l = gh_cons (b->self_scm (), l);      
+      b->set_mus_property ("pitch",  chord.bass_pitch_.smobbed_copy ());      
+
+      l = gh_cons (b->self_scm (), l);
+      scm_unprotect_object (b->self_scm ());      
     }
 
   Array<Musical_pitch> pitch_arr = chord.to_pitch_arr ();
   for (int i = pitch_arr.size (); --i >= 0;)
     {
-      Musical_pitch p = pitch_arr[i];
       Note_req* n = new Note_req;
-      n->pitch_ = p;
-      n->duration_ = d;
+      n->set_mus_property ("pitch", pitch_arr[i].smobbed_copy ());
+      n->set_mus_property ("duration", dur);
       l = gh_cons (n->self_scm (), l);
+
+      scm_unprotect_object (n->self_scm ());
     }
 
   Simultaneous_music*v = new Request_chord (l);
index 818e3544a0f93c0c417ceda23a183713a797534c..b57a2cc4f48150d84b4b940373eeb8c5e4624c3e 100644 (file)
@@ -17,7 +17,6 @@
 #include "note-head.hh"
 #include "staff-symbol-referencer.hh"
 #include "debug.hh"
-#include "command-request.hh"
 #include "engraver.hh"
 #include "direction.hh"
 #include "side-position-interface.hh"
@@ -43,7 +42,6 @@ protected:
 private:
   Item * clef_p_;
   Item * octavate_p_;
-  Clef_change_req * clef_req_l_;
 
   SCM prev_glyph_;
   SCM prev_cpos_;
@@ -56,7 +54,6 @@ private:
 Clef_engraver::Clef_engraver ()
 {
   clef_p_ = 0;
-  clef_req_l_ = 0;
   octave_dir_ = CENTER;
   octavate_p_ = 0;
 
index 1f6ac5627ab8c18f47a28c0e79ce9df86597a662..2ef28ba7675a93cd93c73f8f7f919c161d8ece45 100644 (file)
@@ -14,7 +14,7 @@
 #include "font-interface.hh"
 
 /*
-FIXME: should use symbol for #'style.
+ FIXME: should use symbol for #'style.
 */
 MAKE_SCHEME_CALLBACK(Clef,before_line_breaking,1);
 SCM
@@ -33,11 +33,9 @@ Clef::before_line_breaking (SCM smob)
     {
       String str = ly_scm2string (glyph);
 
-      /*
-       FIXME: should use fontsize property to set clef changes.
-       */
-      if (s->get_elt_property ("non-default") &&
-         s->break_status_dir() != RIGHT && style != "fullSizeChanges")
+      if (to_boolean (s->get_elt_property ("non-default")) &&
+         s->break_status_dir() != RIGHT &&
+         to_boolean (s->get_elt_property ("full-size-change")))
        {
          str += "_change";
          s->set_elt_property ("glyph", ly_str02scm (str.ch_C()));        
@@ -65,9 +63,6 @@ Clef::set_interface (Score_element* me)
   me->set_interface (ly_symbol2scm ("clef-interface"));
 }
 
-
-
-
 MAKE_SCHEME_CALLBACK(Clef,brew_molecule,1)
 SCM
 Clef::brew_molecule (SCM smob) 
index 2f5f83b3f8ee5caf89d11ba4f9ba39c533fa8bce..aef049e98079fb60db39fdb7aef2eed986b55361 100644 (file)
 #include "musical-request.hh"
 
 
-Bar_req::Bar_req (String s)
-{
-  set_mus_property ("type", ly_str02scm (s.ch_C()));
-}
-
 bool
 Barcheck_req::do_equal_b (Request const *r) const
 {
@@ -24,33 +19,11 @@ Barcheck_req::do_equal_b (Request const *r) const
 }
 
 
-Clef_change_req::Clef_change_req ()
-{
-
-}
-
-
-bool
-Time_signature_change_req::do_equal_b (Request const *r) const
-{
-  Time_signature_change_req  const* m
-    = dynamic_cast <Time_signature_change_req  const*> (r);
-
-#if 0
-  return m && m->beats_i_ == beats_i_
-    && one_beat_i_ == m->one_beat_i_;
-#endif
-  return m;
-}
-
-Time_signature_change_req::Time_signature_change_req ()
-{
-}
 
 
 Tempo_req::Tempo_req ()
 {
-  dur_. durlog_i_ = 2;
+  set_mus_property ("duration", Duration(2,0).smobbed_copy ());
 }
 
 
@@ -82,28 +55,30 @@ Key_change_req::transpose (Musical_pitch p)
   SCM pa = get_mus_property ("pitch-alist");
   for (SCM s = pa; gh_pair_p (s); s = gh_cdr (s))
     {
-      SCM k = gh_caar (s);
-
-      if (gh_pair_p (k))
+      SCM key = gh_caar (s);
+      SCM alter = gh_cdar (s);
+      if (gh_pair_p (key))
        {
-         Musical_pitch orig (gh_list (gh_car (k), gh_cdr (k), gh_cdr (s), SCM_UNDEFINED));
+         Musical_pitch orig (gh_scm2int (gh_car (key)),
+                             gh_scm2int (gh_cdr (key)),
+                             gh_scm2int (alter));
 
          orig.transpose (p);
 
-         SCM key = gh_cons (gh_int2scm (orig.octave_i_),
+         SCM key = gh_cons (gh_int2scm (orig.octave_i () ),
                             gh_int2scm (orig.notename_i_));
 
-         newlist = gh_cons (gh_cons (key, gh_int2scm (orig.accidental_i_)),
+         newlist = gh_cons (gh_cons (key, gh_int2scm (orig.alteration_i_)),
                             newlist);
        }
-      else if (gh_number_p (k))
+      else if (gh_number_p (key))
        {
-         Musical_pitch orig (gh_list (gh_int2scm (0), k, gh_cdar (s), SCM_UNDEFINED));
+         Musical_pitch orig (0, gh_scm2int (key), gh_scm2int (alter));
          orig.transpose (p);
 
-         SCM key =gh_int2scm (orig.notename_i_);
-         newlist = gh_cons (gh_cons (key, gh_int2scm (orig.accidental_i_)),
-                            newlist);
+         key =gh_int2scm (orig.notename_i_);
+         alter = gh_int2scm (orig.alteration_i_);
+         newlist = gh_cons (gh_cons (key, alter), newlist);
        }
     }
 
index cf3f520773fcf815c169d1d20a163b8950f01f9c..7e52caf95736cdfec2651893ab6951395aa79601 100644 (file)
@@ -7,9 +7,11 @@
   
  */
 #include "context-specced-music.hh"
-
 Context_specced_music::Context_specced_music(Music *m)
   : Music_wrapper  (m)
 {
-  set_mus_property ("type", ly_symbol2scm ("context-specced-music"));
+  set_mus_property ("type",
+
+                   ly_symbol2scm ("context-specced-music"));
 }
+
index 5f15194535d0f82afc1cc53ef1db223e8c39cde7..77e354d63222d96acb412f340a9c0f58854f77fc 100644 (file)
@@ -96,8 +96,9 @@ Custos_engraver::acknowledge_element (Score_element_info info)
            don't look at the staff-position, since we can't be sure
            whether Clef_engraver already applied a vertical shift.
          */
-         
-         pitches_.push (dynamic_cast<Note_req*> (info.req_l_)->pitch_);
+         Note_req * nr = dynamic_cast<Note_req*> (info.req_l_);
+         if (nr)
+           pitches_.push (*unsmob_pitch (nr->get_mus_property ("pitch")));
        }
     }
 }
index 7710e4dcc037d9a9c349674f67784c9adf65f434..163b849d2af8fe43d1da25bf05cf681cc7f21cf5 100644 (file)
 #include "string.hh"
 #include "moment.hh"
 #include "duration.hh"
+#include "ly-smobs.icc"
+
 
-int
-compare (Array<Duration>* left, Array<Duration>* right)
-{
-  assert (left);
-  assert (right);
-  
-  if (left->size () == right->size ())
-    {
-      for (int i = 0; i < left->size (); i++)
-       {
-         int r = Duration::compare ((*left)[i], (*right)[i]);
-         if (r)
-           return r;
-       }
-    }
-  else
-    return 1;
-  return 0;
-}
 
 int
 Duration::compare (Duration const &left, Duration const &right)
@@ -45,15 +28,22 @@ Duration::Duration ()
 {
   durlog_i_ = 0;
   dots_i_ = 0;
-  tuplet_iso_i_ = 1;
-  tuplet_type_i_ = 1;
+  factor_ = Moment (1,1);
+}
+
+Duration::Duration (int l, int d)
+{
+  durlog_i_ = l;
+  dots_i_ = d;
+  factor_ = Moment (1,1);
 }
 
-void
-Duration::compress (Rational m)
+Duration
+Duration::compressed (Rational m) const
 {
-  tuplet_iso_i_  *= m.num_i ();
-  tuplet_type_i_ *= m.den_i (); 
+  Duration d (*this);
+  d.factor_ *= m;
+  return d;
 }
 
 Rational
@@ -72,28 +62,105 @@ Duration::length_mom () const
       mom += delta;
     }
 
-  return mom * Moment (tuplet_iso_i_, tuplet_type_i_);
+  return mom * factor_;
 }
 
-void
-Duration::set_plet (int i, int t)
-{
-  tuplet_iso_i_ = i; 
-  tuplet_type_i_ = t;
-}
 
 
 String
 Duration::str () const
 {
-  return to_str (durlog_i_) + to_str ('.', dots_i_);
+  String s =  to_str (durlog_i_) + to_str ('.', dots_i_);
+  if (factor_ != Moment (1,1))
+    {
+      s += "*" + factor_.str ();
+    }
+  return s;
 }
 
 
-bool
-Duration::plet_b ()
+IMPLEMENT_TYPE_P(Duration, "duration?");
+IMPLEMENT_UNSMOB(Duration, duration);
+
+SCM
+Duration::mark_smob (SCM )
 {
-  return tuplet_iso_i_ != 1 || tuplet_type_i_ != 1;
+  return SCM_EOL;
 }
 
+IMPLEMENT_SIMPLE_SMOBS(Duration);
+
+
+int
+Duration::print_smob (SCM s, SCM port, scm_print_state *)
+{
+  Duration  *r = (Duration *) gh_cdr (s);
+     
+  scm_puts ("#<Duration ", port);
+  scm_display (gh_str02scm (r->str().ch_C()), port);
+  scm_puts (" >", port);
+  
+  return 1;
+}
+
+SCM
+Duration::equal_p (SCM a , SCM b)
+{
+  Duration  *p = (Duration *) gh_cdr (a);
+  Duration  *q = (Duration *) gh_cdr (b);  
+
+  bool eq = p->dots_i_ == q->dots_i_
+    && p->durlog_i_ == q->durlog_i_
+    && p->factor_ == q->factor_;
+
+  return eq ? SCM_BOOL_T : SCM_BOOL_F;
+}
+  
+MAKE_SCHEME_CALLBACK(Duration, less_p, 2);
+SCM
+Duration::less_p (SCM p1, SCM p2)
+{
+  Duration *a = unsmob_duration (p1);
+  Duration *b = unsmob_duration (p2);
+
+  if (compare(*a, *b) < 0 )
+    return SCM_BOOL_T;
+  else
+    return SCM_BOOL_F;
+}
+
+
+static SCM
+make_duration (SCM l, SCM d)
+{
+  Duration p( gh_scm2int (l), gh_scm2int (d));
+  return p.smobbed_copy ();
+}
+
+static void
+add_funcs()
+{
+  scm_make_gsubr ("make-duration", 2, 0, 0, (Scheme_function_unknown)make_duration);
+}
+
+ADD_SCM_INIT_FUNC(duration, add_funcs);
+
+SCM
+Duration::smobbed_copy ()const
+{
+  Duration *  p = new Duration (*this);
+  return p->smobbed_self ();
+}
+
+int
+Duration::duration_log () const
+{
+  return durlog_i_;
+}
+
+int
+Duration::dot_count () const
+{
+  return dots_i_;
+}
 
index ddc6e68839099eaf68e7e3d53e91c1032d4468b6..71328c87d245098c16c2bab5c560e9a1563e8ec2 100644 (file)
@@ -129,3 +129,5 @@ Folded_repeat_iterator::try_music_in_children (Music * m) const
     return alternative_iter_p_->try_music (m);
   return 0;
 }
+
+IMPLEMENT_CTOR_CALLBACK(Folded_repeat_iterator);
index c2459b310ec0975c6ab03e11bc30c2a9645355b7..b0c89c921431dea216b5c1819f607f8f33decfc9 100644 (file)
@@ -50,3 +50,5 @@ Grace_iterator::pending_moment () const
   return 0;
 }
 
+
+IMPLEMENT_CTOR_CALLBACK(Grace_iterator);
index 532bd07aaf8494eaca9c8f5ef1287feb9bf171f0..a072d37a597ef650ab9777d63f2f96b825dcd7ff 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "grace-music.hh"
+#include "grace-iterator.hh"
 
 void
 Grace_music::compress (Moment)
@@ -24,5 +25,6 @@ Grace_music::length_mom () const
 Grace_music::Grace_music (Music *p)
   : Music_wrapper (p)
 {
-  set_mus_property ("type", ly_symbol2scm ("grace-music"));
+  set_mus_property ("type",
+                   Grace_iterator::constructor_cxx_function);
 }
index d46460f71b03306f8d23fe4a82a8cd272993cc5c..28e450ac496c99cd4a8c2a41d15ec4736ce94552 100644 (file)
@@ -71,7 +71,6 @@ Class ## _identifier::do_str () const { \
 
 DUMMY_STR(Score);
 DUMMY_STR(Music_output_def);
-DUMMY_STR(Duration);
 
   
 #define DEFAULT_STR(Class) \
@@ -115,11 +114,9 @@ Class ## _identifier::Class ## _identifier (Class ## _identifier const &s) \
 } 
 
 
-IMPLEMENT_ID_CLASS(Duration);
 IMPLEMENT_ID_CLASS(Score);
 IMPLEMENT_ID_CLASS(Music_output_def);
 VIRTUAL_ACCESSOR(Music_output_def);
-DEFAULT_ACCESSOR(Duration);
 DEFAULT_ACCESSOR(Score);
 
 
index ac3c8dbd6d752055c911a588021452793846d5d0..aba977192f433e06617bc74e266d7a5032399937 100644 (file)
@@ -17,6 +17,8 @@ class Auto_change_iterator : public Music_wrapper_iterator
 {
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function;
+  
   Auto_change_iterator ();
 
 protected:
index 8714801b3f2f828e8d6e131ce844eb640068f8ca..929271bcdfe5db200ef8b3e753bf10c078449c1b 100644 (file)
@@ -19,7 +19,7 @@ public:
   VIRTUAL_COPY_CONS (Music_iterator);
   /* constructor is public */
   virtual void process (Moment);
-
+  static SCM constructor_cxx_function;
 private:
   void  error (String);
 };
index 3f08463c36bfac24de1f6a4ca3659aa1fefe4afb..3ac4d45cfd44e1c6a87e61bb822d0e751dbe0aa5 100644 (file)
@@ -16,6 +16,7 @@ class Chord_tremolo_iterator : public Music_iterator
 {
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function;
   Chord_tremolo_iterator ();
 
 protected:
index 561032eefbe4c0f0b8c45e2a608737896db55333..98290e29c217bdba94c7541eaa3fc3bbc4cb7fb2 100644 (file)
@@ -52,12 +52,12 @@ Chord to_chord (Array<Musical_pitch> pitch_arr, Tonic_req* tonic_req, Inversion_
 
 int compare (Chord*, Chord*);
 
-Simultaneous_music *get_chord (Musical_pitch tonic,
-                          Array<Musical_pitch>* add_arr_p,
-                          Array<Musical_pitch>* sub_arr_p,
-                          Musical_pitch* inversion_p,
-                          Musical_pitch* bass_p,
-                              Duration d);
+Simultaneous_music *get_chord (SCM tonic,
+                              SCM add_arr_p,
+                              SCM sub_arr_p,
+                              SCM inversion_p,
+                              SCM bass_p,
+                              SCM d);
 
 
 
index 862ef287a322da6f60351d9280642955abc17a40..2acf5d4ba1820a7d265c9606189f6747be7c0dfb 100644 (file)
@@ -16,9 +16,6 @@
 #include "musical-pitch.hh"
 #include "protected-scm.hh"
 
-/*
-  Real penalty_f_;
- */
 class Break_req : public Request {
 public:
 
@@ -34,18 +31,10 @@ public:
   VIRTUAL_COPY_CONS(Music);
 };
 
-
-/** Baseclass for time_signature/partial req. It has to be handled by
-  Staff_{walker,column} baseclass.  */
-class Timing_req  : public Request  {
-public:
-  VIRTUAL_COPY_CONS(Music);
-};
-
 /*
     int metronome_i_;
  */
-class Tempo_req : public Timing_req
+class Tempo_req : public Request
 {
 public:
   Duration dur_;
@@ -58,42 +47,13 @@ protected:
   bool do_equal_b (Request const *) const;
 };
 
-
-/**
-  todo: allow C time_signature
-
-  int beats_i_;
-  int one_beat_i_;
-  
- */
-class Time_signature_change_req  : public Timing_req  {
-public:
-  Time_signature_change_req();
-
-protected:
-  bool do_equal_b (Request const *) const;
-  VIRTUAL_COPY_CONS(Music);
-};
-
-
 /// check if we're at start of a  measure.
-class Barcheck_req  : public Timing_req  {
+class Barcheck_req  : public Request  {
 public:
   bool do_equal_b (Request const *) const;
   VIRTUAL_COPY_CONS(Music);
 };
 
-
-/** draw a (repeat)-bar. This something different than #Barcheck_req#,
-  the latter should only happen at the start of a measure.  */
-class Bar_req  : public Request  {
-public:
-
-  Bar_req (String);
-protected:
-  VIRTUAL_COPY_CONS(Music);
-};
-
 class Breathing_sign_req : public Request {
   VIRTUAL_COPY_CONS(Music);
 };
@@ -112,18 +72,4 @@ protected:
   bool do_equal_b (Request const * )const; 
 };
 
-/*
-  String clef_str_;
- */
-
-class Clef_change_req  : public Request  {
-public:
-  
-  Clef_change_req ();
-protected:
-
-  VIRTUAL_COPY_CONS(Music);
-};
-
-
 #endif // COMMANDREQUEST_HH
index e6eb7c8b0f1128d6021d94f2d4632fe7cafe67ec..0c293c8166598bbff5b7b5e6ee36b06e9d8b3019 100644 (file)
 
 class Context_specced_music : public Music_wrapper
 {
-
-/*
-  /// The kind of translation needed for this music.  
-  String translator_type_str_;
-
-  /// what identification for the translation unit
-  String translator_id_str_;
-*/
 public:  
   Context_specced_music (Music*);
   VIRTUAL_COPY_CONS(Music);
-
 };
 #endif /* CONTEXT_SPECCED_MUSIC_HH */
 
index 3f352fccc2b5aa3a9c46be66639bc8e675d9ccc9..54c4793fb8b05bc97da97993388e4b385735185c 100644 (file)
 #define DURATION_HH
 
 #include "flower-proto.hh"
-#include "rational.hh"
-
+#include "moment.hh"
+#include "smobs.hh"
 
 /**
    A musical duration.
   */
 struct Duration {
   Duration ();
-  /// is the "plet factor" of this note != 1 ?
-  bool plet_b ();
+  Duration (int, int);
   String str () const;
   void set_plet (int,int );
-  void compress (Rational);
+  Duration compressed (Rational) const;
   Rational length_mom () const ;
   static int compare (Duration const&, Duration const&);
 
-  /// Logarithm of the base duration.
+  SCM smobbed_copy () const;
+  DECLARE_SCHEME_CALLBACK(less_p, (SCM a, SCM b));
+  DECLARE_SIMPLE_SMOBS(Duration,);
+
+public:
+  int duration_log ()const;
+  int dot_count () const;
+  
+private:
+    /// Logarithm of the base duration.
   int durlog_i_;
   int dots_i_;
 
-  /*
-    JUNKME.
-   */
-  int tuplet_iso_i_;  // 2/3; 2 is not duration, maar of count!
-  int tuplet_type_i_; 
+  Moment factor_;
 
 };
 
 #include "compare.hh"
 INSTANTIATE_COMPARE(Duration, Duration::compare);
-
-int compare (Array<Duration>*, Array<Duration>*);
+Duration*unsmob_duration(SCM);
+// int compare (Array<Duration>*, Array<Duration>*);
 
 #endif // DURATION_HH
 
index 6217df1beef06d3026ba5e642991239313051fb9..2dba3733c75b46e9547a865465064d85d7eed3ef 100644 (file)
@@ -20,6 +20,8 @@ class Folded_repeat_iterator : public Music_iterator
 {
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function;
+  
   Folded_repeat_iterator ();
   ~Folded_repeat_iterator ();
   
index 4806037d289b1f1f9bf69b0c849c1f0cb2cb195f..37c78b7b3577ed26ad8d585e7fdcd9254bd38864 100644 (file)
@@ -19,7 +19,7 @@ public:
   ~Grace_iterator ();
   virtual void construct_children () ;
   virtual void process (Moment);
-
+  static SCM constructor_cxx_function;
   Moment pending_moment () const;
 };
 
index 7f87c08b8f7c8e8a3d9cd06888bc3fea787b000c..2a82889757e8375527f062c7fdd47c01d3af8a25 100644 (file)
@@ -17,8 +17,6 @@
 
 class Output_def_identifier;
 class Score_identifier;
-class Duration_identifier;
-
 
 
 #define IDACCESSOR(Class)\
@@ -26,7 +24,7 @@ virtual Class *  access_content_ ## Class (bool) const { error (#Class  + String
 
 
 /**
-   A declarable data structure in mudela.
+   A declarable data structure in lilypond.
 
    TODO: use SMOBS for the union type, and junk all derived classes.
    */
@@ -44,7 +42,6 @@ struct Identifier : public Input {
   String str () const;
   IDACCESSOR(Music_output_def)
   IDACCESSOR(Score)
-  IDACCESSOR(Duration)
   VIRTUAL_COPY_CONS(Identifier);
 
   DECLARE_SMOBS(Identifier, foo);
@@ -67,7 +64,6 @@ struct Class ## _identifier : Identifier {\
 }\
 
 
-DECLARE_ID_CLASS(Duration);
 DECLARE_ID_CLASS(Score);
 DECLARE_ID_CLASS(Music_output_def);
 
index b1673f79f1ffb24e5818334d7df02ff40003f4b0..5dea72d5b55018009a1195aed63fd0b8d944cfce 100644 (file)
@@ -33,7 +33,6 @@ class Auto_change_iterator;
 class Auto_change_music;
 class Axis_group_engraver;
 class Bar_engraver;
-class Bar_req;
 class Bar_req_collect_engraver;
 class Barcheck_req;
 class Base_span_bar_engraver;
@@ -48,7 +47,7 @@ class Busy_playing_req;
 class Change_iterator;
 class Change_translator;
 class Chord_tremolo_iterator;
-class Clef_change_req;
+
 class Column_x_positions;
 class Context_specced_music;
 class Engraver;
index 5d519abf663fda0097ebce8529ed5911940bf751..0f200cad8935f3bae81d9af341ad4f4bb80f8fd7 100644 (file)
@@ -18,7 +18,7 @@ class Lyric_combine_music_iterator : public Music_iterator
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
   Lyric_combine_music_iterator ();
-
+  static SCM constructor_cxx_function;
 protected:
   virtual void construct_children ();
   virtual Moment pending_moment () const;
index 1adae59d0eb123ab01f9f686c433bd83b7fa2275..de6cf4f4174cabb42f6883c5b159392958fe5bf0 100644 (file)
@@ -43,5 +43,5 @@ extern int default_count_global;
 extern All_font_metrics *all_fonts_global_p;
 
 class ostream;
-void print_mudela_versions (ostream &os);
+void print_lilypond_versions (ostream &os);
 #endif
index 55a5c87a812349e456279cd3e3e141a98d186e12..46628e211f2732feb7341fa8ce8e880a941e0968 100644 (file)
@@ -29,7 +29,7 @@ public:
   /*
     Deliver a copy of THIS as a smobified SCM
    */
-  SCM make_scm () const; 
+  SCM smobbed_copy () const; 
 };
 
 
diff --git a/lily/include/mudela-version.hh b/lily/include/mudela-version.hh
deleted file mode 100644 (file)
index f8d8e51..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-  mudela-version.hh -- declare Mudela_version
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1998--2000 Jan Nieuwenhuizen <janneke@gnu.org>
-
-*/
-
-#ifndef MUDELA_VERSION_HH
-#define MUDELA_VERSION_HH
-
-#include "string.hh"
-
-struct Mudela_version 
-{
-  Mudela_version (int major, int minor, int patch);
-  Mudela_version (String str);
-
-  String str () const;
-  operator int () const;
-
-  int major_i_;
-  int minor_i_;
-  int patch_i_;
-};
-
-extern Mudela_version oldest_version;
-
-#endif // MUDELA_VERSION_HH
index 56fc3c03c26bb8c14458fccac4b3a00174866c86..9a99f59e6dd3f20b4a8b17d4425a4426e6f53662 100644 (file)
@@ -13,8 +13,9 @@
 #include "lily-proto.hh"
 #include "lily-guile.hh"
 
-typedef void * (*Cpp_function) (SCM param);
-SCM smobify_cpp_function (Cpp_function cb);
+typedef void * (*Cxx_function) (SCM param);
+Cxx_function unsmob_cxx_function (SCM x);
+SCM smobify_cxx_function (Cxx_function cb);
 
 
 #endif /* SCORE_ELEMENT_CALLBACK_HH */
index 30dae48a33ecc2b58045b7b705c78d449a93b6c7..39919db96b759b034b66ef1526b2f92ca9dde9d8 100644 (file)
@@ -15,6 +15,7 @@
 #include "moment.hh"
 #include "virtual-methods.hh"
 #include "interpretation-context-handle.hh"
+#include "music-iterator-ctor.hh"
 
 /** 
   Conceptually a music-iterator operates on a queue of musical events
@@ -90,7 +91,8 @@ public:
     report to.
    */
   virtual void construct_children ();
-
+  static SCM constructor_cxx_function;
+  
 protected:
   Music  * music_l_;
 
@@ -106,8 +108,30 @@ private:
 };
 
 
+/*
+  implement Class::constructor, a SCM function that
+  returns an encapsulated factory function.
+ */
+#define IMPLEMENT_CTOR_CALLBACK(Class)         \
+static void *                                          \
+Class ## _ctor (SCM)                           \
+{                                              \
+  return new Class ;                           \
+}                                              \
+SCM Class :: constructor_cxx_function;\
+void                                           \
+Class ## _constructor_init()                           \
+{                                              \
+  SCM s = smobify_cxx_function (& Class ## _ctor);     \
+  scm_permanent_object (s);\
+  gh_define (#Class "::constructor", s);\
+  Class :: constructor_cxx_function = s;\
+}\
+ADD_SCM_INIT_FUNC(Class ## _ctor_init, Class ## _constructor_init); 
+
  
-  
+
+
 
 
 
index 6abf926c4da30080348a8e10d9a12373fec09590..63d39edc3724a475ceb44cc3b37653ee1adce269 100644 (file)
@@ -26,7 +26,7 @@ public:
 };
 
 /**
-  The request is a collection of Requests. A note that you enter in mudela is 
+  The request is a collection of Requests. A note that you enter in lilypond is 
   one Request_chord, one syllable of lyrics is one Request_chord
  */
 class Request_chord : public Simultaneous_music
index 6d77fbebdcde45ff2b29eab43939f718c6141f13..b19f89ca32798b95b5c8d453a3af2db878625482 100644 (file)
@@ -16,7 +16,9 @@
 #include "virtual-methods.hh"
 
 /**
-  Definition of how to output mudela. 
+  Definition of how to output lilypond.
+
+  TODO: smobify, remove Music_output_def_identifier.
  */
 class Music_output_def  
 {
index 9ff2f5079058d16cd0b647f1b71aaadda9388c98..9b4a046493cd77dc4dd254545219fab0d9071dc6 100644 (file)
@@ -14,7 +14,7 @@
 #include "lily-proto.hh"
 
 /**
-  Output something that was defined in a mudela file. 
+  Output something that was defined in a lilypond file. 
  */
 class Music_output 
 {
index d7a346a56632ddc1361afa8eab60d6d425d5fa70..3aec1298250dfdb4d125c4eaf29eb705f9e865e8 100644 (file)
@@ -22,6 +22,7 @@ class Music_wrapper_iterator : public Music_iterator
 {
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function;  
   Music_wrapper_iterator ();
   Music_wrapper_iterator (Music_wrapper_iterator const&);
   ~Music_wrapper_iterator ();
index ed9f63857ab48a74cab2aed1a71133518005cdb8..a78973b56390eaaf8c8d6860b3f153ff0126e366 100644 (file)
 #define MUSICAL_PITCH_HH
 
 #include "lily-proto.hh"
-#include "input.hh"
-#include "lily-guile.hh" // we need SCM
+#include "smobs.hh"
 
 /** A "tonal" pitch. This is a pitch as it figures in diatonal western
    music (12 semitones in an octave), as opposed to a frequence in Hz
    or a integer number of semitones.
 
-   It is not Music because, it has no duration associated.
+   
+
+   
 */
-struct Musical_pitch : public Input
+class Musical_pitch
 {
-  Musical_pitch (int notename=0, int accidental=0, int octave=0);
-
-  /// construct from  '(octave name acc)
-  Musical_pitch (SCM);
-
+public:                                // fixme
+  
   /// 0 is c, 6 is b
   int notename_i_;
   
   /// 0 natural, 1 sharp, etc
-  int accidental_i_;
+  int alteration_i_;
 
   /// 0 is central c
   int octave_i_;
+public:
+
+  int octave_i () const;
+  int notename_i () const;
+  int alteration_i () const;
+
+  /*
+    Musical_pitch is lexicographically ordered by (octave, notename,
+    alteration).    
+   */
+  Musical_pitch (int octave, int notename,int accidental);
+  Musical_pitch ();
 
   Musical_pitch to_relative_octave (Musical_pitch);
   void transpose (Musical_pitch);
@@ -47,9 +57,13 @@ struct Musical_pitch : public Input
   void down_to (int);
   String str () const;
 
-  SCM to_scm () const;
+  SCM smobbed_copy () const;
+  DECLARE_SCHEME_CALLBACK(less_p, (SCM a, SCM b));
+  DECLARE_SIMPLE_SMOBS(Musical_pitch,);
 };
 
+Musical_pitch* unsmob_pitch (SCM);
+
 #include "compare.hh"
 INSTANTIATE_COMPARE(Musical_pitch, Musical_pitch::compare);
 
index 55aaebe5d613657e2a7f2c1f521ecf3a12a60541..f98b1bee8679e2f9c95dcf0ceddeda31fd71cb5f 100644 (file)
  */
 class Rhythmic_req  : public virtual Request  {
 public:
-  Duration duration_;
-
   bool do_equal_b (Request const*) const;
   void compress (Moment);
   virtual Moment length_mom () const;
-  static int compare (Rhythmic_req const&,Rhythmic_req const&);
   VIRTUAL_COPY_CONS(Music);
 };
 
@@ -76,10 +73,6 @@ protected:
 /// request which has some kind of pitch
 struct Melodic_req :virtual Request
 {
-  Musical_pitch pitch_;
-
-  static int compare (Melodic_req const&,Melodic_req const&);
-  
 protected:
   /// transpose. #delta# is relative to central c.
   virtual void transpose (Musical_pitch delta);
@@ -88,6 +81,18 @@ protected:
   VIRTUAL_COPY_CONS(Music);
 };
 
+
+/*
+  TODO: junk these, and set
+
+    (tonic . #t)
+
+  or maybe
+
+    (chord-type . tonic/inversion/bass) 
+
+  
+ */
 /// specify tonic of a chord
 struct Tonic_req : public Melodic_req
 {
@@ -107,11 +112,11 @@ struct Bass_req : public Melodic_req
 };
 
 /*
-   Put a note of specified type, height, and with accidental on the staff.
-    /// force/supress printing of accidental.
-  bool forceacc_b_;
-  /// Cautionary, i.e. parenthesized accidental.
-  bool cautionary_b_;
+  Put a note of specified type, height, and with accidental on the staff.
+
+  force-accidental -- force/supress printing of accidental.
+     
+  cautionary --  Cautionary, i.e. parenthesized accidental.
 
  */
 class Note_req  : public Rhythmic_req, virtual public Melodic_req  {
index f731d0d545703e98d761c56573774dcdbe444b43..a76957edf6086035747622127a45462d88de2671 100644 (file)
@@ -25,7 +25,7 @@ bool busy_parsing();
 void kill_lexer();
 void set_lexer();
 
-/// lexer for Mudela
+/// lexer for Lilypond
 class My_lily_lexer : public Includable_lexer 
 {
 public:
index 855d655cd6596b2afe6de605a293781a41d8775d..65dd50c2ab07189ffc837283e0742bd0f0e562da 100644 (file)
@@ -34,7 +34,6 @@ public:
   static Direction static_dir (Score_element*);
   static void translate_rests(Score_element*me,int dy);
   static Score_element * first_head (Score_element*me);
-  static Interval rest_dim (Score_element*me);
   static void set_stem (Score_element*me,Score_element*);
   static void set_dotcol (Score_element*me,Score_element*);
   static void add_head (Score_element*me,Score_element*);
index 6728324d3e46d20a7fb9a625a33975be3442de92..e7bd04a45acf192c4a498f5c311c4b92d82f7f3d 100644 (file)
@@ -15,6 +15,7 @@ class Output_property_music_iterator : public Simple_music_iterator
 {
 public:  
   VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function;
   /* construction */
 protected:
   virtual void process (Moment);
index 32a6bc951c5f9da369573d112043801d9543d545..61db1ad3ca04561c98e5c9c1be7cb0ca38c0ff07 100644 (file)
@@ -19,7 +19,7 @@ public:
   Part_combine_music_iterator ();
 
   enum State { UNKNOWN, UNRELATED=1, SOLO1=2, SOLO2=4, UNIRHYTHM=8, UNISON=16, UNISILENCE=32, SPLIT_INTERVAL=64 };
+  static SCM constructor_cxx_function; 
 protected:
   virtual ~Part_combine_music_iterator ();
 
index cd8aace3f05bed0d39a089c7dec6b2a1c04cb88b..71b0441dd2ad439e6c2305287954162aaf544fa9 100644 (file)
@@ -22,6 +22,7 @@ class Property_iterator : public Simple_music_iterator
 {
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function;
   /* construction */
 protected:
   virtual void process (Moment);
@@ -31,6 +32,7 @@ class Push_property_iterator : public Simple_music_iterator
 {
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function;  
 protected:
   /* construction */
   virtual void process (Moment);
@@ -39,6 +41,7 @@ protected:
 class Pop_property_iterator : public Simple_music_iterator
 {
 public:
+  static SCM constructor_cxx_function;
   VIRTUAL_COPY_CONS (Music_iterator);
 protected:
   /* construction */
index beca7dc1d053728839767e5f269b180d684069c0..b222111fe4368b3dbc5712c2b1743505551428d0 100644 (file)
    
    BODY A B C
 
-   is called "semi" folded.  This is common notation
+   is called volta.  This is common notation
 
    BODY A BODY B BODY C
 
    is called unfolded.  Useful for MIDI.
 
-
    If the number of repeats is smaller than the number of alternatives, then
    the excess alternatives are ignored for all timing purposes.
 
@@ -52,21 +51,18 @@ class Repeated_music : public Music
 public:
   Music * body () const;
   Music_sequence * alternatives () const;
-  String type_;
-  
-  bool fold_b_;
-  /// if FOLD_B_ is false, semifold this.
-  bool volta_fold_b_;
 
   /// how often do we repeat?
-  int repeats_i_;
+  int repeat_count( ) const;
   virtual Musical_pitch to_relative_octave (Musical_pitch);
 
-  /// The duration of this piece of music
-  virtual Moment length_mom () const;
   Moment body_length_mom () const;
-  Moment alternatives_length_mom () const;
+  Moment alternatives_length_mom (bool fold) const;
 
+  DECLARE_SCHEME_CALLBACK(unfolded_music_length, (SCM));
+  DECLARE_SCHEME_CALLBACK(volta_music_length, (SCM));
+  DECLARE_SCHEME_CALLBACK(folded_music_length, (SCM));    
+  
   /// Transpose, with the interval central C to #p#
   virtual void transpose (Musical_pitch p);
 
index 5d6602add1cf34a7ed1f938ee57a9c5a08696a62..204598bdd090a0bb50132387d61424de59e0d92b 100644 (file)
@@ -31,6 +31,7 @@ class Request_chord_iterator : public Simple_music_iterator
   enum { NONE_DONE, START_DONE, END_DONE }  status_;
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function;
   Request_chord_iterator ();
   Request_chord_iterator (Request_chord_iterator const&);
 
index a2dee9359dfe013254a0741686aa0097fce9243c..5da129b28661eb9dd1c52ae94979342a8969914f 100644 (file)
@@ -19,6 +19,7 @@ class Sequential_music_iterator :  public Music_iterator
 {
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function;
   Sequential_music_iterator ();
   Sequential_music_iterator (Sequential_music_iterator const&);
   virtual ~Sequential_music_iterator ();
index 963eb0c616e5cbaddbc26b32f624d29e5872aef5..d03601a6dc8b7da09da2b8c2b9ba2061fe129df6 100644 (file)
@@ -18,6 +18,7 @@ protected:
   Moment last_processed_mom_;
 public:
   VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function; 
   Simple_music_iterator ();
   Simple_music_iterator (Simple_music_iterator const &);
   virtual void process (Moment);
index 1198a7dc84b1527585b67f452c13b3d55c3e9040..91971294772b3aac2d0387bc39526e922130b415 100644 (file)
@@ -20,7 +20,8 @@ public:
   Simultaneous_music_iterator ();
   Simultaneous_music_iterator (Simultaneous_music_iterator const&);
   virtual ~Simultaneous_music_iterator ();
-
+  static SCM constructor_cxx_function;
+  
   /// make a new context for every child.
   bool separate_contexts_b_;
   int cursor_i_;
index e18716adc94c99b0b786a32ac921cb4430c0d757..c13e0bdbd63869c49d509194f15b4ebf31020ff8 100644 (file)
@@ -16,6 +16,7 @@ class Time_scaled_music_iterator : public Music_wrapper_iterator
 {
 public:  
   VIRTUAL_COPY_CONS (Music_iterator);
+  static SCM constructor_cxx_function; 
   /* construction */
 protected:
   virtual void process (Moment);
index ef3d20bb27551a616209e0ed64c7de6d75967b35..5a827b54bcfa2c9bac17f4576bcf43ddbf4c49fe 100644 (file)
@@ -9,26 +9,5 @@
 #ifndef TIME_SIGNATURE_PERFORMER_HH
 #define TIME_SIGNATURE_PERFORMER_HH
 
-#include "lily-proto.hh"
-#include "performer.hh"
-
-class Time_signature_performer : public Performer
-{
-public:
-  VIRTUAL_COPY_CONS(Translator);
-  
-  Time_signature_performer();
-  ~Time_signature_performer();
-
-protected:
-
-  virtual bool do_try_music (Music* req_l);
-  virtual void do_process_music();
-  virtual void do_pre_move_processing ();
-
-private:
-  Time_signature_change_req* time_signature_req_l_;
-  Audio_time_signature* audio_p_;
-};
 
 #endif // TIME_SIGNATURE_PERFORMER_HH
index 579b15848499188cc571036b73a7c6ba232f36f1..cc852ca5d70b814b20bf3bbfdc6e3b346af7e002 100644 (file)
 
 class Timing_translator : public virtual Translator
 {
+
+  SCM last_time_sig_;
 public:
   VIRTUAL_COPY_CONS(Translator);
   Timing_translator ();
-  Link_array<Timing_req> timing_req_l_arr_;
+  Music *check_;
 
 protected: 
   virtual void do_creation_processing ();
@@ -32,6 +34,6 @@ protected:
 public:
   Moment measure_position () const;
   Moment measure_length () const;  
-  void set_time_signature (int, int);
+  void set_time_signature ();
 };
 #endif // TIMING_TRANSLATOR_HH
index 3aa3ceae325354e73d2cbaf7f041a17d187042e0..a3c757a38177bbe3ceb86fac69b3636b7ca5b6ac 100644 (file)
@@ -26,6 +26,7 @@ public:
      How often have we done the body (assuming bodies are interspersed.)?
    */
   int done_count_;
+  static SCM constructor_cxx_function; 
 
   /*
     are we now busy doing the body?
@@ -33,6 +34,11 @@ public:
    */
   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.
   */
@@ -56,5 +62,15 @@ protected:
   virtual bool ok () const;
   virtual void next_element (bool side_effect);
 };
+
+class Volta_repeat_iterator : public Unfolded_repeat_iterator
+{
+public:
+  Volta_repeat_iterator ();
+  static  SCM constructor_cxx_function;
+  VIRTUAL_COPY_CONS(Music_iterator);
+};
+
+
 #endif /* UNFOLDED_REPEAT_ITERATOR_HH */
 
index 46f4d3f656f5ec93ea7d69d4c644533425ed9524..554618090640fd3c1c3fe44b36a055706af24d2e 100644 (file)
@@ -64,7 +64,7 @@ Key_engraver::create_key (bool def)
 {
   if (!item_p_) 
     {
-      item_p_ = new Item ( get_property ("KeySignature"));
+      item_p_ = new Item (get_property ("KeySignature"));
 
       item_p_->set_elt_property ("c0-position", gh_int2scm (0));
 
index 208e7034205c25f956e9ba673a80ba4486eba89a..b1c3afab5dca3ee29c1377b9595ba6f1d74253e4 100644 (file)
 #include "musical-request.hh"
 #include "identifier.hh"
 #include "version.hh"
-#include "mudela-version.hh"
+#include "lilypond-input-version.hh"
 #include "translator-def.hh"
 
+/*
+RH 7 fix (?)
+*/
 #define isatty HORRIBLEKLUDGE
 
 void strip_trailing_white (String&);
@@ -240,9 +243,6 @@ HYPHEN              --
                return SCM_T;
        }
        yylval.scm = ly_parse_scm (s, &n);
-       DEBUG_OUT << "Scheme: ";
-       if (flower_dstream)
-               ly_display_scm (yylval.scm);
        
        for (int i=0; i < n; i++)
        {
@@ -401,7 +401,6 @@ HYPHEN              --
 }
 
 [{}]   {
-
        DEBUG_OUT << "parens\n";
        return YYText ()[0];
 }
@@ -487,10 +486,14 @@ My_lily_lexer::scan_escaped_word (String str)
                yylval.scm = sid;
                
                return dynamic_cast<Request*> (mus) ? REQUEST_IDENTIFIER : MUSIC_IDENTIFIER;
+       } else if (unsmob_duration (sid)) {
+               yylval.scm = sid;
+               return DURATION_IDENTIFIER;
        }
 
 
 
+
        Identifier * id = unsmob_identifier (sid);
        if (id) {
                yylval.id = id;
@@ -501,13 +504,11 @@ My_lily_lexer::scan_escaped_word (String str)
        }
 
        if ((YYSTATE != notes) && (YYSTATE != chords)) {
-               SCM pitch = scm_hashq_ref (pitchname_tab_, sym, SCM_BOOL_F);
+               SCM pitch = scm_hashq_get_handle (pitchname_tab_, sym);
                
-               if (pitch != SCM_BOOL_F)
+               if (gh_pair_p (pitch))
                {
-                       yylval.pitch = new Musical_pitch (pitch);
-                       yylval.pitch->set_spot (Input (source_file_l (), 
-                         here_ch_C ()));
+                       yylval.scm = gh_cdr (pitch);
                        return NOTENAME_PITCH;
                }
        }
@@ -524,17 +525,13 @@ My_lily_lexer::scan_bare_word (String str)
 {
        SCM sym = ly_symbol2scm (str.ch_C ());
        if ((YYSTATE == notes) || (YYSTATE == chords)) {
-               SCM pitch = scm_hashq_ref (pitchname_tab_, sym, SCM_BOOL_F);
-               if (pitch != SCM_BOOL_F) {
-                   yylval.pitch = new Musical_pitch (pitch);
-                   yylval.pitch->set_spot (Input (source_file_l (), 
-                     here_ch_C ()));
+               SCM pitch = scm_hashq_get_handle (pitchname_tab_, sym);
+               if (gh_pair_p (pitch)) {
+                   yylval.scm = gh_cdr (pitch);
                     return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
-               } else if ((pitch = scm_hashq_ref (chordmodifier_tab_, sym, SCM_BOOL_F))!= SCM_BOOL_F)
+               } else if ((pitch = scm_hashq_get_handle (chordmodifier_tab_, sym))!= SCM_BOOL_F)
                {
-                   yylval.pitch = new Musical_pitch (pitch);
-                   yylval.pitch->set_spot (Input (source_file_l (), 
-                     here_ch_C ()));
+                   yylval.scm = gh_cdr (pitch);
                    return CHORDMODIFIER_PITCH;
                }
        }
@@ -593,12 +590,12 @@ strip_trailing_white (String&s)
 bool
 valid_version_b (String s)
 {
-  Mudela_version current ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL );
-  Mudela_version ver (s);
+  Lilypond_version current ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL );
+  Lilypond_version ver (s);
   if (!((ver >= oldest_version) && (ver <= current)))
        {       
-               non_fatal_error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), current.str ()));
-               non_fatal_error (_("Consider converting the input with the convert-mudela script")); 
+               non_fatal_error (_f ("incorrect lilypond version: %s (%s, %s)", ver.str (), oldest_version.str (), current.str ()));
+               non_fatal_error (_("Consider converting the input with the convert-ly script")); 
                return false;
     }
   return true;
index 91096bce8efe606d8f758e9ba17a6e281548a658..39dfa8c57e3a4072bed8647193fe1fa4ebbcb57a 100644 (file)
@@ -219,10 +219,12 @@ void add_scm_init_func (void (*f)())
 
   scm_init_funcs_->push (f);
 }
+extern  void init_cxx_function_smobs();
 
 void
 init_lily_guile ()
 {
+  init_cxx_function_smobs();
   for (int i=scm_init_funcs_->size() ; i--;)
     (scm_init_funcs_->elem (i)) ();
 }
index 115a5d3a60fcbd24faf229f668b31a04d4f5ab8b..271b61606ada934c8cc3239d42661bc356f92e06 100644 (file)
@@ -83,9 +83,9 @@ Local_key_engraver::process_acknowledged ()
          Score_element * support_l = support_l_arr_[i];
          Note_req * note_l = mel_l_arr_[i];
 
-         int n = note_l->pitch_.notename_i_;
-         int o = note_l->pitch_.octave_i_;
-         int a = note_l->pitch_.accidental_i_;
+         int n = unsmob_pitch (note_l->get_mus_property ("pitch"))->notename_i_;
+         int o = unsmob_pitch (note_l->get_mus_property ("pitch"))->octave_i () ;
+         int a = unsmob_pitch (note_l->get_mus_property ("pitch"))->alteration_i_;
          
          /* see if there's a tie that "changes" the accidental */
          /* works because if there's a tie, the note to the left
@@ -117,7 +117,7 @@ Local_key_engraver::process_acknowledged ()
                sign (prev_acc) * (prev_acc - a) == 1
                && abs(prev_acc) == 2;
 
-             Local_key_item::add_pitch (key_item_p_, note_l->pitch_,
+             Local_key_item::add_pitch (key_item_p_, *unsmob_pitch (note_l->get_mus_property ("pitch")),
                                         to_boolean (note_l->get_mus_property ("cautionary")),
                                         extra_natural);
              Side_position::add_support (key_item_p_,support_l);
index 1b37fb22a3d8c80e36f57f0b42b43d6b32249e93..5caf3374510378cf69b5c0187c768dcc5cf182be 100644 (file)
 #include "misc.hh"
 #include "lookup.hh"
 
-SCM
+static SCM
 pitch_less  (SCM p1, SCM p2)
 {
-  for (int i = 3; i--; p1 = gh_cdr (p1), p2 = gh_cdr (p2))
-    {
-      if (scm_less_p (gh_car (p1), gh_car (p2)))
-       return SCM_BOOL_T;
-      if (gh_car (p1) != gh_car (p2))
-       return SCM_BOOL_F;
-    }
-  return SCM_BOOL_T;
+  return Musical_pitch::less_p (gh_car (p1),  gh_car (p2));
 }
 
-SCM pitch_less_proc;
-
+static SCM pitch_less_proc;
 
 void
 init_pitch_funcs ()
 {
-  pitch_less_proc = gh_new_procedure2_0 ("pitch-less", &pitch_less);
+  pitch_less_proc = gh_new_procedure2_0 ("pits-less", &pitch_less);
 }
 
-ADD_SCM_INIT_FUNC(pitch,init_pitch_funcs);
+ADD_SCM_INIT_FUNC(lkpitch,init_pitch_funcs);
 
 
 void
 Local_key_item::add_pitch (Score_element*me, Musical_pitch p, bool cautionary, bool natural)
 {
   SCM acs = me->get_elt_property ("accidentals");
-  SCM pitch = p.to_scm ();
+  SCM pitch = p.smobbed_copy ();
   SCM opts = SCM_EOL;
   if (cautionary)
     opts = gh_cons (ly_symbol2scm ("cautionary"), opts);
   if (natural)
     opts = gh_cons (ly_symbol2scm ("natural"), opts);
 
-  pitch = gh_append2 (pitch, opts);
+  pitch = gh_cons (pitch, opts);
   acs = scm_merge_x (acs, gh_cons (pitch, SCM_EOL), pitch_less_proc);
 
   me->set_elt_property ("accidentals", acs);
@@ -90,10 +82,11 @@ Local_key_item::brew_molecule (SCM smob)
   for  (SCM s = accs;
        gh_pair_p (s); s = gh_cdr (s))
     {
-      Musical_pitch p (gh_car (s));
+      Musical_pitch p (*unsmob_pitch (gh_caar (s)));
+      SCM opts = gh_cdar (s);
       
       // do one octave
-      if (p.octave_i_ != lastoct) 
+      if (p.octave_i ()  != lastoct) 
        {
          if (oct_b)
            {
@@ -105,22 +98,22 @@ Local_key_item::brew_molecule (SCM smob)
          oct_b = true; 
        }
       
-      lastoct = p.octave_i_;
+      lastoct = p.octave_i () ;
 
       SCM c0 =  me->get_elt_property ("c0-position");
       Real dy = (gh_number_p (c0) ? gh_scm2int (c0) : 0 + p.notename_i_)
        * note_distance;
       
       Molecule acc (Font_interface::get_default_font (me)->find_by_name (String ("accidentals-")
-                                              + to_str (p.accidental_i_)));
+                                              + to_str (p.alteration_i_)));
       
-      if (scm_memq (ly_symbol2scm ("natural"), gh_car (s)) != SCM_BOOL_F)
+      if (scm_memq (ly_symbol2scm ("natural"), opts) != SCM_BOOL_F)
        {
          Molecule prefix = Font_interface::get_default_font (me)->find_by_name (String ("accidentals-0"));
          acc.add_at_edge(X_AXIS, LEFT, Molecule(prefix), 0);
        }
 
-      if (scm_memq (ly_symbol2scm ("cautionary"), gh_car (s)) != SCM_BOOL_F)
+      if (scm_memq (ly_symbol2scm ("cautionary"), opts) != SCM_BOOL_F)
        acc = parenthesize (me, acc);
 
       acc.translate_axis (dy, Y_AXIS);
index 8ab8f2920a494a6d8dae31a25440f031167dc9f4..72453e56594672c6fb2eef4496760a45d902c7fe 100644 (file)
@@ -108,3 +108,5 @@ Lyric_combine_music_iterator::try_music_in_children (Music *m) const
     return lyric_iter_p_->try_music (m);
 }
 
+
+IMPLEMENT_CTOR_CALLBACK(Lyric_combine_music_iterator);
index dbbbfab278b71d3a48ee90fc03a2a22bbdedc8ac..f474443bcaf96b7308e3ab6b2d65901e115a3502 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "lyric-combine-music.hh"
+#include "lyric-combine-music-iterator.hh"
 #include "musical-pitch.hh"
 
 Lyric_combine_music::Lyric_combine_music (Music * m, Music * l)
@@ -15,7 +16,8 @@ Lyric_combine_music::Lyric_combine_music (Music * m, Music * l)
   set_mus_property ("music", m->self_scm ());
   set_mus_property ("lyrics", l->self_scm ());  
 
-  set_mus_property ("type", ly_symbol2scm ("lyric-combine-music"));
+  set_mus_property ("type",
+                   Lyric_combine_music_iterator::constructor_cxx_function);
 }
 
 
index f5cbd2a9529c73b869354e3c3b550fd4e3b6f3c3..685076461b5b3b5e16ad37078e4568f4dc07fe57 100644 (file)
@@ -40,7 +40,7 @@ Midi_def::set_tempo (Moment one_beat_mom, int beats_per_minute_i)
   Moment beats_per_second = Moment (beats_per_minute_i) / Moment (60);
 
   Moment m = Moment(1)/Moment(beats_per_second * one_beat_mom);
-  scope_p_->set ("whole-in-seconds", m.make_scm());
+  scope_p_->set ("whole-in-seconds", m.smobbed_copy());
 }
 
 
index ff21fb5ebffbf6f5a3a9befe24a4da8bdcc6c41c..7b92cdbdcc4a0959bf67ee06dad57053c266b68d 100644 (file)
@@ -25,7 +25,7 @@ Moment::mark_smob (SCM)
 
 
 SCM
-Moment::make_scm () const
+Moment::smobbed_copy () const
 {
   Moment * m = new Moment (*this);
   return m->smobbed_self();
@@ -59,7 +59,7 @@ make_rational (SCM n, SCM d)
       ::error ("make-moment takes two integer arguments. Using 1/1");
     }
 
-  return m.make_scm ();
+  return m.smobbed_copy ();
 }
 
 
index 0af9158698c0f90cf3e10c9599d5a4a6e8a06f37..c599c57817583f0c2dcf9006e5dca80f30f68832 100644 (file)
@@ -30,8 +30,8 @@ scm_sizet free_smob (SCM)
   return 0;
 }
 
-static
-void start_callback_smobs()
+
+void init_cxx_function_smobs()
 {
   callback_tag = scm_make_smob_type_mfpe ("callback", 0,
                                          mark_smob, free_smob,
@@ -39,7 +39,7 @@ void start_callback_smobs()
 }
 
 SCM
-smobify_callback (Cpp_function cb )
+smobify_cxx_function (Cxx_function cb )
 {
   SCM z;
   
@@ -49,6 +49,16 @@ smobify_callback (Cpp_function cb )
 
   return z;
 }
-  
-ADD_SCM_INIT_FUNC(callback, start_callback_smobs);
+
+
+Cxx_function
+unsmob_cxx_function (SCM x)
+{
+  if (SCM_CELL_TYPE(x) == callback_tag)
+    return (Cxx_function) SCM_CELL_WORD_1(x);
+  else
+    return 0;
+}
+
+
 
index 08f454fae1e303b8d255c0579729d7f2876735ad..93de6c3e3ba30e09186811a34b3265f23e0c3739 100644 (file)
  */
 #include "debug.hh"
 #include "music-iterator.hh"
-#include "property-iterator.hh"
-#include "request-chord-iterator.hh"
-#include "sequential-music-iterator.hh"
-#include "simultaneous-music-iterator.hh"
 #include "translator-group.hh"
-#include "change-iterator.hh"
 #include "music-wrapper.hh"
 #include "music-wrapper-iterator.hh"
-#include "time-scaled-music-iterator.hh"
-#include "repeated-music.hh"
-#include "folded-repeat-iterator.hh"
-#include "unfolded-repeat-iterator.hh"
-#include "grace-iterator.hh"
-#include "lyric-combine-music-iterator.hh"
-#include "auto-change-iterator.hh"
-#include "part-combine-music-iterator.hh"
 #include "simple-music-iterator.hh"
-#include "output-property-music-iterator.hh"
-#include "chord-tremolo-iterator.hh"
 #include "context-specced-music.hh"
 
 Music_iterator::Music_iterator ()
@@ -99,68 +84,20 @@ Music_iterator::get_music (Moment)const
   return SCM_EOL;
 }
 
-
-
-/* We could do this decentrally:
-
- -  Declare a new smob-type, which stores a function ptr in its CDR
-   (and not a struct ptr). The function ptr has signature
-
-       Music_iterator* (*)()
-
- - initialize  all music with a set_mus_property("iterator-ctor"),
-
- - do
-    func_ptr  p = (func_ptr) gh_cdr (get_mus_property ("iterator-ctor"));
-    iter_p = (*p)();
-
-*/
-
 Music_iterator*
 Music_iterator::static_get_iterator_p (Music *m)
 {
   Music_iterator * p =0;
 
   SCM type = m->get_mus_property ("type") ;
-
-  if (type == ly_symbol2scm ("property-set"))
-    p = new Property_iterator;
-  else if (type == ly_symbol2scm ("property-push"))
-    p = new Push_property_iterator;
-  else if (type == ly_symbol2scm ("property-pop"))
-    p = new Pop_property_iterator;
-  else if (type == ly_symbol2scm ("output-property"))
-    p = new Output_property_music_iterator;
-  else if (type == ly_symbol2scm ("request-chord"))
-    p = new Request_chord_iterator;
-  else  if (type == ly_symbol2scm ("lyric-combine-music"))
-    p = new Lyric_combine_music_iterator;
-  else if  (type == ly_symbol2scm ("simultaneous-music"))
-    p =  new Simultaneous_music_iterator;
-  else if (type == ly_symbol2scm ("sequential-music"))
-    p =  new Sequential_music_iterator;
-  else if (type == ly_symbol2scm ("change-translator"))
-    p = new Change_iterator;
-  else if (type == ly_symbol2scm ("time-scaled-music"))
-    p = new Time_scaled_music_iterator;
-  else if (type == ly_symbol2scm ("grace-music"))
-    p = new Grace_iterator;
-  else if (type == ly_symbol2scm ("auto-change-music"))
-    p = new Auto_change_iterator;
-  else if (type == ly_symbol2scm ("part-combined-music"))
-    p = new Part_combine_music_iterator;
-  else if (dynamic_cast<Music_wrapper   *> (m))
-    p = new Music_wrapper_iterator;
-  else if (Repeated_music  * n = dynamic_cast<Repeated_music  *> (m))
+  if (unsmob_cxx_function (type))
     {
-      if (n->type_ == "tremolo")
-       p = new Chord_tremolo_iterator;
-      else if (n->fold_b_)
-       p = new Folded_repeat_iterator;
-      else
-       p = new Unfolded_repeat_iterator;
+      Cxx_function f =  unsmob_cxx_function (type);
+      
+      p = (Music_iterator*) (*f) (SCM_EOL);
     }
+  else if (dynamic_cast<Music_wrapper   *> (m))
+    p = new Music_wrapper_iterator;
   else
     {
       p = new Simple_music_iterator ;
@@ -233,3 +170,4 @@ Music_iterator::try_music_in_children (Music *) const
   return 0;
 }
 
+IMPLEMENT_CTOR_CALLBACK(Music_iterator);
index 81eee92a0276b79eee87dd7861844fb6a9c9c130..1a1847783e67b73972fc82eaf3ede47c37db9030 100644 (file)
@@ -14,6 +14,9 @@
 #include "music-iterator.hh"
 #include "main.hh"
 #include "killing-cons.tcc"
+#include "simultaneous-music-iterator.hh"
+#include "sequential-music-iterator.hh"
+#include "request-chord-iterator.hh"
 
 Moment
 Simultaneous_music::length_mom () const
@@ -24,13 +27,15 @@ Simultaneous_music::length_mom () const
 Simultaneous_music::Simultaneous_music(SCM head)
   : Music_sequence (head)
 {
-  set_mus_property ("type", ly_symbol2scm ("simultaneous-music"));
+  set_mus_property ("type",
+                   Simultaneous_music_iterator::constructor_cxx_function);
 }
 
 Sequential_music::Sequential_music(SCM head)
   : Music_sequence (head)
 {
-  set_mus_property ("type", ly_symbol2scm ("sequential-music"));
+  set_mus_property ("type",
+                   Sequential_music_iterator::constructor_cxx_function);
 }
 
 
@@ -49,7 +54,8 @@ Simultaneous_music::to_relative_octave (Musical_pitch p)
 Request_chord::Request_chord(SCM s)
   : Simultaneous_music (s)
 {
-  set_mus_property ("type", ly_symbol2scm ("request-chord"));
+  set_mus_property ("type",
+                   Request_chord_iterator::constructor_cxx_function);
 }
 
 Musical_pitch
@@ -60,8 +66,11 @@ Request_chord::to_relative_octave (Musical_pitch last)
       Music * mus = unsmob_music (gh_car (s));
       if (Melodic_req *m= dynamic_cast <Melodic_req *> (mus))
        {
-         Musical_pitch &pit = m->pitch_;
+         Musical_pitch pit = *unsmob_pitch (m->get_mus_property ("pitch"));
+         
          pit.to_relative_octave (last);
+         m->set_mus_property ("pitch", pit.smobbed_copy());
+                 
          return pit;
        }
     }
index 132ba004d4be482a1dc50f8f55eb85161e82c736..096eee314016ebcde462296a9ebcafbbf157cbfd 100644 (file)
@@ -80,3 +80,5 @@ Music_wrapper_iterator::try_music_in_children (Music *m) const
 {
   return child_iter_p_->try_music (m);
 }
+
+IMPLEMENT_CTOR_CALLBACK(Music_wrapper_iterator);
index 5cf0e7847621f0ba70cc498ab1b7c5b6088baf2a..e12ea41ea5070633c13ac23b0dbad428bf100bb6 100644 (file)
@@ -69,6 +69,15 @@ Music::compress (Moment)
 Moment
 Music::length_mom () const
 {
+  SCM l = get_mus_property ("length");
+  if (unsmob_moment (l))
+    return *unsmob_moment(l);
+  else if (gh_procedure_p (l))
+    {
+      SCM res = gh_call1(l, self_scm( ));
+      return *unsmob_moment(res);
+    }
+    
   return 0;
 }
 
index 5a834db780a0f6d28a521edd612e8f47905b979f..9a798b59e9cef1ba00d0be6bc29122c9c5daa43b 100644 (file)
@@ -9,6 +9,7 @@
 #include "musical-pitch.hh"
 #include "debug.hh"
 #include "main.hh"
+#include "ly-smobs.icc"
 
 int
 compare (Array<Musical_pitch>* left, Array<Musical_pitch>* right)
@@ -31,37 +32,35 @@ compare (Array<Musical_pitch>* left, Array<Musical_pitch>* right)
   return 0;
 }
 
-SCM
-Musical_pitch::to_scm ()const
+Musical_pitch::Musical_pitch (int o, int n, int a)
 {
-  return gh_list (gh_int2scm (octave_i_),
-                 gh_int2scm (notename_i_),
-                 gh_int2scm (accidental_i_),
-                 SCM_UNDEFINED);
-}
-
+  notename_i_ = n;
+  alteration_i_ = a;
+  octave_i_ = o;
 
-Musical_pitch::Musical_pitch (SCM s)
-{
-  octave_i_ = gh_scm2int (gh_car (s));
-  notename_i_ = gh_scm2int (gh_cadr (s));
-  accidental_i_ = gh_scm2int (gh_caddr (s));
+  if (n < 0 || n >= 7 ||
+      a < -2 || a > 2)
+    {
+      String s = _("Pitch arguments out of range");
+      s += ": alteration = " + to_str (a);
+      s += ", notename = " + to_str (n);
+      warning (s);
+    }
 }
 
-Musical_pitch::Musical_pitch (int n, int a, int o)
+Musical_pitch::Musical_pitch ()
 {
-  notename_i_ = n;
-  accidental_i_ = a;
-  octave_i_ = o;
+  notename_i_ = 0;
+  alteration_i_ = 0;
+  octave_i_ = 0;
 }
 
-
 int
 Musical_pitch::compare (Musical_pitch const &m1, Musical_pitch const &m2)
 {
-    int o=  m1.octave_i_ - m2.octave_i_;
+  int o=  m1.octave_i_ - m2.octave_i_;
   int n = m1.notename_i_ - m2.notename_i_;
-  int a = m1.accidental_i_ - m2.accidental_i_;
+  int a = m1.alteration_i_ - m2.alteration_i_;
 
   if (o)
        return o;
@@ -79,14 +78,14 @@ Musical_pitch::steps () const
 }
 
 /*
-  should be settable from input to allow "viola"-mode
+  should be settable from input?
  */
 static Byte pitch_byte_a[  ] = { 0, 2, 4, 5, 7, 9, 11 };
 
 int
 Musical_pitch::semitone_pitch () const
 {
-  return  pitch_byte_a[ notename_i_ % 7 ] + accidental_i_ + octave_i_ * 12;
+  return  pitch_byte_a[ notename_i_ % 7 ] + alteration_i_ + octave_i_ * 12;
 }
 
 void
@@ -106,7 +105,7 @@ Musical_pitch::transpose (Musical_pitch delta)
 
   int new_pitch = semitone_pitch ();
   int delta_acc = new_pitch - old_pitch - delta_pitch;
-  accidental_i_ -= delta_acc;
+  alteration_i_ -= delta_acc;
 }
 
 
@@ -123,8 +122,8 @@ Musical_pitch::str () const
 {
   int n = (notename_i_ + 2) % 7;
   String s = to_str (char(n + 'a'));
-  if (accidental_i_)
-    s += String (accname[accidental_i_ + 2]);
+  if (alteration_i_)
+    s += String (accname[alteration_i_ + 2]);
 
   if (octave_i_ > 0)
     {
@@ -154,8 +153,8 @@ Musical_pitch::to_relative_octave (Musical_pitch p)
   Musical_pitch up_pitch (p);
   Musical_pitch down_pitch (p);
 
-  up_pitch.accidental_i_ = accidental_i_;
-  down_pitch.accidental_i_ = accidental_i_;
+  up_pitch.alteration_i_ = alteration_i_;
+  down_pitch.alteration_i_ = alteration_i_;
   
   Musical_pitch n = *this;
   up_pitch.up_to (notename_i_);
@@ -193,3 +192,157 @@ Musical_pitch::down_to (int notename)
   notename_i_ = notename;
 }
 
+/****************************************************************/
+
+
+IMPLEMENT_TYPE_P(Musical_pitch, "pitch?");
+IMPLEMENT_UNSMOB(Musical_pitch, pitch);
+SCM
+Musical_pitch::mark_smob (SCM )
+{
+  return SCM_EOL;
+}
+
+IMPLEMENT_SIMPLE_SMOBS(Musical_pitch);
+
+
+int
+Musical_pitch::print_smob (SCM s, SCM port, scm_print_state *)
+{
+  Musical_pitch  *r = (Musical_pitch *) gh_cdr (s);
+     
+  scm_puts ("#<Musical_pitch ", port);
+  scm_display (gh_str02scm (r->str().ch_C()), port);
+  scm_puts (" >", port);
+  
+  return 1;
+}
+
+SCM
+Musical_pitch::equal_p (SCM a , SCM b)
+{
+  Musical_pitch  *p = (Musical_pitch *) gh_cdr (a);
+  Musical_pitch  *q = (Musical_pitch *) gh_cdr (b);  
+
+  bool eq = p->notename_i_ == q->notename_i_
+    && p->octave_i_ == q->octave_i_
+    && p->alteration_i_ == q->alteration_i_;
+
+  return eq ? SCM_BOOL_T : SCM_BOOL_F;
+}
+
+MAKE_SCHEME_CALLBACK(Musical_pitch, less_p, 2);
+SCM
+Musical_pitch::less_p (SCM p1, SCM p2)
+{
+  Musical_pitch *a = unsmob_pitch (p1);
+  Musical_pitch *b = unsmob_pitch (p2);
+
+  if (compare(*a, *b) < 0 )
+    return SCM_BOOL_T;
+  else
+    return SCM_BOOL_F;
+}
+
+/*
+  should add optional args
+ */
+
+static SCM
+make_pitch (SCM o, SCM n, SCM a)
+{
+  Musical_pitch p;
+  p.octave_i_ = gh_scm2int (o);    
+  p.notename_i_ = gh_scm2int (n);
+  p.alteration_i_ = gh_scm2int (a);
+  return p.smobbed_copy ();
+}
+
+static SCM
+pitch_octave (SCM pp)
+{
+  Musical_pitch *p = unsmob_pitch (pp);
+  int q = 0;
+  if (!p)
+    warning ("Not a pitch");
+  else
+    q = p->octave_i();
+
+  return gh_int2scm (q);
+}
+
+static SCM
+pitch_alteration (SCM pp)
+{
+  Musical_pitch *p = unsmob_pitch (pp);
+  int q = 0;
+  if (!p)
+    warning ("Not a pitch");
+  else
+    q = p->alteration_i();
+
+  return gh_int2scm (q);
+}
+
+static SCM
+pitch_notename (SCM pp)
+{
+  Musical_pitch *p = unsmob_pitch (pp);
+  int q = 0;
+  if (!p)
+    warning ("Not a pitch");
+  else
+    q = p->notename_i();
+
+  return gh_int2scm (q);
+}
+
+static SCM
+pitch_semitones (SCM pp)
+{
+  Musical_pitch *p = unsmob_pitch (pp);
+  int q = 0;
+  if (!p)
+    warning ("Not a pitch");
+  else
+    q = p->steps();
+
+  return gh_int2scm (q);
+}
+
+static void
+add_funcs()
+{
+  scm_make_gsubr ("make-pitch", 3, 0, 0, (Scheme_function_unknown)make_pitch);
+  scm_make_gsubr ("pitch-octave", 1, 0, 0, (Scheme_function_unknown)pitch_octave);
+  scm_make_gsubr ("pitch-notename", 1, 0, 0, (Scheme_function_unknown)pitch_notename);
+  scm_make_gsubr ("pitch-alteration", 1, 0, 0, (Scheme_function_unknown)pitch_alteration);
+  scm_make_gsubr ("pitch-semitones", 1, 0, 0, (Scheme_function_unknown)pitch_semitones);
+}
+
+ADD_SCM_INIT_FUNC(pitch, add_funcs);
+
+SCM
+Musical_pitch::smobbed_copy ()const
+{
+  Musical_pitch *  p = new Musical_pitch (*this);
+  return p->smobbed_self ();
+}
+
+int
+Musical_pitch::octave_i ()const
+{
+  return octave_i_;
+}
+
+int
+Musical_pitch::notename_i () const
+{
+  return notename_i_;
+}
+
+int
+Musical_pitch::alteration_i () const
+{
+  return alteration_i_;
+}
index 0e7ad15a80894af38fd00ffed4d7ee07ae0aebc6..15c881df049f34685e2b2ae4d2da79422cf8d34d 100644 (file)
@@ -20,32 +20,24 @@ Tremolo_req::Tremolo_req ()
 void
 Melodic_req::transpose (Musical_pitch delta)
 {
-  pitch_.transpose (delta);
+  Musical_pitch p = *unsmob_pitch (get_mus_property ("pitch"));
   
-  if (abs (pitch_.accidental_i_) > 2)
+  p.transpose (delta);
+  
+  if (abs (p.alteration_i_) > 2)
     {
        warning (_f ("Transposition by %s makes accidental larger than two",
          delta.str ()));
     }
+
+  set_mus_property ("pitch", p.smobbed_copy ());
 }
 
 bool
 Melodic_req::do_equal_b (Request const* r) const
 {
   Melodic_req const* m= dynamic_cast <Melodic_req const*> (r);
-  return m&& !compare (*m, *this);
-}
-
-int
-Melodic_req::compare (Melodic_req const &m1 , Melodic_req const&m2)
-{
-  return Musical_pitch::compare (m1.pitch_, m2.pitch_);
-}
-
-int
-Rhythmic_req::compare (Rhythmic_req const &r1, Rhythmic_req const &r2)
-{
-  return (r1.length_mom () - r2.length_mom ());
+  return m; // && !compare (*m, *this);
 }
 
 bool
@@ -53,7 +45,7 @@ Rhythmic_req::do_equal_b (Request const* r) const
 {
   Rhythmic_req const* rh = dynamic_cast <Rhythmic_req const*> (r);
 
-  return rh && !compare (*this, *rh);
+  return rh; // ;  && !compare (*this, *rh);
 }
 
 
@@ -61,16 +53,17 @@ Rhythmic_req::do_equal_b (Request const* r) const
 Moment
 Rhythmic_req::length_mom () const
 {
-  return duration_.length_mom ();
+  return  unsmob_duration (  get_mus_property( "duration"))->length_mom ();
+
 }
 
 void
 Rhythmic_req::compress (Moment m)
 {
-  duration_.compress (m);
-}
-
+  Duration *d =  unsmob_duration (get_mus_property( "duration"));
 
+  set_mus_property ("duration", d ->compressed (m).smobbed_copy());
+}
 
 bool
 Note_req::do_equal_b (Request const* r) const
index a44e3c6d4589ef1cbe2ef7477368df263508c53f..14b22940d8a7eb9ef12bb7ab013d716dd5507707 100644 (file)
@@ -19,7 +19,7 @@ My_lily_parser::My_lily_parser (Sources * source_l)
 {
   source_l_ = source_l;
   lexer_p_ = 0;
-  default_duration_.durlog_i_ = 2;
+  default_duration_ = Duration (2,0);
   error_level_i_ = 0;
 
 
index dde7969295f8716cea2934f8411a4405e1e1d92c..10956eefbbab528d5dbd1ec39c2fe95faf050aa9 100644 (file)
@@ -127,12 +127,6 @@ Note_column::set_dotcol (Score_element*me,Score_element *d)
 
 
 
-Interval
-Note_column::rest_dim (Score_element*me) 
-{
-  Score_element * r = unsmob_element (me->get_elt_property ("rest"));
-  return r->extent (r, Y_AXIS);        // ??
-}
 
 Score_element*
 Note_column::first_head (Score_element*me) 
index ec47cb0442d293f67f874d045d35a240ab535cf1..414e2aedbb561bfeda46b3d1f2fb76e47ae45175 100644 (file)
@@ -86,28 +86,29 @@ Note_heads_engraver::do_process_music()
 
 
       
-      Note_req * note_req_l = note_req_l_arr_[i];
+      Music * req = note_req_l_arr_[i];
       
+      Duration dur   = *unsmob_duration (req->get_mus_property ("duration"));
       note_p->set_elt_property ("duration-log",
-                               gh_int2scm (note_req_l->duration_.durlog_i_ <? 2));
+                               gh_int2scm (dur.duration_log () <? 2));
 
-      if (note_req_l->duration_.dots_i_)
+      if (dur.dot_count ())
        {
          Item * d = new Item (get_property ("Dots"));
          Rhythmic_head::set_dots (note_p, d);
          
-         if (note_req_l->duration_.dots_i_
+         if (dur.dot_count ()
              != gh_scm2int (d->get_elt_property ("dot-count")))
-           d->set_elt_property ("dot-count", gh_int2scm (note_req_l->duration_.dots_i_));
+           d->set_elt_property ("dot-count", gh_int2scm (dur.dot_count ()));
 
          d->set_parent (note_p, Y_AXIS);
          announce_element (d,0);
          dot_p_arr_.push (d);
        }
 
-      note_p->set_elt_property("staff-position",  gh_int2scm (note_req_l->pitch_.steps ()));
+      note_p->set_elt_property("staff-position",  gh_int2scm (unsmob_pitch (req->get_mus_property ("pitch"))->steps ()));
 
-      announce_element (note_p,note_req_l);
+      announce_element (note_p,req);
       note_p_arr_.push (note_p);
     }
 }
index df2c4872143ba67e697c69f43865798de11e026b..b5ce78e561951312a925ea3e5735dda647ef0f8a 100644 (file)
@@ -42,7 +42,7 @@ Note_name_engraver::do_process_music ()
     {
       if (i)
        s += " ";
-      s += req_l_arr_[i]->pitch_.str ();
+      s += unsmob_pitch (req_l_arr_[i]->get_mus_property ("pitch"))->str ();
     }
   if (s.length_i())
     {
index 9433e8714cd4faab68ef2bfbad65cf840dc0d39f..946b604c00ca1dd262ed0dcb48c2306efd693151 100644 (file)
@@ -36,7 +36,8 @@ Note_performer::do_process_music ()
       while (note_req_l_arr_.size ())
        {
          Note_req* n = note_req_l_arr_.pop ();
-         Audio_note* p = new Audio_note (n->pitch_, n->length_mom (), transposing_i);
+         Musical_pitch pit =  * unsmob_pitch (n->get_mus_property ("pitch"));
+         Audio_note* p = new Audio_note (pit,  n->length_mom (), transposing_i);
          Audio_element_info info (p, n);
          announce_element (info);
          note_p_arr_.push (p);
index ad596bea3e0c4fe0cc0f449d9cc7413aa345c463..9f0338afe3065b12c1c0c67221d9ae310bc14a45 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "engraver.hh"
 #include "score-element.hh"
+#include "output-property-music-iterator.hh"
 
 class Output_property_engraver : public Engraver
 {
@@ -39,7 +40,8 @@ protected:
 bool
 Output_property_engraver::do_try_music (Music* m)
 {
-  if (m->get_mus_property ("type") ==  ly_symbol2scm ("output-property"))
+  if (m->get_mus_property ("type") ==
+      Output_property_music_iterator::constructor_cxx_function)
     {
       props_.push (m);
       return true;
index f2376b6b8c7eebeab0802571a2b25739b37e2bd2..0cf119c3ea19f467b3b78cba8b70c0972c7d34aa 100644 (file)
@@ -23,3 +23,5 @@ Output_property_music_iterator::process (Moment m)
 
   skip (m);
 }
+
+IMPLEMENT_CTOR_CALLBACK(Output_property_music_iterator);
index ec2cbab2c5e02947dda59cfec33a4372dcaefd6b..2c2f1790198e2f3c3cf5a7a39045067f342930e2 100644 (file)
@@ -194,7 +194,7 @@ Paper_outputter::output_version ()
   else
     id_str += String (", ") + version_str ();
 
-  output_String_def ( "mudelatagline", id_str);
+  output_String_def ( "lilypondtagline", id_str);
   output_String_def ( "LilyPondVersion", version_str ());
 }
 
index 2cc6685bf389591f86fc91d7e2734996b9b28122..362dbbf3cd1359c77523db0118b0f09d649acea6 100644 (file)
@@ -100,15 +100,15 @@ Paper_score::process ()
   outputter_l_->output_version ();
   
   if (header_global_p)
-    outputter_l_->output_scope (header_global_p, "mudela");
+    outputter_l_->output_scope (header_global_p, "lilypond");
   if (header_l_)
-    outputter_l_->output_scope (header_l_, "mudela");
+    outputter_l_->output_scope (header_l_, "lilypond");
 
   outputter_l_->output_comment (_ ("Outputting Score, defined at: "));
   outputter_l_->output_comment (origin_str_);
 
   if (paper_l_->scope_p_)
-    outputter_l_->output_scope (paper_l_->scope_p_, "mudelapaper");
+    outputter_l_->output_scope (paper_l_->scope_p_, "lilypondpaper");
 
   SCM scm;
   if (experimental_features_global_b)
index 6853bc91fd8e0eb963130a490d45f858d8428d66..8b1fd7b85bfed59f21aec298c040813d13047cb6 100644 (file)
@@ -1,7 +1,7 @@
 %{ // -*-Fundamental-*-
 
 /*
-  parser.yy -- Bison/C++ parser for mudela
+  parser.yy -- Bison/C++ parser for lilypond
 
   source file of the GNU LilyPond music typesetter
 
@@ -12,8 +12,7 @@
 #include <iostream.h>
 #include "translator-def.hh"
 #include "lily-guile.hh"
-
-#include "lookup.hh"
+#include "change-iterator.hh"
 #include "misc.hh"
 #include "my-lily-lexer.hh"
 #include "paper-def.hh"
@@ -29,7 +28,8 @@
 #include "context-specced-music.hh"
 #include "score.hh"
 #include "music-list.hh"
-
+#include "output-property-music-iterator.hh"
+#include "property-iterator.hh"
 #include "file-results.hh"
 #include "input.hh"
 #include "scope.hh"
@@ -38,7 +38,7 @@
 #include "transposed-music.hh"
 #include "time-scaled-music.hh"
 #include "repeated-music.hh"
-#include "mudela-version.hh"
+#include "lilypond-input-version.hh"
 #include "grace-music.hh"
 #include "auto-change-music.hh"
 #include "part-combine-music.hh"
@@ -52,11 +52,21 @@ is_duration_b (int t)
 }
 
 
+void
+set_music_properties (Music *p, SCM a)
+{
+  for (SCM k = a; gh_pair_p (k); k = gh_cdr (k))
+       {
+       p->set_mus_property (gh_caar (k), gh_cdar (k));
+       }
+}
+
+
 // mmm JUNKME ?
-Mudela_version oldest_version ("1.3.59");
+Lilypond_version oldest_version ("1.3.59");
 
 void
-print_mudela_versions (ostream &os)
+print_lilypond_versions (ostream &os)
 {
   os << _f ("Oldest supported input version: %s", oldest_version.str ()) 
     << endl;
@@ -83,9 +93,8 @@ print_mudela_versions (ostream &os)
 
 
 %union {
-    Array<Musical_pitch> *pitch_arr;
+
     Link_array<Request> *reqvec;
-    Duration *duration;
     Identifier *id;
     String * string;
     Music *music;
@@ -94,7 +103,7 @@ print_mudela_versions (ostream &os)
 
     Musical_req* musreq;
     Music_output_def * outputdef;
-    Musical_pitch * pitch;
+
     Midi_def* midi;
     Real real;
     Request * request;
@@ -141,6 +150,7 @@ yylex (YYSTYPE *s,  void * v_l)
 %token CLEF
 %token CM_T
 %token CONSISTS
+%token DURATION
 %token SEQUENTIAL
 %token ELEMENTDESCRIPTIONS
 %token SIMULTANEOUS
@@ -195,12 +205,12 @@ yylex (YYSTYPE *s,  void * v_l)
 %token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER 
 %token CHORD_BASS CHORD_COLON CHORD_MINUS CHORD_CARET 
 
-%type <i>      exclamations questions
+%type <i>      exclamations questions dots
 %token <i>     DIGIT
-%token <pitch> NOTENAME_PITCH
-%token <pitch> TONICNAME_PITCH
-%token <pitch> CHORDMODIFIER_PITCH
-%token <id>    DURATION_IDENTIFIER
+%token <scm>   NOTENAME_PITCH
+%token <scm>   TONICNAME_PITCH
+%token <scm>   CHORDMODIFIER_PITCH
+%token <scm>   DURATION_IDENTIFIER
 %token <id>    IDENTIFIER
 
 
@@ -211,14 +221,14 @@ yylex (YYSTYPE *s,  void * v_l)
 %token <scm>   REQUEST_IDENTIFIER
 %token <scm>   MUSIC_IDENTIFIER TRANSLATOR_IDENTIFIER
 %token <scm>   STRING_IDENTIFIER SCM_IDENTIFIER 
-%token <scm>   DURATION RESTNAME
+%token <scm>   RESTNAME
 %token <scm>   STRING 
 %token <scm>   SCM_T
 %token <i>     UNSIGNED
 %token <real>   REAL
 
 %type <outputdef> output_def
-%type <scope>  mudela_header mudela_header_body
+%type <scope>  lilypond_header lilypond_header_body
 %type <request>        open_request_parens close_request_parens open_request close_request
 %type <request> request_with_dir request_that_take_dir verbose_request
 %type <i>      sub_quotes sup_quotes
@@ -230,18 +240,18 @@ yylex (YYSTYPE *s,  void * v_l)
 
 %type <scm>    identifier_init 
 
-%type <duration> steno_duration optional_notemode_duration
-%type <duration> entered_notemode_duration explicit_duration
+%type <scm> steno_duration optional_notemode_duration
+%type <scm> entered_notemode_duration explicit_duration
        
 %type <reqvec>  pre_requests post_requests
 %type <request> gen_text_def
-%type <pitch>   steno_musical_pitch musical_pitch absolute_musical_pitch
-%type <pitch>   steno_tonic_pitch
+%type <scm>   steno_musical_pitch musical_pitch absolute_musical_pitch
+%type <scm>   steno_tonic_pitch
 
-%type <pitch_arr>      chord_additions chord_subtractions chord_notes chord_step
+%type <scm>    chord_additions chord_subtractions chord_notes chord_step
 %type <music>  chord
-%type <pitch>  chord_note chord_inversion chord_bass
-%type <duration>       duration_length
+%type <scm>    chord_note chord_inversion chord_bass
+%type <scm>    duration_length
 
 %type <scm>  embedded_scm scalar
 %type <music>  Music Sequential_music Simultaneous_music Music_sequence
@@ -270,14 +280,14 @@ yylex (YYSTYPE *s,  void * v_l)
 
 %%
 
-mudela:        /* empty */
-       | mudela toplevel_expression {}
-       | mudela assignment  { }
-       | mudela error {
+lilypond:      /* empty */
+       | lilypond toplevel_expression {}
+       | lilypond assignment  { }
+       | lilypond error {
                THIS->error_level_i_  = 1;
                //THIS->parser_error (_ ("ly invalid"));
        }
-       | mudela INVALID        {
+       | lilypond INVALID      {
                THIS->error_level_i_  = 1;
                //THIS->parser_error (_ ("ly invalid"));
        }
@@ -290,7 +300,7 @@ toplevel_expression:
        | chordmodifiers_block                  {
                THIS->lexer_p_->chordmodifier_tab_  = $1;
        }
-       | mudela_header {
+       | lilypond_header {
                delete header_global_p;
                header_global_p = $1;
        }
@@ -332,29 +342,30 @@ notenames_body:
          int i = scm_ilength ($1);
 
          SCM tab = scm_make_vector (gh_int2scm (i), SCM_EOL);
-         for (SCM s = $1; s != SCM_EOL; s = gh_cdr (s)) {
+         for (SCM s = $1; gh_pair_p (s); s = gh_cdr (s)) {
                SCM pt = gh_cdar (s);
-               if (scm_ilength (pt) != 3)
-                       THIS->parser_error ("Need three args");
-               scm_hashq_set_x (tab, gh_caar(s), pt);
+               if (!unsmob_pitch (pt))
+                       THIS->parser_error ("Need pitch object.");
+               else
+                       scm_hashq_set_x (tab, gh_caar(s), pt);
          }
 
          $$ = tab;
        }
        ;
 
-mudela_header_body:
+lilypond_header_body:
        {
                $$ = new Scope;
                THIS->lexer_p_-> scope_l_arr_.push ($$);
        }
-       | mudela_header_body assignment semicolon { 
+       | lilypond_header_body assignment semicolon { 
 
        }
        ;
 
-mudela_header:
-       HEADER '{' mudela_header_body '}'       {
+lilypond_header:
+       HEADER '{' lilypond_header_body '}'     {
                $$ = $3;
                THIS->lexer_p_-> scope_l_arr_.pop ();           
        }
@@ -405,7 +416,7 @@ identifier_init:
                scm_unprotect_object ($$);
        }
        | explicit_duration {
-               $$ = (new Duration_identifier ($1, DURATION_IDENTIFIER))->self_scm ();
+               $$ = $1;
        }
        | number_expression {
                $$ = $1;
@@ -523,7 +534,7 @@ score_body:
        | SCORE_IDENTIFIER {
                $$ = $1->access_content_Score (true);
        }
-       | score_body mudela_header      {
+       | score_body lilypond_header    {
                $$->header_p_ = $2;
        }
        | score_body output_def {
@@ -604,9 +615,8 @@ music_output_def_body:
 tempo_request:
        TEMPO steno_duration '=' bare_unsigned  {
                $$ = new Tempo_req;
-               $$->dur_ = *$2;
-               delete $2;
-               $$-> set_mus_property ("metronome-count", gh_int2scm ( $4));
+               $$->set_mus_property ("duration", $2);
+               $$->set_mus_property ("metronome-count", gh_int2scm ( $4));
        }
        ;
 
@@ -655,12 +665,13 @@ Repeated_music:
                if (m && $3 < m->length_i ())
                        $5->origin ()->warning (_ ("More alternatives than repeats.  Junking excess alternatives."));
 
+               SCM func = scm_eval2 (ly_symbol2scm ("repeat-name-to-ctor"), SCM_EOL);
+               SCM result = gh_call1 (func, $2);
                Repeated_music * r = new Repeated_music ($4, $3 >? 1, m);
-               $$ = r;
-               r->type_ = ly_scm2string ($2);
-               r->fold_b_ = (r->type_ == "fold");
-               r->volta_fold_b_ =  (r->type_ == "volta");
+               set_music_properties (r, result);
+
                r->set_spot (*$4->origin ());
+               $$ = r;
        }
        ;
 
@@ -705,7 +716,8 @@ Simple_music:
          m->set_mus_property ("predicate", pred);
          m->set_mus_property ("symbol", $3);
          m->set_mus_property ("value",  $5);
-         m->set_mus_property ("type", ly_symbol2scm ("output-property"));
+         m->set_mus_property ("type",
+                       Output_property_music_iterator::constructor_cxx_function);
 
                $$ = m;
        }
@@ -766,12 +778,10 @@ Composite_music:
        | Simultaneous_music            { $$ = $1; }
        | Sequential_music              { $$ = $1; }
        | TRANSPOSE musical_pitch Music {
-               $$ = new Transposed_music ($3, *$2);
-               delete $2; // ugh
+               $$ = new Transposed_music ($3, *unsmob_pitch ($2));
        }
        | TRANSPOSE steno_tonic_pitch Music {
-               $$ = new Transposed_music ($3, *$2);
-               delete $2; // ugh
+               $$ = new Transposed_music ($3, *unsmob_pitch ($2));
        }
        | APPLY embedded_scm Music  {
                SCM ret = gh_call1 ($2, $3->self_scm ());
@@ -809,8 +819,7 @@ Composite_music:
 
 relative_music:
        RELATIVE absolute_musical_pitch Music {
-               $$ = new Relative_octave_music ($3, *$2);
-               delete $2; // ugh
+               $$ = new Relative_octave_music ($3, *unsmob_pitch ($2));
        }
        ;
 
@@ -832,7 +841,7 @@ translator_change:
        TRANSLATOR STRING '=' STRING  {
                Music * t = new Music;
                t->set_mus_property ("type",
-                       ly_symbol2scm ("change-translator"));
+                       Change_iterator::constructor_cxx_function);
                t-> set_mus_property ("change-to-type", $2);
                t-> set_mus_property ("change-to-id", $4);
 
@@ -845,7 +854,8 @@ property_def:
        PROPERTY STRING '.' STRING '='  scalar {
                Music *t = new Music;
 
-               t->set_mus_property ("type", ly_symbol2scm ("property-set"));
+               t->set_mus_property ("type",
+                       Property_iterator::constructor_cxx_function);
                t->set_mus_property ("symbol", scm_string_to_symbol ($4));
                t->set_mus_property ("value", $6);
 
@@ -857,7 +867,8 @@ property_def:
        }
        | PROPERTY STRING '.' STRING PUSH embedded_scm '=' embedded_scm {
                Music *t = new Music;
-               t->set_mus_property ("type", ly_symbol2scm ("property-push"));
+               t->set_mus_property ("type",
+                       Push_property_iterator::constructor_cxx_function);
                t->set_mus_property ("symbols", scm_string_to_symbol ($4));
                t->set_mus_property ("element-property", $6);
                t->set_mus_property ("element-value", $8);
@@ -869,7 +880,8 @@ property_def:
        }
        | PROPERTY STRING '.' STRING POP embedded_scm {
                Music *t = new Music;
-               t->set_mus_property ("type", ly_symbol2scm ("property-pop"));
+               t->set_mus_property ("type",
+                       Pop_property_iterator::constructor_cxx_function);
                t->set_mus_property ("symbols", scm_string_to_symbol ($4));
                t->set_mus_property ("element-property", $6);
 
@@ -914,7 +926,8 @@ command_element:
        | BAR STRING ';'                        {
                Music *t = new Music;
 
-               t->set_mus_property ("type", ly_symbol2scm ("property-set"));
+               t->set_mus_property ("type",
+                       Property_iterator::constructor_cxx_function);
                t->set_mus_property ("symbol", ly_symbol2scm ("whichBar"));
                t->set_mus_property ("value", $2);
 
@@ -927,11 +940,12 @@ command_element:
        | PARTIAL duration_length ';'   {
                Music * p = new Music;
                p->set_mus_property ("symbol", ly_symbol2scm ( "measurePosition"));
-               p->set_mus_property ("type", ly_symbol2scm ("property-set"));
+               p->set_mus_property ("type",
+                       Property_iterator::constructor_cxx_function);
+
+               Moment m = - unsmob_duration($2)->length_mom ();
+               p->set_mus_property ("value", m.smobbed_copy ());
 
-               Moment m = - $2->length_mom ();
-               p->set_mus_property ("value", m.make_scm());
-               delete $2; // ugh
                Context_specced_music * sp = new Context_specced_music (p);
                $$ =sp ;
                sp-> set_mus_property ("context-type", ly_str02scm ( "Score"));
@@ -940,12 +954,10 @@ command_element:
                SCM func = scm_eval2 (ly_symbol2scm ("clef-name-to-properties"), SCM_EOL);
                SCM result = gh_call1 (func, $2);
 
-               SCM l = SCM_EOL; 
+               SCM l = SCM_EOL;
                for (SCM s = result ; gh_pair_p (s); s = gh_cdr (s)) {
                        Music * p = new Music;
-                       for (SCM k = gh_car (s) ; gh_pair_p (k); k = gh_cdr (k)) {
-                               p->set_mus_property (gh_caar (k), gh_cdar (k));
-                       }
+                       set_music_properties(p, gh_car (s));
                        l = gh_cons (p->self_scm (), l);
                        scm_unprotect_object (p->self_scm ());
                }
@@ -955,6 +967,20 @@ command_element:
                $$ =sp ;
                sp-> set_mus_property("context-type", ly_str02scm("Staff"));
        }
+       | TIME_T bare_unsigned '/' bare_unsigned ';' {
+               Music * p = new Music;
+               p->set_mus_property ("symbol",
+                       ly_symbol2scm ( "timeSignatureFraction"));
+               p->set_mus_property ("type",
+                       Property_iterator::constructor_cxx_function);
+
+               p->set_mus_property ("value", gh_cons (gh_int2scm ($2),
+                                                       gh_int2scm ($4)));
+
+               Context_specced_music * sp = new Context_specced_music (p);
+               $$ =sp ;
+               sp-> set_mus_property ("context-type", ly_str02scm ( "Score"));
+       }
        ;
 
 command_req:
@@ -1016,13 +1042,6 @@ verbose_command_req:
                m->set_mus_property ("label",  gh_int2scm ($2));
                $$ = m;
        }
-
-       | TIME_T bare_unsigned '/' bare_unsigned        {
-               Time_signature_change_req *m = new Time_signature_change_req;
-               m->set_mus_property ("beats", gh_int2scm ( $2));
-               m->set_mus_property ("one-beat", gh_int2scm ($4));
-               $$ = m;
-       }
        | PENALTY bare_int      {
                Break_req * b = new Break_req;
                b->set_mus_property ("penalty", gh_double2scm ( $2 / 100.0));
@@ -1031,8 +1050,8 @@ verbose_command_req:
        }
        | SKIP duration_length {
                Skip_req * skip_p = new Skip_req;
-               skip_p->duration_ = *$2;
-               delete $2; // ugh
+               skip_p->set_mus_property ("duration", $2);
+
                $$ = skip_p;
        }
        | tempo_request {
@@ -1046,7 +1065,7 @@ verbose_command_req:
                Key_change_req *key_p= new Key_change_req;
                
                key_p->set_mus_property ("pitch-alist", $3);
-               ((Music* )key_p)->transpose (* $2);
+               ((Music* )key_p)->transpose (* unsmob_pitch ($2));
                $$ = key_p; 
        }
        ;
@@ -1161,26 +1180,38 @@ steno_musical_pitch:
                $$ = $1;
        }
        | NOTENAME_PITCH sup_quotes     {
-               $$ = $1;
-               $$->octave_i_ +=  $2;
+               Musical_pitch p = *unsmob_pitch ($1);
+               p.octave_i_ +=  $2;
+               $$ = p.smobbed_copy ();
        }
        | NOTENAME_PITCH sub_quotes      {
-               $$ = $1;
-               $$->octave_i_ += - $2;
+               Musical_pitch p =* unsmob_pitch ($1);
+
+               p.octave_i_ +=  -$2;
+               $$ = p.smobbed_copy ();
+
        }
        ;
 
+/*
+ugh. duplication
+*/
+
 steno_tonic_pitch:
        TONICNAME_PITCH {
                $$ = $1;
        }
        | TONICNAME_PITCH sup_quotes    {
-               $$ = $1;
-               $$->octave_i_ +=  $2;
+               Musical_pitch p = *unsmob_pitch ($1);
+               p.octave_i_ +=  $2;
+               $$ = p.smobbed_copy ();
        }
        | TONICNAME_PITCH sub_quotes     {
-               $$ = $1;
-               $$->octave_i_ += - $2;
+               Musical_pitch p =* unsmob_pitch ($1);
+
+               p.octave_i_ +=  -$2;
+               $$ = p.smobbed_copy ();
+
        }
        ;
 
@@ -1189,25 +1220,21 @@ musical_pitch:
                $$ = $1;
        }
        | MUSICAL_PITCH embedded_scm {
-               int sz = scm_ilength ($2);
-               if (sz != 3) {
-                       THIS->parser_error (_f ("Expecting %d arguments", 3));
-                       $2 = gh_list (gh_int2scm (0), gh_int2scm (0), gh_int2scm (0), SCM_UNDEFINED);
-               }
-               $$ = new Musical_pitch ($2);
+               if (!unsmob_pitch ($2))
+                       THIS->parser_error (_f ("Expecting musical-pitch value", 3));
+                Musical_pitch m;
+               $$ = m.smobbed_copy ();
        }
        ;
 
 explicit_duration:
        DURATION embedded_scm   {
-               $$ = new Duration;
-               if (scm_ilength ($2) == 2)
-                       {
-                       $$-> durlog_i_ = gh_scm2int (gh_car($2));
-                       $$-> dots_i_ = gh_scm2int (gh_cadr($2));
-                       }
-               else
-                       THIS->parser_error (_("Must have 2 arguments for duration"));
+               $$ = $2;
+               if (!unsmob_duration ($2))
+               {
+                       THIS->parser_error (_("Must have duration object"));
+                       $$ = Duration ().smobbed_copy ();
+               }
        }
        ;
 
@@ -1345,22 +1372,22 @@ duration_length:
                $$ = $1;
        }
        | duration_length '*' bare_unsigned {
-               $$->tuplet_iso_i_ *= $3;
+               $$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy ();
        }
        | duration_length '/' bare_unsigned {
-               $$->tuplet_type_i_ *= $3;
+               $$ = unsmob_duration ($$)->compressed (Moment (1,$3)).smobbed_copy ();
        }
        ;
 
 entered_notemode_duration:
        steno_duration  {
-               THIS->set_last_duration ($1);
+               THIS->set_last_duration (unsmob_duration ($1));
        }
        ;
 
 optional_notemode_duration:
        {
-               $$ = new Duration (THIS->default_duration_);
+               $$ = THIS->default_duration_.smobbed_copy ();
        }
        | entered_notemode_duration {
                $$ = $1;
@@ -1368,19 +1395,28 @@ optional_notemode_duration:
        ;
 
 steno_duration:
-       bare_unsigned           {
-               $$ = new Duration;
+       bare_unsigned dots              {
+               int l = 0;
                if (!is_duration_b ($1))
                        THIS->parser_error (_f ("not a duration: %d", $1));
-               else {
-                       $$->durlog_i_ = intlog2 ($1);
-                    }
+               else
+                       l =  intlog2 ($1);
+
+               $$ = Duration (l, $2).smobbed_copy ();
+       }
+       | DURATION_IDENTIFIER dots      {
+               Duration *d =unsmob_duration ($1);
+               Duration k (d->duration_log (),d->dot_count () + $2);
+               $$ = k.smobbed_copy ();         
        }
-       | DURATION_IDENTIFIER   {
-               $$ = $1->access_content_Duration (true);
+       ;
+
+dots:
+       /* empty */     {
+               $$ = 0;
        }
-       | steno_duration '.'    {
-               $$->dots_i_ ++;
+       | dots '.' {
+               $$ ++;
        }
        ;
 
@@ -1402,25 +1438,25 @@ simple_element:
                if (!THIS->lexer_p_->note_state_b ())
                        THIS->parser_error (_ ("Have to be in Note mode for notes"));
 
-
                Note_req *n = new Note_req;
                
-               n->pitch_ = *$1;
-               n->duration_ = *$4;
+               n->set_mus_property ("pitch", $1);
+               n->set_mus_property ("duration", $4);
 
                if ($3 % 2)
                        n->set_mus_property ("cautionary", SCM_BOOL_T);
-               if ( $2 % 2 || $3 % 2)
+               if ($2 % 2 || $3 % 2)
                        n->set_mus_property ("force-accidental", SCM_BOOL_T);
 
-
                Simultaneous_music*v = new Request_chord (gh_list (n->self_scm (), SCM_UNDEFINED));
-               v->set_spot ($1->spot ());
-               n->set_spot ($1->spot ());
-               $$ = v;
+               
+/*
+FIXME
+*/
+               v->set_spot (THIS->here_input ());
+               n->set_spot (THIS->here_input ());
 
-               delete $1;
-               delete $4;
+               $$ = v;
        }
        | RESTNAME optional_notemode_duration           {
 
@@ -1428,7 +1464,7 @@ simple_element:
                  if (ly_scm2string ($1) =="s")
                    { /* Space */
                      Skip_req * skip_p = new Skip_req;
-                     skip_p->duration_ = *$2;
+                     skip_p->set_mus_property ("duration" ,$2);
 
                      skip_p->set_spot (THIS->here_input());
                        e = skip_p->self_scm ();
@@ -1436,21 +1472,19 @@ simple_element:
                  else
                    {
                      Rest_req * rest_req_p = new Rest_req;
-                     rest_req_p->duration_ = *$2;
+                     rest_req_p->set_mus_property ("duration", $2);
                      rest_req_p->set_spot (THIS->here_input());
                        e = rest_req_p->self_scm ();
                    }
                  Simultaneous_music* velt_p = new Request_chord (gh_list (e,SCM_UNDEFINED));
                  velt_p->set_spot (THIS->here_input());
 
-                 delete $2; // ugh
+
                  $$ = velt_p;
        }
        | MEASURES optional_notemode_duration   {
                Skip_req * sk = new Skip_req;
-               sk->duration_ = *$2;
-               
-
+               sk->set_mus_property ("duration", $2);
                Span_req *sp1 = new Span_req;
                Span_req *sp2 = new Span_req;
                sp1-> set_span_dir ( START);
@@ -1481,11 +1515,11 @@ simple_element:
                        THIS->pop_spot ();
                Lyric_req* lreq_p = new Lyric_req;
                 lreq_p->set_mus_property ("text", $1);
-               lreq_p->duration_ = *$3;
+               lreq_p->set_mus_property ("duration",$3);
                lreq_p->set_spot (THIS->here_input());
                Simultaneous_music* velt_p = new Request_chord (gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
 
-               delete  $3; // ugh
+
                $$= velt_p;
 
        }
@@ -1499,13 +1533,13 @@ simple_element:
 
 chord:
        steno_tonic_pitch optional_notemode_duration chord_additions chord_subtractions chord_inversion chord_bass {
-                $$ = get_chord (*$1, $3, $4, $5, $6, *$2);
+                $$ = get_chord ($1, $3, $4, $5, $6, $2);
                $$->set_spot (THIS->here_input ());
         };
 
 chord_additions: 
        {
-               $$ = new Array<Musical_pitch>;
+               $$ = SCM_EOL;
        } 
        | CHORD_COLON chord_notes {
                $$ = $2;
@@ -1517,14 +1551,13 @@ chord_notes:
                $$ = $1
        }
        | chord_notes '.' chord_step {
-               $$ = $1;
-               $$->concat (*$3);
+               $$ = gh_append2 ($$, $3);
        }
        ;
 
 chord_subtractions: 
        {
-               $$ = new Array<Musical_pitch>;
+               $$ = SCM_EOL;
        } 
        | CHORD_CARET chord_notes {
                $$ = $2;
@@ -1534,58 +1567,59 @@ chord_subtractions:
 
 chord_inversion:
        {
-               $$ = 0;
+               $$ = SCM_EOL;
        }
        | '/' steno_tonic_pitch {
                $$ = $2;
-               $$->set_spot (THIS->here_input ());
        }
        ;
 
 chord_bass:
        {
-               $$ = 0;
+               $$ = SCM_EOL;
        }
        | CHORD_BASS steno_tonic_pitch {
                $$ = $2;
-               $$->set_spot (THIS->here_input ());
        }
        ;
 
 chord_step:
        chord_note {
-               $$ = new Array<Musical_pitch>;
-               $$->push (*$1);
+               $$ = gh_cons ($1, SCM_EOL);
        }
        | CHORDMODIFIER_PITCH {
-               $$ = new Array<Musical_pitch>;
-               $$->push (*$1);
+               $$ = gh_cons ($1, SCM_EOL);
        }
        | CHORDMODIFIER_PITCH chord_note { /* Ugh. */
-               $$ = new Array<Musical_pitch>;
-               $$->push (*$1);
-               $$->push (*$2);
+               $$ = gh_list ($1, $2, SCM_UNDEFINED);
        }
        ;
 
 chord_note:
        bare_unsigned {
-               $$ = new Musical_pitch;
-               $$->notename_i_ = ($1 - 1) % 7;
-               $$->octave_i_ = $1 > 7 ? 1 : 0;
-               $$->accidental_i_ = 0;
+                Musical_pitch m;
+               m.notename_i_ = ($1 - 1) % 7;
+               m.octave_i_ = $1 > 7 ? 1 : 0;
+               m.alteration_i_ = 0;
+
+               $$ = m.smobbed_copy ();
         } 
        | bare_unsigned '+' {
-               $$ = new Musical_pitch;
-               $$->notename_i_ = ($1 - 1) % 7;
-               $$->octave_i_ = $1 > 7 ? 1 : 0;
-               $$->accidental_i_ = 1;
+               Musical_pitch m;
+               m.notename_i_ = ($1 - 1) % 7;
+               m.octave_i_ = $1 > 7 ? 1 : 0;
+               m.alteration_i_ = 1;
+
+
+               $$ = m.smobbed_copy ();
        }
        | bare_unsigned CHORD_MINUS {
-               $$ = new Musical_pitch;
-               $$->notename_i_ = ($1 - 1) % 7;
-               $$->octave_i_ = $1 > 7 ? 1 : 0;
-               $$->accidental_i_ = -1;
+               Musical_pitch m;
+               m.notename_i_ = ($1 - 1) % 7;
+               m.octave_i_ = $1 > 7 ? 1 : 0;
+               m.alteration_i_ = -1;
+
+               $$ = m.smobbed_copy ();
        }
         ;
 
index 68e41dce09a59ed6470a76388f092bb58849da8c..1f813a7445afb87b2222fc1e85689fb5980bc531 100644 (file)
 #include "music-sequence.hh"
 #include "warn.hh"
 
+
+/*
+  DOCUMENTME
+ */
+int
+compare (Array<Duration> const * left, Array<Duration> const * right)
+{
+  assert (left);
+  assert (right);
+  
+  if (left->size () == right->size ())
+    {
+      for (int i = 0; i < left->size (); i++)
+       {
+         int r = Duration::compare ((*left)[i], (*right)[i]);
+         if (r)
+           return r;
+       }
+    }
+  else
+    return 1;
+  return 0;
+}
+
 Part_combine_music_iterator::Part_combine_music_iterator ()
 {
   first_iter_p_ = 0;
@@ -116,9 +140,9 @@ get_music_info (Moment m, Music_iterator* iter, Array<Musical_pitch> *pitches, A
        {
          Music *m = unsmob_music (gh_car (i));
          if (Melodic_req *r = dynamic_cast<Melodic_req *> (m))
-           pitches->push (r->pitch_);
+           pitches->push (*unsmob_pitch (r->get_mus_property("pitch")));
          if (Rhythmic_req *r = dynamic_cast<Rhythmic_req *> (m))
-           durations->push (r->duration_);
+           durations->push (*unsmob_duration (r->get_mus_property("duration")));
        }
     }
 }
@@ -408,3 +432,5 @@ Part_combine_music_iterator::get_music (Moment m)const
     s = gh_append2 (second_iter_p_->get_music (m),s);
   return s;
 }
+
+IMPLEMENT_CTOR_CALLBACK(Part_combine_music_iterator);
index 1375f8d06fddf8fdc16e949bee6b2557a99ad224..91c351fc02fa07023c178592b894aa62c6fcc619 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include "part-combine-music.hh"
+#include "part-combine-music-iterator.hh"
 #include "musical-pitch.hh"
 
 Part_combine_music::Part_combine_music (SCM  what, Music * f, Music * s)
@@ -20,7 +21,8 @@ Part_combine_music::Part_combine_music (SCM  what, Music * f, Music * s)
   scm_unprotect_object (f->self_scm());
   scm_unprotect_object (s->self_scm());  
 
-  set_mus_property ("type", ly_symbol2scm ("part-combined-music"));
+  set_mus_property ("type",
+                   Part_combine_music_iterator::constructor_cxx_function);
 }
 
 void
index 3799ba0e2f514d675238a1fe28f24921817efbaa..302f9752df005a2ce92d310787d262827f3502de 100644 (file)
@@ -45,3 +45,7 @@ Pop_property_iterator::process (Moment m)
   
   Simple_music_iterator::process (m);
 }
+
+IMPLEMENT_CTOR_CALLBACK(Pop_property_iterator);
+IMPLEMENT_CTOR_CALLBACK(Push_property_iterator);
+IMPLEMENT_CTOR_CALLBACK(Property_iterator);
index 4cdd6827615568dae864c56eedcc7bd2080724aa..6f2a0913befc73cc86c61552788aac4c59c3c706 100644 (file)
@@ -31,9 +31,8 @@ Repeated_music::Repeated_music(Music *beg, int times, Music_sequence * alts)
       set_mus_property ("body", beg->self_scm ());
       scm_unprotect_object (beg->self_scm ());
     }
-  fold_b_ = false;
-  repeats_i_ = times;
-  volta_fold_b_ = true;
+  set_mus_property ("repeat-count", gh_int2scm (times));
+
   if (alts)
     {
       alts->truncate (times);
@@ -46,10 +45,6 @@ Repeated_music::Repeated_music(Music *beg, int times, Music_sequence * alts)
 Repeated_music::Repeated_music (Repeated_music const &s)
   : Music (s)
 {
-  repeats_i_ = s.repeats_i_;
-  fold_b_ = s.fold_b_;
-  volta_fold_b_ = s.volta_fold_b_;
-  type_ = s.type_;
 }
 
 
@@ -89,25 +84,24 @@ Repeated_music::compress (Moment p)
 }
 
 Moment
-Repeated_music::alternatives_length_mom () const
+Repeated_music::alternatives_length_mom (bool fold) const
 {
   if (!alternatives () )
     return 0;
   
-  if  (fold_b_)
+  if  (fold)
     return alternatives ()->maximum_length ();
 
   Moment m =0;
   int done =0;
 
   SCM p = alternatives ()->music_list ();
-   while (gh_pair_p (p) && done < repeats_i_)
+  while (gh_pair_p (p) && done < repeat_count ())
     {
       m = m + unsmob_music (gh_car (p))->length_mom ();
       done ++;
-      if (volta_fold_b_
-         || repeats_i_ - done < alternatives ()->length_i ())
-      p = gh_cdr (p);
+      if (repeat_count () - done < alternatives ()->length_i ())
+       p = gh_cdr (p);
     }
   return m;
 }
@@ -119,15 +113,43 @@ Repeated_music::body_length_mom () const
   if (body ())
     {
       m = body ()->length_mom ();
-      if (!fold_b_ && !volta_fold_b_)
-       m *= Rational (repeats_i_);
     }
   return m;
 }
 
-Moment
-Repeated_music::length_mom () const
+int
+Repeated_music::repeat_count () const
 {
-  return body_length_mom () + alternatives_length_mom ();
+  return gh_scm2int (get_mus_property ("repeat-count"));
 }
 
+
+MAKE_SCHEME_CALLBACK(Repeated_music,unfolded_music_length, 1);
+MAKE_SCHEME_CALLBACK(Repeated_music,folded_music_length, 1);
+MAKE_SCHEME_CALLBACK(Repeated_music,volta_music_length, 1);
+
+SCM
+Repeated_music::unfolded_music_length (SCM m)
+{
+  Repeated_music* r = dynamic_cast<Repeated_music*> (unsmob_music (m));
+  
+  Moment l = Moment (r->repeat_count ()) * r->body_length_mom () + r->alternatives_length_mom (false);
+  return l.smobbed_copy ();
+}
+
+SCM
+Repeated_music::folded_music_length (SCM m)
+{
+  Repeated_music* r = dynamic_cast<Repeated_music*> (unsmob_music (m));
+  Moment l =  r->body_length_mom () + r->alternatives_length_mom (true);
+  return l.smobbed_copy ();
+}
+
+SCM
+Repeated_music::volta_music_length (SCM m)
+{
+  Repeated_music* r = dynamic_cast<Repeated_music*> (unsmob_music (m));
+  Moment l =  r->body_length_mom () + r->alternatives_length_mom (false);
+  return l.smobbed_copy ();
+}
index 79df69f6daefd86727f066e54561ea55ff86499b..61efb3879796bad599f28e861420e52f60ad02a6 100644 (file)
@@ -78,3 +78,5 @@ Request_chord_iterator::process (Moment m)
     }
   skip (m);
 }
+
+IMPLEMENT_CTOR_CALLBACK(Request_chord_iterator);
index efb217c73ea5c1de6a4c0161c1dd918442cf172e..090ded85271e8b2af2e7b2229797588c10039dec 100644 (file)
@@ -80,11 +80,20 @@ Rest_collision::do_shift (Score_element *me, SCM elts)
    */
   Link_array<Score_element> rests;
   Link_array<Score_element> notes;
-
+  Score_element * commony = 0;
   for (SCM s = elts; gh_pair_p (s); s = gh_cdr (s))
     {
+      
       Score_element * e = unsmob_element (gh_car (s));
-      if (e && unsmob_element (e->get_elt_property ("rest")))
+      if (!e)
+       continue;
+      
+      if (!commony)
+       commony = e;
+      else
+       commony= commony->common_refpoint  (e, Y_AXIS);
+      
+      if (unsmob_element (e->get_elt_property ("rest")))
        rests.push (e);
       else
        notes.push (e);
@@ -184,16 +193,15 @@ Rest_collision::do_shift (Score_element *me, SCM elts)
       // try to be opposite of noteheads. 
       Direction dir = - Note_column::dir (notes[0]);
 
-      Interval restdim = Note_column::rest_dim (rcol);
+      Score_element * r = unsmob_element (rcol->get_elt_property ("rest"));
+      Interval restdim = r->extent (r, Y_AXIS);        // ??
+
       if (restdim.empty_b ())
        return SCM_UNSPECIFIED;
       
-      // staff ref'd?
+      // FIXME: staff ref'd?
       Real staff_space = 1.0;
 
-       /* FIXME
-         staff_space =  rcol->rests[0]->staff_space ();
-       */
       Real minimum_dist = gh_scm2double (me->get_elt_property ("minimum-distance")) * staff_space;
       
       /*
@@ -202,7 +210,9 @@ Rest_collision::do_shift (Score_element *me, SCM elts)
       Interval notedim;
       for (int i = 0; i < notes.size(); i++) 
        {
-         notedim.unite (notes[i]->extent (notes[i],Y_AXIS)); // refp?
+         Score_element * stem = Note_column::stem_l (notes[i]);
+         Score_element * head = Stem::first_head (stem);
+         notedim.unite (head->extent (commony, Y_AXIS));
        }
 
       Interval inter (notedim);
index c7cada9b3d5cc0dce43fc9e4938a5d3040ea3eb2..ead302fbb49f3852eace4f2d5f2d52a37c713d0a 100644 (file)
@@ -71,17 +71,20 @@ Rest_engraver::do_process_music ()
       Staff_symbol_referencer::set_interface (rest_p_);
 
       
+      int durlog  = unsmob_duration (rest_req_l_->get_mus_property ("duration"))-> duration_log ();
+      
       rest_p_->set_elt_property ("duration-log",
-                                gh_int2scm (rest_req_l_->duration_.durlog_i_)); 
+                                gh_int2scm (durlog));
+
+      int dots =unsmob_duration (rest_req_l_->get_mus_property ("duration"))->dot_count ();
       
-      if (rest_req_l_->duration_.dots_i_)
+      if (dots)
        {
          dot_p_ = new Item (get_property ("Dots"));
 
          Rhythmic_head::set_dots (rest_p_, dot_p_);
          dot_p_->set_parent (rest_p_, Y_AXIS);
-         dot_p_->set_elt_property ("dot-count",
-                                   gh_int2scm (rest_req_l_->duration_.dots_i_));
+         dot_p_->set_elt_property ("dot-count", gh_int2scm (dots));
          announce_element (dot_p_,0);
        }
 
index 67801e884c1060aacf83ce30a521a446bdd8692c..3bd5dd257bfc92583e1f715c4317c907c1c49665 100644 (file)
@@ -35,8 +35,8 @@ Score_engraver::prepare (Moment w)
   set_columns (new Paper_column (get_property (ly_symbol2scm ("NonMusicalPaperColumn"))),
               new Paper_column (get_property (ly_symbol2scm ("PaperColumn"))));
   
-  command_column_l_->set_elt_property ("when", w.make_scm());
-  musical_column_l_->set_elt_property ("when", w.make_scm());
+  command_column_l_->set_elt_property ("when", w.smobbed_copy());
+  musical_column_l_->set_elt_property ("when", w.smobbed_copy());
   command_column_l_->set_elt_property ("breakable", SCM_BOOL_T);
   
   Score_element_info i1(command_column_l_, 0), i2 (musical_column_l_,0);
index 7260e3eb83f1e49c0d946489607239c1abc64496..281b97c1671bc323ea52c1de0ab10501df9dfe7e 100644 (file)
@@ -211,3 +211,4 @@ 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);
index 855ff7078086e3a881d01e601adb507757bad259..ed118ec11fedfa9605f908ef81ac91ef289e14d8 100644 (file)
@@ -54,3 +54,5 @@ Simple_music_iterator::process (Moment m)
 
   skip (m);
 }
+
+IMPLEMENT_CTOR_CALLBACK(Simple_music_iterator);
index 4cc8d0c31623cc8bfa0d82776dfb38095046947a..791dbd6185fdae9d224b0fe76fd267558e5fc811 100644 (file)
@@ -143,3 +143,5 @@ Simultaneous_music_iterator::try_music_in_children (Music *m) const
 }
 
 
+
+IMPLEMENT_CTOR_CALLBACK(Simultaneous_music_iterator);
index d45700717604e235877368b4d17ec9b1a07dabc7..324c05cf2c05800da44e5d48a30f9b1dd1a70dda 100644 (file)
@@ -138,8 +138,8 @@ Spacing_engraver::do_pre_move_processing ()
   Paper_column * sc
     = dynamic_cast<Paper_column*> (unsmob_element (get_property ("currentMusicalColumn")));
 
-  SCM sh = shortest_playing.make_scm( );
-  SCM st = starter.make_scm();
+  SCM sh = shortest_playing.smobbed_copy( );
+  SCM st = starter.smobbed_copy();
 
   sc->set_elt_property ("shortest-playing-duration", sh);  
   sc->set_elt_property ("shortest-starter-duration", st);
index caebede28bb60e1a2e91e6947fbae7a01f6e5337..c909039b50c528be3cbbd91fa90dcd68a2caf4e8 100644 (file)
@@ -58,8 +58,8 @@ Stem_engraver::acknowledge_element(Score_element_info i)
       if (Rhythmic_head::stem_l (h))
        return;
       
-      Rhythmic_req * r = dynamic_cast <Rhythmic_req *> (i.req_l_);
-      int duration_log = r->duration_.durlog_i_;      
+      int duration_log  = unsmob_duration (i.req_l_->get_mus_property ("duration"))-> duration_log ();
+           
       if (!stem_p_) 
        {
          stem_p_ = new Item (get_property ("Stem"));
@@ -107,12 +107,12 @@ Stem_engraver::acknowledge_element(Score_element_info i)
                                                gh_int2scm (tremolo_flags));
                }
            }
-         announce_element (stem_p_, r);
+         announce_element (stem_p_, i.req_l_);
        }
 
       if (Stem::flag_i (stem_p_) != duration_log)
        {
-         r->origin ()->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 <<  Stem::flag_i (stem_p_)));
+         i.req_l_->origin ()->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 <<  Stem::flag_i (stem_p_)));
        }
 
       Stem::add_head (stem_p_,h);
index 94ddf6ca933bb6579353d0cb467a08648fe70364..46cc32163d5cc81d8734bb7685ff62caa7764caf 100644 (file)
@@ -423,9 +423,11 @@ Stem::flag (Score_element*me)
 
 MAKE_SCHEME_CALLBACK(Stem,dim_callback,2);
 SCM
-Stem::dim_callback (SCM e, SCM )
+Stem::dim_callback (SCM e, SCM ax)
 {
-   Score_element *se = unsmob_element (e);
+  Axis a = (Axis) gh_scm2int (ax);
+  assert (a == X_AXIS);
+  Score_element *se = unsmob_element (e);
   Interval r (0, 0);
   if (unsmob_element (se->get_elt_property ("beam")) || abs (flag_i (se)) <= 2)
     ;  // TODO!
index bec3b7f0fa45335e312b6f033882670ebc38c27a..277a4206e29e920956436e3927c9820619819384 100644 (file)
@@ -146,8 +146,8 @@ Tie_engraver::process_acknowledged ()
       while  (i >= 0 && j >=0)
        {
          int comp
-           = Musical_pitch::compare (now_heads_[i].req_l_->pitch_ ,
-                                     stopped_heads_[j].req_l_->pitch_);
+           = Musical_pitch::compare (*unsmob_pitch (now_heads_[i].req_l_->get_mus_property ("pitch") ),
+                                     *unsmob_pitch (stopped_heads_[j].req_l_->get_mus_property ("pitch")));
 
          if (comp)
            {
@@ -291,7 +291,10 @@ int
 CHead_melodic_tuple::pitch_compare (CHead_melodic_tuple const&h1,
                             CHead_melodic_tuple const &h2)
 {
-  return Melodic_req::compare (*h1.req_l_, *h2.req_l_);
+  SCM p1  = h1.req_l_->get_mus_property ("pitch");
+  SCM p2  = h2.req_l_->get_mus_property ("pitch");
+  
+  return Musical_pitch::equal_p (p1,p2) == SCM_BOOL_T;
 }
 
 int
index f1088d4c8e6072a9c6e82b0ee34a3d781da2971e..feb335d6e8ae81100ca9c59b3cabdeca106a07c6 100644 (file)
@@ -74,8 +74,8 @@ Tie_performer::process_acknowledged ()
       while  ( i < now_notes_.size () && j < stopped_notes_.size ())
        {
          int comp
-           = Musical_pitch::compare (now_notes_[i].req_l_->pitch_ ,
-                                     stopped_notes_[j].req_l_->pitch_);
+           = Musical_pitch::compare (*unsmob_pitch (now_notes_[i].req_l_->get_mus_property ("pitch") ),
+                                     *unsmob_pitch (stopped_notes_[j].req_l_->get_mus_property ("pitch")));
 
          if (comp)
            {
@@ -157,7 +157,10 @@ int
 CNote_melodic_tuple::pitch_compare (CNote_melodic_tuple const&h1,
                                    CNote_melodic_tuple const &h2)
 {
-  return Melodic_req::compare (*h1.req_l_, *h2.req_l_);
+  SCM p1  = h1.req_l_->get_mus_property ("pitch");
+  SCM p2  = h2.req_l_->get_mus_property ("pitch");  
+  return Musical_pitch::compare (*unsmob_pitch (p1),
+                              *unsmob_pitch (p2));
 }
 
 int
index f68a4d7d88304d2e11e7548813b306b49ca88117..cea13bf68bf097d1cfcb5c288a330103fbfc2a7b 100644 (file)
@@ -27,3 +27,5 @@ Time_scaled_music_iterator::process (Moment m)
 
   Music_wrapper_iterator::process (m);
 }
+
+IMPLEMENT_CTOR_CALLBACK(Time_scaled_music_iterator);
index 75547b17b4f15b3728507e203c8ee89c1e98518f..868cedf3c0a057201ac2c246b74d1993d46520b3 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include "time-scaled-music.hh"
-
+#include "time-scaled-music-iterator.hh"
 
 Time_scaled_music::Time_scaled_music (int n, int d,Music *mp)
   : Music_wrapper (mp)
@@ -16,7 +16,8 @@ Time_scaled_music::Time_scaled_music (int n, int d,Music *mp)
   num_i_ = n;
   den_i_ = d;
   compress (Moment (num_i_,den_i_));
-  set_mus_property ("type", ly_symbol2scm ("time-scaled-music"));
+  set_mus_property ("type",
+                   Time_scaled_music_iterator::constructor_cxx_function);
 }
 
 
index 4c2076fd00fd9c4273338c23e634f401aeaaa76b..8127dd940d89f0fb30fc2aa1db96f59004c85d5a 100644 (file)
@@ -6,15 +6,34 @@
   (c)  1997--2000 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
-#include "time-signature-performer.hh"
-#include "command-request.hh"
 #include "audio-item.hh"
+#include "lily-proto.hh"
+#include "performer.hh"
+
+
+class Time_signature_performer : public Performer
+{
+public:
+  VIRTUAL_COPY_CONS(Translator);
+  
+  Time_signature_performer();
+  ~Time_signature_performer();
+
+protected:
+
+  virtual void do_process_music();
+  virtual void do_pre_move_processing ();
+
+  SCM prev_fraction_;
+private:
+  Time_signature_change_req* time_signature_req_l_;
+  Audio_time_signature* audio_p_;
+};
 
-ADD_THIS_TRANSLATOR (Time_signature_performer);
 
 Time_signature_performer::Time_signature_performer ()
 {
-  time_signature_req_l_ = 0;
+  prev_fraction_ = SCM_BOOL_F;
   audio_p_ = 0;
 }
 
@@ -26,13 +45,15 @@ Time_signature_performer::~Time_signature_performer ()
 void
 Time_signature_performer::do_process_music ()
 {
-  if (time_signature_req_l_)
+  SCM fr = get_property ("timeSignatureFraction");
+  if (gh_pair_p (fr)
+      && scm_equal_p (fr, prev_fraction_) != SCM_BOOL_T)
     {
-      int b = gh_scm2int (time_signature_req_l_->get_mus_property ("beats"));
-      int o = gh_scm2int (time_signature_req_l_->get_mus_property ("one-beat"));      
+      int b = gh_scm2int (gh_car (fr));
+      int o = gh_scm2int (gh_cdr (fr));
       
       audio_p_ = new Audio_time_signature (b,o);
-      Audio_element_info info (audio_p_, time_signature_req_l_);
+      Audio_element_info info (audio_p_, 0);
       announce_element (info);
       time_signature_req_l_ = 0;
     }
@@ -47,20 +68,5 @@ Time_signature_performer::do_pre_move_processing ()
       audio_p_ = 0;
     }
 }
-
-bool
-Time_signature_performer::do_try_music (Music* req_l)
-{
-  if (time_signature_req_l_)
-    return false;
-
-  if (Time_signature_change_req *t =
-      dynamic_cast <Time_signature_change_req *> (req_l))
-    {
-      time_signature_req_l_ = t;
-      return true;
-    }
-
-  return false;
-}
+ADD_THIS_TRANSLATOR (Time_signature_performer);
 
index 05b4fbfc207768b58ae774c5e2c3e1d643736af0..7643a2cfa71018ca1bef21054533e7b54907a611 100644 (file)
  */
 class Timing_engraver : public Timing_translator, public Engraver
 {   
-  Bar_req * bar_req_l_;
 protected:
-  virtual bool do_try_music (Music * );
   virtual void do_post_move_processing ();
-  virtual void do_process_music ();
   virtual void do_pre_move_processing ();
 public:
   VIRTUAL_COPY_CONS(Translator);
@@ -34,7 +31,6 @@ ADD_THIS_TRANSLATOR(Timing_engraver);
 void
 Timing_engraver::do_post_move_processing( )
 {
-  bar_req_l_ = 0;
   Timing_translator::do_post_move_processing ();
 
   SCM nonauto = get_property ("barNonAuto");
@@ -63,23 +59,5 @@ Timing_engraver::do_pre_move_processing ()
   daddy_trans_l_->set_property ("whichBar", SCM_EOL);  
 }
 
-bool
-Timing_engraver::do_try_music (Music*m)
-{
-  if (0) // 
-    {
-      Bar_req  * b= dynamic_cast <Bar_req *> (m);
-      if (bar_req_l_ && !bar_req_l_->equal_b (b)) 
-       return false;
-      
-      bar_req_l_ = b;
-      return true;
-    }
-  
-  return Timing_translator::do_try_music (m);
-}
 
-void
-Timing_engraver::do_process_music ()
-{
-}
+
index 35455683e739ba0b3a9a6d07f32422af7d54036b..b130629ccdb4c3f911d994a18473ad52ff929b04 100644 (file)
 bool
 Timing_translator::do_try_music (Music*r)
 {
-  if (Timing_req *t =  dynamic_cast <Timing_req *> (r))
+  if (dynamic_cast<Barcheck_req*> (r))
     {
-      for (int i=0; i < timing_req_l_arr_.size (); i++)
-       {
-         /*
-           merge timing reqs.
-          */
-         if (timing_req_l_arr_[i]->equal_b(t))
-           return true;
-         if (String (classname (timing_req_l_arr_[i])) == classname (r))
-           {
-             r->origin ()->warning (_ ("conflicting timing request"));
-             timing_req_l_arr_[i]->origin ()->warning (_("This is the other timing request")); 
-             return false;
-           }
-       }
-
-      /*
-       We have to do this soon enough. Maybe we'd better disguise
-       \time as a \property. Then all settings will be `immediate'.
-       */
-      if (Time_signature_change_req *c
-         = dynamic_cast <Time_signature_change_req *> (t))
-       {
-         int b = gh_scm2int (c->get_mus_property ("beats"));
-         int o = gh_scm2int (c->get_mus_property ("one-beat"));      
-         
-         set_time_signature (b, o);
-
-       }
-      timing_req_l_arr_.push(t);
+      check_ = r;
       return true;
     }
   return false;
@@ -61,26 +33,31 @@ Timing_translator::do_try_music (Music*r)
 void
 Timing_translator::do_process_music()
 {
-  for (int i=0; i < timing_req_l_arr_.size (); i++)
+  if (check_ && measure_position ())
     {
-      if (!dynamic_cast <Barcheck_req *> (timing_req_l_arr_[i]))
-       continue;
-      if (measure_position ())
-       {
-         timing_req_l_arr_[i]->origin ()->warning (_f ("barcheck failed at: %s", 
-                                                       measure_position ().str ()));
-         Moment zero; 
-
-         // resync
-         daddy_trans_l_->set_property("measurePosition", zero.make_scm ());
-       }
+      check_->origin ()->warning (_f ("barcheck failed at: %s", 
+                                     measure_position ().str ()));
+      Moment zero; 
+      
+      if (!to_boolean (get_property ("barCheckNoSynchronize")))
+       daddy_trans_l_->set_property("measurePosition", zero.smobbed_copy ());
+    }
+
+  SCM fr = get_property ("timeSignatureFraction");
+  
+  if (scm_equal_p (fr, last_time_sig_) == SCM_BOOL_F)
+    {
+      last_time_sig_ = fr;
+      set_time_signature ();
     }
 }
 
+
 void
 Timing_translator::do_pre_move_processing()
 {
-  timing_req_l_arr_.set_size (0);
+  check_ = 0;
+  
   Translator *t = this;
   Global_translator *global_l =0;
   do
@@ -115,11 +92,11 @@ Timing_translator::do_creation_processing()
   Moment m;
   daddy_trans_l_->set_property ("timing" , SCM_BOOL_T);  
   daddy_trans_l_->set_property ("currentBarNumber" , gh_int2scm (1));
-  daddy_trans_l_->set_property ("measurePosition", m.make_scm ());
-  daddy_trans_l_->set_property ("beatLength", Moment (1,4).make_scm ());
-  daddy_trans_l_->set_property ("measureLength",  Moment (1).make_scm());
+  daddy_trans_l_->set_property ("measurePosition", m.smobbed_copy ());
   daddy_trans_l_->set_property ("timeSignatureFraction",
                                gh_cons (gh_int2scm (4), gh_int2scm (4)));
+
+  set_time_signature ();
 }
 
 Moment
@@ -134,18 +111,24 @@ Timing_translator::measure_length () const
 
 
 void
-Timing_translator::set_time_signature (int l, int o)
+Timing_translator::set_time_signature ()
 {
+  SCM fr = get_property ("timeSignatureFraction");
+  int l = gh_scm2int (gh_car (fr));
+  int o = gh_scm2int (gh_cdr (fr));
+  
   Moment one_beat = Moment (1)/Moment (o);
   Moment len = Moment (l) * one_beat;
-  daddy_trans_l_->set_property ("measureLength", len.make_scm ());
-  daddy_trans_l_->set_property ("beatLength", one_beat.make_scm ());
-  daddy_trans_l_->set_property ("timeSignatureFraction",
-                               gh_cons (gh_int2scm (l), gh_int2scm (o)));
+
+  daddy_trans_l_->set_property ("measureLength", len.smobbed_copy ());
+  daddy_trans_l_->set_property ("beatLength", one_beat.smobbed_copy ());
 }
 
 Timing_translator::Timing_translator()
 {
+
+  last_time_sig_ = SCM_BOOL_F;
+
 }
 
 
@@ -168,6 +151,7 @@ Timing_translator::measure_position () const
 void
 Timing_translator::do_post_move_processing()
 {
+       check_ =00;
   Translator *t = this;
   Global_translator *global_l =0;
   do
@@ -196,7 +180,7 @@ Timing_translator::do_post_move_processing()
     }
   else
     {
-      daddy_trans_l_->set_property ("measurePosition", measposp.make_scm());
+      daddy_trans_l_->set_property ("measurePosition", measposp.smobbed_copy());
     }
   
   measposp += dt;
@@ -219,6 +203,6 @@ Timing_translator::do_post_move_processing()
     }
 
   daddy_trans_l_->set_property ("currentBarNumber", gh_int2scm (b));
-  daddy_trans_l_->set_property ("measurePosition", measposp.make_scm());
+  daddy_trans_l_->set_property ("measurePosition", measposp.smobbed_copy());
 }
 
index 044ba7e8427a37bdfbee081ecbd39402f9d195a6..c8a6fd404da49f97d617856467da020ff803761d 100644 (file)
@@ -23,6 +23,7 @@ Unfolded_repeat_iterator::Unfolded_repeat_iterator ()
 {
   done_count_ =0;
   current_iter_p_ =0;
+  volta_b_ = false;
   do_main_b_ = false;
   alternative_count_i_ =0;
 }
@@ -44,7 +45,7 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
   delete current_iter_p_;
   current_iter_p_ =0;
 
-  bool do_repcommands = side_effect && repmus->volta_fold_b_;
+  bool do_repcommands = side_effect && volta_b_;
   
   if (do_main_b_)
     {
@@ -60,7 +61,7 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
       
       here_mom_ += repmus->body ()->length_mom ();
 
-      if (!repmus->volta_fold_b_)
+      if (!volta_b_)
        done_count_ ++;
      
       if (gh_pair_p (alternative_cons_))
@@ -68,7 +69,7 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
          current_iter_p_ = get_iterator_p (unsmob_music (gh_car (alternative_cons_)));
          do_main_b_ = false;
 
-         if (repmus->volta_fold_b_)
+         if (volta_b_)
            {
              String repstr = to_str (done_count_ + 1);
              if (do_repcommands)
@@ -76,11 +77,11 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
                                             ly_str02scm (repstr.ch_C()), SCM_UNDEFINED));
            }     
        }
-      else if (repmus->volta_fold_b_)
+      else if (volta_b_)
        {
          add_repeat_command (ly_symbol2scm ("end-repeat"));
        }
-      else if (done_count_ <  repmus->repeats_i_)
+      else if (done_count_ <  repmus->repeat_count ())
        {
          current_iter_p_ = get_iterator_p (repmus->body ());
          do_main_b_ = true;
@@ -101,8 +102,8 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
        {
          here_mom_ += unsmob_music (gh_car (alternative_cons_))->length_mom ();
 
-         if (repmus->volta_fold_b_ || 
-             repmus->repeats_i_ - done_count_  < alternative_count_i_)
+         if (volta_b_ || 
+             repmus->repeat_count () - done_count_  < alternative_count_i_)
            alternative_cons_ = gh_cdr (alternative_cons_);
          
          if (do_repcommands)
@@ -113,7 +114,7 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
          /*
            we've done the main body as well, but didn't go over the other
            increment.  */
-         if (repmus->volta_fold_b_)
+         if (volta_b_)
            done_count_ ++;
        }
 
@@ -125,7 +126,7 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
        if we're full unfold: go back to main body.
        */
       
-      if (done_count_ < repmus->repeats_i_ && gh_pair_p (alternative_cons_))
+      if (done_count_ < repmus->repeat_count () && gh_pair_p (alternative_cons_))
        {
          if (do_repcommands)
            {
@@ -136,7 +137,7 @@ Unfolded_repeat_iterator::next_element (bool side_effect)
            }
 
          
-         if (repmus->volta_fold_b_)
+         if (volta_b_)
            current_iter_p_ = get_iterator_p (unsmob_music (gh_car (alternative_cons_)));
          else
            {
@@ -207,7 +208,7 @@ Unfolded_repeat_iterator::process (Moment m)
 {
   if (!m)
     {
-      if (dynamic_cast<Repeated_music*> (music_l_)->volta_fold_b_)
+      if (volta_b_)
        add_repeat_command (ly_symbol2scm ("start-repeat"));
     }
   while (1)
@@ -282,3 +283,11 @@ Unfolded_repeat_iterator::try_music_in_children (Music  * m) const
 {
   return  current_iter_p_->try_music (m);
 }
+
+IMPLEMENT_CTOR_CALLBACK(Unfolded_repeat_iterator);
+IMPLEMENT_CTOR_CALLBACK(Volta_repeat_iterator);
+
+Volta_repeat_iterator::Volta_repeat_iterator ()
+{
+  volta_b_ = true;
+}
index 5f570c77fd06d1743d234fc7e5d3828623c45619..6e3de95f4d0ccd3feae29ebe7f461fc6eb707240 100644 (file)
@@ -110,6 +110,7 @@ in LilyPond-include-path."
 ;; variable instead of quering the user. 
 (defvar LilyPond-command-force nil)
 
+(defvar LilyPond-xdvi-command "xdvik")
 
 ;; This is the major configuration variable.
 (defcustom LilyPond-command-alist
@@ -121,7 +122,7 @@ in LilyPond-include-path."
     ("SmartView" . ("xdvi %d" . "LilyPond"))
     
     ;; refreshes when kicked USR1
-    ("View" . ("xdvik %d" . "LilyPond"))
+    ("View" . ((concat LilyPond-xdvi-command " %d") . "LilyPond"))
     )
 
   "AList of commands to execute on the current document.
index 1739ae0862a5546cc139a9a2ba5b62ac74cef896..403494d2cb1e372e53495ab7797a43fccc2d4540 100644 (file)
 
 % For using "sostingut" notation, which is also correct
 \notenames #'(
-       (dobb . ( -1 0 -2 ))
-       (dob . ( -1 0 -1 ))
-       (do . ( -1 0 0 ))
-       (dod . ( -1 0 1 ))
-       (dodd . ( -1 0 2 ))
-       (rebb . ( -1 1 -2 ))
-       (reb . ( -1 1 -1 ))
-       (re . ( -1 1 0 ))
-       (red . ( -1 1 1 ))
-       (redd . ( -1 1 2 ))
-       (mibb . ( -1 2 -2 ))
-       (mib . ( -1 2 -1 ))
-       (mi . ( -1 2 0 ))
-       (mid . ( -1 2 1 ))
-       (midd . ( -1 2 2 ))
-       (fabb . ( -1 3 -2 ))
-       (fab . ( -1 3 -1 ))
-       (fa . ( -1 3 0 ))
-       (fad . ( -1 3 1 ))
-       (fadd . ( -1 3 2 ))
-       (solbb . ( -1 4 -2 ))
-       (solb . ( -1 4 -1 ))
-       (sol . ( -1 4 0 ))
-       (sold . ( -1 4 1 ))
-       (soldd . ( -1 4 2 ))
-       (labb . ( -1 5 -2 ))
-       (lab . ( -1 5 -1 ))
-       (la . ( -1 5 0 ))
-       (lad . ( -1 5 1 ))
-       (ladd . ( -1 5 2 ))
-       (sibb . ( -1 6 -2 ))
-       (sib . ( -1 6 -1 ))
-       (si . ( -1 6 0 ))
-       (sid . ( -1 6 1 ))
-       (sidd . ( -1 6 2 ))
-       (dos . ( -1 0 1 ))
-       (doss . ( -1 0 2 ))
-       (res . ( -1 1 1 ))
-       (ress . ( -1 1 2 ))
-       (mis . ( -1 2 1 ))
-       (miss . ( -1 2 2 ))
-       (fas . ( -1 3 1 ))
-       (fass . ( -1 3 2 ))
-       (sols . ( -1 4 1 ))
-       (solss . ( -1 4 2 ))
-       (las . ( -1 5 1 ))
-       (lass . ( -1 5 2 ))
-       (sis . ( -1 6 1 ))
-       (siss . ( -1 6 2 ))
+       (dobb . ,(make-pitch -1 0 -2 ))
+       (dob . ,(make-pitch -1 0 -1 ))
+       (do . ,(make-pitch -1 0 0 ))
+       (dod . ,(make-pitch -1 0 1 ))
+       (dodd . ,(make-pitch -1 0 2 ))
+       (rebb . ,(make-pitch -1 1 -2 ))
+       (reb . ,(make-pitch -1 1 -1 ))
+       (re . ,(make-pitch -1 1 0 ))
+       (red . ,(make-pitch -1 1 1 ))
+       (redd . ,(make-pitch -1 1 2 ))
+       (mibb . ,(make-pitch -1 2 -2 ))
+       (mib . ,(make-pitch -1 2 -1 ))
+       (mi . ,(make-pitch -1 2 0 ))
+       (mid . ,(make-pitch -1 2 1 ))
+       (midd . ,(make-pitch -1 2 2 ))
+       (fabb . ,(make-pitch -1 3 -2 ))
+       (fab . ,(make-pitch -1 3 -1 ))
+       (fa . ,(make-pitch -1 3 0 ))
+       (fad . ,(make-pitch -1 3 1 ))
+       (fadd . ,(make-pitch -1 3 2 ))
+       (solbb . ,(make-pitch -1 4 -2 ))
+       (solb . ,(make-pitch -1 4 -1 ))
+       (sol . ,(make-pitch -1 4 0 ))
+       (sold . ,(make-pitch -1 4 1 ))
+       (soldd . ,(make-pitch -1 4 2 ))
+       (labb . ,(make-pitch -1 5 -2 ))
+       (lab . ,(make-pitch -1 5 -1 ))
+       (la . ,(make-pitch -1 5 0 ))
+       (lad . ,(make-pitch -1 5 1 ))
+       (ladd . ,(make-pitch -1 5 2 ))
+       (sibb . ,(make-pitch -1 6 -2 ))
+       (sib . ,(make-pitch -1 6 -1 ))
+       (si . ,(make-pitch -1 6 0 ))
+       (sid . ,(make-pitch -1 6 1 ))
+       (sidd . ,(make-pitch -1 6 2 ))
+       (dos . ,(make-pitch -1 0 1 ))
+       (doss . ,(make-pitch -1 0 2 ))
+       (res . ,(make-pitch -1 1 1 ))
+       (ress . ,(make-pitch -1 1 2 ))
+       (mis . ,(make-pitch -1 2 1 ))
+       (miss . ,(make-pitch -1 2 2 ))
+       (fas . ,(make-pitch -1 3 1 ))
+       (fass . ,(make-pitch -1 3 2 ))
+       (sols . ,(make-pitch -1 4 1 ))
+       (solss . ,(make-pitch -1 4 2 ))
+       (las . ,(make-pitch -1 5 1 ))
+       (lass . ,(make-pitch -1 5 2 ))
+       (sis . ,(make-pitch -1 6 1 ))
+       (siss . ,(make-pitch -1 6 2 ))
 )
 
 
index 673620ddf8ed37424b7c5b4dacd95a7cb32e405d..5c61876a888d1b432c814e9c11f38290b775468e 100644 (file)
@@ -1,16 +1,16 @@
 
 % urg!
 %
-\chordmodifiers #'(
-       (m . ( 0 2 -1 ))
-       (min . ( 0 2 -1 ))
-       (aug . ( 0 4 1 ))
-; (dim . ( -100 4 -1 ))        
-       (dim . ( -100 2 -1 ))
+\chordmodifiers #`(
+       (m . ,(make-pitch 0 2 -1 ))
+       (min . ,(make-pitch 0 2 -1 ))
+       (aug . ,(make-pitch 0 4 1 ))
+; (dim . ,(make-pitch -100 4 -1 ))     
+       (dim . ,(make-pitch -100 2 -1 ))
 ; urg, not actually a chord-modifier, but it works
 ; c7 -> <c bes>, c 7+ -> c b
-       (maj . ( 0 6 1 ))
+       (maj . ,(make-pitch 0 6 1 ))
 ; sus4 should delete 2 too...
-       (sus . ( 0 3 0 ))
+       (sus . ,(make-pitch 0 3 0 ))
 )
 
index ac43481fab0e886454f99cf55af40c08641dde5e..c45df5aea2d02545b5ff265cd6a9adf2d750bb98 100644 (file)
@@ -2,9 +2,10 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% UGH UGH UGH UGHUGH FIXME
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -> duplication!
 
-breve = \duration #'( -1 0)
-longa = \duration #'( -2 0 )
-maxima = \duration #'( -3 0 )
+breve = \duration #(make-duration -1 0)
+longa = \duration #'(make-duration -2 0 )
+maxima = \duration #'(make-duration  -3 0 )
+
 
 #(begin
   (eval-string (ly-gulp-file "slur.scm"))
index b2781c3dd2db7275916f474b7fefcb83ecec7b29..468fc575290423e17432613a308468a4534b7fb5 100644 (file)
@@ -1,6 +1,6 @@
-breve = \duration #'( -1 0)
-longa = \duration #'( -2 0 )
-maxima = \duration #'( -3 0 )
+breve = \duration #(make-duration -1 0)
+longa = \duration #(make-duration -2 0 )
+maxima = \duration #(make-duration  -3 0)
 
 \include "nederlands.ly"               % dutch
 \include "chord-modifiers.ly"
index 25f2f87431c04936d5df6869e2ca06596b1fd586..4ac2fd4022523e0a72a494cc75b399c2523de378 100644 (file)
@@ -8,42 +8,42 @@
 
 
 \notenames  #'(
-       (ceses . ( -1 0 -2 ))
-       (ces . ( -1 0 -1 ))
-       (c . ( -1 0 0 ))
-       (cis . ( -1 0 1 ))
-       (cisis . ( -1 0 2 ))
-       (deses . ( -1 1 -2 ))
-       (des . ( -1 1 -1 ))
-       (d . ( -1 1 0 ))
-       (dis . ( -1 1 1 ))
-       (disis . ( -1 1 2 ))
-       (eses . ( -1 2 -2 ))
-       (es . ( -1 2 -1 ))
-       (e . ( -1 2 0 ))
-       (eis . ( -1 2 1 ))
-       (eisis . ( -1 2 2 ))
-       (feses . ( -1 3 -2 ))
-       (fes . ( -1 3 -1 ))
-       (f . ( -1 3 0 ))
-       (fis . ( -1 3 1 ))
-       (fisis . ( -1 3 2 ))
-       (geses . ( -1 4 -2 ))
-       (ges . ( -1 4 -1 ))
-       (g . ( -1 4 0 ))
-       (gis . ( -1 4 1 ))
-       (gisis . ( -1 4 2 ))
-       (asas . ( -1 5 -2 ))
-       (ases . ( -1 5 -2 ))  ; non-standard name for asas
-       (as . ( -1 5 -1 ))
-       (a . ( -1 5 0 ))
-       (ais . ( -1 5 1 ))
-       (aisis . ( -1 5 2 ))
-       (heses . ( -1 6 -2 ))
-       (b . ( -1 6 -1 ))
-       (h . ( -1 6 0 ))
-       (his . ( -1 6 1 ))
-       (hisis . ( -1 6 2 ))
+       (ceses . ,(make-pitch -1 0 -2 ))
+       (ces . ,(make-pitch -1 0 -1 ))
+       (c . ,(make-pitch -1 0 0 ))
+       (cis . ,(make-pitch -1 0 1 ))
+       (cisis . ,(make-pitch -1 0 2 ))
+       (deses . ,(make-pitch -1 1 -2 ))
+       (des . ,(make-pitch -1 1 -1 ))
+       (d . ,(make-pitch -1 1 0 ))
+       (dis . ,(make-pitch -1 1 1 ))
+       (disis . ,(make-pitch -1 1 2 ))
+       (eses . ,(make-pitch -1 2 -2 ))
+       (es . ,(make-pitch -1 2 -1 ))
+       (e . ,(make-pitch -1 2 0 ))
+       (eis . ,(make-pitch -1 2 1 ))
+       (eisis . ,(make-pitch -1 2 2 ))
+       (feses . ,(make-pitch -1 3 -2 ))
+       (fes . ,(make-pitch -1 3 -1 ))
+       (f . ,(make-pitch -1 3 0 ))
+       (fis . ,(make-pitch -1 3 1 ))
+       (fisis . ,(make-pitch -1 3 2 ))
+       (geses . ,(make-pitch -1 4 -2 ))
+       (ges . ,(make-pitch -1 4 -1 ))
+       (g . ,(make-pitch -1 4 0 ))
+       (gis . ,(make-pitch -1 4 1 ))
+       (gisis . ,(make-pitch -1 4 2 ))
+       (asas . ,(make-pitch -1 5 -2 ))
+       (ases . ,(make-pitch -1 5 -2 ))  ; non-standard name for asas
+       (as . ,(make-pitch -1 5 -1 ))
+       (a . ,(make-pitch -1 5 0 ))
+       (ais . ,(make-pitch -1 5 1 ))
+       (aisis . ,(make-pitch -1 5 2 ))
+       (heses . ,(make-pitch -1 6 -2 ))
+       (b . ,(make-pitch -1 6 -1 ))
+       (h . ,(make-pitch -1 6 0 ))
+       (his . ,(make-pitch -1 6 1 ))
+       (hisis . ,(make-pitch -1 6 2 ))
 )
 
 
index 4f125fe76448b2a9e394ea6451dd872072d25c39..0ce982f82689612991fa749d06bc0e6562fb7036 100644 (file)
@@ -3,78 +3,78 @@
      with s for sharp and f for flat.
 %}
 
-\notenames #'(
-       (cflatflat . ( -1 0 -2 ))
-       (cflat . ( -1 0 -1 ))
-       (c . ( -1 0 0 ))
-       (csharp . ( -1 0 1 ))
-       (csharpsharp . ( -1 0 2 ))
-       (dflatflat . ( -1 1 -2 ))
-       (dflat . ( -1 1 -1 ))
-       (d . ( -1 1 0 ))
-       (dsharp . ( -1 1 1 ))
-       (dsharpsharp . ( -1 1 2 ))
-       (eflatflat . ( -1 2 -2 ))
-       (eflat . ( -1 2 -1 ))
-       (e . ( -1 2 0 ))
-       (esharp . ( -1 2 1 ))
-       (esharpsharp . ( -1 2 2 ))
-       (fflatflat . ( -1 3 -2 ))
-       (fflat . ( -1 3 -1 ))
-       (f . ( -1 3 0 ))
-       (fsharp . ( -1 3 1 ))
-       (fsharpsharp . ( -1 3 2 ))
-       (gflatflat . ( -1 4 -2 ))
-       (gflat . ( -1 4 -1 ))
-       (g . ( -1 4 0 ))
-       (gsharp . ( -1 4 1 ))
-       (gsharpsharp . ( -1 4 2 ))
-       (aflatflat . ( -1 5 -2 ))
-       (aflat . ( -1 5 -1 ))
-       (a . ( -1 5 0 ))
-       (asharp . ( -1 5 1 ))
-       (asharpsharp . ( -1 5 2 ))
-       (bflatflat . ( -1 6 -2 ))
-       (bflat . ( -1 6 -1 ))
-       (b . ( -1 6 0 ))
-       (bsharp . ( -1 6 1 ))
-       (bsharpsharp . ( -1 6 2 ))
+\notenames #`(
+       (cflatflat . ,(make-pitch -1 0 -2 ))
+       (cflat . ,(make-pitch -1 0 -1 ))
+       (c . ,(make-pitch -1 0 0 ))
+       (csharp . ,(make-pitch -1 0 1 ))
+       (csharpsharp . ,(make-pitch -1 0 2 ))
+       (dflatflat . ,(make-pitch -1 1 -2 ))
+       (dflat . ,(make-pitch -1 1 -1 ))
+       (d . ,(make-pitch -1 1 0 ))
+       (dsharp . ,(make-pitch -1 1 1 ))
+       (dsharpsharp . ,(make-pitch -1 1 2 ))
+       (eflatflat . ,(make-pitch -1 2 -2 ))
+       (eflat . ,(make-pitch -1 2 -1 ))
+       (e . ,(make-pitch -1 2 0 ))
+       (esharp . ,(make-pitch -1 2 1 ))
+       (esharpsharp . ,(make-pitch -1 2 2 ))
+       (fflatflat . ,(make-pitch -1 3 -2 ))
+       (fflat . ,(make-pitch -1 3 -1 ))
+       (f . ,(make-pitch -1 3 0 ))
+       (fsharp . ,(make-pitch -1 3 1 ))
+       (fsharpsharp . ,(make-pitch -1 3 2 ))
+       (gflatflat . ,(make-pitch -1 4 -2 ))
+       (gflat . ,(make-pitch -1 4 -1 ))
+       (g . ,(make-pitch -1 4 0 ))
+       (gsharp . ,(make-pitch -1 4 1 ))
+       (gsharpsharp . ,(make-pitch -1 4 2 ))
+       (aflatflat . ,(make-pitch -1 5 -2 ))
+       (aflat . ,(make-pitch -1 5 -1 ))
+       (a . ,(make-pitch -1 5 0 ))
+       (asharp . ,(make-pitch -1 5 1 ))
+       (asharpsharp . ,(make-pitch -1 5 2 ))
+       (bflatflat . ,(make-pitch -1 6 -2 ))
+       (bflat . ,(make-pitch -1 6 -1 ))
+       (b . ,(make-pitch -1 6 0 ))
+       (bsharp . ,(make-pitch -1 6 1 ))
+       (bsharpsharp . ,(make-pitch -1 6 2 ))
 
-       (cff . ( -1 0 -2 ))
-       (cf . ( -1 0 -1 ))
-       (c . ( -1 0 0 ))
-       (cs . ( -1 0 1 ))
-       (css . ( -1 0 2 ))
-       (dff . ( -1 1 -2 ))
-       (df . ( -1 1 -1 ))
-       (d . ( -1 1 0 ))
-       (ds . ( -1 1 1 ))
-       (dss . ( -1 1 2 ))
-       (eff . ( -1 2 -2 ))
-       (ef . ( -1 2 -1 ))
-       (e . ( -1 2 0 ))
-       (es . ( -1 2 1 ))   ; es = E-flat in Dutch
-       (ess . ( -1 2 2 ))
-       (fff . ( -1 3 -2 ))
-       (ff . ( -1 3 -1 ))
-       (f . ( -1 3 0 ))
-       (fs . ( -1 3 1 ))
-       (fss . ( -1 3 2 ))
-       (gff . ( -1 4 -2 ))
-       (gf . ( -1 4 -1 ))
-       (g . ( -1 4 0 ))
-       (gs . ( -1 4 1 ))
-       (gss . ( -1 4 2 ))
-       (aff . ( -1 5 -2 ))
-       (af . ( -1 5 -1 ))
-       (a . ( -1 5 0 ))
-       (as . ( -1 5 1 ))   ; as = A-flat in Dutch
-       (ass . ( -1 5 2 ))
-       (bff . ( -1 6 -2 ))
-       (bf . ( -1 6 -1 ))
-       (b . ( -1 6 0 ))
-       (bs . ( -1 6 1 ))
-       (bss . ( -1 6 2 ))
+       (cff . ,(make-pitch -1 0 -2 ))
+       (cf . ,(make-pitch -1 0 -1 ))
+       (c . ,(make-pitch -1 0 0 ))
+       (cs . ,(make-pitch -1 0 1 ))
+       (css . ,(make-pitch -1 0 2 ))
+       (dff . ,(make-pitch -1 1 -2 ))
+       (df . ,(make-pitch -1 1 -1 ))
+       (d . ,(make-pitch -1 1 0 ))
+       (ds . ,(make-pitch -1 1 1 ))
+       (dss . ,(make-pitch -1 1 2 ))
+       (eff . ,(make-pitch -1 2 -2 ))
+       (ef . ,(make-pitch -1 2 -1 ))
+       (e . ,(make-pitch -1 2 0 ))
+       (es . ,(make-pitch -1 2 1 ))   ; es = E-flat in Dutch
+       (ess . ,(make-pitch -1 2 2 ))
+       (fff . ,(make-pitch -1 3 -2 ))
+       (ff . ,(make-pitch -1 3 -1 ))
+       (f . ,(make-pitch -1 3 0 ))
+       (fs . ,(make-pitch -1 3 1 ))
+       (fss . ,(make-pitch -1 3 2 ))
+       (gff . ,(make-pitch -1 4 -2 ))
+       (gf . ,(make-pitch -1 4 -1 ))
+       (g . ,(make-pitch -1 4 0 ))
+       (gs . ,(make-pitch -1 4 1 ))
+       (gss . ,(make-pitch -1 4 2 ))
+       (aff . ,(make-pitch -1 5 -2 ))
+       (af . ,(make-pitch -1 5 -1 ))
+       (a . ,(make-pitch -1 5 0 ))
+       (as . ,(make-pitch -1 5 1 ))   ; as = A-flat in Dutch
+       (ass . ,(make-pitch -1 5 2 ))
+       (bff . ,(make-pitch -1 6 -2 ))
+       (bf . ,(make-pitch -1 6 -1 ))
+       (b . ,(make-pitch -1 6 0 ))
+       (bs . ,(make-pitch -1 6 1 ))
+       (bss . ,(make-pitch -1 6 2 ))
 )
 
 \version "1.3.96";
index 4df74b22ccdbdebca16b13705ccc147482699ea7..3db0e86dbe59f0d9e623802d711ec7a90d18e9c5 100644 (file)
 % contributed by Paolo Zuliani <zuliap@easynet.it>
 
 \notenames #'(
-       (dobb . ( -1 0 -2 ))
-       (dob . ( -1 0 -1 ))
-       (do . ( -1 0 0 ))
-       (dod . ( -1 0 1 ))
-       (dodd . ( -1 0 2 ))
-       (rebb . ( -1 1 -2 ))
-       (reb . ( -1 1 -1 ))
-       (re . ( -1 1 0 ))
-       (red . ( -1 1 1 ))
-       (redd . ( -1 1 2 ))
-       (mibb . ( -1 2 -2 ))
-       (mib . ( -1 2 -1 ))
-       (mi . ( -1 2 0 ))
-       (mid . ( -1 2 1 ))
-       (midd . ( -1 2 2 ))
-       (fabb . ( -1 3 -2 ))
-       (fab . ( -1 3 -1 ))
-       (fa . ( -1 3 0 ))
-       (fad . ( -1 3 1 ))
-       (fadd . ( -1 3 2 ))
-       (solbb . ( -1 4 -2 ))
-       (solb . ( -1 4 -1 ))
-       (sol . ( -1 4 0 ))
-       (sold . ( -1 4 1 ))
-       (soldd . ( -1 4 2 ))
-       (labb . ( -1 5 -2 ))
-       (lab . ( -1 5 -1 ))
-       (la . ( -1 5 0 ))
-       (lad . ( -1 5 1 ))
-       (ladd . ( -1 5 2 ))
-       (sibb . ( -1 6 -2 ))
-       (sib . ( -1 6 -1 ))
-       (si . ( -1 6 0 ))
-       (sid . ( -1 6 1 ))
-       (sidd . ( -1 6 2 ))
+       (dobb . ,(make-pitch -1 0 -2 ))
+       (dob . ,(make-pitch -1 0 -1 ))
+       (do . ,(make-pitch -1 0 0 ))
+       (dod . ,(make-pitch -1 0 1 ))
+       (dodd . ,(make-pitch -1 0 2 ))
+       (rebb . ,(make-pitch -1 1 -2 ))
+       (reb . ,(make-pitch -1 1 -1 ))
+       (re . ,(make-pitch -1 1 0 ))
+       (red . ,(make-pitch -1 1 1 ))
+       (redd . ,(make-pitch -1 1 2 ))
+       (mibb . ,(make-pitch -1 2 -2 ))
+       (mib . ,(make-pitch -1 2 -1 ))
+       (mi . ,(make-pitch -1 2 0 ))
+       (mid . ,(make-pitch -1 2 1 ))
+       (midd . ,(make-pitch -1 2 2 ))
+       (fabb . ,(make-pitch -1 3 -2 ))
+       (fab . ,(make-pitch -1 3 -1 ))
+       (fa . ,(make-pitch -1 3 0 ))
+       (fad . ,(make-pitch -1 3 1 ))
+       (fadd . ,(make-pitch -1 3 2 ))
+       (solbb . ,(make-pitch -1 4 -2 ))
+       (solb . ,(make-pitch -1 4 -1 ))
+       (sol . ,(make-pitch -1 4 0 ))
+       (sold . ,(make-pitch -1 4 1 ))
+       (soldd . ,(make-pitch -1 4 2 ))
+       (labb . ,(make-pitch -1 5 -2 ))
+       (lab . ,(make-pitch -1 5 -1 ))
+       (la . ,(make-pitch -1 5 0 ))
+       (lad . ,(make-pitch -1 5 1 ))
+       (ladd . ,(make-pitch -1 5 2 ))
+       (sibb . ,(make-pitch -1 6 -2 ))
+       (sib . ,(make-pitch -1 6 -1 ))
+       (si . ,(make-pitch -1 6 0 ))
+       (sid . ,(make-pitch -1 6 1 ))
+       (sidd . ,(make-pitch -1 6 2 ))
 )
 
 \version "1.3.96";
index b41614cc2bf96cfb31db9a2923ab6d3e79acbfa3..f367eafe590ce5dcd5f9c86b97b1986064725875 100644 (file)
@@ -6,3 +6,4 @@
        \include "performer.ly"
 %      unfold_all = "1";
 }
+
index dc8c4919e418930e72a108fe4cd9f83603d66a08..9d16eb3cbbb42ec9f78e5ddacd2468a3233c419a 100644 (file)
@@ -2,46 +2,47 @@
  common dutch names for notes. es means flat, is means sharp
 %}
 
-\notenames #'(
-       (ceses . (-1 0 -2 ))
-       (ces . ( -1 0 -1 ))
-       (c . ( -1 0 0 ))
-       (cis . ( -1 0 1 ))
-       (cisis . ( -1 0 2 ))
-       (deses . ( -1 1 -2 ))
-       (des . ( -1 1 -1 ))
-       (d . ( -1 1 0 ))
-       (dis . ( -1 1 1 ))
-       (disis . ( -1 1 2 ))
-       (eeses . ( -1 2 -2 ))
-       (eses . ( -1 2 -2 ))
-       (ees . ( -1 2 -1 ))
-       (es . ( -1 2 -1 ))
-       (e . ( -1 2 0 ))
-       (eis . ( -1 2 1 ))
-       (eisis . ( -1 2 2 ))
-       (feses . ( -1 3 -2 ))
-       (fes . ( -1 3 -1 ))
-       (f . ( -1 3 0 ))
-       (fis . ( -1 3 1 ))
-       (fisis . ( -1 3 2 ))
-       (geses . ( -1 4 -2 ))
-       (ges . ( -1 4 -1 ))
-       (g . ( -1 4 0 ))
-       (gis . ( -1 4 1 ))
-       (gisis . ( -1 4 2 ))
-       (aeses . ( -1 5 -2 ))
-       (ases . ( -1 5 -2 ))
-       (aes . ( -1 5 -1 ))
-       (as . ( -1 5 -1 ))
-       (a . ( -1 5 0 ))
-       (ais . ( -1 5 1 ))
-       (aisis . ( -1 5 2 ))
-       (beses . ( -1 6 -2 ))
-       (bes . ( -1 6 -1 ))
-       (b . ( -1 6 0 ))
-       (bis . ( -1 6 1 ))
-       (bisis . ( -1 6 2 )))
+\notenames #`(
+       (ceses . ,(make-pitch -1 0 -2))
+       (ces . ,(make-pitch  -1 0 -1 ))
+       (c . ,(make-pitch  -1 0 0 ))
+       (cis . ,(make-pitch  -1 0 1 ))
+       (cisis . ,(make-pitch  -1 0 2 ))
+       (deses . ,(make-pitch  -1 1 -2 ))
+       (des . ,(make-pitch  -1 1 -1 ))
+       (d . ,(make-pitch  -1 1 0 ))
+       (dis . ,(make-pitch  -1 1 1 ))
+       (disis . ,(make-pitch  -1 1 2 ))
+       (eeses . ,(make-pitch  -1 2 -2 ))
+       (eses . ,(make-pitch  -1 2 -2 ))
+       (ees . ,(make-pitch  -1 2 -1 ))
+       (es . ,(make-pitch  -1 2 -1 ))
+       (e . ,(make-pitch  -1 2 0 ))
+       (eis . ,(make-pitch  -1 2 1 ))
+       (eisis . ,(make-pitch  -1 2 2 ))
+       (feses . ,(make-pitch  -1 3 -2 ))
+       (fes . ,(make-pitch  -1 3 -1 ))
+       (f . ,(make-pitch  -1 3 0 ))
+       (fis . ,(make-pitch  -1 3 1 ))
+       (fisis . ,(make-pitch  -1 3 2 ))
+       (geses . ,(make-pitch  -1 4 -2 ))
+       (ges . ,(make-pitch  -1 4 -1 ))
+       (g . ,(make-pitch  -1 4 0 ))
+       (gis . ,(make-pitch  -1 4 1 ))
+       (gisis . ,(make-pitch  -1 4 2 ))
+       (aeses . ,(make-pitch  -1 5 -2 ))
+       (ases . ,(make-pitch  -1 5 -2 ))
+       (aes . ,(make-pitch  -1 5 -1 ))
+       (as . ,(make-pitch  -1 5 -1 ))
+       (a . ,(make-pitch  -1 5 0 ))
+       (ais . ,(make-pitch  -1 5 1 ))
+       (aisis . ,(make-pitch  -1 5 2 ))
+       (beses . ,(make-pitch  -1 6 -2 ))
+       (bes . ,(make-pitch  -1 6 -1 ))
+       (b . ,(make-pitch  -1 6 0 ))
+       (bis . ,(make-pitch  -1 6 1 ))
+       (bisis . ,(make-pitch  -1 6 2 ))
+)
 
 
 
index 8af9f332a7921750dabe591a6a8ca8fbf924bde8..27214aaa2e93c2ec27720fff51c885912d407939 100644 (file)
 %}
 
 \notenames #'(
-       (ceses . ( -1 0 -2 ))
-       (cessess . ( -1 0 -2 ))
-       (ces . ( -1 0 -1 ))
-       (cess . ( -1 0 -1 ))
-       (c . ( -1 0 0 ))
-       (cis . ( -1 0 1 ))
-       (ciss . ( -1 0 1 ))
-       (cisis . ( -1 0 2 ))
-       (cississ . ( -1 0 2 ))
-       (deses . ( -1 1 -2 ))
-       (dessess . ( -1 1 -2 ))
-       (des . ( -1 1 -1 ))
-       (dess . ( -1 1 -1 ))
-       (d . ( -1 1 0 ))
-       (dis . ( -1 1 1 ))
-       (diss . ( -1 1 1 ))
-       (disis . ( -1 1 2 ))
-       (dississ . ( -1 1 2 ))
-       (eeses . ( -1 2 -2 ))
-       (eessess . ( -1 2 -2 ))
-       (eses . ( -1 2 -2 ))
-       (essess . ( -1 2 -2 ))
-       (ees . ( -1 2 -1 ))
-       (eess . ( -1 2 -1 ))
-       (es . ( -1 2 -1 ))
-       (ess . ( -1 2 -1 ))
-       (e . ( -1 2 0 ))
-       (eis . ( -1 2 1 ))
-       (eiss . ( -1 2 1 ))
-       (eisis . ( -1 2 2 ))
-       (eississ . ( -1 2 2 ))
-       (feses . ( -1 3 -2 ))
-       (fessess . ( -1 3 -2 ))
-       (fes . ( -1 3 -1 ))
-       (fess . ( -1 3 -1 ))
-       (f . ( -1 3 0 ))
-       (fis . ( -1 3 1 ))
-       (fiss . ( -1 3 1 ))
-       (fisis . ( -1 3 2 ))
-       (fississ . ( -1 3 2 ))
-       (geses . ( -1 4 -2 ))
-       (gessess . ( -1 4 -2 ))
-       (ges . ( -1 4 -1 ))
-       (gess . ( -1 4 -1 ))
-       (g . ( -1 4 0 ))
-       (g . ( -1 4 0 ))
-       (gis . ( -1 4 1 ))
-       (giss . ( -1 4 1 ))
-       (gisis . ( -1 4 2 ))
-       (gississ . ( -1 4 2 ))
-       (aeses . ( -1 5 -2 ))
-       (aessess . ( -1 5 -2 ))
-       (ases . ( -1 5 -2 ))
-       (assess . ( -1 5 -2 ))
-       (aes . ( -1 5 -1 ))
-       (aess . ( -1 5 -1 ))
-       (as . ( -1 5 -1 ))
-       (ass . ( -1 5 -1 ))
-       (a . ( -1 5 0 ))
-       (ais . ( -1 5 1 ))
-       (aiss . ( -1 5 1 ))
-       (aisis . ( -1 5 2 ))
-       (aississ . ( -1 5 2 ))
-       (bes . ( -1 6 -2 ))
-       (bess . ( -1 6 -2 ))
-       (b . ( -1 6 -1 ))
-       (b . ( -1 6 -1 ))
-       (h . ( -1 6 0 ))
-       (his . ( -1 6 1 ))
-       (hiss . ( -1 6 1 ))
-       (hisis . ( -1 6 2 ))
-       (hississ . ( -1 6 2 ))
+       (ceses . ,(make-pitch -1 0 -2 ))
+       (cessess . ,(make-pitch -1 0 -2 ))
+       (ces . ,(make-pitch -1 0 -1 ))
+       (cess . ,(make-pitch -1 0 -1 ))
+       (c . ,(make-pitch -1 0 0 ))
+       (cis . ,(make-pitch -1 0 1 ))
+       (ciss . ,(make-pitch -1 0 1 ))
+       (cisis . ,(make-pitch -1 0 2 ))
+       (cississ . ,(make-pitch -1 0 2 ))
+       (deses . ,(make-pitch -1 1 -2 ))
+       (dessess . ,(make-pitch -1 1 -2 ))
+       (des . ,(make-pitch -1 1 -1 ))
+       (dess . ,(make-pitch -1 1 -1 ))
+       (d . ,(make-pitch -1 1 0 ))
+       (dis . ,(make-pitch -1 1 1 ))
+       (diss . ,(make-pitch -1 1 1 ))
+       (disis . ,(make-pitch -1 1 2 ))
+       (dississ . ,(make-pitch -1 1 2 ))
+       (eeses . ,(make-pitch -1 2 -2 ))
+       (eessess . ,(make-pitch -1 2 -2 ))
+       (eses . ,(make-pitch -1 2 -2 ))
+       (essess . ,(make-pitch -1 2 -2 ))
+       (ees . ,(make-pitch -1 2 -1 ))
+       (eess . ,(make-pitch -1 2 -1 ))
+       (es . ,(make-pitch -1 2 -1 ))
+       (ess . ,(make-pitch -1 2 -1 ))
+       (e . ,(make-pitch -1 2 0 ))
+       (eis . ,(make-pitch -1 2 1 ))
+       (eiss . ,(make-pitch -1 2 1 ))
+       (eisis . ,(make-pitch -1 2 2 ))
+       (eississ . ,(make-pitch -1 2 2 ))
+       (feses . ,(make-pitch -1 3 -2 ))
+       (fessess . ,(make-pitch -1 3 -2 ))
+       (fes . ,(make-pitch -1 3 -1 ))
+       (fess . ,(make-pitch -1 3 -1 ))
+       (f . ,(make-pitch -1 3 0 ))
+       (fis . ,(make-pitch -1 3 1 ))
+       (fiss . ,(make-pitch -1 3 1 ))
+       (fisis . ,(make-pitch -1 3 2 ))
+       (fississ . ,(make-pitch -1 3 2 ))
+       (geses . ,(make-pitch -1 4 -2 ))
+       (gessess . ,(make-pitch -1 4 -2 ))
+       (ges . ,(make-pitch -1 4 -1 ))
+       (gess . ,(make-pitch -1 4 -1 ))
+       (g . ,(make-pitch -1 4 0 ))
+       (g . ,(make-pitch -1 4 0 ))
+       (gis . ,(make-pitch -1 4 1 ))
+       (giss . ,(make-pitch -1 4 1 ))
+       (gisis . ,(make-pitch -1 4 2 ))
+       (gississ . ,(make-pitch -1 4 2 ))
+       (aeses . ,(make-pitch -1 5 -2 ))
+       (aessess . ,(make-pitch -1 5 -2 ))
+       (ases . ,(make-pitch -1 5 -2 ))
+       (assess . ,(make-pitch -1 5 -2 ))
+       (aes . ,(make-pitch -1 5 -1 ))
+       (aess . ,(make-pitch -1 5 -1 ))
+       (as . ,(make-pitch -1 5 -1 ))
+       (ass . ,(make-pitch -1 5 -1 ))
+       (a . ,(make-pitch -1 5 0 ))
+       (ais . ,(make-pitch -1 5 1 ))
+       (aiss . ,(make-pitch -1 5 1 ))
+       (aisis . ,(make-pitch -1 5 2 ))
+       (aississ . ,(make-pitch -1 5 2 ))
+       (bes . ,(make-pitch -1 6 -2 ))
+       (bess . ,(make-pitch -1 6 -2 ))
+       (b . ,(make-pitch -1 6 -1 ))
+       (b . ,(make-pitch -1 6 -1 ))
+       (h . ,(make-pitch -1 6 0 ))
+       (his . ,(make-pitch -1 6 1 ))
+       (hiss . ,(make-pitch -1 6 1 ))
+       (hisis . ,(make-pitch -1 6 2 ))
+       (hississ . ,(make-pitch -1 6 2 ))
 )
 
 
index 09cfad936e503baa39842a99b701ded664d8ed04..8fdb6abcc148cdfeaf19174974ed25eee651127e 100644 (file)
@@ -4,40 +4,40 @@
 % by Mats Bengtsson.
 
 \notenames #'(
-       (cessess . ( -1 0 -2 ))
-       (cess . ( -1 0 -1 ))
-       (c . ( -1 0 0 ))
-       (ciss . ( -1 0 1 ))
-       (cississ . ( -1 0 2 ))
-       (dessess . ( -1 1 -2 ))
-       (dess . ( -1 1 -1 ))
-       (d . ( -1 1 0 ))
-       (diss . ( -1 1 1 ))
-       (dississ . ( -1 1 2 ))
-       (essess . ( -1 2 -2 ))
-       (ess . ( -1 2 -1 ))
-       (e . ( -1 2 0 ))
-       (eiss . ( -1 2 1 ))
-       (eississ . ( -1 2 2 ))
-       (fessess . ( -1 3 -2 ))
-       (fess . ( -1 3 -1 ))
-       (f . ( -1 3 0 ))
-       (fiss . ( -1 3 1 ))
-       (fississ . ( -1 3 2 ))
-       (gessess . ( -1 4 -2 ))
-       (gess . ( -1 4 -1 ))
-       (g . ( -1 4 0 ))
-       (giss . ( -1 4 1 ))
-       (gississ . ( -1 4 2 ))
-       (assess . ( -1 5 -2 ))
-       (ass . ( -1 5 -1 ))
-       (a . ( -1 5 0 ))
-       (aiss . ( -1 5 1 ))
-       (aississ . ( -1 5 2 ))
-       (hessess . ( -1 6 -2 ))
-       (b . ( -1 6 -1 ))
-       (h . ( -1 6 0 ))
-       (hiss . ( -1 6 1 ))
-       (hississ . ( -1 6 2 ))
+       (cessess . ,(make-pitch -1 0 -2 ))
+       (cess . ,(make-pitch -1 0 -1 ))
+       (c . ,(make-pitch -1 0 0 ))
+       (ciss . ,(make-pitch -1 0 1 ))
+       (cississ . ,(make-pitch -1 0 2 ))
+       (dessess . ,(make-pitch -1 1 -2 ))
+       (dess . ,(make-pitch -1 1 -1 ))
+       (d . ,(make-pitch -1 1 0 ))
+       (diss . ,(make-pitch -1 1 1 ))
+       (dississ . ,(make-pitch -1 1 2 ))
+       (essess . ,(make-pitch -1 2 -2 ))
+       (ess . ,(make-pitch -1 2 -1 ))
+       (e . ,(make-pitch -1 2 0 ))
+       (eiss . ,(make-pitch -1 2 1 ))
+       (eississ . ,(make-pitch -1 2 2 ))
+       (fessess . ,(make-pitch -1 3 -2 ))
+       (fess . ,(make-pitch -1 3 -1 ))
+       (f . ,(make-pitch -1 3 0 ))
+       (fiss . ,(make-pitch -1 3 1 ))
+       (fississ . ,(make-pitch -1 3 2 ))
+       (gessess . ,(make-pitch -1 4 -2 ))
+       (gess . ,(make-pitch -1 4 -1 ))
+       (g . ,(make-pitch -1 4 0 ))
+       (giss . ,(make-pitch -1 4 1 ))
+       (gississ . ,(make-pitch -1 4 2 ))
+       (assess . ,(make-pitch -1 5 -2 ))
+       (ass . ,(make-pitch -1 5 -1 ))
+       (a . ,(make-pitch -1 5 0 ))
+       (aiss . ,(make-pitch -1 5 1 ))
+       (aississ . ,(make-pitch -1 5 2 ))
+       (hessess . ,(make-pitch -1 6 -2 ))
+       (b . ,(make-pitch -1 6 -1 ))
+       (h . ,(make-pitch -1 6 0 ))
+       (hiss . ,(make-pitch -1 6 1 ))
+       (hississ . ,(make-pitch -1 6 2 ))
 )
 \version "1.3.96";
index 3ad2d595d8399f0f38a1c7c8f324d5637f0edae1..78a11c5c23ecdaa040935d0e55ed4bf98ec64877 100644 (file)
@@ -45,17 +45,17 @@ INSTALLED_EXTRA_DOC_FILES = $(addprefix $(prefix:/%=%)/doc/lilypond/, $(EXTRA_DO
 
 # installed by 'make install'
 INSTALL_DIST_FILES = \
-  bin/convert-mudela\
-  bin/mudela-book\
+  bin/convert-ly\
+  bin/lilypond-book\
   bin/ly2dvi\
   bin/$(program_prefix)lilypond$(program_suffix)\
   bin/$(program_prefix)mi2mu$(program-suffix)\
   info/lilypond.info\
   man/man1/mi2mu.1\
   man/man1/lilypond.1\
-  man/man1/mudela-book.1\
+  man/man1/lilypond-book.1\
   man/man1/ly2dvi.1\
-  man/man1/convert-mudela.1\
+  man/man1/convert-ly.1\
   lib/texmf/texmf/tex/lilypond\
   lib/texmf/texmf/fonts/source/public/lilypond\
   share/lilypond/\
diff --git a/make/ly-rules.make b/make/ly-rules.make
new file mode 100644 (file)
index 0000000..d7af4be
--- /dev/null
@@ -0,0 +1,30 @@
+# Mudela_rules.make
+
+.SUFFIXES: .doc .dvi .mudtex .tely .texi
+
+SUBST_TEXI_DEPS=sed 's! \.\./! !g' < $(basename $@).dep > $(outdir)/temp.dep ;         mv $(outdir)/temp.dep $(basename $@).dep 
+
+$(outdir)/%.latex: %.doc
+       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ $< 
+       $(SUBST_TEXI_DEPS)
+
+# don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
+# it is not, for --scrdir builds
+$(outdir)/%.texi: %.tely
+       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $<
+       $(SUBST_TEXI_DEPS)
+
+# nexi: no-lily texi
+# for plain info doco: don't run lily
+$(outdir)/%.nexi: %.tely
+       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) --no-lily -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $<
+       mv $(@D)/$(*F).texi $@
+       $(SUBST_TEXI_DEPS)
+
+# nfo: info from non-lily texi
+$(outdir)/%.info: $(outdir)/%.nexi
+       -$(MAKEINFO) --force --output=$(outdir)/$(*F).info $<
+
+# nfo: info from non-lily texi
+#$(outdir)/%.nfo: $(outdir)/%.nexi
+#      -$(MAKEINFO) --force --output=$(outdir)/$(*F).info $<
diff --git a/make/ly-targets.make b/make/ly-targets.make
new file mode 100644 (file)
index 0000000..e032d7e
--- /dev/null
@@ -0,0 +1,2 @@
+# empty
+
diff --git a/make/ly-vars.make b/make/ly-vars.make
new file mode 100644 (file)
index 0000000..024d2ab
--- /dev/null
@@ -0,0 +1,4 @@
+# empty
+TELY_FILES := $(wildcard *.tely)
+EXTRA_DIST_FILES += $(TELY_FILES)
+
diff --git a/make/mudela-rules.make b/make/mudela-rules.make
deleted file mode 100644 (file)
index aa78b14..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# Mudela_rules.make
-
-.SUFFIXES: .doc .dvi .mudtex .tely .texi
-
-SUBST_TEXI_DEPS=sed 's! \.\./! !g' < $(basename $@).dep > $(outdir)/temp.dep ;         mv $(outdir)/temp.dep $(basename $@).dep 
-
-$(outdir)/%.latex: %.doc
-       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/mudela-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ $< 
-       $(SUBST_TEXI_DEPS)
-
-# don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
-# it is not, for --scrdir builds
-$(outdir)/%.texi: %.tely
-       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/mudela-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $<
-       $(SUBST_TEXI_DEPS)
-
-# nexi: no-lily texi
-# for plain info doco: don't run lily
-$(outdir)/%.nexi: %.tely
-       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/mudela-book.py --outdir=$(outdir) --no-lily -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $<
-       mv $(@D)/$(*F).texi $@
-       $(SUBST_TEXI_DEPS)
-
-# nfo: info from non-lily texi
-$(outdir)/%.info: $(outdir)/%.nexi
-       -$(MAKEINFO) --force --output=$(outdir)/$(*F).info $<
-
-# nfo: info from non-lily texi
-#$(outdir)/%.nfo: $(outdir)/%.nexi
-#      -$(MAKEINFO) --force --output=$(outdir)/$(*F).info $<
diff --git a/make/mudela-targets.make b/make/mudela-targets.make
deleted file mode 100644 (file)
index e032d7e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# empty
-
diff --git a/make/mudela-vars.make b/make/mudela-vars.make
deleted file mode 100644 (file)
index 024d2ab..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# empty
-TELY_FILES := $(wildcard *.tely)
-EXTRA_DIST_FILES += $(TELY_FILES)
-
index a55109ab364bb65dbc837f12bc459bbdea526d12..4a759813c51cb9b57cc0b73e821d4544414ea243 100644 (file)
@@ -9,8 +9,8 @@ local-WWW: $(ly_examples) $(fly_examples) $(ps_examples) $(png_examples)
 local-web:
        $(MAKE) conf=www local-WWW
 
-convert-mudela: local-convert-mudela
+convert-ly: local-convert-ly
        $(LOOP)
 
-local-convert-mudela:
-       $(PYTHON) $(script-dir)/convert-mudela.py -e *ly
+local-convert-ly:
+       $(PYTHON) $(script-dir)/convert-ly.py -e *ly
index 9aa271c1a47211d0b5f42bdd7a327aaec72c6904..db406f7cce3098551473c4d8c59d2149e0f2e503 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.106
-Entered-date: 10NOV00
+Version: 1.3.107
+Entered-date: 13NOV00
 Description: 
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.3.106.tar.gz 
+       1000k lilypond-1.3.107.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.106.tar.gz 
+       1000k lilypond-1.3.107.tar.gz 
 Copying-policy: GPL
 End
index 731458cd47e1bc159f73620e506089996df3f6dc..a984ef41728296cbe896742f5df94f9ba17bc4d0 100644 (file)
@@ -1,11 +1,11 @@
 %define info yes
 
 Name: lilypond
-Version: 1.3.106
+Version: 1.3.107
 Release: 1
 License: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.106.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.107.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # Icon: lilypond-icon.gif
index 768713c521ed18dee5fcc4658300798e12d983e9..5f9a9f145118a0386580036e29199b1c839c5902 100644 (file)
@@ -3,8 +3,8 @@
 % hmm
 % /setgray { 1 add } bind def
 
-/stafflinethickness  mudelapaperstafflinethickness def
-/staffheight mudelapaperstaffheight def
+/stafflinethickness  lilypondpaperstafflinethickness def
+/staffheight lilypondpaperstaffheight def
 
 /xoffset 30 def
 /yoffset 700 def
@@ -57,7 +57,7 @@
        grestore
        yoffset add /yoffset exch def
        % urg...
-       yoffset mudelapaperstaffheight 8 mul sub /yoffset exch def
+       yoffset lilypondpaperstaffheight 8 mul sub /yoffset exch def
 } bind def
 
 /turnOnExperimentalFeatures { } bind def
index ea9bc54a30588ab77047d4c2b4aa5eeb41f9cf6a..ada96b4592560ffb00a99027ebb80b901e37f0f5 100644 (file)
@@ -83,8 +83,8 @@
 
   (define (lily-def key val)
          (if 
-          (or (equal? key "mudelapaperlinewidth")
-              (equal? key "mudelapaperstaffheight"))
+          (or (equal? key "lilypondpaperlinewidth")
+              (equal? key "lilypondpaperstaffheight"))
           (string-append "(define " key " " (arg->string val) ")\n")
           ""))
 
index 1cac00d032cf46516d779a833bd266e515c20b78..25ddef79a950a7aac7bf50726089535cf9f833a7 100644 (file)
@@ -24,9 +24,9 @@
 ;; * text definition is rather ad-hoc
 ;; * do without format module
 ;; * finish and check american names
-;; * make notename (tonic) configurable from mudela
+;; * make notename (tonic) configurable from lilypond
 ;; * fix append/cons stuff in inner-name-banter
-;;
+;; * doc strings.
 
 
 ;;;;;;;;;
@@ -68,6 +68,7 @@
 ;; DONT use non-ascii characters, even if ``it works'' in Windows
 
 (define chord::names-alist-american '())
+
 (set! chord::names-alist-american
       (append 
        '(
                                        (list 'super (step->text-banter p))
                                        (if (pair? (cdr from))
                                            '((super "/"))
-                                           '()))))))
+                                           '())))))) ; nesting?
                 to))
         (if (and (pair? base-and-inversion)
                  (or (car base-and-inversion)
        (subtractions #f))
     (chord::inner-name-banter tonic user-name additions subtractions base-and-inversion)))
 
+(define (new-to-old-pitch p)
+  (if (pitch? p)
+      (list (pitch-octave p) (pitch-notename p) (pitch-alteration p))
+      #f
+  ))
+
+
+
 ;; C++ entry point
 ;; 
 ;; Check for each subset of chord, full chord first, if there's a
   ;(display "pitches:") (display  pitches) (newline)
   ;(display "style:") (display  style) (newline)
   ;(display "b&i:") (display  base-and-inversion) (newline)
+  (set! pitches (map new-to-old-pitch pitches))
+  (set! base-and-inversion (cons (new-to-old-pitch (car base-and-inversion))
+                                (new-to-old-pitch (cdr base-and-inversion))))
+  
   (let ((diff (pitch::diff '(0 0 0) (car pitches)))
        (name-func 
          (ly-eval (string->symbol (string-append "chord::name-" style))))
index 9adc6639cb23379949c2d8c515f031d883644e68..72c8e72edddffacac16adb2e3af1344f4b4988d0 100644 (file)
                (stem-shorten . (0.5))
                ; if stem is on middle line, choose this direction.
                (default-neutral-direction . 1)
-               (X-offset-callbacks . (,Stem::off_callback))            
+               (X-offset-callbacks . (,Stem::off_callback))
+               (X-extent-callback . ,Stem::dim_callback)       
                (meta . ,(element-description  "Stem" stem-interface  font-interface))
        ))
 
index e436fb48663c67feb20f216f0252ef2cdd654c10..fec9446ef5d8587dfb408046378fb905972a1127 100644 (file)
@@ -24,8 +24,8 @@
        )
        ))
   
-;; return that part of LIST for which PRED is true.
 (define (filter-list pred? list)
+  "return that part of LIST for which PRED is true."
   (if (null? list) '()
       (let* (
             (rest  (filter-list pred? (cdr list)))
@@ -42,9 +42,8 @@
 ;; this is bad, since we generate garbage every font-lookup.
 ;; otoh, if the qualifiers is narrow enough , we don't generate much garbage.
 
-
-;; return those descriptions from FONT-DESCR-LIST whose FIELD-NAME matches VALUE
 (define (filter-field field-name value font-descr-alist)
+  "return those descriptions from FONT-DESCR-LIST whose FIELD-NAME matches VALUE"
       (filter-list
        (lambda (x) (eq? value (font-field field-name (car x))))
        font-descr-alist)
     ((-3 medium upright math msam 10) . "msam10")
    ))
 
-;; return a FONT-DESCR with relative size decremented by DECREMENT
+;; 
 (define (change-relative-size font-desc decrement)
+  "return a FONT-DESCR with relative size decremented by DECREMENT"
   (cons (- (car font-desc) decrement) (cdr font-desc))
   )
 
-;; map a  function FUNC over the keys of an alist LIST, leaving the vals. 
+;; 
 (define (map-alist-keys func list)
+  "map a  function FUNC over the keys of an alist LIST, leaving the vals. "
   (if (null?  list)
       '()
       (cons (cons (func (caar list)) (cdar list))
            (map-alist-keys func (cdr list)))
       ))
  
-;; map a function FUNC over the vals of  LIST, leaving the keys. 
+;; 
 (define (map-alist-vals func list)
+  "map a function FUNC over the vals of  LIST, leaving the keys."
   (if (null?  list)
       '()
       (cons (cons  (caar list) (func (cdar list)))
        (dynamic . ((font-series . bold) (font-family . dynamic) (font-relative-size . 0)))
        ))
     (properties-to-font .
-
                        ,Font_interface::properties_to_font_name)
-                       ; ,properties-to-font-name)
 
     ;; FIXME: this is a not-so-cool idea to use ALIGN
     ;; RAISE, LOOKUP, since they are not proper elt-properties,
     )
   )
 
-;; reduce the font list by successively applying a font-qualifier.
 (define (qualifiers-to-fontnames  qualifiers font-descr-alist)
+  " reduce the font list by successively applying a font-qualifier."
   (if (null? qualifiers)
       font-descr-alist
       
       )
   ))
 
-
-;; does FONT-DESC satisfy QUALIFIERS?
 (define (font-qualifies? qualifiers font-desc)
+  "does FONT-DESC satisfy QUALIFIERS?"
   (if (null? qualifiers) #t
       (if (eq? (font-field (caar qualifiers) font-desc) (cdar qualifiers))
          (font-qualifies? (cdr qualifiers) font-desc)
       ))
 
 
-;; return a single font from FONTS (or a default, if none found)
-;; and warn if the selected font is not unique.
 (define (select-unique-font qualifiers fonts)
+  "return a single font from FONTS (or a default, if none found)
+and warn if the selected font is not unique.
+"
   (let*  (
          (err (current-error-port))
          )
   )
 
 ;; TODO
-;; add support for override by font-name
-;; very often-used; hard-code in C++, and use SCM glue code.
-
+;; the C++ version  in font-interface.cc is usually used.
 (define (properties-to-font-name fonts properties-alist-list)
   (let*  (
          ;; change order to change priorities of qualifiers.
        font)   ; return the topmost.
     ))
 
+(if #f (begin
+        (define (test-module)
+          (display (filter-list pair? '(1 2 (1 2) (1 .2)))
+                   (display (filter-field 'font-name 'cmbx paper20-style-sheet-alist))
                    
+                   (display (qualifiers-to-fontname '((font-name . cmbx)) paper20-style-sheet-alist))
+                   (display (style-to-font-name 'paper20 'large))
+                   )
+          )
+        )
 
 
-; (define (test-module)
-;  (display (filter-list pair? '(1 2 (1 2) (1 .2)))
-;(display (filter-field 'font-name 'cmbx paper20-style-sheet-alist))
-
-; (display (qualifiers-to-fontname '((font-name . cmbx)) paper20-style-sheet-alist))
-; (display (style-to-font-name 'paper20 'large))
-; )
-
-
+)
index 767912916f449ae32efc16eafeb483c79872ada8..7a5683c88792165a1d5458ae0661929cf5806abb 100644 (file)
@@ -113,7 +113,7 @@ more than this (in staffspace)")
    "A clef sign"
    (list
     (elt-property-description 'non-default boolean? "not set because of existence of a bar?")
-    (elt-property-description 'change boolean? "is this a change clef (smaller size)?")
+    (elt-property-description 'full-size-change boolean? "if set, don't make a change clef smaller.")  
     (elt-property-description 'glyph string? "a string determining what glyph is typeset")
     ))
   )
@@ -386,7 +386,7 @@ Align_interface::center_on_element). ")
    (list
     (elt-property-description 'grow-direction dir? "crescendo or decrescendo?")
     (elt-property-description 'thickness number? "thickness, measured in stafflinethickness")
-    (elt-property-description 'height number? "height, measured in staffspace in ")
+    (elt-property-description 'height number? "height, measured in staffspace.")
     )))
 
 (define arpeggio-interface
index 6876a9cb6563701963920ccfe40e268c9616de0a..0e664d2ebd434f022209114e3a1c493f0e43d2a7 100644 (file)
                                   (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
         (ly-gulp-file "lily.ps"))
      "}"
-     "\\input lilyponddefs\\newdimen\\outputscale \\outputscale=\\mudelapaperoutputscale pt\\turnOnPostScript"))
+     "\\input lilyponddefs\\newdimen\\outputscale \\outputscale=\\lilypondpaperoutputscale pt\\turnOnPostScript"))
 
   (define (header creator generate) 
     (string-append
   
   (define (lily-def key val)
 
-     (if (string=? (substring key 0 (min (string-length "mudelapaper") (string-length key))) "mudelapaper")
+     (if (string=? (substring key 0 (min (string-length "lilypondpaper") (string-length key))) "lilypondpaper")
         (string-append "/" key " {" val "} bind def\n")
         (string-append "/" key " (" val ") def\n")
         )
        )
     (if (pair? e)
        `(((symbol . clefGlyph)
-          (type . property-set)
+          (type . ,Property_iterator::constructor)
           (value . ,(cadr e))
           )
          ((symbol . clefPosition)
-          (type . property-set)
+          (type . ,Property_iterator::constructor)
           (value . ,(caddr e))
           )
          ((symbol . clefOctavation)
-          (type . property-set)
+          (type . ,Property_iterator::constructor)
           (value . ,(caddr (cdr e)))
          )
          )
          (ly-warn (string-append "Unknown clef type `" cl "'\nSee scm/lily.scm for supported clefs"))
          '())
     )))
+
+
+
+(define (repeat-name-to-ctor name)
+  (let*
+      ((supported-reps
+       `(("volta" . ((type . ,Volta_repeat_iterator::constructor)
+                     (length . ,Repeated_music::volta_music_length)
+                     ))
+         ("unfold" . ((type . ,Unfolded_repeat_iterator::constructor)
+                      (length . ,Repeated_music::unfolded_music_length)
+                      ))
+         ("fold" . ((type  . ,Folded_repeat_iterator::constructor)
+                     (length . ,Repeated_music::folded_music_length)
+                     ))
+         ("tremolo" . ((type . ,Chord_tremolo_iterator::constructor)
+                       (length . ,Repeated_music::volta_music_length)
+                       ))
+         ))
+         
+       (handle (assoc name supported-reps))
+       )
+
+    (if (pair? handle)
+       (cdr handle)
+       (begin
+         (ly-warn
+          (string-append "Unknown repeat type `" name "'\nSee scm/lily.scm for supported repeats")
+          )
+         '(type . 'repeated-music))
+       )
+  ))
+
index ee58d6ba18e132743138c700a50bfce2334c8f5b..5cad9dbf567f7653384ee52d8b72446ab075c2ec 100644 (file)
@@ -245,7 +245,8 @@ The head of the list:
     'Bar_engraver
     (engraver-description
      "Bar_engraver"
-     "Create barlines."
+     "Create barlines. This engraver is controlled through the
+@code{whichBar} property. If it has no bar line to create, it will forbid a linebreak at this point"
      '(BarLine)
      (list
       (translator-property-description 'whichBar string? "This property is read to determine what type of barline to create.
@@ -678,7 +679,16 @@ Description of scripts to use.  (fixme)
     'Score_engraver
     (engraver-description
      "Score_engraver"
-     "Top level engraver. Takes care of generating columns and the complete  system (ie. LineOfScore)"
+     "Top level engraver. Takes care of generating columns and the complete  system (ie. LineOfScore)
+
+This engraver decides whether a column is breakable. The default is
+that a column is always breakable. However, when every Bar_engraver
+that does not have a barline at a certain point will call
+Score_engraver::forbid_breaks to stop linebreaks.  In practice, this
+means that you can make a breakpoint by creating a barline (assuming
+that there are no beams or notes that prevent a breakpoint.)
+
+"
      '(LineOfScore PaperColumn NonMusicalPaperColumn)
      (list
       (translator-property-description 'currentMusicalColumn ly-element? "")
@@ -852,8 +862,11 @@ either unison, unisilence or soloADue is set"
      '()
      (list
       (translator-property-description 'timeSignatureFraction number-pair? "
-pair of numbers,  signifying the time signature. For example #'(4 . 4) is a 4/4 time signature.")   
-      
+pair of numbers,  signifying the time signature. For example #'(4 . 4) is a 4/4time signature.")   
+      (translator-property-description 'barCheckNoSynchronize boolean?
+"If set, don't reset measurePosition when finding a bbarcheck. This
+makes bar-checks for polyphonic music easier.")
+
       (translator-property-description 'barNonAuto boolean? " If set to true then bar lines will not be printed
     automatically; they must be explicitly created with @code{\bar}
     keywords.  Unlike with the @code{\cadenza} keyword, measures are
@@ -879,10 +892,10 @@ defaultBarType, barAlways, barNonAuto and measurePosition.
 
 @c my @vebatim patch would help...
 @example
-@@mudela[fragment,verbatim,center]
+@@lilypond[fragment,verbatim,center]
 r1 r1*3 R1*3\property Score.skipBars=1 r1*3 R1*3
 
-@@end mudela
+@@end lilypond
 @end example
 
 ")
@@ -913,12 +926,12 @@ Normally a tuplet bracket is as wide as the
 property, you can make brackets last shorter. Example
 
 @example
-@@mudela[verbatim,fragment]
+@@lilypond[verbatim,fragment]
 \context Voice \times 2/3 @{
   \property Voice.tupletSpannerDuration = #(make-moment 1 4)
   [c8 c c] [c c c]
 @}
-@@end mudela
+@@end lilypond
 @end example
 ")
       (translator-property-description 'tupletInvisible boolean? "
index 816a4e5a448ca48f378234f58310da80bd02b85f..93fed5a485b9f3e840122e0c206f4e244e39646d 100644 (file)
@@ -1,7 +1,7 @@
 # bin/Makefile
 
 depth = ..
-SEXECUTABLES=convert-mudela mudela-book ly2dvi abc2ly as2text etf2ly musedata2ly pmx2ly
+SEXECUTABLES=convert-ly lilypond-book ly2dvi abc2ly as2text etf2ly musedata2ly pmx2ly
 STEPMAKE_TEMPLATES=script help2man
 HELP2MAN_EXECS = $(SEXECUTABLES)
 
index 8d769e2c7a4395ccb346ed9594e7210018f4c801..b31a56bc3c914048f6192478ea8d44a33e3bc846 100644 (file)
@@ -583,7 +583,7 @@ def try_parse_header_line (ln, state):
 
 # we use in this order specified accidental, active accidental for bar,
 # active accidental for key
-def pitch_to_mudela_name (name, acc, bar_acc, key):
+def pitch_to_lilypond_name (name, acc, bar_acc, key):
        s = ''
        if acc == UNDEF:
                if not nobarlines:
@@ -600,7 +600,7 @@ def pitch_to_mudela_name (name, acc, bar_acc, key):
        return(chr (name  + ord('c')) + s)
 
 
-def octave_to_mudela_quotes (o):
+def octave_to_lilypond_quotes (o):
        o = o + 2
        s =''
        if o < 0:
@@ -623,7 +623,7 @@ def parse_num (str):
        return (str,n)
 
 
-def duration_to_mudela_duration  (multiply_tup, defaultlen, dots):
+def duration_to_lilypond_duration  (multiply_tup, defaultlen, dots):
        base = 1
        # (num /  den)  / defaultlen < 1/base
        while base * multiply_tup[0] < multiply_tup[1]:
@@ -711,7 +711,7 @@ def try_parse_rest (str, parser_state):
        str = str[1:]
 
        (str, num,den,d) = parse_duration (str, parser_state)
-       voices_append ('%s%s' % (rest, duration_to_mudela_duration ((num,den), default_len, d)))
+       voices_append ('%s%s' % (rest, duration_to_lilypond_duration ((num,den), default_len, d)))
        if parser_state.next_articulation:
                voices_append (parser_state.next_articulation)
                parser_state.next_articulation = ''
@@ -841,15 +841,15 @@ def try_parse_note (str, parser_state):
                voices_append ('%s' % ')' *slur_end )
 
        bar_acc = get_bar_acc(notename, octave, parser_state)
-       pit = pitch_to_mudela_name(notename, acc, bar_acc, global_key[notename])
-       oct = octave_to_mudela_quotes (octave)
+       pit = pitch_to_lilypond_name(notename, acc, bar_acc, global_key[notename])
+       oct = octave_to_lilypond_quotes (octave)
        if acc != UNDEF and (acc == global_key[notename] or acc == bar_acc):
                mod='!'
        else:
                mod = ''
        voices_append ("%s%s%s%s" %
                (pit, oct, mod,
-                duration_to_mudela_duration ((num,den), default_len, current_dots)))
+                duration_to_lilypond_duration ((num,den), default_len, current_dots)))
        
        set_bar_acc(notename, octave, acc, parser_state)
        if parser_state.next_articulation:
@@ -1021,7 +1021,7 @@ def try_parse_comment (str):
        global nobarlines
        if (str[0] == '%'):
                if str[0:5] == '%MIDI':
-#the nobarlines option is necessary for an abc to mudela translator for
+#the nobarlines option is necessary for an abc to lilypond translator for
 #exactly the same reason abc2midi needs it: abc requires the user to enter
 #the note that will be printed, and MIDI and lilypond expect entry of the
 #pitch that will be played.
@@ -1103,7 +1103,7 @@ def identify():
 
 def help ():
        print r"""
-Convert ABC to Mudela.
+Convert ABC to Lilypond.
 
 Usage: abc2ly [OPTIONS]... ABC-FILE
 
diff --git a/scripts/convert-ly.py b/scripts/convert-ly.py
new file mode 100644 (file)
index 0000000..e974394
--- /dev/null
@@ -0,0 +1,697 @@
+#!@PYTHON@
+
+# convert-lilypond.py -- convertor for lilypond versions
+# 
+# source file of the GNU LilyPond music typesetter
+# 
+# (c) 1998 
+
+# TODO
+#   use -f and -t for -s output
+
+# NEWS
+# 0.2
+#  - rewrite in python
+
+program_name = 'convert-ly'
+version = '@TOPLEVEL_VERSION@'
+
+import os
+import sys
+import __main__
+import getopt
+import  string
+import re
+import time
+
+lilypond_version_re_str = '\\\\version *\"(.*)\"'
+lilypond_version_re = re.compile(lilypond_version_re_str)
+
+def program_id ():
+       return '%s (GNU LilyPond) %s' %(program_name,  version);
+
+def identify ():
+       sys.stderr.write (program_id () + '\n')
+
+def usage ():
+       sys.stdout.write (
+               r"""Usage: %s [OPTION]... [FILE]... 
+Try to convert to newer lilypond-versions.  The version number of the
+input is guessed by default from \version directive
+
+Options:
+  -h, --help             print this help
+  -e, --edit             in place edit
+  -f, --from=VERSION     start from version
+  -s, --show-rules       print all rules.
+  -t, --to=VERSION       target version
+      --version          print program version
+
+Report bugs to bugs-gnu-music@gnu.org
+
+""" % program_name)
+       
+       
+       sys.exit (0)
+
+def print_version ():
+       
+       sys.stdout.write (r"""%s
+
+This is free software.  It is covered by the GNU General Public
+License, and you are welcome to change it and/or distribute copies of
+it under certain conditions.  invoke as `%s --warranty' for more
+information.
+
+""" % (program_id() , program_name))
+       
+def gulp_file(f):
+       try:
+               i = open(f)
+               i.seek (0, 2)
+               n = i.tell ()
+               i.seek (0,0)
+       except:
+               print 'can\'t open file: ' + f + '\n'
+               return ''
+       s = i.read (n)
+       if len (s) <= 0:
+               print 'gulped empty file: ' + f + '\n'
+       i.close ()
+       return s
+
+def str_to_tuple (s):
+       return tuple (map (string.atoi, string.split (s,'.')))
+
+def tup_to_str (t):
+       return string.join (map (lambda x: '%s' % x, list (t)), '.')
+
+def version_cmp (t1, t2):
+       for x in [0,1,2]:
+               if t1[x] - t2[x]:
+                       return t1[x] - t2[x]
+       return 0
+
+def guess_lilypond_version(filename):
+       s = gulp_file (filename)
+       m = lilypond_version_re.search (s)
+       if m:
+               return m.group(1)
+       else:
+               return ''
+
+class FatalConversionError:
+       pass
+
+conversions = []
+
+def show_rules (file):
+       for x in conversions:
+               file.write  ('%s: %s\n' % (tup_to_str (x[0]), x[2]))
+
+############################
+               
+if 1:                                  # need new a namespace
+       def conv (str):
+               if re.search ('\\\\octave', str):
+                       sys.stderr.write ('\nNot smart enough to convert \\octave')
+                       raise FatalConversionError()
+               
+               return str
+
+       conversions.append (
+               ((0,1,19), conv, 'deprecated \\octave; can\'t convert automatically'))
+
+
+if 1:                                  # need new a namespace
+       def conv (str):
+               str = re.sub ('\\\\textstyle([^;]+);',
+                                        '\\\\property Lyrics . textstyle = \\1', str)
+               str = re.sub ('\\\\key([^;]+);', '\\\\accidentals \\1;', str)
+                       
+               return str
+
+       conversions.append (
+               ((0,1,20), conv, 'deprecated \\textstyle, new \key syntax'))
+
+
+if 1:
+       def conv (str):
+               str = re.sub ('\\\\musical_pitch', '\\\\musicalpitch',str)
+               str = re.sub ('\\\\meter', '\\\\time',str)
+                       
+               return str
+
+       conversions.append (
+               ((0,1,21), conv, '\\musical_pitch -> \\musicalpitch, '+
+                '\\meter -> \\time'))
+
+if 1:
+       def conv (str):
+               return str
+
+       conversions.append (
+               ((1,0,0), conv, '0.1.21 -> 1.0.0 '))
+
+
+if 1:
+       def conv (str):
+               str = re.sub ('\\\\accidentals', '\\\\keysignature',str)
+               str = re.sub ('specialaccidentals *= *1', 'keyoctaviation = 0',str)
+               str = re.sub ('specialaccidentals *= *0', 'keyoctaviation = 1',str)
+                       
+               return str
+
+       conversions.append (
+               ((1,0,1), conv, '\\accidentals -> \\keysignature, ' +
+                'specialaccidentals -> keyoctaviation'))
+
+if 1:
+       def conv(str):
+               if re.search ('\\\\header', str):
+                       sys.stderr.write ('\nNot smart enough to convert to new \\header format')
+               return str
+       
+       conversions.append ((1,0,2), conv, '\\header { key = concat + with + operator }')
+
+if 1:
+       def conv(str):
+               str =  re.sub ('\\\\melodic', '\\\\notes',str)
+                       
+               return str
+       
+       conversions.append ((1,0,3), conv, '\\melodic -> \\notes')
+
+if 1:
+       def conv(str):
+               str =  re.sub ('default_paper *=', '',str)
+               str =  re.sub ('default_midi *=', '',x)                 
+                       
+               return str
+       
+       conversions.append ((1,0,4), conv, 'default_{paper,midi}')
+
+if 1:
+       def conv(str):
+               str =  re.sub ('ChoireStaff', 'ChoirStaff',str)
+               str =  re.sub ('\\output', 'output = ',str)
+                       
+               return str
+       
+       conversions.append ((1,0,5), conv, 'ChoireStaff -> ChoirStaff')
+
+if 1:
+       def conv(str):
+               if re.search ('[a-zA-Z]+ = *\\translator',str):
+                       sys.stderr.write ('\nNot smart enough to change \\translator syntax')
+                       raise FatalConversionError()
+               return str
+       
+       conversions.append ((1,0,6), conv, 'foo = \\translator {\\type .. } ->\\translator {\\type ..; foo; }')
+
+
+if 1:
+       def conv(str):
+               str =  re.sub ('\\\\lyric', '\\\\lyrics',str)
+                       
+               return str
+       
+       conversions.append ((1,0,7), conv, '\\lyric -> \\lyrics')
+
+if 1:
+       def conv(str):
+               str =  re.sub ('\\\\\\[/3+', '\\\\times 2/3 { ',str)
+               str =  re.sub ('\\[/3+', '\\\\times 2/3 { [',str)
+               str =  re.sub ('\\\\\\[([0-9/]+)', '\\\\times \\1 {',str)
+               str =  re.sub ('\\[([0-9/]+)', '\\\\times \\1 { [',str)
+               str =  re.sub ('\\\\\\]([0-9/]+)', '}', str)
+               str =  re.sub ('\\\\\\]', '}',str)
+               str =  re.sub ('\\]([0-9/]+)', '] }', str)
+               return str
+       
+       conversions.append ((1,0,10), conv, '[2/3 ]1/1 -> \\times 2/3 ')
+
+if 1:
+       def conv(str):
+               return str
+       conversions.append ((1,0,12), conv, 'Chord syntax stuff')
+
+
+if 1:
+       def conv(str):
+               
+               
+               str =  re.sub ('<([^>~]+)~([^>]*)>','<\\1 \\2> ~', str)
+                       
+               return str
+       
+       conversions.append ((1,0,13), conv, '<a ~ b> c -> <a b> ~ c')
+
+if 1:
+       def conv(str):
+               str =  re.sub ('<\\[','[<', str)
+               str =  re.sub ('\\]>','>]', str)
+                       
+               return str
+       
+       conversions.append ((1,0,14), conv, '<[a b> <a b]>c -> [<a b> <a b>]')
+
+
+if 1:
+       def conv(str):
+               str =  re.sub ('\\\\type','\\\\context', str)
+               str =  re.sub ('textstyle','textStyle', str)
+                       
+               return str
+       
+       conversions.append ((1,0,16), conv, '\\type -> \\context, textstyle -> textStyle')
+
+
+if 1:
+       def conv(str):
+               if re.search ('\\\\repeat',str):
+                       sys.stderr.write ('\nNot smart enough to convert \\repeat')
+                       raise FatalConversionError()
+               return str
+       
+       conversions.append ((1,0,18), conv,
+                           '\\repeat NUM Music Alternative -> \\repeat FOLDSTR Music Alternative')
+
+if 1:
+       def conv(str):
+               str =  re.sub ('SkipBars','skipBars', str)
+               str =  re.sub ('fontsize','fontSize', str)
+               str =  re.sub ('midi_instrument','midiInstrument', str)                 
+                       
+               return str
+
+       conversions.append ((1,0,19), conv,
+                           'fontsize -> fontSize, midi_instrument -> midiInstrument, SkipBars -> skipBars')
+
+
+if 1:
+       def conv(str):
+               str =  re.sub ('tieydirection','tieVerticalDirection', str)
+               str =  re.sub ('slurydirection','slurVerticalDirection', str)
+               str =  re.sub ('ydirection','verticalDirection', str)                   
+                       
+               return str
+
+       conversions.append ((1,0,20), conv,
+                           '{,tie,slur}ydirection -> {v,tieV,slurV}erticalDirection')
+
+
+if 1:
+       def conv(str):
+               str =  re.sub ('hshift','horizontalNoteShift', str)
+                       
+               return str
+
+       conversions.append ((1,0,21), conv,
+                           'hshift -> horizontalNoteShift')
+
+
+if 1:
+       def conv(str):
+               str =  re.sub ('\\\\grouping[^;]*;','', str)
+                       
+               return str
+
+       conversions.append ((1,1,52), conv,
+                           'deprecate \\grouping')
+
+
+if 1:
+       def conv(str):
+               str =  re.sub ('\\\\wheel','\\\\coda', str)
+                       
+               return str
+
+       conversions.append ((1,1,55), conv,
+                           '\\wheel -> \\coda')
+
+if 1:
+       def conv(str):
+               str =  re.sub ('keyoctaviation','keyOctaviation', str)
+               str =  re.sub ('slurdash','slurDash', str)
+                       
+               return str
+
+       conversions.append ((1,1,65), conv,
+                           'slurdash -> slurDash, keyoctaviation -> keyOctaviation')
+
+if 1:
+       def conv(str):
+               str =  re.sub ('\\\\repeat *\"?semi\"?','\\\\repeat "volta"', str)
+                       
+               return str
+
+       conversions.append ((1,1,66), conv,
+                           'semi -> volta')
+
+
+if 1:
+       def conv(str):
+               str =  re.sub ('\"?beamAuto\"? *= *\"?0?\"?','noAutoBeaming = "1"', str)
+                       
+               return str
+
+       conversions.append ((1,1,67), conv,
+                           'beamAuto -> noAutoBeaming')
+
+if 1:
+       def conv(str):
+               str =  re.sub ('automaticMelismas', 'automaticMelismata', str)
+                       
+               return str
+
+       conversions.append ((1,2,0), conv,
+                           'automaticMelismas -> automaticMelismata')
+
+if 1:
+       def conv(str):
+               str =  re.sub ('dynamicDir\\b', 'dynamicDirection', str)
+                       
+               return str
+
+       conversions.append ((1,2,1), conv,
+                           'dynamicDir -> dynamicDirection')
+
+if 1:
+       def conv(str):
+               str =  re.sub ('\\\\cadenza *0 *;', '\\\\cadenzaOff', str)
+               str =  re.sub ('\\\\cadenza *1 *;', '\\\\cadenzaOn', str)               
+                       
+               return str
+
+       conversions.append ((1,3,4), conv,
+                           '\\cadenza -> \cadenza{On|Off}')
+
+if 1:
+       def conv (str):
+               str = re.sub ('beamAuto([^=]+)= *"([0-9]+)/([0-9]+)" *;',
+                             'beamAuto\\1 = #(make-moment \\2 \\3)',
+                             str)
+               return str
+
+       conversions.append ((1,3,5), conv, 'beamAuto moment properties')
+
+if 1:
+       def conv (str):
+               str = re.sub ('stemStyle',
+                             'flagStyle',
+                             str)
+               return str
+
+       conversions.append ((1,3,17), conv, 'stemStyle -> flagStyle')
+
+if 1:
+       def conv (str):
+               str = re.sub ('staffLineLeading',
+                             'staffSpace',
+                             str)
+               return str
+
+       conversions.append ((1,3,18), conv, 'staffLineLeading -> staffSpace')
+
+if 1:
+       def conv (str):
+               str = re.sub ('textEmptyDimension *= *##t',
+                             'textNonEmpty = ##f',
+                             str)
+               str = re.sub ('textEmptyDimension *= *##f',
+                             'textNonEmpty = ##t',
+                             str)
+               return str
+
+       conversions.append ((1,3,35), conv, 'textEmptyDimension -> textNonEmpty')
+
+if 1:
+       def conv (str):
+               str = re.sub ("([a-z]+)[ \t]*=[ \t]*\\\\musicalpitch *{([- 0-9]+)} *\n",
+                             "(\\1 . (\\2))\n", str)
+               str = re.sub ("\\\\musicalpitch *{([0-9 -]+)}",
+                             "\\\\musicalpitch #'(\\1)", str)
+               if re.search ('\\\\notenames',str):
+                       sys.stderr.write ('\nNot smart enough to convert to new \\notenames format')
+               return str
+
+       conversions.append ((1,3,38), conv, '\musicalpitch { a b c } -> #\'(a b c)')
+
+if 1:
+       def conv (str):
+               def replace (match):
+                       return '\\key %s;' % string.lower (match.group (1))
+               
+               str = re.sub ("\\\\key ([^;]+);",  replace, str)
+               return str
+       
+       conversions.append ((1,3,39), conv, '\\key A ;  ->\\key a;')
+
+if 1:
+       def conv (str):
+               if re.search ('\\[:',str):
+                       sys.stderr.write ('\nNot smart enough to convert to new tremolo format')
+               return str
+
+       conversions.append ((1,3,41), conv,
+                           '[:16 c4 d4 ] -> \\repeat "tremolo" 2 { c16 d16 }')
+
+if 1:
+       def conv (str):
+               str = re.sub ('Staff_margin_engraver' , 'Instrument_name_engraver', str)
+               return str
+
+       conversions.append ((1,3,42), conv,
+                           'Staff_margin_engraver deprecated, use Instrument_name_engraver')
+
+if 1:
+       def conv (str):
+               str = re.sub ('note[hH]eadStyle\\s*=\\s*"?(\\w+)"?' , "noteHeadStyle = #'\\1", str)
+               return str
+
+       conversions.append ((1,3,49), conv,
+                           'noteHeadStyle value: string -> symbol')
+
+if 1:
+       def conv (str):
+               str = re.sub (r"""\\key *([a-z]+) *;""", r"""\\key \1 \major;""",str);
+               return str
+       conversions.append ((1,3,59), conv,
+                           '\key X ; -> \key X major; ') 
+
+if 1:
+       def conv (str):
+               str = re.sub (r'latexheaders *= *"\\\\input ',
+                             'latexheaders = "',
+                             str)
+               return str
+       conversions.append ((1,3,68), conv, 'latexheaders = "\\input global" -> latexheaders = "global"')
+
+
+
+################ TODO: lots of other syntax change should be done here as well
+
+
+
+if 1:
+       def conv (str):
+               str = re.sub ('basicCollisionProperties', 'NoteCollision', str)
+               str = re.sub ('basicVoltaSpannerProperties' , "VoltaBracket", str)
+               str = re.sub ('basicKeyProperties' , "KeySignature", str)
+
+               str = re.sub ('basicClefItemProperties' ,"Clef", str)
+
+
+               str = re.sub ('basicLocalKeyProperties' ,"Accidentals", str)
+               str = re.sub ('basicMarkProperties' ,"Accidentals", str)                                
+               str = re.sub ('basic([A-Za-z_]+)Properties', '\\1', str)
+               return str
+       
+       conversions.append ((1,3,92), conv, 'basicXXXProperties -> XXX')
+
+if 1:
+       def conv (str):
+               str = re.sub ('\\\\stemup', '\\\\stemUp', str)
+               str = re.sub ('\\\\stemdown', '\\\\stemDown', str)
+               str = re.sub ('\\\\stemboth', '\\\\stemBoth', str)
+               str = re.sub ('\\\\slurup', '\\\\slurUp', str)
+               str = re.sub ('\\\\slurboth', '\\\\slurBoth', str)
+               str = re.sub ('\\\\slurdown', '\\\\slurDown', str)
+               str = re.sub ('\\\\slurdotted', '\\\\slurDotted', str)
+               str = re.sub ('\\\\slurnormal', '\\\\slurNoDots', str)          
+               
+               str = re.sub ('\\\\shiftoff', '\\\\shiftOff', str)
+               str = re.sub ('\\\\shifton', '\\\\shiftOn', str)
+               str = re.sub ('\\\\shiftonn', '\\\\shiftOnn', str)
+               str = re.sub ('\\\\shiftonnn', '\\\\shiftOnnn', str)
+
+               str = re.sub ('\\\\onevoice', '\\\\oneVoice', str)
+               str = re.sub ('\\\\voiceone', '\\\\voiceOne', str)
+               str = re.sub ('\\\\voicetwo', '\\\\voiceTwo', str)
+               str = re.sub ('\\\\voicethree', '\\\\voiceThree', str)
+               str = re.sub ('\\\\voicefour', '\\\\voiceFour', str)
+               
+               return str
+       
+       conversions.append ((1,3,93), conv,
+                           'property definiton case (eg. onevoice -> oneVoice)')
+
+
+if 1:
+       def conv (str):
+               str = re.sub ('ChordNames*', 'ChordNames', str)
+               if re.search ('\\\\textscript "[^"]* *"[^"]*"', str):
+                       sys.stderr.write ('\nNot smart enough to convert to new \\textscript markup text')
+
+               str = re.sub ('\\textscript +("[^"]*")', '\\textscript #\\1', str)
+
+               return str
+       
+       conversions.append ((1,3,97), conv, 'ChordName -> ChordNames')
+
+if 1:
+       def conv (str):
+               str = re.sub ('beamAutoEnd_([0-9]*) *= *(#\\([^)]*\\))', 'autoBeamSettings \\push #\'(end 1 \\1 * *) = \\2', str)
+               str = re.sub ('beamAutoBegin_([0-9]*) *= *(#\\([^)]*\))', 'autoBeamSettings \\push #\'(begin 1 \\1 * *) = \\2', str)
+               str = re.sub ('beamAutoEnd *= *(#\\([^)]*\\))', 'autoBeamSettings \\push #\'(end * * * *) = \\1', str)
+               str = re.sub ('beamAutoBegin *= *(#\\([^)]*\\))', 'autoBeamSettings \\push #\'(begin * * * *) = \\1', str)
+
+
+               return str
+       
+       conversions.append ((1,3,102), conv, 'beamAutoEnd -> autoBeamSettings \\push (end * * * *)')
+
+############################
+       
+
+def get_conversions (from_version, to_version):
+       def version_b (v, f = from_version, t = to_version):
+               return version_cmp (v[0], f) > 0 and version_cmp (v[0], t) <= 0
+       return filter (version_b, conversions)
+
+
+def latest_version ():
+       return conversions[-1][0]
+
+def do_conversion (infile, from_version, outfile, to_version):
+       conv_list = get_conversions (from_version, to_version)
+
+       sys.stderr.write ('Applying conversions: ')
+       str = infile.read ()
+       last_conversion = ()
+       try:
+               for x in conv_list:
+                       sys.stderr.write (tup_to_str (x[0])  + ', ')
+                       str = x[1] (str)
+                       last_conversion = x[0]
+
+       except FatalConversionError:
+               sys.stderr.write ('Error while converting; I won\'t convert any further')
+
+       if last_conversion:
+               sys.stderr.write ('\n')
+               new_ver =  '\\\\version \"%s\"' % tup_to_str (last_conversion)
+               if re.search (lilypond_version_re_str, str):
+                       str = re.sub (lilypond_version_re_str,new_ver , str)
+               else:
+                       str = new_ver + '\n' + str
+
+               outfile.write(str)
+
+       return last_conversion
+       
+class UnknownVersion:
+       pass
+
+def do_one_file (infile_name):
+       sys.stderr.write ('Processing `%s\' ... '% infile_name)
+       outfile_name = ''
+       if __main__.edit:
+               outfile_name = infile_name + '.NEW'
+       elif __main__.outfile_name:
+               outfile_name = __main__.outfile_name
+
+       if __main__.from_version:
+               from_version = __main__.from_version
+       else:
+               guess = guess_lilypond_version (infile_name)
+               if not guess:
+                       raise UnknownVersion()
+               from_version = str_to_tuple (guess)
+
+       if __main__.to_version:
+               to_version = __main__.to_version
+       else:
+               to_version = latest_version ()
+
+
+       if infile_name:
+               infile = open (infile_name,'r')
+       else:
+               infile = sys.stdin
+
+       if outfile_name:
+               outfile =  open (outfile_name, 'w')
+       else:
+               outfile = sys.stdout
+
+       touched = do_conversion (infile, from_version, outfile, to_version)
+
+       if infile_name:
+               infile.close ()
+
+       if outfile_name:
+               outfile.close ()
+
+       if __main__.edit and touched:
+               try:
+                       os.remove(infile_name + '~')
+               except:
+                       pass
+               os.rename (infile_name, infile_name + '~')
+               os.rename (infile_name + '.NEW', infile_name)
+
+       sys.stderr.write ('\n')
+       sys.stderr.flush ()
+
+edit = 0
+to_version = ()
+from_version = ()
+outfile_name = ''
+
+(options, files) = getopt.getopt (
+       sys.argv[1:], 'o:f:t:seh', ['version', 'output', 'show-rules', 'help', 'edit', 'from=', 'to'])
+
+for opt in options:
+       o = opt[0]
+       a = opt[1]
+       if o== '--help' or o == '-h':
+               usage ()
+               sys.exit (0)
+       if o == '--version' or o == '-v':
+               print_version ()
+               sys.exit (0)
+       elif o== '--from' or o=='-f':
+               from_version = str_to_tuple (a)
+       elif o== '--to' or o=='-t':
+               to_version = str_to_tuple (a)
+       elif o== '--edit' or o == '-e':
+               edit = 1
+       elif o== '--show-rules' or o == '-s':
+               show_rules (sys.stdout)
+               sys.exit(0)
+       elif o == '--output' or o == '-o':
+               outfile_name = a
+       else:
+               print o
+               raise getopt.error
+
+identify ()
+for f in files:
+       if f == '-':
+               f = ''
+       try:
+               do_one_file (f)
+       except UnknownVersion:
+               pass
diff --git a/scripts/convert-mudela.py b/scripts/convert-mudela.py
deleted file mode 100644 (file)
index 8d86614..0000000
+++ /dev/null
@@ -1,697 +0,0 @@
-#!@PYTHON@
-
-# convert-mudela.py -- convertor for mudela versions
-# 
-# source file of the GNU LilyPond music typesetter
-# 
-# (c) 1998 
-
-# TODO
-#   use -f and -t for -s output
-
-# NEWS
-# 0.2
-#  - rewrite in python
-
-program_name = 'convert-mudela'
-version = '@TOPLEVEL_VERSION@'
-
-import os
-import sys
-import __main__
-import getopt
-import  string
-import re
-import time
-
-mudela_version_re_str = '\\\\version *\"(.*)\"'
-mudela_version_re = re.compile(mudela_version_re_str)
-
-def program_id ():
-       return '%s (GNU LilyPond) %s' %(program_name,  version);
-
-def identify ():
-       sys.stderr.write (program_id () + '\n')
-
-def usage ():
-       sys.stdout.write (
-               r"""Usage: %s [OPTION]... [FILE]... 
-Try to convert to newer mudela-versions.  The version number of the
-input is guessed by default from \version directive
-
-Options:
-  -h, --help             print this help
-  -e, --edit             in place edit
-  -f, --from=VERSION     start from version
-  -s, --show-rules       print all rules.
-  -t, --to=VERSION       target version
-      --version          print program version
-
-Report bugs to bugs-gnu-music@gnu.org
-
-""" % program_name)
-       
-       
-       sys.exit (0)
-
-def print_version ():
-       
-       sys.stdout.write (r"""%s
-
-This is free software.  It is covered by the GNU General Public
-License, and you are welcome to change it and/or distribute copies of
-it under certain conditions.  invoke as `%s --warranty' for more
-information.
-
-""" % (program_id() , program_name))
-       
-def gulp_file(f):
-       try:
-               i = open(f)
-               i.seek (0, 2)
-               n = i.tell ()
-               i.seek (0,0)
-       except:
-               print 'can\'t open file: ' + f + '\n'
-               return ''
-       s = i.read (n)
-       if len (s) <= 0:
-               print 'gulped empty file: ' + f + '\n'
-       i.close ()
-       return s
-
-def str_to_tuple (s):
-       return tuple (map (string.atoi, string.split (s,'.')))
-
-def tup_to_str (t):
-       return string.join (map (lambda x: '%s' % x, list (t)), '.')
-
-def version_cmp (t1, t2):
-       for x in [0,1,2]:
-               if t1[x] - t2[x]:
-                       return t1[x] - t2[x]
-       return 0
-
-def guess_mudela_version(filename):
-       s = gulp_file (filename)
-       m = mudela_version_re.search (s)
-       if m:
-               return m.group(1)
-       else:
-               return ''
-
-class FatalConversionError:
-       pass
-
-conversions = []
-
-def show_rules (file):
-       for x in conversions:
-               file.write  ('%s: %s\n' % (tup_to_str (x[0]), x[2]))
-
-############################
-               
-if 1:                                  # need new a namespace
-       def conv (str):
-               if re.search ('\\\\octave', str):
-                       sys.stderr.write ('\nNot smart enough to convert \\octave')
-                       raise FatalConversionError()
-               
-               return str
-
-       conversions.append (
-               ((0,1,19), conv, 'deprecated \\octave; can\'t convert automatically'))
-
-
-if 1:                                  # need new a namespace
-       def conv (str):
-               str = re.sub ('\\\\textstyle([^;]+);',
-                                        '\\\\property Lyrics . textstyle = \\1', str)
-               str = re.sub ('\\\\key([^;]+);', '\\\\accidentals \\1;', str)
-                       
-               return str
-
-       conversions.append (
-               ((0,1,20), conv, 'deprecated \\textstyle, new \key syntax'))
-
-
-if 1:
-       def conv (str):
-               str = re.sub ('\\\\musical_pitch', '\\\\musicalpitch',str)
-               str = re.sub ('\\\\meter', '\\\\time',str)
-                       
-               return str
-
-       conversions.append (
-               ((0,1,21), conv, '\\musical_pitch -> \\musicalpitch, '+
-                '\\meter -> \\time'))
-
-if 1:
-       def conv (str):
-               return str
-
-       conversions.append (
-               ((1,0,0), conv, '0.1.21 -> 1.0.0 '))
-
-
-if 1:
-       def conv (str):
-               str = re.sub ('\\\\accidentals', '\\\\keysignature',str)
-               str = re.sub ('specialaccidentals *= *1', 'keyoctaviation = 0',str)
-               str = re.sub ('specialaccidentals *= *0', 'keyoctaviation = 1',str)
-                       
-               return str
-
-       conversions.append (
-               ((1,0,1), conv, '\\accidentals -> \\keysignature, ' +
-                'specialaccidentals -> keyoctaviation'))
-
-if 1:
-       def conv(str):
-               if re.search ('\\\\header', str):
-                       sys.stderr.write ('\nNot smart enough to convert to new \\header format')
-               return str
-       
-       conversions.append ((1,0,2), conv, '\\header { key = concat + with + operator }')
-
-if 1:
-       def conv(str):
-               str =  re.sub ('\\\\melodic', '\\\\notes',str)
-                       
-               return str
-       
-       conversions.append ((1,0,3), conv, '\\melodic -> \\notes')
-
-if 1:
-       def conv(str):
-               str =  re.sub ('default_paper *=', '',str)
-               str =  re.sub ('default_midi *=', '',x)                 
-                       
-               return str
-       
-       conversions.append ((1,0,4), conv, 'default_{paper,midi}')
-
-if 1:
-       def conv(str):
-               str =  re.sub ('ChoireStaff', 'ChoirStaff',str)
-               str =  re.sub ('\\output', 'output = ',str)
-                       
-               return str
-       
-       conversions.append ((1,0,5), conv, 'ChoireStaff -> ChoirStaff')
-
-if 1:
-       def conv(str):
-               if re.search ('[a-zA-Z]+ = *\\translator',str):
-                       sys.stderr.write ('\nNot smart enough to change \\translator syntax')
-                       raise FatalConversionError()
-               return str
-       
-       conversions.append ((1,0,6), conv, 'foo = \\translator {\\type .. } ->\\translator {\\type ..; foo; }')
-
-
-if 1:
-       def conv(str):
-               str =  re.sub ('\\\\lyric', '\\\\lyrics',str)
-                       
-               return str
-       
-       conversions.append ((1,0,7), conv, '\\lyric -> \\lyrics')
-
-if 1:
-       def conv(str):
-               str =  re.sub ('\\\\\\[/3+', '\\\\times 2/3 { ',str)
-               str =  re.sub ('\\[/3+', '\\\\times 2/3 { [',str)
-               str =  re.sub ('\\\\\\[([0-9/]+)', '\\\\times \\1 {',str)
-               str =  re.sub ('\\[([0-9/]+)', '\\\\times \\1 { [',str)
-               str =  re.sub ('\\\\\\]([0-9/]+)', '}', str)
-               str =  re.sub ('\\\\\\]', '}',str)
-               str =  re.sub ('\\]([0-9/]+)', '] }', str)
-               return str
-       
-       conversions.append ((1,0,10), conv, '[2/3 ]1/1 -> \\times 2/3 ')
-
-if 1:
-       def conv(str):
-               return str
-       conversions.append ((1,0,12), conv, 'Chord syntax stuff')
-
-
-if 1:
-       def conv(str):
-               
-               
-               str =  re.sub ('<([^>~]+)~([^>]*)>','<\\1 \\2> ~', str)
-                       
-               return str
-       
-       conversions.append ((1,0,13), conv, '<a ~ b> c -> <a b> ~ c')
-
-if 1:
-       def conv(str):
-               str =  re.sub ('<\\[','[<', str)
-               str =  re.sub ('\\]>','>]', str)
-                       
-               return str
-       
-       conversions.append ((1,0,14), conv, '<[a b> <a b]>c -> [<a b> <a b>]')
-
-
-if 1:
-       def conv(str):
-               str =  re.sub ('\\\\type','\\\\context', str)
-               str =  re.sub ('textstyle','textStyle', str)
-                       
-               return str
-       
-       conversions.append ((1,0,16), conv, '\\type -> \\context, textstyle -> textStyle')
-
-
-if 1:
-       def conv(str):
-               if re.search ('\\\\repeat',str):
-                       sys.stderr.write ('\nNot smart enough to convert \\repeat')
-                       raise FatalConversionError()
-               return str
-       
-       conversions.append ((1,0,18), conv,
-                           '\\repeat NUM Music Alternative -> \\repeat FOLDSTR Music Alternative')
-
-if 1:
-       def conv(str):
-               str =  re.sub ('SkipBars','skipBars', str)
-               str =  re.sub ('fontsize','fontSize', str)
-               str =  re.sub ('midi_instrument','midiInstrument', str)                 
-                       
-               return str
-
-       conversions.append ((1,0,19), conv,
-                           'fontsize -> fontSize, midi_instrument -> midiInstrument, SkipBars -> skipBars')
-
-
-if 1:
-       def conv(str):
-               str =  re.sub ('tieydirection','tieVerticalDirection', str)
-               str =  re.sub ('slurydirection','slurVerticalDirection', str)
-               str =  re.sub ('ydirection','verticalDirection', str)                   
-                       
-               return str
-
-       conversions.append ((1,0,20), conv,
-                           '{,tie,slur}ydirection -> {v,tieV,slurV}erticalDirection')
-
-
-if 1:
-       def conv(str):
-               str =  re.sub ('hshift','horizontalNoteShift', str)
-                       
-               return str
-
-       conversions.append ((1,0,21), conv,
-                           'hshift -> horizontalNoteShift')
-
-
-if 1:
-       def conv(str):
-               str =  re.sub ('\\\\grouping[^;]*;','', str)
-                       
-               return str
-
-       conversions.append ((1,1,52), conv,
-                           'deprecate \\grouping')
-
-
-if 1:
-       def conv(str):
-               str =  re.sub ('\\\\wheel','\\\\coda', str)
-                       
-               return str
-
-       conversions.append ((1,1,55), conv,
-                           '\\wheel -> \\coda')
-
-if 1:
-       def conv(str):
-               str =  re.sub ('keyoctaviation','keyOctaviation', str)
-               str =  re.sub ('slurdash','slurDash', str)
-                       
-               return str
-
-       conversions.append ((1,1,65), conv,
-                           'slurdash -> slurDash, keyoctaviation -> keyOctaviation')
-
-if 1:
-       def conv(str):
-               str =  re.sub ('\\\\repeat *\"?semi\"?','\\\\repeat "volta"', str)
-                       
-               return str
-
-       conversions.append ((1,1,66), conv,
-                           'semi -> volta')
-
-
-if 1:
-       def conv(str):
-               str =  re.sub ('\"?beamAuto\"? *= *\"?0?\"?','noAutoBeaming = "1"', str)
-                       
-               return str
-
-       conversions.append ((1,1,67), conv,
-                           'beamAuto -> noAutoBeaming')
-
-if 1:
-       def conv(str):
-               str =  re.sub ('automaticMelismas', 'automaticMelismata', str)
-                       
-               return str
-
-       conversions.append ((1,2,0), conv,
-                           'automaticMelismas -> automaticMelismata')
-
-if 1:
-       def conv(str):
-               str =  re.sub ('dynamicDir\\b', 'dynamicDirection', str)
-                       
-               return str
-
-       conversions.append ((1,2,1), conv,
-                           'dynamicDir -> dynamicDirection')
-
-if 1:
-       def conv(str):
-               str =  re.sub ('\\\\cadenza *0 *;', '\\\\cadenzaOff', str)
-               str =  re.sub ('\\\\cadenza *1 *;', '\\\\cadenzaOn', str)               
-                       
-               return str
-
-       conversions.append ((1,3,4), conv,
-                           '\\cadenza -> \cadenza{On|Off}')
-
-if 1:
-       def conv (str):
-               str = re.sub ('beamAuto([^=]+)= *"([0-9]+)/([0-9]+)" *;',
-                             'beamAuto\\1 = #(make-moment \\2 \\3)',
-                             str)
-               return str
-
-       conversions.append ((1,3,5), conv, 'beamAuto moment properties')
-
-if 1:
-       def conv (str):
-               str = re.sub ('stemStyle',
-                             'flagStyle',
-                             str)
-               return str
-
-       conversions.append ((1,3,17), conv, 'stemStyle -> flagStyle')
-
-if 1:
-       def conv (str):
-               str = re.sub ('staffLineLeading',
-                             'staffSpace',
-                             str)
-               return str
-
-       conversions.append ((1,3,18), conv, 'staffLineLeading -> staffSpace')
-
-if 1:
-       def conv (str):
-               str = re.sub ('textEmptyDimension *= *##t',
-                             'textNonEmpty = ##f',
-                             str)
-               str = re.sub ('textEmptyDimension *= *##f',
-                             'textNonEmpty = ##t',
-                             str)
-               return str
-
-       conversions.append ((1,3,35), conv, 'textEmptyDimension -> textNonEmpty')
-
-if 1:
-       def conv (str):
-               str = re.sub ("([a-z]+)[ \t]*=[ \t]*\\\\musicalpitch *{([- 0-9]+)} *\n",
-                             "(\\1 . (\\2))\n", str)
-               str = re.sub ("\\\\musicalpitch *{([0-9 -]+)}",
-                             "\\\\musicalpitch #'(\\1)", str)
-               if re.search ('\\\\notenames',str):
-                       sys.stderr.write ('\nNot smart enough to convert to new \\notenames format')
-               return str
-
-       conversions.append ((1,3,38), conv, '\musicalpitch { a b c } -> #\'(a b c)')
-
-if 1:
-       def conv (str):
-               def replace (match):
-                       return '\\key %s;' % string.lower (match.group (1))
-               
-               str = re.sub ("\\\\key ([^;]+);",  replace, str)
-               return str
-       
-       conversions.append ((1,3,39), conv, '\\key A ;  ->\\key a;')
-
-if 1:
-       def conv (str):
-               if re.search ('\\[:',str):
-                       sys.stderr.write ('\nNot smart enough to convert to new tremolo format')
-               return str
-
-       conversions.append ((1,3,41), conv,
-                           '[:16 c4 d4 ] -> \\repeat "tremolo" 2 { c16 d16 }')
-
-if 1:
-       def conv (str):
-               str = re.sub ('Staff_margin_engraver' , 'Instrument_name_engraver', str)
-               return str
-
-       conversions.append ((1,3,42), conv,
-                           'Staff_margin_engraver deprecated, use Instrument_name_engraver')
-
-if 1:
-       def conv (str):
-               str = re.sub ('note[hH]eadStyle\\s*=\\s*"?(\\w+)"?' , "noteHeadStyle = #'\\1", str)
-               return str
-
-       conversions.append ((1,3,49), conv,
-                           'noteHeadStyle value: string -> symbol')
-
-if 1:
-       def conv (str):
-               str = re.sub (r"""\\key *([a-z]+) *;""", r"""\\key \1 \major;""",str);
-               return str
-       conversions.append ((1,3,59), conv,
-                           '\key X ; -> \key X major; ') 
-
-if 1:
-       def conv (str):
-               str = re.sub (r'latexheaders *= *"\\\\input ',
-                             'latexheaders = "',
-                             str)
-               return str
-       conversions.append ((1,3,68), conv, 'latexheaders = "\\input global" -> latexheaders = "global"')
-
-
-
-################ TODO: lots of other syntax change should be done here as well
-
-
-
-if 1:
-       def conv (str):
-               str = re.sub ('basicCollisionProperties', 'NoteCollision', str)
-               str = re.sub ('basicVoltaSpannerProperties' , "VoltaBracket", str)
-               str = re.sub ('basicKeyProperties' , "KeySignature", str)
-
-               str = re.sub ('basicClefItemProperties' ,"Clef", str)
-
-
-               str = re.sub ('basicLocalKeyProperties' ,"Accidentals", str)
-               str = re.sub ('basicMarkProperties' ,"Accidentals", str)                                
-               str = re.sub ('basic([A-Za-z_]+)Properties', '\\1', str)
-               return str
-       
-       conversions.append ((1,3,92), conv, 'basicXXXProperties -> XXX')
-
-if 1:
-       def conv (str):
-               str = re.sub ('\\\\stemup', '\\\\stemUp', str)
-               str = re.sub ('\\\\stemdown', '\\\\stemDown', str)
-               str = re.sub ('\\\\stemboth', '\\\\stemBoth', str)
-               str = re.sub ('\\\\slurup', '\\\\slurUp', str)
-               str = re.sub ('\\\\slurboth', '\\\\slurBoth', str)
-               str = re.sub ('\\\\slurdown', '\\\\slurDown', str)
-               str = re.sub ('\\\\slurdotted', '\\\\slurDotted', str)
-               str = re.sub ('\\\\slurnormal', '\\\\slurNoDots', str)          
-               
-               str = re.sub ('\\\\shiftoff', '\\\\shiftOff', str)
-               str = re.sub ('\\\\shifton', '\\\\shiftOn', str)
-               str = re.sub ('\\\\shiftonn', '\\\\shiftOnn', str)
-               str = re.sub ('\\\\shiftonnn', '\\\\shiftOnnn', str)
-
-               str = re.sub ('\\\\onevoice', '\\\\oneVoice', str)
-               str = re.sub ('\\\\voiceone', '\\\\voiceOne', str)
-               str = re.sub ('\\\\voicetwo', '\\\\voiceTwo', str)
-               str = re.sub ('\\\\voicethree', '\\\\voiceThree', str)
-               str = re.sub ('\\\\voicefour', '\\\\voiceFour', str)
-               
-               return str
-       
-       conversions.append ((1,3,93), conv,
-                           'property definiton case (eg. onevoice -> oneVoice)')
-
-
-if 1:
-       def conv (str):
-               str = re.sub ('ChordNames*', 'ChordNames', str)
-               if re.search ('\\\\textscript "[^"]* *"[^"]*"', str):
-                       sys.stderr.write ('\nNot smart enough to convert to new \\textscript markup text')
-
-               str = re.sub ('\\textscript +("[^"]*")', '\\textscript #\\1', str)
-
-               return str
-       
-       conversions.append ((1,3,97), conv, 'ChordName -> ChordNames')
-
-if 1:
-       def conv (str):
-               str = re.sub ('beamAutoEnd_([0-9]*) *= *(#\\([^)]*\\))', 'autoBeamSettings \\push #\'(end 1 \\1 * *) = \\2', str)
-               str = re.sub ('beamAutoBegin_([0-9]*) *= *(#\\([^)]*\))', 'autoBeamSettings \\push #\'(begin 1 \\1 * *) = \\2', str)
-               str = re.sub ('beamAutoEnd *= *(#\\([^)]*\\))', 'autoBeamSettings \\push #\'(end * * * *) = \\1', str)
-               str = re.sub ('beamAutoBegin *= *(#\\([^)]*\\))', 'autoBeamSettings \\push #\'(begin * * * *) = \\1', str)
-
-
-               return str
-       
-       conversions.append ((1,3,102), conv, 'beamAutoEnd -> autoBeamSettings \\push (end * * * *)')
-
-############################
-       
-
-def get_conversions (from_version, to_version):
-       def version_b (v, f = from_version, t = to_version):
-               return version_cmp (v[0], f) > 0 and version_cmp (v[0], t) <= 0
-       return filter (version_b, conversions)
-
-
-def latest_version ():
-       return conversions[-1][0]
-
-def do_conversion (infile, from_version, outfile, to_version):
-       conv_list = get_conversions (from_version, to_version)
-
-       sys.stderr.write ('Applying conversions: ')
-       str = infile.read ()
-       last_conversion = ()
-       try:
-               for x in conv_list:
-                       sys.stderr.write (tup_to_str (x[0])  + ', ')
-                       str = x[1] (str)
-                       last_conversion = x[0]
-
-       except FatalConversionError:
-               sys.stderr.write ('Error while converting; I won\'t convert any further')
-
-       if last_conversion:
-               sys.stderr.write ('\n')
-               new_ver =  '\\\\version \"%s\"' % tup_to_str (last_conversion)
-               if re.search (mudela_version_re_str, str):
-                       str = re.sub (mudela_version_re_str,new_ver , str)
-               else:
-                       str = new_ver + '\n' + str
-
-               outfile.write(str)
-
-       return last_conversion
-       
-class UnknownVersion:
-       pass
-
-def do_one_file (infile_name):
-       sys.stderr.write ('Processing `%s\' ... '% infile_name)
-       outfile_name = ''
-       if __main__.edit:
-               outfile_name = infile_name + '.NEW'
-       elif __main__.outfile_name:
-               outfile_name = __main__.outfile_name
-
-       if __main__.from_version:
-               from_version = __main__.from_version
-       else:
-               guess = guess_mudela_version (infile_name)
-               if not guess:
-                       raise UnknownVersion()
-               from_version = str_to_tuple (guess)
-
-       if __main__.to_version:
-               to_version = __main__.to_version
-       else:
-               to_version = latest_version ()
-
-
-       if infile_name:
-               infile = open (infile_name,'r')
-       else:
-               infile = sys.stdin
-
-       if outfile_name:
-               outfile =  open (outfile_name, 'w')
-       else:
-               outfile = sys.stdout
-
-       touched = do_conversion (infile, from_version, outfile, to_version)
-
-       if infile_name:
-               infile.close ()
-
-       if outfile_name:
-               outfile.close ()
-
-       if __main__.edit and touched:
-               try:
-                       os.remove(infile_name + '~')
-               except:
-                       pass
-               os.rename (infile_name, infile_name + '~')
-               os.rename (infile_name + '.NEW', infile_name)
-
-       sys.stderr.write ('\n')
-       sys.stderr.flush ()
-
-edit = 0
-to_version = ()
-from_version = ()
-outfile_name = ''
-
-(options, files) = getopt.getopt (
-       sys.argv[1:], 'o:f:t:seh', ['version', 'output', 'show-rules', 'help', 'edit', 'from=', 'to'])
-
-for opt in options:
-       o = opt[0]
-       a = opt[1]
-       if o== '--help' or o == '-h':
-               usage ()
-               sys.exit (0)
-       if o == '--version' or o == '-v':
-               print_version ()
-               sys.exit (0)
-       elif o== '--from' or o=='-f':
-               from_version = str_to_tuple (a)
-       elif o== '--to' or o=='-t':
-               to_version = str_to_tuple (a)
-       elif o== '--edit' or o == '-e':
-               edit = 1
-       elif o== '--show-rules' or o == '-s':
-               show_rules (sys.stdout)
-               sys.exit(0)
-       elif o == '--output' or o == '-o':
-               outfile_name = a
-       else:
-               print o
-               raise getopt.error
-
-identify ()
-for f in files:
-       if f == '-':
-               f = ''
-       try:
-               do_one_file (f)
-       except UnknownVersion:
-               pass
diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py
new file mode 100644 (file)
index 0000000..07de5b7
--- /dev/null
@@ -0,0 +1,1102 @@
+#!@PYTHON@
+# vim: set noexpandtab:
+# TODO:
+# * Figure out clean set of options. Hmm, isn't it pretty ok now?
+# * add support for .lilyrc
+# * EndLilyPondOutput is def'd as vfil. Causes large white gaps.
+
+# todo: dimension handling (all the x2y) is clumsy. 
+
+# This is was the idea for handling of comments:
+#      Multiline comments, @ignore .. @end ignore is scanned for
+#      in read_doc_file, and the chunks are marked as 'ignore', so
+#      lilypond-book will not touch them any more. The content of the
+#      chunks are written to the output file. Also 'include' and 'input'
+#      regex has to check if they are commented out.
+#
+#      Then it is scanned for 'lilypond', 'lilypond-file' and 'lilypond-block'.
+#      These three regex's has to check if they are on a commented line,
+#      % for latex, @c for texinfo.
+#
+#      Then lines that are commented out with % (latex) and @c (Texinfo)
+#      are put into chunks marked 'ignore'. This cannot be done before
+#      searching for the lilypond-blocks because % is also the comment character
+#      for lilypond.
+#
+#      The the rest of the rexeces are searched for. They don't have to test
+#      if they are on a commented out line.
+
+import os
+import stat
+import string
+import re
+import getopt
+import sys
+import __main__
+import operator
+
+
+program_version = '@TOPLEVEL_VERSION@'
+if program_version == '@' + 'TOPLEVEL_VERSION' + '@':
+       program_version = '1.3.106'     
+
+include_path = [os.getcwd()]
+
+
+# g_ is for global (?)
+
+g_here_dir = os.getcwd ()
+g_dep_prefix = ''
+g_outdir = ''
+g_force_lilypond_fontsize = 0
+g_read_lys = 0
+g_do_pictures = 1
+g_num_cols = 1
+format = ''
+g_run_lilypond = 1
+no_match = 'a\ba'
+
+default_music_fontsize = 16
+default_text_fontsize = 12
+
+
+class LatexPaper:
+       def __init__(self):
+               self.m_paperdef =  {
+                       # the dimentions are from geometry.sty
+                       'a0paper': (mm2pt(841), mm2pt(1189)),
+                       'a1paper': (mm2pt(595), mm2pt(841)),
+                       'a2paper': (mm2pt(420), mm2pt(595)),
+                       'a3paper': (mm2pt(297), mm2pt(420)),
+                       'a4paper': (mm2pt(210), mm2pt(297)),
+                       'a5paper': (mm2pt(149), mm2pt(210)),
+                       'b0paper': (mm2pt(1000), mm2pt(1414)),
+                       'b1paper': (mm2pt(707), mm2pt(1000)),
+                       'b2paper': (mm2pt(500), mm2pt(707)),
+                       'b3paper': (mm2pt(353), mm2pt(500)),
+                       'b4paper': (mm2pt(250), mm2pt(353)),
+                       'b5paper': (mm2pt(176), mm2pt(250)),
+                       'letterpaper': (in2pt(8.5), in2pt(11)),
+                       'legalpaper': (in2pt(8.5), in2pt(14)),
+                       'executivepaper': (in2pt(7.25), in2pt(10.5))}
+               self.m_use_geometry = None
+               self.m_papersize = 'letterpaper'
+               self.m_fontsize = 10
+               self.m_num_cols = 1
+               self.m_landscape = 0
+               self.m_geo_landscape = 0
+               self.m_geo_width = None
+               self.m_geo_textwidth = None
+               self.m_geo_lmargin = None
+               self.m_geo_rmargin = None
+               self.m_geo_includemp = None
+               self.m_geo_marginparwidth = {10: 57, 11: 50, 12: 35}
+               self.m_geo_marginparsep = {10: 11, 11: 10, 12: 10}
+               self.m_geo_x_marginparwidth = None
+               self.m_geo_x_marginparsep = None
+               self.__body = None
+       def set_geo_option(self, name, value):
+               if name == 'body' or name == 'text':
+                       if type(value) == type(""):
+                               self._set_dimen('m_geo_textwidth', value)
+                       else:
+                               self._set_dimen('m_geo_textwidth', value[0])
+                       self.__body = 1
+               elif name == 'portrait':
+                       self.m_geo_landscape = 0
+               elif name == 'reversemp' or name == 'reversemarginpar':
+                       if self.m_geo_includemp == None:
+                               self.m_geo_includemp = 1
+               elif name == 'marginparwidth' or name == 'marginpar':
+                       self._set_dimen('m_geo_x_marginparwidth', value)
+                       self.m_geo_includemp = 1
+               elif name == 'marginparsep':
+                       self._set_dimen('m_geo_x_marginparsep', value)
+                       self.m_geo_includemp = 1
+               elif name == 'scale':
+                       if type(value) == type(""):
+                               self.m_geo_width = self.get_paperwidth() * float(value)
+                       else:
+                               self.m_geo_width = self.get_paperwidth() * float(value[0])
+               elif name == 'hscale':
+                       self.m_geo_width = self.get_paperwidth() * float(value)
+               elif name == 'left' or name == 'lmargin':
+                       self._set_dimen('m_geo_lmargin', value)
+               elif name == 'right' or name == 'rmargin':
+                       self._set_dimen('m_geo_rmargin', value)
+               elif name == 'hdivide' or name == 'divide':
+                       if value[0] not in ('*', ''):
+                               self._set_dimen('m_geo_lmargin', value[0])
+                       if value[1] not in ('*', ''):
+                               self._set_dimen('m_geo_width', value[1])
+                       if value[2] not in ('*', ''):
+                               self._set_dimen('m_geo_rmargin', value[2])
+               elif name == 'hmargin':
+                       if type(value) == type(""):
+                               self._set_dimen('m_geo_lmargin', value)
+                               self._set_dimen('m_geo_rmargin', value)
+                       else:
+                               self._set_dimen('m_geo_lmargin', value[0])
+                               self._set_dimen('m_geo_rmargin', value[1])
+               elif name == 'margin':#ugh there is a bug about this option in
+                                       # the geometry documentation
+                       if type(value) == type(""):
+                               self._set_dimen('m_geo_lmargin', value)
+                               self._set_dimen('m_geo_rmargin', value)
+                       else:
+                               self._set_dimen('m_geo_lmargin', value[0])
+                               self._set_dimen('m_geo_rmargin', value[0])
+               elif name == 'total':
+                       if type(value) == type(""):
+                               self._set_dimen('m_geo_width', value)
+                       else:
+                               self._set_dimen('m_geo_width', value[0])
+               elif name == 'width' or name == 'totalwidth':
+                       self._set_dimen('m_geo_width', value)
+               elif name == 'paper' or name == 'papername':
+                       self.m_papersize = value
+               elif name[-5:] == 'paper':
+                       self.m_papersize = name
+               else:
+                       self._set_dimen('m_geo_'+name, value)
+       def _set_dimen(self, name, value):
+               if type(value) == type("") and value[-2:] == 'pt':
+                       self.__dict__[name] = float(value[:-2])
+               elif type(value) == type("") and value[-2:] == 'mm':
+                       self.__dict__[name] = mm2pt(float(value[:-2]))
+               elif type(value) == type("") and value[-2:] == 'cm':
+                       self.__dict__[name] = 10 * mm2pt(float(value[:-2]))
+               elif type(value) == type("") and value[-2:] == 'in':
+                       self.__dict__[name] = in2pt(float(value[:-2]))
+               else:
+                       self.__dict__[name] = value
+       def display(self):
+               print "LatexPaper:\n-----------"
+               for v in self.__dict__.keys():
+                       if v[:2] == 'm_':
+                               print v, self.__dict__[v]
+               print "-----------"
+       def get_linewidth(self):
+               w = self._calc_linewidth()
+               if self.m_num_cols == 2:
+                       return (w - 10) / 2
+               else:
+                       return w
+       def get_paperwidth(self):
+               #if self.m_use_geometry:
+                       return self.m_paperdef[self.m_papersize][self.m_landscape or self.m_geo_landscape]
+               #return self.m_paperdef[self.m_papersize][self.m_landscape]
+       
+       def _calc_linewidth(self):
+               # since geometry sometimes ignores 'includemp', this is
+               # more complicated than it should be
+               mp = 0
+               if self.m_geo_includemp:
+                       if self.m_geo_x_marginparsep is not None:
+                               mp = mp + self.m_geo_x_marginparsep
+                       else:
+                               mp = mp + self.m_geo_marginparsep[self.m_fontsize]
+                       if self.m_geo_x_marginparwidth is not None:
+                               mp = mp + self.m_geo_x_marginparwidth
+                       else:
+                               mp = mp + self.m_geo_marginparwidth[self.m_fontsize]
+               if self.__body:#ugh test if this is necessary
+                       mp = 0
+               def tNone(a, b, c):
+                       return a == None, b == None, c == None
+               if not self.m_use_geometry:
+                       return latex_linewidths[self.m_papersize][self.m_fontsize]
+               else:
+                       if tNone(self.m_geo_lmargin, self.m_geo_width,
+                               self.m_geo_rmargin) == (1, 1, 1):
+                               if self.m_geo_textwidth:
+                                       return self.m_geo_textwidth
+                               w = self.get_paperwidth() * 0.8
+                               return w - mp
+                       elif tNone(self.m_geo_lmargin, self.m_geo_width,
+                                self.m_geo_rmargin) == (0, 1, 1):
+                                if self.m_geo_textwidth:
+                                       return self.m_geo_textwidth
+                                return self.f1(self.m_geo_lmargin, mp)
+                       elif tNone(self.m_geo_lmargin, self.m_geo_width,
+                                self.m_geo_rmargin) == (1, 1, 0):
+                                if self.m_geo_textwidth:
+                                       return self.m_geo_textwidth
+                                return self.f1(self.m_geo_rmargin, mp)
+                       elif tNone(self.m_geo_lmargin, self.m_geo_width,
+                               self.m_geo_rmargin) \
+                                       in ((0, 0, 1), (1, 0, 0), (1, 0, 1)):
+                               if self.m_geo_textwidth:
+                                       return self.m_geo_textwidth
+                               return self.m_geo_width - mp
+                       elif tNone(self.m_geo_lmargin, self.m_geo_width,
+                               self.m_geo_rmargin) in ((0, 1, 0), (0, 0, 0)):
+                               w = self.get_paperwidth() - self.m_geo_lmargin - self.m_geo_rmargin - mp
+                               if w < 0:
+                                       w = 0
+                               return w
+                       raise "Never do this!"
+       def f1(self, m, mp):
+               tmp = self.get_paperwidth() - m * 2 - mp
+               if tmp < 0:
+                       tmp = 0
+               return tmp
+       def f2(self):
+               tmp = self.get_paperwidth() - self.m_geo_lmargin \
+                       - self.m_geo_rmargin
+               if tmp < 0:
+                       return 0
+               return tmp
+
+class TexiPaper:
+       def __init__(self):
+               self.m_papersize = 'a4'
+               self.m_fontsize = 12
+       def get_linewidth(self):
+               return texi_linewidths[self.m_papersize][self.m_fontsize]
+
+def mm2pt(x):
+       return x * 2.8452756
+def in2pt(x):
+       return x * 72.26999
+def em2pt(x, fontsize):
+       return {10: 10.00002, 11: 10.8448, 12: 11.74988}[fontsize] * x
+def ex2pt(x, fontsize):
+       return {10: 4.30554, 11: 4.7146, 12: 5.16667}[fontsize] * x
+       
+# latex linewidths:
+# indices are no. of columns, papersize,  fontsize
+# Why can't this be calculated?
+latex_linewidths = {
+       'a4paper':{10: 345, 11: 360, 12: 390},
+       'a4paper-landscape': {10: 598, 11: 596, 12:592},
+       'a5paper':{10: 276, 11: 276, 12: 276},
+       'b5paper':{10: 345, 11: 356, 12: 356},
+       'letterpaper':{10: 345, 11: 360, 12: 390},
+       'letterpaper-landscape':{10: 598, 11: 596, 12:596},
+       'legalpaper': {10: 345, 11: 360, 12: 390},
+       'executivepaper':{10: 345, 11: 360, 12: 379}}
+
+texi_linewidths = {
+       'a4': {12: 455},
+       'a4wide': {12: 470},
+       'smallbook': {12: 361},
+       'texidefault': {12: 433}}
+
+option_definitions = [
+  ('EXT', 'f', 'format', 'set format.  EXT is one of texi and latex.'),
+  ('DIM',  '', 'default-music-fontsize', 'default fontsize for music.  DIM is assumed to be in points'),
+  ('DIM',  '', 'default-lilypond-fontsize', 'deprecated, use --default-music-fontsize'),
+  ('DIM', '', 'force-music-fontsize', 'force fontsize for all inline lilypond. DIM is assumed be to in points'),
+  ('DIM', '', 'force-lilypond-fontsize', 'deprecated, use --force-music-fontsize'),
+  ('DIR', 'I', 'include', 'include path'),
+  ('', 'M', 'dependencies', 'write dependencies'),
+  ('PREF', '',  'dep-prefix', 'prepend PREF before each -M dependency'),
+  ('', 'n', 'no-lily', 'don\'t run lilypond'),
+  ('', '', 'no-pictures', "don\'t generate pictures"),
+  ('', '', 'read-lys', "don't write ly files."),
+  ('FILE', 'o', 'outname', 'filename main output file'),
+  ('FILE', '', 'outdir', "where to place generated files"),
+  ('', 'v', 'version', 'print version information' ),
+  ('', 'h', 'help', 'print help'),
+  ]
+
+# format specific strings, ie. regex-es for input, and % strings for output
+output_dict= {
+       'latex': {
+               'output-lilypond-fragment' : r"""\begin[eps,singleline,%s]{lilypond}
+  \context Staff <
+    \context Voice{
+      %s
+    }
+  >
+\end{lilypond}""", 
+               'output-lilypond':r"""\begin[%s]{lilypond}
+%s
+\end{lilypond}""",
+               'output-verbatim': "\\begin{verbatim}%s\\end{verbatim}",
+               'output-default-post': "\\def\postLilypondExample{}\n",
+               'output-default-pre': "\\def\preLilypondExample{}\n",
+               'usepackage-graphics': '\\usepackage{graphics}\n',
+               'output-eps': '\\noindent\\parbox{\\lilypondepswidth{%(fn)s.eps}}{\includegraphics{%(fn)s.eps}}',
+               'output-tex': '\\preLilypondExample \\input %(fn)s.tex \\postLilypondExample\n',
+               'pagebreak': r'\pagebreak',
+               },
+       'texi' : {'output-lilypond': """@lilypond[%s]
+%s
+@end lilypond 
+""",
+                 'output-lilypond-fragment': """@lilypond[%s]
+\context Staff\context Voice{ %s }
+@end lilypond """,
+                 'pagebreak': None,
+                 'output-verbatim': r"""@example
+%s
+@end example
+""",
+
+# do some tweaking: @ is needed in some ps stuff.
+# override EndLilyPondOutput, since @tex is done
+# in a sandbox, you can't do \input lilyponddefs at the
+# top of the document.
+
+# should also support fragment in
+                 
+                 'output-all': r"""@tex
+\catcode`\@=12
+\input lilyponddefs
+\def\EndLilyPondOutput{}
+\input %(fn)s.tex
+\catcode`\@=0
+@end tex
+@html
+<p>
+<img src=%(fn)s.png>
+@end html
+""",
+               }
+       }
+
+def output_verbatim (body):
+       if __main__.format == 'texi':
+               body = re.sub ('([@{}])', '@\\1', body)
+       return get_output ('output-verbatim') % body
+
+
+re_dict = {
+       'latex': {'input': r'(?m)^[^%\n]*?(?P<match>\\mbinput{?([^}\t \n}]*))',
+                 'include': r'(?m)^[^%\n]*?(?P<match>\\mbinclude{(?P<filename>[^}]+)})',
+                 'option-sep' : ', *',
+                 'header': r"\\documentclass\s*(\[.*?\])?",
+                 'geometry': r"^(?m)[^%\n]*?\\usepackage\s*(\[(?P<options>.*)\])?\s*{geometry}",
+                 'preamble-end': r'(?P<code>\\begin{document})',
+                 'verbatim': r"(?s)(?P<code>\\begin{verbatim}.*?\\end{verbatim})",
+                 'verb': r"(?P<code>\\verb(?P<del>.).*?(?P=del))",
+                 'lilypond-file': r'(?m)^[^%\n]*?(?P<match>\\lilypondfile(\[(?P<options>.*?)\])?\{(?P<filename>.+)})',
+                 'lilypond' : r'(?m)^[^%\n]*?(?P<match>\\lilypond(\[(?P<options>.*?)\])?{(?P<code>.*?)})',
+                 'lilypond-block': r"(?sm)^[^%\n]*?(?P<match>\\begin(\[(?P<options>.*?)\])?{lilypond}(?P<code>.*?)\\end{lilypond})",
+                 'def-post-re': r"\\def\\postLilypondExample",
+                 'def-pre-re': r"\\def\\preLilypondExample",             
+                 'usepackage-graphics': r"\usepackage{graphics}",
+                 'intertext': r',?\s*intertext=\".*?\"',
+                 'multiline-comment': no_match,
+                 'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>^%.*$\n+))",
+                 'numcols': r"(?P<code>\\(?P<num>one|two)column)",
+                 },
+       
+       'texi': {
+                'include':  '(?m)^[^%\n]*?(?P<match>@mbinclude[ \n\t]+(?P<filename>[^\t \n]*))',
+                'input': no_match,
+                'header': no_match,
+                'preamble-end': no_match,
+                'landscape': no_match,
+                'verbatim': r"""(?s)(?P<code>@example\s.*?@end example\s)""",
+                'verb': r"""(?P<code>@code{.*?})""",
+                'lilypond-file': '(?m)^(?!@c)(?P<match>@lilypondfile(\[(?P<options>.*?)\])?{(?P<filename>[^}]+)})',
+                'lilypond' : '(?m)^(?!@c)(?P<match>@lilypond(\[(?P<options>.*?)\])?{(?P<code>.*?)})',
+                'lilypond-block': r"""(?m)^(?!@c)(?P<match>(?s)(?P<match>@lilypond(\[(?P<options>.*?)\])?\s(?P<code>.*?)@end lilypond\s))""",
+                 'option-sep' : ', *',
+                 'intertext': r',?\s*intertext=\".*?\"',
+                 'multiline-comment': r"(?sm)^\s*(?!@c\s+)(?P<code>@ignore\s.*?@end ignore)\s",
+                 'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>@c.*$\n+))",
+                 'numcols': no_match,
+                }
+       }
+
+
+for r in re_dict.keys ():
+       olddict = re_dict[r]
+       newdict = {}
+       for k in olddict.keys ():
+               newdict[k] = re.compile (olddict[k])
+       re_dict[r] = newdict
+
+       
+def uniq (list):
+       list.sort ()
+       s = list
+       list = []
+       for x in s:
+               if x not in list:
+                       list.append (x)
+       return list
+               
+
+def get_output (name):
+       return  output_dict[format][name]
+
+def get_re (name):
+       return  re_dict[format][name]
+
+def bounding_box_dimensions(fname):
+       try:
+               fd = open(fname)
+       except IOError:
+               error ("Error opening `%s'" % fname)
+       str = fd.read ()
+       s = re.search('%%BoundingBox: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)', str)
+       if s:
+               return (int(s.group(3))-int(s.group(1)), 
+                       int(s.group(4))-int(s.group(2)))
+       else:
+               return (0,0)
+
+
+def error (str):
+       sys.stderr.write (str + "\n  Exiting ... \n\n")
+       raise 'Exiting.'
+
+
+def compose_full_body (body, opts):
+       """Construct the lilypond code to send to Lilypond.
+       Add stuff to BODY using OPTS as options."""
+       music_size = default_music_fontsize
+       latex_size = default_text_fontsize
+       for o in opts:
+               if g_force_lilypond_fontsize:
+                       music_size = g_force_lilypond_fontsize
+               else:
+                       m = re.match ('([0-9]+)pt', o)
+                       if m:
+                               music_size = string.atoi(m.group (1))
+
+               m = re.match ('latexfontsize=([0-9]+)pt', o)
+               if m:
+                       latex_size = string.atoi (m.group (1))
+
+       if re.search ('\\\\score', body):
+               is_fragment = 0
+       else:
+               is_fragment = 1
+       if 'fragment' in opts:
+               is_fragment = 1
+       if 'nonfragment' in opts:
+               is_fragment = 0
+
+       if is_fragment and not 'multiline' in opts:
+               opts.append('singleline')
+       if 'singleline' in opts:
+               l = -1.0;
+       else:
+               l = paperguru.get_linewidth()
+       
+       if 'relative' in opts:#ugh only when is_fragment
+               body = '\\relative c { %s }' % body
+       
+       if is_fragment:
+               body = r"""\score { 
+ \notes { %s }
+  \paper { }  
+}""" % body
+
+       opts = uniq (opts)
+       optstring = string.join (opts, ' ')
+       optstring = re.sub ('\n', ' ', optstring)
+       body = r"""
+%% Generated by lilypond-book.py; options are %s  %%ughUGH not original options
+\include "paper%d.ly"
+\paper  { linewidth = %f \pt; } 
+""" % (optstring, music_size, l) + body
+       return body
+
+def parse_options_string(s):
+       d = {}
+       r1 = re.compile("((\w+)={(.*?)})((,\s*)|$)")
+       r2 = re.compile("((\w+)=(.*?))((,\s*)|$)")
+       r3 = re.compile("(\w+?)((,\s*)|$)")
+       while s:
+               m = r1.match(s)
+               if m:
+                       s = s[m.end():]
+                       d[m.group(2)] = re.split(",\s*", m.group(3))
+                       continue
+               m = r2.match(s)
+               if m:
+                       s = s[m.end():]
+                       d[m.group(2)] = m.group(3)
+                       continue
+               m = r3.match(s)
+               if m:
+                       s = s[m.end():]
+                       d[m.group(1)] = 1
+                       continue
+               print "trøbbel:%s:" % s
+       return d
+
+def scan_latex_preamble(chunks):
+       # first we want to scan the \documentclass line
+       # it should be the first non-comment line
+       idx = 0
+       while 1:
+               if chunks[idx][0] == 'ignore':
+                       idx = idx + 1
+                       continue
+               m = get_re ('header').match(chunks[idx][1])
+               options = re.split (',[\n \t]*', m.group(1)[1:-1])
+               for o in options:
+                       if o == 'landscape':
+                               paperguru.m_landscape = 1
+                       m = re.match("(.*?)paper", o)
+                       if m:
+                               paperguru.m_papersize = m.group()
+                       else:
+                               m = re.match("(\d\d)pt", o)
+                               if m:
+                                       paperguru.m_fontsize = int(m.group(1))
+                       
+               break
+       while chunks[idx][0] != 'preamble-end':
+               if chunks[idx] == 'ignore':
+                       idx = idx + 1
+                       continue
+               m = get_re ('geometry').search(chunks[idx][1])
+               if m:
+                       paperguru.m_use_geometry = 1
+                       o = parse_options_string(m.group('options'))
+                       for k in o.keys():
+                               paperguru.set_geo_option(k, o[k])
+               idx = idx + 1
+
+def scan_texi_preamble (chunks):
+       # this is not bulletproof..., it checks the first 10 chunks
+       idx = 0
+       while 1:
+               if chunks[idx][0] == 'input':
+                       if string.find(chunks[idx][1], "@afourpaper") != -1:
+                               paperguru.m_papersize = 'a4'
+                       elif string.find(chunks[idx][1], "@afourwide") != -1:
+                               paperguru.m_papersize = 'a4wide'
+                       elif string.find(chunks[idx][1], "@smallbook") != -1:
+                               paperguru.m_papersize = 'smallbook'
+               idx = idx + 1
+               if idx == 10 or idx == len(chunks):
+                       break
+
+def scan_preamble (chunks):
+       if __main__.format == 'texi':
+               scan_texi_preamble(chunks)
+       else:
+               assert __main__.format == 'latex'
+               scan_latex_preamble(chunks)
+               
+
+def completize_preamble (chunks):
+       if __main__.format == 'texi':
+               return chunks
+       pre_b = post_b = graphics_b = None
+       for chunk in chunks:
+               if chunk[0] == 'preamble-end':
+                       break
+               if chunk[0] == 'input':
+                       m = get_re('def-pre-re').search(chunk[1])
+                       if m:
+                               pre_b = 1
+               if chunk[0] == 'input':
+                       m = get_re('def-post-re').search(chunk[1])
+                       if m:
+                               post_b = 1
+               if chunk[0] == 'input':
+                       m = get_re('usepackage-graphics').search(chunk[1])
+                       if m:
+                               graphics_b = 1
+       x = 0
+       while chunks[x][0] != 'preamble-end':
+               x = x + 1
+       if not pre_b:
+               chunks.insert(x, ('input', get_output ('output-default-pre')))
+       if not post_b:
+               chunks.insert(x, ('input', get_output ('output-default-post')))
+       if not graphics_b:
+               chunks.insert(x, ('input', get_output ('usepackage-graphics')))
+       return chunks
+
+
+read_files = []
+def find_file (name):
+       f = None
+       for a in include_path:
+               try:
+                       nm = os.path.join (a, name)
+                       f = open (nm)
+                       __main__.read_files.append (nm)
+                       break
+               except IOError:
+                       pass
+       if f:
+               return f.read ()
+       else:
+               error ("File not found `%s'\n" % name)
+               return ''
+
+def do_ignore(match_object):
+       return [('ignore', match_object.group('code'))]
+def do_preamble_end(match_object):
+       return [('preamble-end', match_object.group('code'))]
+
+def make_verbatim(match_object):
+       return [('verbatim', match_object.group('code'))]
+
+def make_verb(match_object):
+       return [('verb', match_object.group('code'))]
+
+def do_include_file(m):
+       "m: MatchObject"
+       return [('input', get_output ('pagebreak'))] \
+            + read_doc_file(m.group('filename')) \
+            + [('input', get_output ('pagebreak'))] 
+
+def do_input_file(m):
+       return read_doc_file(m.group('filename'))
+
+def make_lilypond(m):
+       if m.group('options'):
+               options = m.group('options')
+       else:
+               options = ''
+       return [('input', get_output('output-lilypond-fragment') % 
+                       (options, m.group('code')))]
+
+def make_lilypond_file(m):
+       if m.group('options'):
+               options = m.group('options')
+       else:
+               options = ''
+       return [('input', get_output('output-lilypond') %
+                       (options, find_file(m.group('filename'))))]
+
+def make_lilypond_block(m):
+       if m.group('options'):
+               options = get_re('option-sep').split (m.group('options'))
+       else:
+           options = []
+       options = filter(lambda s: s != '', options)
+       return [('lilypond', m.group('code'), options)]
+
+def do_columns(m):
+       if __main__.format != 'latex':
+               return []
+       if m.group('num') == 'one':
+               return [('numcols', m.group('code'), 1)]
+       if m.group('num') == 'two':
+               return [('numcols', m.group('code'), 2)]
+       
+def chop_chunks(chunks, re_name, func, use_match=0):
+    newchunks = []
+    for c in chunks:
+        if c[0] == 'input':
+            str = c[1]
+            while str:
+                m = get_re (re_name).search (str)
+                if m == None:
+                    newchunks.append (('input', str))
+                    str = ''
+                else:
+                   if use_match:
+                        newchunks.append (('input', str[:m.start ('match')]))
+                   else:
+                        newchunks.append (('input', str[:m.start (0)]))
+                    #newchunks.extend(func(m))
+                   # python 1.5 compatible:
+                   newchunks = newchunks + func(m)
+                    str = str [m.end(0):]
+        else:
+            newchunks.append(c)
+    return newchunks
+
+def read_doc_file (filename):
+       """Read the input file, find verbatim chunks and do \input and \include
+       """
+       str = ''
+       str = find_file(filename)
+
+       if __main__.format == '':
+               latex =  re.search ('\\\\document', str[:200])
+               texinfo =  re.search ('@node|@setfilename', str[:200])
+               if (texinfo and latex) or not (texinfo or latex):
+                       error("error: can't determine format, please specify")
+               if texinfo:
+                       __main__.format = 'texi'
+               else:
+                       __main__.format = 'latex'
+       if __main__.format == 'texi':
+               __main__.paperguru = TexiPaper()
+       else:
+               __main__.paperguru = LatexPaper()
+       chunks = [('input', str)]
+       # we have to check for verbatim before doing include,
+       # because we don't want to include files that are mentioned
+       # inside a verbatim environment
+       chunks = chop_chunks(chunks, 'verbatim', make_verbatim)
+       chunks = chop_chunks(chunks, 'verb', make_verb)
+       chunks = chop_chunks(chunks, 'multiline-comment', do_ignore)
+       #ugh fix input
+       chunks = chop_chunks(chunks, 'include', do_include_file, 1)
+       chunks = chop_chunks(chunks, 'input', do_input_file, 1)
+       return chunks
+
+
+taken_file_names = {}
+def schedule_lilypond_block (chunk):
+       """Take the body and options from CHUNK, figure out how the
+       real .ly should look, and what should be left MAIN_STR (meant
+       for the main file).  The .ly is written, and scheduled in
+       TODO.
+
+       Return: a chunk (TYPE_STR, MAIN_STR, OPTIONS, TODO, BASE)
+
+       TODO has format [basename, extension, extension, ... ]
+       
+       """
+       (type, body, opts) = chunk
+       assert type == 'lilypond'
+       file_body = compose_full_body (body, opts)
+       basename = `abs(hash (file_body))`
+       for o in opts:
+               m = re.search ('filename="(.*?)"', o)
+               if m:
+                       basename = m.group (1)
+                       if not taken_file_names.has_key(basename):
+                           taken_file_names[basename] = 0
+                       else:
+                           taken_file_names[basename] = taken_file_names[basename] + 1
+                           basename = basename + "-%i" % taken_file_names[basename]
+       if not g_read_lys:
+               update_file(file_body, os.path.join(g_outdir, basename) + '.ly')
+       needed_filetypes = ['tex']
+
+       if format  == 'texi':
+               needed_filetypes.append('eps')
+               needed_filetypes.append('png')
+       if 'eps' in opts and not ('eps' in needed_filetypes):
+               needed_filetypes.append('eps')
+       outname = os.path.join(g_outdir, basename)
+       def f(base, ext1, ext2):
+               a = os.path.isfile(base + ext2)
+               if (os.path.isfile(base + ext1) and
+                   os.path.isfile(base + ext2) and
+                               os.stat(base+ext1)[stat.ST_MTIME] >
+                               os.stat(base+ext2)[stat.ST_MTIME]) or \
+                               not os.path.isfile(base + ext2):
+                       return 1
+       todo = []
+       if 'tex' in needed_filetypes and f(outname, '.ly', '.tex'):
+               todo.append('tex')
+       if 'eps' in needed_filetypes and f(outname, '.tex', '.eps'):
+               todo.append('eps')
+       if 'png' in needed_filetypes and f(outname, '.eps', '.png'):
+               todo.append('png')
+       newbody = ''
+       if 'verbatim' in opts:
+               newbody = output_verbatim (body)
+
+       for o in opts:
+               m = re.search ('intertext="(.*?)"', o)
+               if m:
+                       newbody = newbody  + m.group (1) + "\n\n"
+       if format == 'latex':
+               if 'eps' in opts:
+                       s = 'output-eps'
+               else:
+                       s = 'output-tex'
+       else: # format == 'texi'
+               s = 'output-all'
+       newbody = newbody + get_output(s) % {'fn': basename }
+       return ('lilypond', newbody, opts, todo, basename)
+
+def process_lilypond_blocks(outname, chunks):#ugh rename
+       newchunks = []
+       # Count sections/chapters.
+       for c in chunks:
+               if c[0] == 'lilypond':
+                       c = schedule_lilypond_block (c)
+               elif c[0] == 'numcols':
+                       paperguru.m_num_cols = c[2]
+               newchunks.append (c)
+       return newchunks
+
+
+def find_eps_dims (match):
+       "Fill in dimensions of EPS files."
+       
+       fn =match.group (1)
+       dims = bounding_box_dimensions (fn)
+       if g_outdir:
+               fn = os.path.join(g_outdir, fn)
+       
+       return '%ipt' % dims[0]
+
+
+def system (cmd):
+       sys.stderr.write ("invoking `%s'\n" % cmd)
+       st = os.system (cmd)
+       if st:
+               error ('Error command exited with value %d\n' % st)
+       return st
+
+def compile_all_files (chunks):
+       eps = []
+       tex = []
+       png = []
+
+       for c in chunks:
+               if c[0] <> 'lilypond':
+                       continue
+               base  = c[4]
+               exts = c[3]
+               for e in exts:
+                       if e == 'eps':
+                               eps.append (base)
+                       elif e == 'tex':
+                               #ugh
+                               if base + '.ly' not in tex:
+                                       tex.append (base + '.ly')
+                       elif e == 'png' and g_do_pictures:
+                               png.append (base)
+       d = os.getcwd()
+       if g_outdir:
+               os.chdir(g_outdir)
+       if tex:
+               # fixme: be sys-independent.
+               def incl_opt (x):
+                       if g_outdir and x[0] <> '/' :
+                               x = os.path.join (g_here_dir, x)
+                       return ' -I %s' % x
+
+               incs =  map (incl_opt, include_path)
+               lilyopts = string.join (incs, ' ' )
+               texfiles = string.join (tex, ' ')
+               system ('lilypond %s %s' % (lilyopts, texfiles))
+       for e in eps:
+               system(r"tex '\nonstopmode \input %s'" % e)
+               system(r"dvips -E -o %s %s" % (e + '.eps', e))
+       for g in png:
+               cmd = r"""gs -sDEVICE=pgm  -dTextAlphaBits=4 -dGraphicsAlphaBits=4  -q -sOutputFile=- -r90 -dNOPAUSE %s -c quit | pnmcrop | pnmtopng > %s"""
+               cmd = cmd % (g + '.eps', g + '.png')
+               system (cmd)
+       if g_outdir:
+               os.chdir(d)
+
+
+def update_file (body, name):
+       """
+       write the body if it has changed
+       """
+       same = 0
+       try:
+               f = open (name)
+               fs = f.read (-1)
+               same = (fs == body)
+       except:
+               pass
+
+       if not same:
+               f = open (name , 'w')
+               f.write (body)
+               f.close ()
+       
+       return not same
+
+
+def getopt_args (opts):
+       "Construct arguments (LONG, SHORT) for getopt from  list of options."
+       short = ''
+       long = []
+       for o in opts:
+               if o[1]:
+                       short = short + o[1]
+                       if o[0]:
+                               short = short + ':'
+               if o[2]:
+                       l = o[2]
+                       if o[0]:
+                               l = l + '='
+                       long.append (l)
+       return (short, long)
+
+def option_help_str (o):
+       "Transform one option description (4-tuple ) into neatly formatted string"
+       sh = '  '       
+       if o[1]:
+               sh = '-%s' % o[1]
+
+       sep = ' '
+       if o[1] and o[2]:
+               sep = ','
+               
+       long = ''
+       if o[2]:
+               long= '--%s' % o[2]
+
+       arg = ''
+       if o[0]:
+               if o[2]:
+                       arg = '='
+               arg = arg + o[0]
+       return '  ' + sh + sep + long + arg
+
+
+def options_help_str (opts):
+       "Convert a list of options into a neatly formatted string"
+       w = 0
+       strs =[]
+       helps = []
+
+       for o in opts:
+               s = option_help_str (o)
+               strs.append ((s, o[3]))
+               if len (s) > w:
+                       w = len (s)
+
+       str = ''
+       for s in strs:
+               str = str + '%s%s%s\n' % (s[0], ' ' * (w - len(s[0])  + 3), s[1])
+       return str
+
+def help():
+       sys.stdout.write("""Usage: lilypond-book [options] FILE\n
+Generate hybrid LaTeX input from Latex + lilypond
+Options:
+""")
+       sys.stdout.write (options_help_str (option_definitions))
+       sys.stdout.write (r"""Warning all output is written in the CURRENT directory
+
+
+
+Report bugs to bug-gnu-music@gnu.org.
+
+Written by Tom Cato Amundsen <tca@gnu.org> and
+Han-Wen Nienhuys <hanwen@cs.uu.nl>
+""")
+
+       sys.exit (0)
+
+
+def write_deps (fn, target):
+       sys.stdout.write('writing `%s\'\n' % os.path.join(g_outdir, fn))
+       f = open (os.path.join(g_outdir, fn), 'w')
+       f.write ('%s%s: ' % (g_dep_prefix, target))
+       for d in __main__.read_files:
+               f.write ('%s ' %  d)
+       f.write ('\n')
+       f.close ()
+       __main__.read_files = []
+
+def identify():
+       sys.stdout.write ('lilypond-book (GNU LilyPond) %s\n' % program_version)
+
+def print_version ():
+       identify()
+       sys.stdout.write (r"""Copyright 1998--1999
+Distributed under terms of the GNU General Public License. It comes with
+NO WARRANTY.
+""")
+
+def do_file(input_filename):
+       file_settings = {}
+       if outname:
+               my_outname = outname
+       else:
+               my_outname = os.path.basename(os.path.splitext(input_filename)[0])
+       my_depname = my_outname + '.dep'                
+
+       chunks = read_doc_file(input_filename)
+       chunks = chop_chunks(chunks, 'lilypond', make_lilypond, 1)
+       chunks = chop_chunks(chunks, 'lilypond-file', make_lilypond_file, 1)
+       chunks = chop_chunks(chunks, 'lilypond-block', make_lilypond_block, 1)
+       chunks = chop_chunks(chunks, 'singleline-comment', do_ignore, 1)
+       chunks = chop_chunks(chunks, 'preamble-end', do_preamble_end)
+       chunks = chop_chunks(chunks, 'numcols', do_columns)
+       #print "-" * 50
+       #for c in chunks: print "c:", c;
+       #sys.exit()
+       scan_preamble(chunks)
+       chunks = process_lilypond_blocks(my_outname, chunks)
+       # Do It.
+       if __main__.g_run_lilypond:
+               compile_all_files (chunks)
+               newchunks = []
+               # finishing touch.
+               for c in chunks:
+                       if c[0] == 'lilypond' and 'eps' in c[2]:
+                               body = re.sub (r"""\\lilypondepswidth{(.*?)}""", find_eps_dims, c[1])
+                               newchunks.append (('lilypond', body))
+                       else:
+                               newchunks.append (c)
+               chunks = newchunks
+       x = 0
+       chunks = completize_preamble (chunks)
+       foutn = os.path.join(g_outdir, my_outname + '.' + format)
+       sys.stderr.write ("Writing `%s'\n" % foutn)
+       fout = open (foutn, 'w')
+       for c in chunks:
+               fout.write (c[1])
+       fout.close ()
+
+       if do_deps:
+               write_deps (my_depname, foutn)
+
+
+outname = ''
+try:
+       (sh, long) = getopt_args (__main__.option_definitions)
+       (options, files) = getopt.getopt(sys.argv[1:], sh, long)
+except getopt.error, msg:
+       sys.stderr.write("error: %s" % msg)
+       sys.exit(1)
+
+do_deps = 0
+for opt in options:    
+       o = opt[0]
+       a = opt[1]
+
+       if o == '--include' or o == '-I':
+               include_path.append (a)
+       elif o == '--version' or o == '-v':
+               print_version ()
+               sys.exit  (0)
+       elif o == '--format' or o == '-f':
+               __main__.format = a
+       elif o == '--outname' or o == '-o':
+               if len(files) > 1:
+                       #HACK
+                       sys.stderr.write("Lilypond-book is confused by --outname on multiple files")
+                       sys.exit(1)
+               outname = a
+       elif o == '--help' or o == '-h':
+               help ()
+       elif o == '--no-lily' or o == '-n':
+               __main__.g_run_lilypond = 0
+       elif o == '--dependencies' or o == '-M':
+               do_deps = 1
+       elif o == '--default-music-fontsize':
+               default_music_fontsize = string.atoi (a)
+       elif o == '--default-lilypond-fontsize':
+               print "--default-lilypond-fontsize is deprecated, use --default-music-fontsize"
+               default_music_fontsize = string.atoi (a)
+       elif o == '--force-music-fontsize':
+               g_force_lilypond_fontsize = string.atoi(a)
+       elif o == '--force-lilypond-fontsize':
+               print "--force-lilypond-fontsize is deprecated, use --default-lilypond-fontsize"
+               g_force_lilypond_fontsize = string.atoi(a)
+       elif o == '--dep-prefix':
+               g_dep_prefix = a
+       elif o == '--no-pictures':
+               g_do_pictures = 0
+       elif o == '--read-lys':
+               g_read_lys = 1
+       elif o == '--outdir':
+               g_outdir = a
+
+identify()
+if g_outdir:
+       if os.path.isfile(g_outdir):
+               error ("outdir is a file: %s" % g_outdir)
+       if not os.path.exists(g_outdir):
+               os.mkdir(g_outdir)
+for input_filename in files:
+       do_file(input_filename)
+       
+#
+# Petr, ik zou willen dat ik iets zinvoller deed,
+# maar wat ik kan ik doen, het verandert toch niets?
+#   --hwn 20/aug/99
index a6b4af0972fb4e37e96a56c2986aebc698ca00bb..635932dc28bb3a0d50ff7c33ca116034fdd93ce9 100644 (file)
@@ -151,7 +151,7 @@ class Input:
 
         titles={}
         for line in this.__fd.readlines():
-            m=re.match('\\\\def\\\\mudela([\w]+){(.*)}',line)
+            m=re.match('\\\\def\\\\lilypond([\w]+){(.*)}',line)
             if m:
                 for var in varTable:
                     if m.group(1) == var[0]:
@@ -171,7 +171,7 @@ class TeXOutput:
     This class handles all ly2dvi.py output file methods
 
     private methods:
-     __mudelaDefs(opt)  Send title info to output file
+     __lilypondDefs(opt)  Send title info to output file
 
     Public methods:
     __init__()  Constructor
@@ -192,7 +192,7 @@ class TeXOutput:
     #
     # __medelaDefs
     #
-    def __mudelaDefs(this,opt):
+    def __lilypondDefs(this,opt):
         """
         Write titles to output
 
@@ -203,7 +203,7 @@ class TeXOutput:
 
         titles = Props.get('titles')
         for key in titles.keys():
-            this.write('%s\\mudela%s{%s}%%\n' % (opt,key,titles[key]))
+            this.write('%s\\lilypond%s{%s}%%\n' % (opt,key,titles[key]))
 
     #
     # write
@@ -271,7 +271,7 @@ class TeXOutput:
 \renewcommand{\@oddhead}{\parbox{\textwidth}%%
     {\mbox{}\small\theheader\hfill\textbf{\thepage}}}%%
 %% UGR.
-%%\renewcommand{\@evenhead}{eve!{\small\mudelainstrument{,}\quad\textbf{\thepage}}\hfil}%%
+%%\renewcommand{\@evenhead}{eve!{\small\lilypondinstrument{,}\quad\textbf{\thepage}}\hfil}%%
 \renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\thefooter}}%%
 \begin{document}
 """ % ( program_id(), Props.get('filename'), now, Props.get('papersize'),
@@ -289,7 +289,7 @@ class TeXOutput:
         except:
             sys.exit('ExitNoWrite', this.__outfile)
         this.write(top)
-        this.__mudelaDefs('')
+        this.__lilypondDefs('')
         this.write("""\
 \\makelilytitle
 """) 
@@ -311,13 +311,13 @@ class TeXOutput:
         this.write("""\
 \\def\\theopus{}%
 \\def\\thepiece{}%
-\\def\\mudelaopus{}%
-\\def\\mudelapiece{}%
+\\def\\lilypondopus{}%
+\\def\\lilypondpiece{}%
 """)
-        this.__mudelaDefs("\\def")
+        this.__lilypondDefs("\\def")
         this.write("""\
-\\def\\theopus{\\mudelaopus}% ugh
-\\def\\thepiece{\\mudelapiece}%
+\\def\\theopus{\\lilypondopus}% ugh
+\\def\\thepiece{\\lilypondpiece}%
 \\makelilypiecetitle
 """)
 
@@ -339,9 +339,9 @@ class TeXOutput:
             outfile = os.path.join(Props.get('output'), outfile )
             
         this.write(r"""
-%% \vfill\hfill{\mudelatagline}
+%% \vfill\hfill{\lilypondtagline}
 \makeatletter
-\renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\mudelatagline}}%%
+\renewcommand{\@oddfoot}{\parbox{\textwidth}{\mbox{}\lilypondtagline}}%%
 \makeatother
 \end{document}
 """)
@@ -494,7 +494,7 @@ class Properties:
         mudefs=[]    
 
         for line in fd.readlines():
-            m=re.match('\\\\newcommand\*{\\\\mudela([\w]+)}',line)
+            m=re.match('\\\\newcommand\*{\\\\lilypond([\w]+)}',line)
             if m:
                 mudefs.append(m.group(1))
        fd.close
@@ -839,7 +839,7 @@ class Properties:
        this.__set('tmp',dir,requester)
 
     #
-    # Set mudela source file name
+    # Set lilypond source file name
     #
     def setFilename(this,file, requester):     
        this.__set('filename',file,requester)
diff --git a/scripts/mudela-book.py b/scripts/mudela-book.py
deleted file mode 100644 (file)
index d37806d..0000000
+++ /dev/null
@@ -1,1102 +0,0 @@
-#!@PYTHON@
-# vim: set noexpandtab:
-# TODO:
-# * Figure out clean set of options. Hmm, isn't it pretty ok now?
-# * add support for .lilyrc
-
-
-# todo: dimension handling (all the x2y) is clumsy. 
-
-# This is was the idea for handling of comments:
-#      Multiline comments, @ignore .. @end ignore is scanned for
-#      in read_doc_file, and the chunks are marked as 'ignore', so
-#      mudela-book will not touch them any more. The content of the
-#      chunks are written to the output file. Also 'include' and 'input'
-#      regex has to check if they are commented out.
-#
-#      Then it is scanned for 'mudela', 'mudela-file' and 'mudela-block'.
-#      These three regex's has to check if they are on a commented line,
-#      % for latex, @c for texinfo.
-#
-#      Then lines that are commented out with % (latex) and @c (Texinfo)
-#      are put into chunks marked 'ignore'. This cannot be done before
-#      searching for the mudela-blocks because % is also the comment character
-#      for lilypond.
-#
-#      The the rest of the rexeces are searched for. They don't have to test
-#      if they are on a commented out line.
-
-import os
-import stat
-import string
-import re
-import getopt
-import sys
-import __main__
-import operator
-
-
-program_version = '@TOPLEVEL_VERSION@'
-if program_version == '@' + 'TOPLEVEL_VERSION' + '@':
-       program_version = '1.3.106'     
-
-include_path = [os.getcwd()]
-
-
-# g_ is for global (?)
-
-g_here_dir = os.getcwd ()
-g_dep_prefix = ''
-g_outdir = ''
-g_force_mudela_fontsize = 0
-g_read_lys = 0
-g_do_pictures = 1
-g_num_cols = 1
-format = ''
-g_run_lilypond = 1
-no_match = 'a\ba'
-
-default_music_fontsize = 16
-default_text_fontsize = 12
-
-
-class LatexPaper:
-       def __init__(self):
-               self.m_paperdef =  {
-                       # the dimentions are from geometry.sty
-                       'a0paper': (mm2pt(841), mm2pt(1189)),
-                       'a1paper': (mm2pt(595), mm2pt(841)),
-                       'a2paper': (mm2pt(420), mm2pt(595)),
-                       'a3paper': (mm2pt(297), mm2pt(420)),
-                       'a4paper': (mm2pt(210), mm2pt(297)),
-                       'a5paper': (mm2pt(149), mm2pt(210)),
-                       'b0paper': (mm2pt(1000), mm2pt(1414)),
-                       'b1paper': (mm2pt(707), mm2pt(1000)),
-                       'b2paper': (mm2pt(500), mm2pt(707)),
-                       'b3paper': (mm2pt(353), mm2pt(500)),
-                       'b4paper': (mm2pt(250), mm2pt(353)),
-                       'b5paper': (mm2pt(176), mm2pt(250)),
-                       'letterpaper': (in2pt(8.5), in2pt(11)),
-                       'legalpaper': (in2pt(8.5), in2pt(14)),
-                       'executivepaper': (in2pt(7.25), in2pt(10.5))}
-               self.m_use_geometry = None
-               self.m_papersize = 'letterpaper'
-               self.m_fontsize = 10
-               self.m_num_cols = 1
-               self.m_landscape = 0
-               self.m_geo_landscape = 0
-               self.m_geo_width = None
-               self.m_geo_textwidth = None
-               self.m_geo_lmargin = None
-               self.m_geo_rmargin = None
-               self.m_geo_includemp = None
-               self.m_geo_marginparwidth = {10: 57, 11: 50, 12: 35}
-               self.m_geo_marginparsep = {10: 11, 11: 10, 12: 10}
-               self.m_geo_x_marginparwidth = None
-               self.m_geo_x_marginparsep = None
-               self.__body = None
-       def set_geo_option(self, name, value):
-               if name == 'body' or name == 'text':
-                       if type(value) == type(""):
-                               self._set_dimen('m_geo_textwidth', value)
-                       else:
-                               self._set_dimen('m_geo_textwidth', value[0])
-                       self.__body = 1
-               elif name == 'portrait':
-                       self.m_geo_landscape = 0
-               elif name == 'reversemp' or name == 'reversemarginpar':
-                       if self.m_geo_includemp == None:
-                               self.m_geo_includemp = 1
-               elif name == 'marginparwidth' or name == 'marginpar':
-                       self._set_dimen('m_geo_x_marginparwidth', value)
-                       self.m_geo_includemp = 1
-               elif name == 'marginparsep':
-                       self._set_dimen('m_geo_x_marginparsep', value)
-                       self.m_geo_includemp = 1
-               elif name == 'scale':
-                       if type(value) == type(""):
-                               self.m_geo_width = self.get_paperwidth() * float(value)
-                       else:
-                               self.m_geo_width = self.get_paperwidth() * float(value[0])
-               elif name == 'hscale':
-                       self.m_geo_width = self.get_paperwidth() * float(value)
-               elif name == 'left' or name == 'lmargin':
-                       self._set_dimen('m_geo_lmargin', value)
-               elif name == 'right' or name == 'rmargin':
-                       self._set_dimen('m_geo_rmargin', value)
-               elif name == 'hdivide' or name == 'divide':
-                       if value[0] not in ('*', ''):
-                               self._set_dimen('m_geo_lmargin', value[0])
-                       if value[1] not in ('*', ''):
-                               self._set_dimen('m_geo_width', value[1])
-                       if value[2] not in ('*', ''):
-                               self._set_dimen('m_geo_rmargin', value[2])
-               elif name == 'hmargin':
-                       if type(value) == type(""):
-                               self._set_dimen('m_geo_lmargin', value)
-                               self._set_dimen('m_geo_rmargin', value)
-                       else:
-                               self._set_dimen('m_geo_lmargin', value[0])
-                               self._set_dimen('m_geo_rmargin', value[1])
-               elif name == 'margin':#ugh there is a bug about this option in
-                                       # the geometry documentation
-                       if type(value) == type(""):
-                               self._set_dimen('m_geo_lmargin', value)
-                               self._set_dimen('m_geo_rmargin', value)
-                       else:
-                               self._set_dimen('m_geo_lmargin', value[0])
-                               self._set_dimen('m_geo_rmargin', value[0])
-               elif name == 'total':
-                       if type(value) == type(""):
-                               self._set_dimen('m_geo_width', value)
-                       else:
-                               self._set_dimen('m_geo_width', value[0])
-               elif name == 'width' or name == 'totalwidth':
-                       self._set_dimen('m_geo_width', value)
-               elif name == 'paper' or name == 'papername':
-                       self.m_papersize = value
-               elif name[-5:] == 'paper':
-                       self.m_papersize = name
-               else:
-                       self._set_dimen('m_geo_'+name, value)
-       def _set_dimen(self, name, value):
-               if type(value) == type("") and value[-2:] == 'pt':
-                       self.__dict__[name] = float(value[:-2])
-               elif type(value) == type("") and value[-2:] == 'mm':
-                       self.__dict__[name] = mm2pt(float(value[:-2]))
-               elif type(value) == type("") and value[-2:] == 'cm':
-                       self.__dict__[name] = 10 * mm2pt(float(value[:-2]))
-               elif type(value) == type("") and value[-2:] == 'in':
-                       self.__dict__[name] = in2pt(float(value[:-2]))
-               else:
-                       self.__dict__[name] = value
-       def display(self):
-               print "LatexPaper:\n-----------"
-               for v in self.__dict__.keys():
-                       if v[:2] == 'm_':
-                               print v, self.__dict__[v]
-               print "-----------"
-       def get_linewidth(self):
-               w = self._calc_linewidth()
-               if self.m_num_cols == 2:
-                       return (w - 10) / 2
-               else:
-                       return w
-       def get_paperwidth(self):
-               #if self.m_use_geometry:
-                       return self.m_paperdef[self.m_papersize][self.m_landscape or self.m_geo_landscape]
-               #return self.m_paperdef[self.m_papersize][self.m_landscape]
-       
-       def _calc_linewidth(self):
-               # since geometry sometimes ignores 'includemp', this is
-               # more complicated than it should be
-               mp = 0
-               if self.m_geo_includemp:
-                       if self.m_geo_x_marginparsep is not None:
-                               mp = mp + self.m_geo_x_marginparsep
-                       else:
-                               mp = mp + self.m_geo_marginparsep[self.m_fontsize]
-                       if self.m_geo_x_marginparwidth is not None:
-                               mp = mp + self.m_geo_x_marginparwidth
-                       else:
-                               mp = mp + self.m_geo_marginparwidth[self.m_fontsize]
-               if self.__body:#ugh test if this is necessary
-                       mp = 0
-               def tNone(a, b, c):
-                       return a == None, b == None, c == None
-               if not self.m_use_geometry:
-                       return latex_linewidths[self.m_papersize][self.m_fontsize]
-               else:
-                       if tNone(self.m_geo_lmargin, self.m_geo_width,
-                               self.m_geo_rmargin) == (1, 1, 1):
-                               if self.m_geo_textwidth:
-                                       return self.m_geo_textwidth
-                               w = self.get_paperwidth() * 0.8
-                               return w - mp
-                       elif tNone(self.m_geo_lmargin, self.m_geo_width,
-                                self.m_geo_rmargin) == (0, 1, 1):
-                                if self.m_geo_textwidth:
-                                       return self.m_geo_textwidth
-                                return self.f1(self.m_geo_lmargin, mp)
-                       elif tNone(self.m_geo_lmargin, self.m_geo_width,
-                                self.m_geo_rmargin) == (1, 1, 0):
-                                if self.m_geo_textwidth:
-                                       return self.m_geo_textwidth
-                                return self.f1(self.m_geo_rmargin, mp)
-                       elif tNone(self.m_geo_lmargin, self.m_geo_width,
-                               self.m_geo_rmargin) \
-                                       in ((0, 0, 1), (1, 0, 0), (1, 0, 1)):
-                               if self.m_geo_textwidth:
-                                       return self.m_geo_textwidth
-                               return self.m_geo_width - mp
-                       elif tNone(self.m_geo_lmargin, self.m_geo_width,
-                               self.m_geo_rmargin) in ((0, 1, 0), (0, 0, 0)):
-                               w = self.get_paperwidth() - self.m_geo_lmargin - self.m_geo_rmargin - mp
-                               if w < 0:
-                                       w = 0
-                               return w
-                       raise "Never do this!"
-       def f1(self, m, mp):
-               tmp = self.get_paperwidth() - m * 2 - mp
-               if tmp < 0:
-                       tmp = 0
-               return tmp
-       def f2(self):
-               tmp = self.get_paperwidth() - self.m_geo_lmargin \
-                       - self.m_geo_rmargin
-               if tmp < 0:
-                       return 0
-               return tmp
-
-class TexiPaper:
-       def __init__(self):
-               self.m_papersize = 'a4'
-               self.m_fontsize = 12
-       def get_linewidth(self):
-               return texi_linewidths[self.m_papersize][self.m_fontsize]
-
-def mm2pt(x):
-       return x * 2.8452756
-def in2pt(x):
-       return x * 72.26999
-def em2pt(x, fontsize):
-       return {10: 10.00002, 11: 10.8448, 12: 11.74988}[fontsize] * x
-def ex2pt(x, fontsize):
-       return {10: 4.30554, 11: 4.7146, 12: 5.16667}[fontsize] * x
-       
-# latex linewidths:
-# indices are no. of columns, papersize,  fontsize
-# Why can't this be calculated?
-latex_linewidths = {
-       'a4paper':{10: 345, 11: 360, 12: 390},
-       'a4paper-landscape': {10: 598, 11: 596, 12:592},
-       'a5paper':{10: 276, 11: 276, 12: 276},
-       'b5paper':{10: 345, 11: 356, 12: 356},
-       'letterpaper':{10: 345, 11: 360, 12: 390},
-       'letterpaper-landscape':{10: 598, 11: 596, 12:596},
-       'legalpaper': {10: 345, 11: 360, 12: 390},
-       'executivepaper':{10: 345, 11: 360, 12: 379}}
-
-texi_linewidths = {
-       'a4': {12: 455},
-       'a4wide': {12: 470},
-       'smallbook': {12: 361},
-       'texidefault': {12: 433}}
-
-option_definitions = [
-  ('EXT', 'f', 'format', 'set format.  EXT is one of texi and latex.'),
-  ('DIM',  '', 'default-music-fontsize', 'default fontsize for music.  DIM is assumed to be in points'),
-  ('DIM',  '', 'default-mudela-fontsize', 'deprecated, use --default-music-fontsize'),
-  ('DIM', '', 'force-music-fontsize', 'force fontsize for all inline mudela. DIM is assumed be to in points'),
-  ('DIM', '', 'force-mudela-fontsize', 'deprecated, use --force-music-fontsize'),
-  ('DIR', 'I', 'include', 'include path'),
-  ('', 'M', 'dependencies', 'write dependencies'),
-  ('PREF', '',  'dep-prefix', 'prepend PREF before each -M dependency'),
-  ('', 'n', 'no-lily', 'don\'t run lilypond'),
-  ('', '', 'no-pictures', "don\'t generate pictures"),
-  ('', '', 'read-lys', "don't write ly files."),
-  ('FILE', 'o', 'outname', 'filename main output file'),
-  ('FILE', '', 'outdir', "where to place generated files"),
-  ('', 'v', 'version', 'print version information' ),
-  ('', 'h', 'help', 'print help'),
-  ]
-
-# format specific strings, ie. regex-es for input, and % strings for output
-output_dict= {
-       'latex': {
-               'output-mudela-fragment' : r"""\begin[eps,singleline,%s]{mudela}
-  \context Staff <
-    \context Voice{
-      %s
-    }
-  >
-\end{mudela}""", 
-               'output-mudela':r"""\begin[%s]{mudela}
-%s
-\end{mudela}""",
-               'output-verbatim': "\\begin{verbatim}%s\\end{verbatim}",
-               'output-default-post': "\\def\postMudelaExample{}\n",
-               'output-default-pre': "\\def\preMudelaExample{}\n",
-               'usepackage-graphics': '\\usepackage{graphics}\n',
-               'output-eps': '\\noindent\\parbox{\\mudelaepswidth{%(fn)s.eps}}{\includegraphics{%(fn)s.eps}}',
-               'output-tex': '\\preMudelaExample \\input %(fn)s.tex \\postMudelaExample\n',
-               'pagebreak': r'\pagebreak',
-               },
-       'texi' : {'output-mudela': """@mudela[%s]
-%s
-@end mudela 
-""",
-                 'output-mudela-fragment': """@mudela[%s]
-\context Staff\context Voice{ %s }
-@end mudela """,
-                 'pagebreak': None,
-                 'output-verbatim': r"""@example
-%s
-@end example
-""",
-
-# do some tweaking: @ is needed in some ps stuff.
-# override EndLilyPondOutput, since @tex is done
-# in a sandbox, you can't do \input lilyponddefs at the
-# top of the document.
-
-# should also support fragment in
-                 
-                 'output-all': r"""@tex
-\catcode`\@=12
-\input lilyponddefs
-\def\EndLilyPondOutput{}
-\input %(fn)s.tex
-\catcode`\@=0
-@end tex
-@html
-<p>
-<img src=%(fn)s.png>
-@end html
-""",
-               }
-       }
-
-def output_verbatim (body):
-       if __main__.format == 'texi':
-               body = re.sub ('([@{}])', '@\\1', body)
-       return get_output ('output-verbatim') % body
-
-
-re_dict = {
-       'latex': {'input': r'(?m)^[^%\n]*?(?P<match>\\mbinput{?([^}\t \n}]*))',
-                 'include': r'(?m)^[^%\n]*?(?P<match>\\mbinclude{(?P<filename>[^}]+)})',
-                 'option-sep' : ', *',
-                 'header': r"\\documentclass\s*(\[.*?\])?",
-                 'geometry': r"^(?m)[^%\n]*?\\usepackage\s*(\[(?P<options>.*)\])?\s*{geometry}",
-                 'preamble-end': r'(?P<code>\\begin{document})',
-                 'verbatim': r"(?s)(?P<code>\\begin{verbatim}.*?\\end{verbatim})",
-                 'verb': r"(?P<code>\\verb(?P<del>.).*?(?P=del))",
-                 'mudela-file': r'(?m)^[^%\n]*?(?P<match>\\mudelafile(\[(?P<options>.*?)\])?\{(?P<filename>.+)})',
-                 'mudela' : r'(?m)^[^%\n]*?(?P<match>\\mudela(\[(?P<options>.*?)\])?{(?P<code>.*?)})',
-                 'mudela-block': r"(?sm)^[^%\n]*?(?P<match>\\begin(\[(?P<options>.*?)\])?{mudela}(?P<code>.*?)\\end{mudela})",
-                 'def-post-re': r"\\def\\postMudelaExample",
-                 'def-pre-re': r"\\def\\preMudelaExample",               
-                 'usepackage-graphics': r"\usepackage{graphics}",
-                 'intertext': r',?\s*intertext=\".*?\"',
-                 'multiline-comment': no_match,
-                 'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>^%.*$\n+))",
-                 'numcols': r"(?P<code>\\(?P<num>one|two)column)",
-                 },
-       
-       'texi': {
-                'include':  '(?m)^[^%\n]*?(?P<match>@mbinclude[ \n\t]+(?P<filename>[^\t \n]*))',
-                'input': no_match,
-                'header': no_match,
-                'preamble-end': no_match,
-                'landscape': no_match,
-                'verbatim': r"""(?s)(?P<code>@example\s.*?@end example\s)""",
-                'verb': r"""(?P<code>@code{.*?})""",
-                'mudela-file': '(?m)^(?!@c)(?P<match>@mudelafile(\[(?P<options>.*?)\])?{(?P<filename>[^}]+)})',
-                'mudela' : '(?m)^(?!@c)(?P<match>@mudela(\[(?P<options>.*?)\])?{(?P<code>.*?)})',
-                'mudela-block': r"""(?m)^(?!@c)(?P<match>(?s)(?P<match>@mudela(\[(?P<options>.*?)\])?\s(?P<code>.*?)@end mudela\s))""",
-                 'option-sep' : ', *',
-                 'intertext': r',?\s*intertext=\".*?\"',
-                 'multiline-comment': r"(?sm)^\s*(?!@c\s+)(?P<code>@ignore\s.*?@end ignore)\s",
-                 'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>@c.*$\n+))",
-                 'numcols': no_match,
-                }
-       }
-
-
-for r in re_dict.keys ():
-       olddict = re_dict[r]
-       newdict = {}
-       for k in olddict.keys ():
-               newdict[k] = re.compile (olddict[k])
-       re_dict[r] = newdict
-
-       
-def uniq (list):
-       list.sort ()
-       s = list
-       list = []
-       for x in s:
-               if x not in list:
-                       list.append (x)
-       return list
-               
-
-def get_output (name):
-       return  output_dict[format][name]
-
-def get_re (name):
-       return  re_dict[format][name]
-
-def bounding_box_dimensions(fname):
-       try:
-               fd = open(fname)
-       except IOError:
-               error ("Error opening `%s'" % fname)
-       str = fd.read ()
-       s = re.search('%%BoundingBox: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)', str)
-       if s:
-               return (int(s.group(3))-int(s.group(1)), 
-                       int(s.group(4))-int(s.group(2)))
-       else:
-               return (0,0)
-
-
-def error (str):
-       sys.stderr.write (str + "\n  Exiting ... \n\n")
-       raise 'Exiting.'
-
-
-def compose_full_body (body, opts):
-       """Construct the mudela code to send to Lilypond.
-       Add stuff to BODY using OPTS as options."""
-       music_size = default_music_fontsize
-       latex_size = default_text_fontsize
-       for o in opts:
-               if g_force_mudela_fontsize:
-                       music_size = g_force_mudela_fontsize
-               else:
-                       m = re.match ('([0-9]+)pt', o)
-                       if m:
-                               music_size = string.atoi(m.group (1))
-
-               m = re.match ('latexfontsize=([0-9]+)pt', o)
-               if m:
-                       latex_size = string.atoi (m.group (1))
-
-       if re.search ('\\\\score', body):
-               is_fragment = 0
-       else:
-               is_fragment = 1
-       if 'fragment' in opts:
-               is_fragment = 1
-       if 'nonfragment' in opts:
-               is_fragment = 0
-
-       if is_fragment and not 'multiline' in opts:
-               opts.append('singleline')
-       if 'singleline' in opts:
-               l = -1.0;
-       else:
-               l = paperguru.get_linewidth()
-       
-       if 'relative' in opts:#ugh only when is_fragment
-               body = '\\relative c { %s }' % body
-       
-       if is_fragment:
-               body = r"""\score { 
- \notes { %s }
-  \paper { }  
-}""" % body
-
-       opts = uniq (opts)
-       optstring = string.join (opts, ' ')
-       optstring = re.sub ('\n', ' ', optstring)
-       body = r"""
-%% Generated by mudela-book.py; options are %s  %%ughUGH not original options
-\include "paper%d.ly"
-\paper  { linewidth = %f \pt; } 
-""" % (optstring, music_size, l) + body
-       return body
-
-def parse_options_string(s):
-       d = {}
-       r1 = re.compile("((\w+)={(.*?)})((,\s*)|$)")
-       r2 = re.compile("((\w+)=(.*?))((,\s*)|$)")
-       r3 = re.compile("(\w+?)((,\s*)|$)")
-       while s:
-               m = r1.match(s)
-               if m:
-                       s = s[m.end():]
-                       d[m.group(2)] = re.split(",\s*", m.group(3))
-                       continue
-               m = r2.match(s)
-               if m:
-                       s = s[m.end():]
-                       d[m.group(2)] = m.group(3)
-                       continue
-               m = r3.match(s)
-               if m:
-                       s = s[m.end():]
-                       d[m.group(1)] = 1
-                       continue
-               print "trøbbel:%s:" % s
-       return d
-
-def scan_latex_preamble(chunks):
-       # first we want to scan the \documentclass line
-       # it should be the first non-comment line
-       idx = 0
-       while 1:
-               if chunks[idx][0] == 'ignore':
-                       idx = idx + 1
-                       continue
-               m = get_re ('header').match(chunks[idx][1])
-               options = re.split (',[\n \t]*', m.group(1)[1:-1])
-               for o in options:
-                       if o == 'landscape':
-                               paperguru.m_landscape = 1
-                       m = re.match("(.*?)paper", o)
-                       if m:
-                               paperguru.m_papersize = m.group()
-                       else:
-                               m = re.match("(\d\d)pt", o)
-                               if m:
-                                       paperguru.m_fontsize = int(m.group(1))
-                       
-               break
-       while chunks[idx][0] != 'preamble-end':
-               if chunks[idx] == 'ignore':
-                       idx = idx + 1
-                       continue
-               m = get_re ('geometry').search(chunks[idx][1])
-               if m:
-                       paperguru.m_use_geometry = 1
-                       o = parse_options_string(m.group('options'))
-                       for k in o.keys():
-                               paperguru.set_geo_option(k, o[k])
-               idx = idx + 1
-
-def scan_texi_preamble (chunks):
-       # this is not bulletproof..., it checks the first 10 chunks
-       idx = 0
-       while 1:
-               if chunks[idx][0] == 'input':
-                       if string.find(chunks[idx][1], "@afourpaper") != -1:
-                               paperguru.m_papersize = 'a4'
-                       elif string.find(chunks[idx][1], "@afourwide") != -1:
-                               paperguru.m_papersize = 'a4wide'
-                       elif string.find(chunks[idx][1], "@smallbook") != -1:
-                               paperguru.m_papersize = 'smallbook'
-               idx = idx + 1
-               if idx == 10 or idx == len(chunks):
-                       break
-
-def scan_preamble (chunks):
-       if __main__.format == 'texi':
-               scan_texi_preamble(chunks)
-       else:
-               assert __main__.format == 'latex'
-               scan_latex_preamble(chunks)
-               
-
-def completize_preamble (chunks):
-       if __main__.format == 'texi':
-               return chunks
-       pre_b = post_b = graphics_b = None
-       for chunk in chunks:
-               if chunk[0] == 'preamble-end':
-                       break
-               if chunk[0] == 'input':
-                       m = get_re('def-pre-re').search(chunk[1])
-                       if m:
-                               pre_b = 1
-               if chunk[0] == 'input':
-                       m = get_re('def-post-re').search(chunk[1])
-                       if m:
-                               post_b = 1
-               if chunk[0] == 'input':
-                       m = get_re('usepackage-graphics').search(chunk[1])
-                       if m:
-                               graphics_b = 1
-       x = 0
-       while chunks[x][0] != 'preamble-end':
-               x = x + 1
-       if not pre_b:
-               chunks.insert(x, ('input', get_output ('output-default-pre')))
-       if not post_b:
-               chunks.insert(x, ('input', get_output ('output-default-post')))
-       if not graphics_b:
-               chunks.insert(x, ('input', get_output ('usepackage-graphics')))
-       return chunks
-
-
-read_files = []
-def find_file (name):
-       f = None
-       for a in include_path:
-               try:
-                       nm = os.path.join (a, name)
-                       f = open (nm)
-                       __main__.read_files.append (nm)
-                       break
-               except IOError:
-                       pass
-       if f:
-               return f.read ()
-       else:
-               error ("File not found `%s'\n" % name)
-               return ''
-
-def do_ignore(match_object):
-       return [('ignore', match_object.group('code'))]
-def do_preamble_end(match_object):
-       return [('preamble-end', match_object.group('code'))]
-
-def make_verbatim(match_object):
-       return [('verbatim', match_object.group('code'))]
-
-def make_verb(match_object):
-       return [('verb', match_object.group('code'))]
-
-def do_include_file(m):
-       "m: MatchObject"
-       return [('input', get_output ('pagebreak'))] \
-            + read_doc_file(m.group('filename')) \
-            + [('input', get_output ('pagebreak'))] 
-
-def do_input_file(m):
-       return read_doc_file(m.group('filename'))
-
-def make_mudela(m):
-       if m.group('options'):
-               options = m.group('options')
-       else:
-               options = ''
-       return [('input', get_output('output-mudela-fragment') % 
-                       (options, m.group('code')))]
-
-def make_mudela_file(m):
-       if m.group('options'):
-               options = m.group('options')
-       else:
-               options = ''
-       return [('input', get_output('output-mudela') %
-                       (options, find_file(m.group('filename'))))]
-
-def make_mudela_block(m):
-       if m.group('options'):
-               options = get_re('option-sep').split (m.group('options'))
-       else:
-           options = []
-       options = filter(lambda s: s != '', options)
-       return [('mudela', m.group('code'), options)]
-
-def do_columns(m):
-       if __main__.format != 'latex':
-               return []
-       if m.group('num') == 'one':
-               return [('numcols', m.group('code'), 1)]
-       if m.group('num') == 'two':
-               return [('numcols', m.group('code'), 2)]
-       
-def chop_chunks(chunks, re_name, func, use_match=0):
-    newchunks = []
-    for c in chunks:
-        if c[0] == 'input':
-            str = c[1]
-            while str:
-                m = get_re (re_name).search (str)
-                if m == None:
-                    newchunks.append (('input', str))
-                    str = ''
-                else:
-                   if use_match:
-                        newchunks.append (('input', str[:m.start ('match')]))
-                   else:
-                        newchunks.append (('input', str[:m.start (0)]))
-                    #newchunks.extend(func(m))
-                   # python 1.5 compatible:
-                   newchunks = newchunks + func(m)
-                    str = str [m.end(0):]
-        else:
-            newchunks.append(c)
-    return newchunks
-
-def read_doc_file (filename):
-       """Read the input file, find verbatim chunks and do \input and \include
-       """
-       str = ''
-       str = find_file(filename)
-
-       if __main__.format == '':
-               latex =  re.search ('\\\\document', str[:200])
-               texinfo =  re.search ('@node|@setfilename', str[:200])
-               if (texinfo and latex) or not (texinfo or latex):
-                       error("error: can't determine format, please specify")
-               if texinfo:
-                       __main__.format = 'texi'
-               else:
-                       __main__.format = 'latex'
-       if __main__.format == 'texi':
-               __main__.paperguru = TexiPaper()
-       else:
-               __main__.paperguru = LatexPaper()
-       chunks = [('input', str)]
-       # we have to check for verbatim before doing include,
-       # because we don't want to include files that are mentioned
-       # inside a verbatim environment
-       chunks = chop_chunks(chunks, 'verbatim', make_verbatim)
-       chunks = chop_chunks(chunks, 'verb', make_verb)
-       chunks = chop_chunks(chunks, 'multiline-comment', do_ignore)
-       #ugh fix input
-       chunks = chop_chunks(chunks, 'include', do_include_file, 1)
-       chunks = chop_chunks(chunks, 'input', do_input_file, 1)
-       return chunks
-
-
-taken_file_names = {}
-def schedule_mudela_block (chunk):
-       """Take the body and options from CHUNK, figure out how the
-       real .ly should look, and what should be left MAIN_STR (meant
-       for the main file).  The .ly is written, and scheduled in
-       TODO.
-
-       Return: a chunk (TYPE_STR, MAIN_STR, OPTIONS, TODO, BASE)
-
-       TODO has format [basename, extension, extension, ... ]
-       
-       """
-       (type, body, opts) = chunk
-       assert type == 'mudela'
-       file_body = compose_full_body (body, opts)
-       basename = `abs(hash (file_body))`
-       for o in opts:
-               m = re.search ('filename="(.*?)"', o)
-               if m:
-                       basename = m.group (1)
-                       if not taken_file_names.has_key(basename):
-                           taken_file_names[basename] = 0
-                       else:
-                           taken_file_names[basename] = taken_file_names[basename] + 1
-                           basename = basename + "-%i" % taken_file_names[basename]
-       if not g_read_lys:
-               update_file(file_body, os.path.join(g_outdir, basename) + '.ly')
-       needed_filetypes = ['tex']
-
-       if format  == 'texi':
-               needed_filetypes.append('eps')
-               needed_filetypes.append('png')
-       if 'eps' in opts and not ('eps' in needed_filetypes):
-               needed_filetypes.append('eps')
-       outname = os.path.join(g_outdir, basename)
-       def f(base, ext1, ext2):
-               a = os.path.isfile(base + ext2)
-               if (os.path.isfile(base + ext1) and
-                   os.path.isfile(base + ext2) and
-                               os.stat(base+ext1)[stat.ST_MTIME] >
-                               os.stat(base+ext2)[stat.ST_MTIME]) or \
-                               not os.path.isfile(base + ext2):
-                       return 1
-       todo = []
-       if 'tex' in needed_filetypes and f(outname, '.ly', '.tex'):
-               todo.append('tex')
-       if 'eps' in needed_filetypes and f(outname, '.tex', '.eps'):
-               todo.append('eps')
-       if 'png' in needed_filetypes and f(outname, '.eps', '.png'):
-               todo.append('png')
-       newbody = ''
-       if 'verbatim' in opts:
-               newbody = output_verbatim (body)
-
-       for o in opts:
-               m = re.search ('intertext="(.*?)"', o)
-               if m:
-                       newbody = newbody  + m.group (1) + "\n\n"
-       if format == 'latex':
-               if 'eps' in opts:
-                       s = 'output-eps'
-               else:
-                       s = 'output-tex'
-       else: # format == 'texi'
-               s = 'output-all'
-       newbody = newbody + get_output(s) % {'fn': basename }
-       return ('mudela', newbody, opts, todo, basename)
-
-def process_mudela_blocks(outname, chunks):#ugh rename
-       newchunks = []
-       # Count sections/chapters.
-       for c in chunks:
-               if c[0] == 'mudela':
-                       c = schedule_mudela_block (c)
-               elif c[0] == 'numcols':
-                       paperguru.m_num_cols = c[2]
-               newchunks.append (c)
-       return newchunks
-
-
-def find_eps_dims (match):
-       "Fill in dimensions of EPS files."
-       
-       fn =match.group (1)
-       dims = bounding_box_dimensions (fn)
-       if g_outdir:
-               fn = os.path.join(g_outdir, fn)
-       
-       return '%ipt' % dims[0]
-
-
-def system (cmd):
-       sys.stderr.write ("invoking `%s'\n" % cmd)
-       st = os.system (cmd)
-       if st:
-               error ('Error command exited with value %d\n' % st)
-       return st
-
-def compile_all_files (chunks):
-       eps = []
-       tex = []
-       png = []
-
-       for c in chunks:
-               if c[0] <> 'mudela':
-                       continue
-               base  = c[4]
-               exts = c[3]
-               for e in exts:
-                       if e == 'eps':
-                               eps.append (base)
-                       elif e == 'tex':
-                               #ugh
-                               if base + '.ly' not in tex:
-                                       tex.append (base + '.ly')
-                       elif e == 'png' and g_do_pictures:
-                               png.append (base)
-       d = os.getcwd()
-       if g_outdir:
-               os.chdir(g_outdir)
-       if tex:
-               # fixme: be sys-independent.
-               def incl_opt (x):
-                       if g_outdir and x[0] <> '/' :
-                               x = os.path.join (g_here_dir, x)
-                       return ' -I %s' % x
-
-               incs =  map (incl_opt, include_path)
-               lilyopts = string.join (incs, ' ' )
-               texfiles = string.join (tex, ' ')
-               system ('lilypond %s %s' % (lilyopts, texfiles))
-       for e in eps:
-               system(r"tex '\nonstopmode \input %s'" % e)
-               system(r"dvips -E -o %s %s" % (e + '.eps', e))
-       for g in png:
-               cmd = r"""gs -sDEVICE=pgm  -dTextAlphaBits=4 -dGraphicsAlphaBits=4  -q -sOutputFile=- -r90 -dNOPAUSE %s -c quit | pnmcrop | pnmtopng > %s"""
-               cmd = cmd % (g + '.eps', g + '.png')
-               system (cmd)
-       if g_outdir:
-               os.chdir(d)
-
-
-def update_file (body, name):
-       """
-       write the body if it has changed
-       """
-       same = 0
-       try:
-               f = open (name)
-               fs = f.read (-1)
-               same = (fs == body)
-       except:
-               pass
-
-       if not same:
-               f = open (name , 'w')
-               f.write (body)
-               f.close ()
-       
-       return not same
-
-
-def getopt_args (opts):
-       "Construct arguments (LONG, SHORT) for getopt from  list of options."
-       short = ''
-       long = []
-       for o in opts:
-               if o[1]:
-                       short = short + o[1]
-                       if o[0]:
-                               short = short + ':'
-               if o[2]:
-                       l = o[2]
-                       if o[0]:
-                               l = l + '='
-                       long.append (l)
-       return (short, long)
-
-def option_help_str (o):
-       "Transform one option description (4-tuple ) into neatly formatted string"
-       sh = '  '       
-       if o[1]:
-               sh = '-%s' % o[1]
-
-       sep = ' '
-       if o[1] and o[2]:
-               sep = ','
-               
-       long = ''
-       if o[2]:
-               long= '--%s' % o[2]
-
-       arg = ''
-       if o[0]:
-               if o[2]:
-                       arg = '='
-               arg = arg + o[0]
-       return '  ' + sh + sep + long + arg
-
-
-def options_help_str (opts):
-       "Convert a list of options into a neatly formatted string"
-       w = 0
-       strs =[]
-       helps = []
-
-       for o in opts:
-               s = option_help_str (o)
-               strs.append ((s, o[3]))
-               if len (s) > w:
-                       w = len (s)
-
-       str = ''
-       for s in strs:
-               str = str + '%s%s%s\n' % (s[0], ' ' * (w - len(s[0])  + 3), s[1])
-       return str
-
-def help():
-       sys.stdout.write("""Usage: mudela-book [options] FILE\n
-Generate hybrid LaTeX input from Latex + mudela
-Options:
-""")
-       sys.stdout.write (options_help_str (option_definitions))
-       sys.stdout.write (r"""Warning all output is written in the CURRENT directory
-
-
-
-Report bugs to bug-gnu-music@gnu.org.
-
-Written by Tom Cato Amundsen <tca@gnu.org> and
-Han-Wen Nienhuys <hanwen@cs.uu.nl>
-""")
-
-       sys.exit (0)
-
-
-def write_deps (fn, target):
-       sys.stdout.write('writing `%s\'\n' % os.path.join(g_outdir, fn))
-       f = open (os.path.join(g_outdir, fn), 'w')
-       f.write ('%s%s: ' % (g_dep_prefix, target))
-       for d in __main__.read_files:
-               f.write ('%s ' %  d)
-       f.write ('\n')
-       f.close ()
-       __main__.read_files = []
-
-def identify():
-       sys.stdout.write ('mudela-book (GNU LilyPond) %s\n' % program_version)
-
-def print_version ():
-       identify()
-       sys.stdout.write (r"""Copyright 1998--1999
-Distributed under terms of the GNU General Public License. It comes with
-NO WARRANTY.
-""")
-
-def do_file(input_filename):
-       file_settings = {}
-       if outname:
-               my_outname = outname
-       else:
-               my_outname = os.path.basename(os.path.splitext(input_filename)[0])
-       my_depname = my_outname + '.dep'                
-
-       chunks = read_doc_file(input_filename)
-       chunks = chop_chunks(chunks, 'mudela', make_mudela, 1)
-       chunks = chop_chunks(chunks, 'mudela-file', make_mudela_file, 1)
-       chunks = chop_chunks(chunks, 'mudela-block', make_mudela_block, 1)
-       chunks = chop_chunks(chunks, 'singleline-comment', do_ignore, 1)
-       chunks = chop_chunks(chunks, 'preamble-end', do_preamble_end)
-       chunks = chop_chunks(chunks, 'numcols', do_columns)
-       #print "-" * 50
-       #for c in chunks: print "c:", c;
-       #sys.exit()
-       scan_preamble(chunks)
-       chunks = process_mudela_blocks(my_outname, chunks)
-       # Do It.
-       if __main__.g_run_lilypond:
-               compile_all_files (chunks)
-               newchunks = []
-               # finishing touch.
-               for c in chunks:
-                       if c[0] == 'mudela' and 'eps' in c[2]:
-                               body = re.sub (r"""\\mudelaepswidth{(.*?)}""", find_eps_dims, c[1])
-                               newchunks.append (('mudela', body))
-                       else:
-                               newchunks.append (c)
-               chunks = newchunks
-       x = 0
-       chunks = completize_preamble (chunks)
-       foutn = os.path.join(g_outdir, my_outname + '.' + format)
-       sys.stderr.write ("Writing `%s'\n" % foutn)
-       fout = open (foutn, 'w')
-       for c in chunks:
-               fout.write (c[1])
-       fout.close ()
-
-       if do_deps:
-               write_deps (my_depname, foutn)
-
-
-outname = ''
-try:
-       (sh, long) = getopt_args (__main__.option_definitions)
-       (options, files) = getopt.getopt(sys.argv[1:], sh, long)
-except getopt.error, msg:
-       sys.stderr.write("error: %s" % msg)
-       sys.exit(1)
-
-do_deps = 0
-for opt in options:    
-       o = opt[0]
-       a = opt[1]
-
-       if o == '--include' or o == '-I':
-               include_path.append (a)
-       elif o == '--version' or o == '-v':
-               print_version ()
-               sys.exit  (0)
-       elif o == '--format' or o == '-f':
-               __main__.format = a
-       elif o == '--outname' or o == '-o':
-               if len(files) > 1:
-                       #HACK
-                       sys.stderr.write("Mudela-book is confused by --outname on multiple files")
-                       sys.exit(1)
-               outname = a
-       elif o == '--help' or o == '-h':
-               help ()
-       elif o == '--no-lily' or o == '-n':
-               __main__.g_run_lilypond = 0
-       elif o == '--dependencies' or o == '-M':
-               do_deps = 1
-       elif o == '--default-music-fontsize':
-               default_music_fontsize = string.atoi (a)
-       elif o == '--default-mudela-fontsize':
-               print "--default-mudela-fontsize is deprecated, use --default-music-fontsize"
-               default_music_fontsize = string.atoi (a)
-       elif o == '--force-music-fontsize':
-               g_force_mudela_fontsize = string.atoi(a)
-       elif o == '--force-mudela-fontsize':
-               print "--force-mudela-fontsize is deprecated, use --default-mudela-fontsize"
-               g_force_mudela_fontsize = string.atoi(a)
-       elif o == '--dep-prefix':
-               g_dep_prefix = a
-       elif o == '--no-pictures':
-               g_do_pictures = 0
-       elif o == '--read-lys':
-               g_read_lys = 1
-       elif o == '--outdir':
-               g_outdir = a
-
-identify()
-if g_outdir:
-       if os.path.isfile(g_outdir):
-               error ("outdir is a file: %s" % g_outdir)
-       if not os.path.exists(g_outdir):
-               os.mkdir(g_outdir)
-for input_filename in files:
-       do_file(input_filename)
-       
-#
-# Petr, ik zou willen dat ik iets zinvoller deed,
-# maar wat ik kan ik doen, het verandert toch niets?
-#   --hwn 20/aug/99
index ec139d467c9e5f3dafd13be3bfcd304d6f378118..81bb7bcc9e8b1f25811b55c4e864a31a8d6c27c4 100644 (file)
@@ -119,7 +119,7 @@ def get_transposing (s):
 def get_num_instruments (s):
        return ''
 
-def get_mudela_notename (p, ac):
+def get_lilypond_notename (p, ac):
        if p > 5:
                p = p - 7
        s = chr (p + ord ('c'))
index cd4bc70c601658d95ebf3c6dc8f5d14882635a1b..4da5d07f1edd9f58125f1bf8819d11764fe8cbb1 100644 (file)
@@ -9,7 +9,7 @@
 \rhead{}
 \chead{}
 \lfoot{}
-\cfoot{\ifnum\thepage=1{\hfill\mudelatagline}\fi}
+\cfoot{\ifnum\thepage=1{\hfill\lilypondtagline}\fi}
 \rfoot{\ifnum\thepage>1{\hfill\thepage\hfill}\fi}
 \headrulewidth0mm
 \pagestyle{fancy}
index 0c15069c386cd650ca3ddffcab7e9769fb3e5c26..5e91c0da9247007b70d9919d300e581005425991 100644 (file)
 \newdimen\lypdf@bracket_t     
 
 \def\lypdf@load_bracket_dimens{
-  \lypdf@interline=\mudelapaperinterline pt
+  \lypdf@interline=\lilypondpaperinterline pt
   \lypdf@bracket_b=0.3333\lypdf@interline
   \lypdf@bracket_w=2\lypdf@interline
   \lypdf@bracket_v=1.5\lypdf@interline
   \lypdf@bracket_u=\lypdf@bracket_v
-  \lypdf@bracket_t=\mudelapaperstaffline pt
+  \lypdf@bracket_t=\lilypondpaperstaffline pt
   \lypdf@bracket_t=2\lypdf@bracket_t
   \relax
 }
index bfd4a8e40deaa13ce4381077f76cb4b0313ef877..4f208653f2145a6211309b52728afe134a71ebaf 100644 (file)
@@ -13,8 +13,8 @@
         % by executing a 0 0 moveto
         \def\embeddedps##1{%
                 \special{ps: @beginspecial @setspecial
-                        \mudelapaperoutputscale\lilySpace
-                        \mudelapaperoutputscale\lilySpace scale 
+                        \lilypondpaperoutputscale\lilySpace
+                        \lilypondpaperoutputscale\lilySpace scale 
                         ##1 @endspecial}%
         }
 }
index e8a60fed86cea0735044dec9a1664cd074a1010a..1c7a3f5a3c16ccfd9fb86f75507750a7a1df5282 100644 (file)
@@ -8,7 +8,7 @@
                 \renewcommand{\@evenfoot}{}%
                 \renewcommand{\@evenhead}{}%
                 \renewcommand{\@oddfoot}{%
-                        \ifnum\thepage=1{\hfil \mudelatagline}%
+                        \ifnum\thepage=1{\hfil \lilypondtagline}%
                         \else{%
                                 foo\hfil\the\pageno\hfil}%
                         \fi}}
@@ -17,7 +17,7 @@
                 \renewcommand{\@evenfoot}{}%
                 \renewcommand{\@evenhead}{}%
                 \renewcommand{\@oddfoot}{%
-                        \ifnum\thepage=1{\hfil \mudelatagline}%
+                        \ifnum\thepage=1{\hfil \lilypondtagline}%
                         \else{foo\hfil\the\pageno\hfil}%
                         \fi}}%
 \nopagenumbers
index 1e4fdec9f0027b3fcbddbca05266509b598af2be..7dddb283b791c9b04ffc3e362bd0d8914baf9718 100644 (file)
@@ -2,7 +2,7 @@
         \def\texsuffix{PlainTeX}
 
 \def\lilyfooterPlainTeX{
-          \footline={\ifnum\pageno=1\smalltextfont\mudelacopyright\hfil \mudelatagline
+          \footline={\ifnum\pageno=1\smalltextfont\lilypondcopyright\hfil \lilypondtagline
                 \else\hfil\the\pageno\hfil\fi}%
 }
 \advance\hoffset by -.6in
index 997fabd85b3ae81652703f10ccc30f31a6b29482..91477809e40cd367035eb21507b58356ec3314c8 100644 (file)
 \def\myfilbreak{\par\vfil\penalty200\vfilneg}
 
 % stacked horizontal lines
-\ifundefined{mudelapaperinterscoreline}
-        \def\mudelapaperinterscoreline{16}
+\ifundefined{lilypondpaperinterscoreline}
+        \def\lilypondpaperinterscoreline{16}
 \fi
-\ifundefined{mudelapaperinterscorelinefill}
-        \def\mudelapaperinterscorelinefill{0}
+\ifundefined{lilypondpaperinterscorelinefill}
+        \def\lilypondpaperinterscorelinefill{0}
 \fi
 
-\def\interscoreline{\vskip\mudelapaperinterscoreline pt plus %
-  \mudelapaperinterscorelinefill fill\myfilbreak}
+\def\interscoreline{\vskip\lilypondpaperinterscoreline pt plus %
+  \lilypondpaperinterscorelinefill fill\myfilbreak}
 
 \def\placebox#1#2#3{%
         \botalign{\hbox{\raise #1\leftalign{\kern #2{}#3}}}}%
index 7350eb5d40bb6748e6628a2f686a929c46f54abb..41431b1329c8023a9594c9d46235a077170bbf59 100644 (file)
@@ -3,23 +3,23 @@
 
 % ugh: trick to get examples not generate par
 % these are for 16pt
-\def\mudelapaperlinewidth{-28.452756}%
-\def\mudelapaperindent{28.452756}%
-\def\mudelapaperrulethickness{0.400000}%
-\def\mudelapaperbarsize{16.000000}%
-\def\mudelapaperinterline{4.000000}%
-\def\mudelapapernotewidth{5.930000}%
-\def\mudelapaperwholewidth{8.640000}%
-\def\mudelapaperunitspace{22.000000}%
-\def\mudelapaperbasicspace{4.000000}%
-\def\mudelapapergeometric{0.000000}%
-\def\mudelapaperarithmetic_basicspace{2.000000}%
-\def\mudelapaperarithmetic_multiplier{4.800000}%
-\def\mudelapaperinterbeam{3.140000}%
-\def\mudelapapergourlay_energybound{100000.000000}%
-\def\mudelapapergourlay_maxmeasures{14.000000}%
+\def\lilypondpaperlinewidth{-28.452756}%
+\def\lilypondpaperindent{28.452756}%
+\def\lilypondpaperrulethickness{0.400000}%
+\def\lilypondpaperbarsize{16.000000}%
+\def\lilypondpaperinterline{4.000000}%
+\def\lilypondpapernotewidth{5.930000}%
+\def\lilypondpaperwholewidth{8.640000}%
+\def\lilypondpaperunitspace{22.000000}%
+\def\lilypondpaperbasicspace{4.000000}%
+\def\lilypondpapergeometric{0.000000}%
+\def\lilypondpaperarithmetic_basicspace{2.000000}%
+\def\lilypondpaperarithmetic_multiplier{4.800000}%
+\def\lilypondpaperinterbeam{3.140000}%
+\def\lilypondpapergourlay_energybound{100000.000000}%
+\def\lilypondpapergourlay_maxmeasures{14.000000}%
 % huh?
-% \def\exampleheight{2\mudelapaperbarsize pt}
+% \def\exampleheight{2\lilypondpaperbarsize pt}
 \def\exampleheight{2cm}
 
 % ful of pars, needs the above
index b6c9c7570bbd5bace73f3dbd4ce4fcbc6f4d0579..8e0bd60b004c4731682ac1bb72a538dc27e3d87e 100644 (file)
 \newcommand*{\meter}[1]{\def\themeter{#1}}
 \newcommand*{\poet}[1]{\def\thepoet{#1}}
 %
-\newcommand*{\mudelatitle}[1]{\def\thetitle{#1}}
-\newcommand*{\mudelasubtitle}[1]{\def\thesubtitle{#1}}
-\newcommand*{\mudelafooter}[1]{\def\thefooter{#1}}
-\newcommand*{\mudelahead}[1]{\def\theheader{#1}}
-\newcommand*{\mudelacomposer}[1]{\def\thecomposer{#1}}
-\newcommand*{\mudelaarranger}[1]{\def\thearranger{#1}}
-\newcommand*{\mudelainstrument}[1]{\def\theinstrument{#1}}
-\newcommand*{\mudelaopus}[1]{\def\theopus{#1}}
-\newcommand*{\mudelapiece}[1]{\def\thepiece{#1}}
-\newcommand*{\mudelametre}[1]{\def\themeter{#1}}
-\newcommand*{\mudelameter}[1]{\def\themeter{#1}}
-\newcommand*{\mudelapoet}[1]{\def\thepoet{#1}}
+\newcommand*{\lilypondtitle}[1]{\def\thetitle{#1}}
+\newcommand*{\lilypondsubtitle}[1]{\def\thesubtitle{#1}}
+\newcommand*{\lilypondfooter}[1]{\def\thefooter{#1}}
+\newcommand*{\lilypondhead}[1]{\def\theheader{#1}}
+\newcommand*{\lilypondcomposer}[1]{\def\thecomposer{#1}}
+\newcommand*{\lilypondarranger}[1]{\def\thearranger{#1}}
+\newcommand*{\lilypondinstrument}[1]{\def\theinstrument{#1}}
+\newcommand*{\lilypondopus}[1]{\def\theopus{#1}}
+\newcommand*{\lilypondpiece}[1]{\def\thepiece{#1}}
+\newcommand*{\lilypondmetre}[1]{\def\themeter{#1}}
+\newcommand*{\lilypondmeter}[1]{\def\themeter{#1}}
+\newcommand*{\lilypondpoet}[1]{\def\thepoet{#1}}
 %
 %
-\def\mudelanull{}%
+\def\lilypondnull{}%
 %
 \def\makelilytitle{%
   \begin{center}
         \bfseries
-        \ifx\mudelanull\thetitle\else{\huge\thetitle}\\ \fi
-        \ifx\mudelanull\thesubtitle\else{\Large\thesubtitle}\\ \fi
+        \ifx\lilypondnull\thetitle\else{\huge\thetitle}\\ \fi
+        \ifx\lilypondnull\thesubtitle\else{\Large\thesubtitle}\\ \fi
   \end{center}
   \bigskip
   % urg
   \edef\saveparskip{\parskip}\parskip-5mm
   \begin{minipage}[t]{0.45\textwidth}
-        \ifx\mudelanull\thepoet\else{\thepoet}\\ \fi
-        \ifx\mudelanull\themeter\else{\themeter}\\ \fi
+        \ifx\lilypondnull\thepoet\else{\thepoet}\\ \fi
+        \ifx\lilypondnull\themeter\else{\themeter}\\ \fi
   \end{minipage}\hspace*{\fill}
   \begin{minipage}[t]{0.45\textwidth}
       \begin{flushright}
-          \ifx\mudelanull\thecomposer\else{\large\normalfont\scshape\thecomposer}\\ \fi
-          \ifx\mudelanull\theopus\else{\theopus}\\ \fi
-          \ifx\mudelanull\thearranger\else{\thearranger}\\ \fi
+          \ifx\lilypondnull\thecomposer\else{\large\normalfont\scshape\thecomposer}\\ \fi
+          \ifx\lilypondnull\theopus\else{\theopus}\\ \fi
+          \ifx\lilypondnull\thearranger\else{\thearranger}\\ \fi
         \end{flushright}%
   \end{minipage}\par
   \parskip\saveparskip