From 339ea28cd7e4f8a1c1ca7c1d4dfe803a3f4c03e6 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 19 Jul 1999 00:52:01 +0200 Subject: [PATCH] release: 1.1.62 --- ANNOUNCE-1.2 | 24 +- Documentation/faq.yo | 3 +- Documentation/man/convert-mudela.yo | 4 +- Documentation/man/mudela-book.yo | 3 +- Documentation/man/out/convert-mudela.1 | 4 +- Documentation/man/out/mudela-book.1 | 3 +- Documentation/tex/lilypond-regtest.doc | 51 ++- Documentation/tex/reference-manual.yo | 55 +++- NEWS | 48 ++- TODO | 181 ++++------ VERSION | 2 +- input/GNUmakefile | 2 +- input/bugs/auto-staff-switch.ly | 38 +++ input/denneboom.ly | 143 ++++++++ input/kortjakje.ly | 64 ---- input/part.ly | 38 --- input/pedal.ly | 52 --- input/rhythm.ly | 6 +- input/scales.ly | 95 ------ input/test/allfontstyle.ly | 10 + input/test/alphabet.ly | 124 ------- input/test/beam-position.sly | 2 +- input/test/beam-repeat.ly | 10 - input/test/beam-tremolo.ly | 8 - input/test/big-test.ly | 16 - input/test/denneboom.ly | 154 --------- input/test/find-fifths.ly | 10 - input/test/gourlay.ly | 14 +- input/test/grace-end.fly | 2 + input/test/grace.ly | 3 +- input/{keys.ly => test/keys2.ly} | 0 input/test/lyric-combine.ly | 40 +++ input/test/repeat-semifold.ly | 3 +- input/test/repeat-unfold.ly | 8 +- input/test/rhythm-lyric.ly | 12 - input/test/rhythm-melody.fly | 2 - input/test/rhythm.ly | 7 - input/test/{rhythmic.ly => rhythmic-staff.ly} | 0 input/{ => test}/scripts.ly | 0 input/test/size11.ly | 3 + input/test/size13.ly | 2 + input/test/size16.ly | 2 + input/test/size20.ly | 2 + input/test/size23.ly | 2 + input/test/size26.ly | 2 + input/test/slur-swap.ly | 20 -- input/test/spacing-tight.ly | 5 + input/test/staff-margin-partial.ly | 5 + input/test/unfold.ly | 10 - input/twinkle.ly | 92 +++--- lib/include/input.hh | 23 +- lib/include/source.hh | 2 +- lib/input.cc | 7 +- lily/afm.cc | 2 +- lily/align-note-column-engraver.cc | 2 +- lily/axis-group-element.cc | 2 +- lily/axis-group-spanner.cc | 4 +- lily/{break.cc => break-algorithm.cc} | 0 lily/break-align-item.cc | 9 +- lily/extender-engraver.cc | 72 ++-- ...-iterator.cc => folded-repeat-iterator.cc} | 18 +- lily/grace-iterator.cc | 5 - lily/grace-position-engraver.cc | 36 +- lily/hyphen-engraver.cc | 42 +-- lily/includable-lexer.cc | 4 + lily/include/afm.hh | 2 +- lily/include/extender-engraver.hh | 45 +-- lily/include/folded-repeat-iterator.hh | 1 + lily/include/font-metric.hh | 2 +- lily/include/grace-iterator.hh | 2 +- lily/include/hyphen-engraver.hh | 24 +- lily/include/line-of-score.hh | 2 +- lily/include/lyric-combine-music-iterator.hh | 37 +++ lily/include/lyric-combine-music.hh | 36 ++ lily/include/mudela-version.hh | 2 + lily/include/music-iterator.hh | 13 +- lily/include/music-list-iterator.hh | 32 -- lily/include/music-list.hh | 7 +- lily/include/music-wrapper-iterator.hh | 3 +- lily/include/music-wrapper.hh | 1 - lily/include/music.hh | 1 - lily/include/musical-request.hh | 24 ++ lily/include/new-repeated-music.hh | 1 - lily/include/note-head-side.hh | 1 + lily/include/note-heads-engraver.hh | 2 + lily/include/parseconstruct.hh | 1 + lily/include/re-rhythmed-music.hh | 27 -- lily/include/relative-music.hh | 1 - lily/include/request-chord-iterator.hh | 1 - lily/include/sequential-music-iterator.hh | 9 +- lily/include/simultaneous-music-iterator.hh | 7 +- lily/include/spanner.hh | 2 +- lily/include/tfm.hh | 2 +- lily/include/transposed-music.hh | 1 - lily/include/unfolded-repeat-iterator.hh | 2 + lily/lexer.ll | 46 ++- lily/lily-guile.cc | 28 +- lily/line-of-score.cc | 4 +- lily/lookup.cc | 2 +- lily/lyric-combine-music-iterator.cc | 109 ++++++ lily/lyric-combine-music.cc | 75 +++++ lily/main.cc | 2 +- lily/melisma-engraver.cc | 33 ++ lily/music-iterator.cc | 28 +- lily/music-list-iterator.cc | 52 --- lily/music-list.cc | 49 +-- lily/music-sequence.cc | 5 - lily/music-wrapper-iterator.cc | 9 +- lily/music-wrapper.cc | 5 - lily/music.cc | 5 - lily/musical-request.cc | 3 - lily/my-lily-lexer.cc | 3 +- lily/note-head-side.cc | 5 + lily/note-heads-engraver.cc | 16 +- lily/paper-def.cc | 15 +- lily/parser.yy | 155 ++++----- lily/re-rhythmed-music.cc | 41 --- lily/relative-octave-music.cc | 5 - lily/repeat-engraver.cc | 8 +- lily/repeated-music.cc | 10 - lily/request-chord-iterator.cc | 20 +- lily/scope.cc | 2 +- lily/sequential-music-iterator.cc | 69 ++-- lily/simultaneous-music-iterator.cc | 8 + lily/spacing-spanner.cc | 73 ++-- lily/spanner.cc | 75 ++--- lily/super-element.cc | 5 +- lily/tfm.cc | 2 +- lily/time-scaled-music-iterator.cc | 12 +- lily/transposed-music.cc | 5 - lily/unfolded-repeat-iterator.cc | 12 +- lily/volta-spanner.cc | 4 +- lily/word-wrap.cc | 6 +- ly/auto-beam-settings.ly | 1 + ly/declarations.ly | 7 +- ly/engraver.ly | 2 + ly/generic-paper.ly | 7 +- ly/paper11.ly | 16 +- ly/paper13.ly | 16 +- ly/paper16.ly | 7 +- ly/paper20.ly | 7 +- ly/paper23.ly | 32 ++ ly/paper26.ly | 22 +- ly/params.ly | 6 + ly/property.ly | 2 + make/out/lelievijver.lsm | 8 +- make/out/lilypond.lsm | 8 +- make/out/lilypond.spec | 4 +- mudela-mode.el | 2 +- mutopia/F.Schubert/GNUmakefile | 2 +- mutopia/F.Schubert/standchen.ly | 171 ++++++---- .../Cembalo-Partitas/Partita_II_Allemande.ly | 4 +- .../Cembalo-Partitas/Partita_II_Capriccio.ly | 2 +- .../Cembalo-Partitas/Partita_II_Sinfonia.ly | 26 +- mutopia/J.S.Bach/wtk1-fugue1.ly | 83 +++-- mutopia/J.S.Bach/wtk1-prelude1.ly | 43 +-- mutopia/J.S.Bach/wtk1-prelude2.ly.m4 | 84 ----- mutopia/los-toros-oboe.ly | 311 ------------------ ps/lilyponddefs.ps | 19 -- scm/lily.scm | 13 +- scripts/abc2ly.py | 10 +- scripts/convert-mudela.py | 4 +- scripts/mudela-book.py | 25 +- 163 files changed, 1668 insertions(+), 2187 deletions(-) create mode 100644 input/bugs/auto-staff-switch.ly create mode 100644 input/denneboom.ly delete mode 100644 input/kortjakje.ly delete mode 100644 input/part.ly delete mode 100644 input/pedal.ly delete mode 100644 input/scales.ly create mode 100644 input/test/allfontstyle.ly delete mode 100644 input/test/alphabet.ly delete mode 100644 input/test/beam-repeat.ly delete mode 100644 input/test/beam-tremolo.ly delete mode 100644 input/test/big-test.ly delete mode 100644 input/test/denneboom.ly delete mode 100644 input/test/find-fifths.ly create mode 100644 input/test/grace-end.fly rename input/{keys.ly => test/keys2.ly} (100%) create mode 100644 input/test/lyric-combine.ly delete mode 100644 input/test/rhythm-lyric.ly delete mode 100644 input/test/rhythm-melody.fly delete mode 100644 input/test/rhythm.ly rename input/test/{rhythmic.ly => rhythmic-staff.ly} (100%) rename input/{ => test}/scripts.ly (100%) create mode 100644 input/test/size11.ly create mode 100644 input/test/size13.ly create mode 100644 input/test/size16.ly create mode 100644 input/test/size20.ly create mode 100644 input/test/size23.ly create mode 100644 input/test/size26.ly delete mode 100644 input/test/slur-swap.ly create mode 100644 input/test/spacing-tight.ly create mode 100644 input/test/staff-margin-partial.ly delete mode 100644 input/test/unfold.ly rename lily/{break.cc => break-algorithm.cc} (100%) rename lily/{repeated-music-iterator.cc => folded-repeat-iterator.cc} (87%) create mode 100644 lily/include/lyric-combine-music-iterator.hh create mode 100644 lily/include/lyric-combine-music.hh delete mode 100644 lily/include/music-list-iterator.hh delete mode 100644 lily/include/re-rhythmed-music.hh create mode 100644 lily/lyric-combine-music-iterator.cc create mode 100644 lily/lyric-combine-music.cc create mode 100644 lily/melisma-engraver.cc delete mode 100644 lily/music-list-iterator.cc delete mode 100644 lily/re-rhythmed-music.cc create mode 100644 ly/paper23.ly delete mode 100644 mutopia/J.S.Bach/wtk1-prelude2.ly.m4 delete mode 100644 mutopia/los-toros-oboe.ly diff --git a/ANNOUNCE-1.2 b/ANNOUNCE-1.2 index 2ff73be073..f0246bb97a 100644 --- a/ANNOUNCE-1.2 +++ b/ANNOUNCE-1.2 @@ -10,8 +10,10 @@ GNU LilyPond - The Music Typesetter WHAT IS LilyPond? -LilyPond is the GNU Project music typesetter. It transforms a musical -description file into beautiful sheet music. +LilyPond is the GNU Project music typesetter. + +LilyPond produces beautiful sheet music using a high level description +file as input. BROWSE @@ -26,36 +28,36 @@ DOWNLOAD Sources for this project are on ftp://ftp.cs.uu.nl/~hanwen/lilypond/ (Europe) + ftp://ftp.gnu.org/ + +Prepackaged i386 and PPC packages for both Debian and RedHat GNU are +also available. -Prepackaged i386 and PPC for both Debian and RedHat are also -available. - WHAT'S NEW? * Large cleanups, enhanced design and GUILE integration for smaller memory footprint and more flexible code. -* Direct output to PostScript (optional), or as GUILE script. +* Direct output to PostScript (optional), PDFTeX or as GUILE script. * convertors for ABC and MUP formats. * Font: now available as scaleable PostScript. New glyphs: time signature, more note heads. -* Enhanced input: semi-automatic beaming, (nested) tuplets, (nested) - repeats, automatic staff switching, chordnames. +* Enhanced input: semi-automatic beaming, (nested) tuplets, (nested) + repeats, automatic staff switching, chordnames, automatic Lyrics + durations. * Grace notes, volta brackets, better spacing, multiple styles for note heads and time signatures, breathing signs, lyric extenders, cross staff beaming and slurring. - + * --safe option for the paranoid * More elegant spacing. Text is spaced exactly. -* The Mutopia archive is now a separate effort - * lots of bugfixes diff --git a/Documentation/faq.yo b/Documentation/faq.yo index 02fe4d64a1..e365332c99 100644 --- a/Documentation/faq.yo +++ b/Documentation/faq.yo @@ -426,13 +426,12 @@ verb( lilypond -fps foo.ly ) it() To view the file(.ps) output with GhostView, set GS_FONTPATH to the -directory containing the file(pfa)s, and set GS_LIB to the directory containing the file(.ps) library files of LilyPond. In the source tree, these are file(mf/out/) and file(ps/). +directory containing the file(pfa)s. In the source tree, this is file(mf/out/). i.e. do something like: verb( export GS_FONTPATH=$HOME/usr/src/lilypond/mf/out - export GS_LIB=$HOME/usr/src/lilypond/ps gv foo.ps & ) ) diff --git a/Documentation/man/convert-mudela.yo b/Documentation/man/convert-mudela.yo index 70b1222764..ea6cbe9b31 100644 --- a/Documentation/man/convert-mudela.yo +++ b/Documentation/man/convert-mudela.yo @@ -29,9 +29,9 @@ manpagesynopsis() manpageoptions() description( dit(--output) - The output file to write [FIXME, doesn't work] + The output file to write. dit(--edit) - Do an inline edit of the input file. override @samp{--output} + Do an inline edit of the input file. override code(--output) dit(--show-rules) shows all known conversions, and exit dit(--from=FROM_PATCHLEVEL) diff --git a/Documentation/man/mudela-book.yo b/Documentation/man/mudela-book.yo index 1c79800ae4..fbdd3787a1 100644 --- a/Documentation/man/mudela-book.yo +++ b/Documentation/man/mudela-book.yo @@ -75,7 +75,8 @@ dit(--outname=FILE) The name of LaTeX() file to output. If this option is not given, the output name derived from the input name. dit(--outdir=DIRECTORY) - The directory to output lilypond output and input to. + The name of the directory to output lilypond output and input to. + This must be a name; the subdirectory will be created in the cwd. [FIXME] dit(--help) Print a short help message dit(--dependencies) diff --git a/Documentation/man/out/convert-mudela.1 b/Documentation/man/out/convert-mudela.1 index a25b0aff25..13616a7bc4 100644 --- a/Documentation/man/out/convert-mudela.1 +++ b/Documentation/man/out/convert-mudela.1 @@ -18,9 +18,9 @@ convert-mudela [options] [files] .PP .SH "OPTIONS" .IP "--output" -The output file to write [FIXME, doesn\'t work] +The output file to write\&. .IP "--edit" -Do an inline edit of the input file\&. override @samp{--output} +Do an inline edit of the input file\&. override \f(CW--output\fP .IP "--show-rules" shows all known conversions, and exit .IP "--from=FROM_PATCHLEVEL" diff --git a/Documentation/man/out/mudela-book.1 b/Documentation/man/out/mudela-book.1 index 46d16ab7dc..0d9e0524d5 100644 --- a/Documentation/man/out/mudela-book.1 +++ b/Documentation/man/out/mudela-book.1 @@ -70,7 +70,8 @@ given to \ebegin{mudela} The name of file to output\&. If this option is not given, the output name derived from the input name\&. .IP "--outdir=DIRECTORY" -The directory to output lilypond output and input to\&. +The name of the directory to output lilypond output and input to\&. +This must be a name; the subdirectory will be created in the cwd\&. [FIXME] .IP "--help" Print a short help message .IP "--dependencies" diff --git a/Documentation/tex/lilypond-regtest.doc b/Documentation/tex/lilypond-regtest.doc index 6412e1827d..6c6cdc4796 100644 --- a/Documentation/tex/lilypond-regtest.doc +++ b/Documentation/tex/lilypond-regtest.doc @@ -6,9 +6,10 @@ \begin{document} \maketitle -This document tries give an brief overview of LilyPond features. When +This document tries give an brief overview of LilyPond features. When the text correspond with the shown notation, we consider LilyPond -Officially BugFree (tm). +Officially BugFree (tm). This document is intended for finding bugs, +and documenting bugfixes. \section{Notes and rests} @@ -148,6 +149,18 @@ Folded. This doesn't make sense without alternatives, but it works. \mudelafile{repeat-fold.ly} +\section{Lyrics} + +Lyrics can be set to a melody automatically. Excess lyrics will be +dumped. Lyrics will not be set over rests. You can have melismata by +setting a property melismaBusy. If you want a different order than +first Music, then Lyrics, you must precook a chord of staffs/lyrics +and label those. Of course \verb+\rhythm+ ignores any other rhythms +in the piece. Hyphens and extenders do not assume anything about +lyric lengths, so they continue to work. + +\mudelafile{lyric-combine.ly} + \section{Multiple notes} Rests should not collide with beams, stems and noteheads. Rests may @@ -177,6 +190,13 @@ effects. In this example, space for opposite pointed stems is adjusted \mudelafile{stem-spacing.sly} +Even if a line is very tightly spaced, there will still be room +between prefatory matter and the following notes. The same holds at +the end of line. + +\mudelafile{spacing-tight.ly} + + \section{Global stuff} Markings that are attached to (invisible) barlines are @@ -200,24 +220,41 @@ two measures all have the same distance from each other: \mudelafile{breathing-sign.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{size11.ly} + +\mudelafile{size13.ly} + +\mudelafile{size16.ly} + +\mudelafile{size20.ly} + +\mudelafile{size23.ly} + +\mudelafile{size26.ly} + \section{Clefs and Time Signatures} The transparent clef should not occupy any space and with style \texttt{fullSizeChanges}, the changing clef should be typeset in full size. For octaviated clefs, the ``8'' should appear closely above or -below the clef respectively. The ``8'' is processed in a rather -convoluted way, so this is fragile as well. +below the clef respectively. The ``8'' is processed in a convoluted +way, so this is fragile as well. \mudelafile{clefs.ly} +\def\bla#1{%the input file is too long and does not test for specific bugs By default, time signatures are written with two numbers. With style ``C'', 4/4 and 2/2 are written with their corresponding symbols and with style ``old'', 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and 9/8 are typeset with symbols, all other signatures retain the default layout. The style ``1'', gives single number signatures for all signatures. - -\mudelafile{time.fly} - +% +\mu delafile{time.fly} +} \end{document} diff --git a/Documentation/tex/reference-manual.yo b/Documentation/tex/reference-manual.yo index e1dd361566..4e5e209a0c 100644 --- a/Documentation/tex/reference-manual.yo +++ b/Documentation/tex/reference-manual.yo @@ -12,16 +12,6 @@ COMMENT( BUGS: - Causes segfault: - - \score{ - \notes{ \context Voice { - \repeat fold 2 { a b c d } {} - } - } - } - - restStyle=mensural doesn't seem to work (lots of characters not found for rests.fly) @@ -33,8 +23,6 @@ TODO: Is there a simple way to explain this, or is the behavior too complicated for a reasonable explanation? accordion symbols - interstaff beams (beam-interstaff.ly) - interstaff slurs (see preludes-1.ly) ) @@ -991,7 +979,6 @@ verb( END OF COMMENT ) - sect(Repeats) In order to specify repeats, use the code(\repeat) keyword. By @@ -1035,6 +1022,48 @@ mudela(fragment,verbatim)( }}) + +sect(Ambiguities) + +The grammar contains a number of ambiguities. We hope to resolve most +of them at a later time. + +itemize( +it() +The assignment +verb( +foo = bar) +COMMENT( + +)Can be interpreted as making a string identifier code(\foo) containing +code("foo"), or a music identifier containing the lyric lyric `foo'. + +Since this assignment is possible at top-level and within paper, these +are two conflicts. +it()The assignment +verb( foo = -6 +)Can be interpreted as making a int identifier containing -6, or a +request identifier containing the fingering `6' (with neutral direction). + +Since this assignment is possible at top-level and within paper, these +are two conflicts. +it() A chord followed by +code(-3) +can be interpreted as a chord substraction, or as the fingering `2' (with +neutral direction) +it() Similarly code(^2) is a conflict. + chord_addition '^' ->? +it() +If you do a nested repeat, +verb ( +\repeat ... + \repeat .. + \alternative + ) then it ambiguous to which code(\repeat) the code(\alternative) + belongs. This is the classic if-then-else dillema. It may be solved + by using braces. +) + sect(Keywords) Keywords sometimes appear alone, but usually they require arguments. diff --git a/NEWS b/NEWS index 11181c4da0..fbaecd7e79 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,49 @@ +pl 61.hwn2 + - revise / junk various input files. + - junk Music_list_iterator + - bf: declared paper + \shape + - bf: \shape and wordwrap + - Busy_playing_req () + - Music_iterator::try_music_in_children (), +so explicit \context Staff is often not needed for + * tuplets + * repeats + - automatic rest detection for \rhythm + - regtest tight-spacing.ly + - regtest lyric-combine.ly + - Melisma_playing_req, Melisma_engraver, Busy_playing_req: +stuff for syncing music & lyrics. + - simplify Extender_engraver, Hyphen_engraver. Assume lyrics come in from only one voice. + - docced ambiguities in grammar. + - mudela-book -I behavior, verbosity. + - state search path when file not found + +pl 61.hwn1 + - bf: \scm with --safe + - (ly-gulp-file) + - no need to set GS_LIBDIR, .ps files are inlined and directly +printable. + - bf: spacing engine + - fixed paper11/13/16/20/23/26.ly + - use (header-end) iso {ps,tex}setting + - bf: convert-mudela --output + - move \version check to lexer.ll + - moved repeated-music-iterator.cc to folded-repeat-iterator.cc + - bf: broken crescendi + - removed delayed Spanner breaking. + - new implementation of \rhythm: + * Lyric_combine_music + * Lyric_combine_music_iterator + * \property melismaBusy sets melisma state. + * (commented out in parser.yy -- solution is not good enough yet.) + - bf: record def spot of seq/sim music + - junk Music_iterator::next_music_l (), Music::to_rhythm () & friends. + - junk Re_rhythmed_music & friends + - mudela 1.1.62: \shape = -1 -2 -3; -> \shape -1, -2, -3; etc. + solves one ambiguity. + - grace notes at end of music don't crash Lily. + +******* pl 60.jcn2 - moved creation of $BUILDDIR/share/locale into set-lily.sh - slur slope change constraints when snapping @@ -5,7 +51,7 @@ pl 60.jcn2 - don't typeset unfinished (auto) beams pl 60.jbr1 - - Documentation/ntweb/angels.y,Documentation/ntweb/guile.patch: added + - Documentation/ntweb/angels.ly, Documentation/ntweb/guile.patch: added - Documentation/ntweb/GNUmakefile: add above to EXTRA_DIST_FILES pl 59.mb2 diff --git a/TODO b/TODO index e4b3b4ec17..7a9ca6eefe 100644 --- a/TODO +++ b/TODO @@ -9,133 +9,35 @@ Most of the items are marked in the code as well Grep for TODO and ugh/ugr/urg. .* TODO before 1.2 -. * rename 'staff_line_leading' (who is being lead where?) to -staff_space, interline; (or other meaningful name) and use throughout -lily - -[-> leading are the lead strips between the sticks (lines) of -typeface. ie. leading is vertical space --hwn] -. * Rewrite \rhythm to be during interpreting. -. * move \version check to lexer.ll -. * junk delayed spanner breaking. -. * core dump on broken (de)crescendo . * align left edge of broken (de)cresc/slur/tie/tuplet/volta -. * check dangling_scm_sym working. +. * auto-staff-switching. +. * broken examples: +mutopia/J.S.Bach/Petites-Preludes/preludes-paper.ly +mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly +mutopia/J.S.Bach/Solo-Cello-Suites/* +mutopia/Coriolan/* + . * spacing of accidentals . * key restorations & repeats -. * -So how do I do what I want to do? - -In Caro Mio Ben, bar 8, there's a syllable that starts on a note, and -ends on a pair of grace notes. Standard practice is to mark this with -a slur starting on the main note and ending on the grace note, so a -singer knows where to break the words. - -In bar 26, there's a \p marker that should appear below the grace -note. - -In bar 27, there's a crescendo that's supposed to start at the start -of the grace notes and extend to the note after the grace notes. - -How do I specify these? . * spanners from grace to normal ctxt -. * Glen: - -5. Sometimes lyrics extend past the right end of the staff. I guess that -this is a similar problem (if not another symptom of the same problem) as -one of the spacing bugs mentioned in the TODO. -. * 4. Lyrics and grace sections don't go too well together. - The words are aligned with the main note, not the start of the - grace note. This is usually wrong, but is sometimes right. -. * Auto_beam debugging output (waarom/wanneer heb jij die weggehaald?) -. * Rename illegal to invalid -. * Mats: - -- The Postscript output is still very experimental - -- It is impossible to typeset two textual scripts that are stacked - on top of eachother and avoids note collisions and at the same - time are typeset with different textStyle. I tried to move around - the text_engraver and other engravers between Voice and Thread - but the granularity is not fine enough, the scripts have to - share the same engraver in order to be get correct vertical - position but than they cannot have different style. - In my opinion, all scripts that share the same staff, should - be stacked vertically, avoiding collisions with the notes - in all voices. - -- I'd like to change the \repetitions command to Jan's suggested - syntax: \repeat "repeatsymbol" 2 {...}, but I'm not sure that - I understand the implementation of repeats well enough. - -- The paper11/13/26 files have to be updated. . * Grace_slur_engraver. -. * (gulp-file-to-str) for LilyPond +. * paperXX.ly \quartwidth, font setting not up to date. (Should read from AFM?) . * input/star-spangled-banner.ly: fold for lyrics? -. * don't create $srcdir/share/ . * Break_req handling is silly (break_forbid () + \break fucks up.) -. * hangOnClef with non-breakable clefs. . * account for accidentals in spacing. -. * collision of lyrics with span_bars. See star-spangled. -. * fix partial measures in meaningful way. -. * relative mode for midi2ly -. * -Crescendi/diminuendi that cross a line break lose their vertical -position and all end up above the top staff line, see the -following example. - ----------------- -\score{ - \context StaffGroup < - \context Staff=s1 \notes\relative c'{ - c d e f | - g f e d | \break %% If this break is removed, it works fine - c d e f |} - \context Staff=s2 \notes\relative c'{ - c \< d e f | - g f e d | - c d e \! f |} - > -} -. * uniformise recent feta contributions. -. * bigger and fatter 4/4 C -. * sort out directory stuff. -. * --prefix option? -. * -I option per filetype? -. * kpathsea? -. * ly2dvi/lilypond logfile. -. * fractional chord durs. -. * hang Item on Spanner -. * do --safe for PS output? -. * convert-mudela --output -. * Staff_margin (with a partial measure.) -. * fix convert-mudela manpage -. * decimal point in \paper {} -. * msgfmt -o check? -. * add new glyphs to font.ly -. * formatting of input stuff. -. * deps for ly2dvi . * indent = 0.0 with linewidth=-1.0 -. * collisions & accidentals. -. * music ending in grace notes. +. * \shape 1st dim skipped? . * PostScript . * half notes in pfa -. * didot / big point. -. * \shape 1st dim skipped? -. * turn slope-damping on/off . * We need feta-din*.mf files for more sizes than 10. . * fix dynamics decently, ie. use kerning & ligatures. -. * behavior of "that the obvious solution -\lyrics { foo1*4 __ _ }" is unintuitive. -. * Lyrics and scripts collide. -. * filenames : junk lily.x .* Cleanups needed . * \$ and $ identifier syntax in examples. . * Junk ghost positioning objects eg, Script leans on Staffside leans on Staff. - . * bracket ps code. +. * mudela-book. . * Key_engraver, Local_key_item . * Think of comprehensive solution for "if (grace_b == self_grace_b_)" . * Y dimension units: staffspace vs. Point @@ -145,6 +47,8 @@ following example. . * Duration . * clef engraver . * parser +. * Lookup::text -> needs to be TeX independent. +. * junk Music_iterator::first_b_ . * Bezier .* BUGS @@ -156,6 +60,38 @@ following example. > > .* STUFF +. *In Caro Mio Ben, bar 8, there's a syllable that starts on a note, and +ends on a pair of grace notes. Standard practice is to mark this with +a slur starting on the main note and ending on the grace note, so a +singer knows where to break the words. + +In bar 27, there's a crescendo that's supposed to start at the start +of the grace notes and extend to the note after the grace notes. +. * 5. Sometimes lyrics extend past the right end of the staff. I guess that +this is a similar problem (if not another symptom of the same problem) as +one of the spacing bugs mentioned in the TODO. +. * 4. Lyrics and grace sections don't go too well together. + The words are aligned with the main note, not the start of the + grace note. This is usually wrong, but is sometimes right. +. * decimal point in \paper {} +. * use melismaBusy in Lyric context to typeset melismata correctly. +. * ly2dvi/lilypond logfile. +. * hang Item on Spanner +. * do --safe for PS output? +. * msgfmt -o check? +. * collision of lyrics with span_bars. See star-spangled. +. * Auto_beam debugging output (waarom/wanneer heb jij die weggehaald?) +. * It is impossible to typeset two textual scripts that are stacked + on top of eachother and avoids note collisions and at the same + time are typeset with different textStyle. I tried to move around + the text_engraver and other engravers between Voice and Thread + but the granularity is not fine enough, the scripts have to + share the same engraver in order to be get correct vertical + position but than they cannot have different style. + In my opinion, all scripts that share the same staff, should + be stacked vertically, avoiding collisions with the notes + in all voices. + . * break priority setting from SCM. . * Matanya's tips: . * don't shorten stems/staffs closer to each other. @@ -175,13 +111,13 @@ following example. possible with lily? . * scm-ify \property values. . * make dependencies () a virtual function. +. * deprecate hangOnClef. . * Abstraction for engravers: -. * make "in-between" engraver (Tie, Extender) +. * make "in-between" engraver (Tie) . * make wide_spanner_engraver (line_group_spanner, staff_symbol) . * store req -> element, element -> element causes for warnings . * compulsory hshift -. * -My wish list for lyrics. I dream of a time when I will have enough time to +. * My wish list for lyrics. I dream of a time when I will have enough time to become familiar enough with the source code to be able to implement some of these myself, but I don't know when that will be, so I thought I'd "publish" my suggestions in case someone else is in a position to give them some @@ -212,7 +148,10 @@ repeated section with different words for each repeat. . * Give # lines in linebreaking. . * arrows on slurs. . * rewrite context defs using Scheme +. * junk TeX specifics from internal code. . * \selectmusic to cut pieces from music. +. * formatting of input stuff. +. * deps for ly2dvi . * TODO: merge atom & molecule; make tree from molecule. . * Align_element::padding ? . * typo checks on property names? @@ -221,11 +160,20 @@ repeated section with different words for each repeat. . * seriously buffer TeX output (do profile of writing .5 mb TeX file.) . * strip EXEs before installing . * zip target for binary windows dist (JBR) +. * fix partial measures in meaningful way. +. * uniformise recent feta contributions. +. * bigger and fatter 4/4 C +. * relative mode for midi2ly . * junking \skip req in lyrics . * midi2ly empty staffs. . * use Fourier transformation for rhythmic quantisation. . * horizontal centering of dynamics . * $DEPENDENCIES_OUTPUT support +. * turn slope-damping on/off +. * sort out directory stuff. +. * --prefix option? +. * -I option per filetype? +. * kpathsea? . * fix vertical alignment and stafflines . * declaring Performers . * *.yo: fix pod manpage layout legacy @@ -252,7 +200,16 @@ repeated section with different words for each repeat. . * fix variable define/lookup parser global<->paper . * fix title/instrument placements; see input/test/title.ly . * <\voiceone c4. \voicetwo c4> +. * I'd like to change the \repetitions command to Jan's suggested + syntax: \repeat "repeatsymbol" 2 {...}, but I'm not sure that + I understand the implementation of repeats well enough. . * add full cello suites to web site (kom op, Maarten!) +. * rename 'staff_line_leading' (who is being lead where?) to +staff_space, interline; (or other meaningful name) and use throughout +lily + +[-> leading are the lead strips between the sticks (lines) of +typeface. ie. leading is vertical space --hwn] . * add mudela-book-doc source to webstie. . * Rethink Time_description \cadenza , \meter, should all be \properties @@ -261,12 +218,14 @@ repeated section with different words for each repeat. . * abbreviation-beam -> (measured/unmeasured) tremolo . * partial -> anacrouse . * move paper vars into engraver properties +. * add new glyphs to font.ly . * check for groff / troff/ nroff et . * more intelligent file searching . * disable spaces in TeX stuff . * handle ^C for tmp/file creation. . * make LilyPond RPM fully relocatable . * better hshift (dots, distance, head dependent) +. * didot / big point. . * clefs (AG): The "8" should appear closer to the actual clef, touching it. . * put errorlevel in Input class diff --git a/VERSION b/VERSION index 19b7d79fb4..95b14773b2 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=1 -PATCH_LEVEL=61 +PATCH_LEVEL=62 MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a diff --git a/input/GNUmakefile b/input/GNUmakefile index e05e4d2664..8d34775dfe 100644 --- a/input/GNUmakefile +++ b/input/GNUmakefile @@ -4,7 +4,7 @@ depth = .. SUBDIRS=test bugs -examples=praeludium-fuga-E +examples=praeludium-fuga-E star-spangled-banner just-friends flexamples= LOCALSTEPMAKE_TEMPLATES=mutopia diff --git a/input/bugs/auto-staff-switch.ly b/input/bugs/auto-staff-switch.ly new file mode 100644 index 0000000000..ddf2b840be --- /dev/null +++ b/input/bugs/auto-staff-switch.ly @@ -0,0 +1,38 @@ + +\score { +\notes { + \context AutoSwitchGrandStaff \relative c' { + c8 d b a' a, f' g,4 ~ g + + } +} + +\paper { +\translator { \ScoreContext +\accepts AutoSwitchGrandStaff; +} +\translator{ + \type "Engraver_group_engraver"; + \name AutoSwitchGrandStaff; + \consists "Span_bar_engraver"; + \consists "Vertical_align_engraver"; + \consists "Piano_bar_engraver"; + \consistsend "Axis_group_engraver"; + minVerticalAlign = 2.*\staffheight; + maxVerticalAlign = 2.*\staffheight; + switcherName = "Voice"; + acceptorName = "Thread"; + staffContextName = "Staff"; + + \accepts "AutoSwitchContext"; + \accepts "Staff"; +} +\translator { + \type "Engraver_group_engraver"; + \name "AutoSwitchContext"; + \consists "Staff_switching_translator"; +} + +}} + +\version "1.1.52"; diff --git a/input/denneboom.ly b/input/denneboom.ly new file mode 100644 index 0000000000..0c3bd8770d --- /dev/null +++ b/input/denneboom.ly @@ -0,0 +1,143 @@ +\header{ +filename = "denneboom.ly"; +enteredby = "jcn"; +copyright = "public domain"; +TestedFeatures = "This file tests silly line shapes"; +} + +\include "paper20.ly" + +\version "1.1.52"; + +oden = \lyrics{ + O | + den- ne- boom, o | + den- ne- boom Wat | + zijn uw tak- ken | + won- der- schoon +} + +ikheb = \lyrics{ + Ik | + heb u laatst in_'t | + bos zien staan toen | + zat- en er geen | + kaars- jes aan +} + +ugloeit = \lyrics{ + U | + gloeit in bar- re | + win- ter- tijd, als | + sneeuw op aar- de | + licht ge- spreid +} + +oboom = \notes\transpose c''{ + g,8 | + c8. c16 c4. d8 | + e8. e16 e4. e8 | + d e f4 b, | + d8. c16 c4 r8 +} + +bos = \notes\transpose c''{ + g8 | + g e a4. g8 | + g8. f16 f4 r8 f8 | + f d g4. f8 | + f8. e16 e4 r8 +} + + +melody = \notes{ + \oboom + \oboom + \bos + \oboom +} + + +verse_one = \notes{ + \oden + \oden + \ikheb + \oden +} + +verse_one_staff = \context Lyrics = one + \verse_one + + +verse_two = \notes{ + \oden + \oden + \ugloeit + \oden +} + +verse_two_staff = \context Lyrics = two + \verse_two + + +denneboom_shape = \paper{ + \paper_twenty + indent = 20. \mm; + \shape 70. \mm, 20. \mm, + 65. \mm, 30. \mm, + 57.5 \mm, 45. \mm, + 50. \mm, 60. \mm, + 42.5 \mm, 75. \mm, + 35. \mm, 90. \mm, + 27.5 \mm, 105. \mm, + 20. \mm, 120. \mm, + 10. \mm, 140. \mm, + 65. \mm, 30. \mm + ; + gourlay_maxmeasures = 30.; +% uhuh, loop if you comment these in +% arithmetic_basicspace = 3.8; +% arithmetic_multiplier = 8.\pt; +} + +\score{ + \addlyrics + \context Staff { \time 3/4; \melody } + \context Lyrics \verse_one + \paper{ +% huh? +% \denneboom_shape + \paper_twenty + indent = 20. \mm; + \shape 70. \mm, 50. \mm, + 65. \mm, 30. \mm, + 57.5 \mm, 45. \mm, + 50. \mm, 60. \mm, + 42.5 \mm, 75. \mm, + 35. \mm, 90. \mm, + 27.5 \mm, 105. \mm, + 20. \mm, 120. \mm, + 10. \mm, 140. \mm, +% 65. \mm, 30. \mm, + 65. \mm, 40. \mm + ; + gourlay_maxmeasures = 30.; +% uhuh, loop if you comment these in + arithmetic_basicspace = 3.8; +% arithmetic_multiplier = 8.\pt; + arithmetic_multiplier = 7.5\pt; + casting_algorithm= \Wordwrap; + } + \midi{ \tempo 4 = 90; } +} + +%{ +\score{ + < + \melody_staff + \verse_two_staff + > + \paper{ \denneboom_shape } + \midi{ \tempo 4 = 90; } +} +%} diff --git a/input/kortjakje.ly b/input/kortjakje.ly deleted file mode 100644 index 9e06348b70..0000000000 --- a/input/kortjakje.ly +++ /dev/null @@ -1,64 +0,0 @@ -\header{ -filename = "kortjakje.ly"; -title = "Ah vous dirais-je maman (variations)"; -description = "bare bones version. (written down from memory :-)"; -composer = "Mozart KV 265"; -enteredby = "HWN"; -copyright = "public domain"; -} -%{ -Tested Features: example file with comments - -%} -\version "1.1.52"; - - -% the % is a comment. - - -% declare melody (which will be in *one* staff ) for the lead voice -melodie = \notes \relative c' { - % switch Lilypond in note-mode - \clef"violin"; - \time 2/4 ; - %%% theme - c4 c | % the | checks if there is a new measure here. - g' g| - a a| - - g2| % g2 means a "g-1" pitched half-note - f4 f| e e| d d| c2 - g'4 g| f f| e e| d d| g g| f f| e e| d d| - %%% var 1 - c4 r8 c % r8 means an 8th rest. - (| % start a slur - % NOTE: the slurstart should be directly after the note - ) % end a slur. - g'4 r8 g8 () a4 r8 a8 () g4 r4 - f4 r8 f8 () e4 r8 e8 (|) d4 r8 d8 () c4 r4 -} - - % more of this. -begeleiding = \notes \relative c { - \clef "bass"; - \time 2/4 ; - - %%% theme - c4 % before note means one octave lower. - % Similarly: after means one higher. - c' e c f c e c d b c a f g c,2 | - e'4 g, d' g, c g b g e' g, d' g, c g b g - %%%% var 1 - r8 e'8() c4 r8 e8() c4 r8 f8() c4 r8 e8() c4 - r8 d8() b4 r8 c8() a4 r8 a8() f4 r8 e8() c4 -} - -\score{ - \context GrandStaff < - \melodie - \begeleiding - > - \paper{} - \midi{} -} - diff --git a/input/part.ly b/input/part.ly deleted file mode 100644 index b07f963591..0000000000 --- a/input/part.ly +++ /dev/null @@ -1,38 +0,0 @@ -\version "1.1.52"; -part = \notes { - c-1 c c c - r1*3 - c4-5 c c c - c-6 c c c - c-7 c c c - c-8 c c c -} - -a4 = \paper{ - linewidth= 80.\mm; - \translator { - \StaffContext - - \consists "Bar_column_engraver"; - \consists "Bar_number_engraver"; - - } -} - -\score{ - < - \notes{ - \part - } - > - \paper{\a4} -} - -\score{ - < - \notes{ - \part - } - > - \paper{\a4} -} diff --git a/input/pedal.ly b/input/pedal.ly deleted file mode 100644 index 905715b6c9..0000000000 --- a/input/pedal.ly +++ /dev/null @@ -1,52 +0,0 @@ -% -% This file does not work. -% - -% pedal.ly -% -% Johann Sebastian Bach -% preludium en fuga in D -% bwv 532 -% -% fuga --- two bar excerpt of pedal part -% -% example for pedal studies - -% ugh, front and back priority are the same... -% one must use (ugh): -% left front: -% -\front-\l{toe,heel} -% left back: -% -\l{toe,heel}-\back -% rigth front: -% -\r{toe,heel}-\front -% right back: -% -\back-\r{toe,heel} - -% therefore: -% \lheel \ltoe \rheel \rtoe -% \lbheel \lbheel \lfheel \lftoe -% \rbheel \rbtoe \rfheel \rftoe - -\version "1.1.52"; - -\score{ - \notes { - \time 4/4; - \key D; - \clef bass; - % silly chord testing... -% these should be stacked... -% < c,-\ltoe e,-\lheel > < c'-\rtoe e'-\rheel> -% < c,-\lheel e,-\ltoe > < c'-\rheel e'-\rtoe> | - < c,-\ltoe-\lheel e, > < c'-\rtoe-\rheel e' > - < c,-\lheel-\ltoe e, > < c'-\rheel-\rtoe e' > | - % 46 - - [d16-\lfheel e-\rbtoe fis-\ltoe e-\rbtoe] - [d-\lfheel e-\rbtoe fis-\lheel e] [d e fis e] [d e fis e] | - d4 r4 r4 [b16-\rtoe a-\ltoe b-\rtoe fis-\ltoe] | - } - \paper{} -} - diff --git a/input/rhythm.ly b/input/rhythm.ly index 53198954a3..98af477f45 100644 --- a/input/rhythm.ly +++ b/input/rhythm.ly @@ -36,15 +36,11 @@ ritme = \notes\transpose c'' { another = - \notes{ \time 6/4; + \relative c'' \notes{ \time 6/4; c1. c1. \time 4/4;c4 c4 c4 c4 c1 c1 c1 } -% -% Beams are incorrect for the next staff. They cut through the whole notes. -% - yanother = \notes{ \time 4/4; c1 c1 c1 c4 c4 c4 c4 c1 c1 c1 diff --git a/input/scales.ly b/input/scales.ly deleted file mode 100644 index a4ea103048..0000000000 --- a/input/scales.ly +++ /dev/null @@ -1,95 +0,0 @@ -% -% This file prints lots of warning messages about scripts-dportato -% - -\header{ -filename = "scales.ly"; -enteredby = "HWN"; -copyright = "public domain"; -} - -%{ - Tested Features: scripts, beams, transposition, -%} - -% -% scales with accents. -% - -\version "1.1.52"; -blah = \notes { - \time 6/8; -\transpose c { - \clef "bass"; - c4. d -} - c d - \clef "violin" ; -\transpose c'' { - \transpose d { e f } } -\transpose c''' { - c4. d - %ugr - |\times 6/9 { [ a8 \< a a a a a a \! a a \ff \> ] } | } - \transpose c'' { - \times 6/9 { [ a a a a a a a a \! a ] } | } - \transpose c''' { - \times 6/9 { [ c,->-.-\fermata \< g,->-.-\fermata - d->-.-\fermata a->-.-\fermata - e'->-.-\fermata b'-. f''-. c'''->-.-\fermata - \! g'''->-.-\fermata \> ] } - - \times 6/9 { [ g'''->-.-\fermata c'''->-.-\fermata - f''->-.-\fermata b'->-.-\fermata e'->-.-\fermata - a->-.-\fermata d->-.-\fermata g,->-.-\fermata \! - c,->-.-\fermata ] } - - \times 6/9 { [ c,->-.-\fermata \< g,->-.-\fermata d->-.-\fermata - a->-.-\fermata - e'->-.-\fermata b'-. f''-. - c'''->-.-\fermata \! g'''->-.-\fermata \> ] } - \times 6/9 { [ g'''->-.-\fermata c'''->-.-\fermata - f''->-.-\fermata b'->-.-\fermata e'->-.-\fermata - a->-.-\fermata d->-.-\fermata - g,->-.-\fermata \! c,->-.-\fermata ] } - } - \transpose c'' { - \times 2/3 { [ c g d' ] } - \times 2/3 { [ d' g c ] } - \times 2/3 { [ f c' g' ] } - \times 2/3 { [ g' c' f ] } - } - \transpose c' { - \times 2/3 { [ c g d' ] } - \times 2/3 { [ d' g c ] } - \times 2/3 { [ f c' g' ] } - \times 2/3 { [ g' c' f ] } - \times 2/3 { [ g' c' f ] } - \time 4/4; - -c1} - - r8-"text" r8^. r8_. r8 r8 r8 r8 r8 - [c-> d-> e-> f->][g-> a-> b-> c'->] % 1 -\transpose c'' { [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]} - [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^] - [c-. d-. e-. f-.][g-. a-. b-. c'-.] - [c'-- b-- a-- g][f-- e-- d c--] % 5 - [c-\portato d-\portato e-\portato f-\portato] - [g-\portato a-\portato b-\portato c'-\portato] - [c'-\upbow b-\upbow a-\downbow g-\downbow] - [f-\downbow e-\downbow d-\upbow c-\upbow] - [c-| d-| e-| f-|][g-| a-| b-| c'-|] - [c' b a g][f e d c] - [c d e f][g a b c'] % 10 - |[c' b a g][f e d c] - - } - - -\score{ - \notes {\blah} - \paper{ - castingalgorithm = \Wordwrap; - } -} diff --git a/input/test/allfontstyle.ly b/input/test/allfontstyle.ly new file mode 100644 index 0000000000..0e995e64ab --- /dev/null +++ b/input/test/allfontstyle.ly @@ -0,0 +1,10 @@ + + + +\score { \notes + \relative c'' \context Staff { + \repeat "semi" 2 { \time 4/4; c4^"foo" } + \alternative { d-4 e-\fermata } \grace { c16 } f-\ff + } + \paper { linewidth = -1.0; } +} diff --git a/input/test/alphabet.ly b/input/test/alphabet.ly deleted file mode 100644 index 9d72e6a90a..0000000000 --- a/input/test/alphabet.ly +++ /dev/null @@ -1,124 +0,0 @@ -\score{ - < - \context Staff \notes{ - \skip 4*27; - \skip 4*27; - \skip 4*27; - \skip 4*27; - } - \context Lyrics \lyrics{ -aaaaaaaaaaaaaaaaaaa -xxx\break -bbbbbbbbbbbbbbbbbbb -xxx\break -ccccccccccccccccccc -xxx\break -ddddddddddddddddddd -xxx\break -eeeeeeeeeeeeeeeeeee -xxx\break -fffffffffffffffffff -xxx\break -ggggggggggggggggggg -xxx\break -hhhhhhhhhhhhhhhhhhh -xxx\break -iiiiiiiiiiiiiiiiiii -xxx\break -jjjjjjjjjjjjjjjjjjj -xxx\break -kkkkkkkkkkkkkkkkkkk -xxx\break -lllllllllllllllllll -xxx\break -mmmmmmmmmmmmmmmmmmm -xxx\break -nnnnnnnnnnnnnnnnnnn -xxx\break -ooooooooooooooooooo -xxx\break -ppppppppppppppppppp -xxx\break -qqqqqqqqqqqqqqqqqqq -xxx\break -rrrrrrrrrrrrrrrrrrr -xxx\break -sssssssssssssssssss -xxx\break -ttttttttttttttttttt -xxx\break -uuuuuuuuuuuuuuuuuuu -xxx\break -vvvvvvvvvvvvvvvvvvv -xxx\break -wwwwwwwwwwwwwwwwwww -xxx\break -xxxxxxxxxxxxxxxxxxx -xxx\break -yyyyyyyyyyyyyyyyyyy -xxx\break -zzzzzzzzzzzzzzzzzzz -xxx\break -................... -xxx\break -AAAAAAAAAAAAAAAAAAA -xxx\break -BBBBBBBBBBBBBBBBBBB -xxx\break -CCCCCCCCCCCCCCCCCCC -xxx\break -DDDDDDDDDDDDDDDDDDD -xxx\break -EEEEEEEEEEEEEEEEEEE -xxx\break -FFFFFFFFFFFFFFFFFFF -xxx\break -GGGGGGGGGGGGGGGGGGG -xxx\break -HHHHHHHHHHHHHHHHHHH -xxx\break -IIIIIIIIIIIIIIIIIII -xxx\break -JJJJJJJJJJJJJJJJJJJ -xxx\break -KKKKKKKKKKKKKKKKKKK -xxx\break -LLLLLLLLLLLLLLLLLLL -xxx\break -MMMMMMMMMMMMMMMMMMM -xxx\break -NNNNNNNNNNNNNNNNNNN -xxx\break -OOOOOOOOOOOOOOOOOOO -xxx\break -PPPPPPPPPPPPPPPPPPP -xxx\break -QQQQQQQQQQQQQQQQQQQ -xxx\break -RRRRRRRRRRRRRRRRRRR -xxx\break -SSSSSSSSSSSSSSSSSSS -xxx\break -TTTTTTTTTTTTTTTTTTT -xxx\break -UUUUUUUUUUUUUUUUUUU -xxx\break -VVVVVVVVVVVVVVVVVVV -xxx\break -WWWWWWWWWWWWWWWWWWW -xxx\break -XXXXXXXXXXXXXXXXXXX -xxx\break -YYYYYYYYYYYYYYYYYYY -xxx\break -ZZZZZZZZZZZZZZZZZZZ -xxx\break - } - > - \paper { - castingalgorithm = \Wordwrap; - linewidth = 40.\mm; - } -} - -\version "1.1.52"; diff --git a/input/test/beam-position.sly b/input/test/beam-position.sly index 8755ed44e5..0fe44dafa2 100644 --- a/input/test/beam-position.sly +++ b/input/test/beam-position.sly @@ -1 +1 @@ -[f8 f] \grace { f8 e8 } [f64 f] +[f8 f] \grace { [f8 e8] } [f64 f] diff --git a/input/test/beam-repeat.ly b/input/test/beam-repeat.ly deleted file mode 100644 index e1c5bf37da..0000000000 --- a/input/test/beam-repeat.ly +++ /dev/null @@ -1,10 +0,0 @@ -\score{ - \notes \relative c''{ - \time 2/4; - c8 - \repeat 2 { % \bar "|:" iknoort-i ook... - c8 c8 - } - c8 - } -} diff --git a/input/test/beam-tremolo.ly b/input/test/beam-tremolo.ly deleted file mode 100644 index f60c9c7e0e..0000000000 --- a/input/test/beam-tremolo.ly +++ /dev/null @@ -1,8 +0,0 @@ - - % broken. - [:32 c16 e] - [:32 c16 e] - [:16 c8 e] - [:16 e4 g] - [:16 e2 g] - [:16 e1 g] diff --git a/input/test/big-test.ly b/input/test/big-test.ly deleted file mode 100644 index 71e43baba5..0000000000 --- a/input/test/big-test.ly +++ /dev/null @@ -1,16 +0,0 @@ - -\score { -\notes \relative c { -\include "noteheadstyle.fly" -}\header { title = "notehead style"; } -} - -\score { -\notes \relative c { -\include "number-staff-lines.fly" -}\header { title = "number of staff lines"; } -} - -\include "bar-scripts.ly" - -\include "font20.ly" diff --git a/input/test/denneboom.ly b/input/test/denneboom.ly deleted file mode 100644 index 3579f8d3d6..0000000000 --- a/input/test/denneboom.ly +++ /dev/null @@ -1,154 +0,0 @@ -\header{ -filename = "denneboom.ly"; -enteredby = "jcn"; -copyright = "public domain"; -TestedFeatures = "This file tests silly line shapes"; -} - -\include "paper20.ly" - -\version "1.1.52"; - -oden = \lyrics{ - O8 | - den-8. ne-16 boom,4. o8 | - den-8. ne-16 boom.4. Wat8 | - zijn uw tak-4 ken | - won-8. der-16 schoon4 _8 -} - -ikheb = \lyrics{ - Ik8 | - heb u laatst4. in_'t8 | - bos8. zien16 staan4 _8 toen8 | - zat- en er4. geen8 | - kaars-8. jes16 aan.4 _8 -} - -ugloeit = \lyrics{ - U8 | - gloeit in bar-4. re8 | - win-8. ter-16 tijd,4 r8 als8 | - sneeuw op aar-4. de8 | - licht8. ge-16 spreid.4 _8 -} - -oboom = \notes\transpose c''{ - g,8 | - c8. c16 c4. d8 | - e8. e16 e4. e8 | - d e f4 b, | - d8. c16 c4 r8 -} - -bos = \notes\transpose c''{ - g8 | - g e a4. g8 | - g8. f16 f4 r8 f8 | - f d g4. f8 | - f8. e16 e4 r8 -} - -global = \notes{ - \time 3/4; - \partial 8; - \skip 4*48; - \bar "|."; -} -melody = \notes{ - \oboom - \oboom - \bos - \oboom -} - -$melody_staff = \context Staff = melody < - \global - \melody -> - -$verse_one = \notes{ - \oden - \oden - \ikheb - \oden -} - -$verse_one_staff = \context Lyrics = one < - \global - \$verse_one -> - -$verse_two = \notes{ - \oden - \oden - \ugloeit - \oden -} - -$verse_two_staff = \context Lyrics = two < - \global - \$verse_two -> - -$denneboom_shape = \paper{ - \paper_twenty - indent = 20. \mm; - \shape = 70. \mm 20. \mm - 65. \mm 30. \mm - 57.5 \mm 45. \mm - 50. \mm 60. \mm - 42.5 \mm 75. \mm - 35. \mm 90. \mm - 27.5 \mm 105. \mm - 20. \mm 120. \mm - 10. \mm 140. \mm - 65. \mm 30. \mm - ; - gourlay_maxmeasures = 30.; -% uhuh, loop if you comment these in -% arithmetic_basicspace = 3.8; -% arithmetic_multiplier = 8.\pt; -} - -\score{ - < - \$melody_staff - \$verse_one_staff - > - \paper{ -% huh? -% \$denneboom_shape - \paper_twenty - indent = 20. \mm; - \shape = 70. \mm 50. \mm - 65. \mm 30. \mm - 57.5 \mm 45. \mm - 50. \mm 60. \mm - 42.5 \mm 75. \mm - 35. \mm 90. \mm - 27.5 \mm 105. \mm - 20. \mm 120. \mm - 10. \mm 140. \mm -% 65. \mm 30. \mm - 65. \mm 40. \mm - ; - gourlay_maxmeasures = 30.; -% uhuh, loop if you comment these in - arithmetic_basicspace = 3.8; -% arithmetic_multiplier = 8.\pt; - arithmetic_multiplier = 7.5\pt; - } - \midi{ \tempo 4 = 90; } -} - -%{ -\score{ - < - \$melody_staff - \$verse_two_staff - > - \paper{ \$denneboom_shape } - \midi{ \tempo 4 = 90; } -} -%} diff --git a/input/test/find-fifths.ly b/input/test/find-fifths.ly deleted file mode 100644 index 8d88c31f39..0000000000 --- a/input/test/find-fifths.ly +++ /dev/null @@ -1,10 +0,0 @@ -\version "1.0.21"; - -\score{ - \notes \relative c { - c d c f c g c b, c g, c f, c c'' c -% run with find-quarts should suggest: -% c d c f c g' c, b c g c f, c' c'' c,, - } -} - diff --git a/input/test/gourlay.ly b/input/test/gourlay.ly index 0975b2d978..f04b4f961e 100644 --- a/input/test/gourlay.ly +++ b/input/test/gourlay.ly @@ -1,9 +1,3 @@ -\header{ -enteredby = "jcn"; -copyright = "PD"; -TestedFeatures = "This file tests some nasty Gourlay spacings"; -} - \version "1.1.52"; %{ @@ -13,12 +7,12 @@ This is taken from [Gourlay]'s paper on breaking lines %} \score{ - \notes \context Staff \transpose c''< - { \stemup d2 d | d d | d4 d2. | \break c1 } - \transpose c, { \stemdown g4 g g g | \times 2/3 { g2 g2 g2 } | g4. g8 g2 | c1 } + \notes \context Staff \relative c'' < + \context Voice = VA { \stemup d2 d | d d | d4 d2. | \break c1 } + \context Voice = VB { \stemdown g4 g g g | \times 2/3 { g2 g2 g2 } | g4. g8 g2 | c1 } > \paper{ - linewidth = 8.\cm + linewidth = 9.\cm; } } diff --git a/input/test/grace-end.fly b/input/test/grace-end.fly new file mode 100644 index 0000000000..14bcf26415 --- /dev/null +++ b/input/test/grace-end.fly @@ -0,0 +1,2 @@ + +c4 \grace { [d16 d16] } diff --git a/input/test/grace.ly b/input/test/grace.ly index 2f2f4a71e3..6c68d06e8f 100644 --- a/input/test/grace.ly +++ b/input/test/grace.ly @@ -5,7 +5,8 @@ \grace { [cis32 dis32] } e4 \grace { [c32 d] }\times 2/3 { [c8 c c] } \grace { [b32 ( c32] } ) c4 - \grace c16 [c8 c8] + \grace [c8 c8] +% \grace c16 [c8 c8] \grace { \property Grace.graceAlignPosition = \right c16} c4 } \paper {linewidth = -1.;} diff --git a/input/keys.ly b/input/test/keys2.ly similarity index 100% rename from input/keys.ly rename to input/test/keys2.ly diff --git a/input/test/lyric-combine.ly b/input/test/lyric-combine.ly new file mode 100644 index 0000000000..689cca5479 --- /dev/null +++ b/input/test/lyric-combine.ly @@ -0,0 +1,40 @@ +\header{ +filename = "twinkle-pop.ly"; +%title = "Ah, vous dirais-je, maman "; +description = "twinkle twinkle in pop-song-settings"; +composer = "traditional"; +enteredby = "HWN, chords by Johan Vromans"; +copyright = "public domain"; +} + +\version "1.1.52"; + +m =\notes \relative c'' { + \autoBeamOff + g4 r8 \times 2/3 { g'8 f e } r8 \grace { [d16 c b] } e4 + \melisma + d8.() c16 + \melismaEnd + b } + +noisebeat =\notes \relative c'' {g16 g g g } +noise = { \noisebeat \noisebeat \noisebeat \noisebeat \noisebeat \noisebeat } +textI = \lyrics { la2 __ la -- la __ la la la la la } +textII = \lyrics { da -- da __ da -- da da da da da } + +\score { + \notes < \context Staff = SA \m + \context Lyrics = LA { s1 } + \context Staff = SB { s1 } + \context Lyrics = LB { s1 } + \context Staff = SC \noise + + \addlyrics + \context Staff = SB \m + < \context Lyrics = LA \textI + \context Lyrics = LB \textII + > + + > +} + diff --git a/input/test/repeat-semifold.ly b/input/test/repeat-semifold.ly index 6baf4e60fd..346c5c8a56 100644 --- a/input/test/repeat-semifold.ly +++ b/input/test/repeat-semifold.ly @@ -1,6 +1,7 @@ % no alts. -\score { \notes\context Staff\relative c'' { +\score { \notes + \relative c'' { \repeat semi 3 { c^"3$\\times$ 0alt" d } % less alts than body \repeat semi 4 { c^"4$\\times$ 2alt" d } \alternative { e f } diff --git a/input/test/repeat-unfold.ly b/input/test/repeat-unfold.ly index 78c35be450..95faea394e 100644 --- a/input/test/repeat-unfold.ly +++ b/input/test/repeat-unfold.ly @@ -1,9 +1,9 @@ -\score { \notes\context Staff\relative c'' { -\repeat unfold 3 { c^"3$\\times$ 0alt" d } +\score { \notes\relative c'' { +\repeat unfold 3 { c^"3x 0a" d } % less alts than body -\repeat unfold 4 { c^"4$\\times$ 2alt" d } \alternative { e f } +\repeat unfold 4 { c^"4x 0a" d } \alternative { e f } % more alts than body -\repeat unfold 2 { c^"2$\\times$ 3alt" d } \alternative { e f g } +\repeat unfold 2 { c^"2x 3a" d } \alternative { e f g } }} diff --git a/input/test/rhythm-lyric.ly b/input/test/rhythm-lyric.ly deleted file mode 100644 index b9413ec88f..0000000000 --- a/input/test/rhythm-lyric.ly +++ /dev/null @@ -1,12 +0,0 @@ -text = \lyrics { Feel the rhy- thm } - -melody = \notes { - e4. d8 e4. c8 -} - -\score{ - < - \context Voice \notes\relative c'' \melody - \context Lyrics \rhythm \melody \text - > -} diff --git a/input/test/rhythm-melody.fly b/input/test/rhythm-melody.fly deleted file mode 100644 index 9ccd77a4bf..0000000000 --- a/input/test/rhythm-melody.fly +++ /dev/null @@ -1,2 +0,0 @@ -%\rhythm { 4. 8 8. 16 } { c'' d e f } -\rhythm { c4. c8 c8. c16 } { c'' d e f } diff --git a/input/test/rhythm.ly b/input/test/rhythm.ly deleted file mode 100644 index 4fe37cb585..0000000000 --- a/input/test/rhythm.ly +++ /dev/null @@ -1,7 +0,0 @@ -\score{ - \context Voice \notes\relative c''{ - % still thinking 'bout this - %c4. 8 4. 8 - c4. c8 c4. c8 - } -} diff --git a/input/test/rhythmic.ly b/input/test/rhythmic-staff.ly similarity index 100% rename from input/test/rhythmic.ly rename to input/test/rhythmic-staff.ly diff --git a/input/scripts.ly b/input/test/scripts.ly similarity index 100% rename from input/scripts.ly rename to input/test/scripts.ly diff --git a/input/test/size11.ly b/input/test/size11.ly new file mode 100644 index 0000000000..bdd2767227 --- /dev/null +++ b/input/test/size11.ly @@ -0,0 +1,3 @@ + +\include "paper11.ly" +\include "allfontstyle.ly"; diff --git a/input/test/size13.ly b/input/test/size13.ly new file mode 100644 index 0000000000..ac58c4dd65 --- /dev/null +++ b/input/test/size13.ly @@ -0,0 +1,2 @@ +\include "paper13.ly" +\include "allfontstyle.ly"; diff --git a/input/test/size16.ly b/input/test/size16.ly new file mode 100644 index 0000000000..69352ff59d --- /dev/null +++ b/input/test/size16.ly @@ -0,0 +1,2 @@ +\include "paper16.ly" +\include "allfontstyle.ly"; diff --git a/input/test/size20.ly b/input/test/size20.ly new file mode 100644 index 0000000000..d76a6cdb03 --- /dev/null +++ b/input/test/size20.ly @@ -0,0 +1,2 @@ +\include "paper20.ly" +\include "allfontstyle.ly"; diff --git a/input/test/size23.ly b/input/test/size23.ly new file mode 100644 index 0000000000..c5accc9f90 --- /dev/null +++ b/input/test/size23.ly @@ -0,0 +1,2 @@ +\include "paper23.ly" +\include "allfontstyle.ly"; diff --git a/input/test/size26.ly b/input/test/size26.ly new file mode 100644 index 0000000000..919c6e07cd --- /dev/null +++ b/input/test/size26.ly @@ -0,0 +1,2 @@ +\include "paper26.ly" +\include "allfontstyle.ly"; diff --git a/input/test/slur-swap.ly b/input/test/slur-swap.ly deleted file mode 100644 index ccd6dd0b3a..0000000000 --- a/input/test/slur-swap.ly +++ /dev/null @@ -1,20 +0,0 @@ -\version "1.1.52"; - -% urg, the direction of the slur gets swapped! -\score{ - \notes\relative c{ - \slurup - \stemup - [e'8( c' a b] - \stemdown - [e c a )e] \break - \stemup - [e8( c' a b] - \stemdown - [e c a )e] e1 - } - \paper{ - indent = 0.\mm - linewidth=80.\mm - } -} diff --git a/input/test/spacing-tight.ly b/input/test/spacing-tight.ly new file mode 100644 index 0000000000..93ae30563d --- /dev/null +++ b/input/test/spacing-tight.ly @@ -0,0 +1,5 @@ + +\score { + \notes { \time 2/2; c'2 c'2 \time 2/2; } + \paper { linewidth = 2.9\cm; } +} diff --git a/input/test/staff-margin-partial.ly b/input/test/staff-margin-partial.ly new file mode 100644 index 0000000000..d93efd28f7 --- /dev/null +++ b/input/test/staff-margin-partial.ly @@ -0,0 +1,5 @@ +% test staff margin with partial measure. +\score { +\notes { \property Staff.instrument = "foo" \partial 4; c4 c1 } +\paper { \translator { \StaffContext \consists Staff_margin_engraver; }} +} diff --git a/input/test/unfold.ly b/input/test/unfold.ly deleted file mode 100644 index 4664cfc09f..0000000000 --- a/input/test/unfold.ly +++ /dev/null @@ -1,10 +0,0 @@ -\score{ - \context Staff \notes\relative c'' { - % doesn't quite work yet - % \property Staff.unfoldRepeats = 1 - \repeat 3 { a b c d } - \alternative { { d c b a } { a b c d } } d d d d - } -} - -\version "1.0.16"; diff --git a/input/twinkle.ly b/input/twinkle.ly index 78a40f1a15..1f5c15fa1b 100644 --- a/input/twinkle.ly +++ b/input/twinkle.ly @@ -16,8 +16,7 @@ traditional song in various languages. %} %{ -Tested Features: lyrics, interleaving lyrics and staffs, repeats, - auto beaming, applying new rhythm on lyrics, hyphens +Tested Features: lyrics, interleaving lyrics and staffs, repeats %} \version "1.1.52"; @@ -53,12 +52,12 @@ global = \notes { } tekst = \lyrics{ - Al -- tijd is Kort -- jak -- je ziek, " " - midden "in de" week maar "'s zon" -- dags " " niet. - "'s Zon" -- dags gaat ze naar de kerk, " " - met een boek vol zil -- ver " " werk. " " - Al -- tijd is Kort -- jak -- je ziek, " " - midden "in de" week maar "'s zon" -- dags " " niet. + Al-4 tijd is Kort- jak- je ziek,2 + midden4 "in de" week maar "'s zon-" dags niet.2 + "'s Zon-"4 dags gaat ze naar de kerk,2 + met4 een boek vol zil- ver werk.2 + Al-4 tijd is Kort- jak- je ziek,2 + mid-8 den in de week4 maar "'s zon-" dags niet.2 } @@ -68,73 +67,64 @@ tekst. Mogen wij ook af en toe ergens op afgeven? %} hegedraagjetekst = \lyrics{ - Al -- tijd zuigt Bill Gates mijn piek, " " - "\TeX" is slecht -- ser dan mu -- " " ziek. - "'s Zon" -- dags gaat het door een raam, " " - Weet dat ik me er -- voor " " schaam. - Al -- tijd zuigt Bill Gates mijn piek, " " - "\TeX" is slecht -- ser dan mu -- " " ziek. + Al-4 tijd zuigt Bill Gates mijn piek,2 + "\TeX"4 is slecht- ser dan mu- ziek.2 + "'s Zon-"4 dags gaat het door een raam,2 + Weet4 dat ik me er- voor schaam.2 + Al-4 tijd zuigt Bill Gates mijn piek,2 + "\TeX"4 is slecht- ser dan mu- ziek.2 } texte = \lyrics{ \property Lyrics . textStyle" = "italic" % \property Lyrics . textStyle" = "roman" - Ah! vous dir -- ai -- je ma -- man " " - Ce qui cau -- se mon tour -- " " ment - Pa -- pa veut que je rai -- son -- ne - Comm' u -- ne gran -- de per -- " " son -- ne - Moi je dis que les bon -- bons " " - Va -- lent mieux que la rai -- " " son + Ah!4 vous dir- ai- je ma- man2 + Ce4 qui cau- se mon tour- ment2 + Pa-4 pa veut que je rai- son- ne + Comm' u- ne gran- de per- son- ne + Moi je dis que les bon- bons2 + Va-4 lent mieux que la rai- son2 } texti = \lyrics{ \property "Lyrics"."textStyle" = "roman" - Twin -- kle, twin -- kle, lit -- tle star, " " - How I won -- der what you " " are. - Up a -- bove the world so high, " " - Like a dia -- mond in the " " sky. " " - Twin -- kle, twin -- kle, lit -- tle star, " " - How I won -- der what you " " are! + Twin-4 kle, twin- kle, lit- tle star,2 + How4 I won- der what you are.2 + Up4 a- bove the world so high,2 + Like4 a dia- mond in the sky.2 + Twin-4 kle, twin- kle, lit- tle star,2 + How4 I won- der what you are!2 } textii = \lyrics{ - When the bla -- zing sun is gone, " " - When he no -- thing shines up -- " " on, - Then you show your lit -- tle light, " " - Twin -- kle, twin -- kle, all the " " night. " " - Twin -- kle, twin -- kle, lit -- tle star, " " - How I won -- der what you " " are! + When4 the bla- zing sun is gone,2 + When4 he no- thing shines up- on,2 + Then4 you show your lit- tle light,2 + Twin-4 kle, twin- kle, all the night.2 + Twin-4 kle, twin- kle, lit- tle star,2 + How4 I won- der what you are!2 + } textiii = \lyrics{ - Then the tra -- veler in the dark " " - Thanks you for your ti -- ny " " spark; - He could not see which way to go, - If you did not twin -- kle " " so. " " - Twin -- kle, twin -- kle, lit -- tle star, " " - How I won -- der what you " " are! + Then4 the tra- veler in the dark2 + Thanks4 you for your ti- ny spark;2 + He4 could not see which way8 to8 go,2 + If4 you did not twin- kle so.2 + Twin-4 kle, twin- kle, lit- tle star,2 + How4 I won- der what you are!2 } \score{ < \context Staff=i \repeat semi 2 < \global\melody > - \context Lyrics=top \context LyricVoice - \repeat fold 2 {} - \alternative { - \rhythm \melody \tekst - \rhythm \melody \texte - } + \context Lyrics=top \context LyricVoice \repeat fold 2 {} \alternative { \tekst \texte } \context GrandStaff < \context Staff=ii \repeat semi 2 < \global\melody > \context Staff=iii \repeat semi 2 < \global\accompany > > - \context Lyrics =bottom \context LyricVoice - \repeat fold 3 {} - \alternative { - \rhythm \melody \texti - \rhythm \melody \textii - \rhythm \melody \textiii - } + \context Lyrics =bottom \context LyricVoice \repeat fold 3 {} + \alternative { \texti \textii \textiii } > \paper{ gourlay_maxmeasures = 14.0; diff --git a/lib/include/input.hh b/lib/include/input.hh index efab145f99..a78daa8ef3 100644 --- a/lib/include/input.hh +++ b/lib/include/input.hh @@ -16,20 +16,19 @@ Base class for anything that records its poisition in the parse file. */ class Input { - char const *defined_ch_C_ ; - Source_file * source_file_l_; + char const *defined_ch_C_ ; + Source_file * source_file_l_; public: - void warning (String) const; // should use member func? - void non_fatal_error (String) const; - void error (String) const; - void message (String) const; - void set_spot (Input const &); - - String location_str () const; - Input (Source_file*, char const*); - Input (); - Input (Input const& ); + void warning (String) const; // should use member func? + void non_fatal_error (String) const; + void error (String) const; + void message (String) const; + void set_spot (Input const &); + Input spot () const; + String location_str () const; + Input (Source_file*, char const*); + Input (); }; #endif // INPUT_HH diff --git a/lib/include/source.hh b/lib/include/source.hh index 7de83441f3..711f453c05 100644 --- a/lib/include/source.hh +++ b/lib/include/source.hh @@ -26,8 +26,8 @@ public: void set_path (File_path*p_C); void set_binary (bool); -private: const File_path * path_C_; +private: Cons *sourcefile_p_list_; bool binary_b_ ; }; diff --git a/lib/input.cc b/lib/input.cc index 457ec5ebee..d159319a45 100644 --- a/lib/input.cc +++ b/lib/input.cc @@ -23,10 +23,10 @@ Input::Input () defined_ch_C_ = 0; } -Input::Input (Input const &s) +Input +Input::spot () const { - source_file_l_ = s.source_file_l_; - defined_ch_C_ = s.defined_ch_C_; + return *this; } void @@ -104,3 +104,4 @@ Input::location_str () const else return "(" + _ ("position unknown") + ")"; } + diff --git a/lily/afm.cc b/lily/afm.cc index 8ba8b9703f..db4f801101 100644 --- a/lily/afm.cc +++ b/lily/afm.cc @@ -135,7 +135,7 @@ Adobe_font_metric::find_char (String nm, bool warn) const } -Character_metric * +Character_metric const * Adobe_font_metric::get_char (int code, bool warn) const { return &find_ascii (code,warn); diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc index 70d08a62e1..ddb83af5f2 100644 --- a/lily/align-note-column-engraver.cc +++ b/lily/align-note-column-engraver.cc @@ -53,7 +53,7 @@ Align_note_column_engraver::do_removal_processing () Scalar al = get_property ("graceAlignPosition", 0); if (al.isdir_b ()) { - align_item_p_->notehead_align_dir_ = int (al); + align_item_p_->notehead_align_dir_ = Direction (int (al)); } typeset_element (align_item_p_); diff --git a/lily/axis-group-element.cc b/lily/axis-group-element.cc index a562b52d88..bda1a307f4 100644 --- a/lily/axis-group-element.cc +++ b/lily/axis-group-element.cc @@ -90,7 +90,7 @@ Interval Axis_group_element::extra_extent (Axis a )const { Interval g; - purge_extra (); + purge_extra (); // Yeah yeah, const correctness. for (int i=0; i < extra_elems_.size (); i++) { Interval ge = extra_elems_[i]->extent (a); diff --git a/lily/axis-group-spanner.cc b/lily/axis-group-spanner.cc index aed0954e47..71064ac8b4 100644 --- a/lily/axis-group-spanner.cc +++ b/lily/axis-group-spanner.cc @@ -78,9 +78,9 @@ Axis_group_spanner::do_break_processing() Item *it = dynamic_cast (elt) ; if (Spanner * sp =dynamic_cast (elt)) { - for (int j =0; j < sp->broken_info_.size(); j++) + for (int j =0; j < sp->broken_into_l_arr_.size(); j++) { - Line_of_score *l = sp->broken_info_[j].line_l_; + Line_of_score *l = sp->broken_into_l_arr_[j]->line_l (); Axis_group_spanner * my_broken_l = dynamic_cast(find_broken_piece (l)); diff --git a/lily/break.cc b/lily/break-algorithm.cc similarity index 100% rename from lily/break.cc rename to lily/break-algorithm.cc diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index 12aa5e08a0..3e1ba4e18c 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -101,14 +101,13 @@ Break_align_item::do_pre_processing() scm_set_car_x (first_pair, gh_double2scm (-dists[0])); elems[0]->set_elt_property (minimum_space_scm_sym, first_pair); - - Axis_align_item::do_pre_processing(); Real pre_space = elems[0]->extent (X_AXIS)[LEFT]; Real spring_len = elems.top ()->extent (X_AXIS)[RIGHT]; - Real stretch_distance =0.; + Real stretch_distance =0.; + if (SCM_CAR (symbol_list) == extra_space_scm_sym) { spring_len += dists.top (); @@ -120,7 +119,6 @@ Break_align_item::do_pre_processing() stretch_distance = spring_len; } - /* Hint the spacing engine how much space to put in. */ @@ -129,7 +127,8 @@ Break_align_item::do_pre_processing() gh_double2scm (spring_len))); column_l ()->set_elt_property (stretch_distance_scm_sym, - gh_double2scm (stretch_distance)); + gh_cons (gh_double2scm (dists[0]), + gh_double2scm (stretch_distance))); } diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index 7b6712be70..dd0b405bb1 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -1,7 +1,9 @@ /* extender-engraver.cc -- implement Extender_engraver - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1999 Glen Prideaux , + Han-Wen Nienhuys, Jan Nieuwenhuizen. + */ #include "proto.hh" @@ -10,11 +12,14 @@ #include "extender-spanner.hh" #include "score-column.hh" #include "text-item.hh" +#include "extender-engraver.hh" ADD_THIS_TRANSLATOR (Extender_engraver); Extender_engraver::Extender_engraver () { + current_lyric_l_ = 0; + last_lyric_l_ = 0; extender_spanner_p_ = 0; req_l_ = 0; } @@ -24,14 +29,7 @@ Extender_engraver::acknowledge_element (Score_element_info i) { if (Text_item* t = dynamic_cast (i.elem_l_)) { - Rhythmic_req * rh = dynamic_cast (i.req_l_); - if (!rh) - return; - - now_lyrics_.push (Text_lyric_tuple (t, rh, now_mom () + rh->length_mom ())); - /* - UGH. What do we do in case of multiple alternatives? - */ + current_lyric_l_ = t; if (extender_spanner_p_ && !extender_spanner_p_->spanned_drul_[RIGHT] ) @@ -43,9 +41,9 @@ Extender_engraver::acknowledge_element (Score_element_info i) bool -Extender_engraver::do_try_music (Music* req_l) +Extender_engraver::do_try_music (Music* r) { - if (Extender_req* p = dynamic_cast (req_l)) + if (Extender_req* p = dynamic_cast (r)) { if (req_l_) return false; @@ -69,24 +67,16 @@ Extender_engraver::do_removal_processing () void Extender_engraver::do_process_requests () { - Array stopped_texts; - Moment now = now_mom (); - - stopped_texts.clear (); - while (past_lyrics_pq_.size () - && past_lyrics_pq_.front ().end_ == now) - stopped_texts.push (past_lyrics_pq_.get ()); - if (req_l_) { - if (!stopped_texts.size ()) + if (!last_lyric_l_) { req_l_->warning ("Nothing to connect extender to on the left. Ignoring extender request"); return; } extender_spanner_p_ = new Extender_spanner; - extender_spanner_p_->set_textitem (LEFT, stopped_texts[0].text_l_); + extender_spanner_p_->set_textitem (LEFT, last_lyric_l_); announce_element (Score_element_info (extender_spanner_p_, req_l_)); } } @@ -95,47 +85,23 @@ Extender_engraver::do_process_requests () void Extender_engraver::do_pre_move_processing () { - for (int i=0; i < now_lyrics_.size (); i++) - { - past_lyrics_pq_.insert (now_lyrics_[i]); - } - now_lyrics_.clear (); - if (extender_spanner_p_) { typeset_element (extender_spanner_p_); extender_spanner_p_ = 0; } -} -void -Extender_engraver::do_post_move_processing () -{ - Moment now = now_mom (); - while (past_lyrics_pq_.size () && past_lyrics_pq_.front ().end_ < now) - past_lyrics_pq_.delmin (); - req_l_ =0; -} - -/**********************************************************************/ -Text_lyric_tuple::Text_lyric_tuple () -{ - text_l_ =0; - req_l_ =0; - end_ = 0; + if (current_lyric_l_) + { + last_lyric_l_ = current_lyric_l_; + current_lyric_l_ =0; + } } -Text_lyric_tuple::Text_lyric_tuple (Text_item *h, Rhythmic_req*m, Moment mom) +void +Extender_engraver::do_post_move_processing () { - text_l_ = h; - req_l_ = m; - end_ = mom; + req_l_ = 0; } -int -Text_lyric_tuple::time_compare (Text_lyric_tuple const&h1, - Text_lyric_tuple const &h2) -{ - return (h1.end_ - h2.end_ ).sign (); -} diff --git a/lily/repeated-music-iterator.cc b/lily/folded-repeat-iterator.cc similarity index 87% rename from lily/repeated-music-iterator.cc rename to lily/folded-repeat-iterator.cc index 03854fd5e0..ca1a2edc19 100644 --- a/lily/repeated-music-iterator.cc +++ b/lily/folded-repeat-iterator.cc @@ -59,13 +59,11 @@ Folded_repeat_iterator::do_process_and_next (Moment m) { if (!m) { - bool success = report_to_l ()->try_music (music_l_); + bool success = try_music (music_l_); if (!success) - music_l_->warning ( _("No one to print a volta bracket")); + music_l_->warning ( _("No one to print a repeat brace")); } - Repeated_music const * mus = dynamic_cast (music_l_); - if (main_iter_p_) { main_iter_p_->process_and_next (m); @@ -119,3 +117,15 @@ Folded_repeat_iterator::do_print () const #ifndef NPRINT #endif } + +Music_iterator* +Folded_repeat_iterator::try_music_in_children (Music const* m) const +{ + if (main_iter_p_) + { + return main_iter_p_->try_music (m); + } + if (alternative_iter_p_) + return alternative_iter_p_->try_music (m); + return 0; +} diff --git a/lily/grace-iterator.cc b/lily/grace-iterator.cc index b291cf29d7..b3c9cf9c5a 100644 --- a/lily/grace-iterator.cc +++ b/lily/grace-iterator.cc @@ -51,8 +51,3 @@ Grace_iterator::next_moment () const return 0; } -Music* -Grace_iterator::next_music_l () -{ - return 0; -} diff --git a/lily/grace-position-engraver.cc b/lily/grace-position-engraver.cc index 3d0295f017..d8dcb08257 100644 --- a/lily/grace-position-engraver.cc +++ b/lily/grace-position-engraver.cc @@ -11,14 +11,17 @@ #include "grace-align-item.hh" #include "note-head.hh" #include "local-key-item.hh" +#include "paper-column.hh" class Grace_position_engraver:public Engraver { + Paper_column *last_musical_col_l_; protected: VIRTUAL_COPY_CONS(Translator); virtual void acknowledge_element (Score_element_info); virtual void process_acknowledged (); virtual void do_post_move_processing (); + virtual void do_pre_move_processing (); Grace_align_item*align_l_; Link_array support_; public: @@ -29,6 +32,7 @@ public: Grace_position_engraver::Grace_position_engraver () { align_l_ =0; + last_musical_col_l_ =0; } void @@ -40,7 +44,8 @@ Grace_position_engraver::acknowledge_element (Score_element_info i) } else if (Note_head * n = dynamic_cast (i.elem_l_)) { - support_.push (n); + if (n->get_elt_property (grace_scm_sym) == SCM_BOOL_F) + support_.push (n); } else if (Local_key_item*it = dynamic_cast(i.elem_l_)) { @@ -62,6 +67,35 @@ Grace_position_engraver::process_acknowledged () } } +void +Grace_position_engraver::do_pre_move_processing () +{ + /* + We don't have support. Either some moron tried attaching us to a rest, + or we're at the end of the piece. In the latter case, we have a + problem if there are spanners in the grace section, + they will want to be broken into pieces (their line_l () field is nil). + + Solution: attach ourselves to the last musical column known. A little intricate. + + */ + if (align_l_ && !align_l_->supported_b ()) + { + Graphical_element * elt = align_l_->parent_l (X_AXIS); + if (elt) + return; + + warning (_("Unattached grace notes. Attaching to last musical column.")); + Axis_group_element * ae = dynamic_cast (elt); + if (ae) + ae->remove_element (align_l_); + else if (elt) + align_l_->dim_cache_[X_AXIS]->parent_l_ = 0; + last_musical_col_l_->add_element (align_l_); + } + last_musical_col_l_ = get_staff_info ().musical_pcol_l (); +} + void Grace_position_engraver::do_post_move_processing () { diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index 013c9620b6..4fccd9cb54 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -16,6 +16,8 @@ ADD_THIS_TRANSLATOR (Hyphen_engraver); Hyphen_engraver::Hyphen_engraver () { + current_lyric_l_ = 0; + last_lyric_l_ = 0; hyphen_spanner_p_ = 0; req_l_ = 0; } @@ -25,14 +27,7 @@ Hyphen_engraver::acknowledge_element (Score_element_info i) { if (Text_item* t = dynamic_cast (i.elem_l_)) { - Rhythmic_req * rh = dynamic_cast (i.req_l_); - if (!rh) - return; - - now_lyrics_.push (Text_lyric_tuple (t, rh, now_mom () + rh->length_mom ())); - /* - UGH. What do we do in case of multiple alternatives? - */ + current_lyric_l_ = t; if (hyphen_spanner_p_ && !hyphen_spanner_p_->spanned_drul_[RIGHT] ) @@ -70,24 +65,16 @@ Hyphen_engraver::do_removal_processing () void Hyphen_engraver::do_process_requests () { - Array stopped_texts; - Moment now = now_mom (); - - stopped_texts.clear (); - while (past_lyrics_pq_.size () - && past_lyrics_pq_.front ().end_ == now) - stopped_texts.push (past_lyrics_pq_.get ()); - if (req_l_) { - if (!stopped_texts.size ()) + if (!last_lyric_l_) { req_l_->warning ("Nothing to connect hyphen to on the left. Ignoring hyphen request"); return; } hyphen_spanner_p_ = new Hyphen_spanner; - hyphen_spanner_p_->set_textitem (LEFT, stopped_texts[0].text_l_); + hyphen_spanner_p_->set_textitem (LEFT, last_lyric_l_); announce_element (Score_element_info (hyphen_spanner_p_, req_l_)); } } @@ -96,26 +83,23 @@ Hyphen_engraver::do_process_requests () void Hyphen_engraver::do_pre_move_processing () { - for (int i=0; i < now_lyrics_.size (); i++) - { - past_lyrics_pq_.insert (now_lyrics_[i]); - } - now_lyrics_.clear (); - if (hyphen_spanner_p_) { typeset_element (hyphen_spanner_p_); hyphen_spanner_p_ = 0; } + + if (current_lyric_l_) + { + last_lyric_l_ = current_lyric_l_; + current_lyric_l_ =0; + } } + void Hyphen_engraver::do_post_move_processing () { - Moment now = now_mom (); - while (past_lyrics_pq_.size () && past_lyrics_pq_.front ().end_ < now) - past_lyrics_pq_.delmin (); - - req_l_ =0; + req_l_ = 0; } diff --git a/lily/includable-lexer.cc b/lily/includable-lexer.cc index 46e2f8826b..2adb810cd9 100644 --- a/lily/includable-lexer.cc +++ b/lily/includable-lexer.cc @@ -8,6 +8,8 @@ #include + +#include "file-path.hh" #include "includable-lexer.hh" #include "source-file.hh" #include "source.hh" @@ -43,7 +45,9 @@ Includable_lexer::new_input (String s, Sources * global_sources) if (!sl) { String msg = _f ("can't find file: `%s\'", s); + msg += _f ("\nSearch path is `%s'\n", global_sources->path_C_->str ().ch_C()); LexerError (msg.ch_C ()); + return; } filename_str_arr_.push (sl->name_str ()); diff --git a/lily/include/afm.hh b/lily/include/afm.hh index 757ed776ee..263deb8b62 100644 --- a/lily/include/afm.hh +++ b/lily/include/afm.hh @@ -55,7 +55,7 @@ struct Adobe_font_metric : Font_metric { Adobe_font_metric (); void read_char_metrics (Data_file &input, int size); - Character_metric *get_char (int, bool) const; + Character_metric const *get_char (int, bool) const; }; Adobe_font_metric read_afm_file (String fn); diff --git a/lily/include/extender-engraver.hh b/lily/include/extender-engraver.hh index 76f724c63a..28e9dadeb9 100644 --- a/lily/include/extender-engraver.hh +++ b/lily/include/extender-engraver.hh @@ -3,7 +3,8 @@ source file of the GNU LilyPond music typesetter - (c) 1998--1999 Jan Nieuwenhuizen + (c) 1999 Glen Prideaux , + Han-Wen Nienhuys, Jan Nieuwenhuizen. */ #ifndef EXTENDER_ENGRAVER_HH @@ -13,44 +14,24 @@ #include "drul-array.hh" #include "extender-spanner.hh" #include "pqueue.hh" - -struct Text_lyric_tuple { - Rhythmic_req *req_l_ ; - Text_item *text_l_; - Moment end_; - - Text_lyric_tuple (); - Text_lyric_tuple (Text_item*, Rhythmic_req*, Moment); - static int time_compare (Text_lyric_tuple const &, Text_lyric_tuple const &); -}; - -inline int compare (Text_lyric_tuple const &a, Text_lyric_tuple const &b) -{ - return Text_lyric_tuple::time_compare (a,b); -} - - +#include "extender-engraver.hh" /** - Generate an extender. Should make an Extender_spanner that typesets - a nice extender line. - - We remember all Text_items that come across, and store their - termination times. When we get a request, we create the spanner, and - attach the left point to the finished lyrics, and the right point to - any lyrics we receive by then. -*/ + Generate an centred extender. Should make a Extender_spanner that + typesets a nice centred extender of varying length depending on the + gap between syllables. + + We remember the last Text_item that come across. When we get a + request, we create the spanner, and attach the left point to the + last lyrics, and the right point to any lyrics we receive by + then. */ class Extender_engraver : public Engraver { - PQueue past_lyrics_pq_; - Array now_lyrics_; - Array stopped_lyrics_; - + Text_item * last_lyric_l_; + Text_item * current_lyric_l_; Extender_req* req_l_; Extender_spanner* extender_spanner_p_; - - public: Extender_engraver (); VIRTUAL_COPY_CONS (Translator); diff --git a/lily/include/folded-repeat-iterator.hh b/lily/include/folded-repeat-iterator.hh index d9215a9555..07e6710d44 100644 --- a/lily/include/folded-repeat-iterator.hh +++ b/lily/include/folded-repeat-iterator.hh @@ -36,6 +36,7 @@ protected: virtual void do_print () const; virtual void do_process_and_next (Moment); + virtual Music_iterator *try_music_in_children (Music const *) const; }; #endif /* FOLDED_REPEAT_ITERATOR_HH */ diff --git a/lily/include/font-metric.hh b/lily/include/font-metric.hh index 2878cfc38b..13c6aca493 100644 --- a/lily/include/font-metric.hh +++ b/lily/include/font-metric.hh @@ -25,7 +25,7 @@ struct Character_metric struct Font_metric { - virtual Character_metric *get_char (int ascii, bool warn) const=0; + virtual Character_metric const *get_char (int ascii, bool warn) const=0; virtual ~Font_metric () {} }; diff --git a/lily/include/grace-iterator.hh b/lily/include/grace-iterator.hh index 77d5cd75b7..2aa1e1434d 100644 --- a/lily/include/grace-iterator.hh +++ b/lily/include/grace-iterator.hh @@ -18,8 +18,8 @@ public: ~Grace_iterator (); virtual void construct_children () ; virtual void do_process_and_next (Moment); + Moment next_moment () const; - Music* next_music_l (); }; diff --git a/lily/include/hyphen-engraver.hh b/lily/include/hyphen-engraver.hh index 6ab2eb59bc..d8af602c12 100644 --- a/lily/include/hyphen-engraver.hh +++ b/lily/include/hyphen-engraver.hh @@ -17,24 +17,20 @@ /** - Generate an centred hyphen. Should make a Hyphen_spanner that typesets - a nice centred hyphen of varying length depending on the gap between syllables. - - We remember all Text_items that come across, and store their - termination times. When we get a request, we create the spanner, and - attach the left point to the finished lyrics, and the right point to - any lyrics we receive by then. -*/ + Generate an centred hyphen. Should make a Hyphen_spanner that + typesets a nice centred hyphen of varying length depending on the + gap between syllables. + + We remember the last Text_item that come across. When we get a + request, we create the spanner, and attach the left point to the + last lyrics, and the right point to any lyrics we receive by + then. */ class Hyphen_engraver : public Engraver { - PQueue past_lyrics_pq_; - Array now_lyrics_; - Array stopped_lyrics_; - + Text_item * last_lyric_l_; + Text_item * current_lyric_l_; Hyphen_req* req_l_; Hyphen_spanner* hyphen_spanner_p_; - - public: Hyphen_engraver (); VIRTUAL_COPY_CONS (Translator); diff --git a/lily/include/line-of-score.hh b/lily/include/line-of-score.hh index 578c58638b..6cf5efbfae 100644 --- a/lily/include/line-of-score.hh +++ b/lily/include/line-of-score.hh @@ -22,7 +22,7 @@ public: /// is #c# contained in #*this#? bool contains_b (Paper_column const *c) const; - Line_of_score * set_breaking (Array const&, int j) const; + Line_of_score * set_breaking (Array const&, int j); void output_all (bool last_line); diff --git a/lily/include/lyric-combine-music-iterator.hh b/lily/include/lyric-combine-music-iterator.hh new file mode 100644 index 0000000000..5ae6a43b55 --- /dev/null +++ b/lily/include/lyric-combine-music-iterator.hh @@ -0,0 +1,37 @@ + +/* + lyric-combine-music-iterator.hh -- declare + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ + +#ifndef LYRIC_COMBINE_MUSIC_ITERATOR_HH +#define LYRIC_COMBINE_MUSIC_ITERATOR_HH + +#include "music-iterator.hh" + +class Lyric_combine_music_iterator : public Music_iterator +{ + Music_iterator * music_iter_p_; + Music_iterator * lyric_iter_p_; + +protected: + bool melisma_started_b_; + + + virtual void construct_children (); + virtual Moment next_moment () const; + virtual void do_process_and_next (Moment); + virtual Music_iterator *try_music_in_children (Music const*) const; + + virtual bool ok () const; + virtual void do_print () const; + virtual ~Lyric_combine_music_iterator (); +public: + Lyric_combine_music_iterator (); +}; +#endif /* LYRIC_COMBINE_MUSIC_ITERATOR_HH */ + diff --git a/lily/include/lyric-combine-music.hh b/lily/include/lyric-combine-music.hh new file mode 100644 index 0000000000..d3a2a21f43 --- /dev/null +++ b/lily/include/lyric-combine-music.hh @@ -0,0 +1,36 @@ +/* + lyric-combine-music.hh -- declare Lyric_combine_music + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ + +#ifndef LYRIC_COMBINE_MUSIC_HH +#define LYRIC_COMBINE_MUSIC_HH +#include "music.hh" + + +class Lyric_combine_music : public Music +{ + Music * music_p_; + Music * lyrics_p_; +public: + Music * music_l () const; + Music * lyrics_l () const; + + Lyric_combine_music (Music*, Music*); + + virtual void transpose (Musical_pitch); + virtual void do_print () const; + + VIRTUAL_COPY_CONS(Music); + Lyric_combine_music (Lyric_combine_music const&); + virtual Moment length_mom () const; + virtual ~Lyric_combine_music (); + virtual Musical_pitch to_relative_octave (Musical_pitch); + virtual void compress (Moment); +}; +#endif /* LYRIC_COMBINE_MUSIC_HH */ + diff --git a/lily/include/mudela-version.hh b/lily/include/mudela-version.hh index 7135fc8897..0547e21329 100644 --- a/lily/include/mudela-version.hh +++ b/lily/include/mudela-version.hh @@ -25,4 +25,6 @@ struct Mudela_version int patch_i_; }; +extern Mudela_version oldest_version; + #endif // MUDELA_VERSION_HH diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index 9d2a68f689..f7d9c061e3 100644 --- a/lily/include/music-iterator.hh +++ b/lily/include/music-iterator.hh @@ -49,13 +49,22 @@ protected: */ Music_iterator* get_iterator_p (Music const*mus) const; - /** Do the actual reporting. This should be overriden in derived + /** Do the actual move. This should be overriden in derived classes. It is called by #process_and_next#, the public interface */ virtual void do_process_and_next (Moment until); + + virtual Music_iterator* try_music_in_children (Music const *) const; + public: + /** + Do the reporting. Will try MUSIC_L_ in its own translator first, + then its children. Returns the iterator that succeeded + */ + Music_iterator * try_music (Music const *) const; + /** The translation unit that we this iterator is reporting to now. */ @@ -74,8 +83,6 @@ public: /// Find the next interesting point in time. virtual Moment next_moment() const; - /// Return next Music item - virtual Music* next_music_l (); ///Are we finished with this piece of music? virtual bool ok() const; diff --git a/lily/include/music-list-iterator.hh b/lily/include/music-list-iterator.hh deleted file mode 100644 index 7385230fcf..0000000000 --- a/lily/include/music-list-iterator.hh +++ /dev/null @@ -1,32 +0,0 @@ -/* - music-list-iterator.hh -- declare Music_list_iterator - - source file of the GNU LilyPond music typesetter - - (c) 1998--1999 Jan Nieuwenhuizen -*/ - - -#ifndef MUSIC_LIST_ITERATOR_HH -#define MUSIC_LIST_ITERATOR_HH - -#include "music-iterator.hh" - - -class Music_list_iterator : public Music_iterator -{ -public: - Music_list_iterator (); - virtual ~Music_list_iterator (); - - virtual void construct_children (); - virtual Moment next_moment () const; - virtual Music* next_music_l (); - virtual bool ok () const; - -protected: - virtual void do_print () const; - virtual void do_process_and_next (Moment); -}; - -#endif // MUSIC_LIST_ITERATOR_HH diff --git a/lily/include/music-list.hh b/lily/include/music-list.hh index e00d9633ec..e36fefec73 100644 --- a/lily/include/music-list.hh +++ b/lily/include/music-list.hh @@ -15,11 +15,10 @@ #include "cons.hh" -class Music_list : public Cons_list +class Music_list : public Cons_list , public Input { public: Musical_pitch do_relative_octave (Musical_pitch, bool); - Music_iterator* do_rhythm (Music_iterator*); void add_music (Music*); Music_list (Music_list const&); Music_list (); @@ -39,7 +38,6 @@ public: VIRTUAL_COPY_CONS(Music); Musical_pitch do_relative_octave (Musical_pitch p, bool b); - Music_iterator* do_rhythm (Music_iterator*); virtual void transpose (Musical_pitch ); virtual void compress (Moment); void add_music (Music *music_p); @@ -50,7 +48,6 @@ public: protected: virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual Music_iterator* to_rhythm (Music_iterator*); virtual void do_print() const; }; @@ -65,7 +62,6 @@ public: Simultaneous_music(Music_list *); virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual Music_iterator* to_rhythm (Music_iterator*); virtual Moment length_mom () const; }; @@ -80,7 +76,6 @@ public: VIRTUAL_COPY_CONS(Music); virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual Music_iterator* to_rhythm (Music_iterator*); Request_chord(); }; diff --git a/lily/include/music-wrapper-iterator.hh b/lily/include/music-wrapper-iterator.hh index deee350913..0f8ab73454 100644 --- a/lily/include/music-wrapper-iterator.hh +++ b/lily/include/music-wrapper-iterator.hh @@ -26,12 +26,13 @@ public: virtual void construct_children () ; virtual Moment next_moment () const; - virtual Music* next_music_l (); virtual bool ok () const; protected: virtual void do_print () const; virtual void do_process_and_next (Moment) ; + virtual Music_iterator *try_music_in_children (Music const *) const; + Music_iterator *child_iter_p_; }; diff --git a/lily/include/music-wrapper.hh b/lily/include/music-wrapper.hh index 7e87040acf..f01a39ff9a 100644 --- a/lily/include/music-wrapper.hh +++ b/lily/include/music-wrapper.hh @@ -33,7 +33,6 @@ public: virtual Moment length_mom () const; virtual ~Music_wrapper (); virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual Music_iterator* to_rhythm (Music_iterator*); virtual void compress (Moment); }; diff --git a/lily/include/music.hh b/lily/include/music.hh index 30ae02fddb..0bd1e966d0 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -33,7 +33,6 @@ public: virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual Music_iterator* to_rhythm (Music_iterator*); /// The duration of this piece of music virtual Moment length_mom () const; diff --git a/lily/include/musical-request.hh b/lily/include/musical-request.hh index 88d5f6fbce..d3cfc3dd1e 100644 --- a/lily/include/musical-request.hh +++ b/lily/include/musical-request.hh @@ -151,4 +151,28 @@ public: VIRTUAL_COPY_CONS(Music); }; +/** is anyone playing a note? + Used for communication between Music & Lyrics + */ +class Busy_playing_req : public Request +{ +public: + VIRTUAL_COPY_CONS (Music); +}; +/** + instruct lyric context to alter typesetting (unimplemented). */ +class Melisma_req : public Span_req +{ +public: + VIRTUAL_COPY_CONS(Music); +}; + +/** + Helping req to signal start of a melisma from within a context, and + to */ +class Melisma_playing_req : public Request +{ +public: + VIRTUAL_COPY_CONS (Music); +}; #endif // MUSICALREQUESTS_HH diff --git a/lily/include/new-repeated-music.hh b/lily/include/new-repeated-music.hh index 0f4caed5bd..5cf2ff3166 100644 --- a/lily/include/new-repeated-music.hh +++ b/lily/include/new-repeated-music.hh @@ -61,7 +61,6 @@ public: Music_sequence * alternatives_p_; virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual Music_iterator* to_rhythm (Music_iterator*); /// The duration of this piece of music virtual Moment length_mom () const; diff --git a/lily/include/note-head-side.hh b/lily/include/note-head-side.hh index 421ad9c57d..201acbacd1 100644 --- a/lily/include/note-head-side.hh +++ b/lily/include/note-head-side.hh @@ -25,6 +25,7 @@ public: Direction notehead_align_dir_; Note_head_side (); + bool supported_b () const; void add_support (Item*); VIRTUAL_COPY_CONS (Score_element); protected: diff --git a/lily/include/note-heads-engraver.hh b/lily/include/note-heads-engraver.hh index 433a05f43a..9dcd26f469 100644 --- a/lily/include/note-heads-engraver.hh +++ b/lily/include/note-heads-engraver.hh @@ -8,6 +8,7 @@ #ifndef HEADSGRAV_HH #define HEADSGRAV_HH #include "engraver.hh" +#include "pqueue.hh" /** make balls and rests @@ -16,6 +17,7 @@ class Note_heads_engraver : public Engraver { Link_array note_p_arr_; Link_array dot_p_arr_; Link_array note_req_l_arr_; + PQueue notes_end_pq_; public: VIRTUAL_COPY_CONS(Translator); diff --git a/lily/include/parseconstruct.hh b/lily/include/parseconstruct.hh index 527dafbd35..572e465602 100644 --- a/lily/include/parseconstruct.hh +++ b/lily/include/parseconstruct.hh @@ -13,5 +13,6 @@ String * get_scriptdef (char c); Request* get_script_req (char); Request*get_grouping_req (Array i_arr); +#error #endif // PARSECONSTRUCT_HH diff --git a/lily/include/re-rhythmed-music.hh b/lily/include/re-rhythmed-music.hh deleted file mode 100644 index 4c258a7be9..0000000000 --- a/lily/include/re-rhythmed-music.hh +++ /dev/null @@ -1,27 +0,0 @@ -/* - re-rhythmed-music.hh -- declare Re_rhythmed_music - - source file of the GNU LilyPond music typesetter - - (c) 1999 Jan Nieuwenhuizen - - */ - -#ifndef RE_RHYTHMED_MUSIC_HH -#define RE_RHYTHMED_MUSIC_HH - -#include "music-wrapper.hh" - -class Re_rhythmed_music : public Music_wrapper -{ -public: - void do_print () const; - Re_rhythmed_music (Music*, Music*); - - VIRTUAL_COPY_CONS(Music); - virtual Music_iterator* to_rhythm (Music_iterator*); -}; - - -#endif /* RE_RHYTHMED_MUSIC_HH */ - diff --git a/lily/include/relative-music.hh b/lily/include/relative-music.hh index 179362c593..2d7cff937b 100644 --- a/lily/include/relative-music.hh +++ b/lily/include/relative-music.hh @@ -22,7 +22,6 @@ public: VIRTUAL_COPY_CONS(Music); virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual Music_iterator* to_rhythm (Music_iterator*); }; diff --git a/lily/include/request-chord-iterator.hh b/lily/include/request-chord-iterator.hh index 0b35c447d6..dea114deec 100644 --- a/lily/include/request-chord-iterator.hh +++ b/lily/include/request-chord-iterator.hh @@ -31,7 +31,6 @@ public: protected: virtual void do_process_and_next (Moment); virtual Moment next_moment() const; - virtual Music* next_music_l (); virtual void construct_children(); virtual bool ok() const; virtual void do_print() const; diff --git a/lily/include/sequential-music-iterator.hh b/lily/include/sequential-music-iterator.hh index bfab2b805f..160556cc9d 100644 --- a/lily/include/sequential-music-iterator.hh +++ b/lily/include/sequential-music-iterator.hh @@ -9,13 +9,13 @@ #ifndef SEQUENTIAL_MUSIC_ITERATOR_HH #define SEQUENTIAL_MUSIC_ITERATOR_HH -#include "music-list-iterator.hh" +#include "music-iterator.hh" /** Sequential_music iteration: walk each element in turn, and construct an iterator for every element. */ -class Sequential_music_iterator : public Music_list_iterator +class Sequential_music_iterator : public Music_iterator { public: Sequential_music_iterator (); @@ -23,18 +23,17 @@ public: virtual void construct_children (); virtual Moment next_moment () const; - virtual Music* next_music_l (); virtual bool ok () const; protected: virtual void do_print() const; virtual void do_process_and_next (Moment); + virtual Music_iterator *try_music_in_children (Music const*) const; + private: Moment here_mom_; - /// don't go into next element when you finish. - bool per_elt_b_; Cons *cursor_; Music_iterator * iter_p_; diff --git a/lily/include/simultaneous-music-iterator.hh b/lily/include/simultaneous-music-iterator.hh index a04f3f2216..1671a30ef6 100644 --- a/lily/include/simultaneous-music-iterator.hh +++ b/lily/include/simultaneous-music-iterator.hh @@ -9,11 +9,10 @@ #ifndef SIMULTANEOUS_MUSIC_ITERATOR_HH #define SIMULTANEOUS_MUSIC_ITERATOR_HH - +#include "music-iterator.hh" #include "cons.hh" -#include "music-list-iterator.hh" -class Simultaneous_music_iterator : public Music_list_iterator +class Simultaneous_music_iterator : public Music_iterator { public: @@ -30,6 +29,8 @@ public: protected: virtual void do_print () const; virtual void do_process_and_next (Moment); + virtual Music_iterator *try_music_in_children (Music const*) const; + private: Cons_list children_p_list_; diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index 287492989f..828391d70b 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -49,7 +49,7 @@ class Axis_group_spanner; class Spanner : public virtual Score_element { public: Drul_array spanned_drul_; - Array broken_info_; + Link_array broken_into_l_arr_; void set_bounds (Direction d, Item*); diff --git a/lily/include/tfm.hh b/lily/include/tfm.hh index a1db42f694..b14eea6be7 100644 --- a/lily/include/tfm.hh +++ b/lily/include/tfm.hh @@ -147,7 +147,7 @@ public: Tex_font_metric (); void clear (int n); - Character_metric *get_char (int, bool) const; + Character_metric const *get_char (int, bool) const; Tex_font_char_metric const &find_ascii (int ascii, bool warn=true) const; void read_file (String name); String str () const; diff --git a/lily/include/transposed-music.hh b/lily/include/transposed-music.hh index ce1314a78d..f6c1e13021 100644 --- a/lily/include/transposed-music.hh +++ b/lily/include/transposed-music.hh @@ -23,7 +23,6 @@ public: VIRTUAL_COPY_CONS(Music); virtual Musical_pitch to_relative_octave (Musical_pitch); - virtual Music_iterator* to_rhythm (Music_iterator*); }; #endif /* TRANSPOSED_MUSIC_HH */ diff --git a/lily/include/unfolded-repeat-iterator.hh b/lily/include/unfolded-repeat-iterator.hh index 42e78e0487..22888cf29a 100644 --- a/lily/include/unfolded-repeat-iterator.hh +++ b/lily/include/unfolded-repeat-iterator.hh @@ -45,6 +45,8 @@ protected: virtual void construct_children (); virtual Moment next_moment () const; virtual void do_process_and_next (Moment); + virtual Music_iterator *try_music_in_children (Music const*) const; + virtual bool ok () const; virtual void next_element (); virtual void do_print () const; diff --git a/lily/lexer.ll b/lily/lexer.ll index 3dd6d59e8c..f7e82ac5bf 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -31,13 +31,21 @@ #include "interval.hh" #include "parser.hh" #include "debug.hh" -#include "parseconstruct.hh" #include "main.hh" #include "musical-request.hh" #include "identifier.hh" +#include "mudela-version.hh" +#include "version.hh" + void strip_trailing_white (String&); void strip_leading_white (String&); + +bool +valid_version_b (String s); + + + #define start_quote() \ yy_push_state (quote);\ yylval.string = new String @@ -62,6 +70,7 @@ LYRICS ({AA}|{TEX})[^0-9 \t\n\f]* %option never-interactive %option warn +%x version %x chords %x incl %x lyrics @@ -118,6 +127,21 @@ HYPHEN -- } } +\\version{WHITE}* { + yy_push_state (version); +} +\"[^"]*\";? { /* got the include file name */ + String s (YYText ()+1); + s = s.left_str (s.index_last_i ('"')); + DOUT << "#version `" << s << "\'\n"; + if (!valid_version_b (s)) + return INVALID; + yy_pop_state (); +} +. { + LexerError ("No quoted string found after \\version"); + yy_pop_state (); +} { [^\%]* { } @@ -220,7 +244,6 @@ HYPHEN -- yylval.i = String_convert::dec2_i (String (YYText ())); return DIGIT; } - {UNSIGNED} { yylval.i = String_convert::dec2_i (String (YYText ())); return UNSIGNED; @@ -397,7 +420,7 @@ My_lily_lexer::pop_state () int My_lily_lexer::scan_escaped_word (String str) -{ +{ DOUT << "\\word: `" << str<<"'\n"; int l = lookup_keyword (str); if (l != -1) { @@ -496,3 +519,20 @@ strip_trailing_white (String&s) s = s.left_str (i+1); } + + + +bool +valid_version_b (String s) +{ + Mudela_version current ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL ); + Mudela_version ver (s); + if (!((ver >= oldest_version) && (ver <= current))) + { + error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), current.str ())); + if (!version_ignore_global_b) + return false; + } + return true; +} + diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index e63015501e..a177b2c88b 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -19,9 +19,6 @@ #include "file-path.hh" #include "debug.hh" - - - /* scm_m_quote doesn't use any env, but needs one for a good signature in GUILE. @@ -59,11 +56,10 @@ ly_set_scm (String name, SCM val) return scm_sysintern (name.ch_C(), val); } -/** +/** Read a file, and shove it down GUILE. GUILE also has file read functions, but you can't fiddle with the path of those. - */ void read_lily_scm_file (String fn) @@ -87,6 +83,26 @@ read_lily_scm_file (String fn) } +SCM +ly_gulp_file (SCM name) +{ + String fn (ly_scm2string (name)); + String s = global_path.find (fn); + if (s == "") + { + String e = _f ("Can not find file `%s\'", fn); + e += " "; + e += _f ("(Load path is `%s\'", global_path.str ()); + error (e); + } + else + *mlog << '[' << s; + + + Simple_file_storage f(s); + return gh_str02scm (f.ch_C()); +} + void ly_display_scm (SCM s) { @@ -137,9 +153,9 @@ void init_functions () { scm_make_gsubr ("ly-warn", 1, 0, 0, ly_warning); + scm_make_gsubr ("ly-gulp-file", 1,0, 0, ly_gulp_file); } - extern void init_symbols (); void diff --git a/lily/line-of-score.cc b/lily/line-of-score.cc index c53a33a9e8..441dcd9465 100644 --- a/lily/line-of-score.cc +++ b/lily/line-of-score.cc @@ -26,7 +26,7 @@ Line_of_score::contains_b (Paper_column const* c) const // const? Line_of_score* -Line_of_score::set_breaking (Array const &breaking, int j) const +Line_of_score::set_breaking (Array const &breaking, int j) { const Link_array &curline (breaking[j].cols_); const Array &config (breaking[j].config_); @@ -49,7 +49,7 @@ Line_of_score::set_breaking (Array const &breaking, int j) c b.broken_spanner_l_ = line_l; b.line_l_ = line_l; - broken_info_.push (b); + broken_into_l_arr_.push (line_l); return line_l; } diff --git a/lily/lookup.cc b/lily/lookup.cc index 00354d3c2d..cc9466bc12 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -506,7 +506,7 @@ Lookup::staff_brace (Real y, int staff_size) const Real step = 1.0; int minht = 2 * staff_size; int maxht = 7 * minht; - int idx = ((maxht - step) ? 0; SCM f = ly_symbol (String ("feta-braces" + to_str (staff_size))); diff --git a/lily/lyric-combine-music-iterator.cc b/lily/lyric-combine-music-iterator.cc new file mode 100644 index 0000000000..639cbaae25 --- /dev/null +++ b/lily/lyric-combine-music-iterator.cc @@ -0,0 +1,109 @@ +/* + lyric-combine-music-iterator.cc -- implement Lyric_combine_music_iterator + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ + +#include "translator-group.hh" +#include "lyric-combine-music-iterator.hh" +#include "lyric-combine-music.hh" +#include "musical-request.hh" + +Busy_playing_req busy_req; +Melisma_req melisma_start_req; +Melisma_req melisma_stop_req; +Melisma_playing_req melisma_playing_req; + + +Lyric_combine_music_iterator::Lyric_combine_music_iterator () +{ + melisma_start_req.span_dir_ = START; + melisma_stop_req.span_dir_ = STOP; + + melisma_started_b_ = false; + music_iter_p_ =0; + lyric_iter_p_ =0; +} + +Moment +Lyric_combine_music_iterator::next_moment () const +{ + Moment musnext = music_iter_p_->next_moment (); + return musnext; +} + +bool +Lyric_combine_music_iterator::ok () const +{ + return music_iter_p_->ok (); +} + +void +Lyric_combine_music_iterator::do_print () const +{ + music_iter_p_->print (); + lyric_iter_p_->print (); +} + +void +Lyric_combine_music_iterator::construct_children () +{ + Lyric_combine_music const * m = dynamic_cast (music_l_); + + music_iter_p_ = get_iterator_p (m->music_l ()); + lyric_iter_p_ = get_iterator_p (m->lyrics_l ()); +} + +void +Lyric_combine_music_iterator::do_process_and_next (Moment m) +{ + Moment my_next = music_iter_p_->next_moment (); + if (my_next > m) + return; + + music_iter_p_->process_and_next (m); + + bool busy = try_music (&busy_req); + if (busy) + { + bool melisma_b = try_music (&melisma_playing_req); + if (!melisma_started_b_ || !melisma_b) + { + if (lyric_iter_p_->ok ()) + { + if (melisma_b && !melisma_started_b_) + lyric_iter_p_->try_music (&melisma_start_req); + else if (melisma_started_b_) + lyric_iter_p_->try_music (&melisma_stop_req); + + Moment m= lyric_iter_p_->next_moment (); + lyric_iter_p_->process_and_next (m); + } + } + melisma_started_b_ = melisma_b; + } + + + + Music_iterator::do_process_and_next (m); +} + +Lyric_combine_music_iterator::~Lyric_combine_music_iterator () +{ + delete lyric_iter_p_; + delete music_iter_p_; +} + +Music_iterator* +Lyric_combine_music_iterator::try_music_in_children (Music const *m) const +{ + Music_iterator * i = music_iter_p_->try_music (m); + if (i) + return i; + else + return lyric_iter_p_->try_music (m); +} + diff --git a/lily/lyric-combine-music.cc b/lily/lyric-combine-music.cc new file mode 100644 index 0000000000..9da40bf778 --- /dev/null +++ b/lily/lyric-combine-music.cc @@ -0,0 +1,75 @@ +/* + lyric-combine-music.cc -- implement Lyric_combine_music + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ + +#include "lyric-combine-music.hh" +#include "musical-pitch.hh" + +Lyric_combine_music::Lyric_combine_music (Music * m, Music * l) +{ + music_p_ = m; + lyrics_p_ = l; +} + +Lyric_combine_music::~Lyric_combine_music () +{ + delete music_p_; + delete lyrics_p_; +} + +Lyric_combine_music::Lyric_combine_music (Lyric_combine_music const&s) + : Music (s) +{ + music_p_ = s.music_p_ ? s.music_p_->clone ():0; + lyrics_p_ = s.lyrics_p_ ? s.lyrics_p_->clone ():0; +} + +void +Lyric_combine_music::transpose (Musical_pitch p) +{ + music_p_->transpose (p); + lyrics_p_->transpose (p); +} + +void +Lyric_combine_music::do_print () const +{ + music_p_->print(); + lyrics_p_->print (); +} + +Moment +Lyric_combine_music::length_mom () const +{ + return music_p_->length_mom (); +} + +Musical_pitch +Lyric_combine_music::to_relative_octave ( Musical_pitch p ) +{ + p = music_p_->to_relative_octave (p); + return lyrics_p_->to_relative_octave (p); +} + +void +Lyric_combine_music::compress (Moment m) +{ + music_p_->compress (m); +} + +Music* +Lyric_combine_music::music_l () const +{ + return music_p_; +} + +Music* +Lyric_combine_music::lyrics_l () const +{ + return lyrics_p_; +} diff --git a/lily/main.cc b/lily/main.cc index a5a222b2e5..ffb26cede2 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -243,7 +243,7 @@ setup_paths () global_path.parse_path (env_sz); - char *suffixes[] = {"ly", "afm", "scm", "tfm", "cmtfm", 0}; + char *suffixes[] = {"ly", "afm", "scm", "tfm", "cmtfm", "ps", 0}; for (char **s = suffixes; *s; s++){ if (!prefix_directory.empty_b()) global_path.add (prefix_directory + to_str ('/') + String (*s)); diff --git a/lily/melisma-engraver.cc b/lily/melisma-engraver.cc new file mode 100644 index 0000000000..434fefbc32 --- /dev/null +++ b/lily/melisma-engraver.cc @@ -0,0 +1,33 @@ +/* + melisma-engraver.cc -- implement Melisma_engraver + + source file of the GNU LilyPond music typesetter + + (c) 1999 Han-Wen Nienhuys + + */ + +#include "engraver.hh" +#include "musical-request.hh" + +/** + Signal existence of melismas. + */ +class Melisma_engraver:public Engraver +{ +public: + VIRTUAL_COPY_CONS(Translator); + bool do_try_music (Music *); +}; +ADD_THIS_TRANSLATOR(Melisma_engraver); + +bool +Melisma_engraver::do_try_music (Music *m ) +{ + if (dynamic_cast(m)) + { + Scalar s (get_property ("melismaBusy", 0)); + return s.to_bool (); + } + return false; +} diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 0dcba0a2b4..c0c59c48f4 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -26,6 +26,8 @@ #include "unfolded-repeat-iterator.hh" #include "grace-iterator.hh" #include "grace-music.hh" +#include "lyric-combine-music.hh" +#include "lyric-combine-music-iterator.hh" void Music_iterator::do_print() const @@ -39,8 +41,8 @@ Music_iterator::print() const if (!check_debug) return ; DOUT << classname(this) << "{"; - DOUT << "report to " << - report_to_l() << " (" << classname (report_to_l ()) << ")\n"; + Translator_group *t = report_to_l(); + DOUT << "report to " << t->type_str_ << " = " << t->id_str_ << "\n"; if (ok()) DOUT << "next at " << next_moment() << " "; else @@ -90,11 +92,6 @@ Music_iterator::next_moment() const return 0; } -Music* -Music_iterator::next_music_l () -{ - return 0; -} void Music_iterator::process_and_next (Moment m) @@ -121,6 +118,8 @@ Music_iterator::static_get_iterator_p (Music const *m) if (dynamic_cast (m)) p = new Request_chord_iterator; + else if (dynamic_cast (m)) + p = new Lyric_combine_music_iterator; else if (dynamic_cast (m)) p = new Simultaneous_music_iterator; else if (dynamic_cast (m)) @@ -183,4 +182,19 @@ Music_iterator::Music_iterator() first_b_ = true; } +Music_iterator* +Music_iterator::try_music (Music const *m) const +{ + bool b = report_to_l ()->try_music ((Music*)m); // ugh + Music_iterator * it = b ? (Music_iterator*) this : 0; // ugh + if (!it) + it = try_music_in_children (m); + return it; +} + +Music_iterator* +Music_iterator::try_music_in_children (Music const * ) const +{ + return 0; +} diff --git a/lily/music-list-iterator.cc b/lily/music-list-iterator.cc deleted file mode 100644 index 2be250faea..0000000000 --- a/lily/music-list-iterator.cc +++ /dev/null @@ -1,52 +0,0 @@ -/* - Music_list-iterator.cc -- implement Music_list_iterator - - source file of the GNU LilyPond music typesetter - - (c) 1998--1999 Jan Nieuwenhuizen -*/ - -#include "music-list-iterator.hh" -#include "music-list.hh" - -Music_list_iterator::Music_list_iterator () -{ -} - -Music_list_iterator::~Music_list_iterator () -{ -} - -void -Music_list_iterator::construct_children () -{ -} - -void -Music_list_iterator::do_print() const -{ -} - -void -Music_list_iterator::do_process_and_next (Moment) -{ -} - -Moment -Music_list_iterator::next_moment () const -{ - return 0; -} - -Music* -Music_list_iterator::next_music_l () -{ - return 0; -} - -bool -Music_list_iterator::ok () const -{ - return false; -} - diff --git a/lily/music-list.cc b/lily/music-list.cc index 3b9c830fba..2b2fce2fda 100644 --- a/lily/music-list.cc +++ b/lily/music-list.cc @@ -52,11 +52,6 @@ Simultaneous_music::to_relative_octave (Musical_pitch p) return do_relative_octave (p, true); } -Music_iterator* -Simultaneous_music::to_rhythm (Music_iterator* r) -{ - return do_rhythm (r); -} Musical_pitch Music_sequence::do_relative_octave (Musical_pitch p, bool b) @@ -64,11 +59,6 @@ Music_sequence::do_relative_octave (Musical_pitch p, bool b) return music_p_list_p_->do_relative_octave (p, b); } -Music_iterator* -Music_sequence::do_rhythm (Music_iterator* r) -{ - return music_p_list_p_->do_rhythm (r); -} Musical_pitch Music_list::do_relative_octave (Musical_pitch last, bool ret_first) @@ -88,18 +78,9 @@ Music_list::do_relative_octave (Musical_pitch last, bool ret_first) return retval; } -Music_iterator* -Music_list::do_rhythm (Music_iterator* r) -{ - for (Cons *i = head_; i ; i = i->next_) - { - r = i->car_->to_rhythm (r); - } - return r; -} Music_list::Music_list (Music_list const &s) - : Cons_list (s) + : Cons_list (s), Input (s) { Cons_list::init (); clone_killing_cons_list (*this, s.head_); @@ -136,34 +117,6 @@ Request_chord::to_relative_octave (Musical_pitch last) return last; } -Music_iterator* -Request_chord::to_rhythm (Music_iterator* it) -{ - for (Cons* i = music_p_list_p_->head_; i ; i = i->next_) - { - if (Rhythmic_req* r= dynamic_cast (i->car_)) - { - for (Music*m = it->next_music_l (); m; m = it->next_music_l ()) - { -#if 0 - // is it sane to assume we don't want rests on lyrics/in rhythm? - if (dynamic_cast (r) - || dynamic_cast (r) - || dynamic_cast (r)) - { - continue; - } -#endif - if (Rhythmic_req* d= dynamic_cast (m)) - { - r->duration_ = d->duration_; - return it; - } - } - } - } - return it; -} Music_list::Music_list () { diff --git a/lily/music-sequence.cc b/lily/music-sequence.cc index 6b074c5b16..60e6459a20 100644 --- a/lily/music-sequence.cc +++ b/lily/music-sequence.cc @@ -63,11 +63,6 @@ Music_sequence::to_relative_octave (Musical_pitch p) return do_relative_octave (p, false); } -Music_iterator* -Music_sequence::to_rhythm (Music_iterator* r) -{ - return do_rhythm (r); -} Moment Music_sequence::maximum_length () const diff --git a/lily/music-wrapper-iterator.cc b/lily/music-wrapper-iterator.cc index 03fefdd44e..1f89d771c6 100644 --- a/lily/music-wrapper-iterator.cc +++ b/lily/music-wrapper-iterator.cc @@ -50,15 +50,16 @@ Music_wrapper_iterator::do_process_and_next (Moment m) Music_iterator::do_process_and_next (m); } + Moment Music_wrapper_iterator::next_moment () const { return child_iter_p_->next_moment (); } -Music* -Music_wrapper_iterator::next_music_l () + +Music_iterator* +Music_wrapper_iterator::try_music_in_children (Music const *m) const { - return child_iter_p_->next_music_l (); + return child_iter_p_->try_music (m); } - diff --git a/lily/music-wrapper.cc b/lily/music-wrapper.cc index 4512e26fc2..71de46fc45 100644 --- a/lily/music-wrapper.cc +++ b/lily/music-wrapper.cc @@ -56,11 +56,6 @@ Music_wrapper::to_relative_octave (Musical_pitch p) return element_p_->to_relative_octave (p); } -Music_iterator* -Music_wrapper::to_rhythm (Music_iterator* r) -{ - return element_p_->to_rhythm (r); -} Music* Music_wrapper::element_l () const diff --git a/lily/music.cc b/lily/music.cc index 1d137e4524..1eda545aa2 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -54,11 +54,6 @@ Music::to_relative_octave (Musical_pitch m) return m; } -Music_iterator* -Music::to_rhythm (Music_iterator* r) -{ - return r; -} void Music::transpose (Musical_pitch ) diff --git a/lily/musical-request.cc b/lily/musical-request.cc index 65b7221404..00faa6f0f4 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -32,9 +32,6 @@ Tremolo_req::do_print () const #endif } - - - void Melodic_req::transpose (Musical_pitch delta) { diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 1da40f6b55..8e73971984 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -16,7 +16,6 @@ #include "my-lily-lexer.hh" #include "debug.hh" #include "source-file.hh" -#include "parseconstruct.hh" #include "main.hh" #include "scope.hh" @@ -60,7 +59,7 @@ static Keyword_ent the_key_tab[]={ {"remove", REMOVE}, {"repeat", REPEAT}, {"repetitions", REPETITIONS}, - {"rhythm", RHYTHM}, + {"addlyrics", ADDLYRICS}, {"scm", SCM_T}, {"scmfile", SCMFILE}, {"score", SCORE}, diff --git a/lily/note-head-side.cc b/lily/note-head-side.cc index 785da0c332..a5ef70294c 100644 --- a/lily/note-head-side.cc +++ b/lily/note-head-side.cc @@ -50,3 +50,8 @@ Note_head_side:: Note_head_side() { notehead_align_dir_ = LEFT; } +bool +Note_head_side::supported_b ()const +{ + return support_l_arr_.size (); +} diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 099c8bf731..2669e2fa51 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -21,13 +21,20 @@ Note_heads_engraver::do_try_music (Music *m) if (Note_req * n =dynamic_cast (m)) { note_req_l_arr_.push (n); + notes_end_pq_.insert (now_mom () + m->length_mom ()); + return true; } - if (Tonic_req* t = dynamic_cast (m)) + else if (Tonic_req* t = dynamic_cast (m)) { return true; } + else if (Busy_playing_req * p = dynamic_cast (m)) + { + return notes_end_pq_.size (); + } return false; + } void @@ -50,11 +57,8 @@ Note_heads_engraver::do_process_requests() announce_element (Score_element_info (d,0)); dot_p_arr_.push (d); } - - // note_p->steps_i_ = note_req_l->pitch_.steps (); note_p->position_i_ = note_req_l->pitch_.steps (); - if (noteheadstyle == "transparent") note_p->set_elt_property (transparent_scm_sym, SCM_BOOL_T); else @@ -88,7 +92,9 @@ Note_heads_engraver::do_pre_move_processing() void Note_heads_engraver::do_post_move_processing() { - + Moment n (now_mom ()); + while (notes_end_pq_.size () && notes_end_pq_.front () <=n) + notes_end_pq_.get (); } diff --git a/lily/paper-def.cc b/lily/paper-def.cc index f6ed231d34..b3ca52a21a 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -43,6 +43,7 @@ Paper_def::~Paper_def () Paper_def::Paper_def (Paper_def const&s) : Music_output_def (s) { + shape_int_a_ = s.shape_int_a_; lookup_p_tab_p_ = new Hash_table; lookup_p_tab_p_->hash_func_ = int_hash; @@ -106,11 +107,13 @@ Interval Paper_def::line_dimensions_int (int n) const { if (!shape_int_a_.size ()) - if (n) - return Interval (0, linewidth_f ()); - else - return Interval (get_var ("indent"), linewidth_f ()); - + { + if (n) + return Interval (0, linewidth_f ()); + else + return Interval (get_var ("indent"), linewidth_f ()); + } + if (n >= shape_int_a_.size ()) n = shape_int_a_.size () -1; @@ -257,7 +260,7 @@ Paper_def::paper_outputter_p (Paper_stream* os_p, Header* header_l, String origi p->output_scope (scope_p_, "mudelapaper"); - *p->outstream_l_ << *scope_p_->elem (String (output_global_ch) + "setting")->access_content_String (false); + // *p->outstream_l_ << *scope_p_->elem (String (output_global_ch) + "setting")->access_content_String (false); SCM scm = gh_list (ly_symbol ("experimental-on"), SCM_UNDEFINED); p->output_scheme (scm); diff --git a/lily/parser.yy b/lily/parser.yy index bc65f297bd..0cf567a55e 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -9,16 +9,6 @@ Jan Nieuwenhuizen */ -/* - Ambiguities: - - * \alternative - - * use of '-' in various places - -*/ - - #include #include "lily-guile.hh" #include "notename-table.hh" @@ -33,7 +23,6 @@ #include "file-path.hh" #include "keyword.hh" #include "debug.hh" -#include "parseconstruct.hh" #include "dimensions.hh" #include "identifier.hh" #include "command-request.hh" @@ -46,19 +35,18 @@ #include "duration-convert.hh" #include "change-translator.hh" #include "file-results.hh" -#include "mudela-version.hh" #include "scope.hh" #include "relative-music.hh" -#include "re-rhythmed-music.hh" +#include "lyric-combine-music.hh" #include "transposed-music.hh" #include "time-scaled-music.hh" #include "new-repeated-music.hh" -#include "version.hh" +#include "mudela-version.hh" #include "grace-music.hh" // mmm Mudela_version oldest_version ("1.1.52"); -Mudela_version version ( MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL ); + void @@ -86,7 +74,7 @@ print_mudela_versions (ostream &os) %union { - Array* intarr; + Array* realarr; Array *pitch_arr; Link_array *reqvec; Array * strvec; @@ -155,6 +143,7 @@ yylex (YYSTYPE *s, void * v_l) %token GRACE %token HEADER %token IN_T +%token INVALID %token KEY %token KEYSIGNATURE %token LYRICS @@ -175,7 +164,7 @@ yylex (YYSTYPE *s, void * v_l) %token REMOVE %token REPEAT %token REPETITIONS -%token RHYTHM +%token ADDLYRICS %token SCM_T %token SCMFILE %token SCORE @@ -251,7 +240,7 @@ yylex (YYSTYPE *s, void * v_l) %type property_def translator_change %type Music_list %type paper_block paper_def_body -%type real_expression real real_with_dimension +%type real real_with_dimension %type abbrev_command_req %type post_request %type command_req verbose_command_req @@ -259,7 +248,7 @@ yylex (YYSTYPE *s, void * v_l) %type hyphen_req %type string %type score_block score_body -%type shape_array +%type real_array %type script_abbreviation %type translator_spec_block translator_spec_body @@ -278,7 +267,9 @@ mudela: /* empty */ | mudela toplevel_expression {} | mudela assignment { } | mudela error - | mudela check_version { } + | mudela INVALID { + THIS->error_level_i_ =1; + } ; toplevel_expression: @@ -315,24 +306,12 @@ embedded_scm: delete $2; } | SCM_T STRING semicolon { + if (THIS->lexer_p_->main_input_b_ && safe_global_b) + error (_("Cannot evaluate Scheme in safe mode")); gh_eval_str ($2->ch_l ()); delete $2; }; -check_version: - VERSION STRING semicolon { - Mudela_version ver (*$2); - if (!((ver >= oldest_version) && (ver <= version))) { - if (THIS->ignore_version_b_) { - THIS->here_input ().error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), version.str ())); - } else { - THIS->fatal_error_i_ = 1; - THIS->parser_error (_f ("incorrect mudela version: %s (%s, %s)", ver.str (), oldest_version.str (), version.str ())); - } - } - } - ; - chordmodifiers_block: CHORDMODIFIERS '{' notenames_body '}' { $$ = $3; } @@ -504,19 +483,18 @@ translator_spec_body: SCORE */ score_block: - SCORE { THIS->remember_spot (); + SCORE { } /*cont*/ '{' score_body '}' { $$ = $4; - $$->set_spot (THIS->pop_spot ()); if (!$$->def_p_arr_.size ()) $$->add_output (THIS->default_paper_p ()); - } ; score_body: { $$ = new Score; + $$->set_spot (THIS->here_input ()); } | SCORE_IDENTIFIER { $$ = $1->access_content_Score (true); @@ -581,9 +559,20 @@ paper_def_body: | paper_def_body translator_spec_block { $$->assign_translator ($2); } - | paper_def_body SHAPE '=' shape_array semicolon { - $$->shape_int_a_ = *$4; - delete $4; + | paper_def_body SHAPE real_array semicolon { + /* + URG URG. + */ + if ($3->size () % 2) + warning ("Need even number of args for shape array"); + + for (int i=0; i < $3->size (); i+=2) + { + Real l = $3->elem (i); + $$->shape_int_a_.push (Interval (l, + l + $3->elem (i+1))); + } + delete $3; } | paper_def_body error { @@ -591,10 +580,6 @@ paper_def_body: ; -real: - real_expression { $$ = $1; } - ; - real_with_dimension: REAL CM_T { @@ -611,7 +596,7 @@ real_with_dimension: } ; -real_expression: +real: REAL { $$ = $1; } @@ -619,34 +604,39 @@ real_expression: | REAL_IDENTIFIER { $$= *$1->access_content_Real (false); } - | '-' real_expression %prec UNARY_MINUS { + | '-' real %prec UNARY_MINUS { $$ = -$2; } - | real_expression '*' real_expression { + | real '*' real { $$ = $1 * $3; } - | real_expression '/' real_expression { + | real '/' real { $$ = $1 / $3; } - | real_expression '+' real_expression { + | real '+' real { $$ = $1 + $3; } - | real_expression '-' real_expression { + | real '-' real { $$ = $1 - $3; } - | '(' real_expression ')' { + | '(' real ')' { $$ = $2; } ; -shape_array: - /* empty */ { - $$ = new Array; +real_array: + real { + $$ = new Array; + $$->push ($1); } - | shape_array real real { - $$->push(Interval($2, $2 + $3)); - }; + | /* empty */ { + $$ = new Array; + } + | real_array ',' real { + $$->push($3); + } + ; /* MIDI @@ -689,6 +679,7 @@ tempo_request: Music_list: /* empty */ { $$ = new Music_list; + $$->set_spot (THIS->here_input ()); } | Music_list Music { $$->add_music ($2); @@ -728,23 +719,25 @@ Repeated_music: r->fold_b_ = (*$2 == "fold"); r->semi_fold_b_ = (*$2 == "semi"); delete $2; - r->set_spot (THIS->here_input ()); - + r->set_spot ($4->spot ()); } ; Music_sequence: '{' Music_list '}' { $$ = new Music_sequence ($2); + $$->set_spot ($2->spot ()); } ; Sequential_music: '{' Music_list '}' { $$ = new Sequential_music ($2); + $$->set_spot ($2->spot ()); } ; Simultaneous_music: '<' Music_list '>' { $$ = new Simultaneous_music ($2); + $$->set_spot ($2->spot ()); } ; @@ -828,7 +821,7 @@ Composite_music: THIS->lexer_p_->pop_state (); } | relative_music { $$ = $1; } - | re_rhythmed_music { $$ = $1; } + | re_rhythmed_music { $$ = $1; } ; relative_music: @@ -839,8 +832,9 @@ relative_music: ; re_rhythmed_music: - RHYTHM Music Music { - $$ = new Re_rhythmed_music ($3, $2); + ADDLYRICS Music Music { + Lyric_combine_music * l = new Lyric_combine_music ($2, $3); + $$ = l; } ; @@ -1371,37 +1365,6 @@ simple_element: $$ = v; } - /* - This rhythm option introduces a lot of shift/reduce conflicts; - ie, for every optional_notemode_duration. - However, we always want the default behaviour, which is to shift: - if an optional_notemode_duration is allowed, a following duration - is to be taken as this default duration. Thus - - c4 c 8 4 - - are three notes, ie: c4 c8 c4. - Parsing whitespace is a snaky thing to do. - * / - | entered_notemode_duration { - 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_ = THIS->default_pitch_; - n->duration_ = *$1; - delete $1; - - Simultaneous_music*v = new Request_chord; - v->set_spot (THIS->here_input ()); - n->set_spot (THIS->here_input ()); - - v->add_music (n); - - $$ = v; - } -*/ | RESTNAME optional_notemode_duration { $$ = THIS->get_rest_element (*$1, $2); delete $1; // delete notename @@ -1542,9 +1505,10 @@ unsigned: UNSIGNED { $$ = $1; } - | DIGIT { + | DIGIT { $$ = $1; - }; + } + ; int: unsigned { @@ -1603,4 +1567,3 @@ My_lily_parser::do_yyparse () } - diff --git a/lily/re-rhythmed-music.cc b/lily/re-rhythmed-music.cc deleted file mode 100644 index e2ba452819..0000000000 --- a/lily/re-rhythmed-music.cc +++ /dev/null @@ -1,41 +0,0 @@ -/* - re-rhythmed-music.cc -- implement Re_rhythmed_music - - source file of the GNU LilyPond music typesetter - - (c) 1999 Jan Nieuwenhuizen - - */ - -#include "re-rhythmed-music.hh" -#include "music-iterator.hh" -#include "global-translator.hh" - -// urg -class Foo_translator : public Global_translator -{ -}; - -Music_iterator* -Re_rhythmed_music::to_rhythm (Music_iterator* r) -{ - return r; -} - -Re_rhythmed_music::Re_rhythmed_music (Music* m, Music* r) - : Music_wrapper (m) -{ - Music_iterator* i = Music_iterator::static_get_iterator_p (r); - Global_translator*t = new Foo_translator (); - i->init_translator (r, t); - i->construct_children (); - element_l ()->to_rhythm (i); -} - -void -Re_rhythmed_music::do_print () const -{ - Music_wrapper::do_print (); -} - - diff --git a/lily/relative-octave-music.cc b/lily/relative-octave-music.cc index dc0fc9906c..14faba3d5f 100644 --- a/lily/relative-octave-music.cc +++ b/lily/relative-octave-music.cc @@ -16,11 +16,6 @@ Relative_octave_music::to_relative_octave (Musical_pitch) return last_pitch_; } -Music_iterator* -Relative_octave_music::to_rhythm (Music_iterator* r) -{ - return element_l ()->to_rhythm (r); -} Relative_octave_music::Relative_octave_music(Music*p,Musical_pitch def) : Music_wrapper (p) diff --git a/lily/repeat-engraver.cc b/lily/repeat-engraver.cc index 5dd89eb2f5..62f5f4a48c 100644 --- a/lily/repeat-engraver.cc +++ b/lily/repeat-engraver.cc @@ -37,8 +37,14 @@ Repeat_engraver::do_try_music (Music* m) if (r->semi_fold_b_) { repeated_music_l_ = r; - return true; } + + /* + We acknowledge other types of unfolded music as well, to + get auto context selection right. + */ + return true; + } return false; } diff --git a/lily/repeated-music.cc b/lily/repeated-music.cc index 6436be9bfa..09fe2e05e8 100644 --- a/lily/repeated-music.cc +++ b/lily/repeated-music.cc @@ -66,16 +66,6 @@ Repeated_music::to_relative_octave (Musical_pitch p) return p; } -Music_iterator* -Repeated_music::to_rhythm (Music_iterator* r) -{ - if (repeat_body_p_) - r = repeat_body_p_->to_rhythm (r); - - if (alternatives_p_) - r = alternatives_p_->do_rhythm (r); - return r; -} void diff --git a/lily/request-chord-iterator.cc b/lily/request-chord-iterator.cc index 47d28ce770..462cead1b4 100644 --- a/lily/request-chord-iterator.cc +++ b/lily/request-chord-iterator.cc @@ -50,24 +50,6 @@ Request_chord_iterator::next_moment() const return m; } -Music* -Request_chord_iterator::next_music_l () -{ - if (first_b_) - { - cursor_ = elt_l ()->music_p_list_p_->head_; - first_b_ = false; - } - else - { - if (cursor_) - cursor_ = cursor_->next_; - } - if (cursor_) - return cursor_->car_; - else - return 0; -} void Request_chord_iterator::do_print() const @@ -86,7 +68,7 @@ Request_chord_iterator::do_process_and_next (Moment mom) { if (Request * req_l = dynamic_cast (i->car_)) { - bool gotcha = report_to_l()->try_music (req_l); + bool gotcha = try_music (req_l); if (!gotcha) req_l->warning (_f ("junking request: `%s\'", classname( req_l))); } diff --git a/lily/scope.cc b/lily/scope.cc index 2f8c56a3ed..fd2e391747 100644 --- a/lily/scope.cc +++ b/lily/scope.cc @@ -28,7 +28,7 @@ Scope::print () const Scope::~Scope () { - for (Scope_iter ai (*this); ai.ok(); ai++) + for (Scope_iter ai (*this); ai.ok(); ai++) { DOUT << "deleting: " << ai.key() << '\n'; delete ai.val (); diff --git a/lily/sequential-music-iterator.cc b/lily/sequential-music-iterator.cc index 6714625393..b6ace95e13 100644 --- a/lily/sequential-music-iterator.cc +++ b/lily/sequential-music-iterator.cc @@ -25,7 +25,6 @@ Sequential_music_iterator::Sequential_music_iterator () cursor_ = 0; here_mom_ = 0; iter_p_ =0; - per_elt_b_ = false; } void @@ -68,14 +67,22 @@ Sequential_music_iterator::start_next_element() void Sequential_music_iterator::set_sequential_music_translator() { - if (iter_p_->report_to_l()->depth_i () > report_to_l ()->depth_i () - && ! dynamic_cast (iter_p_)) // UGH.! - set_translator (iter_p_->report_to_l()); + Translator_group * child_report = child_report = iter_p_->report_to_l (); + if (dynamic_cast (iter_p_)) + child_report = child_report->daddy_trans_l_; + + if (report_to_l()->depth_i () < child_report->depth_i ()) + set_translator (child_report); } Sequential_music_iterator::~Sequential_music_iterator() { - assert (! iter_p_); + if (iter_p_) + { + music_l_->warning ("Must stop before this music ends"); + delete iter_p_; + iter_p_ = 0; + } } @@ -101,20 +108,13 @@ Sequential_music_iterator::do_process_and_next (Moment until) if (!iter_p_->ok()) { + set_sequential_music_translator(); leave_element(); if (cursor_) - { - start_next_element(); - set_sequential_music_translator(); - - if (per_elt_b_) - goto loopexit; // ugh. - } + start_next_element(); else - { - goto loopexit; - } + goto loopexit; } } @@ -129,40 +129,6 @@ Sequential_music_iterator::next_moment() const return iter_p_->next_moment() + here_mom_; } -Music* -Sequential_music_iterator::next_music_l () -{ - if (!iter_p_) - return 0; - - while (1) - { - if (Music* m = iter_p_->next_music_l ()) - { - return m; - } - else - { - // urg FIXME: sequential children should be iterated to finish - if (dynamic_cast (iter_p_)) - delete iter_p_; - iter_p_ = 0; - leave_element (); - - if (cursor_) - { - start_next_element (); - set_sequential_music_translator (); - } - else - { - delete iter_p_; - iter_p_ = 0; - return 0; - } - } - } -} bool Sequential_music_iterator::ok() const @@ -170,3 +136,8 @@ Sequential_music_iterator::ok() const return iter_p_; } +Music_iterator* +Sequential_music_iterator::try_music_in_children (Music const *m) const +{ + return iter_p_ ? iter_p_->try_music (m) : 0; +} diff --git a/lily/simultaneous-music-iterator.cc b/lily/simultaneous-music-iterator.cc index 80dbc9d2da..70b1631693 100644 --- a/lily/simultaneous-music-iterator.cc +++ b/lily/simultaneous-music-iterator.cc @@ -102,3 +102,11 @@ Simultaneous_music_iterator::ok() const return children_p_list_.head_; } +Music_iterator* +Simultaneous_music_iterator::try_music_in_children (Music const*m) const +{ + Music_iterator * b=0; + for (Cons *p = children_p_list_.head_; !b && p; p = p->next_) + b =p->car_->try_music (m); + return b; +} diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index a307e1b104..5063bfa7a4 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -44,6 +44,8 @@ Spacing_spanner::scol (int i)const John S. Gourlay. ``Spacing a Line of Music,'' Technical Report OSU-CISRC-10/87-TR35, Department of Computer and Information Science, The Ohio State University, 1987. + + TOO HAIRY. */ Array @@ -90,63 +92,73 @@ Spacing_spanner::do_measure (int col1, int col2) const SCM hint = lc->get_elt_property (extra_space_scm_sym); SCM next_hint = rc->get_elt_property (extra_space_scm_sym); - SCM stretch_hint = rc->get_elt_property (stretch_distance_scm_sym); - + SCM stretch_hint = lc->get_elt_property (stretch_distance_scm_sym); + SCM next_stretch_hint = rc->get_elt_property (stretch_distance_scm_sym); + + Real left_distance; if (hint != SCM_BOOL_F) { hint = SCM_CDDR (hint); - s.distance_f_ = gh_scm2double (hint); - if (!lc->musical_b ()) - s.strength_f_ = non_musical_space_strength; // fixed after complaints by michael krause 2.0; + left_distance = gh_scm2double (hint); } else if (!lc->musical_b() && i+1 < col_count()) { - s.distance_f_ = default_bar_spacing (lc,rc,shortest); + left_distance= default_bar_spacing (lc,rc,shortest); } else if (lc->musical_b()) { - s.distance_f_ = note_spacing (lc, rc, shortest); - + left_distance = note_spacing (lc, rc, shortest); } - + + s.distance_f_ = left_distance; + if (!lc->musical_b () || !rc->musical_b ()) + s.strength_f_ = non_musical_space_strength; + + Real right_dist = 0.0; if (next_hint != SCM_BOOL_F) { - next_hint = SCM_CADR(next_hint); - s.distance_f_ += gh_scm2double (next_hint); + next_hint = SCM_CADR(next_hint); + right_dist += gh_scm2double (next_hint); } else { Interval ext (rc->extent (X_AXIS)); - Real correction = ext.empty_b() ? 0.0 : - ext [LEFT]; + right_dist = ext.empty_b() ? 0.0 : - ext [LEFT]; + } - /* - don't want to create too much extra space for accidentals - */ - if (lc->musical_b () && rc->musical_b ()) - correction /= 2.0; + /* + don't want to create too much extra space for accidentals + */ + if (lc->musical_b () && rc->musical_b ()) + right_dist /= 2.0; - s.distance_f_ += correction; + s.distance_f_ = left_distance + right_dist; + + Real stretch_dist = 0.; + if (stretch_hint != SCM_BOOL_F) + stretch_dist += gh_scm2double (SCM_CDDR (stretch_hint)); + else + stretch_dist += left_distance; + + if (next_stretch_hint != SCM_BOOL_F) + { + // see regtest spacing-tight + // stretch_dist += gh_scm2double (SCM_CADR (next_stretch_hint)); } + else + stretch_dist += right_dist; - if (s.distance_f_ == 0.0) + if (stretch_dist == 0.0) { /* \bar "". We give it 0 space, with high strength. */ - s.distance_f_ = 0.0 PT; s.strength_f_ = 20.0; } - else if (stretch_hint != SCM_BOOL_F) - { - Real hint_sp = gh_scm2double (SCM_CDR (stretch_hint)); - s.strength_f_ /= hint_sp; - } else - { - s.strength_f_ /= s.distance_f_; - } - + s.strength_f_ /= stretch_dist; + meas_springs.push (s); } } @@ -158,7 +170,8 @@ Spacing_spanner::do_measure (int col1, int col2) const Do something if breakable column has no spacing hints set. */ Real -Spacing_spanner::default_bar_spacing (Score_column *lc, Score_column *rc, Moment shortest) const +Spacing_spanner::default_bar_spacing (Score_column *lc, Score_column *rc, + Moment shortest) const { Real symbol_distance = lc->extent (X_AXIS)[RIGHT] ; Real durational_distance = 0; diff --git a/lily/spanner.cc b/lily/spanner.cc index 4d4659f66a..27f72c9e0f 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -21,7 +21,7 @@ Spanner::do_print() const << " and " << classname (spanned_drul_[RIGHT]) << '\n'; if (broken_b ()) - DOUT << "Broken in " << to_str (broken_info_.size ()) << " pieces"; + DOUT << "Broken in " << to_str (broken_into_l_arr_.size ()) << " pieces"; #endif } @@ -56,7 +56,7 @@ Spanner::break_into_pieces () Item *&pc_l = info.bounds_[d] ; if (!pc_l->line_l()) pc_l = pc_l->find_prebroken_piece(- d); - + assert (pc_l); if (!info.line_l_) info.line_l_ = pc_l-> line_l (); @@ -65,8 +65,16 @@ Spanner::break_into_pieces () } while ((flip(&d))!= LEFT); - info.broken_spanner_l_ = 0; - broken_info_.push (info); + + Spanner *span_p = dynamic_cast(clone ()); + span_p->set_bounds(LEFT,info.bounds_[LEFT]); + span_p->set_bounds(RIGHT,info.bounds_[RIGHT]); + pscore_l_->typeset_element (span_p); + + info.broken_spanner_l_ = span_p; + span_p->handle_broken_dependencies(); + + broken_into_l_arr_.push (span_p); } } @@ -149,25 +157,10 @@ Spanner::line_l() const Spanner* Spanner::find_broken_piece (Line_of_score*l) const { - for (int i=0; i < broken_info_.size (); i++) + for (int i=0; i < broken_into_l_arr_.size (); i++) { - Spanner *me =(Spanner*) this; - Breaking_information &info = me->broken_info_[i]; - if (info.line_l_ == l) - { - if (!info.broken_spanner_l_) - { - Spanner *span_p = dynamic_cast(clone ()); - span_p->set_bounds(LEFT,info.bounds_[LEFT]); - span_p->set_bounds(RIGHT,info.bounds_[RIGHT]); - pscore_l_->typeset_element (span_p); - - info.broken_spanner_l_ = span_p; - span_p->handle_broken_dependencies(); - - } - return info.broken_spanner_l_; - } + if (broken_into_l_arr_[i]->line_l () == l) + return broken_into_l_arr_[i]; } return 0; @@ -176,7 +169,7 @@ Spanner::find_broken_piece (Line_of_score*l) const bool Spanner::broken_b() const { - return broken_info_.size(); + return broken_into_l_arr_.size(); } Array @@ -209,30 +202,24 @@ Spanner::do_space_processing () } } +/* + UGH. + */ void Spanner::handle_broken_dependents () { -#if 0 // need to remove delayd breaking. - if (original_l_ && !original_l_->line_l ()) + Spanner *unbrok = dynamic_cast (original_l_); + if (!unbrok || dim_cache_[Y_AXIS]->parent_l_) + return; + + Spanner *refpoint = dynamic_cast (unbrok->parent_l (Y_AXIS)); + + if (refpoint) { - - /* we're the broken pieces of a spanner. - Check if our Y-leaning point is sane. - */ - Dimension_cache *d = dim_cache_[Y_AXIS]->parent_l_; - if (d) - return; - - Score_element * ref_elt = dynamic_cast(d->element_l()); - Spanner *ref_span = dynamic_cast (ref_elt); - if (!ref_elt->line_l () && ref_span) - { - Spanner *broken_refpoint = ref_span->find_broken_piece (line_l ()); - if (broken_refpoint) - dim_cache_[Y_AXIS]->parent_l_ = broken_refpoint->dim_cache_[Y_AXIS]; - else - programming_error ("Spanner y -refpoint lost."); - } + Spanner * broken_refpoint = refpoint->find_broken_piece (line_l ()); + if (broken_refpoint) + dim_cache_[Y_AXIS]->parent_l_ = broken_refpoint->dim_cache_[Y_AXIS]; + else + programming_error ("Spanner y -refpoint lost."); } -#endif } diff --git a/lily/super-element.cc b/lily/super-element.cc index 03788e8f40..90f8d49700 100644 --- a/lily/super-element.cc +++ b/lily/super-element.cc @@ -60,12 +60,13 @@ void Super_element::break_processing () { calculate_dependencies (BROKEN, BROKEN, &Score_element::do_break_processing); - calculate_dependencies (BROKEN_SECOND, BROKEN_SECOND, - &Score_element::handle_broken_dependents); } + void Super_element::post_processing () { + calculate_dependencies (BROKEN_SECOND, BROKEN_SECOND, + &Score_element::handle_broken_dependents); calculate_dependencies (POSTCALCED, POSTCALCING, &Score_element::do_post_processing); } diff --git a/lily/tfm.cc b/lily/tfm.cc index 1ae9e51f07..9fcac3d436 100644 --- a/lily/tfm.cc +++ b/lily/tfm.cc @@ -67,7 +67,7 @@ Tex_font_metric::find_ascii (int ascii, bool warn) const return dummy_static_char_metric; } -Character_metric* +Character_metric const* Tex_font_metric::get_char (int a, bool w) const { return &find_ascii (a, w); diff --git a/lily/time-scaled-music-iterator.cc b/lily/time-scaled-music-iterator.cc index c6a086419e..fc48ff2cd6 100644 --- a/lily/time-scaled-music-iterator.cc +++ b/lily/time-scaled-music-iterator.cc @@ -1,5 +1,5 @@ /* - time-scaled-music-iterator.cc -- implement Time_scaled_music_iterator + time-scaled-music-iterator.cc -- implement Time_scaled_music_iterator source file of the GNU LilyPond music typesetter @@ -13,15 +13,15 @@ #include "translator-group.hh" #include "command-request.hh" - - void Time_scaled_music_iterator::do_process_and_next (Moment m) { - if (first_b_) + if (!m) { - bool success = report_to_l ()->try_music (dynamic_cast (music_l_)); - if (!success) + Music_iterator *yeah = try_music (music_l_); + if (yeah) + set_translator (yeah->report_to_l ()); + else music_l_->warning ( _("No one to print a tuplet start bracket")); } diff --git a/lily/transposed-music.cc b/lily/transposed-music.cc index f6de2eb3b3..02fe088973 100644 --- a/lily/transposed-music.cc +++ b/lily/transposed-music.cc @@ -33,10 +33,5 @@ Transposed_music::to_relative_octave (Musical_pitch p) return p; } -Music_iterator* -Transposed_music::to_rhythm (Music_iterator* r) -{ - return r; -} diff --git a/lily/unfolded-repeat-iterator.cc b/lily/unfolded-repeat-iterator.cc index 3a9118cab3..99a3164063 100644 --- a/lily/unfolded-repeat-iterator.cc +++ b/lily/unfolded-repeat-iterator.cc @@ -138,8 +138,10 @@ Unfolded_repeat_iterator::do_process_and_next (Moment m) { if (!m) { - bool success = report_to_l ()->try_music (music_l_); - if (!success) + Music_iterator *yeah = try_music (music_l_); + if (yeah) + set_translator (yeah->report_to_l ()); + else music_l_->warning ( _("No one to print a volta bracket")); } while (1) @@ -168,3 +170,9 @@ Unfolded_repeat_iterator::do_print () const current_iter_p_->print(); #endif } + +Music_iterator* +Unfolded_repeat_iterator::try_music_in_children (Music const * m) const +{ + return current_iter_p_->try_music (m); +} diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 9b0566af2f..a92e590714 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -36,9 +36,9 @@ Volta_spanner::do_brew_molecule_p () const bool no_vertical_start = false; bool no_vertical_end = last_b_; Spanner *orig_span = dynamic_cast (original_l_); - if (orig_span && orig_span->broken_info_[0].broken_spanner_l_ != this) + if (orig_span && orig_span->broken_into_l_arr_[0] != this) no_vertical_start = true; - if (orig_span && orig_span->broken_info_.top ().broken_spanner_l_ != this) + if (orig_span && orig_span->broken_into_l_arr_.top () != this) no_vertical_end = true; if (bar_arr_.top ()->type_str_.length_i () > 1) no_vertical_end = false; diff --git a/lily/word-wrap.cc b/lily/word-wrap.cc index 81a407450e..d6f6cbf7ce 100644 --- a/lily/word-wrap.cc +++ b/lily/word-wrap.cc @@ -20,7 +20,6 @@ A Dynamic Programming type of algorithm similar to TeX's is in Gourlay_breaking - UGH. Should think about pre/post break columns. */ Array @@ -36,7 +35,6 @@ Word_wrap::do_solve () const assert (breakpoints.size ()>=2); int break_idx=0; - int line_no = 0; while (break_idx < breakpoints.size () -1) { Column_x_positions minimum; @@ -44,7 +42,7 @@ Word_wrap::do_solve () const // do another line - line_no ++; + Item *post = breakpoints[break_idx]->find_prebroken_piece (RIGHT); Paper_column *postcol =dynamic_cast(post); @@ -67,7 +65,7 @@ Word_wrap::do_solve () const current.add_paper_column (precol); current.spacer_l_ = generate_spacing_problem (current.cols_, - pscore_l_->paper_l_->line_dimensions_int (line_no)); + pscore_l_->paper_l_->line_dimensions_int (breaking.size ())); // try to solve if (!feasible (current.cols_)) diff --git a/ly/auto-beam-settings.ly b/ly/auto-beam-settings.ly index c1911c7074..d08d3d8ae1 100644 --- a/ly/auto-beam-settings.ly +++ b/ly/auto-beam-settings.ly @@ -84,3 +84,4 @@ see also input/test/auto-beam-override.ly %} + diff --git a/ly/declarations.ly b/ly/declarations.ly index 30677bb55e..4e5d37d751 100644 --- a/ly/declarations.ly +++ b/ly/declarations.ly @@ -36,16 +36,15 @@ lydian = 7 phrygian = 8 dorian = 10 +melisma = \property Staff.melismaBusy = "1" +melismaEnd = \property Staff.melismaBusy = "0" + papersize = "a4" \include "generic-paper.ly" \include "paper20.ly" -\paper{ - \paper_twenty -} - % ugh \include "midi.ly" diff --git a/ly/engraver.ly b/ly/engraver.ly index 645f0946a7..4c21a7d1f5 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -98,6 +98,7 @@ VoiceContext = \translator { % \consists "Multi_measure_rest_engraver"; % ugh. Order matters here. + \consists "Melisma_engraver"; \consists "Text_engraver"; \consists "Script_engraver"; \consists "Script_column_engraver"; @@ -125,6 +126,7 @@ GraceContext=\translator { \consists "Align_note_column_engraver"; \consists "Font_size_engraver"; \consists "Rhythmic_column_engraver"; + \consists "Dynamic_engraver"; stemStyle = "grace"; weAreGraceContext = "1"; diff --git a/ly/generic-paper.ly b/ly/generic-paper.ly index 206c771d54..1399f4c7bc 100644 --- a/ly/generic-paper.ly +++ b/ly/generic-paper.ly @@ -1,5 +1,6 @@ \paper { - texsetting = "\\input lilyponddefs "; - pssetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\n"; - scmsetting = "\"(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\";\n"; + texsetting = ""; + pssetting = ""; + scmsetting = "\"(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse\";\n";% UGH. + } diff --git a/ly/paper11.ly b/ly/paper11.ly index 8dc410b4e8..f41bc11c7e 100644 --- a/ly/paper11.ly +++ b/ly/paper11.ly @@ -8,11 +8,21 @@ paper_eleven = \paper { quartwidth = 3.63\pt; wholewidth = 5.45\pt; - arithmetic_basicspace = 2.; - arithmetic_multiplier = 4.8\pt; - + font_large = 8.; + font_Large = 6.; + font_normal = 5.; + + font_finger = 4.; + font_volta = 4.; + font_number = 4.; + font_dynamic = 10.; + font_mark = 6.; + + -1=\font "feta11" + -2=\font "feta11" 0=\font "feta11" \include "params.ly"; } +\paper { \paper_eleven } diff --git a/ly/paper13.ly b/ly/paper13.ly index fa73ad312e..afe0cd5651 100644 --- a/ly/paper13.ly +++ b/ly/paper13.ly @@ -8,10 +8,20 @@ paper_thirteen = \paper { wholewidth = 6.44\pt; - arithmetic_basicspace = 2.; - arithmetic_multiplier = 4.8\pt; - + font_large = 8.; + font_Large = 6.; + font_normal = 5.; + + font_finger = 4.; + font_volta = 4.; + font_number = 6.; + font_dynamic = 10.; + font_mark = 6.; + 0=\font "feta13" + -1=\font "feta11" + \include "params.ly"; } +\paper { \paper_thirteen } diff --git a/ly/paper16.ly b/ly/paper16.ly index c015aa2a1e..785f85834c 100644 --- a/ly/paper16.ly +++ b/ly/paper16.ly @@ -21,14 +21,11 @@ paper_sixteen = \paper { font_dynamic = 10.; font_mark = 10.; - arithmetic_basicspace = 2.; - arithmetic_multiplier = 4.8\pt; - -% scmsetting = "\"\\\\input lilyponddefs \";\n"; - 0 = \font "feta16" -1 = \font "feta13" -2 = \font "feta11" \include "params.ly"; } + +\paper {\paper_sixteen } diff --git a/ly/paper20.ly b/ly/paper20.ly index 800ad6038b..c4ac674fdd 100644 --- a/ly/paper20.ly +++ b/ly/paper20.ly @@ -27,14 +27,11 @@ paper_twenty = \paper { quartwidth = 6.61\pt; wholewidth = 9.90\pt; - - arithmetic_basicspace = 2.; - arithmetic_multiplier = 6.\pt; - - -2 = \font "feta13" + -2 = \font "feta13" -1 = \font "feta16" 0 = \font "feta20" \include "params.ly"; } +\paper { \paper_twenty } diff --git a/ly/paper23.ly b/ly/paper23.ly new file mode 100644 index 0000000000..57f64a7497 --- /dev/null +++ b/ly/paper23.ly @@ -0,0 +1,32 @@ +% paper23.ly + + +\version "1.1.52"; + +paper_twentythree = \paper { + staffheight = 23.0\pt; + + font_large = 12.; + font_Large = 12.; + font_normal = 10.; + + font_finger = 5.; + font_volta = 8.; + font_number = 10.; + font_mark = 12.; + + % Ugh + magnification_dynamic = 3.; + + % ugh see table20 for sizes + quartwidth = 6.61\pt; + wholewidth = 9.90\pt; + + -2 = \font "feta16" + -1 = \font "feta20" + 0 = \font "feta23" + + \include "params.ly"; +} + +\paper { \paper_twentythree } diff --git a/ly/paper26.ly b/ly/paper26.ly index 67640bda89..84d29e891b 100644 --- a/ly/paper26.ly +++ b/ly/paper26.ly @@ -3,16 +3,26 @@ paper_twentysix = \paper { staffheight = 26.0\pt; - % ugh see table26 for sizes quartwidth = 8.59\pt; wholewidth = 12.87\pt; - - arithmetic_basicspace = 2.; - arithmetic_multiplier = 6.\pt; + font_large = 14.; + font_Large = 17.; + font_normal = 12.; + font_dynamic = 10.; + % Ugh + magnification_dynamic = 4.; + + font_finger = 8.; + font_volta = 10.; + font_number = 10.; + magnification_number = 2.; + font_mark = 14.; + 0=\font "feta26" + -1 = \font "feta23" + -2 = \font "feta20" \include "params.ly"; - linewidth = \linewidth20; - textheight = \textheight20; } +\paper { \paper_twentysix } diff --git a/ly/params.ly b/ly/params.ly index 3cf95651a8..65d4e8d02a 100644 --- a/ly/params.ly +++ b/ly/params.ly @@ -28,6 +28,12 @@ stem_length1 = 5.; stem_length2 = 4.; stem_length3 = 3.; +% +arithmetic_basicspace = 2.; +arithmetic_multiplier = 0.9 * \quartwidth ; + + + % urg. % if only these ugly arrays were scm, % we could override them in the Grace context diff --git a/ly/property.ly b/ly/property.ly index 7ebb134115..24a6f8c066 100644 --- a/ly/property.ly +++ b/ly/property.ly @@ -135,3 +135,5 @@ endincipit = \notes{ \nobreak \bar ""; } +autoBeamOff = \property Voice.beamAuto = "" +autoBeamOn = \property Voice.beamAuto = "1" diff --git a/make/out/lelievijver.lsm b/make/out/lelievijver.lsm index 12b7f61068..6c030642fa 100644 --- a/make/out/lelievijver.lsm +++ b/make/out/lelievijver.lsm @@ -1,15 +1,15 @@ Begin3 Titel: LilyPond -Versie: 1.1.61 -Inschrijf datum: 16JUL99 +Versie: 1.1.62 +Inschrijf datum: 19JUL99 Beschrijving: @FLAPTEKST@ Trefwoorden: muziek typezetten midi notatie Auteur: hanwen@stack.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys) Voornaamste plek: sunsite.unc.edu /pub/Linux/apps - 770k lilypond-1.1.61.tar.gz + 770k lilypond-1.1.62.tar.gz Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 770k lilypond-1.1.61.tar.gz + 770k lilypond-1.1.62.tar.gz Copi-eer voorwaarden: GPL End diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 4aeb3eba9a..c56fe88133 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,7 +1,7 @@ Begin3 Title: LilyPond -Version: 1.1.61 -Entered-date: 16JUL99 +Version: 1.1.62 +Entered-date: 19JUL99 Description: LilyPond is the GNU Project music typesetter. It transforms a musical @@ -12,8 +12,8 @@ Author: hanwen@cs.ruu.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 - 770k lilypond-1.1.61.tar.gz + 770k lilypond-1.1.62.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 770k lilypond-1.1.61.tar.gz + 770k lilypond-1.1.62.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index aba10b009c..fd3c166533 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 1.1.61 +Version: 1.1.62 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.61.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.62.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys diff --git a/mudela-mode.el b/mudela-mode.el index 076362af23..4a39958f0d 100644 --- a/mudela-mode.el +++ b/mudela-mode.el @@ -37,7 +37,7 @@ "spanrequest" "grace" "scmfile" "lyrics" "in" "translator" "context" "key" "maininput" "notes" "musical_pitch" "time" "midi" "mm" "header" - "notenames" "octave" "output" "partial" "paper" "plet" "name" + "notenames" "octave" "output" "partial" "paper" "plet" "name" "addlyrics" "property" "pt" "shape" "relative" "include" "score" "scm" "scmfile" "script" "skip" "table" "times" "textscript" "symboltables" "type" diff --git a/mutopia/F.Schubert/GNUmakefile b/mutopia/F.Schubert/GNUmakefile index 2d7fc58cf0..d1038f0a04 100644 --- a/mutopia/F.Schubert/GNUmakefile +++ b/mutopia/F.Schubert/GNUmakefile @@ -2,7 +2,7 @@ depth = ../.. -examples= +examples=standchen LOCALSTEPMAKE_TEMPLATES=mutopia include $(depth)/make/stepmake.make diff --git a/mutopia/F.Schubert/standchen.ly b/mutopia/F.Schubert/standchen.ly index 46aabb538b..c124113668 100644 --- a/mutopia/F.Schubert/standchen.ly +++ b/mutopia/F.Schubert/standchen.ly @@ -11,7 +11,7 @@ copyright = "public domain"; } %{ - Tested Features: multivoice accents lyrics chords piano music + Tested Features@ multivoice accents lyrics chords piano music multiple \paper{}s in one \score Note: Original key F. %} @@ -69,62 +69,104 @@ vocalThrough = \notes\relative c{ e2 r4 | } -lyricVerseOne = \lyrics{ - Lei- " " se fleh- en mei- " " ne Lie- der " " - Durch die Nacht " " zu dir; " " - " " - " " - In " " den stil- len Hain " " her- nie- der - Lieb- chen, komm " " zu mir! " " - " " - " " - Fl\"us- ternd schlan- ke Wip- fel rau- schen - In " " des Mon- des Licht, - In " " des Mon- des Licht; - - Des Ver- r\"a- ters feind- lich Lau- schen - F\"urch- " " te, Hol- de, nicht, - f\"urch- " " te, Hol- de, nicht. +lyricVerse1 = \lyrics{ +% 5 + \times 2/3 { Lei-4 se8 } fleh-4. en8 | + \times 2/3 { mei-4 ne8 } Lie-4 der8 " "8 | + Durch4. die8 \times 2/3 { Nacht4 zu8 } | + dir;2 " "4 | + " "2.*2 +%{ " "4 " " " " | + " " " " " " |%} +% 11 + \times 2/3 { In4 den8 } stil-4. len8 | + \times 2/3 { Hain4 her-8 } nie-4. der8 | + Lieb-4. chen,8 \times 2/3 { komm4 zu8 } | + mir!2 " "4 | + " "2.*2 +%{ " "4 " " " " | + " " " " " " |%} +% 17 + Fl\"us-8. ternd16 schlan-4. ke8 | + Wip-8. fel16 rau-4. schen8 | + \times 2/3 { In4 des8 } Mon-4. des8 | + Licht;2. | + \times 2/3 { In4 des8 } Mon-4. des8 | + Licht;2. | +% 23 + Des8. Ver-16 r\"a-4. thers8 | + feind-8. lich16 Lau-4. schen8 | + \times 2/3 { F\"urch-4 te8 } Hol-4. de8 | + nicht2. | + \times 2/3 { f\"urch-4 te8 } Hol-4. de8 | + nicht.2. | } -lyricVerseTwo = \lyrics{ - H\"orst " " die Nach- ti- gal- " " len schla- gen? " " - Ach! sie fleh- " " en dich, " " - " " - " " - Mit " " der T\"o- ne s\"u- " " "\ss en" Kla- gen - Fleh- en sie " " f\"ur mich. " " - " " - " " - Sie- ver- "steh'n" des Bus- ens Seh- nen - Ken- " " nen Lieb- es- schmerz, - Ken- " " nen Lieb- es- schmerz. +lyricVerse2 = \lyrics{ +% 5 + \times 2/3 { H\"orst4 die8 } Nach-4. ti-8 + \times 2/3 { gal-4 len8 } schla-4 gen?8 " "8 + ach!4. sie8 \times 2/3 { fleh-4 en8 } + dich,2 " "4 + " "2.*2 +%{ " "4 " " " " + " "4" " " " +%} +% 11 + \times 2/3 { Mit4 der8 } T\"o-4. ne8 + \times 2/3 { s\"u-4 "\ss en"8 } Kla-4. gen8 + Fleh-4. en8 \times 2/3 { sie4 f\"ur8 } + mich2 " "4 + " "2.*2 +%{ " "4" " " " + " "4" " " " +%} +% 17 + Sie-8. ver-16 stehn4. des8 + Bus-8. ens16 Seh-4. nen8 + \times 2/3 { Ken-4 nen8 } Lieb-4. es-8 + schmerz,2. + \times 2/3 { Ken-4 nen8 } Lieb-4. es-8 + schmerz.2. - R\"uh- ren mit den Sil- ber- t\"o- nen - Jed- " " es wei- che Herz, - Jed- " " es wei- che Herz. +% 23 + R\"uh-8. ren16 mit4. den8 + Sil-8. ber-16 t\"o-4. nen8 + \times 2/3 { jed-4 es8 } wei-4. che8 + Herz,2. + \times 2/3 { jed-4 es8 } wei-4. che8 + Herz.2. } lyricThrough = \lyrics{ - La\ss auch dir die Brust be- we- gen " " - Lieb- chen, h\"o- re mich! " " - Be- bend harr' " " ich dir ent- ge- gen! " " - " " - " " - Komm, " " be- "gl\"uk-" ke mich! - Komm, " " be- "gl\"uk-" ke mich, __ " " " " - Be- "gl\"uk-" ke mich! +% 37 + La\ss8. auch16 dir8. die16 Brust8. be-16 | + we-4 gen " " | + Lieb-4. chen,8 h\"o-8. re16 | + mich!2 " "4 | + Be-4. bend8 \times 2/3 { harr'4 ich8} | + dir8. ent-16 ge-4 gen!8 " "8 | + " "2. | + " "2. | + \times 2/3 { Komm4 be-8 } gl\"u4. cke8 | + mich!2. | + \times 2/3 { Komm4 be-8 } gl\"u4. cke8 | + mich,2. __ | + " "2 be-4 | + gl\"u-2. | + cke2. | + mich!2 " "4 | } trebleIntro = \notes\relative c{ - r8^"\bf M\\\"a\\ss ig"\pp | + r8^"\bf m\\\"a\\\ss ig"\pp | r8 | r8 | r8 | \break } -trebleVerseOne = \notes\relative c{ +trebleVerse1 = \notes\relative c{ %5 r8 | r8 | @@ -232,7 +274,7 @@ bassIntro = \notes\relative c{ r4 | } -bassVerseOne = \notes\relative c{ +bassVerse1 = \notes\relative c{ % \clef bass; \property Voice.dynamicDir=1 %5 @@ -320,13 +362,24 @@ global = \notes{ } -allLyrics = \lyrics { - " "4 * 12 - \rhythm \vocalVerse \lyricVerseOne - " "4 * 12 - " "4 * 12 - \rhythm \vocalVerse \lyricVerseTwo - \rhythm \vocalThrough \lyricThrough +lyricFour = \lyrics{ + " "2.*4 +%{ " "4 " " " " + " " " " " " + " " " " " " + " " " " " "%} +} + +allLyrics = { + \time 3/4; +% \skip 4 * 12; + \lyricFour + \lyricVerse1 +% \skip 4 * 24; + \lyricFour + \lyricFour + \lyricVerse2 + \lyricThrough } lyricStaff = \context Lyrics = lyric< @@ -337,6 +390,7 @@ vocals = \notes{ \clef treble; % certainly no auto-beaming for vocals \property Voice.beamAuto=0 + \property Voice.dynamicDir = \up \skip 4 * 12; @@ -356,9 +410,9 @@ treble = { \clef treble; \property Voice.beamAutoBegin=0 \trebleIntro - \trebleVerseOne + \trebleVerse1 \trebleEentje - \trebleVerseOne + \trebleVerse1 \trebleThrough } @@ -370,9 +424,9 @@ trebleStaff = \context Staff = treble< bass = { \clef bass; \bassIntro - \bassVerseOne + \bassVerse1 \bassEentje - \bassVerseOne + \bassVerse1 \bassThrough } @@ -401,9 +455,12 @@ grandStaff = \context PianoStaff < { \notes { \grandStaff } } > \paper { +% \translator { \OrchestralScoreContext } +% \translator { \OrchestralPartStaffContext } \translator { \HaraKiriStaffContext } } - \midi{ - \tempo 4 = 54; - } +%broken 1.1.51 +% \midi{ +% \tempo 4 = 54; +% } } diff --git a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly index e1136e13da..36945c0d0a 100644 --- a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly +++ b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Allemande.ly @@ -96,7 +96,7 @@ venstreEn = \notes\relative c{ > \stemboth [es, f g16 c,32 d es16][g,8. bes32 as][g as bes16 es,32 f g16] | %8 - [a,8 c][f a][bes. f''32 es][d es f16 bes,32 c d16] | + [a,8 c][f a][bes8. f''32 es][d es f16 bes,32 c d16] | [es, g a bes][c d es c][fis, a bes c][d e fis d] | [g, bes c d][e fis g es][a, c d es][d c bes a] | [bes c d a][bes es d c][d a bes fis][g c bes a] | @@ -145,4 +145,4 @@ venstreEn = \notes\relative c{ > > \paper{} -} \ No newline at end of file +} diff --git a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly index 4843135792..99dfaa16eb 100644 --- a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly +++ b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Capriccio.ly @@ -494,5 +494,5 @@ vThreeSwitch = \context Voice = voiceThree \notes{ > \paper{ } - \midi{\tempo=60;} + \midi{\tempo 4 =60;} } diff --git a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly index 4ec2a3428f..41b4496d43 100644 --- a/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly +++ b/mutopia/J.S.Bach/Cembalo-Partitas/Partita_II_Sinfonia.ly @@ -25,16 +25,16 @@ global = \notes { hoyreOpp = \notes\relative c'' { \stemup - es4^"Grave adagio" r16 [es d. es32] f4 r16 [f16 f. g32] | - [as8. as16] [as16 g32 f g16. d32] es4 r16 [g g. as32] | + es4^"Grave adagio" r16 [es d16. es32] f4 r16 [f16 f16. g32] | + [as8. as16] [as16 g32 f g16. d32] es4 r16 [g g16. as32] | %3 - bes4 r16 [bes,16 bes. c32] [des8. des16] + bes4 r16 [bes,16 bes16. c32] [des8. des16] \context Staff < { \stemup e4 } { \stemup \property Voice.horizontalNoteShift = 1 [des16 c32 bes c16. g32] } > %4 - f4 \stemboth r16 [f g. as32] \stemup d,4 r16 [d g. es32] | + f4 \stemboth r16 [f g16. as32] \stemup d,4 r16 [d g16. es32] | c4 ~ [c32 es des c des16. f32] [b,16. c32 b16. c32] d4 ~ | d2 ~ [d16. g,32 a16. b32] [c16. ] | <[es8. c> ] @@ -47,12 +47,12 @@ hoyreOpp = \notes\relative c'' { hoyreNed = \notes\relative c'' { \clef violin; \stemdown - r16 [c b. c32] d4 r16 [d d. es32] | - [f8. f16] f8 r r16 [es16 es. f32] | + r16 [c b16. c32] d4 r16 [d d16. es32] | + [f8. f16] f8 r r16 [es16 es16. f32] | r16 [g16 g16. as32] [bes8. bes16] bes8 r | - r16 s16*3 r16 [f, f. g32] g4 | + r16 s16*3 r16 [f, f16. g32] g4 | %5 - r16 [es es. f32] f4 [g16. a32 g16. a32] b4 ~ | + r16 [es es16. f32] f4 [g16. a32 g16. a32] b4 ~ | [b8. d,16] [f8. as16] [g16. f32 es16. d32] [es16. d32 es16. f32] | g4 r } @@ -63,13 +63,13 @@ venstreOpp = \notes\relative c' { r r | r r | r r | - r r16 <[as d,>] | + r r16 <[as d,>] | %5 - r16 <[g c,>] + r16 <[g c,>] \context Staff < {\stemup f4~ f} {\stemup c4 d} - > r16 [f f. g32] | + > r16 [f f16. g32] | %6 [as8. as16]~ [as g32 f g16 d] r | r @@ -77,8 +77,8 @@ venstreOpp = \notes\relative c' { venstreNed = \notes\relative c{ \stemdown - c4 r c r | r c c r | c r r c | c r r16 [c c. bes32] bes4 | - r16 [bes bes. as32] as4_"tr" g r16 [d' d. es32] | + c4 r c r | r c c r | c r r c | c r r16 [c c16. bes32] bes4 | + r16 [bes bes16. as32] as4_"tr" g r16 [d' d16. es32] | \context Staff < { \stemdown \property Voice.horizontalNoteShift = 1 [f8. f16] [b,8. b16] g4 r | } { \stemdown s4 g} diff --git a/mutopia/J.S.Bach/wtk1-fugue1.ly b/mutopia/J.S.Bach/wtk1-fugue1.ly index 5d029b0bcb..1a1dfb0256 100644 --- a/mutopia/J.S.Bach/wtk1-fugue1.ly +++ b/mutopia/J.S.Bach/wtk1-fugue1.ly @@ -9,24 +9,17 @@ copyright = "Public Domain"; } %{ - +TODO: use autobeaming. %} \version "1.1.52"; -global = - \notes { - \time 4/4; % should be \time C - } - - - tenor = - \notes \relative c' { + \context Voice = tenor \notes \relative c' { \clef "violin"; \stemdown - r8 [c8 d e] [f. g32 f] [e8 a] | + r8 [c8 d e] [f8. g32 f] [e8 a] | [d, g] ~ [g16 a g f] [e f e d] [c d c b ] | [a 8 fis'] g4 ~ [g8 fis16 e] [f8 d] | [g f! e d] c r r g' ~ | @@ -35,20 +28,20 @@ tenor = [c8 f] r16 [g f e] [f8 d] g4 ~ | g4 r4 r2 | r1 | - r8 [g8 a b] [c . d 32 c ] [b8 e ] + r8 [g8 a b] [c8. d 32 c ] [b8 e ] %% 10 [a, d ] ~ [d 16 e d c ] b8 r8 r d, | - [e fis] [g. a32 g] [fis8 b e, a] ~ | + [e fis] [g8. a32 g] [fis8 b e, a] ~ | [a16 b a gis] [fis8 f!] [e d] ~ [d16 e fis gis] | [a gis a b] [gis fis gis a] b8 r8 r4 | - r8 [c,8 d e] \stemup [f. g32 f] [e8 a] | + r8 [c,8 d e] \stemup [f8. g32 f] [e8 a] | %% 15 [d, g] ~ [g16 a g f] e8 \stemdown [e fis g] ~ | [g8 fis] [gis8 a] ~ [a g! a b] | \stemboth - [c . d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | + [c8. d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | [b8 g' cis, d ] [e cis d e ] | - \stemdown a,8 r8 r e [fis g] \stemboth [a. b32 a] | + \stemdown a,8 r8 r e [fis g] \stemboth [a8. b32 a] | %% 20 [g8 c fis, b] ~ [b16 c b a] \stemdown [g fis e d] \stemboth | e4 \stemdown d ~ [d16 a' g f!] [e g f! a] | @@ -63,17 +56,17 @@ tenor = soprane = - \notes \relative c' { + \context Voice = sop \notes \relative c' { \stemup r1 | r2 r8 [g'8 a b] | - [c . d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | + [c8. d32 c ] [b8 e ] [a, d ] ~ [d 16 e d c ] | [b g a b] [c b c d ] [e d e fis ] [g 8 b,] | %% 5 [c a] [d 16 c b a] [g8. g16] [f e f g] | [a g a b] c 2 b4 | - r8 [c8 d e] [f. g32 f] [e8 a] | + r8 [c8 d e] [f8. g32 f] [e8 a] | [d, g] ~ [g16 a g f] [e8 a] ~ [a16 b a g] | f2 [e8. fis16] g4 ~ %% 10 @@ -84,14 +77,14 @@ soprane = a 4 r4 r2 | %% 15 r2 r8 [g 8 a b ] | - [c8. d32 c] [b 8 c] [d e] [f!. g32 f!] | + [c8. d32 c] [b 8 c] [d e] [f!8. g32 f!] | [e8 a d, g] ~ [g16 a g f] [e8 a] | [d,8 bes'] [a g16 f] [g f g e] [f g g f32 g] | [a16 cis, d g] [e8. d16] d8 r8 r4 | %% 20 r2 r4 r8 g, | - [a b ] [c. d32 c] [b 8 e a, d] ~ | - [e16 e d c] [b c d e] [f g a g] [f e d c] | + [a b ] [c8. d32 c] [b 8 e a, d( ] | + [) e16 e d c] [b c d e] [f g a g] [f e d c] | b 4 [c,8 d] g c4 b 8 | c4 [b 8 bes 8] a d4 c8 | %% 25 @@ -101,7 +94,7 @@ soprane = } alt = - \notes \relative c { +\context Voice = alt \notes \relative c { \clef "bass"; @@ -109,38 +102,38 @@ alt = r1 | r | r | - r8 [g'8 a b] [c . d32 c ] [b8 e ] | + r8 [g'8 a b] [c8. d32 c ] [b8 e ] | %% 5 [a, d ] ~ [d 16 e d c ] [b8 c ~ c bes8] | [a d g, c ] r16 [a16 b c ] d 4 | - g,4 r8 g8 [a b] [c . d32 c ] | + g,4 r8 g8 [a b] [c8. d32 c ] | [b8 e a, d ] ~ [d 16 e d c !] [b!8 e ] ~ | e 4 d 4 [c 16 b c a] [e' d c b] | %% 10 [c 16 a b c ] [d c b a] g4 r4 | r1 | - r8 [e8 fis gis] [a. b32 a] [gis8 c ] | + r8 [e8 fis gis] [a8. b32 a] [gis8 c ] | [fis, b] ~ [b16 c b a] gis8 a4 gis8 | - a4 r8 g8 [a b] c . [d32 c ] | + a4 r8 g8 [a b] c8. [d32 c ] | %% 15 - [b8 e a, d ] ~ [d' g,] d 4 | + [b8 e a, d (] [ ) d' g,] d 4 | [c 8 a] e' 4 d 8 r8 r4 | - r8 [a8 b cis ] [d . e32 d ] [c !8 f ] | + r8 [a8 b cis ] [d8. e32 d ] [c !8 f ] | [b,8 e ] ~ [e 16 f e d ] cis 8 r8 r4 | - r8 [a8 b cis ] [d . e32 d ] [c !8 fis ] | + r8 [a8 b cis ] [d8. e32 d ] [c !8 fis ] | %% 20 [b, e ] ~ [e 16 fis e d ] c 2 ~ | [c 16 d c b] [a g a fis] [g8 b c d ] | - [e . f32 e ] [d 8 g ] [c, f ] ~ [f 16 g f e ] | + [e8. f32 e ] [d 8 g ] [c, f ] ~ [f 16 g f e ] | d 4 [e 8 d ] ~ [d g,] g4 ~ - [g8 c, d e] [f. g32 f] [e8 a] | + [g8 c, d e] [f8. g32 f] [e8 a] | %% 25 [d, g] ~ [g16 a g f] [e d e f] [g a bes g] | [a e f g] [a b c a] b2 | c 1 | } -bass = +bass =\context Voice = bassvoice \notes \relative c { \clef "bass"; @@ -152,18 +145,18 @@ bass = r | %% 5 r2 r8 [c8 d e] | - [f. g32 f] [e8 a] [d, g] ~ [g16 a g f] | + [f8. g32 f] [e8 a] [d, g] ~ [g16 a g f] | [e f e d] [c d c b ] [a' 8 d a fis] | [g16 a bes g] [cis,8 d] a'4 e4 | [a16 b c d ] [c b a g] c 8 r8 r4 | %% 10 r2 r8 [g, 8 a b ] | - [c. d32 c] [b 8 e] [a, d] ~ [d16 e d c] | + [c8. d32 c] [b 8 e] [a, d] ~ [d16 e d c] | b 8 e4 d8 c f!4 e8 ~ | e d4 e8 [f! e16 d] e4 | a, 4 r4 r2 | %% 15 - r8 [g 8 a b ] [c. d32 c] [b 8 e] | + r8 [g 8 a b ] [c8. d32 c] [b 8 e] | [a, 8 d] ~ [d16 e d c] [b 8 bes a g'' ] | [a,, 8 fis' g e] d4 [e8 f!] | [g8. a32 g] [f8 bes] [e, a] ~ [a16 bes a g] | @@ -182,22 +175,22 @@ bass = \score { - \notes \context GrandStaff < - \context Staff = one < - \global + \notes \context PianoStaff < + \context Staff = one { + \time 4/4; + < \soprane \tenor - > - \context Staff = two < - \global + > \bar "|."; } + \context Staff = two { < \alt \bass - > - > + > \bar "|."; } + > \paper{ - gourlay_maxmeasures =5.; - castingalgorithme = \Wordwrap; + gourlay_maxmeasures = 7.; +% castingalgorithme = \Wordwrap; } % \midi { \tempo 4 = 84; } } diff --git a/mutopia/J.S.Bach/wtk1-prelude1.ly b/mutopia/J.S.Bach/wtk1-prelude1.ly index df8501f268..77af81893f 100644 --- a/mutopia/J.S.Bach/wtk1-prelude1.ly +++ b/mutopia/J.S.Bach/wtk1-prelude1.ly @@ -10,21 +10,16 @@ copyright = "Public Domain"; \version "1.1.52"; -global = - \notes { - \time 4/4; % should be \time C - } - - % should do programmable input. - soprane = \notes \transpose c'' { - \clef "violin"; - \context Staff < % Real soprane - {\stemup + \context Voice = uVoice { + \time 4/4; + \clef "violin"; + + \stemup r8 [g16 c'] [e' g c' e'] r8 [g16 c'] [e' g c' e'] | r8 [a16 d'] [f' a d' f'] r8 [a16 d'] [f' a d' f'] | r8 [g16 d'] [f' g d' f'] r8 [g16 d'] [f' g d' f'] | @@ -33,9 +28,9 @@ soprane = r8 [fis16 a] [d' fis a d'] r8 [fis16 a] [d' fis a d'] | r8 [g16 d'] [g' g d' g'] r8 [g16 d'] [g' g d' g'] | r8 [e16 g] [c' e g c'] r8 [e16 g] [c' e g c'] | - r8 [e16 g] [c' e g c'] r8 [e16 g] [c' e g c'] |} + r8 [e16 g] [c' e g c'] r8 [e16 g] [c' e g c'] } % Tenor - {\stemdown + \context Voice = dVoice {\stemdown r16 e8. ~ e4 r16 e8. ~ e4 | r16 d8. ~ d4 r16 d8. ~ d4 | r16 d8. ~ d4 r16 d8. ~ d4 | @@ -74,7 +69,7 @@ soprane = r8 [f,16 a,] [c f c a,] [c a, f, a,] [f, d, f, d,] | r8 [g16 b] [d' f' d' b] [d' b g b] [d f e d] | - || + \bar "|."; } bass = @@ -94,7 +89,7 @@ bass = a a | %% 10 \context Staff < - % Alt + \context Voice = Alt {\stemup r16 a8. ~ a4 r16 a8. ~ a4 | r16 b8. ~ b4 r16 b8. ~ b4 | @@ -126,7 +121,7 @@ bass = r16 b,8. ~ b,4 ~ b,2 | c1 ||} - % Bass + \context Voice = Bass {\stemdown d2 d | g g | @@ -156,22 +151,15 @@ bass = c, c, | c, c, | - c,1 }> + c,1 \bar "|."; }> } \score { - \notes \context GrandStaff < - < - \global - \soprane - > - < - \global - \bass - > - > - + \notes \context PianoStaff < + \soprane + \bass + > \paper{ gourlay_maxmeasures =5.; } @@ -181,3 +169,4 @@ bass = } % EOF + diff --git a/mutopia/J.S.Bach/wtk1-prelude2.ly.m4 b/mutopia/J.S.Bach/wtk1-prelude2.ly.m4 deleted file mode 100644 index 617f681e58..0000000000 --- a/mutopia/J.S.Bach/wtk1-prelude2.ly.m4 +++ /dev/null @@ -1,84 +0,0 @@ -%% under construction - -define(preludepattern, `[' $1 $2 $3 $2 `]') -define(preludehalfmeasure, preludepattern($1, $2, $3) - preludepattern($4, $2, $3)) - -define(intromeasure, - preludehalfmeasure($1, $2, $3, $4) - preludehalfmeasure($1, $2, $3, $4)| -) -define(handymeasure, `intromeasure(translit($*,` ', `,'))') - - - -trebleIntro=\notes \transpose c'' { -handymeasure(c' es d c) -handymeasure(as f e c) -handymeasure(b f es d) -handymeasure(c g f es) -handymeasure(es' as g es) -handymeasure(d' fis e d) -handymeasure(d' g fis d) -handymeasure(c' e d c) -handymeasure(c' f e c) -handymeasure(bes f es d) -handymeasure(bes g f es) -handymeasure(as g f es) -handymeasure(as d c Bes) -handymeasure(g Bes As es) -handymeasure(f c Bes A) -handymeasure(f d c B) -handymeasure(es c B G) -handymeasure(F es d f) -handymeasure(Fis c b es) -handymeasure(es c B G) -handymeasure(fis c B A) -handymeasure(g c B d) -handymeasure(as c B d) -} - -bassIntro = \notes { -handymeasure(c g f es) -handymeasure(c as g f) -handymeasure(c as g f) -handymeasure(c es d g) -handymeasure(c c' bes as) -handymeasure(c a g fis) -handymeasure(Bes bes a g) -handymeasure(Bes g f e) -handymeasure(As as g f) -handymeasure(As d c f) -handymeasure(G es d g) -handymeasure(c es d As) -handymeasure(d f es as) -handymeasure(es g f as) -handymeasure(es a g f) -handymeasure(d f es as) -handymeasure(c f e as) -preludehalfmeasure(c, es, d, f) -preludehalfmeasure(bes, es, d, f)| -handymeasure(As c b d) -handymeasure(A es d c) -handymeasure(G es d f) -handymeasure(G es d c) -handymeasure(G es d f) -handymeasure(G es d f) -} - - -middlepiece = \notes -{ - \stemdown - [G B d] - \stemup f [as f ef] [b f d' b'] [as f e f] | - \stemdown [G c es]] - \stemup g [c' g fis g ] [es' c' g' es'] [c' as g as]| - \stemdown [G A fis] - \translator Staff=treble - \stemsboth \transpose c'' { c [es c B c] [fis c a fis] [es c B c] } -} - - - - diff --git a/mutopia/los-toros-oboe.ly b/mutopia/los-toros-oboe.ly deleted file mode 100644 index 6152042ead..0000000000 --- a/mutopia/los-toros-oboe.ly +++ /dev/null @@ -1,311 +0,0 @@ -\header{ -filename = "los-toros-oboe.ly"; -title = "La Feria"; -subtitle = "Los Toros"; -opus = ""; -composer = "Paul Lac\\^ome dEstalenx (1838-1920)"; -enteredby = "jcn"; -copyright = "public domain"; -latexheaders= "headers"; -} -\version "1.1.52"; - - - -\include "paper16.ly" - -hoboonestart = \notes - \relative c'{ -% ugh: cant copy: allegro/primo tempo - \property Voice . textStyle = "large" - [es''16-.^"Allegro" es-. es-. es-.] [es8-. d-.] | - \property Voice . textStyle = "italic" -} - -hobooneintro = \notes \relative c'{ - -% \property Voice . textStyle = "roman" -% [es''16-.-"Allegro" es-. es-. es-.] [es8-. d-.] | -% \property Voice . textStyle = "italic" - [f''8.-> es16(] [)d8 c-.] | - [bes16( c d es] [)d8 c-.] | - [bes-. as->~] [as16( g f g] | - [as bes c d] [)es8 c-.] | - [d8-. c16( bes] )as4 ~ | - [as16 g( f g] [as c bes as] | -% [)g8 as16 g(] [)f8 g16( f] | - [)g8 as16 g(] [)f8 g16( f] | - [)es8 f16-. g-.] [as-. bes-. c-. d-.] | - [es-. es-. es-. es-.] [es8-. d-.] | - [f8.-> es16(] [)d8 c-.] | - [bes16( c d es] [)d8 c-.] | - [bes8 a->~] [a16 g( fis g] | - [a bes c d] [)es8 d16()c] | - [bes-. g-. bes-. d-.] g4-> ~ | - [g16 f( es d] [c es d c] | - [)bes8 c16( bes] [)a8 bes16( a] | - [)g8 r d'] r | -} - -hoboonemid = \notes \relative c'{ - - [g'16-. g-. g-. g-.] [g8-. f-.] | - as2-> | - [as16-. as-. as-. as-.] [as8-. g-.] | - bes2-> | - [bes16-. bes-. bes-. bes-.] [bes8-. c] | - - r-"cresc." [d8-. r c-.] | - r\f [d-. es-. f-.] | - [g8.-> es16] [bes8 g] | - - % four measures copied from 8 measures back... - [g16-.\p g-. g-. g-.] [g8-. f-.] | - as2-> | - [as16-. as-. as-. as-.] [as8-. g-.] | - bes2-> | - [b16-. b-. b-. b-.] [b8-. c-.] | - - % same measure - [b16-. b-. b-. b-.] [b8-. c-.] | - - [b8-.-"cresc." c-. b-. c-.] | - [d-. es-. d-. es-.] | - [f\f-. g-. f-. g-.] | - [as-.\< g-. as-. bes-.] | - [\!g16\ff-. g-. g-. g-.] [g8-. g-.] | - [g8.-> g16] [g8 g] | - [g8.-> g16] [g8 g] | - [f8.-> f16] [f8 f] | - [f8.-> f16] [f8 f] | - [bes8-. as16( g] )f4 ~ | - [f16 es( d es] [f as g )f] | - [es( g f es] [d f es d] | - [c es d c] [b d c b] | - [a c bes a] [g bes a g] | - [fis a g fis] [e g fis )e] | - % `a deux - [d8 d'] [es8.-> c16] | - [a8 bes g es] | - [c' d es8. bes16] | - [g8 es bes' c,] | - [d16-. d-. d-. d-.] [d8.-. es16->] | - [d'16-.-"cresc." d-. d-. d-.] [d8.-. es16->] | - [d16-. d-. d-. d-.] [d8.-. es16->] | - [d16 d d d] [d8 es16-.] r16-\fermata^"court"^"tr\\`es" | - % Un peu plus lent. - \property Voice . textStyle = "bold" - -% ugh -% d4(\<^"Un peu plus lent" \property Voice . textStyle = "italic _"tr\\`es \\'el\\'egant" -% d4(\^"Un peu plus lent et \\'el\\'egant"< - \property Voice . textStyle = "italic" - d4(\< - [e8 \!fis8] | -% [)b-. a-.] [g16( fis e )d] | - \property Voice . textStyle = "bold" - [)b-.^"Un peu plus lent et \\'el\\'egant" a-.] [g,,16( fis' e )d] | - \property Voice . textStyle = "italic" - [d( c b\< c] [)\!fis'8-. e-.] | - d,,4-> ~ [d16 e( fis g] | - [a b\< d fis] [)\!a8-. g-.] | - [fis16( e a, )c] e4 ~ | - [e16 d( e, c'] [)b8-. a-.] | - g2 ~ | - [g8 \times 2/3 { d16( e fis ] } [)g8 d'-.] | - b2-> ~ | - [b8 \times 2/3 { d,16( e fis ] } [)g8-"cresc. poco" e'-.] | - e2-> ~ | - [e8 \times 2/3 { d,,16( e fis ] } [)g8\f d'-.] | - [d8.-> b'16-.] [g16-. d-. b-. c-.] | - [d-. e-. fis-. a-.] [g8-. e-.] | - fis2-> ~ | - [fis16 g-.\< a-. b-.] [\!c8-. c,-.] | - [es8.->(-"espress.") d16] d4 ~ | - [d16 e( fis a] [)g8 b,-.] | - [b8.->( )c16] c4 ~ | - [c16\< cis( d \!dis] [)e8-.-"dim." fis,-.] | - [fis8.->( g16] )g4 ~ | - - % (only notes! of) five measures copied from 14 measures above - [g8 \times 2/3 { d16( e fis ] } [)g8 d'-.] | - b2->-"cresc." ~ | - [b8 \times 2/3 { d,16( e fis ] } [)g8 e'-.] | - e2-> ~ | - [e8 \times 2/3 { d,,16(_"h\\^atez" e fis ] } [)g8\f d'-.] | - [d8.-> b16-.] [g16-.-"cresc." d'-. b-. c-.] | - [d16\f\< e-. fis-. g-.] [a-. b,-. c-. \!d-.] -} - - -hoboonesecondstart = \notes \relative c'{ - -% ugh: cant copy: allegro/primo tempo - \property Voice . textStyle = "large" - [es''16-.\ff^"Tempo 1$^o$" es-. es-. es-.] [es8-. d-.] | - \property Voice . textStyle = "italic" - -} - -hoboonelast = \notes \relative c'{ - % could transpose/copy from measure 19... - [d''16-.\p d-. d-. d-.] [d8-. c-.] | - es2-> | - [es16-. es-. es-. es-.] [es8-. d-.] | - f2-> | - [f16-. f-. f-. f-.] [f8-. g-.] | - r8 [a-.-"cresc." r g-.] | - r [a-.\f bes-.\< \!c-.] | - [d8.->\> \!bes16] [f8 d] | - - % four measures copied from 8 measures back... - [d16-.\p d-. d-. d-.] [d8-. c-.] | - es2-> | - [es16-. es-. es-. es-.] [es8-. d-.-"cresc."] | - f2-> | - [fis16-.\p fis-. fis-. fis-.] [fis8-. g-.] | - % same measure - [fis16-.\p fis-. fis-. fis-.] [fis8-. g-.] | - [fis8-. g-. fis-. g-.] | - [a-. bes-. a-. bes-. ] | - [a-.\f bes-. a-. bes-. ] | - [c-.-"cresc." f,-. g-. a-.] | - [bes-. bes-. ces8.-> as16] | - [f8-. ges-. es-. ces-.] | - % `a deux - [as-. bes-. ces8.-> ges16] | - [es8-. ces'-. ges-. as-.] | - bes\p r r4 | - [bes16-.-"cresc." bes-. bes-. bes-.] [bes8-. ces->] | - % same measure - [bes16-. bes-. bes-. bes-.] [bes8-. ces->] | - [bes'16-.\ff bes-. bes-. bes-.] [bes8-. ces16->] r16^"court"-\fermata | - % ugh: eight measures rest (ugh: r1 -> four beats...) - % eiht measures rest.. - \property Voice . textStyle = "bold" -% r2^"Un peu plus lent et \\'el\\'egant" - R2*8 -% r4 r8\p bes | - r4^"Un peu plus lent et \\'el\\'egant" - r8\p bes,, | -% g2->^"Un peu plus lent et \\'el\\'egant" ~ | - g2-> ~ | - \property Voice . textStyle = "italic" - g8 r r c | - c2-> ~ | - c8 r r bes'\f | - [bes8.->\f g16-.] [es16-. bes-. g-. as-.] | - [bes-.-"dim." c-. d-. f-.] [es8-. c-.] | - d2-> ~ | - [d16-"dim."( es f g] [)as,8 as-.] | - [ces8.->\p( )bes16-.] bes4 ~ | - [bes16( c! d f] [)es8 g,-.] | - [g8.->( )as16] as4 ~ | - [as16( a bes b] [)c8-. d,-.] | - % a deux - [d8.->( ) es16] es4 ~ | - es4 r8 bes'-. | - g2-> ~ | - g8 r r c | - c2 ~ | - c8 r r bes' | - [bes8.-> g16-.] [es16-. bes-. g-. as-.] | - [bes-. c-. d-. es-.] [f-. g-. as-. bes-.] | - d8-. r c4-> ~ | - [c16 f,-. g-. a-.] [bes-. c,-. d-. es-.] | - g8-. r f4-> ~ | - [f16 bes,-. c-. d-.] [es-. f-. g-. as-.] | - c8 r bes4 ~ | - [bes8 as-. g8.-. e16-.] | - g8-. r f4-> ~ | - [f8 es-. ces8.-. as16-.] | - % `a deux - \property Voice . textStyle = "large" - [ces8.->^"Plus vite" bes16-.(] [a bes es d] | - \property Voice . textStyle = "italic" - [)c!8.-> bes16] [a( bes es )d] | - [c->( bes es )d] [c->( bes es )d] | - % same measure - [c->( bes es )d] [c->( bes es )d] | - [c( bes a bes] [c d es e] | - [g )f d( es] [f g as a] | - [c )bes bes,( c] [d es f g] | - [as g f g] [as bes c d] | - \property Voice . textStyle = "large" - [)es-.^"Tempo 1$^o$" g,-. g-. g-.] [g8-. g-.] | - \property Voice . textStyle = "italic" - bes4.-> g8-. | - gis2->( | - )as! | - [g16-. g-. g-. g-.] [g8-. g-.] | - bes4.-> g8-. | - gis2->( | -% )as! | - )as | - [bes16-. bes-. bes-. bes-.] [bes8-. bes-.] | - bes4.-> g8-. | - [g16-._"h\\^atez" g-. g-. g-.] [g8-. g-.] | - g4.-> g8-. | - es4.-> es8-. | - bes4.-> bes8-. | - \property Voice . textStyle = "large" - g'4.->^"Presto" g8-. | - \property Voice . textStyle = "italic" - es4.-> es8-. | - [bes-. bes-. es-. g-.] | - [bes-. bes,-. es-. g-.] | - bes-. r r4 | - g8-. r r4 | - g8-. r r4 | -} - -hoboone = \notes { - \hoboonestart - \hobooneintro - \hoboonemid - \hoboonesecondstart - \hobooneintro - \hoboonelast -} - -global = \notes{ - \key es; - \time 2/4; - \skip 4*110; - \key g; | - \bar "||"; - \skip 4*58; - \key es; | - \bar "||"; - \skip 4*220; - \bar "|."; -} - - -$staff_hoboone = \context Staff = hoboonestaff < - \global - \property Staff.instrument = "oboe" - % don't expand multi-bar rest - \property Score.skipBars = 1 - \hoboone -> - -a4 = \paper{ - \translator{ \BarNumberingStaffContext } -} - -a4sixteen = \paper{ - \paper_sixteen - linewidth= 193.\mm; - \translator { \BarNumberingStaffContext } -} - -\score{ - \$staff_hoboone - \paper{ \a4 } - \midi{ - \tempo 4 = 80; - } -% \paper{ \a4sixteen } -} - diff --git a/ps/lilyponddefs.ps b/ps/lilyponddefs.ps index 6f2666422e..a1a0d94f90 100644 --- a/ps/lilyponddefs.ps +++ b/ps/lilyponddefs.ps @@ -60,27 +60,8 @@ yoffset mudelapaperstaffheight 8 mul sub /yoffset exch def } bind def -/unknown { (U) setbold } bind def -/empty { (E) setbold } bind def - /turnOnExperimentalFeatures { } bind def -/rulesym % thick length -{ - gsave - exch setlinewidth - 0 lineto stroke - grestore -} bind def - -(lily.ps) findlibfile -{ - exch pop //systemdict /run get exec -} -{ - /undefinedfilename signalerror -} ifelse - stafflinethickness setlinewidth % see if we're there... diff --git a/scm/lily.scm b/scm/lily.scm index 1e66463e58..1974a009fc 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -105,7 +105,7 @@ (("Clef_item" "Span_bar") . (minimum_space 3.7)) (("Time_signature" "Span_bar") . (minimum_space 2.0)) (("Key_item" "Span_bar") . (minimum_space 2.5)) - (("Staff_bar" "Time_signature") . (minimum_space 2.0)) ;double check this. + (("Staff_bar" "Time_signature") . (minimum_space 1.5)) ;double check this. (("Time_signature" "begin-of-note") . (extra_space 2.0)) ;double check this. (("Key_item" "begin-of-note") . (extra_space 2.5)) (("Staff_bar" "begin-of-note") . (extra_space 1.0)) @@ -236,7 +236,7 @@ ;; UGH - (define (header-end) "\\turnOnPostScript") + (define (header-end) "\\input lilyponddefs \\turnOnPostScript") (define (header creator generate) (string-append @@ -473,7 +473,14 @@ (define (font-switch i) (string-append (font i) " ")) - (define (header-end) "") + (define (header-end) + (string-append + (ly-gulp-file "lilyponddefs.ps") + " {exch pop //systemdict /run get exec} " + (ly-gulp-file "lily.ps") + "{ exch pop //systemdict /run get exec } " + )) + (define (lily-def key val) (if (string=? (substring key 0 (min (string-length "mudelapaper") (string-length key))) "mudelapaper") diff --git a/scripts/abc2ly.py b/scripts/abc2ly.py index dd4bcf2637..dead360f7e 100644 --- a/scripts/abc2ly.py +++ b/scripts/abc2ly.py @@ -80,9 +80,10 @@ def dump_voices (): print ("}") def dump_score (): - print ("\\score{") - print (" \\notes<") - print (" \\global") + print r"""\score{ + \notes< + \global""" + for i in range (len (voices)): print (" \\context Staff=%s \\voice%s" % (names [i], names [i])) @@ -90,7 +91,7 @@ def dump_score (): j = i if j >= len (voices): j = len (voices) - 1 - print (" \\context Lyrics=%s \\rhythm \\voice%s \\verse%s" % + print (" \\context Lyrics=%s \\addlyrics \\voice%s \\verse%s" % (names [i], names [j], names [i])) print (" >") dump_header (header) @@ -525,7 +526,6 @@ def try_parse_chord_delims (str): return str -# urg, hairy to compute grace note hack using \times{} def try_parse_grace_delims (str): if str and str[0] == '{': str = str[1:] diff --git a/scripts/convert-mudela.py b/scripts/convert-mudela.py index bb957a03af..a36b83edf9 100644 --- a/scripts/convert-mudela.py +++ b/scripts/convert-mudela.py @@ -470,7 +470,7 @@ outfile_name = '' identify () (options, files) = getopt.getopt ( - sys.argv[1:], 'f:t:seh', ['show-rules', 'help', 'edit', 'from', 'to']) + sys.argv[1:], 'o:f:t:seh', ['output', 'show-rules', 'help', 'edit', 'from', 'to']) for opt in options: o = opt[0] @@ -486,6 +486,8 @@ for opt in options: elif o== '--show-rules' or o == '-s': show_rules (sys.stdout) sys.exit(0) + elif o == '--output' or o == '-o': + outfile_name = a else: print o raise getopt.error diff --git a/scripts/mudela-book.py b/scripts/mudela-book.py index 869b7907ac..3044ea0389 100644 --- a/scripts/mudela-book.py +++ b/scripts/mudela-book.py @@ -68,15 +68,21 @@ # - changed RE to search for pre/postMudelaExample to make it possible to # comment out a definition. # - use sys.stderr and sys.stdout instead of print +# 1.1.62 +# - junked separate versioning +# - pass -I options to lily. +# - portability stuff (os.sep). + import os import string import re import getopt import sys +import __main__ outdir = 'out' initfile = '' -program_version = '0.5.6' +program_version = '@TOPLEVEL_VERSION@' include_path = ['.'] out_files = [] @@ -162,6 +168,7 @@ def need_recompile_b(infile, outfile): def compile (command, workingdir, infile, outfile): "Test if infile is newer than outfile. If so, cd to workingdir" "and execute command" + print "COMPILE!!" indate = file_mtime (workingdir+infile) try: outdate = file_mtime (workingdir+outfile) @@ -381,8 +388,18 @@ class Tex_output: for g in g_vec: if need_recompile_b(outdir+g[1]+'.ly', outdir+g[1]+'.tex'): s = s + ' ' + g[1]+'.ly' + + lilyoptions = '' + for inc in __main__.include_path : + p = inc[:] + if p[0] <> os.sep and outdir: # UGH-> win32 ? + p = '..' + os.sep + p + lilyoptions = lilyoptions + " -I \"%s\"" % p + if s != '': - e = os.system('cd %s; lilypond %s' %(outdir, s)) + cmd = 'cd %s; lilypond %s %s' %(outdir, lilyoptions, s) + sys.stderr.write ('invoking command %s' % cmd) + e = os.system(cmd) if e: sys.stderr.write("error: lilypond exited with value %i\n" % e) sys.exit(e) @@ -758,8 +775,8 @@ def main(): Props.force_verbatim_b = 1 elif o == '--init': initfile = a - if outdir[-1:] != '/': - outdir = outdir + '/' + if outdir[-1:] != os.sep: + outdir = outdir + os.sep # r""" ... """ means: leave escape seqs alone. defined_mudela_cmd = {'mudela': r""" -- 2.39.2