From 8da6cef580cce3365b219f6aca429b434cb60fcf Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 12 Nov 2000 23:32:12 +0100 Subject: [PATCH] release: 1.3.107 ============ * 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 --- AUTHORS.txt | 6 +- CHANGES | 32 +- Documentation/GNUmakefile | 2 +- Documentation/bibliography/GNUmakefile | 2 +- Documentation/hacking.texi | 75 +--- Documentation/index.texi | 4 +- Documentation/regression-test.tely | 124 +++---- Documentation/topdocs/AUTHORS.texi | 4 +- Documentation/topdocs/GNUmakefile | 2 +- Documentation/topdocs/INSTALL.texi | 10 +- Documentation/topdocs/index.tely | 4 +- Documentation/user/GNUmakefile | 2 +- ...{convert-mudela.itexi => convert-ly.itexi} | 14 +- Documentation/user/glossary.tely | 276 +++++++------- Documentation/user/invoking.itexi | 2 +- ...ple.latex => latex-lilypond-example.latex} | 94 ++--- .../{mudela-book.tely => lilypond-book.tely} | 224 +++++------ Documentation/user/lilypond.tely | 4 +- Documentation/user/ly2dvi.texi | 6 +- Documentation/user/properties.itely | 8 +- Documentation/user/refman.itely | 234 ++++++------ Documentation/user/tutorial.itely | 26 +- INSTALL.txt | 10 +- VERSION | 4 +- configure | 172 ++++----- input/test/allfontstyle.ly | 2 +- input/test/beam-position.ly | 2 +- input/test/chord-names.ly | 2 +- input/test/collisions.ly | 13 +- input/test/force-hshift.ly | 12 +- input/test/hshift.ly | 22 +- lily/auto-beam-engraver.cc | 7 +- lily/auto-change-iterator.cc | 4 +- lily/auto-change-music.cc | 6 +- lily/bar-engraver.cc | 8 - lily/beam-engraver.cc | 7 +- lily/change-iterator.cc | 2 + lily/chord-name-engraver.cc | 10 +- lily/chord-tremolo-engraver.cc | 5 +- lily/chord-tremolo-iterator.cc | 5 +- lily/chord.cc | 108 ++++-- lily/clef-engraver.cc | 3 - lily/clef-item.cc | 13 +- lily/command-request.cc | 53 +-- lily/context-specced-music.cc | 6 +- lily/custos-engraver.cc | 5 +- lily/duration.cc | 139 +++++-- lily/folded-repeat-iterator.cc | 2 + lily/grace-iterator.cc | 2 + lily/grace-music.cc | 4 +- lily/identifier.cc | 3 - lily/include/auto-change-iterator.hh | 2 + lily/include/change-iterator.hh | 2 +- lily/include/chord-tremolo-iterator.hh | 1 + lily/include/chord.hh | 12 +- lily/include/command-request.hh | 58 +-- lily/include/context-specced-music.hh | 9 - lily/include/duration.hh | 30 +- lily/include/folded-repeat-iterator.hh | 2 + lily/include/grace-iterator.hh | 2 +- lily/include/identifier.hh | 6 +- lily/include/lily-proto.hh | 3 +- lily/include/lyric-combine-music-iterator.hh | 2 +- lily/include/main.hh | 2 +- lily/include/moment.hh | 2 +- lily/include/mudela-version.hh | 30 -- lily/include/music-iterator-ctor.hh | 5 +- lily/include/music-iterator.hh | 28 +- lily/include/music-list.hh | 2 +- lily/include/music-output-def.hh | 4 +- lily/include/music-output.hh | 2 +- lily/include/music-wrapper-iterator.hh | 1 + lily/include/musical-pitch.hh | 36 +- lily/include/musical-request.hh | 29 +- lily/include/my-lily-lexer.hh | 2 +- lily/include/note-column.hh | 1 - .../include/output-property-music-iterator.hh | 1 + lily/include/part-combine-music-iterator.hh | 2 +- lily/include/property-iterator.hh | 3 + lily/include/repeated-music.hh | 18 +- lily/include/request-chord-iterator.hh | 1 + lily/include/sequential-music-iterator.hh | 1 + lily/include/simple-music-iterator.hh | 1 + lily/include/simultaneous-music-iterator.hh | 3 +- lily/include/time-scaled-music-iterator.hh | 1 + lily/include/time-signature-performer.hh | 21 -- lily/include/timing-translator.hh | 6 +- lily/include/unfolded-repeat-iterator.hh | 16 + lily/key-engraver.cc | 2 +- lily/lexer.ll | 43 +-- lily/lily-guile.cc | 2 + lily/local-key-engraver.cc | 8 +- lily/local-key-item.cc | 35 +- lily/lyric-combine-music-iterator.cc | 2 + lily/lyric-combine-music.cc | 4 +- lily/midi-def.cc | 2 +- lily/moment.cc | 4 +- lily/music-iterator-ctor.cc | 20 +- lily/music-iterator.cc | 76 +--- lily/music-list.cc | 17 +- lily/music-wrapper-iterator.cc | 2 + lily/music.cc | 9 + lily/musical-pitch.cc | 207 +++++++++-- lily/musical-request.cc | 33 +- lily/my-lily-parser.cc | 2 +- lily/note-column.cc | 6 - lily/note-heads-engraver.cc | 15 +- lily/note-name-engraver.cc | 2 +- lily/note-performer.cc | 3 +- lily/output-property-engraver.cc | 4 +- lily/output-property-music-iterator.cc | 2 + lily/paper-outputter.cc | 2 +- lily/paper-score.cc | 6 +- lily/parser.yy | 350 ++++++++++-------- lily/part-combine-music-iterator.cc | 30 +- lily/part-combine-music.cc | 4 +- lily/property-iterator.cc | 4 + lily/repeated-music.cc | 58 ++- lily/request-chord-iterator.cc | 2 + lily/rest-collision.cc | 26 +- lily/rest-engraver.cc | 11 +- lily/score-engraver.cc | 4 +- lily/sequential-music-iterator.cc | 1 + lily/simple-music-iterator.cc | 2 + lily/simultaneous-music-iterator.cc | 2 + lily/spacing-engraver.cc | 4 +- lily/stem-engraver.cc | 8 +- lily/stem.cc | 6 +- lily/tie-engraver.cc | 9 +- lily/tie-performer.cc | 9 +- lily/time-scaled-music-iterator.cc | 2 + lily/time-scaled-music.cc | 5 +- lily/time-signature-performer.cc | 54 +-- lily/timing-engraver.cc | 24 +- lily/timing-translator.cc | 90 ++--- lily/unfolded-repeat-iterator.cc | 31 +- lilypond-mode.el | 3 +- ly/catalan.ly | 98 ++--- ly/chord-modifiers.ly | 16 +- ly/declarations-as.ly | 7 +- ly/declarations.ly | 6 +- ly/deutsch.ly | 72 ++-- ly/english.ly | 142 +++---- ly/italiano.ly | 70 ++-- ly/midi.ly | 1 + ly/nederlands.ly | 81 ++-- ly/norsk.ly | 144 +++---- ly/svenska.ly | 70 ++-- make/generic-vars.make | 8 +- make/{mudela-rules.make => ly-rules.make} | 6 +- make/{mudela-targets.make => ly-targets.make} | 0 make/{mudela-vars.make => ly-vars.make} | 0 make/mutopia-targets.make | 6 +- make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- ps/lilyponddefs.ps | 6 +- scm/ascii-script.scm | 4 +- scm/chord-names.scm | 19 +- scm/element-descriptions.scm | 3 +- scm/font.scm | 49 ++- scm/interface.scm | 4 +- scm/lily.scm | 43 ++- scm/translator-description.scm | 29 +- scripts/GNUmakefile | 2 +- scripts/abc2ly.py | 18 +- scripts/{convert-mudela.py => convert-ly.py} | 20 +- scripts/{mudela-book.py => lilypond-book.py} | 124 +++---- scripts/ly2dvi.py | 30 +- scripts/musedata2ly.py | 2 +- tex/headers.tex | 2 +- tex/lily-pdf-defs.tex | 4 +- tex/lily-ps-defs.tex | 4 +- tex/lilypond-latex.tex | 4 +- tex/lilypond-plaintex.tex | 2 +- tex/lilyponddefs.tex | 12 +- tex/mudela-book.tex | 32 +- tex/titledefs.tex | 40 +- 177 files changed, 2432 insertions(+), 2140 deletions(-) rename Documentation/user/{convert-mudela.itexi => convert-ly.itexi} (68%) rename Documentation/user/{latex-mudela-example.latex => latex-lilypond-example.latex} (58%) rename Documentation/user/{mudela-book.tely => lilypond-book.tely} (75%) delete mode 100644 lily/include/mudela-version.hh rename make/{mudela-rules.make => ly-rules.make} (58%) rename make/{mudela-targets.make => ly-targets.make} (100%) rename make/{mudela-vars.make => ly-vars.make} (100%) rename scripts/{convert-mudela.py => convert-ly.py} (97%) rename scripts/{mudela-book.py => lilypond-book.py} (88%) diff --git a/AUTHORS.txt b/AUTHORS.txt index 7890866810..4d2bed6671 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -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 , cembalo-partita in mudela, - accordion symbols, some mudela-book.py + * Tom Cato Amundsen , cembalo-partita in lilypond, + accordion symbols, some lilypond-book.py * Mats Bengtsson , `http://www.s3.kth.se/~matsb/' lots of testing, fixes, general @@ -73,7 +73,7 @@ list is alphabetically ordered. * Jeffrey B. Reed , Windows-NT support. - * Shay Rojanski Some mudela source. + * Shay Rojanski Some lilypond input. * August S.Sigov Russian translation diff --git a/CHANGES b/CHANGES index 7f51bc8c87..b4796d80bc 100644 --- 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 ============ diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index 6a80c86165..1b3462f693 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -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= diff --git a/Documentation/bibliography/GNUmakefile b/Documentation/bibliography/GNUmakefile index bca6b910c8..2c193065be 100644 --- a/Documentation/bibliography/GNUmakefile +++ b/Documentation/bibliography/GNUmakefile @@ -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 diff --git a/Documentation/hacking.texi b/Documentation/hacking.texi index f5116d400e..1377ebe9e9 100644 --- a/Documentation/hacking.texi +++ b/Documentation/hacking.texi @@ -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 @}; diff --git a/Documentation/index.texi b/Documentation/index.texi index bdc4f52267..16bdae85a3 100644 --- a/Documentation/index.texi +++ b/Documentation/index.texi @@ -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} diff --git a/Documentation/regression-test.tely b/Documentation/regression-test.tely index 63774881e4..a2d0289437 100644 --- a/Documentation/regression-test.tely +++ b/Documentation/regression-test.tely @@ -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 diff --git a/Documentation/topdocs/AUTHORS.texi b/Documentation/topdocs/AUTHORS.texi index c1fa015491..de250b805c 100644 --- a/Documentation/topdocs/AUTHORS.texi +++ b/Documentation/topdocs/AUTHORS.texi @@ -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 diff --git a/Documentation/topdocs/GNUmakefile b/Documentation/topdocs/GNUmakefile index 254c98a837..cfef864200 100644 --- a/Documentation/topdocs/GNUmakefile +++ b/Documentation/topdocs/GNUmakefile @@ -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)) diff --git a/Documentation/topdocs/INSTALL.texi b/Documentation/topdocs/INSTALL.texi index c414acdcc5..e76f50d0eb 100644 --- a/Documentation/topdocs/INSTALL.texi +++ b/Documentation/topdocs/INSTALL.texi @@ -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 diff --git a/Documentation/topdocs/index.tely b/Documentation/topdocs/index.tely index 41261c7836..5082a16de6 100644 --- a/Documentation/topdocs/index.tely +++ b/Documentation/topdocs/index.tely @@ -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 diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index 5fac94b489..98ee073466 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -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-mudela.itexi b/Documentation/user/convert-ly.itexi similarity index 68% rename from Documentation/user/convert-mudela.itexi rename to Documentation/user/convert-ly.itexi index 02b13d8f45..5c413c6227 100644 --- a/Documentation/user/convert-mudela.itexi +++ b/Documentation/user/convert-ly.itexi @@ -1,12 +1,12 @@ -@node convert-mudela, , ,Top -@chapter convert-mudela -@code{convert-mudela} sequentially applies different -mudela-conversions to upgrade a Mudela input file. It uses +@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-mudela [options] [files] + convert-ly [options] [files] @end example @section Options @@ -18,7 +18,7 @@ number. @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 + 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 @@ -28,7 +28,7 @@ number. Not all language changes are handled. Multiple output options won't work. -convert-mudela is written in python, so you have install +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/glossary.tely b/Documentation/user/glossary.tely index 484f9fa621..eb37c2d8ac 100644 --- a/Documentation/user/glossary.tely +++ b/Documentation/user/glossary.tely @@ -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'' { 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 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: s 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: s 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: , diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi index c0e8228338..14786887a3 100644 --- a/Documentation/user/invoking.itexi +++ b/Documentation/user/invoking.itexi @@ -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-mudela-example.latex b/Documentation/user/latex-lilypond-example.latex similarity index 58% rename from Documentation/user/latex-mudela-example.latex rename to Documentation/user/latex-lilypond-example.latex index 817a0f00e1..6906eab7e9 100644 --- a/Documentation/user/latex-mudela-example.latex +++ b/Documentation/user/latex-lilypond-example.latex @@ -12,98 +12,98 @@ \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. +used to test lilypond-book. View the source to see how it is done. A simple scale: -\begin{mudela} +\begin{lilypond} \score{ \notes\relative c'{c d e f g a b c} } -\end{mudela} +\end{lilypond} -Mudela-book search for the \verb|\score| command when it decides +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 mudela-book. +to use \verb|fragment| option, because the comment confuses lilypond-book. -\begin[fragment]{mudela} +\begin[fragment]{lilypond} c d e % \score -\end{mudela} +\end{lilypond} -There is also a shorthand version \verb|\mudela{c' e' g'}|: +There is also a shorthand version \verb|\lilypond{c' e' g'}|: -\mudela{c' e' g'} +\lilypond{c' e' g'} that is the same as writing \begin{verbatim} -\begin[eps]{mudela} +\begin[eps]{lilypond} c' e' g' -\end{mudela} +\end{lilypond} \end{verbatim} This C major -\begin[eps, 11pt]{mudela} +\begin[eps, 11pt]{lilypond} c' e' g' -\end{mudela} -and C minor \mudela[11pt]{c' es' g'} chords are floating inside the text. +\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 mudela-book: +does not confuse lilypond-book: -\verb|\begin{mudela}c d e\end{mudela}| +\verb|\begin{lilypond}c d e\end{lilypond}| Neither does a verbatim inside verb: -\verb|\begin{verbatim}\begin{mudela}c d e\end{mudela}\end{verbatim}| +\verb|\begin{verbatim}\begin{lilypond}c d e\end{lilypond}\end{verbatim}| or verb inside verbatim: \begin{verbatim} -\verb|\begin{mudela}c d e\end{mudela}| +\verb|\begin{lilypond}c d e\end{lilypond}| \end{verbatim} -But this is just to stress \verb|mudela-book|. What you need is: +But this is just to stress \verb|lilypond-book|. What you need is: -\verb|\mudela{c' d' e'}| +\verb|\lilypond{c' d' e'}| and \begin{verbatim} -\begin{mudela} +\begin{lilypond} c d e -\end{mudela} +\end{lilypond} \end{verbatim} \subsection{The 'verbatim' and 'intertext' option} This shows the verbatim option: -\begin[verbatim, intertext="gives this music:"]{mudela} +\begin[verbatim, intertext="gives this music:"]{lilypond} c' d' e' -\end{mudela} +\end{lilypond} \subsection{LaTeX comments} -This is a line with mudela code after the comment char % \mudela{} -% \mudela{} +This is a line with lilypond code after the comment char % \lilypond{} +% \lilypond{} 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 :-) +this line, then lilypond-book is handling latex comments pretty well :-) \subsection{To float or not to float} This music -\begin[eps]{mudela} +\begin[eps]{lilypond} c' e' -\end{mudela} +\end{lilypond} should be floating inside the text by using the \verb|eps| options. This music -\begin[eps]{mudela} +\begin[eps]{lilypond} c' e' -\end{mudela} +\end{lilypond} has also the \verb|eps| options, but is not floating because there -are an emptry line before and after the mudela block. That is +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. @@ -112,25 +112,25 @@ is not necessary when you want the music in a paragraph on its own. 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 +\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: \mudela[eps,11pt]{c' e' g'} }: +Tables\footnote{ and footnote: \lilypond[eps,11pt]{c' e' g'} }: \marginpar{ Yes, even as marginpar -\mudela[eps,11pt]{c' d' e'} } +\lilypond[eps,11pt]{c' d' e'} } \begin{tabular}{|l|l|r|} \hline \em Notes & \em Name \\ \hline -\mudela[11pt, filename="cdur"]{} & major \\ -\mudela[11pt]{} & minor \\ -\mudela[11pt]{} & diminished \\ -\mudela[11pt]{} & augmented \\ +\lilypond[11pt, filename="cdur"]{} & major \\ +\lilypond[11pt]{} & minor \\ +\lilypond[11pt]{} & diminished \\ +\lilypond[11pt]{} & augmented \\ \hline \end{tabular} @@ -140,9 +140,9 @@ 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} +\begin{lilypond} \score{ \notes\relative c'{ c d e f g a b c} } -\end{mudela} +\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 @@ -152,9 +152,9 @@ 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} +\begin{lilypond} \score{ \notes\relative c'{ c d e f g a b c} } -\end{mudela} +\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 diff --git a/Documentation/user/mudela-book.tely b/Documentation/user/lilypond-book.tely similarity index 75% rename from Documentation/user/mudela-book.tely rename to Documentation/user/lilypond-book.tely index ae77afe0d2..49fc1f8256 100644 --- a/Documentation/user/mudela-book.tely +++ b/Documentation/user/lilypond-book.tely @@ -1,10 +1,10 @@ \input texinfo @c -*-texinfo-*- -@setfilename mudela-book.info -@settitle mudela-book Manual +@setfilename lilypond-book.info +@settitle lilypond-book Manual @afourpaper @titlepage -@title mudela-book Manual -@subtitle Integrating mudela with La@TeX{} and TeXinfo +@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 @@ -68,7 +68,7 @@ translation approved by the Free Software Foundation. @end ifinfo @tex -\def\preMudelaExample{\vspace{0.5cm}} +\def\preLilypondExample{\vspace{0.5cm}} @end tex @contents @@ -85,14 +85,14 @@ 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 +@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{mudela-book} will do its best to try to align the music to +@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 @@ -103,20 +103,20 @@ La@TeX{} or texinfo. @section TeXinfo reference -Your markup the mudela code like this: +Your markup the lilypond code like this: @example -@@mudela[options, go, here] - YOUR MUDELA CODE -@@end mudela +@@lilypond[options, go, here] + YOUR LILYPOND CODE +@@end lilypond @end example or @example -@@mudela[option, go, here]@{ YOUR MUDELA CODE @} +@@lilypond[option, go, here]@{ YOUR LILYPOND CODE @} @end example -@command{mudela-book} knows the default margins, and a few papersizes. +@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} @@ -130,24 +130,24 @@ These commands should be in the beginning of the document: Two simple examples. First a complete block: @example -@@mudela[26pt] +@@lilypond[26pt] c' d' e' f' g'2 g' -@@end mudela +@@end lilypond @end example produces this music: -@mudela +@lilypond c' d' e' f' g'2 g' -@end mudela +@end lilypond Then the short version: @example -@@mudela[11pt]@{@} +@@lilypond[11pt]@{@} @end example and its music: -@mudela[11pt]{} +@lilypond[11pt]{} @subsection @@example and @@code @@ -155,38 +155,38 @@ and its music: 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 +@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{mudela-book}, should notice nothing special, except from +processed by @command{lilypond-book}, should notice nothing special, except from some block like this: @example -@@mudela +@@lilypond BLABLA -@@end mudela +@@end lilypond @end example or this: -@code{@@mudela@{ BLABLA @}} +@code{@@lilypond@{ BLABLA @}} -Anything other is a bug in @command{mudela-book}. +Anything other is a bug in @command{lilypond-book}. So to get this in the printed manual: @example -@@mudela[26pt] +@@lilypond[26pt] \relative c'@{c d e f g2 g@} -@@end mudela +@@end lilypond @end example you have to write this: @example @@example -@@@@mudela[26pt] +@@@@lilypond[26pt] \relative c'@@@{c d e f g2 g@@@} -@@@@end mudela +@@@@end lilypond @@end example @end example @@ -195,31 +195,31 @@ Simply explained, every '@{', '@}' and '@@' has to be written as '@@@{', @section La@TeX{} reference -Your markup the mudela code like this: +Your markup the lilypond code like this: @example -\begin[option, go, here]@{mudela@} - YOUR MUDELA CODE -\end@{mudela@} +\begin[option, go, here]@{lilypond@} + YOUR LILYPOND CODE +\end@{lilypond@} @end example or @example -\mudela@{ YOUR MUDELA CODE @} +\lilypond@{ YOUR LILYPOND CODE @} @end example The 'geometry' package is is not supported. The most popular papersizes should work. -Mudela-book know about the @code{\onecolumn} and +Lilypond-book know about the @code{\onecolumn} and @code{\twocolumn} commands. -The music will be surrounded by @code{\preMudelaExample} and -@code{\postMudelaExample}. The variables are +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, \MUDELA@{ ... @}, CHECK OUT WHY]} +YOU USE THE SHORT FORM, \LILYPOND@{ ... @}, CHECK OUT WHY]} @subsection @code{landscape} package There is some simple support for landscape paper format, and this @@ -228,7 +228,7 @@ 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} +there are more work that has to be done on @command{lilypond-book} first. This should work: @@ -244,25 +244,25 @@ BLA BLA BLA @subsection Examples @example -\begin[26pt]@{mudela@} +\begin[26pt]@{lilypond@} c' d' e' f' g'2 g'2 -\end@{mudela@} +\end@{lilypond@} @end example produces this music: -@mudela[26pt] +@lilypond[26pt] c' d' e' f' g'2 g'2 -@end mudela +@end lilypond Then the short version: @example -\mudela[11pt]@{@} +\lilypond[11pt]@{@} @end example and its music: -@mudela[11pt]{} +@lilypond[11pt]{} @subsection \begin@{verbatim@} and \verb|\verb| @@ -280,14 +280,14 @@ There work just as expected. Look at @file{mb-latex.tex} for details. 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: + the short version of the lilypond blocks: - @code{ @@mudela@{ CONTENTS @} } and @code{ \mudela@{ CONTENTS @} } + @code{ @@lilypond@{ CONTENTS @} } and @code{ \lilypond@{ 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 + 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 @@ -297,20 +297,20 @@ There work just as expected. Look at @file{mb-latex.tex} for details. 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. + 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{mudela-book} it will generate lots of small +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 && mudela-book ../yourfile.tex} +@code{cd out && lilypond-book ../yourfile.tex} -@code{mudela-book --outdir=out yourfile.tex} +@code{lilypond-book --outdir=out yourfile.tex} For latex input, the file to give to latex has ext @file{.latex}. @@ -322,7 +322,7 @@ 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 +GENERATED FILE, SO LILYPOND-BOOK CAN TEST IF THE FILE IT IS TO OVERWRITE IS GENERATED.]} @strong{About the input} @@ -331,15 +331,15 @@ If the file contains the ``block'' @example - \begin@{mudela@} + \begin@{lilypond@} CONTENTS - \end@{mudela@} + \end@{lilypond@} @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 +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. @@ -350,13 +350,13 @@ to whatever he wants. @item @option{-f}, @option{--format=} Specify the document type to process, @code{latex} or @code{texi}. - @command{mudela-book} usually figure out this automatically. + @command{lilypond-book} usually figure out this automatically. @item --default-music-fontsize=??pt - Set the fontsize to use for mudela if no fontsize is given + Set the fontsize to use for lilypond 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@} + Force all lilypond to use this fontsize, overriding options + given to \begin@{lilypond@} @item -I DIR, --include=DIR include path @item -M, --dependencies @@ -370,9 +370,9 @@ to whatever he wants. @item --read-lys don't write ly files. This way you can do @example - mudela-book file.tely - convert-mudela - mudela-book --read-lys + 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, @@ -387,7 +387,7 @@ to whatever he wants. -@command{mudela-book} is written in python 1.5, so you have to install +@command{lilypond-book} is written in python 1.5, so you have to install @uref{http://www.python.org,python}. @@ -408,7 +408,7 @@ Ignores almost all La@TeX{} commands that changes margins and linewidths. @ignore So what does this look like? Well, here is an example: -@mudela[veryverbatim, intertext="produces this music:"] +@lilypond[veryverbatim, intertext="produces this music:"] \score{ \notes\relative c'{ \time 5/8; @@ -418,13 +418,13 @@ So what does this look like? Well, here is an example: [f( a b d b a][f a b d] | )e2 } } -@end mudela +@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. Mudela-book will insert some code for you that defines the +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 @@ -443,7 +443,7 @@ 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:"] +@lilypond[veryverbatim, intertext="produces this music:"] \score{ \notes\relative c'{ \time 5/8; @@ -454,108 +454,108 @@ If you want to make the music not so wide, you can insert a } \paper{linewidth = 10.\cm;} } -@end mudela +@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 mudela block, @command{mudela-book} +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: -@mudela[veryverbatim, intertext="produce a well known harmonic progression:"] +@lilypond[veryverbatim, intertext="produce a well known harmonic progression:"] \context Voice { } -@end mudela +@end lilypond If you want to place music examples in the text, -@mudela[eps] +@lilypond[eps] \context Voice { } -@end mudela +@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 -@@mudela[eps] +@@lilypond[eps] \context Voice { } -@@end mudela +@@end lilypond @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] +lilypond source. This 5 cm long empty line, +@lilypond[eps] \score{ \notes{s} \paper{ linewidth = 5.\cm;} } -@end mudela +@end lilypond was created with this code: @example -@@mudela[eps] +@@lilypond[eps] \score@{ \notes@{s@} \paper@{ linewidth = 5.\cm;@} @} -@@end mudela +@@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 mudela +be no empty lines between the normal text and the lilypond environment. -You can also use @code{mudelafile} (on a separate line, FIXME), to +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{mudela-book}. The default 16pt fontsize is probably to big to be +@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 -@@mudela[13pt, eps] +@@lilypond[13pt, eps] -@@end mudela +@@end lilypond @end example The following options set the fontsize: @itemize @item @code{11pt} -@mudela[11pt, eps] +@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 mudela +@end lilypond @item @code{13pt} -@mudela[13pt, eps] +@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 mudela +@end lilypond @item @code{16pt} -@mudela[16pt, eps] +@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 mudela +@end lilypond @item @code{20pt} -@mudela[20pt, eps] +@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 mudela +@end lilypond @item @code{26pt} -@mudela[26pt, eps] +@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 mudela +@end lilypond @end itemize @@ -569,8 +569,8 @@ lines. @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 +@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 @@ -579,13 +579,13 @@ 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 +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 -mudela-book. You can place @code{eps} mudela in and marginspars just +lilypond-book. You can place @code{eps} lilypond in and marginspars just as any other included eps graphics. -@mudela +@lilypond \score{ \notes\relative c'{ \time 12/8; @@ -596,17 +596,17 @@ as any other included eps graphics. } \paper{linewidth = 7.\cm;} } -@end mudela +@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 mudela linewidth +the right marging if you set floatingfigure width and lilypond linewidth to the same value. The code looks like this: -@mudela[verbatim] +@lilypond[verbatim] \score{ \notes\relative c'{ \time 12/8; @@ -618,7 +618,7 @@ to the same value. The code looks like this: } \paper{linewidth = 7.\cm;} } -@end mudela +@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 @@ -626,7 +626,7 @@ 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}. +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 diff --git a/Documentation/user/lilypond.tely b/Documentation/user/lilypond.tely index 71a42333d1..b1a4a3a92c 100644 --- a/Documentation/user/lilypond.tely +++ b/Documentation/user/lilypond.tely @@ -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 diff --git a/Documentation/user/ly2dvi.texi b/Documentation/user/ly2dvi.texi index 89793cf696..94ac18a465 100644 --- a/Documentation/user/ly2dvi.texi +++ b/Documentation/user/ly2dvi.texi @@ -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/properties.itely b/Documentation/user/properties.itely index 6f7adf1c02..3689d3e7d9 100644 --- a/Documentation/user/properties.itely +++ b/Documentation/user/properties.itely @@ -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 diff --git a/Documentation/user/refman.itely b/Documentation/user/refman.itely index 77f40dfcd7..174e2d2217 100644 --- a/Documentation/user/refman.itely +++ b/Documentation/user/refman.itely @@ -52,15 +52,9 @@ @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) } -@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 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' ~ -@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 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 \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 \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 } -@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{ } @@ -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 { @@ -1999,12 +1993,12 @@ identify chord inversions: } > -@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 } > -@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 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 diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 2a6e64e63a..cc4b30e881 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -18,16 +18,16 @@ 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 @{ diff --git a/INSTALL.txt b/INSTALL.txt index cf0e511331..9a95ed6b0d 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -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 d004ba8d7b..6ecffd3ce9 100644 --- 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. diff --git a/configure b/configure index c79aba8915..1b953cd7cb 100755 --- 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 < 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 < 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 < 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 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 < #include @@ -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 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 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 < struct foo { static int baz; }; @@ -1962,7 +1963,7 @@ int main() { return foo::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 <&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 <&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 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 <&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 <&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 <&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 <&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 <&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 <&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 diff --git a/input/test/allfontstyle.ly b/input/test/allfontstyle.ly index f463eefda3..8c48cd1780 100644 --- a/input/test/allfontstyle.ly +++ b/input/test/allfontstyle.ly @@ -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 } diff --git a/input/test/beam-position.ly b/input/test/beam-position.ly index 940843afc5..a8f63a9de2 100644 --- a/input/test/beam-position.ly +++ b/input/test/beam-position.ly @@ -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] } diff --git a/input/test/chord-names.ly b/input/test/chord-names.ly index cccabf2568..1d029981a8 100644 --- a/input/test/chord-names.ly +++ b/input/test/chord-names.ly @@ -20,7 +20,7 @@ chord = \notes\transpose c''\chords{ \context Staff \chord > \paper{ - linewidth = -1.0; + \translator { \ChordNamesContext ChordName \push #'word-space = #1 diff --git a/input/test/collisions.ly b/input/test/collisions.ly index 6ae299fb0b..e2c3ce45f1 100644 --- a/input/test/collisions.ly +++ b/input/test/collisions.ly @@ -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 } > diff --git a/input/test/force-hshift.ly b/input/test/force-hshift.ly index 097ddc3812..715e9d580c 100644 --- a/input/test/force-hshift.ly +++ b/input/test/force-hshift.ly @@ -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 - } - + } \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 } > - } \paper { linewidth=-1.0; diff --git a/input/test/hshift.ly b/input/test/hshift.ly index be09c586ab..b9b011e87c 100644 --- a/input/test/hshift.ly +++ b/input/test/hshift.ly @@ -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 { } diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index d703831ed3..1ef88f13cc 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -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; diff --git a/lily/auto-change-iterator.cc b/lily/auto-change-iterator.cc index 605363c488..183c5fece4 100644 --- a/lily/auto-change-iterator.cc +++ b/lily/auto-change-iterator.cc @@ -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 (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); diff --git a/lily/auto-change-music.cc b/lily/auto-change-music.cc index c75cb9e605..71d134cb3c 100644 --- a/lily/auto-change-music.cc +++ b/lily/auto-change-music.cc @@ -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); } diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index 9240449235..dc2d162fc2 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -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" @@ -21,11 +18,6 @@ /* generate bars. Either user ("|:"), or default (new measure) - TODO - - - document this - - - document how barlines and line breaks interact. */ class Bar_engraver : public Engraver { diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index d79b545e41..84ff88a5dc 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -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); } } diff --git a/lily/change-iterator.cc b/lily/change-iterator.cc index d1fc2006f0..3bf8101690 100644 --- a/lily/change-iterator.cc +++ b/lily/change-iterator.cc @@ -83,3 +83,5 @@ Change_iterator::process (Moment m) } + +IMPLEMENT_CTOR_CALLBACK(Change_iterator); diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index aa5c6f27ee..50ece53329 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -58,7 +58,7 @@ void Chord_name_engraver::acknowledge_element (Score_element_info i) { if (Note_req* n = dynamic_cast (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 (m)) { - pitch_arr_.push (n->pitch_); + pitch_arr_.push (* unsmob_pitch (n->get_mus_property ("pitch"))); return true; } if (Tonic_req* t = dynamic_cast (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 diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index f21bcb3150..ee310fb044 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -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 (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; diff --git a/lily/chord-tremolo-iterator.cc b/lily/chord-tremolo-iterator.cc index 0f86e33d98..5ddad95983 100644 --- a/lily/chord-tremolo-iterator.cc +++ b/lily/chord-tremolo-iterator.cc @@ -20,7 +20,7 @@ void Chord_tremolo_iterator::construct_children () { Repeated_music * rep = dynamic_cast (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); + diff --git a/lily/chord.cc b/lily/chord.cc index 5cb2870461..26602a5e78 100644 --- a/lily/chord.cc +++ b/lily/chord.cc @@ -13,6 +13,11 @@ #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* add_arr_p, Arraysize (); 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* add_arr_p, Arraytop (); - p->accidental_i_--; + p->alteration_i_--; } /* @@ -92,7 +110,7 @@ to_chord (Musical_pitch tonic, Array* add_arr_p, Array* add_arr_p, Array 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 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 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 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* pitch_arr_p, Musical_pitch tonic p.transpose (q); // duh, c7 should mean 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 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 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 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* 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* 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* pitch_arr_p, int bass_i) // junk me Simultaneous_music * -get_chord (Musical_pitch tonic, - Array* add_arr_p, - Array* 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 add_arr_p; + Array 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 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); diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index 818e3544a0..b57a2cc4f4 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -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; diff --git a/lily/clef-item.cc b/lily/clef-item.cc index 1f6ac5627a..2ef28ba767 100644 --- a/lily/clef-item.cc +++ b/lily/clef-item.cc @@ -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) diff --git a/lily/command-request.cc b/lily/command-request.cc index 2f5f83b3f8..aef049e980 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -11,11 +11,6 @@ #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 (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); } } diff --git a/lily/context-specced-music.cc b/lily/context-specced-music.cc index cf3f520773..7e52caf957 100644 --- a/lily/context-specced-music.cc +++ b/lily/context-specced-music.cc @@ -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")); } + diff --git a/lily/custos-engraver.cc b/lily/custos-engraver.cc index 5f15194535..77e354d632 100644 --- a/lily/custos-engraver.cc +++ b/lily/custos-engraver.cc @@ -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 (info.req_l_)->pitch_); + Note_req * nr = dynamic_cast (info.req_l_); + if (nr) + pitches_.push (*unsmob_pitch (nr->get_mus_property ("pitch"))); } } } diff --git a/lily/duration.cc b/lily/duration.cc index 7710e4dcc0..163b849d2a 100644 --- a/lily/duration.cc +++ b/lily/duration.cc @@ -14,26 +14,9 @@ #include "string.hh" #include "moment.hh" #include "duration.hh" +#include "ly-smobs.icc" + -int -compare (Array* left, Array* 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 ("#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_; +} diff --git a/lily/folded-repeat-iterator.cc b/lily/folded-repeat-iterator.cc index ddc6e68839..71328c87d2 100644 --- a/lily/folded-repeat-iterator.cc +++ b/lily/folded-repeat-iterator.cc @@ -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); diff --git a/lily/grace-iterator.cc b/lily/grace-iterator.cc index c2459b310e..b0c89c9214 100644 --- a/lily/grace-iterator.cc +++ b/lily/grace-iterator.cc @@ -50,3 +50,5 @@ Grace_iterator::pending_moment () const return 0; } + +IMPLEMENT_CTOR_CALLBACK(Grace_iterator); diff --git a/lily/grace-music.cc b/lily/grace-music.cc index 532bd07aaf..a072d37a59 100644 --- a/lily/grace-music.cc +++ b/lily/grace-music.cc @@ -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); } diff --git a/lily/identifier.cc b/lily/identifier.cc index d46460f71b..28e450ac49 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -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); diff --git a/lily/include/auto-change-iterator.hh b/lily/include/auto-change-iterator.hh index ac3c8dbd6d..aba977192f 100644 --- a/lily/include/auto-change-iterator.hh +++ b/lily/include/auto-change-iterator.hh @@ -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: diff --git a/lily/include/change-iterator.hh b/lily/include/change-iterator.hh index 8714801b3f..929271bcdf 100644 --- a/lily/include/change-iterator.hh +++ b/lily/include/change-iterator.hh @@ -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); }; diff --git a/lily/include/chord-tremolo-iterator.hh b/lily/include/chord-tremolo-iterator.hh index 3f08463c36..3ac4d45cfd 100644 --- a/lily/include/chord-tremolo-iterator.hh +++ b/lily/include/chord-tremolo-iterator.hh @@ -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: diff --git a/lily/include/chord.hh b/lily/include/chord.hh index 561032eefb..98290e29c2 100644 --- a/lily/include/chord.hh +++ b/lily/include/chord.hh @@ -52,12 +52,12 @@ Chord to_chord (Array pitch_arr, Tonic_req* tonic_req, Inversion_ int compare (Chord*, Chord*); -Simultaneous_music *get_chord (Musical_pitch tonic, - Array* add_arr_p, - Array* 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); diff --git a/lily/include/command-request.hh b/lily/include/command-request.hh index 862ef287a3..2acf5d4ba1 100644 --- a/lily/include/command-request.hh +++ b/lily/include/command-request.hh @@ -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 diff --git a/lily/include/context-specced-music.hh b/lily/include/context-specced-music.hh index e6eb7c8b0f..0c293c8166 100644 --- a/lily/include/context-specced-music.hh +++ b/lily/include/context-specced-music.hh @@ -14,18 +14,9 @@ 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 */ diff --git a/lily/include/duration.hh b/lily/include/duration.hh index 3f352fccc2..54c4793fb8 100644 --- a/lily/include/duration.hh +++ b/lily/include/duration.hh @@ -11,38 +11,42 @@ #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*, Array*); +Duration*unsmob_duration(SCM); +// int compare (Array*, Array*); #endif // DURATION_HH diff --git a/lily/include/folded-repeat-iterator.hh b/lily/include/folded-repeat-iterator.hh index 6217df1bee..2dba3733c7 100644 --- a/lily/include/folded-repeat-iterator.hh +++ b/lily/include/folded-repeat-iterator.hh @@ -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 (); diff --git a/lily/include/grace-iterator.hh b/lily/include/grace-iterator.hh index 4806037d28..37c78b7b35 100644 --- a/lily/include/grace-iterator.hh +++ b/lily/include/grace-iterator.hh @@ -19,7 +19,7 @@ public: ~Grace_iterator (); virtual void construct_children () ; virtual void process (Moment); - + static SCM constructor_cxx_function; Moment pending_moment () const; }; diff --git a/lily/include/identifier.hh b/lily/include/identifier.hh index 7f87c08b8f..2a82889757 100644 --- a/lily/include/identifier.hh +++ b/lily/include/identifier.hh @@ -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); diff --git a/lily/include/lily-proto.hh b/lily/include/lily-proto.hh index b1673f79f1..5dea72d5b5 100644 --- a/lily/include/lily-proto.hh +++ b/lily/include/lily-proto.hh @@ -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; diff --git a/lily/include/lyric-combine-music-iterator.hh b/lily/include/lyric-combine-music-iterator.hh index 5d519abf66..0f200cad89 100644 --- a/lily/include/lyric-combine-music-iterator.hh +++ b/lily/include/lyric-combine-music-iterator.hh @@ -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; diff --git a/lily/include/main.hh b/lily/include/main.hh index 1adae59d0e..de6cf4f417 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -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 diff --git a/lily/include/moment.hh b/lily/include/moment.hh index 55a5c87a81..46628e211f 100644 --- a/lily/include/moment.hh +++ b/lily/include/moment.hh @@ -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 index f8d8e510ed..0000000000 --- a/lily/include/mudela-version.hh +++ /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 - -*/ - -#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 diff --git a/lily/include/music-iterator-ctor.hh b/lily/include/music-iterator-ctor.hh index 56fc3c03c2..9a99f59e6d 100644 --- a/lily/include/music-iterator-ctor.hh +++ b/lily/include/music-iterator-ctor.hh @@ -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 */ diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index 30dae48a33..39919db96b 100644 --- a/lily/include/music-iterator.hh +++ b/lily/include/music-iterator.hh @@ -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); + - + + diff --git a/lily/include/music-list.hh b/lily/include/music-list.hh index 6abf926c4d..63d39edc37 100644 --- a/lily/include/music-list.hh +++ b/lily/include/music-list.hh @@ -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 diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh index 6d77fbebdc..b19f89ca32 100644 --- a/lily/include/music-output-def.hh +++ b/lily/include/music-output-def.hh @@ -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 { diff --git a/lily/include/music-output.hh b/lily/include/music-output.hh index 9ff2f50790..9b4a046493 100644 --- a/lily/include/music-output.hh +++ b/lily/include/music-output.hh @@ -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 { diff --git a/lily/include/music-wrapper-iterator.hh b/lily/include/music-wrapper-iterator.hh index d7a346a566..3aec129825 100644 --- a/lily/include/music-wrapper-iterator.hh +++ b/lily/include/music-wrapper-iterator.hh @@ -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 (); diff --git a/lily/include/musical-pitch.hh b/lily/include/musical-pitch.hh index ed9f63857a..a78973b563 100644 --- a/lily/include/musical-pitch.hh +++ b/lily/include/musical-pitch.hh @@ -11,30 +11,40 @@ #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); diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 55aaebe5d6..f98b1bee86 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -21,12 +21,9 @@ */ 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 { diff --git a/lily/include/my-lily-lexer.hh b/lily/include/my-lily-lexer.hh index f731d0d545..a76957edf6 100644 --- a/lily/include/my-lily-lexer.hh +++ b/lily/include/my-lily-lexer.hh @@ -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: diff --git a/lily/include/note-column.hh b/lily/include/note-column.hh index 855d655cd6..65dd50c2ab 100644 --- a/lily/include/note-column.hh +++ b/lily/include/note-column.hh @@ -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*); diff --git a/lily/include/output-property-music-iterator.hh b/lily/include/output-property-music-iterator.hh index 6728324d3e..e7bd04a45a 100644 --- a/lily/include/output-property-music-iterator.hh +++ b/lily/include/output-property-music-iterator.hh @@ -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); diff --git a/lily/include/part-combine-music-iterator.hh b/lily/include/part-combine-music-iterator.hh index 32a6bc951c..61db1ad3ca 100644 --- a/lily/include/part-combine-music-iterator.hh +++ b/lily/include/part-combine-music-iterator.hh @@ -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 (); diff --git a/lily/include/property-iterator.hh b/lily/include/property-iterator.hh index cd8aace3f0..71b0441dd2 100644 --- a/lily/include/property-iterator.hh +++ b/lily/include/property-iterator.hh @@ -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 */ diff --git a/lily/include/repeated-music.hh b/lily/include/repeated-music.hh index beca7dc1d0..b222111fe4 100644 --- a/lily/include/repeated-music.hh +++ b/lily/include/repeated-music.hh @@ -33,13 +33,12 @@ 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); diff --git a/lily/include/request-chord-iterator.hh b/lily/include/request-chord-iterator.hh index 5d6602add1..204598bdd0 100644 --- a/lily/include/request-chord-iterator.hh +++ b/lily/include/request-chord-iterator.hh @@ -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&); diff --git a/lily/include/sequential-music-iterator.hh b/lily/include/sequential-music-iterator.hh index a2dee9359d..5da129b286 100644 --- a/lily/include/sequential-music-iterator.hh +++ b/lily/include/sequential-music-iterator.hh @@ -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 (); diff --git a/lily/include/simple-music-iterator.hh b/lily/include/simple-music-iterator.hh index 963eb0c616..d03601a6dc 100644 --- a/lily/include/simple-music-iterator.hh +++ b/lily/include/simple-music-iterator.hh @@ -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); diff --git a/lily/include/simultaneous-music-iterator.hh b/lily/include/simultaneous-music-iterator.hh index 1198a7dc84..9197129477 100644 --- a/lily/include/simultaneous-music-iterator.hh +++ b/lily/include/simultaneous-music-iterator.hh @@ -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_; diff --git a/lily/include/time-scaled-music-iterator.hh b/lily/include/time-scaled-music-iterator.hh index e18716adc9..c13e0bdbd6 100644 --- a/lily/include/time-scaled-music-iterator.hh +++ b/lily/include/time-scaled-music-iterator.hh @@ -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); diff --git a/lily/include/time-signature-performer.hh b/lily/include/time-signature-performer.hh index ef3d20bb27..5a827b54bc 100644 --- a/lily/include/time-signature-performer.hh +++ b/lily/include/time-signature-performer.hh @@ -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 diff --git a/lily/include/timing-translator.hh b/lily/include/timing-translator.hh index 579b158484..cc852ca5d7 100644 --- a/lily/include/timing-translator.hh +++ b/lily/include/timing-translator.hh @@ -17,10 +17,12 @@ class Timing_translator : public virtual Translator { + + SCM last_time_sig_; public: VIRTUAL_COPY_CONS(Translator); Timing_translator (); - Link_array 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 diff --git a/lily/include/unfolded-repeat-iterator.hh b/lily/include/unfolded-repeat-iterator.hh index 3aa3ceae32..a3c757a381 100644 --- a/lily/include/unfolded-repeat-iterator.hh +++ b/lily/include/unfolded-repeat-iterator.hh @@ -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 */ diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 46f4d3f656..5546180906 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -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)); diff --git a/lily/lexer.ll b/lily/lexer.ll index 208e703420..b1c3afab5d 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -38,9 +38,12 @@ #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 (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; diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index 91096bce8e..39dfa8c57e 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -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)) (); } diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 115a5d3a60..271b61606a 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -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); diff --git a/lily/local-key-item.cc b/lily/local-key-item.cc index 1b37fb22a3..5caf337451 100644 --- a/lily/local-key-item.cc +++ b/lily/local-key-item.cc @@ -15,43 +15,35 @@ #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); diff --git a/lily/lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc index 8ab8f2920a..72453e5659 100644 --- a/lily/lyric-combine-music-iterator.cc +++ b/lily/lyric-combine-music-iterator.cc @@ -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); diff --git a/lily/lyric-combine-music.cc b/lily/lyric-combine-music.cc index dbbbfab278..f474443bca 100644 --- a/lily/lyric-combine-music.cc +++ b/lily/lyric-combine-music.cc @@ -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); } diff --git a/lily/midi-def.cc b/lily/midi-def.cc index f5cbd2a952..685076461b 100644 --- a/lily/midi-def.cc +++ b/lily/midi-def.cc @@ -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()); } diff --git a/lily/moment.cc b/lily/moment.cc index ff21fb5ebf..7b92cdbdcc 100644 --- a/lily/moment.cc +++ b/lily/moment.cc @@ -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 (); } diff --git a/lily/music-iterator-ctor.cc b/lily/music-iterator-ctor.cc index 0af9158698..c599c57817 100644 --- a/lily/music-iterator-ctor.cc +++ b/lily/music-iterator-ctor.cc @@ -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; +} + + diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 08f454fae1..93de6c3e3b 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -11,25 +11,10 @@ */ #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 (m)) - p = new Music_wrapper_iterator; - else if (Repeated_music * n = dynamic_cast (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 (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); diff --git a/lily/music-list.cc b/lily/music-list.cc index 81eee92a02..1a1847783e 100644 --- a/lily/music-list.cc +++ b/lily/music-list.cc @@ -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 (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; } } diff --git a/lily/music-wrapper-iterator.cc b/lily/music-wrapper-iterator.cc index 132ba004d4..096eee3140 100644 --- a/lily/music-wrapper-iterator.cc +++ b/lily/music-wrapper-iterator.cc @@ -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); diff --git a/lily/music.cc b/lily/music.cc index 5cf0e78476..e12ea41ea5 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -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; } diff --git a/lily/musical-pitch.cc b/lily/musical-pitch.cc index 5a834db780..9a798b59e9 100644 --- a/lily/musical-pitch.cc +++ b/lily/musical-pitch.cc @@ -9,6 +9,7 @@ #include "musical-pitch.hh" #include "debug.hh" #include "main.hh" +#include "ly-smobs.icc" int compare (Array* left, Array* right) @@ -31,37 +32,35 @@ compare (Array* left, Array* 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 ("#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_; +} diff --git a/lily/musical-request.cc b/lily/musical-request.cc index 0e7ad15a80..15c881df04 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -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 (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 (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 diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index a44e3c6d45..14b22940d8 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -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; diff --git a/lily/note-column.cc b/lily/note-column.cc index dde7969295..10956eefbb 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -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) diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index ec47cb0442..414e2aedbb 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -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_ 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); } } diff --git a/lily/note-name-engraver.cc b/lily/note-name-engraver.cc index df2c487214..b5ce78e561 100644 --- a/lily/note-name-engraver.cc +++ b/lily/note-name-engraver.cc @@ -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()) { diff --git a/lily/note-performer.cc b/lily/note-performer.cc index 9433e8714c..946b604c00 100644 --- a/lily/note-performer.cc +++ b/lily/note-performer.cc @@ -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); diff --git a/lily/output-property-engraver.cc b/lily/output-property-engraver.cc index ad596bea3e..9f0338afe3 100644 --- a/lily/output-property-engraver.cc +++ b/lily/output-property-engraver.cc @@ -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; diff --git a/lily/output-property-music-iterator.cc b/lily/output-property-music-iterator.cc index f2376b6b8c..0cf119c3ea 100644 --- a/lily/output-property-music-iterator.cc +++ b/lily/output-property-music-iterator.cc @@ -23,3 +23,5 @@ Output_property_music_iterator::process (Moment m) skip (m); } + +IMPLEMENT_CTOR_CALLBACK(Output_property_music_iterator); diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index ec2cbab2c5..2c2f179019 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -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 ()); } diff --git a/lily/paper-score.cc b/lily/paper-score.cc index 2cc6685bf3..362dbbf3cd 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -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) diff --git a/lily/parser.yy b/lily/parser.yy index 6853bc91fd..8b1fd7b85b 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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 #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 *pitch_arr; + Link_array *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 exclamations questions +%type exclamations questions dots %token DIGIT -%token NOTENAME_PITCH -%token TONICNAME_PITCH -%token CHORDMODIFIER_PITCH -%token DURATION_IDENTIFIER +%token NOTENAME_PITCH +%token TONICNAME_PITCH +%token CHORDMODIFIER_PITCH +%token DURATION_IDENTIFIER %token IDENTIFIER @@ -211,14 +221,14 @@ yylex (YYSTYPE *s, void * v_l) %token REQUEST_IDENTIFIER %token MUSIC_IDENTIFIER TRANSLATOR_IDENTIFIER %token STRING_IDENTIFIER SCM_IDENTIFIER -%token DURATION RESTNAME +%token RESTNAME %token STRING %token SCM_T %token UNSIGNED %token REAL %type output_def -%type mudela_header mudela_header_body +%type lilypond_header lilypond_header_body %type open_request_parens close_request_parens open_request close_request %type request_with_dir request_that_take_dir verbose_request %type sub_quotes sup_quotes @@ -230,18 +240,18 @@ yylex (YYSTYPE *s, void * v_l) %type identifier_init -%type steno_duration optional_notemode_duration -%type entered_notemode_duration explicit_duration +%type steno_duration optional_notemode_duration +%type entered_notemode_duration explicit_duration %type pre_requests post_requests %type gen_text_def -%type steno_musical_pitch musical_pitch absolute_musical_pitch -%type steno_tonic_pitch +%type steno_musical_pitch musical_pitch absolute_musical_pitch +%type steno_tonic_pitch -%type chord_additions chord_subtractions chord_notes chord_step +%type chord_additions chord_subtractions chord_notes chord_step %type chord -%type chord_note chord_inversion chord_bass -%type duration_length +%type chord_note chord_inversion chord_bass +%type duration_length %type embedded_scm scalar %type 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; + $$ = 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; + $$ = 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; - $$->push (*$1); + $$ = gh_cons ($1, SCM_EOL); } | CHORDMODIFIER_PITCH { - $$ = new Array; - $$->push (*$1); + $$ = gh_cons ($1, SCM_EOL); } | CHORDMODIFIER_PITCH chord_note { /* Ugh. */ - $$ = new Array; - $$->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 (); } ; diff --git a/lily/part-combine-music-iterator.cc b/lily/part-combine-music-iterator.cc index 68e41dce09..1f813a7445 100644 --- a/lily/part-combine-music-iterator.cc +++ b/lily/part-combine-music-iterator.cc @@ -13,6 +13,30 @@ #include "music-sequence.hh" #include "warn.hh" + +/* + DOCUMENTME + */ +int +compare (Array const * left, Array 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 *pitches, A { Music *m = unsmob_music (gh_car (i)); if (Melodic_req *r = dynamic_cast (m)) - pitches->push (r->pitch_); + pitches->push (*unsmob_pitch (r->get_mus_property("pitch"))); if (Rhythmic_req *r = dynamic_cast (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); diff --git a/lily/part-combine-music.cc b/lily/part-combine-music.cc index 1375f8d06f..91c351fc02 100644 --- a/lily/part-combine-music.cc +++ b/lily/part-combine-music.cc @@ -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 diff --git a/lily/property-iterator.cc b/lily/property-iterator.cc index 3799ba0e2f..302f9752df 100644 --- a/lily/property-iterator.cc +++ b/lily/property-iterator.cc @@ -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); diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index 4cdd682761..6f2a0913be 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -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 (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 (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 (unsmob_music (m)); + Moment l = r->body_length_mom () + r->alternatives_length_mom (false); + return l.smobbed_copy (); +} diff --git a/lily/request-chord-iterator.cc b/lily/request-chord-iterator.cc index 79df69f6da..61efb38797 100644 --- a/lily/request-chord-iterator.cc +++ b/lily/request-chord-iterator.cc @@ -78,3 +78,5 @@ Request_chord_iterator::process (Moment m) } skip (m); } + +IMPLEMENT_CTOR_CALLBACK(Request_chord_iterator); diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index efb217c73e..090ded8527 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -80,11 +80,20 @@ Rest_collision::do_shift (Score_element *me, SCM elts) */ Link_array rests; Link_array 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); diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index c7cada9b3d..ead302fbb4 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -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); } diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 67801e884c..3bd5dd257b 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -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); diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc index 7260e3eb83..281b97c167 100644 --- a/lily/sequential-music-iterator.cc +++ b/lily/sequential-music-iterator.cc @@ -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); diff --git a/lily/simple-music-iterator.cc b/lily/simple-music-iterator.cc index 855ff70780..ed118ec11f 100644 --- a/lily/simple-music-iterator.cc +++ b/lily/simple-music-iterator.cc @@ -54,3 +54,5 @@ Simple_music_iterator::process (Moment m) skip (m); } + +IMPLEMENT_CTOR_CALLBACK(Simple_music_iterator); diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index 4cc8d0c316..791dbd6185 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -143,3 +143,5 @@ Simultaneous_music_iterator::try_music_in_children (Music *m) const } + +IMPLEMENT_CTOR_CALLBACK(Simultaneous_music_iterator); diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index d457007176..324c05cf2c 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -138,8 +138,8 @@ Spacing_engraver::do_pre_move_processing () Paper_column * sc = dynamic_cast (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); diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index caebede28b..c909039b50 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -58,8 +58,8 @@ Stem_engraver::acknowledge_element(Score_element_info i) if (Rhythmic_head::stem_l (h)) return; - Rhythmic_req * r = dynamic_cast (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); diff --git a/lily/stem.cc b/lily/stem.cc index 94ddf6ca93..46cc32163d 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -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! diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index bec3b7f0fa..277a4206e2 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -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 diff --git a/lily/tie-performer.cc b/lily/tie-performer.cc index f1088d4c8e..feb335d6e8 100644 --- a/lily/tie-performer.cc +++ b/lily/tie-performer.cc @@ -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 diff --git a/lily/time-scaled-music-iterator.cc b/lily/time-scaled-music-iterator.cc index f68a4d7d88..cea13bf68b 100644 --- a/lily/time-scaled-music-iterator.cc +++ b/lily/time-scaled-music-iterator.cc @@ -27,3 +27,5 @@ Time_scaled_music_iterator::process (Moment m) Music_wrapper_iterator::process (m); } + +IMPLEMENT_CTOR_CALLBACK(Time_scaled_music_iterator); diff --git a/lily/time-scaled-music.cc b/lily/time-scaled-music.cc index 75547b17b4..868cedf3c0 100644 --- a/lily/time-scaled-music.cc +++ b/lily/time-scaled-music.cc @@ -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); } diff --git a/lily/time-signature-performer.cc b/lily/time-signature-performer.cc index 4c2076fd00..8127dd940d 100644 --- a/lily/time-signature-performer.cc +++ b/lily/time-signature-performer.cc @@ -6,15 +6,34 @@ (c) 1997--2000 Jan Nieuwenhuizen */ -#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 (req_l)) - { - time_signature_req_l_ = t; - return true; - } - - return false; -} +ADD_THIS_TRANSLATOR (Time_signature_performer); diff --git a/lily/timing-engraver.cc b/lily/timing-engraver.cc index 05b4fbfc20..7643a2cfa7 100644 --- a/lily/timing-engraver.cc +++ b/lily/timing-engraver.cc @@ -19,11 +19,8 @@ */ 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 (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 () -{ -} + diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index 35455683e7..b130629ccd 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -22,37 +22,9 @@ bool Timing_translator::do_try_music (Music*r) { - if (Timing_req *t = dynamic_cast (r)) + if (dynamic_cast (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 (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 (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()); } diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index 044ba7e842..c8a6fd404d 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -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 (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; +} diff --git a/lilypond-mode.el b/lilypond-mode.el index 5f570c77fd..6e3de95f4d 100644 --- a/lilypond-mode.el +++ b/lilypond-mode.el @@ -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. diff --git a/ly/catalan.ly b/ly/catalan.ly index 1739ae0862..403494d2cb 100644 --- a/ly/catalan.ly +++ b/ly/catalan.ly @@ -18,55 +18,55 @@ % 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 )) ) diff --git a/ly/chord-modifiers.ly b/ly/chord-modifiers.ly index 673620ddf8..5c61876a88 100644 --- a/ly/chord-modifiers.ly +++ b/ly/chord-modifiers.ly @@ -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 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 )) ) diff --git a/ly/declarations-as.ly b/ly/declarations-as.ly index ac43481fab..c45df5aea2 100644 --- a/ly/declarations-as.ly +++ b/ly/declarations-as.ly @@ -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")) diff --git a/ly/declarations.ly b/ly/declarations.ly index b2781c3dd2..468fc57529 100644 --- a/ly/declarations.ly +++ b/ly/declarations.ly @@ -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" diff --git a/ly/deutsch.ly b/ly/deutsch.ly index 25f2f87431..4ac2fd4022 100644 --- a/ly/deutsch.ly +++ b/ly/deutsch.ly @@ -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 )) ) diff --git a/ly/english.ly b/ly/english.ly index 4f125fe764..0ce982f826 100644 --- a/ly/english.ly +++ b/ly/english.ly @@ -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"; diff --git a/ly/italiano.ly b/ly/italiano.ly index 4df74b22cc..3db0e86dbe 100644 --- a/ly/italiano.ly +++ b/ly/italiano.ly @@ -11,41 +11,41 @@ % contributed by Paolo Zuliani \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"; diff --git a/ly/midi.ly b/ly/midi.ly index b41614cc2b..f367eafe59 100644 --- a/ly/midi.ly +++ b/ly/midi.ly @@ -6,3 +6,4 @@ \include "performer.ly" % unfold_all = "1"; } + diff --git a/ly/nederlands.ly b/ly/nederlands.ly index dc8c4919e4..9d16eb3cbb 100644 --- a/ly/nederlands.ly +++ b/ly/nederlands.ly @@ -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 )) +) diff --git a/ly/norsk.ly b/ly/norsk.ly index 8af9f332a7..27214aaa2e 100644 --- a/ly/norsk.ly +++ b/ly/norsk.ly @@ -28,78 +28,78 @@ %} \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 )) ) diff --git a/ly/svenska.ly b/ly/svenska.ly index 09cfad936e..8fdb6abcc1 100644 --- a/ly/svenska.ly +++ b/ly/svenska.ly @@ -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"; diff --git a/make/generic-vars.make b/make/generic-vars.make index 3ad2d595d8..78a11c5c23 100644 --- a/make/generic-vars.make +++ b/make/generic-vars.make @@ -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/mudela-rules.make b/make/ly-rules.make similarity index 58% rename from make/mudela-rules.make rename to make/ly-rules.make index aa78b14c24..d7af4be24e 100644 --- a/make/mudela-rules.make +++ b/make/ly-rules.make @@ -5,19 +5,19 @@ 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)/ $< + 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)/mudela-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $< + 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)/mudela-book.py --outdir=$(outdir) --no-lily -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $< + 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) diff --git a/make/mudela-targets.make b/make/ly-targets.make similarity index 100% rename from make/mudela-targets.make rename to make/ly-targets.make diff --git a/make/mudela-vars.make b/make/ly-vars.make similarity index 100% rename from make/mudela-vars.make rename to make/ly-vars.make diff --git a/make/mutopia-targets.make b/make/mutopia-targets.make index a55109ab36..4a759813c5 100644 --- a/make/mutopia-targets.make +++ b/make/mutopia-targets.make @@ -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 diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 9aa271c1a4..db406f7cce 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -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 diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index 731458cd47..a984ef4172 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -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 diff --git a/ps/lilyponddefs.ps b/ps/lilyponddefs.ps index 768713c521..5f9a9f1451 100644 --- a/ps/lilyponddefs.ps +++ b/ps/lilyponddefs.ps @@ -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 diff --git a/scm/ascii-script.scm b/scm/ascii-script.scm index ea9bc54a30..ada96b4592 100644 --- a/scm/ascii-script.scm +++ b/scm/ascii-script.scm @@ -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") "")) diff --git a/scm/chord-names.scm b/scm/chord-names.scm index 1cac00d032..25ddef79a9 100644 --- a/scm/chord-names.scm +++ b/scm/chord-names.scm @@ -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 '( @@ -428,7 +429,7 @@ (list 'super (step->text-banter p)) (if (pair? (cdr from)) '((super "/")) - '())))))) + '())))))) ; nesting? to)) (if (and (pair? base-and-inversion) (or (car base-and-inversion) @@ -461,6 +462,14 @@ (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 @@ -472,6 +481,10 @@ ;(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)))) diff --git a/scm/element-descriptions.scm b/scm/element-descriptions.scm index 9adc6639cb..72c8e72edd 100644 --- a/scm/element-descriptions.scm +++ b/scm/element-descriptions.scm @@ -419,7 +419,8 @@ (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)) )) diff --git a/scm/font.scm b/scm/font.scm index e436fb4866..fec9446ef5 100644 --- a/scm/font.scm +++ b/scm/font.scm @@ -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) @@ -123,21 +122,24 @@ ((-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))) @@ -189,9 +191,7 @@ (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, @@ -215,8 +215,8 @@ ) ) -;; 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 @@ -226,9 +226,8 @@ ) )) - -;; 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) @@ -247,9 +246,10 @@ )) -;; 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)) ) @@ -287,9 +287,7 @@ ) ;; 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. @@ -342,15 +340,16 @@ 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)) -; ) - - +) diff --git a/scm/interface.scm b/scm/interface.scm index 767912916f..7a5683c887 100644 --- a/scm/interface.scm +++ b/scm/interface.scm @@ -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 diff --git a/scm/lily.scm b/scm/lily.scm index 6876a9cb65..0e664d2ebd 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -303,7 +303,7 @@ (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 @@ -579,7 +579,7 @@ (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") ) @@ -828,15 +828,15 @@ ) (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))) ) ) @@ -844,3 +844,36 @@ (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)) + ) + )) + diff --git a/scm/translator-description.scm b/scm/translator-description.scm index ee58d6ba18..5cad9dbf56 100644 --- a/scm/translator-description.scm +++ b/scm/translator-description.scm @@ -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? " diff --git a/scripts/GNUmakefile b/scripts/GNUmakefile index 816a4e5a44..93fed5a485 100644 --- a/scripts/GNUmakefile +++ b/scripts/GNUmakefile @@ -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) diff --git a/scripts/abc2ly.py b/scripts/abc2ly.py index 8d769e2c7a..b31a56bc3c 100644 --- a/scripts/abc2ly.py +++ b/scripts/abc2ly.py @@ -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-mudela.py b/scripts/convert-ly.py similarity index 97% rename from scripts/convert-mudela.py rename to scripts/convert-ly.py index 8d86614ddb..e974394f10 100644 --- a/scripts/convert-mudela.py +++ b/scripts/convert-ly.py @@ -1,6 +1,6 @@ #!@PYTHON@ -# convert-mudela.py -- convertor for mudela versions +# convert-lilypond.py -- convertor for lilypond versions # # source file of the GNU LilyPond music typesetter # @@ -13,7 +13,7 @@ # 0.2 # - rewrite in python -program_name = 'convert-mudela' +program_name = 'convert-ly' version = '@TOPLEVEL_VERSION@' import os @@ -24,8 +24,8 @@ import string import re import time -mudela_version_re_str = '\\\\version *\"(.*)\"' -mudela_version_re = re.compile(mudela_version_re_str) +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); @@ -36,7 +36,7 @@ def identify (): def usage (): sys.stdout.write ( r"""Usage: %s [OPTION]... [FILE]... -Try to convert to newer mudela-versions. The version number of the +Try to convert to newer lilypond-versions. The version number of the input is guessed by default from \version directive Options: @@ -92,9 +92,9 @@ def version_cmp (t1, t2): return t1[x] - t2[x] return 0 -def guess_mudela_version(filename): +def guess_lilypond_version(filename): s = gulp_file (filename) - m = mudela_version_re.search (s) + m = lilypond_version_re.search (s) if m: return m.group(1) else: @@ -592,8 +592,8 @@ def do_conversion (infile, from_version, outfile, to_version): 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) + if re.search (lilypond_version_re_str, str): + str = re.sub (lilypond_version_re_str,new_ver , str) else: str = new_ver + '\n' + str @@ -615,7 +615,7 @@ def do_one_file (infile_name): if __main__.from_version: from_version = __main__.from_version else: - guess = guess_mudela_version (infile_name) + guess = guess_lilypond_version (infile_name) if not guess: raise UnknownVersion() from_version = str_to_tuple (guess) diff --git a/scripts/mudela-book.py b/scripts/lilypond-book.py similarity index 88% rename from scripts/mudela-book.py rename to scripts/lilypond-book.py index d37806d3a9..07de5b75bd 100644 --- a/scripts/mudela-book.py +++ b/scripts/lilypond-book.py @@ -3,24 +3,24 @@ # 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 -# mudela-book will not touch them any more. The content of the +# 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 'mudela', 'mudela-file' and 'mudela-block'. +# 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 mudela-blocks because % is also the comment character +# 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 @@ -48,7 +48,7 @@ include_path = [os.getcwd()] g_here_dir = os.getcwd () g_dep_prefix = '' g_outdir = '' -g_force_mudela_fontsize = 0 +g_force_lilypond_fontsize = 0 g_read_lys = 0 g_do_pictures = 1 g_num_cols = 1 @@ -286,9 +286,9 @@ texi_linewidths = { 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'), + ('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'), @@ -304,31 +304,31 @@ option_definitions = [ # format specific strings, ie. regex-es for input, and % strings for output output_dict= { 'latex': { - 'output-mudela-fragment' : r"""\begin[eps,singleline,%s]{mudela} + 'output-lilypond-fragment' : r"""\begin[eps,singleline,%s]{lilypond} \context Staff < \context Voice{ %s } > -\end{mudela}""", - 'output-mudela':r"""\begin[%s]{mudela} +\end{lilypond}""", + 'output-lilypond':r"""\begin[%s]{lilypond} %s -\end{mudela}""", +\end{lilypond}""", 'output-verbatim': "\\begin{verbatim}%s\\end{verbatim}", - 'output-default-post': "\\def\postMudelaExample{}\n", - 'output-default-pre': "\\def\preMudelaExample{}\n", + 'output-default-post': "\\def\postLilypondExample{}\n", + 'output-default-pre': "\\def\preLilypondExample{}\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', + '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-mudela': """@mudela[%s] + 'texi' : {'output-lilypond': """@lilypond[%s] %s -@end mudela +@end lilypond """, - 'output-mudela-fragment': """@mudela[%s] + 'output-lilypond-fragment': """@lilypond[%s] \context Staff\context Voice{ %s } -@end mudela """, +@end lilypond """, 'pagebreak': None, 'output-verbatim': r"""@example %s @@ -372,11 +372,11 @@ re_dict = { 'preamble-end': r'(?P\\begin{document})', 'verbatim': r"(?s)(?P\\begin{verbatim}.*?\\end{verbatim})", 'verb': r"(?P\\verb(?P.).*?(?P=del))", - 'mudela-file': r'(?m)^[^%\n]*?(?P\\mudelafile(\[(?P.*?)\])?\{(?P.+)})', - 'mudela' : r'(?m)^[^%\n]*?(?P\\mudela(\[(?P.*?)\])?{(?P.*?)})', - 'mudela-block': r"(?sm)^[^%\n]*?(?P\\begin(\[(?P.*?)\])?{mudela}(?P.*?)\\end{mudela})", - 'def-post-re': r"\\def\\postMudelaExample", - 'def-pre-re': r"\\def\\preMudelaExample", + 'lilypond-file': r'(?m)^[^%\n]*?(?P\\lilypondfile(\[(?P.*?)\])?\{(?P.+)})', + 'lilypond' : r'(?m)^[^%\n]*?(?P\\lilypond(\[(?P.*?)\])?{(?P.*?)})', + 'lilypond-block': r"(?sm)^[^%\n]*?(?P\\begin(\[(?P.*?)\])?{lilypond}(?P.*?)\\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, @@ -392,9 +392,9 @@ re_dict = { 'landscape': no_match, 'verbatim': r"""(?s)(?P@example\s.*?@end example\s)""", 'verb': r"""(?P@code{.*?})""", - 'mudela-file': '(?m)^(?!@c)(?P@mudelafile(\[(?P.*?)\])?{(?P[^}]+)})', - 'mudela' : '(?m)^(?!@c)(?P@mudela(\[(?P.*?)\])?{(?P.*?)})', - 'mudela-block': r"""(?m)^(?!@c)(?P(?s)(?P@mudela(\[(?P.*?)\])?\s(?P.*?)@end mudela\s))""", + 'lilypond-file': '(?m)^(?!@c)(?P@lilypondfile(\[(?P.*?)\])?{(?P[^}]+)})', + 'lilypond' : '(?m)^(?!@c)(?P@lilypond(\[(?P.*?)\])?{(?P.*?)})', + 'lilypond-block': r"""(?m)^(?!@c)(?P(?s)(?P@lilypond(\[(?P.*?)\])?\s(?P.*?)@end lilypond\s))""", 'option-sep' : ', *', 'intertext': r',?\s*intertext=\".*?\"', 'multiline-comment': r"(?sm)^\s*(?!@c\s+)(?P@ignore\s.*?@end ignore)\s", @@ -448,13 +448,13 @@ def error (str): def compose_full_body (body, opts): - """Construct the mudela code to send to Lilypond. + """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_mudela_fontsize: - music_size = g_force_mudela_fontsize + if g_force_lilypond_fontsize: + music_size = g_force_lilypond_fontsize else: m = re.match ('([0-9]+)pt', o) if m: @@ -493,7 +493,7 @@ def compose_full_body (body, opts): optstring = string.join (opts, ' ') optstring = re.sub ('\n', ' ', optstring) body = r""" -%% Generated by mudela-book.py; options are %s %%ughUGH not original options +%% 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 @@ -648,29 +648,29 @@ def do_include_file(m): def do_input_file(m): return read_doc_file(m.group('filename')) -def make_mudela(m): +def make_lilypond(m): if m.group('options'): options = m.group('options') else: options = '' - return [('input', get_output('output-mudela-fragment') % + return [('input', get_output('output-lilypond-fragment') % (options, m.group('code')))] -def make_mudela_file(m): +def make_lilypond_file(m): if m.group('options'): options = m.group('options') else: options = '' - return [('input', get_output('output-mudela') % + return [('input', get_output('output-lilypond') % (options, find_file(m.group('filename'))))] -def make_mudela_block(m): +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 [('mudela', m.group('code'), options)] + return [('lilypond', m.group('code'), options)] def do_columns(m): if __main__.format != 'latex': @@ -736,7 +736,7 @@ def read_doc_file (filename): taken_file_names = {} -def schedule_mudela_block (chunk): +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 @@ -748,7 +748,7 @@ def schedule_mudela_block (chunk): """ (type, body, opts) = chunk - assert type == 'mudela' + assert type == 'lilypond' file_body = compose_full_body (body, opts) basename = `abs(hash (file_body))` for o in opts: @@ -801,14 +801,14 @@ def schedule_mudela_block (chunk): else: # format == 'texi' s = 'output-all' newbody = newbody + get_output(s) % {'fn': basename } - return ('mudela', newbody, opts, todo, basename) + return ('lilypond', newbody, opts, todo, basename) -def process_mudela_blocks(outname, chunks):#ugh rename +def process_lilypond_blocks(outname, chunks):#ugh rename newchunks = [] # Count sections/chapters. for c in chunks: - if c[0] == 'mudela': - c = schedule_mudela_block (c) + if c[0] == 'lilypond': + c = schedule_lilypond_block (c) elif c[0] == 'numcols': paperguru.m_num_cols = c[2] newchunks.append (c) @@ -839,7 +839,7 @@ def compile_all_files (chunks): png = [] for c in chunks: - if c[0] <> 'mudela': + if c[0] <> 'lilypond': continue base = c[4] exts = c[3] @@ -953,8 +953,8 @@ def options_help_str (opts): return str def help(): - sys.stdout.write("""Usage: mudela-book [options] FILE\n -Generate hybrid LaTeX input from Latex + mudela + 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)) @@ -982,7 +982,7 @@ def write_deps (fn, target): __main__.read_files = [] def identify(): - sys.stdout.write ('mudela-book (GNU LilyPond) %s\n' % program_version) + sys.stdout.write ('lilypond-book (GNU LilyPond) %s\n' % program_version) def print_version (): identify() @@ -1000,9 +1000,9 @@ def do_file(input_filename): 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, '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) @@ -1010,16 +1010,16 @@ def do_file(input_filename): #for c in chunks: print "c:", c; #sys.exit() scan_preamble(chunks) - chunks = process_mudela_blocks(my_outname, 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] == 'mudela' and 'eps' in c[2]: - body = re.sub (r"""\\mudelaepswidth{(.*?)}""", find_eps_dims, c[1]) - newchunks.append (('mudela', body)) + 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 @@ -1059,7 +1059,7 @@ for opt in options: elif o == '--outname' or o == '-o': if len(files) > 1: #HACK - sys.stderr.write("Mudela-book is confused by --outname on multiple files") + sys.stderr.write("Lilypond-book is confused by --outname on multiple files") sys.exit(1) outname = a elif o == '--help' or o == '-h': @@ -1070,14 +1070,14 @@ for opt in options: 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" + 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_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) + 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': diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index a6b4af0972..635932dc28 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -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/musedata2ly.py b/scripts/musedata2ly.py index ec139d467c..81bb7bcc9e 100644 --- a/scripts/musedata2ly.py +++ b/scripts/musedata2ly.py @@ -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')) diff --git a/tex/headers.tex b/tex/headers.tex index cd4bc70c60..4da5d07f1e 100644 --- a/tex/headers.tex +++ b/tex/headers.tex @@ -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} diff --git a/tex/lily-pdf-defs.tex b/tex/lily-pdf-defs.tex index 0c15069c38..5e91c0da92 100644 --- a/tex/lily-pdf-defs.tex +++ b/tex/lily-pdf-defs.tex @@ -215,12 +215,12 @@ \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 } diff --git a/tex/lily-ps-defs.tex b/tex/lily-ps-defs.tex index bfd4a8e40d..4f208653f2 100644 --- a/tex/lily-ps-defs.tex +++ b/tex/lily-ps-defs.tex @@ -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}% } } diff --git a/tex/lilypond-latex.tex b/tex/lilypond-latex.tex index e8a60fed86..1c7a3f5a3c 100644 --- a/tex/lilypond-latex.tex +++ b/tex/lilypond-latex.tex @@ -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 diff --git a/tex/lilypond-plaintex.tex b/tex/lilypond-plaintex.tex index 1e4fdec9f0..7dddb283b7 100644 --- a/tex/lilypond-plaintex.tex +++ b/tex/lilypond-plaintex.tex @@ -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 diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 997fabd85b..91477809e4 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -34,15 +34,15 @@ \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}}}}% diff --git a/tex/mudela-book.tex b/tex/mudela-book.tex index 7350eb5d40..41431b1329 100644 --- a/tex/mudela-book.tex +++ b/tex/mudela-book.tex @@ -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 diff --git a/tex/titledefs.tex b/tex/titledefs.tex index b6c9c7570b..8e0bd60b00 100644 --- a/tex/titledefs.tex +++ b/tex/titledefs.tex @@ -28,40 +28,40 @@ \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 -- 2.39.2