From 0dc651561ed849b121d26cbd07a192e9fefeb832 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 30 Jun 1997 13:40:05 +0200 Subject: [PATCH] release: 0.0.70pre --- .version | 4 +- ANNOUNCE | 40 +++++---- BUGS | 13 +++ Documentation/index.pod | 2 +- Documentation/lilyliterature.pod | 28 ++++--- Documentation/other-packages.pod | 5 ++ NEWS | 43 ++++++++-- TODO | 31 ++----- bin/conflily | 2 +- bin/convert-mudela | 34 ++++++-- bin/make_website | 17 ++-- bin/release | 18 ++-- configure | 2 +- flower/.version | 2 +- flower/NEWS | 2 + flower/include/list.hh | 1 + flower/include/list.tcc | 10 ++- flower/include/plist.hh | 1 + flower/include/virtual-methods.hh | 11 +-- init/register.ini | 1 - init/script.ini | 50 +++++------ init/symbol.ini | 2 +- init/table_sixteen.ini | 18 ++-- input/cadenza.ly | 8 +- input/collisions.ly | 39 +++++++-- input/header.ly | 2 +- input/multi.ly | 17 +++- input/rests.ly | 42 ---------- input/scales.ly | 9 +- input/scsii-menuetto.ly | 42 +++++----- input/slurs.ly | 12 ++- input/standchen.ly | 31 +++---- input/toccata-fuga-E.ly | 11 +-- input/wohltemperirt.ly | 8 +- lily/.version | 4 +- lily/Stable.make | 2 +- lily/beam.cc | 30 ++++--- lily/break-align-item.cc | 1 + lily/collision.cc | 1 + lily/crescendo.cc | 2 - lily/head-reg.cc | 6 +- lily/horizontal-align-item.cc | 13 ++- lily/identifier.cc | 2 +- lily/include/bar.hh | 2 +- lily/include/beam.hh | 2 +- lily/include/break-align-item.hh | 2 +- lily/include/clef-item.hh | 2 +- lily/include/crescendo.hh | 2 +- lily/include/elem-group-item.hh | 4 +- lily/include/general-script-def.hh | 2 +- lily/include/horizontal-align-item.hh | 13 ++- lily/include/interpreter.hh | 11 ++- lily/include/key-item.hh | 2 +- lily/include/lookup.hh | 2 +- lily/include/meter.hh | 2 +- lily/include/music-iterator.hh | 10 +++ lily/include/music-list.hh | 10 +-- lily/include/music.hh | 2 +- lily/include/note-head.hh | 2 + lily/include/register-group.hh | 10 ++- lily/include/request.hh | 4 +- lily/include/rest-collision.hh | 1 + lily/include/score-align-reg.hh | 6 +- lily/include/score-elem.hh | 13 ++- lily/include/scoreline.hh | 2 +- lily/include/script-def.hh | 8 +- lily/include/script.hh | 8 +- lily/include/slur.hh | 2 +- lily/include/spanner-elem-group.hh | 2 +- lily/include/spanner.hh | 2 +- lily/include/staff-sym.hh | 2 +- lily/include/staffline.hh | 2 +- lily/include/text-def.hh | 3 +- lily/include/text-spanner.hh | 5 +- lily/include/tie.hh | 2 +- lily/include/voice-group-regs.hh | 1 - lily/include/voice-regs.hh | 2 - lily/interpreter.cc | 20 +++++ lily/lookup.cc | 4 +- lily/music-iterator.cc | 115 +++++++++++++++++++++----- lily/musical-request.cc | 11 ++- lily/note-column.cc | 1 + lily/notehead.cc | 68 +++++++++++---- lily/p-col.cc | 5 +- lily/p-score.cc | 8 ++ lily/parser.y | 22 ++--- lily/register-group.cc | 29 ++++++- lily/rest-collision.cc | 6 ++ lily/rest-column.cc | 11 ++- lily/score-align-reg.cc | 5 +- lily/score-align-regs.cc | 3 +- lily/score-elem.cc | 23 ++++-- lily/score-halign-reg.cc | 10 ++- lily/score-reg.cc | 1 - lily/score.cc | 7 +- lily/script-column.cc | 21 +++-- lily/script-def.cc | 18 ++-- lily/script-reg.cc | 4 +- lily/script.cc | 40 +++++++-- lily/staff-side.cc | 8 +- lily/symtable.cc | 3 +- lily/text-def.cc | 9 ++ lily/text-reg.cc | 2 + lily/text-spanner.cc | 29 ++++--- lily/tie-reg.cc | 1 + lily/vertical-align-elem.cc | 2 +- lily/voice-group-regs.cc | 12 --- lily/voice-regs.cc | 11 --- make/lilypond.lsm | 6 +- make/lilypond.spec | 6 +- tex/dimen.tex | 3 +- tex/lilyponddefs.tex | 2 + tex/taupindefs.tex | 7 +- 113 files changed, 839 insertions(+), 458 deletions(-) create mode 100644 BUGS delete mode 100644 input/rests.ly create mode 100644 lily/interpreter.cc diff --git a/.version b/.version index 4bbb128a6d..32b8cd6abf 100644 --- a/.version +++ b/.version @@ -1,7 +1,7 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 0 -TOPLEVEL_PATCH_LEVEL = 68 +TOPLEVEL_PATCH_LEVEL = 70 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf -TOPLEVEL_MY_PATCH_LEVEL =pre.jcn1 +TOPLEVEL_MY_PATCH_LEVEL = pre diff --git a/ANNOUNCE b/ANNOUNCE index db7636e52b..7b4d64deed 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,26 +1,36 @@ -[DRAFT] - Born .. 1997, + We are proud to announce the birth of "GNU LilyPond 0.1", a.k.a. Lily - GNU LilyPond 0.1, daughter to + born .. 1997 - Jan 'Janneke' Nieuwenhuizen and Han-Wen 'Wendy' Nienhuys + daughter to Jan 'Janneke' Nieuwenhuizen and Han-Wen 'Wendy' + Nienhuys -Lily is a health baby weighing 330 kilobyte +Lily is a healthy, bouncing baby weighing 340 kilobytes -Visiting hours: 24hrs a day at ftp://, pictures & droppings at http:// +Visiting hours: 24hrs a day at -Congratulations to janneke & wendy, hanwen@stack.nl, jan@digicash.com + ftp://pcnov095.win.tue.nl, -************************** +you can see some diapers and pictures at - I would like to dedicate this program to all friends that -music got me. Those deserving special mention (In no particular order) + http://www.stack.nl/~hanwen/lilypond/index.html + +You can send your congratulations to Janneke (jan@digicash.com) and +Wendy (hanwen@stack.nl) + + --- * --- + + We would like to dedicate this program to all the friends that we + met through music. + + + Those deserving special mention (in no particular order): Esther, Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn, -Maartje, Suzanne, Ilse (gee, again?), and last (but certainly not -least) Janneke! +Maartje, Suzanne, Ilse (gee, again?), most members of the Eindhovens +Jongeren Ensemble and last (but certainly not least) Janneke! HW @@ -30,8 +40,10 @@ Ruth, Eva, Fro/ydis, Monique, Noor, Sascha, Monique, Ilse, Monique, Eva, Roos, Judith, and, of course, Wendy! JCN + + --- * --- -************************** +[ And now the serious part ] Announcing @@ -108,7 +120,7 @@ dynamics (both absolute and hairpin style) clef changes, meter changes, cadenza-mode, key changes, repeat bars [Kudos to the FSF, all linux hackers, and --of course-- especially -GrandMaster Linus T, for the OS and The Announce :-] +GrandMaster Linus T, for the OS-kernel and The Announce :-] Han-Wen Nienhuys Jan Nieuwenhuizen diff --git a/BUGS b/BUGS new file mode 100644 index 0000000000..b0b28cd6d1 --- /dev/null +++ b/BUGS @@ -0,0 +1,13 @@ +This file documents bugs which were "re-introduced" in various pl's + + +pl69 + * scales.ly + + * slurs.ly + +pl68: + + * lyrics broken, + + * midi broken diff --git a/Documentation/index.pod b/Documentation/index.pod index c308cf9447..ebaae8553f 100644 --- a/Documentation/index.pod +++ b/Documentation/index.pod @@ -59,7 +59,7 @@ internal structures. =item * -resources on music typesetting +Papers, books and online-resources on music typesetting diff --git a/Documentation/lilyliterature.pod b/Documentation/lilyliterature.pod index 5293ff3945..e92cb72a9a 100644 --- a/Documentation/lilyliterature.pod +++ b/Documentation/lilyliterature.pod @@ -10,10 +10,6 @@ note that don't have access to most material. [What I do know, I've commented inside brackets. They are just my personal comments, not to be taken too seriously] -More on GNU Music: http://dept-info.labri.u-bordeaux.fr/~strandh/Gsharp - -Tablature: http://wabakimi.carleton.ca/~phacket2/guitar/tabfaq.html - =head2 References Wanske, Helene. ``Musiknotation --- Von der Syntax des Notenstichs @@ -45,7 +41,7 @@ processing'' (3rd edition). Hansen House, Miami Beach, FL. [This is about I i.e. professional music typesetting, and includes some good spacing tables] - + Read, Gardner. ``Modern Rhythmic Notation.'' Indiana University Press, 1978. Read, Gardner. ``Music Notation'' (2nd edition). Taplinger Publishing, @@ -105,8 +101,8 @@ L. Haken and D. Blostein, The Tilia Music Representation: Extensibility, Abstraction, and Notation Contexts for the Lime Music Editor, Computer Music Journal, Vol. 17, No. 3, 1993, pp. 43-58 -[A description of Lime internals (which resemble LilyPond pre 0.0.68 -data structures somewhat)] +[A description of Lime internals (which resemble older (before +0.0.68pre) LilyPond data structures somewhat)] L. Haken and D. Blostein, A New Algorithm for Horizontal Spacing of Printed Music, International Computer Music Conference, Banff, @@ -121,6 +117,13 @@ Communications of the ACM, VolJ34, No. 3, March 1991, pp. 88-99. [This paper provides a shallow overview of the algorithm used in LIME for spacing individual lines.] +Gary M. Rader, ``Creating Printed Music Automatically''. Computer Vol +29(6), June 1996, pp 61--69. + +[Describes a system called MusicEase, and explains that it uses +"constraints" (which go unexplained) to automatically position various +elements.] + =head2 Further reading Chlapik, Herbert. ``Die Praxis des Notengraphikers''. Doblinger, 1987. @@ -132,16 +135,21 @@ some of the conventions and difficulties in printing music] The University of Colorado Music Engraving page. http://obenamots.cc.colorado.edu/cgi-bin/Musicpress/engraving.html +More on GNU Music: http://dept-info.labri.u-bordeaux.fr/~strandh/Gsharp + +Tablature: http://wabakimi.carleton.ca/~phacket2/guitar/tabfaq.html + + (of varying usefulness): Donato, Anthony. Preparing Music Manuscript. Englewood Cliffs: Prentice-Hall, 1963. Donemus. "Uitgeven van muziek". Donemus Amsterdam, 1900 - + Heussenstamm, George. The Norton Manual of Music Notation. New York: Norton, 1987. - + Karkoshka, Erdhard. Notation in New Music. Trans. Ruth Koenig. New York: Praeger Publishers, 1972. Out of print. @@ -157,7 +165,7 @@ C. Roemer, The Art of Music Copying. Roerick music co., Sherman Oaks (CA), 1973. Rosecrans, Glen. Music Notation Primer. New York: Passantino, 1979. - + Stone, Kurt. Music Notation in the Twentieth Century. New York: Norton, 1980. =head2 other stuff diff --git a/Documentation/other-packages.pod b/Documentation/other-packages.pod index 72d3a2bb3e..fc3a2585cd 100644 --- a/Documentation/other-packages.pod +++ b/Documentation/other-packages.pod @@ -24,6 +24,11 @@ Jan Nieuwenhuizen, Using TeX and the MusiXTeX macro package to write parts and scores of music. Department of Physics, Eindhoven University of Technology, 1995. +MusicEase, ftp://ftp.secret.com/ad-ftp + +Described in Computer vol 29(6) + + MusE diff --git a/NEWS b/NEWS index 7f2e534581..5ac7e17c28 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,32 @@ +june 30 +pl 70pre + - bf: text Script + - bf: Script::dir_i_ checks. + - bf: script stacking + - bf: Text_spanner::do_subst. + - bf: Text_spanner::Text_spanner(Text_spanner&) + - bf: script priority read from script.ini + - bf: Script_def::do_equal_b + - bf: script dims. + - mudela: ; obligatory for \paper {}. + - some cosmetic changes involving RTTI macros + +******* +june 29 +pl 69pre + - bf: whole rest position, whole/half rest dots. + - bf: scripts + - reg termination + - centered bars + - bf: init of Tie::dir_i_ + - bf: Staff_side depends on staff_sym_ + - bf: Script::do_substitute_dependency() now implemented + - more print info (also in output) + - bf: Vertical_align_element + - stemless beams now allowed (with warning) + - bf: Rest_column::stem_l_ init + - merge rests.ly with collisions.ly + pl 67.jcn3 - rests under beam [c8 r c] @@ -10,7 +39,9 @@ pl 67.jcn1 - bf: mingw configure - re: conflily -pl 68 +****** +june 26 +pl 68pre - doco: other-packages.pod, lots of lilyliterature.pod - last duration mode now is default. - some OpusTeX stuff. @@ -19,7 +50,7 @@ pl 68 * separation of Y and X-elt-groups * Registers: info up: broadcasts, info down: get_xxx_info() * Registers: try_request works from bottom to top of tree. - * Score_elem invisible_b_ flag + * Score_elem empty_b_ and transparent_b_ flag * Junk Staff_column, and find the requests while walking the Voices. * Score_register @@ -35,15 +66,14 @@ pl 68 - bf: make_patch explanation - bf: make install TeX stuff - - new Beam/Stem code (WL) - mudela: . mandatory for REALs -****** -june 3 -pl 67.wl1 +pl 67 - damped beamslope after wanske +****** +june 3 pl 67 - sketch of Music classes - General_script_def as baseclass for Text_def and Script_def @@ -166,6 +196,7 @@ pl 61.jcn2 - mi2mu IP*list to Array (implications?!) conversion - mi2mu parsing speedup: backup rules for midi-lexer.l - bf: zero denominator + ********** may 14 pl 62 diff --git a/TODO b/TODO index f39f9c8491..4350bd6d0b 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -Features you cannot find in the doco as working, should be mentioned her. +Features you cannot find in the doco as working, should be mentioned here. This is an assorted collection of stuff that will be done, might be done, or is an idea that I want to think about @@ -6,15 +6,7 @@ done, or is an idea that I want to think about Most of the items are marked in the code as well, with full explanation. grep for TODO and ugh/ugr -bugs introduced in pl68: - - * lyrics broken, - - * midi broken - - * scripts broken - -IMPORTANT + * * piano staff @@ -28,7 +20,7 @@ IMPORTANT * decent TeX page layout - * script priority + * enter script priority * a Hands on tutorial [HKN] @@ -58,7 +50,6 @@ PROJECTS - PostScript output (esp. Beams, Slurs, etc) - Move PScore, Items, Spanners etc. into libmutype.a - * separate Score_elem settings in user-settable (properties .. ) and non-user-settable part. Maybe use something like X-resources: "Staff=oboe*dir: 0", "Staff=*.Voice_group=solo*dir: 1" @@ -94,7 +85,6 @@ PROJECTS - hack up mf sources for decent spacing info (and then read AFM/TFM directly, for text too) - * lines: - Ledger lines, should be separate item: Ledger_lines, Ledger_lines_reg - set different line sizes / thicknesses @@ -104,7 +94,7 @@ PROJECTS * Collisions - bring Collision::do_pre_processing to haircutter - left/right note balls should be handled by Collision: - < \multivoice { \stem 1; } { } > + < \multi 2; { \stem 1; } { } > * Keys: - merge key{item} & localkey{item}? @@ -122,19 +112,14 @@ HKN buglist: tekst staat erg ver van notenbalken af -waarom geen ; achter dingen in \paper? (\textwidth 180\mm) -(sowieso: wanneer wel en geen ; ?) - Onduidelijk wanneer wel en geen \ voor een woord. Maak liever verplichte regels - BUGS - * spurious Weird stem size warnings - * staccato dot positions. + * spurious Weird stem size warnings - * stacked scripts. + * fix mysterious Flex malloc bug * should adjust stemlength for flag number. @@ -206,7 +191,7 @@ SMALLISH PROJECTS * A range for context errors (eg. mark both { and }. ) - * text in staff (sharpsharp in staff, text below) + * lyric in staff (sharpsharp in staff, text below) * fix Egler definitions ( see tex/eglerdefs.tex ) @@ -275,7 +260,6 @@ SMALLISH PROJECTS * script-spacing * Brackets - * use (char *) iso. String for communication between lexer and parser. @@ -348,7 +332,6 @@ IDEAS * Spacing_request for manually adjusting spacing - * caching breakpoints * #c <-> cis diff --git a/bin/conflily b/bin/conflily index a7e86b127a..53c6cf6580 100644 --- a/bin/conflily +++ b/bin/conflily @@ -24,5 +24,5 @@ then export LILYINCLUDE=$root/lelie/init fi -configure --prefix=$HOME --enable-debugging --enable-printing --enable-checking +configure --prefix=$root --enable-debugging --enable-printing --enable-checking diff --git a/bin/convert-mudela b/bin/convert-mudela index 4ae7f6f57c..744059c67c 100755 --- a/bin/convert-mudela +++ b/bin/convert-mudela @@ -4,6 +4,8 @@ detect \lyrics and \melodic, and do substitution accordingly. count <> and {} ? + +Ugh . Perl sux. Anybody for Python? =cut @@ -21,13 +23,18 @@ $convert_mudela_version = "0.1.1"; use Getopt::Long; +sub version_compare +{ + local ($a,$b)=@_; + return &cmpver; +} + sub cmpver { - my(@a)= split /\./,$a; my(@b)= split /\./,$b; - + for $i (0,1,2) { return $a[$i] <=> $b[$i] if ($a[$i] != $b[$i]); } @@ -84,6 +91,14 @@ sub convert_0_0_58_to_0_0_58 { die "Not smart enough to convert 0.0.58 to 0.0.59\n"; } + +sub convert_0_0_59_to_0_0_60 +{ + s/(\\unitspace [0-9.mcptin\\ ]+|\\geometric [0-9.]+|\\width [0-9.mcp\\tin]+)/$1;/g; + s/(\\output \"[^\"]+\")/$1;/; + s/(\\tempo [0-9: ]+)/$1;/; +} + ############################################################### sub last_conversion @@ -121,7 +136,8 @@ my %minor_conversions = ("0.0.50" => \&no_conv, "0.0.56" => \&convert_0_0_55_to_0_0_56, "0.0.57" => \&convert_0_0_56_to_0_0_57, "0.0.58" => \&convert_0_0_57_to_0_0_58, - "0.0.59" => \&convert_0_0_58_to_0_0_59 + "0.0.59" => \&convert_0_0_58_to_0_0_59, + "0.0.60" => \&convert_0_0_59_to_0_0_60 ); @@ -144,12 +160,12 @@ sub do_conversion my @applicable_conversion; my @mudela_levels; - die "This is too old to convert " if $from < 50; +# die "This is too old to convert " if $from < 50; my @v = versions; - foreach $a (@v) { - if ($a > $from && $a <= $to ){ - push @applicable_conversion, $minor_conversions{$a}; - push @mudela_levels, $a; + foreach $ver (@v) { + if (version_compare($ver, $from) > 0 && version_compare($ver,$to) <= 0 ){ + push @applicable_conversion, $minor_conversions{$ver}; + push @mudela_levels, $ver; } } @@ -225,7 +241,6 @@ sub do_one_arg ($to_version = last_conversion) unless (defined($opt_to)); - die "can't open \`$infile\'" unless open INLY,$infile ; die "can't open \`$outfile\'" unless open OUTLY, ">$outfile"; @@ -243,6 +258,7 @@ sub do_one_arg identify; + GetOptions ("help", "output=s", "from=i", "to=i", "minor=i", "edit", "show-rules"); if ($opt_help) { diff --git a/bin/make_website b/bin/make_website index 219fcbd5a2..096d700280 100755 --- a/bin/make_website +++ b/bin/make_website @@ -71,7 +71,9 @@ sub my_system local $base="lilypond/"; -local @examples=("wohltemperirt" ,"standchen", "toccata-fuga-E", "scsii-menuetto", "rhythm", "collisions"); +local @examples=("multi", "wohltemperirt" ,"standchen", "toccata-fuga-E", "scsii-menuetto", "collisions"); + +# rhythm, scales, sub gen_html @@ -244,8 +246,9 @@ sub docxx_update sub do_tar { print "tarring.\n"; + $files = join (' ', < *.html *.$image *.ps.gz *.txt *.midi docxx/*>); my_system - " tar vhcf website.tar *.html *.$image *.ps.gz *.txt *.midi docxx/*;", + "-tar vhcf website.tar $files;", "gzip -f9 website.tar;"; } sub identify @@ -256,7 +259,7 @@ sub identify sub main { identify; - GetOptions("jpeg", "gif", "png"); + GetOptions("jpeg", "gif", "png", "noexamples"); local $image="gif" ; $image = "png" if ($opt_png); @@ -278,12 +281,14 @@ sub main gen_html; - gen_examples; copy_files; + if (! $opt_noexamples) { + gen_examples; + gen_list; + } set_images; - gen_list; - edit_html; + edit_html; docxx_update; do_tar; } diff --git a/bin/release b/bin/release index be52176b4e..58de89b692 100755 --- a/bin/release +++ b/bin/release @@ -19,8 +19,12 @@ NEWVER=$MJ.$MI.$PA$MP if [ -z $MP -o x$MP = xpre ] then LASTVER=$MJ.$MI.`expr $PA - 1` + + if [ -f $releasedir//lilypond-$LASTVER""pre.tar.gz ] ; then + LASTVER="$LASTVER""pre" + fi else - LASTVER=$MJ.$MI.$PA + LASTVER=$MJ.$MI.$PA fi echo @@ -29,19 +33,21 @@ echo } heredir=`pwd` +releasedir=`pwd`/../releases +patchdir=`pwd`/../patches make dist; setversion LILYVER=$NEWVER tarball=lilypond-$LILYVER.tar.gz patch=patch-$LILYVER.gz - -mv $tarball ../releases + +mv $tarball $releasedir/ cd ../test $heredir/bin/make_patch $LASTVER $NEWVER lilypond gzip -f9 patch-$NEWVER -mv $patch ../patches/ +mv $patch $patchdir// RPMS=`find ~/rpms/ -name lilypond-$NEWVER'*'rpm` rm *.rpm {lilypond,patch}-*.gz @@ -50,8 +56,8 @@ if [ ! -z "$RPMS" ]; then ln $RPMS . fi -ln ../releases/$tarball . -ln ../patches/$patch . +ln $releasedir//$tarball . +ln $patchdir//$patch . if [ ! -z "$RPMS" ]; then diff --git a/configure b/configure index 50aaf0d634..69cb91109b 100755 --- a/configure +++ b/configure @@ -594,7 +594,7 @@ if test "${enable_mingw32+set}" = set; then enableval="$enable_mingw32" MINGWPREFIX=$enableval else - MINGWPREFIX=$enableval + MINGWPREFIX=no fi diff --git a/flower/.version b/flower/.version index e275cb9db0..7a6f85cea4 100644 --- a/flower/.version +++ b/flower/.version @@ -1,6 +1,6 @@ MAJOR_VERSION = 1 MINOR_VERSION = 1 -PATCH_LEVEL = 19 +PATCH_LEVEL = 20 # use to send patches, always empty for released version: MY_PATCH_LEVEL = # include separator: "-1" or ".a" # diff --git a/flower/NEWS b/flower/NEWS index 050b1356d8..a642a93eba 100644 --- a/flower/NEWS +++ b/flower/NEWS @@ -1,4 +1,6 @@ version 1.1: +pl 20 + - List::junk_links() pl 19 - Array::reverse() diff --git a/flower/include/list.hh b/flower/include/list.hh index 343ccffcbc..fcc5e70712 100644 --- a/flower/include/list.hh +++ b/flower/include/list.hh @@ -42,6 +42,7 @@ class List Cursor top() const; void OK() const; // check list + void junk_links(); protected: friend class Cursor; diff --git a/flower/include/list.tcc b/flower/include/list.tcc index e3fa43cdd3..4c83034d82 100644 --- a/flower/include/list.tcc +++ b/flower/include/list.tcc @@ -39,15 +39,21 @@ List::OK() const assert(!lp); } - template -List::~List() +void +List::junk_links() { Cursor c(*this); while (c.ok()) c.del(); } +template +List::~List() +{ + junk_links(); +} + /** add after after_me. diff --git a/flower/include/plist.hh b/flower/include/plist.hh index 4c9d71dba5..af27832f00 100644 --- a/flower/include/plist.hh +++ b/flower/include/plist.hh @@ -30,6 +30,7 @@ class Link_list : public List } PCursor find(T) const; void concatenate(Link_list const &s) { List::concatenate(s); } + Link_list() {} }; diff --git a/flower/include/virtual-methods.hh b/flower/include/virtual-methods.hh index f38d852934..ea81cbbc99 100644 --- a/flower/include/virtual-methods.hh +++ b/flower/include/virtual-methods.hh @@ -1,14 +1,14 @@ /* - class-name.hh -- declare + virtual-methods.hh -- declare - source file of the LilyPond music typesetter + source file of the Flower Library (c) 1997 Han-Wen Nienhuys */ -#ifndef CLASS_NAME_HH -#define CLASS_NAME_HH +#ifndef VIRTUAL_METHODS_HH +#define VIRTUAL_METHODS_HH /** a macro to declare the classes name as a static and virtual function. The static_name() can *not* be inlined (this might have the effect that @@ -25,6 +25,7 @@ int a_stupid_nonexistent_function_to_allow_the_semicolon_come_out() #define VIRTUAL_COPY_CONS(T, R)\ virtual R *clone() const { return new T(*this); } \ + int yet_another_stupid_function_to_allow_semicolon() #define IMPLEMENT_IS_TYPE_B(D) \ bool D::is_type_b(const char *s) const \ @@ -43,4 +44,4 @@ int a_stupid_nonexistent_function_to_allow_the_semicolon_come_out() return s == static_name() || BA::is_type_b(s) || BB::is_type_b(s); \ } -#endif // CLASS-NAME_HH +#endif diff --git a/init/register.ini b/init/register.ini index 4b8d324fa9..a7d3257a9a 100644 --- a/init/register.ini +++ b/init/register.ini @@ -26,7 +26,6 @@ \alias "Voice_group"; \consists "Dynamic_register"; \consists "Stem_beam_register"; - \consists "Text_register"; \consists "Script_register"; \consists "Note_column_register"; \consists "Slur_register"; diff --git a/init/script.ini b/init/script.ini index eb4633b7d1..52395bf7ae 100644 --- a/init/script.ini +++ b/init/script.ini @@ -1,30 +1,30 @@ % name = \script { -% indexstring follow_into_staff same_dir_as_stem above_below_staff symbol_can_beinverted } +% indexstring follow_into_staff same_dir_as_stem above_below_staff symbol_can_beinverted priority } % -accent = \script { "sforzato" 0 -1 0 0 } -marcato = \script { "marcato" 0 -1 0 1 } -staccatissimo = \script { "staccatissimo" 0 -1 0 1 } -portato= \script { "portato" 0 -1 0 1 } -fermata = \script { "fermata" 0 1 0 1 } -stopped = \script { "stopped" 0 0 1 0 } -staccato = \script { "staccato" 1 -1 0 0 } -tenuto = \script {"tenuto" 0 -1 0 0 } -upbow = \script { "upbow" 0 0 1 0 } -downbow = \script { "downbow" 0 0 1 0 } -lheel = \script { "heel" 0 0 -1 0 } -rheel = \script { "heel" 0 0 1 0 } -ltoe = \script { "toe" 0 0 -1 0 } -rtoe = \script { "toe" 0 0 1 0 } -lbheel = \script { "bheel" 0 0 -1 0 } -rbheel = \script { "bheel" 0 0 1 0 } -lbtoe = \script { "btoe" 0 0 -1 0 } -rbtoe = \script { "btoe" 0 0 1 0 } -lfheel = \script { "fheel" 0 0 -1 0 } -rfheel = \script { "fheel" 0 0 1 0 } -lftoe = \script { "ftoe" 0 0 -1 0 } -rftoe = \script { "ftoe" 0 0 1 0 } +accent = \script { "sforzato" 0 -1 0 0 0 } +marcato = \script { "marcato" 0 -1 0 1 0 } +staccatissimo = \script { "staccatissimo" 0 -1 0 1 0 } +portato= \script { "portato" 0 -1 0 1 0 } +fermata = \script { "fermata" 0 1 0 1 0 } +stopped = \script { "stopped" 0 0 1 0 0 } +staccato = \script { "staccato" 1 -1 0 0 0 } +tenuto = \script {"tenuto" 0 -1 0 0 0 } +upbow = \script { "upbow" 0 0 1 0 0 } +downbow = \script { "downbow" 0 0 1 0 0 } +lheel = \script { "heel" 0 0 -1 0 0 } +rheel = \script { "heel" 0 0 1 0 0 } +ltoe = \script { "toe" 0 0 -1 0 0 } +rtoe = \script { "toe" 0 0 1 0 0 } +lbheel = \script { "bheel" 0 0 -1 0 0 } +rbheel = \script { "bheel" 0 0 1 0 0 } +lbtoe = \script { "btoe" 0 0 -1 0 0 } +rbtoe = \script { "btoe" 0 0 1 0 0 } +lfheel = \script { "fheel" 0 0 -1 0 0 } +rfheel = \script { "fheel" 0 0 1 0 0 } +lftoe = \script { "ftoe" 0 0 -1 0 0 } +rftoe = \script { "ftoe" 0 0 1 0 0 } % % left toe: right heel: % @@ -40,5 +40,5 @@ rftoe = \script { "ftoe" 0 0 1 0 } % % heu, me thought for a moment that order in table_xxx.ini was % being translated into priority... -back = \script { "back" 0 -1 -1 0 } -front = \script { "front" 0 -1 1 0 } +back = \script { "back" 0 -1 -1 0 0 } +front = \script { "front" 0 -1 1 0 0 } diff --git a/init/symbol.ini b/init/symbol.ini index adea156028..d14a1037a0 100644 --- a/init/symbol.ini +++ b/init/symbol.ini @@ -1,4 +1,4 @@ -\version "0.0.59"; +\version "0.0.60"; \include "register.ini" \include "dynamic.ini" diff --git a/init/table_sixteen.ini b/init/table_sixteen.ini index 7f1ced6c03..f012438622 100644 --- a/init/table_sixteen.ini +++ b/init/table_sixteen.ini @@ -14,14 +14,14 @@ table_sixteen= "scripts" = \table { "fermata" "\fermata" 0.0\pt 0.0\pt 0.0\pt 6.0\pt "-fermata" "\ifermata" 0.0\pt 0.0\pt -6.0\pt 0.0\pt - "portato" "\portato" 0.0\pt 4.8\pt 0.0\pt 2.0\pt - "-portato" "\iportato" 0.0\pt 4.8\pt -2.0\pt 0.0\pt - "tenuto" "\tenuto" 0.0\pt 4.8\pt 0.0\pt 1.0\pt - "-tenuto" "\itenuto" 0.0\pt 4.8\pt -1.0\pt 0.0\pt - "sforzato" "\sforzato" -0.8\pt 4.8\pt -1.92\pt 1.92\pt - "marcato" "\marcato" 0.0\pt 4.8\pt 0.0\pt 4.0\pt - "-marcato" "\imarcato" 0.0\pt 4.8\pt -4.0\pt 0.0\pt - "staccato" "\staccato" 0.0\pt 0.0\pt 0.0\pt 5.0\pt + "portato" "\portato" 0.0\pt 4.0\pt 0.0\pt 2.0\pt + "-portato" "\iportato" 0.0\pt 4.0\pt -2.0\pt 0.0\pt + "tenuto" "\tenuto" 0.0\pt 4.0\pt -1.0\pt 1.0\pt + "-tenuto" "\itenuto" 0.0\pt 4.0\pt -1.0\pt 1.0\pt + "sforzato" "\sforzato" -0.8\pt 4.0\pt -1.92\pt 1.92\pt + "marcato" "\marcato" 0.0\pt 4.0\pt 0.0\pt 4.0\pt + "-marcato" "\imarcato" 0.0\pt 4.0\pt -4.0\pt 0.0\pt + "staccato" "\staccato" 0.0\pt 0.0\pt -1.1\pt 1.1\pt "staccatissimo" "\staccatissimo" 0.0\pt 0.0\pt 0.0\pt 1.0\pt "-staccatissimo" "\istaccatissimo" 0.0\pt 0.0\pt 0.0\pt 1.0\pt "upbow" "\upbow" -1.0\pt 6.0\pt 0.0\pt 5.0\pt @@ -107,8 +107,10 @@ table_sixteen= } "rests" = \table { + "1o" "\outsidewholerest" 0.0\pt 6.0\pt 0.0\pt 2.0\pt "1" "\wholerest" 0.0\pt 6.0\pt 0.0\pt 2.0\pt "2" "\halfrest" 0.0\pt 6.0\pt -2.0\pt 0.0\pt + "2o" "\outsidehalfrest" 0.0\pt 6.0\pt -2.0\pt 0.0\pt "4" "\quartrest" -5.0\pt 2.0\pt -5.0\pt 5.0\pt "8" "\eighthrest" 0.0\pt 5.0\pt 0.0\pt 8.0\pt "16" "\sixteenthrest" 0.0\pt 6.0\pt 0.0\pt 12.0\pt diff --git a/input/cadenza.ly b/input/cadenza.ly index bcee0b0eb7..3bdc51e5a3 100644 --- a/input/cadenza.ly +++ b/input/cadenza.ly @@ -10,7 +10,7 @@ EndMudelaHeader %} -\version "0.0.59"; +\version "0.0.60"; cad = \melodic { @@ -59,7 +59,7 @@ cad = \melodic { \melodic{ \cad } \paper { - \unitspace 14.0\mm - \geometric 1.4} - \midi { \tempo 4:90 } + \unitspace 14.0\mm; + \geometric 1.4;} +% \midi { \tempo 4:90 } } diff --git a/input/collisions.ly b/input/collisions.ly index d021f6e278..5edeb80f23 100644 --- a/input/collisions.ly +++ b/input/collisions.ly @@ -3,14 +3,14 @@ filename: collisions.ly title: description: random counterpoint to test collisions - composer(s): HWN - entered-by: HWN + composer(s): HWN,JCN + entered-by: HWN,JCN copyright: public domain Tested Features:test the Collision resolution EndMudelaHeader %} -\version "0.0.59"; +\version "0.0.60"; @@ -56,12 +56,35 @@ rests = \melodic } > -\score{ +restsII = \melodic { + \octave c'; + < \multi2; + { \stem 1; g' f' e' d' c' b a g f e d c } + { \stem -1; r r r r r r r r r r r r } + > + < \multi2; + { \stem 1; r r r r r r r r r r r r } + { \stem -1; c d e f g a b c' d' e' f' g' } + > + r8 + < \multi2; r8 r8 > + < \multi2; r8 r8 r8 > + < \multi2; r8 r8 r8 r8 > + < \multi2; r r > + < \multi2; r r r > + \stem 1; + [c''8 r8 c''8 c''8] + [c8 r8 c8 c8] + \stem -1; + [c8 r8 c8 c8] + [c''8 r8 c''8 c''8] +} - \melodic { \$two_voice \$two_voice_steminvert - \$three_voice \rests - } +\score{ + \melodic { \$two_voice \$two_voice_steminvert + \$three_voice \rests \restsII } + - \paper {} + % \midi { \tempo 4:80 } } diff --git a/input/header.ly b/input/header.ly index 9e01bf0d40..e983bcb8df 100644 --- a/input/header.ly +++ b/input/header.ly @@ -10,4 +10,4 @@ Tested Features: EndMudelaHeader %} -\version "0.0.58"; +\version "0.0.60"; diff --git a/input/multi.ly b/input/multi.ly index bb0fd590d3..caafc66d16 100644 --- a/input/multi.ly +++ b/input/multi.ly @@ -1,5 +1,18 @@ +%{MudelaHeader -% stupid testfile for pl68 features. + filename:multi.ly + title: + description: stupid testfile for pl68 features. + composers: + entered-by:HWN + copyright: public domain + + Tested Features: \multi +EndMudelaHeader +%} + + +\version "0.0.60"; \score{ \melodic @@ -7,7 +20,7 @@ < \multi 1; { c2 c2 } { c'2 c'2 } > < \multi 2; { \stem -1; c2 c2 } { \stem 1; c'2 c'2 } > < \multi 3; { \clef "bass"; c2 c2 } { \bar "||"; \key cis ; c'2 c'2 } > - % c1 c1 % bug + c2 c1 } } diff --git a/input/rests.ly b/input/rests.ly deleted file mode 100644 index a8a7a0ba9f..0000000000 --- a/input/rests.ly +++ /dev/null @@ -1,42 +0,0 @@ -%{MudelaHeader - - filename: rests.ly - title: - description: - composer(s): heu - entered-by: jcn - copyright: GPL - - Tested Features: rest collisions -EndMudelaHeader -%} - -\score{ - \staff{ \inputregister{melodicregs} - \melodic{ - \meter 4/4; - \octave c'; - < \multivoice - { \stem 1; g' f' e' d' c' b a g f e d c } - { \stem -1; r r r r r r r r r r r r } - > - < \multivoice - { \stem 1; r r r r r r r r r r r r } - { \stem -1; c d e f g a b c' d' e' f' g' } - > - r8 - < \multivoice r8 r8 > - < \multivoice r8 r8 r8 > - < \multivoice r8 r8 r8 r8 > - < \multivoice r r > - < \multivoice r r r > - \stem 1; - [c''8 r8 c''8 c''8] - [c8 r8 c8 c8] - \stem -1; - [c8 r8 c8 c8] - [c''8 r8 c''8 c''8] - } - } - \paper{} -} diff --git a/input/scales.ly b/input/scales.ly index 3581515338..7f7b935fcb 100644 --- a/input/scales.ly +++ b/input/scales.ly @@ -2,7 +2,7 @@ % scales with accents. % -\version "0.0.59"; +\version "0.0.60"; blah = \melodic { \meter 6/8; \octave 'c ; @@ -61,13 +61,12 @@ c1 |[c' b a g][f e d c] } -} + \score{ \melodic {\blah} \paper{ - \symboltables {table_sixteen} - \unitspace 1.5 \cm - \geometric 1.4 + \unitspace 1.5 \cm; + \geometric 1.4; } } diff --git a/input/scsii-menuetto.ly b/input/scsii-menuetto.ly index f52ea765c6..769a032cc7 100644 --- a/input/scsii-menuetto.ly +++ b/input/scsii-menuetto.ly @@ -12,7 +12,8 @@ EndMudelaHeader %} -\version "0.0.59"; + +\version "0.0.60"; %% Stuff from MPP version % \lefttitle{Menuetto} @@ -22,7 +23,6 @@ EndMudelaHeader % \key\F % \key is F ( f-major ) % % \slope{30} % Fool MusiXTeX into 30 / 10 steeper beam -% \stemlength3 % shorter \stemlength % % because piece is set very tightly IImenuetto = \melodic{ @@ -34,16 +34,16 @@ IImenuetto = \melodic{ \duration 8; < a2 f2 d2 \f > bes4-. | %%2 - < [ bes^"1" e c_"2"_"4" > + < [ bes8^"1" e c_"2"_"4" > a bes-. g-. ] a4-.^"4" | %%3 - < d4 'bes4-. > g4-. [ f-. e-. ] | + < d4 'bes4-. > g4-. [ f8-. e-. ] | %%4 < [ f 'a > e d cis-. 'b-. 'a-. ] %%5 < a2 f2 d2 > bes!4-. | %%6 - < [ bes e > a bes-. g-. ] + < [ bes8 e > a bes-. g-. ] c'!4-. | %%7 < a4-. f4> @@ -55,15 +55,15 @@ IImenuetto = \melodic{ %%9 \clef "violin"; < e'2 a2 \f > - [ d'( e'16 )f'16 ] | + [ d'8( e'16 )f'16 ] | %%10 - < [ e' g > d' cis'_"2" e' a~ g ] | + < [ e'8 g > d' cis'_"2" e' a~ g ] | %%11 < \multi 2; {\stem 1; a4~ d'4 cis'4-. } { \stem -1; f2 e4 } > | %%12 - < [ g'^"4" d > f' e' f' d'^"3"~ c' ] | + < [ g'8^"4" d > f' e' f' d'^"3"~ c' ] | %%13 \clef "alto"; < \multi 2; @@ -71,28 +71,28 @@ IImenuetto = \melodic{ { \stem -1; g4~ f4 e4 }% ugh > | %%14 - < [ a f > g a f ] < d'4-\upbow e4 'bes4 > | + < [ a8 f > g a f ] < d'4-\upbow e4 'bes4 > | %%15 - < c'4-\downbow f4 'a4 > [ bes~ a g a ] | + < c'4-\downbow f4 'a4 > [ bes8~ a g a ] | %%16 [ f( e )f a-. g-. bes-. ] | %%17 < a2^"0" fis2_"3" > bes4 | %%18 - < { [ c'~ bes c' a ] } { [ es ] } > fis4 | + < { [ c'8~ bes c' a ] } { [ es ] } > fis4 | %%19 - < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes d > a ] | + < d'4-\downbow g4 'bes4 > < c'4-\upbow g4 c4 > < [ bes8 d > a ] | %%20 - < { [ c'( bes a )bes g~ bes ] } { [ d ] } { [ g ] } > | + < { [ c'8 ( bes a )bes g~ bes ] } { [ d ] } { [ g ] } > | %%21 < \multi 2; {\stem 1; d'4 (\stem 1; ) cis'4 d'4 } { \stem -1; g2 f4 } > | %%22 - < { [ g~ f g e ] } { [ cis ] } > < f4 d4 > | + < { [ g8 ~ f g e ] } { [ cis ] } > < f4 d4 > | %%23 - [ 'g g ] < e4. 'a4. > d-\upbow | + [ 'g8 g ] < e4. 'a4. > d-\upbow | %%24 < d2.^"fine" 'a2. 'd2._"3 mins."> \bar ":|"; @@ -103,13 +103,13 @@ IImenuetto = \melodic{ \score{ \melodic { \IImenuetto } \paper{ - \width 195.0\mm - \unitspace 9.0\mm % to get lily to use only three lines - \geometric 1.40 - \output "scsii-menuetto.out" + \width 195.0\mm; + \unitspace 9.0\mm ;% to get lily to use only three lines + \geometric 1.40; + \output "scsii-menuetto.out"; } \midi{ - \tempo 4:120 - \output "scsii-menuetto.midi" + \tempo 4:120; + \output "scsii-menuetto.midi"; } } diff --git a/input/slurs.ly b/input/slurs.ly index cddf943902..8da7292ed5 100644 --- a/input/slurs.ly +++ b/input/slurs.ly @@ -11,10 +11,9 @@ EndMudelaHeader %} -\version "0.0.58"; +\version "0.0.60"; -\score{\staff{ - melodicregs +\score{ \melodic{\octave c'; \duration "last"; 'c4 ~ 'c c'' ~ c'' ~ g ~ c ~ @@ -29,11 +28,10 @@ EndMudelaHeader < { c ~ d } { e ~ f } > - < \multivoice + < \multi 2; { \stem 1; c'8 ~g ~e( ~c~ [c'~ g' e' )c'] c'' ~ c'' c~c } - { \stem -1; c (e g )c'~( [b a g )d] r2 } > - - } + { \stem -1; c (e g )c'~( [b a g )d] r2 } + > } } diff --git a/input/standchen.ly b/input/standchen.ly index 09bbcd2414..867b6caaa1 100644 --- a/input/standchen.ly +++ b/input/standchen.ly @@ -13,7 +13,7 @@ EndMudelaHeader %} -\version "0.0.58"; +\version "0.0.60"; commands = \melodic{ \skip 2.*4; @@ -199,7 +199,7 @@ begeleiding = \melodic{ ''a r4 | %%5 \duration 8; - < \multivoice { \stem 1; + < \multi 2; { \stem 1; [ 'f 'a d 'a d 'a ] [ 'd 'e 'g 'e 'g 'e ] [ 'cis 'e 'g 'e 'g e ] @@ -216,7 +216,7 @@ begeleiding = \melodic{ %%10 [ 'd 'a d 'a d 'a ] | %%11 - < \multivoice + < \multi 2; { \stem 1; [ 'f 'a d 'a d 'a ] [ 'd 'e 'g 'e 'g 'e ] @@ -232,7 +232,7 @@ begeleiding = \melodic{ [ 'c 'g 'bes 'g 'bes 'g ] | %%16 [ ''f 'c 'f 'c 'f 'c ] | - < \multivoice + < \multi 2; { \stem 1; [ ''a 'e 'g 'e 'g 'e ][ 'd 'a d 'a d 'a ] [ ''bes 'f 'bes 'f 'bes 'f ][ ''f 'c 'f 'c 'f 'c ] } @@ -246,7 +246,7 @@ begeleiding = \melodic{ < [ 'e 'c > 'g c 'g c 'g ] | %%22 [ 'f 'a c 'a 'f 'c ] | - < \multivoice { + < \multi 2; { \stem 1; [ ''a 'e 'g 'e 'g 'e ] [ 'd 'fis 'a 'fis 'a 'fis ] @@ -298,7 +298,7 @@ begeleiding = \melodic{ %%44 < [ 'd ''b > 'fis 'b 'fis 'b 'fis ] | %%45 - < \multivoice { \stem 1; + < \multi 2; { \stem 1; [ ''g 'd 'b 'd 'b 'd ] [ 'd 'a d 'a d 'a ] } { @@ -465,20 +465,21 @@ tekstII = \lyric{ } \score{ - \staff{ lyricregs tekstI } - \staff{ lyricregs tekstII } +% \staff{ lyricregs tekstI } +% \staff{ lyricregs tekstII } - \staff{ melodicregs melodie commands} - \staff{ melodicregs begeleiding commands } + \melodic < \multi 3; < \melodie \commands > + <\begeleiding \commands > + > \paper{ - \width 195\mm + \width 195.\mm; % on two pages... - \unitspace 9\mm - \geometric 1.2 - \output "standchen.out" + \unitspace 9.\mm; + \geometric 1.2; + \output "standchen.out"; } \midi{ - \tempo 4:54 + \tempo 4:54; } } diff --git a/input/toccata-fuga-E.ly b/input/toccata-fuga-E.ly index ab665b4e85..f34df19761 100644 --- a/input/toccata-fuga-E.ly +++ b/input/toccata-fuga-E.ly @@ -20,7 +20,7 @@ EndMudelaHeader %} -\version "0.0.59"; +\version "0.0.60"; toccata_commands = \melodic{ \meter 4/4; @@ -136,15 +136,16 @@ break = \melodic{ \meter 4/4; r1 } % these should be two separate scores... \score{ \melodic < \multi 3; - { \$toccata_right \break \$fuga2_right } - { \$toccata_left \break \$fuga2_left } + + {\$toccata_right \break \$fuga2_right } + {\$toccata_left \break \$fuga2_left } - { \$toccata_pedal \break \$fuga2_pedal } + {\$toccata_pedal \break \$fuga2_pedal } > \paper{} \midi{ - \tempo 4:96 + \tempo 4:96; } } diff --git a/input/wohltemperirt.ly b/input/wohltemperirt.ly index 0e91713bcf..00ad8716ac 100644 --- a/input/wohltemperirt.ly +++ b/input/wohltemperirt.ly @@ -9,12 +9,14 @@ Tested Features: stem direction, multivoice, forced accidentals. Remarks: the stem direction algorithm is severely broken (look at the - bass dux) with pl64. +bass dux) with pl64. [this is supposedly fixed in pl68, can anybody +knowledgeable remove this comment if it's not appropriate anymore?] + %} -\version "0.0.59"; +\version "0.0.60"; % should add \need{dutch.ini} for % correct parsing of note names @@ -198,7 +200,7 @@ bassdux = > \paper{} \midi { - \tempo 4:84 + \tempo 4:84; } } diff --git a/lily/.version b/lily/.version index f8c8298f3a..e613199be6 100644 --- a/lily/.version +++ b/lily/.version @@ -1,7 +1,7 @@ MAJOR_VERSION = 0 MINOR_VERSION = 0 -PATCH_LEVEL = 68 +PATCH_LEVEL = 70 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf -MY_PATCH_LEVEL =pre.jcn1 +MY_PATCH_LEVEL = diff --git a/lily/Stable.make b/lily/Stable.make index 1e9ca02e60..3d50ce8261 100644 --- a/lily/Stable.make +++ b/lily/Stable.make @@ -7,4 +7,4 @@ stablecc=atom.cc command-request.cc musical-request.cc bar.cc boxes.cc \ paper-def.cc parser.cc lexer.cc qlp.cc qlpsolve.cc\ template1.cc template2.cc template3.cc template4.cc\ template5.cc template6.cc version.cc tex-stream.cc tex.cc\ - identifier.cc note.cc\ + identifier.cc note.cc voice-regs.cc\ diff --git a/lily/beam.cc b/lily/beam.cc index d0b0079692..9902998235 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -149,7 +149,12 @@ Beam::set_default_dir() /* should use minimum energy formulation (cf linespacing) - */ + + [todo] + the y of the (start) of the beam should be quantisized, + so that no stafflines appear just in between two beam-flags + +*/ void Beam::solve_slope() { @@ -208,6 +213,11 @@ Beam::set_stemlens() void Beam::do_post_processing() { + if ( stems.size() < 2) { + warning("Beam with less than 2 stems"); + transparent_b_ = true; + return ; + } solve_slope(); set_stemlens(); } @@ -248,7 +258,6 @@ Beam::set_grouping(Rhythmic_grouping def, Rhythmic_grouping cur) void Beam::do_pre_processing() { - assert(stems.size()>1); if (!dir_i_) set_default_dir(); @@ -329,11 +338,7 @@ Beam::stem_beams(Stem *here, Stem *next, Stem *prev)const Molecule* Beam::brew_molecule_p() const { - /* - [todo] - the y of the (start) of the beam should be quantisized, - so that no stafflines appear just in between two beam-flags - */ + Molecule *mol_p = new Molecule; // huh? inter-what // Real inter_f = paper()->interbeam_f(); @@ -364,12 +369,13 @@ Beam::do_print()const Spanner::print(); #endif } - +/* + duh. The stem is not a dependency but a dependent + */ void Beam::do_substitute_dependency(Score_elem*o,Score_elem*n) { - int i; - while ((i=stems.find_i((Stem*)o->item())) >=0) - if (n) stems[i] = (Stem*) n->item(); - else stems.del(i); + if (o->is_type_b( Stem::static_name() )) { + stems.substitute( (Stem*)o->item(), n?(Stem*) n->item():0); + } } diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index 808a7813d8..14ff34118b 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -5,6 +5,7 @@ (c) 1997 Han-Wen Nienhuys */ + #include "break-align-item.hh" void diff --git a/lily/collision.cc b/lily/collision.cc index 554d54ac60..7ba6c4c601 100644 --- a/lily/collision.cc +++ b/lily/collision.cc @@ -13,6 +13,7 @@ Collision::Collision() { + empty_b_ = transparent_b_ =true; } void diff --git a/lily/crescendo.cc b/lily/crescendo.cc index bcf6c1c8b7..d3731bed19 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -20,8 +20,6 @@ Crescendo::Crescendo() left_dyn_b_ = right_dyn_b_ =false; } - - Molecule* Crescendo::brew_molecule_p() const { diff --git a/lily/head-reg.cc b/lily/head-reg.cc index e5a7279fa2..b55f36b4be 100644 --- a/lily/head-reg.cc +++ b/lily/head-reg.cc @@ -44,16 +44,12 @@ Note_head_register::do_process_requests() *get_staff_info().c0_position_i_l_; } else if (note_req_l_->rest()) { n_p->rest_b_ = true; - if (note_req_l_->rhythmic()->duration_.type_i_ <= 2) - note_p_->translate( - Offset(0, - 6 * paper()->internote_f())); } Score_elem_info itinf(note_p_,note_req_l_); announce_element(itinf); } - + void Note_head_register::do_pre_move_processing() { diff --git a/lily/horizontal-align-item.cc b/lily/horizontal-align-item.cc index 6cfb0c00c0..46e2b67ee2 100644 --- a/lily/horizontal-align-item.cc +++ b/lily/horizontal-align-item.cc @@ -7,9 +7,11 @@ */ #include "horizontal-align-item.hh" + IMPLEMENT_STATIC_NAME(Horizontal_align_item); IMPLEMENT_IS_TYPE_B1(Horizontal_align_item,Item); + bool Horizontal_align_item::contains_b(Item *i)const { @@ -83,10 +85,18 @@ Horizontal_align_item::do_pre_processing() } Real where_f= total * (align_i_-1.0)/2.0; + Real center_dx_f = 0; for ( int i=0 ; i < item_l_arr_.size(); i++) { - item_l_arr_[i]->translate_x(where_f -dims[i][-1] ); + Real dx = where_f -dims[i][-1]; + item_l_arr_[i]->translate_x( dx ); + if (item_l_arr_[i] == center_l_) + center_dx_f = where_f; where_f += dims[i].length(); } + if (center_dx_f && !align_i_ ) + for ( int i=0 ; i < item_l_arr_.size(); i++) + item_l_arr_[i]->translate_x( - center_dx_f ); + } Interval @@ -102,6 +112,7 @@ Horizontal_align_item::do_print()const Horizontal_align_item::Horizontal_align_item() { + center_l_ = 0; align_i_ = 0; empty_b_ = true; transparent_b_ = true; diff --git a/lily/identifier.cc b/lily/identifier.cc index d306953191..7e1e43e45f 100644 --- a/lily/identifier.cc +++ b/lily/identifier.cc @@ -119,7 +119,7 @@ Identifier::Identifier(Identifier const&) default_accessor(Real_id, Real, real); -default_accessor(Script_id, General_script_def, script); +virtual_accessor(Script_id, General_script_def, script); default_accessor(Lookup_id, Lookup, lookup); default_accessor(Symtables_id, Symtables, symtables); virtual_accessor(Music_id, Music, music); diff --git a/lily/include/bar.hh b/lily/include/bar.hh index 447a807f0a..9513fc1533 100644 --- a/lily/include/bar.hh +++ b/lily/include/bar.hh @@ -15,7 +15,7 @@ public: String type_str_; NAME_MEMBERS(); - SCORE_ELEM_CLONE(Bar) + SCORE_ELEM_CLONE(Bar); Bar(); private: void do_print() const; diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 9a729a5da9..55fbc8a673 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -30,7 +30,7 @@ public: void set_grouping(Rhythmic_grouping def, Rhythmic_grouping current); void set_stemlens(); - SCORE_ELEM_CLONE(Beam) + SCORE_ELEM_CLONE(Beam); protected: virtual Interval do_width()const; virtual Offset center() const; diff --git a/lily/include/break-align-item.hh b/lily/include/break-align-item.hh index 916e284d57..7e0e632b01 100644 --- a/lily/include/break-align-item.hh +++ b/lily/include/break-align-item.hh @@ -19,7 +19,7 @@ protected: virtual void do_pre_processing(); public: NAME_MEMBERS(); - SCORE_ELEM_CLONE(Break_align_item) + SCORE_ELEM_CLONE(Break_align_item); }; #endif // BREAK_ALIGN_ITEM_HH diff --git a/lily/include/clef-item.hh b/lily/include/clef-item.hh index ab089f0ffc..a3c9053b34 100644 --- a/lily/include/clef-item.hh +++ b/lily/include/clef-item.hh @@ -28,7 +28,7 @@ public: /* *************** */ NAME_MEMBERS(); - SCORE_ELEM_CLONE(Clef_item) + SCORE_ELEM_CLONE(Clef_item); Clef_item(); void read(Clef_register const&); void read(String); diff --git a/lily/include/crescendo.hh b/lily/include/crescendo.hh index ece423d154..998c1669ee 100644 --- a/lily/include/crescendo.hh +++ b/lily/include/crescendo.hh @@ -26,7 +26,7 @@ public: bool left_dyn_b_; Crescendo(); protected: - SCORE_ELEM_CLONE(Crescendo) + SCORE_ELEM_CLONE(Crescendo); virtual Molecule*brew_molecule_p()const; NAME_MEMBERS(); diff --git a/lily/include/elem-group-item.hh b/lily/include/elem-group-item.hh index 6a799526d0..ce7b75e41a 100644 --- a/lily/include/elem-group-item.hh +++ b/lily/include/elem-group-item.hh @@ -16,14 +16,14 @@ class Horizontal_vertical_group_item : public Item, public Horizontal_vertical_group { public: NAME_MEMBERS(); - SCORE_ELEM_CLONE(Horizontal_vertical_group_item) + SCORE_ELEM_CLONE(Horizontal_vertical_group_item); protected: virtual void do_print() const; }; class Horizontal_group_item : public Item, public Horizontal_group { NAME_MEMBERS(); - SCORE_ELEM_CLONE(Horizontal_group_item) + SCORE_ELEM_CLONE(Horizontal_group_item); protected: virtual void do_print() const { Elbement_group::do_print(); } }; diff --git a/lily/include/general-script-def.hh b/lily/include/general-script-def.hh index c7c7207d74..5c9dac12bc 100644 --- a/lily/include/general-script-def.hh +++ b/lily/include/general-script-def.hh @@ -18,7 +18,7 @@ */ class General_script_def : public Input { public: - VIRTUAL_COPY_CONS(General_script_def,General_script_def) + VIRTUAL_COPY_CONS(General_script_def,General_script_def); NAME_MEMBERS(); virtual int staff_dir_i()const; void print() const; diff --git a/lily/include/horizontal-align-item.hh b/lily/include/horizontal-align-item.hh index 6132046a26..e12eae39bc 100644 --- a/lily/include/horizontal-align-item.hh +++ b/lily/include/horizontal-align-item.hh @@ -15,20 +15,29 @@ /** Order elems left to right. + + TODO: insert(order, elem) */ class Horizontal_align_item : public Item { protected: Link_array item_l_arr_; Array priority_i_arr_; - int align_i_; public: + Item * center_l_; + /** + Which side to align? + -1: left side, 0: centered (around center_l_ if not nil), 1: right side + */ + int align_i_; + NAME_MEMBERS(); - SCORE_ELEM_CLONE(Horizontal_align_item) + SCORE_ELEM_CLONE(Horizontal_align_item); void add(Item*, int p); Horizontal_align_item(); protected: + virtual void do_substitute_dependency(Score_elem * , Score_elem *); /// do calculations before determining horizontal spacing virtual void do_pre_processing(); diff --git a/lily/include/interpreter.hh b/lily/include/interpreter.hh index 1c0703f16b..92541c7211 100644 --- a/lily/include/interpreter.hh +++ b/lily/include/interpreter.hh @@ -7,12 +7,17 @@ */ -#ifndef Interpreter_HH -#define Interpreter_HH +#ifndef INTERPRETER_HH +#define INTERPRETER_HH + +#include "lily-proto.hh" class Interpreter { public: + int music_list_i_; + Interpreter(); + virtual ~Interpreter(); virtual bool interpret_request_b(Request*) { return false;} }; -#endif // Interpreter_HH +#endif // INTERPRETER_HH diff --git a/lily/include/key-item.hh b/lily/include/key-item.hh index fda86e5375..447ea7e078 100644 --- a/lily/include/key-item.hh +++ b/lily/include/key-item.hh @@ -20,7 +20,7 @@ struct Key_item : Item { /* *************** */ NAME_MEMBERS(); - SCORE_ELEM_CLONE(Key_item) + SCORE_ELEM_CLONE(Key_item); Key_item(int cposition); void add(int pitch, int acc); diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index b41306315f..4b1479090a 100644 --- a/lily/include/lookup.hh +++ b/lily/include/lookup.hh @@ -44,7 +44,7 @@ struct Lookup { Symbol accidental(int)const; Symbol ball(int)const; Symbol flag(int)const; - Symbol rest(int)const; + Symbol rest(int, bool outside)const; Symbol clef(String)const; Symbol bar(String)const; Symbol dots(int)const; diff --git a/lily/include/meter.hh b/lily/include/meter.hh index 14a50f0f45..176ce6085c 100644 --- a/lily/include/meter.hh +++ b/lily/include/meter.hh @@ -24,7 +24,7 @@ protected: public: Meter(Array args) ; NAME_MEMBERS(); - SCORE_ELEM_CLONE(Meter) + SCORE_ELEM_CLONE(Meter); }; #endif // METER_HH diff --git a/lily/include/music-iterator.hh b/lily/include/music-iterator.hh index a0501d7fc9..a375dc35d1 100644 --- a/lily/include/music-iterator.hh +++ b/lily/include/music-iterator.hh @@ -17,6 +17,7 @@ class Music_iterator { protected: bool first_b_; + virtual void do_print()const; public: Music_iterator *daddy_iter_l_; @@ -25,22 +26,29 @@ public: static Music_iterator* static_get_iterator_p(Music*,Register_group_register*); Music_iterator* get_iterator_p(Music*)const; + void set_reg(Register_group_register*); Music_iterator(); virtual void next(Moment until); virtual Moment next_moment()const; virtual bool ok()const; virtual ~Music_iterator(); virtual void construct_children(); + void print()const; virtual Register_group_register * get_req_acceptor_l(); }; // duh. class Request_iterator : public Music_iterator { Request *req_l_; + bool last_b_; public: Request_iterator(Request const *); NAME_MEMBERS(); protected: + virtual bool ok() const; + virtual Moment next_moment() const; + + virtual void do_print()const; virtual void next(Moment); }; @@ -60,6 +68,7 @@ public: Chord_iterator(Chord const*); NAME_MEMBERS(); protected: + virtual void do_print()const; virtual void construct_children(); virtual void next(Moment); virtual Moment next_moment()const; @@ -86,6 +95,7 @@ public: Voice_iterator(Voice const*); NAME_MEMBERS(); protected: + virtual void do_print()const; virtual void construct_children(); ~Voice_iterator(); virtual void next(Moment); diff --git a/lily/include/music-list.hh b/lily/include/music-list.hh index 0198e98d8c..30d5793253 100644 --- a/lily/include/music-list.hh +++ b/lily/include/music-list.hh @@ -30,7 +30,7 @@ public: Music_list(Music_list const&); Music_list(); NAME_MEMBERS(); - VIRTUAL_COPY_CONS(Music_list,Music) + VIRTUAL_COPY_CONS(Music_list,Music); virtual void add(Music*); virtual void transpose(Melodic_req const *); @@ -48,7 +48,7 @@ class Chord : public Music_list { public: Chord(); NAME_MEMBERS(); - VIRTUAL_COPY_CONS(Chord,Music) + VIRTUAL_COPY_CONS(Chord,Music); virtual void translate(Moment dt); virtual MInterval time_int()const; }; @@ -56,7 +56,7 @@ public: class Voice_element : public Chord { public: NAME_MEMBERS(); - VIRTUAL_COPY_CONS(Voice_element,Music) + VIRTUAL_COPY_CONS(Voice_element,Music); }; /** @@ -69,7 +69,7 @@ public: Voice(); NAME_MEMBERS(); - VIRTUAL_COPY_CONS(Voice, Music) + VIRTUAL_COPY_CONS(Voice, Music); virtual void translate(Moment dt); virtual MInterval time_int()const; }; @@ -86,6 +86,6 @@ public: String id_str_; NAME_MEMBERS(); - VIRTUAL_COPY_CONS(Change_reg, Music) + VIRTUAL_COPY_CONS(Change_reg, Music); }; #endif // MUSIC_LIST_HH diff --git a/lily/include/music.hh b/lily/include/music.hh index eb4058c6dd..e90ea58a6b 100644 --- a/lily/include/music.hh +++ b/lily/include/music.hh @@ -33,7 +33,7 @@ public: void print() const; virtual void transpose(Melodic_req const *); virtual void translate(Moment dt); - VIRTUAL_COPY_CONS(Music,Music) + VIRTUAL_COPY_CONS(Music,Music); NAME_MEMBERS(); Music(); protected: diff --git a/lily/include/note-head.hh b/lily/include/note-head.hh index c93c1ad205..450281825d 100644 --- a/lily/include/note-head.hh +++ b/lily/include/note-head.hh @@ -32,6 +32,7 @@ public: int staff_size_i_; int dots_i_; int balltype_i_; + int dot_delta_y_i_; int x_dir_i_; /* *************** */ @@ -42,6 +43,7 @@ public: position of top line (5 linestaff: 8) */ Note_head(int staff_size); + void set_dots(); static int compare(Note_head * const &a, Note_head *const &b) ; protected: virtual void do_print()const; diff --git a/lily/include/register-group.hh b/lily/include/register-group.hh index e0778d8e4e..0c47919b6b 100644 --- a/lily/include/register-group.hh +++ b/lily/include/register-group.hh @@ -29,8 +29,15 @@ protected: Array announce_info_arr_; virtual void do_print()const; - + + virtual bool removable_b()const; + public: + int iterator_count_; + void check_removal(); + Register_group_register(); + ~Register_group_register(); + /// Score_register = 0, Staff_registers = 1, etc) virtual int depth_i()const; /** @@ -62,6 +69,7 @@ public: virtual void do_removal_processing(); virtual bool do_try_request(Request*); virtual void do_process_requests(); + virtual Staff_info get_staff_info()const; virtual Register_group_register * find_register_l(String name,String id); diff --git a/lily/include/request.hh b/lily/include/request.hh index 4fa49691d8..62d5e73e8c 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -31,7 +31,7 @@ public: virtual ~Request(){} NAME_MEMBERS(); - VIRTUAL_COPY_CONS(Request,Music) + VIRTUAL_COPY_CONS(Request,Music); void print()const ; virtual MInterval time_int() const; @@ -55,7 +55,7 @@ protected: #define REQUESTMETHODS(T,accessor) \ virtual T * accessor() { return this;}\ NAME_MEMBERS();\ -VIRTUAL_COPY_CONS(T, Request)\ +VIRTUAL_COPY_CONS(T, Request);\ virtual void do_print() const diff --git a/lily/include/rest-collision.hh b/lily/include/rest-collision.hh index 1d698f859d..a2a39754be 100644 --- a/lily/include/rest-collision.hh +++ b/lily/include/rest-collision.hh @@ -21,6 +21,7 @@ public: void add(Rest_column*); void add(Collision*); NAME_MEMBERS(); + Rest_collision(); protected: virtual void do_post_processing(); virtual void do_pre_processing(); diff --git a/lily/include/score-align-reg.hh b/lily/include/score-align-reg.hh index 533e47103c..3f7e15ca4f 100644 --- a/lily/include/score-align-reg.hh +++ b/lily/include/score-align-reg.hh @@ -14,12 +14,12 @@ class Score_align_register: public Request_register { - - const char* type_ch_C_; Horizontal_group_item * align_p_; public: + + const char* type_ch_C_; int priority_i_; - Score_align_register(char const*); + Score_align_register(); NAME_MEMBERS(); protected: virtual void acknowledge_element(Score_elem_info); diff --git a/lily/include/score-elem.hh b/lily/include/score-elem.hh index 95c6b0ba1d..867a3da602 100644 --- a/lily/include/score-elem.hh +++ b/lily/include/score-elem.hh @@ -35,6 +35,9 @@ class Score_elem : private Directed_graph_node { */ Offset offset_; + /** + for administration of what was done already + */ enum Status { ORPHAN, // not yet added to pstaff VIRGIN, // added to pstaff @@ -49,7 +52,9 @@ class Score_elem : private Directed_graph_node { OUTPUT, // molecule has been output DELMARKED, // mark for 'unclean' deletion DELETED, // to catch malloc mistakes. - } status; + }; + + Status status; public: PScore *pscore_l_; @@ -69,10 +74,10 @@ public: Interval height() const; virtual void translate_x(Real); virtual void translate_y(Real); + /** translate the symbol. The symbol does not have to be created yet. - Overridable, since this score-elem might act as a pseudo-list. - */ + */ void translate(Offset); Offset offset()const; @@ -98,7 +103,7 @@ public: virtual Horizontal_vertical_group* elem_group() { return 0; } virtual Item * item() { return 0; } virtual Line_of_score * line_l() const; - SCORE_ELEM_CLONE(Score_elem) + SCORE_ELEM_CLONE(Score_elem); protected: virtual Interval do_height()const; diff --git a/lily/include/scoreline.hh b/lily/include/scoreline.hh index 16accf1a83..5cc5c9aa4f 100644 --- a/lily/include/scoreline.hh +++ b/lily/include/scoreline.hh @@ -38,7 +38,7 @@ protected: virtual void do_substitute_dependency(Score_elem*,Score_elem*); virtual Interval do_width()const; virtual void do_print() const; - SCORE_ELEM_CLONE(Line_of_score) + SCORE_ELEM_CLONE(Line_of_score); }; #endif diff --git a/lily/include/script-def.hh b/lily/include/script-def.hh index 8313abad46..94f6090528 100644 --- a/lily/include/script-def.hh +++ b/lily/include/script-def.hh @@ -14,7 +14,7 @@ class Script_def : public General_script_def { /// invert if below staff? bool invertsym_b_; - String symidx; + String symidx_str_; /// on the other side of the stem? @@ -38,11 +38,11 @@ public: NAME_MEMBERS(); virtual bool do_equal_b(General_script_def const &)const; - void print() const; + virtual void do_print() const; Script_def(); - void set_from_input(String, bool, int, int ,bool); + void set_from_input(String, bool, int, int ,bool,int ); protected: - VIRTUAL_COPY_CONS(Script_def,General_script_def) + VIRTUAL_COPY_CONS(Script_def,General_script_def); }; diff --git a/lily/include/script.hh b/lily/include/script.hh index b48ea8ebd6..f6d41a2c2f 100644 --- a/lily/include/script.hh +++ b/lily/include/script.hh @@ -8,7 +8,6 @@ #define SCRIPT_HH #include "staff-side.hh" -#include "script-def.hh" #include "item.hh" /** @@ -18,12 +17,13 @@ class Script : public Item, public Staff_side { int pos_i_; - General_script_def *specs_l_; Stem *stem_l_; /* *************** */ protected: Molecule *brew_molecule_p()const; + virtual void do_substitute_dependency(Score_elem*,Score_elem*); + virtual void do_print() const; virtual void do_post_processing(); virtual void do_pre_processing(); virtual Interval do_width() const; @@ -33,8 +33,10 @@ private: void set_default_index(); Symbol symbol()const; public: + General_script_def *specs_l_; + static int compare(Script *const&, Script *const&) ; - Script(Script_req*); + Script(); void set_stem(Stem*); NAME_MEMBERS(); diff --git a/lily/include/slur.hh b/lily/include/slur.hh index 7ec510afa2..475458ce97 100644 --- a/lily/include/slur.hh +++ b/lily/include/slur.hh @@ -24,7 +24,7 @@ protected: virtual void do_post_processing(); virtual void do_substitute_dependency(Score_elem*, Score_elem*); virtual void do_pre_processing(); - SCORE_ELEM_CLONE(Slur) + SCORE_ELEM_CLONE(Slur); NAME_MEMBERS(); }; diff --git a/lily/include/spanner-elem-group.hh b/lily/include/spanner-elem-group.hh index d133fb66b5..aa8747a056 100644 --- a/lily/include/spanner-elem-group.hh +++ b/lily/include/spanner-elem-group.hh @@ -18,7 +18,7 @@ class Spanner_elem_group : public Spanner, public Horizontal_vertical_group { protected: virtual Interval do_width()const; virtual void do_print() const; - SCORE_ELEM_CLONE(Spanner_elem_group) + SCORE_ELEM_CLONE(Spanner_elem_group); public: NAME_MEMBERS(); }; diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index 2aee51cc2e..1954ca97f7 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -43,7 +43,7 @@ public: bool broken_b() const; Spanner* find_broken_piece(Line_of_score*)const; protected: - SCORE_ELEM_CLONE(Spanner) + SCORE_ELEM_CLONE(Spanner); virtual void break_into_pieces(); Link_array broken_into_l_arr_; diff --git a/lily/include/staff-sym.hh b/lily/include/staff-sym.hh index 68b1c11d4a..74b387aaad 100644 --- a/lily/include/staff-sym.hh +++ b/lily/include/staff-sym.hh @@ -28,7 +28,7 @@ public: Real inter_note_f()const; int steps_i()const; protected: - SCORE_ELEM_CLONE(Staff_symbol) + SCORE_ELEM_CLONE(Staff_symbol); virtual Molecule* brew_molecule_p() const; virtual void do_print()const; }; diff --git a/lily/include/staffline.hh b/lily/include/staffline.hh index 5afdc785c0..ceec013004 100644 --- a/lily/include/staffline.hh +++ b/lily/include/staffline.hh @@ -12,7 +12,7 @@ /// one broken line of staff. struct Line_of_staff : public Spanner_elem_group{ - SCORE_ELEM_CLONE(Line_of_staff) + SCORE_ELEM_CLONE(Line_of_staff); public: NAME_MEMBERS(); diff --git a/lily/include/text-def.hh b/lily/include/text-def.hh index 0cc584f742..0fff834f85 100644 --- a/lily/include/text-def.hh +++ b/lily/include/text-def.hh @@ -16,7 +16,7 @@ class Text_def : public General_script_def { protected: virtual Atom get_atom(Paper_def* p, int dir_i_)const; NAME_MEMBERS(); - VIRTUAL_COPY_CONS(Text_def,General_script_def) + VIRTUAL_COPY_CONS(Text_def,General_script_def); public: /** centered , or aligned? @@ -29,6 +29,7 @@ public: String style_str_; /* *************** */ + virtual void do_print() const; virtual ~Text_def() {}; bool do_equal_b(const Text_def&)const; Text_def(); diff --git a/lily/include/text-spanner.hh b/lily/include/text-spanner.hh index 1381be3b5e..119384067c 100644 --- a/lily/include/text-spanner.hh +++ b/lily/include/text-spanner.hh @@ -15,15 +15,16 @@ triplets, eentweetjes, ottava, etc. */ class Text_spanner : public Spanner { public: - Directional_spanner * support; + Directional_spanner * support_span_l_; General_script_def * spec_p_; Offset text_off_; NAME_MEMBERS(); void set_support(Directional_spanner*); Text_spanner(); + Text_spanner(Text_spanner const&); protected: - SCORE_ELEM_CLONE(Text_spanner) + SCORE_ELEM_CLONE(Text_spanner); ~Text_spanner(); virtual void do_substitute_dependency(Score_elem*,Score_elem*); virtual void do_pre_processing(); diff --git a/lily/include/tie.hh b/lily/include/tie.hh index 70c6a8a7af..8cf2fef4a5 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -29,6 +29,6 @@ public: Tie(); NAME_MEMBERS(); - SCORE_ELEM_CLONE(Tie) + SCORE_ELEM_CLONE(Tie); }; #endif // TIE_HH diff --git a/lily/include/voice-group-regs.hh b/lily/include/voice-group-regs.hh index c4f04e1af2..3dda106962 100644 --- a/lily/include/voice-group-regs.hh +++ b/lily/include/voice-group-regs.hh @@ -22,7 +22,6 @@ class Voice_group_registers : public Register_group_register { protected: virtual void do_print() const; virtual Scalar get_feature(String); - virtual void do_post_move_processing(); virtual bool do_try_request(Request*); public: diff --git a/lily/include/voice-regs.hh b/lily/include/voice-regs.hh index 3c282b34b2..8d34121bb0 100644 --- a/lily/include/voice-regs.hh +++ b/lily/include/voice-regs.hh @@ -15,13 +15,11 @@ class Voice_registers : public Interpreter, public Register_group_register { public: - Voice_registers(); NAME_MEMBERS(); protected: virtual bool interpret_request_b(Request*); virtual Interpreter* interpreter_l() { return this; } - virtual void do_print() const; }; diff --git a/lily/interpreter.cc b/lily/interpreter.cc new file mode 100644 index 0000000000..15f400bfc8 --- /dev/null +++ b/lily/interpreter.cc @@ -0,0 +1,20 @@ +/* + interpreter.cc -- implement Interpreter + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + +#include +#include "interpreter.hh" + +Interpreter::Interpreter() +{ + music_list_i_ =0; +} + +Interpreter::~Interpreter() +{ +// assert(!music_list_i_ ); +} diff --git a/lily/lookup.cc b/lily/lookup.cc index c38322fdf0..a4dd9caeb1 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -100,9 +100,9 @@ Lookup::ball(int j) const } Symbol -Lookup::rest(int j) const +Lookup::rest(int j, bool o) const { - return (*symtables_)("rests")->lookup(String(j)); + return (*symtables_)("rests")->lookup(String(j) + (o ? "o" : "") ); } Symbol diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index e84f0525bf..2d404bfa5f 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -11,10 +11,29 @@ #include "register.hh" #include "register-group.hh" #include "interpreter.hh" +#include "debug.hh" IMPLEMENT_STATIC_NAME(Music_iterator); IMPLEMENT_IS_TYPE_B(Music_iterator); +void +Music_iterator::do_print()const +{ + +} + +void +Music_iterator::print() const +{ +#ifndef NPRINT + mtor << name() << "{"; + mtor << "report to " << report_to_reg_l_ << " (" << report_to_reg_l_->name() << ")\n"; + mtor << "next at " << next_moment() << " "; + do_print(); + mtor << "}\n"; +#endif +} + Register_group_register * Music_iterator::get_req_acceptor_l() { @@ -22,17 +41,34 @@ Music_iterator::get_req_acceptor_l() if (report_to_reg_l_->interpreter_l() ) return report_to_reg_l_; - report_to_reg_l_ = report_to_reg_l_->get_default_interpreter(); + set_reg( report_to_reg_l_->get_default_interpreter() ); return report_to_reg_l_; } +void +Music_iterator::set_reg(Register_group_register*reg) +{ + if (report_to_reg_l_==reg) + return; + + if (report_to_reg_l_) + report_to_reg_l_->iterator_count_ --; + + report_to_reg_l_ = reg; + + if (report_to_reg_l_) + report_to_reg_l_->iterator_count_ ++; +} + void Music_iterator::construct_children() { } -Music_iterator::~Music_iterator(){ +Music_iterator::~Music_iterator() +{ + set_reg(0); } Moment @@ -72,13 +108,12 @@ Music_iterator::static_get_iterator_p(Music *m, if ( m->is_type_b( Music_list::static_name())) { Music_list* ml = (Music_list*) m; if (ml -> type_str_ != "") { - p->report_to_reg_l_ = - report_l->find_get_reg_l(ml-> type_str_, ml->id_str_); + p->set_reg(report_l->find_get_reg_l(ml-> type_str_, ml->id_str_)); } - } + } if (! p->report_to_reg_l_ ) - p ->report_to_reg_l_ = report_l; + p ->set_reg(report_l); return p; } @@ -113,10 +148,19 @@ Chord_iterator::construct_children() for(iter(chord_C_->music_p_list_.top(), i); i.ok(); j++, i++) { Music_iterator * mi = get_iterator_p( i.ptr()); - report_to_reg_l_ = mi->report_to_reg_l_->ancestor_l( chord_C_->multi_level_i_ ); + set_reg(mi->report_to_reg_l_->ancestor_l( chord_C_->multi_level_i_ )); children_p_list_.bottom().add( mi ); } } +void +Chord_iterator::do_print() const +{ +#ifndef NPRINT + for (iter(children_p_list_.top(), i); i.ok(); i++ ) { + i->print(); + } +#endif +} void Chord_iterator::next(Moment until) @@ -126,13 +170,13 @@ Chord_iterator::next(Moment until) i->next(until); } if (!i->ok()) - i.del(); + delete i.remove_p(); else i++; } Music_iterator::next(until); - assert(!ok() || next_moment() > until); +// assert(!ok() || next_moment() > until); } IMPLEMENT_STATIC_NAME(Chord_iterator); @@ -157,6 +201,13 @@ Chord_iterator::ok()const /* ************** */ +void +Voice_iterator::do_print()const +{ + if (iter_p_) + iter_p_->print(); +} + Voice_iterator::Voice_iterator(Voice const*v) : PCursor ( v->music_p_list_) { @@ -169,10 +220,9 @@ void Voice_iterator::construct_children() { if (ok()) { - iter_p_ = Music_iterator::get_iterator_p( ptr() ); - report_to_reg_l_ = - iter_p_->report_to_reg_l_->ancestor_l( voice_C_ ->multi_level_i_ ); + if (iter_p_->report_to_reg_l_->depth_i() > report_to_reg_l_->depth_i()) + set_reg(iter_p_->report_to_reg_l_); } } @@ -227,23 +277,47 @@ Voice_iterator::ok()const } /* ***************** */ - +void +Request_iterator::do_print()const +{ + mtor << req_l_->name() ; +} Request_iterator::Request_iterator(Request const*c) { req_l_ = (Request*)c; + last_b_ = false; } void Request_iterator::next(Moment m) { - if ( !daddy_iter_l_->report_to_reg_l_-> - interpreter_l()->interpret_request_b(req_l_) ) - req_l_->warning("Junking request: " + String(req_l_->name())); + if ( first_b_) { + bool gotcha = daddy_iter_l_->report_to_reg_l_-> + interpreter_l()->interpret_request_b(req_l_); + if (!gotcha) + req_l_->warning("Junking request: " + String(req_l_->name())); + first_b_ = false; + } - - Music_iterator::next(m); + if ( m >= req_l_->duration() ) + last_b_ = true; } +Moment +Request_iterator::next_moment()const +{ + + Moment m(0); + if (!first_b_) + m = req_l_->duration(); + return m; +} + +bool +Request_iterator::ok()const +{ + return (req_l_->duration() && !last_b_) || first_b_; // ugh +} IMPLEMENT_STATIC_NAME(Request_iterator); IMPLEMENT_IS_TYPE_B1(Request_iterator, Music_iterator); @@ -283,14 +357,17 @@ IMPLEMENT_IS_TYPE_B1(Voice_element_iterator,Chord_iterator); void Voice_element_iterator::construct_children() { + get_req_acceptor_l(); +/* if ( daddy_iter_l_ && daddy_iter_l_->is_type_b(Voice_iterator::static_name() )) { - report_to_reg_l_ = daddy_iter_l_-> get_req_acceptor_l(); + set_reg(daddy_iter_l_-> get_req_acceptor_l()); } else if (daddy_iter_l_ && daddy_iter_l_-> is_type_b( Chord_iterator::static_name() )) { get_req_acceptor_l(); } + */ Chord_iterator::construct_children(); } diff --git a/lily/musical-request.cc b/lily/musical-request.cc index 5f9723a0a5..fe81ac84b4 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -15,6 +15,7 @@ IMPLEMENT_STATIC_NAME(Stem_req); IMPLEMENT_IS_TYPE_B1(Stem_req,Rhythmic_req); + void Stem_req::do_print() const { @@ -263,8 +264,8 @@ Script_req::Script_req(Script_req const&s) int Script_req::compare(Script_req const &d1, Script_req const &d2) { - return d1.dir_i_ == d2.dir_i_ && - d1.scriptdef_p_->equal_b(*d2.scriptdef_p_); + return !(d1.dir_i_ == d2.dir_i_ && + d1.scriptdef_p_->equal_b(*d2.scriptdef_p_)); } Script_req::Script_req() @@ -279,13 +280,17 @@ IMPLEMENT_IS_TYPE_B1(Script_req,Request); void Script_req::do_print() const { +#ifndef NPRINT mtor << " dir " << dir_i_ ; scriptdef_p_->print(); +#endif } void Musical_script_req::do_print() const -{} +{ + Script_req::do_print(); +} IMPLEMENT_STATIC_NAME(Musical_script_req); IMPLEMENT_IS_TYPE_B2(Musical_script_req,Musical_req, Script_req); diff --git a/lily/note-column.cc b/lily/note-column.cc index 09ef114684..fab25c79ce 100644 --- a/lily/note-column.cc +++ b/lily/note-column.cc @@ -62,6 +62,7 @@ Note_column::do_pre_processing() else dir_i_ = (head_positions_interval().center() >= 5) ? -1 : 1; } + Script_column::do_pre_processing(); } diff --git a/lily/notehead.cc b/lily/notehead.cc index fa21149a6f..02033be2e4 100644 --- a/lily/notehead.cc +++ b/lily/notehead.cc @@ -15,6 +15,18 @@ #include "molecule.hh" #include "musical-request.hh" +/* + TODO + + Separate notehead into + + + Rhythmic_head + Note_head + Rest + + and Stem takes Rhythmic_heads + */ Note_head::Note_head(int ss) @@ -24,6 +36,7 @@ Note_head::Note_head(int ss) position_i_ = 0; balltype_i_ = 0; dots_i_ = 0; + dot_delta_y_i_ = 0; extremal_i_ = 0; rest_b_ = false; } @@ -31,9 +44,16 @@ Note_head::Note_head(int ss) void Note_head::do_pre_processing() { - // 8 ball looks the same as 4 ball: + // 8 ball looks the same as 4 ball: if (balltype_i_ > 4 && !rest_b_) balltype_i_ = 4; + + if (rest_b_) { + if (balltype_i_ == 1) + position_i_ = 6; + else if (balltype_i_ == 2) + position_i_ = 4; + } } void @@ -64,46 +84,62 @@ Note_head::compare(Note_head *const &a, Note_head * const &b) return a->position_i_ - b->position_i_; } +void +Note_head::set_dots() +{ + if (!(position_i_ %2) && rest_b_ && balltype_i_ == 1) + dot_delta_y_i_ = -1; + else if (!(position_i_ %2)) + dot_delta_y_i_ = 1; +} + +/* + Ugh, hairy. + */ Molecule* Note_head::brew_molecule_p() const { + ((Note_head*)this)->set_dots(); // UGH GUH Molecule*out = 0; Paper_def *p = paper(); - - Real dy = p->internote_f(); + Real inter_f = p->internote_f(); Symbol s; + + // ugh + bool streepjes_b = (position_i_<-1) || (position_i_ > staff_size_i_+1); + if (!rest_b_) s = p->lookup_l()->ball(balltype_i_); - else - s = p->lookup_l()->rest(balltype_i_); - + else { + s = p->lookup_l()->rest(balltype_i_, streepjes_b); + } out = new Molecule(Atom(s)); if (dots_i_) { - Symbol d = p->lookup_l()->dots(dots_i_); + Symbol d = p->lookup_l()->dots(dots_i_ ); Molecule dm; dm.add(Atom(d)); - if (!(position_i_ %2)) - dm.translate_y(dy); + dm.translate_y( inter_f * dot_delta_y_i_ ); out->add_right(dm); } - out->translate_x(x_dir_i_ * p->note_width()); - bool streepjes = (position_i_<-1)||(position_i_ > staff_size_i_+1); + - if (rest_b_ && balltype_i_ > 2) - streepjes = false; + if (rest_b_) { + streepjes_b = false; + } - if (streepjes) { + if (streepjes_b) { int dir = sign(position_i_); int s =(position_i_<-1) ? -((-position_i_)/2): (position_i_-staff_size_i_)/2; + Symbol str = p->lookup_l()->streepjes(s); Molecule sm; sm.add(Atom(str)); if (position_i_ % 2) - sm.translate_y(-dy* dir); + sm.translate_y(-inter_f* dir); out->add(sm); } - out->translate_y(dy*position_i_); + out->translate_y(inter_f*position_i_); return out; } diff --git a/lily/p-col.cc b/lily/p-col.cc index f55ea2452b..eb7a78ef10 100644 --- a/lily/p-col.cc +++ b/lily/p-col.cc @@ -27,10 +27,7 @@ void PCol::clean_breakable_items() { if (!line_l_) { - for(iter(its.top(), j); j.ok(); ) { - j->unlink(); - j.del(); - } + its.junk_links(); } if (prebreak_p_) prebreak_p_->clean_breakable_items(); if (postbreak_p_) postbreak_p_->clean_breakable_items(); diff --git a/lily/p-score.cc b/lily/p-score.cc index 44acc399bd..de266d1b20 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -216,6 +216,14 @@ PScore::set_breaking(Array const &breaking) typeset_broken_spanner(span_p); } } + for (iter(elem_p_list_.top(),i ); i.ok() ;) { + Item *i_l =i->item(); + if ( i_l && !i_l->pcol_l_->line_l_) { + i_l->unlink(); + delete i.remove_p(); + } else + i++; + } for (iter_top(cols, i); i.ok(); i++) i->clean_breakable_items(); diff --git a/lily/parser.y b/lily/parser.y index 7ccb227ccf..1beab2956e 100644 --- a/lily/parser.y +++ b/lily/parser.y @@ -1,7 +1,7 @@ %{ // -*-Fundamental-*- #include -#define MUDELA_VERSION "0.0.59" +#define MUDELA_VERSION "0.0.60" #include "script-def.hh" #include "symtable.hh" @@ -405,13 +405,13 @@ paper_body: $$ = THIS->default_paper(); } - | paper_body WIDTH dim { $$->linewidth = $3;} - | paper_body OUTPUT STRING { $$->outfile = *$3; + | paper_body WIDTH dim ';' { $$->linewidth = $3;} + | paper_body OUTPUT STRING ';' { $$->outfile = *$3; delete $3; } | paper_body symtables { $$->set($2); } - | paper_body UNITSPACE dim { $$->whole_width = $3; } - | paper_body GEOMETRIC REAL { $$->geometric_ = $3; } + | paper_body UNITSPACE dim ';' { $$->whole_width = $3; } + | paper_body GEOMETRIC REAL ';' { $$->geometric_ = $3; } | paper_body error { } @@ -429,11 +429,11 @@ midi_block: midi_body: { $$ = new Midi_def; } - | midi_body OUTPUT STRING { + | midi_body OUTPUT STRING ';' { $$->outfile_str_ = *$3; delete $3; } - | midi_body TEMPO notemode_duration ':' int { + | midi_body TEMPO notemode_duration ':' int ';' { $$->set_tempo( $3->length(), $5 ); } | midi_body error { @@ -765,9 +765,9 @@ script_definition: ; script_body: - STRING int int int int { + STRING int int int int int { Script_def *s = new Script_def; - s->set_from_input(*$1,$2, $3,$4,$5); + s->set_from_input(*$1,$2, $3,$4,$5, $6); $$ = s; delete $1; } @@ -785,7 +785,9 @@ script_req: gen_script_def: text_def { $$ = $1; } - | mudela_script + | mudela_script { $$ = $1; + $$-> set_spot( THIS->here_input() ); + } ; text_def: diff --git a/lily/register-group.cc b/lily/register-group.cc index 90dccee14f..4d60d50fb5 100644 --- a/lily/register-group.cc +++ b/lily/register-group.cc @@ -15,10 +15,34 @@ #include "score-elem.hh" #include "input-register.hh" +Register_group_register::~Register_group_register() +{ + assert(removable_b()); +} + +void +Register_group_register::check_removal() +{ + for (int i =0; i < group_l_arr_.size(); ) { + group_l_arr_[i]->check_removal(); + if (group_l_arr_[i]->removable_b()) + terminate_register(group_l_arr_[i]); + else + i++; + } + +} + +bool +Register_group_register::removable_b()const +{ + return !iterator_count_&& !group_l_arr_.size() ; +} Register_group_register::Register_group_register() { ireg_l_ =0; + iterator_count_ =0; } void @@ -131,8 +155,10 @@ Register_group_register::remove_register_p(Request_register*reg_l) void Register_group_register::terminate_register(Request_register*r_l) { + mtor << "Removing " << r_l->name() << " at " << get_staff_info().when() << "\n"; + r_l->do_removal_processing(); Request_register * reg_p =remove_register_p(r_l); - reg_p->do_removal_processing(); + delete reg_p; } @@ -217,7 +243,6 @@ Register_group_register::do_announces() for (int j =0; j < announce_info_arr_.size(); j++){ Score_elem_info info = announce_info_arr_[j]; - mtor << "Announcing " << info.elem_l_->name()<<"\n"; if (!info.req_l_) info.req_l_ = &dummy_req; diff --git a/lily/rest-collision.cc b/lily/rest-collision.cc index 7d219dc95c..e3b7807f6d 100644 --- a/lily/rest-collision.cc +++ b/lily/rest-collision.cc @@ -152,3 +152,9 @@ Rest_collision::do_substitute_dependency(Score_elem*o,Score_elem*n) rest_l_arr_.substitute((Rest_column*)o_l,(Rest_column*)n_l); ncol_l_arr_.substitute((Note_column*)o_l,(Note_column*)n_l); } + +Rest_collision::Rest_collision() +{ + transparent_b_ = true; + empty_b_ = true; +} diff --git a/lily/rest-column.cc b/lily/rest-column.cc index df4bd98846..219b83307b 100644 --- a/lily/rest-column.cc +++ b/lily/rest-column.cc @@ -18,6 +18,7 @@ IMPLEMENT_IS_TYPE_B1(Rest_column,Item); Rest_column::Rest_column() { dir_i_ = 0; + stem_l_ = 0; } void @@ -31,6 +32,7 @@ void Rest_column::add(Stem*stem_l) { stem_l_ = stem_l; + add_dependency(stem_l); // add_support(stem_l); } @@ -46,12 +48,17 @@ void Rest_column::do_substitute_dependency(Score_elem*o,Score_elem*n) { Script_column::do_substitute_dependency(o,n); - if (o->name() == Note_head::static_name()) { + if (o == stem_l_) + stem_l_ = n? (Stem*)n->item() :0; + + if (o->is_type_b( Note_head::static_name()) ) head_l_arr_.substitute( (Note_head*)o->item(), (n)? (Note_head*)n->item() : 0); - } } +/* + Are you sure. Horizontal_vertical_group_item::translate_y could handle this + */ void Rest_column::translate_y(Real dy_f) { diff --git a/lily/score-align-reg.cc b/lily/score-align-reg.cc index 74af8c27bb..3b118dbb21 100644 --- a/lily/score-align-reg.cc +++ b/lily/score-align-reg.cc @@ -11,9 +11,9 @@ #include "score-align-reg.hh" #include "item.hh" -Score_align_register::Score_align_register(const char *nm) +Score_align_register::Score_align_register() { - type_ch_C_ = nm; + type_ch_C_ = 0; priority_i_ =0; align_p_=0; } @@ -31,6 +31,7 @@ void Score_align_register::acknowledge_element(Score_elem_info inf) { if (inf.elem_l_->name() == type_ch_C_ ) { + if (! align_p_ ) { align_p_ = new Horizontal_group_item; announce_element(Score_elem_info(align_p_,0)); diff --git a/lily/score-align-regs.cc b/lily/score-align-regs.cc index 526b9a711f..bde475795c 100644 --- a/lily/score-align-regs.cc +++ b/lily/score-align-regs.cc @@ -17,7 +17,8 @@ class C ## _align_register : public Score_align_register \ { \ public: \ NAME_MEMBERS(); \ - C ## _align_register() : Score_align_register(T::static_name()) {\ + C ## _align_register() : Score_align_register() \ + { type_ch_C_ = T::static_name();\ priority_i_ = p;} \ }; \ IMPLEMENT_STATIC_NAME(C ## _align_register) ; \ diff --git a/lily/score-elem.cc b/lily/score-elem.cc index 868dc3e176..f22a67d004 100644 --- a/lily/score-elem.cc +++ b/lily/score-elem.cc @@ -50,12 +50,21 @@ Score_elem::TeX_string() const assert( status > POSTCALCED); if (transparent_b_ ) return ""; - String s("\\placebox{%}{%}{%}"); + String s( "\\placebox{%}{%}{%}"); Array a; a.push(print_dimen(offset_.y)); a.push(print_dimen(offset_.x)); - a.push( output->TeX_string()); - return substitute_args(s, a); + String t = output->TeX_string(); + if (t == "") + return t; + + a.push( t); + String r; + if (check_debug) + r = String("\n%start: ") + name() + "\n"; + r += substitute_args(s, a);; + return r; + } @@ -165,7 +174,11 @@ Score_elem::print()const #ifndef NPRINT mtor << name() << "{\n"; mtor << "dets: " << dependent_size() << "dependencies: " << - dependency_size() << "\n"; + dependency_size(); + if (offset_.x || offset_.y) + mtor << "offset (" << offset_.x << ", " << offset_.y <<")"; + mtor << "\n"; + do_print(); if (output) output->print(); @@ -341,7 +354,7 @@ Score_elem::line_l()const return 0; } -/******************** +/* DEPENDENCIES */ diff --git a/lily/score-halign-reg.cc b/lily/score-halign-reg.cc index f2423f9461..748c018ffe 100644 --- a/lily/score-halign-reg.cc +++ b/lily/score-halign-reg.cc @@ -6,7 +6,7 @@ (c) 1997 Han-Wen Nienhuys */ - +#include "bar.hh" #include "break-align-item.hh" #include "score-halign-reg.hh" #include "score-align-reg.hh" @@ -33,12 +33,16 @@ Score_horizontal_align_register::acknowledge_element(Score_elem_info i) if (reg->is_type_b( Score_align_register::static_name()) ) { + Score_align_register * align_reg_l = (Score_align_register*) reg; if (!halign_p_) { halign_p_ = new Break_align_item; announce_element(Score_elem_info(halign_p_,0)); } - halign_p_->add(i.elem_l_->item(), - ((Score_align_register*)reg)->priority_i_ ); + Item * it = i.elem_l_->item(); + if (align_reg_l->type_ch_C_ == Bar::static_name()) + halign_p_->center_l_ = it; + + halign_p_->add(it, align_reg_l->priority_i_); } } IMPLEMENT_STATIC_NAME(Score_horizontal_align_register); diff --git a/lily/score-reg.cc b/lily/score-reg.cc index 47d5a70f2d..b83c1e3872 100644 --- a/lily/score-reg.cc +++ b/lily/score-reg.cc @@ -30,7 +30,6 @@ Score_register::set_score(Score *s) score_l_ = s; scoreline_l_ = s->pscore_p_->super_elem_l_->line_of_score_l_; last_mom_ = score_l_->music_p_->time_int().max(); - extra_mom_pq_.insert(last_mom_); } Score_register::Score_register() diff --git a/lily/score.cc b/lily/score.cc index 5463e82938..3d7ad33de0 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -48,9 +48,10 @@ Score::setup_music() while ( iter->ok() || score_reg->extra_mom_pq_.size() ) { Moment w = INFTY; - if (iter->ok() ) + if (iter->ok() ) { w = iter->next_moment(); - + iter->print(); + } if (score_reg->extra_mom_pq_.size() && score_reg->extra_mom_pq_.front() <= w) @@ -74,8 +75,10 @@ Score::setup_music() score_reg->process_requests(); score_reg->do_announces(); score_reg->pre_move_processing(); + score_reg->check_removal(); } delete iter; + score_reg->check_removal(); score_reg->do_removal_processing(); delete score_reg; } diff --git a/lily/script-column.cc b/lily/script-column.cc index ef676502b0..adf27dc7a6 100644 --- a/lily/script-column.cc +++ b/lily/script-column.cc @@ -29,6 +29,14 @@ Script_column::do_print()const { mtor << "scripts: " << script_l_arr_.size() << '\n'; } +static int +idx(bool inside, int dir) +{ + int j = (dir+1); + if ( !inside ) + j ++; + return j; +} void Script_column::do_pre_processing() @@ -36,15 +44,11 @@ Script_column::do_pre_processing() if (!script_l_arr_.size()) return; - /* up+outside, up+inside, down+outside, down+inside */ + /* up+inside, up+outside, down+inside, down+outside */ Array placed_l_arr_a[4]; for (int i=0; i < script_l_arr_.size(); i++) { Script*s_l = script_l_arr_[i]; - int j = (s_l->dir_i_ >0) ? 0 : 2; - if (!s_l->inside_staff_b_) - j ++; - - placed_l_arr_a[j].push(s_l); + placed_l_arr_a[idx( s_l->inside_staff_b_ , s_l->dir_i_) ].push(s_l); } for (int j =0; j <4; j++) { @@ -57,10 +61,11 @@ Script_column::do_pre_processing() for (int i=0; i < support_l_arr_.size(); i++) placed_l_arr_a[j][0]->add_support( support_l_arr_[i]); } + Item * support_l=0; int j = 0; for (; j < 2; j++ ) { - for (int i=1; i < placed_l_arr_a[j].size(); i++) { + for (int i=0; i < placed_l_arr_a[j].size(); i++) { if (support_l) placed_l_arr_a[j][i]->add_support(support_l); support_l = placed_l_arr_a[j][i]; @@ -68,7 +73,7 @@ Script_column::do_pre_processing() } support_l = 0; for (; j < 4; j++ ) { - for (int i=1; i < placed_l_arr_a[j].size(); i++) { + for (int i=0; i < placed_l_arr_a[j].size(); i++) { if (support_l) placed_l_arr_a[j][i]->add_support(support_l); support_l = placed_l_arr_a[j][i]; diff --git a/lily/script-def.cc b/lily/script-def.cc index b07bbc71a8..38b2608f25 100644 --- a/lily/script-def.cc +++ b/lily/script-def.cc @@ -15,7 +15,7 @@ Script_def::Script_def() { inside_staff_b_ = false; - symidx = "unknown" ; + symidx_str_ = "unknown" ; rel_stem_dir_i_ =0; staff_dir_i_ = -1; invertsym_b_ = 0; @@ -23,29 +23,31 @@ Script_def::Script_def() } void -Script_def::set_from_input(String idx, bool follow, int stem, int staff ,bool invert) +Script_def::set_from_input(String idx, bool follow, int stem, int staff ,bool invert, int priority_i) { inside_staff_b_ = follow; - symidx = idx ; + symidx_str_ = idx ; rel_stem_dir_i_ =stem; staff_dir_i_ = staff; invertsym_b_ = invert; - priority_i_ =0; + priority_i_ =priority_i; } void -Script_def::print() const +Script_def::do_print() const { - mtor << "Script_def{ idx: " << symidx +#ifndef NPRINT + mtor << "Script_def{ idx: " << symidx_str_ << " direction, stem: " << rel_stem_dir_i_ << " staff : " << staff_dir_i_ << "}\n"; +#endif } bool Script_def::do_equal_b(General_script_def const &g)const { Script_def const & c = (Script_def const&) g; - return !(symidx == c.symidx && + return (symidx_str_ == c.symidx_str_ && rel_stem_dir_i_ == c.rel_stem_dir_i_&& staff_dir_i_ == c.staff_dir_i_&& invertsym_b_ == c.invertsym_b_); @@ -76,7 +78,7 @@ Script_def::get_atom(Paper_def *p , int d)const if (invertsym_b_&& d < 0) preidx_str = "-"; - return p->lookup_l()->script(preidx_str + symidx); + return p->lookup_l()->script(preidx_str + symidx_str_); } IMPLEMENT_STATIC_NAME(Script_def); diff --git a/lily/script-reg.cc b/lily/script-reg.cc index 9eed43434e..90bf7ce584 100644 --- a/lily/script-reg.cc +++ b/lily/script-reg.cc @@ -36,7 +36,9 @@ Script_register::do_process_requests() { for (int i=0; i < script_req_l_arr_.size(); i++){ Script_req* l=script_req_l_arr_[i]; - Script *p =new Script( l); + Script *p =new Script; + p->dir_i_ = l->dir_i_; + p->specs_l_ = l->scriptdef_p_; script_p_arr_.push(p); announce_element(Score_elem_info(p, l)); } diff --git a/lily/script.cc b/lily/script.cc index 2a39c57a0d..bf01359399 100644 --- a/lily/script.cc +++ b/lily/script.cc @@ -5,7 +5,7 @@ (c) 1997 Han-Wen Nienhuys */ - +#include "script-def.hh" #include "musical-request.hh" #include "paper-def.hh" #include "script.hh" @@ -13,7 +13,22 @@ #include "molecule.hh" #include "lookup.hh" +void +Script::do_print() const +{ +#ifndef NPRINT + specs_l_->print(); +#endif +} +void +Script::do_substitute_dependency(Score_elem*o,Score_elem*n) +{ + Staff_side::do_substitute_dependency(o,n); + if (o == stem_l_) { + stem_l_ = n ? (Stem*)n->item() : 0; + } +} void Script::set_stem(Stem*st_l) @@ -23,23 +38,30 @@ Script::set_stem(Stem*st_l) } -Script::Script(Script_req* rq) +Script::Script() { - specs_l_ = rq->scriptdef_p_; - inside_staff_b_ = specs_l_->inside_b(); + specs_l_ = 0; + inside_staff_b_ = false; stem_l_ = 0; pos_i_ = 0; - dir_i_ =rq->dir_i_; + dir_i_ = 0; } + void Script::set_default_dir() { int s_i=specs_l_->rel_stem_dir_i(); - if (s_i && stem_l_) - dir_i_ = stem_l_->dir_i_ * s_i; - else { + if (s_i) { + if(stem_l_) + dir_i_ = stem_l_->dir_i_ * s_i; + else{ + specs_l_->warning("Script needs stem direction"); + dir_i_ = -1; + } + } else { dir_i_ =specs_l_->staff_dir_i(); } + assert(dir_i_); } void @@ -59,7 +81,7 @@ Script::do_pre_processing() { if (!dir_i_) set_default_dir(); - + inside_staff_b_ = specs_l_->inside_b(); } void diff --git a/lily/staff-side.cc b/lily/staff-side.cc index 2c5e1848c8..e7d8ccebf6 100644 --- a/lily/staff-side.cc +++ b/lily/staff-side.cc @@ -17,6 +17,7 @@ void Staff_side::set_staffsym(Staff_symbol* s_l) { staff_sym_l_ = s_l; + add_dependency( s_l ); } Staff_side::Staff_side() @@ -89,12 +90,15 @@ int Staff_side::get_position_i(Interval sym_dim) const { int i= get_position_i(); - return i+ int(rint(- sym_dim[-dir_i_] / paper()->internote_f())); + if (dir_i_) + return i+ int(rint(- sym_dim[-dir_i_] / paper()->internote_f())); + else + return i; } void -Staff_side::do_substitute_dependency(Score_elem*o, Score_elem*n ) +Staff_side::do_substitute_dependency(Score_elem*o, Score_elem*n) { int i; while ((i=support_l_arr_.find_i(o) ) >=0) diff --git a/lily/symtable.cc b/lily/symtable.cc index b778111005..3ba4394cc2 100644 --- a/lily/symtable.cc +++ b/lily/symtable.cc @@ -40,8 +40,7 @@ Symtable::lookup(String s) const return (*this)[s]; else { warning( "Symtable `" + id_str+ "\': unknown symbol `" +s+"'\n"); - Symbol sy; // unreachable - sy.tex = ""; + Symbol sy; return sy; } } diff --git a/lily/text-def.cc b/lily/text-def.cc index dc7ed6f58a..4d6c641436 100644 --- a/lily/text-def.cc +++ b/lily/text-def.cc @@ -24,12 +24,20 @@ Text_def::width(Paper_def * p) const return i; } +void +Text_def::do_print() const +{ +#ifndef NPRINT + mtor << "align " < + + Obsolete. */ #include "note-column.hh" #include "musical-request.hh" diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index 2b40f00e8e..10bbb0b0fa 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -18,17 +18,17 @@ void Text_spanner::set_support(Directional_spanner*d) { - if (support) - remove_dependency(support); + if (support_span_l_) + remove_dependency(support_span_l_); - support =d; + support_span_l_ =d; add_dependency(d); } Text_spanner::Text_spanner() { spec_p_ = 0; - support = 0; + support_span_l_ = 0; } IMPLEMENT_STATIC_NAME(Text_spanner); @@ -43,8 +43,8 @@ Text_spanner::do_print() const void Text_spanner::do_post_processing() { - text_off_ = support->center() + - Offset(0,support->dir_i_ * paper()->internote_f() * 4); // todo + text_off_ = support_span_l_->center() + + Offset(0,support_span_l_->dir_i_ * paper()->internote_f() * 4); // todo } Molecule* @@ -61,8 +61,8 @@ Text_spanner::brew_molecule_p() const void Text_spanner::do_pre_processing() { - right_col_l_ = support->right_col_l_; - left_col_l_ = support->left_col_l_; + right_col_l_ = support_span_l_->right_col_l_; + left_col_l_ = support_span_l_->left_col_l_; assert(left_col_l_ && right_col_l_); } @@ -75,9 +75,8 @@ Text_spanner::height()const void Text_spanner::do_substitute_dependency(Score_elem* o, Score_elem*n) { - Directional_spanner * old = (Directional_spanner*)o->spanner(); - if (support == old) - support = (Directional_spanner*) n->spanner(); + if (support_span_l_ == o) + support_span_l_ = (Directional_spanner*) (n?n->spanner():0); } @@ -85,3 +84,11 @@ Text_spanner::~Text_spanner() { delete spec_p_; } + +Text_spanner::Text_spanner(Text_spanner const&s) + : Spanner( s) +{ + support_span_l_ = s.support_span_l_; + spec_p_ = s.spec_p_? s.spec_p_->clone() : 0; + text_off_ = s.text_off_; +} diff --git a/lily/tie-reg.cc b/lily/tie-reg.cc index 5541888b3c..725c02c277 100644 --- a/lily/tie-reg.cc +++ b/lily/tie-reg.cc @@ -21,6 +21,7 @@ Tie_register::Tie_register() end_mom_ = -1; melodic_req_l_ = 0; end_melodic_req_l_ =0; + dir_i_ = 0; } void diff --git a/lily/vertical-align-elem.cc b/lily/vertical-align-elem.cc index 4ff58eef6f..2aecf5d3fc 100644 --- a/lily/vertical-align-elem.cc +++ b/lily/vertical-align-elem.cc @@ -31,7 +31,7 @@ void Vertical_align_elem::do_post_processing() { Array dims; - for (int i=elem_l_arr_.size(); i--; ) { + for (int i=0; i < elem_l_arr_.size(); i++ ) { Interval y = elem_l_arr_[i]->height() ; if (y.empty_b()) y = Interval(0,0); diff --git a/lily/voice-group-regs.cc b/lily/voice-group-regs.cc index 06757b7b74..b2fdd6cd94 100644 --- a/lily/voice-group-regs.cc +++ b/lily/voice-group-regs.cc @@ -21,7 +21,6 @@ Voice_group_registers::Voice_group_registers() { dir_i_ =0; - termination_mom_ = INFTY; } bool @@ -50,17 +49,6 @@ Voice_group_registers::do_print() const #endif } -void -Voice_group_registers::do_post_move_processing() -{ - if ( get_staff_info().time_C_ ->when_ > termination_mom_ ){ - mtor << "Terminating voice_group\n"; - daddy_reg_l_->terminate_register(this); - return ; - } - Register_group_register::do_post_move_processing(); -} - Scalar diff --git a/lily/voice-regs.cc b/lily/voice-regs.cc index 641e8d6da1..cc141ffdba 100644 --- a/lily/voice-regs.cc +++ b/lily/voice-regs.cc @@ -14,17 +14,6 @@ #include "register.hh" #include "debug.hh" -Voice_registers::Voice_registers() -{ -} - -void -Voice_registers::do_print() const -{ -#ifndef NPRINT - Register_group_register::do_print(); -#endif -} ADD_THIS_REGISTER(Voice_registers); IMPLEMENT_IS_TYPE_B1(Voice_registers, Register_group_register); diff --git a/make/lilypond.lsm b/make/lilypond.lsm index 2ba9980153..13303f5d72 100644 --- a/make/lilypond.lsm +++ b/make/lilypond.lsm @@ -2,8 +2,8 @@ Begin3 Title: LilyPond -Version: 0.0.68pre -Entered-date: 06/26/97 +Version: 0.0.70pre +Entered-date: 06/29/97 Description: LilyPond is a program which converts a music-script (mudela) into TeX output, or MIDI to produce multi-staff scores. Features include multiple meters, clefs, keys, lyrics, versatile input-language, cadenzas @@ -13,7 +13,7 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys) jan@digicash.com (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: pcnov095.win.tue.nl /pub/lilypond/ - 300k lilypond-0.0.68pre.tar.gz + 300k lilypond-0.0.70pre.tar.gz Alternate-site: Original-site: Platform: unix/win32, GNU C++ diff --git a/make/lilypond.spec b/make/lilypond.spec index 85123c76eb..ec4ab4ea4b 100644 --- a/make/lilypond.spec +++ b/make/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 0.0.68pre +Version: 0.0.70pre Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.68pre.tar.gz +Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.70pre.tar.gz Summary: A preprocessor to make TeX typeset music. URL: http://www.stack.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys @@ -27,7 +27,7 @@ rm -rf $RPM_BUILD_ROOT strip lily/out/lilypond mi2mu/out/mi2mu make prefix="$RPM_BUILD_ROOT/usr" install %files -%doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/error.text Documentation/out/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/language.text Documentation/out/lilygut.text Documentation/out/lilyliterature.text Documentation/out/lilypond.text Documentation/out/mi2mu.text Documentation/out/mudela.text Documentation/out/other-packages.text input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/error.ly input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen.ly input/standchen.tex input/toccata-fuga-E.ly input/twinkle.ly input/wohltemperirt.ly Documentation/lelie_logo.gif +%doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/error.text Documentation/out/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/language.text Documentation/out/lilygut.text Documentation/out/lilyliterature.text Documentation/out/lilypond.text Documentation/out/mi2mu.text Documentation/out/mudela.text Documentation/out/other-packages.text input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/error.ly input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/slurs.ly input/standchen.ly input/standchen.tex input/toccata-fuga-E.ly input/twinkle.ly input/wohltemperirt.ly Documentation/lelie_logo.gif /usr/bin/convert-mudela /usr/bin/lilypond /usr/lib/libflower.so diff --git a/tex/dimen.tex b/tex/dimen.tex index e09ced2737..c67dee6551 100644 --- a/tex/dimen.tex +++ b/tex/dimen.tex @@ -1,7 +1,8 @@ % % A tex file to help determine dims. % -\font\musicfont=opus20 + +\font\musicfont=musix16 \font\slurfont=xslu16 \def\thefont{\musicfont} diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 9e71e8ddda..299ff2edd8 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -21,6 +21,8 @@ \def\mdef#1#2{\def#1{\mchar{#2}}} \def\mchar#1{\musicfnt\char#1} \def\rationalmultiply#1*#2/#3{\multiply #1 by #2 \divide #1 by #3} + + \def\maccentraise#1#2{\dimen0=\noteheight \rationalmultiply\dimen0*#2% \raise\dimen0\hbox{#1}} diff --git a/tex/taupindefs.tex b/tex/taupindefs.tex index 91eb34260a..1622b990cb 100644 --- a/tex/taupindefs.tex +++ b/tex/taupindefs.tex @@ -39,6 +39,9 @@ \mdef\wholeball{'011} \mdef\halfrest{'074} \mdef\wholerest{'075} +%% hmm +\mdef\outsidehalfrest{10} +\mdef\outsidewholerest{11} \mdef\quartrest{62} \mdef\eighthrest{63} \mdef\sixteenthrest{64} @@ -97,8 +100,8 @@ \maccentdef\sforzato{30}{-3/2} \maccentdef\marcato{20}{-1/1} \maccentdef\imarcato{21}{1/1} -\maccentdef\staccato{24}{-1/3} -\maccentdef\istaccato{25}{1/3} +\maccentdef\staccato{24}{-1/1} +\maccentdef\istaccato{25}{1/1} \maccentdef\staccatissimo{28}{-5/5} \maccentdef\istaccatissimo{29}{2/5} \maccentdef\portato{18}{-6/5} -- 2.39.5