From 5e98b3e282d175f1908dc3017412431f443642c1 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 5 Aug 1997 03:17:14 +0200 Subject: [PATCH] release: 0.1.1 --- AUTHORS.text | 2 +- BUGS | 4 + Documentation/INSTALL.pod | 42 +- Documentation/Makefile | 1 - Documentation/Rules.make | 2 +- Documentation/lilygut.pod | 89 +- Documentation/lilyliterature.pod | 43 +- Documentation/links.pod | 11 +- Documentation/mudela-book.pod | 7 +- Documentation/mudela-course.doc | 3 + Documentation/mudela-man.doc | 10 +- INSTALL.text | 118 ++- NEWS | 1178 +----------------------- ONEWS | 1170 +++++++++++++++++++++++ README | 14 +- TODO | 68 +- VERSION | 4 +- aclocal.m4 | 85 ++ bin/Makefile | 2 +- bin/{make_patch => make-patch} | 0 bin/mudela-book.in | 47 +- bin/release | 2 +- bin/show-latest.in | 46 +- configure | 248 ++--- configure.in | 209 ++--- flower/Makefile | 5 +- flower/NEWS | 44 +- flower/ONEWS | 34 + flower/TODO | 3 + flower/VERSION | 2 +- flower/choleski.cc | 66 +- flower/configure | 76 +- flower/configure.in | 29 +- flower/diagonal-storage.cc | 33 +- flower/directed-graph.cc | 2 +- flower/full-storage.cc | 130 +-- flower/include/Makefile | 1 + flower/include/choleski.hh | 4 +- flower/include/diagonal-storage.hh | 6 +- flower/include/full-storage.hh | 53 +- flower/include/full-storage.icc | 94 ++ flower/include/parray.hh | 11 + flower/include/rational.hh | 16 + flower/include/real.hh | 12 + flower/include/varray.hh | 7 +- flower/include/vector.hh | 5 + flower/include/virtual-methods.hh | 8 + flower/matrix-storage.cc | 2 +- flower/matrix.cc | 10 + flower/rational.cc | 18 + flower/test/mat-test.cc | 6 +- init/paper16.ly | 6 + input/rock.ly | 4 + input/wohltemperirt.ly | 3 +- lib/Makefile | 2 +- lib/config.hh.in | 6 + lib/include/moment.hh | 16 +- lily/Makefile | 5 +- lily/Stable.make | 4 +- lily/VERSION | 2 +- lily/boxes.cc | 1 - lily/break-caching.cc | 1 + lily/break.cc | 129 ++- lily/colhpos.cc | 44 +- lily/command-request.cc | 2 + lily/debug.cc | 7 +- lily/elem-group-item.cc | 4 +- lily/elem-group.cc | 44 +- lily/engraver-group.cc | 2 + lily/gourlay-breaking.cc | 177 ++++ lily/grouping.cc | 2 +- lily/groupregs.cc | 0 lily/horizontal-align-item.cc | 9 +- lily/horizontal-group-item.cc | 41 + lily/include/break-caching.hh | 23 + lily/include/break.hh | 44 +- lily/include/colhpos.hh | 12 +- lily/include/const.hh | 3 +- lily/include/elem-group-item.hh | 11 +- lily/include/elem-group.hh | 17 +- lily/include/gourlay-breaking.hh | 28 + lily/include/horizontal-align-item.hh | 1 + lily/include/horizontal-group-item.hh | 25 + lily/include/ineq-constrained-qp.hh | 4 + lily/include/item.hh | 5 +- lily/include/line-group-grav.hh | 2 +- lily/include/line-spacer.hh | 14 +- lily/include/linespace.hh | 2 +- lily/include/music-list.hh | 4 + lily/include/p-col.hh | 2 +- lily/include/performer.hh | 4 + lily/include/request.hh | 2 +- lily/include/score-elem-info.hh | 4 +- lily/include/score-elem.hh | 17 +- lily/include/scoreline.hh | 5 +- lily/include/spanner.hh | 9 +- lily/include/spring-spacer.hh | 27 +- lily/include/vertical-group-spanner.hh | 35 + lily/include/word-wrap.hh | 2 +- lily/ineq-constrained-qp.cc | 40 +- lily/input-translator.cc | 2 + lily/item.cc | 28 +- lily/keyword.cc | 3 - lily/line-group-grav.cc | 9 +- lily/line-spacer.cc | 2 - lily/lookup.cc | 2 + lily/misc.cc | 28 +- lily/molecule.cc | 4 + lily/music-iterator.cc | 6 +- lily/music-list.cc | 4 +- lily/music.cc | 2 + lily/p-score.cc | 30 +- lily/parser.y | 2 +- lily/performer-group-performer.cc | 2 + lily/qlp.cc | 3 - lily/qlpsolve.cc | 16 +- lily/score-align-grav.cc | 2 +- lily/score-elem.cc | 61 +- lily/score.cc | 2 +- lily/scoreline.cc | 5 +- lily/spanner.cc | 22 +- lily/spring-spacer.cc | 146 ++- lily/staffline.cc | 7 - lily/template2.cc | 6 +- lily/template5.cc | 16 - lily/tex.cc | 9 +- lily/vertical-align-grav.cc | 2 +- lily/vertical-group-spanner.cc | 104 +++ lily/{wordwrap.cc => word-wrap.cc} | 39 +- make/Configure_variables.make.in | 3 + make/Makefile | 1 + make/Targets.make | 27 +- make/Toplevel.make.in | 8 +- make/Variables.make | 54 +- make/lilypond.lsm | 9 +- make/lilypond.lsm.in | 1 - make/lilypond.spec | 8 +- make/lilypond.spec.in | 2 + mi2mu/Makefile | 3 + 139 files changed, 3431 insertions(+), 2184 deletions(-) create mode 100644 ONEWS create mode 100644 aclocal.m4 rename bin/{make_patch => make-patch} (100%) create mode 100644 flower/ONEWS create mode 100644 flower/include/full-storage.icc create mode 100644 flower/rational.cc create mode 100644 input/rock.ly create mode 100644 lib/config.hh.in create mode 100644 lily/break-caching.cc create mode 100644 lily/gourlay-breaking.cc delete mode 100644 lily/groupregs.cc create mode 100644 lily/horizontal-group-item.cc create mode 100644 lily/include/break-caching.hh create mode 100644 lily/include/gourlay-breaking.hh create mode 100644 lily/include/horizontal-group-item.hh create mode 100644 lily/include/vertical-group-spanner.hh create mode 100644 lily/vertical-group-spanner.cc rename lily/{wordwrap.cc => word-wrap.cc} (72%) diff --git a/AUTHORS.text b/AUTHORS.text index 8ebc36383a..4ebcd69823 100644 --- a/AUTHORS.text +++ b/AUTHORS.text @@ -61,6 +61,6 @@ CCCCOOOONNNNTTTTRRRRIIIIBBBBUUUUTTTTOOOORRRRSS -30/Jul/97 LilyPond 0.1.0 1 +30/Jul/97 LilyPond 0.1.1 1 diff --git a/BUGS b/BUGS index e0f534ec8e..84a3fddf93 100644 --- a/BUGS +++ b/BUGS @@ -16,3 +16,7 @@ } ******************* + +Stack frame overwrite in on Solaris 2.5. +Engraver_group_engraver::Engraver_group_engraver() called from +Score_engraver::Score_engraver() diff --git a/Documentation/INSTALL.pod b/Documentation/INSTALL.pod index 60100908e8..82d5e944fd 100644 --- a/Documentation/INSTALL.pod +++ b/Documentation/INSTALL.pod @@ -188,7 +188,11 @@ Set then directory TeX input is in (detected as a subdir of tex-prefix) =item --enable-mf-dir -Set then directory mf input is in (idem) [obsolete] +Set the directory mf input is in (idem) [obsolete] + +=item --enable-out-dir + +Set the directory for machine generated output. =back @@ -203,6 +207,33 @@ everything will be compiled, but nothing will be installed. The resulting binaries can be found in the subdirectories F (which contain all files generated during compilation). +=head2 Building for multiple hosts + +LilyPond does not follow the GNU standards when it comes to +configuring and making Makefiles. In LilyPond, F generates I +output in output directories (called F, by default). +You can have multiple compiles from the same source-tree, by +overriding the setting for the output directory. + +Example: on my system, I do debugging and lots compiling. For this I +use the configuration as follows: + + configure --prefix=~ --enable-debugging --enable-printing --enable-checking + make all + +and I want to do profiling. For that I use + + configure --prefix=~ --enable-debugging --disable-printing\ + --disable-checking --enable-profiling --enable-optimise\ + --enable-out-dir=out-profile + + make OUTDIR_NAME=out-profile all + +These two commands build two entirely separate versions of +LilyPond. In Real Life, you would probably also want to have two +different prefixes. On my machine this is no problem; I never do +C. My prefix dirs are linked back to my source directory. + =head1 INSTALLING @@ -232,6 +263,10 @@ files, I ran "texhash" The -O2 option to gcc triggers a gcc bug on DEC Alpha in dstream.cc. You should turn off this flag for this file. +=item * + +Perl5.003 and Perl5.004 use different syntax for pod2html: + =back =head1 EXAMPLE @@ -271,6 +306,11 @@ F. (If you create the RPM as a normal user the permissions will not be set correctly, unfortunately) +=head1 DEBIAN GNU/LINUX + +A Debian package is in the works + + =head1 WINDOZE Windows NT: diff --git a/Documentation/Makefile b/Documentation/Makefile index ea4a7be9c0..edd922ce57 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -52,7 +52,6 @@ include $(depth)/make/Rules.make # localclean: - rm -f out/* rm -f $(TEXTFILES) $(HTMLFILES) $(GROFFFILES) MAN1FILES = lilypond convert-mudela mi2mu mudela-book diff --git a/Documentation/Rules.make b/Documentation/Rules.make index 71388de3c4..7724807799 100644 --- a/Documentation/Rules.make +++ b/Documentation/Rules.make @@ -36,7 +36,7 @@ $(outdir)/%.1: %.pod $(outdir)/%.gz: $(outdir)/% gzip -c9 $< > $@ -$(outdir)/%.dvi: $(depth)/input/%.ly +$(outdir)/%.dvi: $(depth)/input/%.ly $(lilyout)/lilypond (cd $(outdir); lilypond ../$< ;\ if [ -f ../$(basename $< ).tex ]; \ then \ diff --git a/Documentation/lilygut.pod b/Documentation/lilygut.pod index 71d0f8f566..4d174f1e63 100644 --- a/Documentation/lilygut.pod +++ b/Documentation/lilygut.pod @@ -6,7 +6,8 @@ LilyGuts - doco to the internals of GNU LilyPond This page documents some aspects of the internals of GNU LilyPond. Some of this stuff comes from e-mail I wrote, some from e-mail others wrote, -some are large comments taken away from the headers +some are large comments taken away from the headers. This is why this +page may be a little incoherent. You should use doc++ to take a peek at the sources. @@ -28,20 +29,32 @@ might be integrated in larger systems. =item Parsing: -No difficult algorithms. Associated datastructures have prefix Input -(eg Input_score, Input_command). The .ly file is read, and converted -to +No difficult algorithms. The .ly file is read, and converted to a list +of C, which each contain C and paper/midi-definitions. =item Creating elements -Requests are processed and used to create elements (like balls, stems, -slurs etc). This is done by a hierarchy of "brokers" (called -Translators: the ones for paper output are Engravers, for MIDI -Performers), which swallow requests, broadcast them and couple -different elements. +The music is walked column by column. The iterators which do the +walking report the Request to Translators which use this information +to create elements, either MIDI or "visual" elements. The translators +form a hierarchy; the ones for paper output are Engravers, for MIDI +Performers). -In this step data-structures for the next steps are created and filled -with data: Score_elements, PScore, PCol. +The translators swallow requests, create elements, broadcast them to +other translators on higher or same level in the hierarchy: + +The stem of a voice A is broadcast to the staff which contains A, but +not to the noteheads of A, and not to the stems, beams and noteheads +of a different voice (say B) or a different staff. The stem and +noteheads of A are coupled, because the the Notehead_engraver +broadcasts its heads, and the Stem catches these. + +The engraver which agrees to handle a request decides whether to to +honor the request, ignore it, or merge it with other requests. Merging +of requests is preferably done with other requests done by members of +the same voicegroups (beams, brackets, stems). In this way you can put +the voices of 2 instruments in a conductor's score so they make chords +(the Stem_reqs of both instruments will be merged). =item Prebreaking @@ -50,35 +63,30 @@ Breakable stuff (eg. clefs and bars) are copied into pre and postbreaks. =item Preprocessing Some dependencies are resolved, such as the direction of stems, beams, +and "horizontal" placement issues (the order of clefs, keys etc, +placement of chords in multi-voice music), =item Break calculation: -The lines and horizontal positions of the columns are determined +The lines and horizontal positions of the columns are determined. =item Breaking - Through some magical interactions with Line_of_score and Super_elem (check out the source) the "lines" are produced. All other spanners can figure across which lines they are spread. If applicable, they break themselves into pieces. After this, each piece -works (or, if there are no pieces) the spanner throws out any -dependencies which are in the wrong line. +(or, if there are no pieces, the original spanner itself) throws out +any dependencies which are in the wrong line. =item Postprocesing: Some items and all spanners need computation after the PCol positions -are determined. +are determined. Examples: slurs, vertical positions of staffs. =item Output paper - -=item Output midi - -The music is run through a translator (called Performer) which -creates midi-items from the requests. - =back =head1 INTERNALS @@ -92,24 +100,7 @@ In music typesetting, the user might want to cram a lot more symbols on the paper than actually fits. To reflect this idea (the user asks more than we can do), the container for this data is called Request. -The music (requests) are read/interpreted by a set of objects -(translators), the Performers/Engravers. The engraver which agrees to -handle a request decides whether to to honor the request, ignore it, -or merge it with other requests. Merging of requests is preferably -done with other requests done by members of the same voicegroups -(beams, brackets, stems). - -The result of a request will be an C or a C, which -will be put on the score. - -Different staffs can produce different outputs; a melodious voice -which is put into a percussion-Staff, will be typeset as the rythm of -that voice. - -After C made up her mind, the resultant items and -spanners are put on the PScore. - -Some of the important requests are: +In a lot of other formats this would be called an 'Event' =over 4 @@ -205,8 +196,8 @@ this to the Staff_engraver. Staff_engraver will tell C about the C, which will add the C to the C it just created. -To decide on merging, C has grouped several -engravers. Please check F. +To decide on merging, several engravers have been grouped. Please +check F. =head1 ITEMS and SPANNERS @@ -228,8 +219,7 @@ should be calculated. =head1 BREAKING -So what's the deal with PREBREAK and POSTBREAK and all this -stuff? +So what is this PREBREAK and POSTBREAK stuff? Let's take text as an example. In German some compound words change their spelling if they are broken: "backen" becomes @@ -258,7 +248,7 @@ on the next line if it is broken. =head1 SPACING -I think my method is the most elegant algorithm i've seen so far. + Some terminology: I call a vertical group of symbols (notes) which start at the same time a "column". Each line of a score has notes in it, grouped in columns. The difference in starting time between those @@ -267,9 +257,9 @@ columns. Example: - time -----> + time -----> - col1 col2 col3 col4 + cols: col1 col2 col3 col4 voice1 1 1 @@ -284,8 +274,7 @@ Example: time_difference (col2 , col3) = 0.5 wholes, etc. -these differences are translated into ideal distances (these translations -have been the subject of discussion in this thread). +these differences are translated into ideal distances distance (col1,col2) = 10 pt distance (col1,col3) = 14.1 pt @@ -326,3 +315,5 @@ springs. This is an area that needs a lot of work, and the optimal solution to find is not of a mathematical nature. Gourlay's solution is used. + + diff --git a/Documentation/lilyliterature.pod b/Documentation/lilyliterature.pod index 1ea51c9b45..5bba17b138 100644 --- a/Documentation/lilyliterature.pod +++ b/Documentation/lilyliterature.pod @@ -49,6 +49,7 @@ December 1996 [Pamphlet explaining some fine points in music font design HWN] + =head2 Notation with computers Donald Byrd. ``Music Notation by Computer''. Dissertation Indiana @@ -73,11 +74,6 @@ Assisted Research in the Humanities. [Annual editions since 1985, many containing surveys of music typesetting technology. SP] -Wael A. Hegazy and John S. Gourlay. ``Optimal line breaking in music''. In -Document Manipulation and Typography, J.C. van Vliet (ed) 1988. - -[This generalizes TeX's breaking algorithm to music HWN] - David A. Gomberg; ``A Computer-oriented System for Music Printing.'' Computers and the Humanities, Vol.11, pp 63-80. @@ -111,6 +107,13 @@ Computer and Information Science, The Ohio State University, 1987. [Describes the "parser" which converts MusiCopy MDL to MusiCopy Simultaneities & columns HWN] +Wael A. Hegazy and John S. Gourlay. ``Optimal line breaking in +music''. Technical Report OSU-CISRC-8/87-TR33, Department of Computer +and Information Science, The Ohio State University, 1987 + +[This generalizes TeX's breaking algorithm to music. It also appeared in +Document Manipulation and Typography, J.C. van Vliet (ed) 1988. HWN] + Dean K. Roush. ``Using MusiCopy''. Technical Report OSU-CISRC-18/87-TR31, Department of Computer and Information Science, The Ohio State University, 1987 @@ -244,15 +247,12 @@ Kurt Stone. Music Notation in the Twentieth Century. New York: Norton, 1980. -=head2 other stuff +=head2 Other stuff More on GNU Music: http://dept-info.labri.u-bordeaux.fr/~strandh/Gsharp -Tablature: http://wabakimi.carleton.ca/~phacket2/guitar/tabfaq.html - - Peter S. Langston, ``Unix music tools at Bellcore''. Software --- Practice and Experience, Vol. 20(S1), S1/47--S1/61, 1990. @@ -261,15 +261,36 @@ playback. It doesn't mention notation issues, but does come with the grand idea (not) of using music to monitor complex systems. Imagine your nuclear plant supervisor to use AC/DC for checking the reactor HWN] + +=head2 File formats + +Tablature: http://wabakimi.carleton.ca/~phacket2/guitar/tabfaq.html + Cindy Grande, NIFF6a Notation Interchange File Format. Grande -Software Inc., 1995. ftp://blackbox.cartah.washington.edu/pub/ +Software Inc., 1995. ftp://blackbox.cartah.washington.edu/pub/, +http://www.jtauber.com/music/encoding/niff/ [Specs for NIFF, a comprehensive but binary (yuk) format for notation HWN] +SMDL, Standard Musical Description Language +ftp://ftp.ornl.gov/pub/sgml/wg8/smdl/10743.pdf + +MPDL, + +HMSL, Hierarchical Music Structured Language, + +DARMS, + +enigma, + +SCORE, + + =head1 AUTHORS References and comments contributed by Han-Wen Nienhuys (HWN), Miguel Filgueiras, Mark Basinski (MB), Dorothea Blostein, Stephen Page (SP), -Jan Nieuwenhuizen. +Jan Nieuwenhuizen, Peter Kerr. This should really be redone in BibTeX + diff --git a/Documentation/links.pod b/Documentation/links.pod index 9c7edf0a62..c5fadae003 100644 --- a/Documentation/links.pod +++ b/Documentation/links.pod @@ -45,7 +45,7 @@ Beta releases will also be at =item ftp://pcnov095.win.tue.nl/pub/lilypond -=item ftp://alpha.gnu.ai.mit.edu/ +=item ftp://alpha.gnu.ai.mit.edu/gnu/ =back @@ -117,8 +117,13 @@ Dave Philips' Linux sound applications page More software for (early) music. -=item http://www.emry.net/ +=item http://www.emry.net/webwatcher/ -Linux webwatcher. +The Linux webwatcher. + +=item http://www.pbm.com/~lindahl/ravenscroft/modern + +Transcriptions of the music of Thomas Ravenscroft, partly using +LilyPond =back diff --git a/Documentation/mudela-book.pod b/Documentation/mudela-book.pod index 042948dc4b..5742521677 100644 --- a/Documentation/mudela-book.pod +++ b/Documentation/mudela-book.pod @@ -4,10 +4,12 @@ mudela-book - integrate LaTeX and mudela =head1 SYNOPSIS - convert-mudela [options] [files] + convert-mudela [options] [file] =head1 DESCRIPTION +If no file is given, input is taken from the standard input + mudela-book runs LilyPond on fragments of mudela in your source file, and produces a LaTeXable document, with formatted music. @@ -38,7 +40,8 @@ CONTENTS is copied into the TeX source enclosed in a verbatim block. =item B<--outname> -The name of TeX file to output +The name of TeX file to output. If none is given, the output is +printed on stdout. =item B<--outdir> diff --git a/Documentation/mudela-course.doc b/Documentation/mudela-course.doc index 089b74444c..a918c5df2e 100644 --- a/Documentation/mudela-course.doc +++ b/Documentation/mudela-course.doc @@ -14,6 +14,9 @@ \def\preexample{\par\medskip} \def\postexample{\par\medskip} +\emph{This document is not complete yet. It's just a brief blurb which + skimps some features of Mudela} + \section{Overview} Mudela is a language for specifying music. LilyPond is a diff --git a/Documentation/mudela-man.doc b/Documentation/mudela-man.doc index afcf5c4c19..8e3d0de2ea 100644 --- a/Documentation/mudela-man.doc +++ b/Documentation/mudela-man.doc @@ -15,6 +15,8 @@ \def\postexample{\par\medskip} \def\file#1{{\texttt{#1}}} +\emph{This document is not complete yet} + \section{Introduction} This document describes the the GNU LilyPond input format, which is an @@ -24,13 +26,13 @@ short.\footnote{If anybody comes up with a better name, we'd gladly take this. Gourlay already uses Musical Description Language, G-Sharp Score Definition Language. We're not being original here} -The first aim of Mudela is to define a piece of music, -being complete from both from a musical typesetting, -as from a musical performing point of view. +The first aim of Mudela is to define a piece of music, being complete +from both from a musical typesetting, as from a musical performing +point of view. The Musical Definition Language (Mudela), has a logical structure, making use of identifiers, that allows for flexible input, and -definition reuse. See MANIFESTO for reasons and design considerations. +definition reuse. See \file{MANIFESTO} for reasons and design considerations. The below included for explanatory purposes only (i.e., for a complete and up-to-date definition, see \file{lily/parser.y} and diff --git a/INSTALL.text b/INSTALL.text index 485136c659..3a2b240602 100644 --- a/INSTALL.text +++ b/INSTALL.text @@ -61,7 +61,7 @@ RRRRUUUUNNNNNNNNIIIINNNNGGGG -1/Aug/97 LilyPond 0.1.0 1 +3/Aug/97 LilyPond 0.1.1 1 @@ -127,7 +127,7 @@ CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG a -1/Aug/97 LilyPond 0.1.0 2 +3/Aug/97 LilyPond 0.1.1 2 @@ -186,14 +186,14 @@ INSTALL(1) LilyPond documentation INSTALL(1) subdir of tex-prefix) --enable-mf-dir - Set then directory mf input is in (idem) + Set the directory mf input is in (idem) [obsolete] - All options are documented in the _c_o_n_f_i_g_u_r_e help -1/Aug/97 LilyPond 0.1.0 3 + +3/Aug/97 LilyPond 0.1.1 3 @@ -202,6 +202,10 @@ INSTALL(1) LilyPond documentation INSTALL(1) INSTALL(1) LilyPond documentation INSTALL(1) + --enable-out-dir + Set the directory for machine generated output. + + All options are documented in the _c_o_n_f_i_g_u_r_e help The option --------eeeennnnaaaabbbblllleeee----ooooppppttttiiiimmmmiiiisssseeee is recommended for Real Life usage. @@ -214,6 +218,35 @@ INSTALL(1) LilyPond documentation INSTALL(1) in the subdirectories _o_u_t_/ (which contain all files generated during compilation). + BBBBuuuuiiiillllddddiiiinnnngggg ffffoooorrrr mmmmuuuullllttttiiiipppplllleeee hhhhoooossssttttssss + + LilyPond does not follow the GNU standards when it comes + to configuring and making Makefiles. In LilyPond, _m_a_k_e + generates _a_l_l output in output directories (called _o_u_t_/, + by default). You can have multiple compiles from the same + source-tree, by overriding the setting for the output + directory. + + Example: on my system, I do debugging and lots compiling. + For this I use the configuration as follows: + + configure --prefix=~ --enable-debugging --enable-printing --enable-checking + make all + + and I want to do profiling. For that I use + + configure --prefix=~ --enable-debugging --disable-printing\ + --disable-checking --enable-profiling --enable-optimise\ + --enable-out-dir=out-profile + + make OUTDIR_NAME=out-profile all + + These two commands build two entirely separate versions of + LilyPond. In Real Life, you would probably also want to + have two different prefixes. On my machine this is no + problem; I never do make install. My prefix dirs are + linked back to my source directory. + IIIINNNNSSSSTTTTAAAALLLLLLLLIIIINNNNGGGG If you have done a successful make, then a simple @@ -223,6 +256,18 @@ IIIINNNNSSSSTTTTAAAALLLLLLLLIIIINNNNGGGG Install the musixtex fonts in a directory which TeX and MF knows (if you are root, look for a directory which + + + +3/Aug/97 LilyPond 0.1.1 4 + + + + + +INSTALL(1) LilyPond documentation INSTALL(1) + + contains the directories with AMS and CM source (*.mf) files. Create a subdir lilypond or musixtex and copy the fonts into that). Do not forget to rehash TeX (if @@ -239,6 +284,9 @@ CCCCAAAAVVVVEEEEAAAATTTTSSSS Alpha in dstream.cc. You should turn off this flag for this file. + +o Perl5.003 and Perl5.004 use different syntax for + pod2html: + EEEEXXXXAAAAMMMMPPPPLLLLEEEE This is what I type in my xterm: @@ -248,26 +296,6 @@ EEEEXXXXAAAAMMMMPPPPLLLLEEEE This is what the output looks like over here: - - - - - - - - - - - -1/Aug/97 LilyPond 0.1.0 4 - - - - - -INSTALL(1) LilyPond documentation INSTALL(1) - - GNU LilyPond 0.0.78 #4/FlowerLib 1.1.24 #0 Parsing ... [/home/hw/share/lilypond/init// <..etc..> @@ -293,6 +321,22 @@ RRRREEEEDDDDHHHHAAAATTTT LLLLIIIINNNNUUUUXXXX create the RPM as a normal user the permissions will not be set correctly, unfortunately) + + + + +3/Aug/97 LilyPond 0.1.1 5 + + + + + +INSTALL(1) LilyPond documentation INSTALL(1) + + +DDDDEEEEBBBBIIIIAAAANNNN GGGGNNNNUUUU////LLLLIIIINNNNUUUUXXXX + A Debian package is in the works + WWWWIIIINNNNDDDDOOOOZZZZEEEE Windows NT: @@ -325,6 +369,28 @@ AAAAUUUUTTTTHHHHOOOORRRRSSSS -1/Aug/97 LilyPond 0.1.0 5 + + + + + + + + + + + + + + + + + + + + + + +3/Aug/97 LilyPond 0.1.1 6 diff --git a/NEWS b/NEWS index a06bb28631..6f889e2664 100644 --- a/NEWS +++ b/NEWS @@ -1,1165 +1,23 @@ +pl 0.1.1 + - {Horizontal, Vertical}_group. A score_element may be in at most one. + - This means Horizontal_group_item and Vertical_group_spanner need special support. + - This also means a big speed increase + - configure cleanup + - bf: Choleski solve. + - doc updates: lilygut, INSTALL -august 1 +pl 0.1.1.hwn + - recode of Break/Colhpos interfaces + - Gourlay_breaking: dynamic-programming optimal solution for + casting off. Word_wrap is still optional + - some printing short cuts if no -d specced. + - band_matrices for column calcs + - more Diagonal_storage fixes + - retake: INFTY fixes ( now infinity_mom, infinity_f ) -VERSION 0.1.0 - - - bf: output tempo to track 0 too - - bf: don't forget to copy id_str_, so moved into Music +pl 78.jcn3 + - configure: ln and zip + - target doosdist -> lilypond-x.x.x.exe.zip: + executables - sources -pl 78.jcn1 - - fix for multi-staff midi: wohltemperirt.ly, standchen.ly - - doze fixes - - bf: conflily, configure (text) -***** -july 31 -pl 78 - - bf: Midi_instrument - - added enable/disable defaults to help. - - incredibly ugly NAME_MEMBERS(); bug. Immediately changed to -DECLARE_MY_RUNTIME_TYPEINFO; - - \stem -1 -> \stem \down in input - - bf: slurchar index - - configure warnings - - preliminary stuff for multiarch building - - #!/usr/bin/perl fixes (AO) - - some Makefile cleanups: now faster. -pl 77.jcn2 - - Midi_instrument -****** -july 29 -pl 77 - - some fixes for internal compiler errors -derive from Pointer_list with default dtor gives error with -O2 - - .ini -> .ly - - lyrics fix - - Performer beautification: got rid of set_track(), midi_output() - - pseudo RTTI for midi-items - - bf: Performer*::print() - - links.pod - - Voice_element -> Request_chord - - fixed flex problems: stdin input works again - - Documentation/Rules.make, make-website via make - - spacing: now add basicspace - -******* -july 28 -pl 76 - - mudela version bumped to 0.1 - - mudela-book - - doco updates, now some stuff in LaTeX - - junked book.{ly,tex} example - - progress indicator - - rhythm.ly updated - - removed mf sources from distribution due to (c) stuff - - allowal of breaks handled cleanly - - junked Subtle_reqs, junked Request_iterator. Request - iteration now by Voice_element_iterator - - Piano_bar, Piano_bar_engraver, Span_score_bar_engraver, - Span_score_bar - - Swallow_performer - - removed Staff_engravers, grouping into Line_group_engraver - - Head_column as base for Rest_column,Note_column - - Score_column derived from PCol - - regurgled Line spacing: interface and implementation - separate. Idealspacing moved into Spring_spacer - - Gourlay style linespacing - -pl 75.jcn6 - - {lyric,meter,key}-performer - - span-brace-* (Removed again. Such is life) - - doze compile - - midi output, notes only - - working midi output -- hacked - - doze compile, mingw32 configure (still triggers gcc int. comp err) - -pl 74pre.jcn2 - - mi2mu fixes after scott snyder [sss] - - mi2mu update for mudela 0.0.61 - - conflily fixes - -******* -july 21 - -pl 75 - - inbook.ly & book.tex example. - - natural width: linewidth = -1.0\cm - -pl 74pre.jcn1 - - oversimplified midi output thru performer hierarchy - - bf: Spanner::doprint - -pl 72pre.jcn1 - - naming fixes; some iter*() explicitations - - removed acceptor.hh - - *performer*: second draft of midi (audio/...) - -******* -july 9 - -pl 74pre - - Input_engraver -> Input_translator - - bf: span start/stop is now a "used" col. - - Rest_column/Rest_collisions bugfixes - - bf: crescendi. - - Spanner do_print() - -****** -july 7 -pl 73pre - - some refs doco. - - move Input_engraver into Paper_def - - junk Interpreter - - naming: Request_engraver -> Engraver, - - Music_iterator::next() -> process_and_next() - - junk Voice_engravers - - Span_bar, Span_bar_engraver - - Vertical_align_engraver - -******* -july 2 -pl 72pre - - \paper{} syntax: var = 1.0\pt;, with an Assoc array - - sketch of MIDI Performer classes. - - bf: memleak in parser - - naming: Acceptor -> Translator - - input: bf collisions.ly, scales.ly - - bf: [r8 c8] - - naming: Register -> Engraver - - force \\ on identifiers - - doco updates - - musixtex T73 fonts - -pl 70.mb - - bf: find syntax in Variables.make -***** -july 1 -pl 71pre - - nested \melodic and \lyric constructs - - init id's, Input_register aliases. - - bf: notehead x-swap - - bf: auto-keys. - - bf: first clef - - junked \init_end; construct - - Preparatory work for MIDI output: - * Acceptor as baseclass for Register_group_register - * Global_acceptor as interface of Register to Score - - bf: empty voice - - Lyrics: partially working - - some doco updates (junks, mostly) - - -****** -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] - -pl 67.jcn2 - - first attempt at rest collisions - - rests.ly - -pl 67.jcn1 - - beam stem length: beams.ly - - bf: mingw configure - - re: conflily - -****** -june 26 -pl 68pre - - doco: other-packages.pod, lots of lilyliterature.pod - - last duration mode now is default. - - some OpusTeX stuff. - - bf Y2K in convert-mudela - - Grand rewrite of Music/Register stuff: - * 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 empty_b_ and transparent_b_ flag - * Junk Staff_column, and find the requests while walking the - Voices. - * Score_register - * Staff_group, Score_request_register. - * align key/Meters/bar across staffs - * junked Staff, Staff_column, Staff_walker, Complex_walker, - Request_column Pulk_voice, Pulk_voices, Walker_registers, - Voice_element, - Input_score, Input_staff, Input_music and a lot of - parserjunk. - * mudela: lots of structure changes : now much simpler - * generation of pre/postbreak items now in Score_elem with deps. - - - bf: make_patch explanation - - bf: make install TeX stuff - - mudela: . mandatory for REALs - - -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 - - bf: clean lib/out/liblily.a - - bf: rests shorter than 1/4 - -pl 66.jcn3 - - bf: make uninstall - - conflily - - f: some pedaling - - plet hack removed :-( [ c c c ]2/3 -> [2/3 c c c ]1/1 - -pl 66.jcn2 - - bf: bar, Hilfslinie - - bf: configure for mingw32 - -pl 66.jcn1 - - WIN32 -> WINDOWS32, more win32->windows32 - - some GNU/Linux changes - - cygnus b18 / mingw update - - doze compile; bf: p-score.cc compares - - reincluded toccata fixes - - small stuff: vi tags, typos, bibl - -****** -may 27 -pl 66 - - make_website --jpeg, --png and --gif - - win32 -> windows32 - - bf: Score_elem::TeXstring assert fail - - bf: headswap with stemdown - - bf: broken tie - - bf: broken slur - - bf: accidental dims - - bf: measure bar width - - -****** -may 26 - -pl 65 - - bf pathfind /root/file - - massive Score_elem rewrite: - * group_element_i_ count - * support for removing an individual Score_elem cleanly. - * moved dep stuff into class Directed_graph_node - * Score_elems can be copied and deleted freely. - * junk PStaff - * Spanner_elem_group - * Line_of_{score,staff} now are Score_elems - * clean dep handling upon deletion - * delete unbroken spanners - * added a break_processing round. - * Super_elem - - junk Complex_staff, - - clean {lily}?proto.hh - - Element_group - - Score_elem now as virtual base class everywhere - - naming: Staff_elem -> Score_elem - - bf: make in toplevel dir - - bf: broken tie y-pos - - bf: sharing 4th, 8th and 16th noteheads - - bf: overlapping chords. <\multivoice c d > - -pl 64.wl - - new stem direction code - - bfs: wohltemperirt.ly (thanks, Werner) - - bf: stem direction - -pl 63.jcn2 - - doze compile - -pl 63.jcn1 - - bf: mi2mu mudela commands - - bf: mi2mu tracks - - mi2mu quantify tuning - - mi2mu TODO - -********* -may 16 -pl 64 - - exe's now built in out/ - - toplevel Makefile dep from make/Toplevel.make.in - - make_website: add version footer - - make_website: bf dist *.txt - - bf: fix loose bars : \meter 4/4; c1. - - Staff_elem -> Score_elem - - bf - - vbrace lookup - - resync barcheck - -******* - -may 15 -pl 63 - - bf: segfault during MIDI output with mi2mu output. - - kludge: parse error beyond eof - - don't read ini if toplevel file not found - - accumulate \kern in TeX output. - - bf: try to prevent long lines; TeX breaks on them. - - naming: Pointer->Link, IPointer->Pointer - - bf: \plet didn't work (MB) - - GMP manifesto. - -pl 61.jcn4 - - mi2mu -p -s16 fugua2.midi getting better! - plus factor 2 mi2mu speedup (fugue2.midi 5.50user) - - bf: Duration_convert quantify threshold down - - bf: (on quantify): tcols quantified; no silly voices - -pl 61.jcn3 - - lily parsing speedup: backup rules for lexer.l - - bf: mi2mu, using midi_voice list... - -pl 61.jcn2 - - all in all mi2mu speedup of about factor 8 since pl61 - (fugue.midi 82.72user to 10.30user on a 586.133) - what about lily? - - binary search on track-columns - - mi2mu IP*list to Array (implications?!) conversion - - mi2mu parsing speedup: backup rules for midi-lexer.l - - bf: zero denominator - -********** -may 14 -pl 62 - - make clean bf: remove lex & yacc files too - - added kludge in case measure too long - - added kludge in case of unconnected columns. - - kludged columns get error marker - - kludged lines get error marker - - -pl 61.jcn1 - - smarter + faster duration-convert using Array - - bf: mi2mu compilation/duration-conversions - - lots faster mi2mu, hopefully does type 1 too... -pl 60.jcn1 - - mi2mu handles non-quantified rests, try mi2mu -b wtk-i/fugue2.midi - - - -********** -pl 61 - - scales.ly bugfix: dimensions default to ((0,0), (0,0)) - - naming: PointerList->Pointer_list - - tied notes don't get accidental - - bf: crescendo size - - fixes: make_patch, - - bf: _"text" direction - - mailing list into lilypond.pod - -pl 60.mb - - set_flower_debug: Warning if -d is used when NPRINT is defined. - - Fixed several TeX details. vcenter renamed since it interfered - with LaTeX. Position of accents changed. - - New example; scripts.ly - - table_sixteen: added scriptdefinition (Lilypond breaks if a - script is defined without dimensions). - - bf: ifndef typos in p-score.cc, choleski.cc - - bf: Slur::do_post_processing(), whole notes caused SIGSEGV. - -(ascension break :-) -******* -pl 57.jcn4 - - mi2mu handles rests (quantified only) - - fixed configure buglet - - "!date" Fri May 2 02:18:12 MET DST 1997 - -pl 60 - - Request_register::get_feature(), tie direction, Slur direction - - lilypond output is now directly texable. - - make_website checks return status - -******* -may 5 -pl 59 - - Slur now into voicegroups, and take stems into account. - - bf: rest size in table. - - split Slur in baseclass Bow - - Tie, Tie_req, Tie_register - -****** -may 2 -pl 58.jcn1 - - bf: toccata-fuga-E.ly - -pl 57.jcn4 - - mi2mu handles rests (quantified only) - - fixed configure buglet - - "!date" Fri May 2 02:18:12 MET DST 1997 - -pl 58 - - lexer cleanup - - national chars in lyrics - - \stem 2; bf - - long comments: %{ %} - - *.ini mode bf - - bf: partial may be everywhere - - bf: meterchange not at start of measure - - some doc updates - - bf: stem too long if stem is down. - -pl 57.jcn3 - - dank je schat, voor wtk-i - - mi2mu tries to handle rests - - "!date" Thu May 1 02:34:04 MET DST 1997 - - maak je het niet te laat schat? - XXXX HWN - -pl 57.jcn2 - - small toccata-fuga-E.ly fixes - - \bar "||"; is now doublebar, "|." is finishbar - - collision hshift fix, with on-line assistance -****** -pl 57 - - lots of TODO doco - - text alignment bugfix - - bugfix Voice_group_regs::get_register_p() now is actually called too - - bugfix init of Text_item::pos_i_ - -pl 56.jcn1 - - toccata-fuga-in-E.ly, excerpts with real-life collisions - - \{l,r}{b,f}{toe,heel} --- using cmsy fonts... - - pedal.ly - -pl 55.jcn1 - - mi2mu man page - - make doc fixlet - - \[lr]heel \[lr]toe scripts (happy pedal studies, pa) - - lyric with width - - removal of some example files - -pl 56.mb: - - last duration fix - - makefile fixes - - space rest - - swedish note name update - -****** -pl 56 - - Massive Rest/Stem/Collision/Note_column rewrite: resolve -notehead/rest ambiguities and bugs. eg, [c8 r8 c8] - -pl 54.jcn1 - - standchen.ly: repeats; lyricii to end - - convert-mudela: help + usage - - fixed midi key/meter-change (triggered by martien.ly) bug - -****** -April 23 -pl 55 - - staff-side robustification - - script-on-rest bug - - doc update - - transpose syntax -****** -pl 54 - - bugfix Colhpos.cc::OK assert fail. - - Inclusion of MusixTeX MF files, - - detection of MF dir -pl 53.hwn - - stacked lyrics - - configure/make buglets. -****** -pl 53 - - spurious accidental bug. - - simultaneity check. - - added AUTHORS.pod - - convert-mudela auto from guess - - include -> \include - - change order of opening parse/init file - - Pulk_voice, Pulk_voices - - Request_column - - revised request-from-voice extraction. Now much faster - -****** -april 17 -pl 52 - - Buildroot RPM - - tex-prefix and tex-dir sep'd (here you are jan) - - convert-mudela framework - - Collision_register, Collision - - \hshift 1; input - - Features changed -pl 50.jcn1 - - LILYINCLUDE dir searched before DIR_DATADIR(?) - - lily reads from stdin again (but does not now when to stop) -****** -pl 51 - - transposition bugfix + doco - - LilyPond -> GNU LilyPond - - bugfixes for Staff_side and Note_column* - - wohltemperirt: complete - -****** -april 11 - -pl 50 - - merge rest / notehead. - - Staff_side as a base class for most "staff-side" symbols. - - version check - - Note_column_register, Note_column - - multiple scripts - -******** -april 8 -pl 49.jcn1 -Bugfix - - configure[.in], make/Configure_variables.make.in c++ (=doze fix) - - "configure; make" ok for doze, win32 target may be removed now - - win32/gcc 2.7.2 compile fixes -- why does this all compile - (without warnings, why can-t i even trigger warnings) under - linux/gcc-2.7.2.1? it's quite a tedious job fixing this - shit _on doze_ all the time. - * fixed #includes global-regs.cc, staff-info.cc, staff.cc - * key.hh:Key() -> Octave_key() - * added missing lily/include/input.hh: Input( Input const& ) - -pl 49 - - lsm template - - clef in cadenza mode. - - notename clear - - \command bla; for \meter, \clef, \octave etc. -******* -pl 48 - - notenames init - - Duration order -> grouping - - broken key s - - default octave - -****** -april 3 -pl 47 - - dynamic flowerlib - - Input mods: now use Source_file iso Sources - - makefile lib deps restructured - - make_website now produces in out/ - -pl 46 - - examples.pod - - LILYINCLUDE env var. - - push/popgroup - - website updated - - Swallow_register - - Lyric_register. - - Staff_sym_register - - user settable register config - - struct Input now used iso defined_ch_C_ - - Walker_registers and Staff_registers separated - - dynamic-reg -> hairpins - -pl 44.jcn2 - - doze configure/compile fixes - - doze make refixed - - faq - - install mudela manpage too - - RedHat spec lilypond.spec fixed - - target: rpm (make RedHat packages) - -****** -Mar 26 -pl 45 - - Removing unused Voice_regs & Voice_groups - - -O2 bugfix - -pl 44.jcn1 - - merged 42.3 42.jcn4 code trees (see stuff below) - - moving towards Mudela 0.1 (again) - * keyword "music" dropped for horizontal music - * keywords "\lyric" "\melodic" introduced, e.g.: - melody = \melodic { c c | g g } - * removed level of indirection: - - staff initialisable with music identifier list: - \staff{ global melody } - - \score and staffs alike - - gnu standard(?) help texts - - configure "creates" toplevel Makefile from make/Toplevel.make - -Bugfix - - fixed mi2mu - - write meter to track0 too... - - default octave - - new Sources in My_midi_lexer: sourcefile_p_ = get_file_l(): oeps. - (ain-t hungarian grand?) - -Examples - - updated for mudela 0.1 - -****** -pl 44 - - naming: _c_l -> _C - - pure parser, My_lily_parser - - ''a iso ``a - - Includable_lexer - - junk Input_file - - Duration in parser, Duration restructuring - - grandiose lexer hax. Flex should be fixed, really. - Lexer much faster now. - - opps. mi2mu broken - -****** -pl 43 - - transposition. - - $variable&@name - - warnings if incorrect mode - - missing scsii measure - - declaration used check. - - - -pl 42.jcn4 - - lily writes midi meter/key changes from requests - - mi2mu: - + write mudela 0.1 - + write bar change requests - + more tunable quantisation - -Examples - - half-new-menuetto.ly converted to mudela -almost- 0.1 - - new mi2mu of bach's wtk pre1/fugue1 - -pl 42.3 (jcn version) - - oeps, branched source tree - -pl 42.hwn3 - - const naming change (T const <-> const T) - - Mudela 0.1 (roughly the same as below..) - -pl 42.3 - - moving towards Mudela 0.1: - * all keywords must be preceded by backslash '\' - * explicit lexer switches '$' and '@' dropped - * keyword "music" dropped for horizontal music - * keywords "\lyric" " introduced, e.g.: - melody = \melodic { c c | g g } - * staff initialisable with music identifier: - \staff{ melody } - * chords: < c e > - * octavate ''c`` - * \meter{ 2/4 } - * \octave{ ''`` } - - configure sets CXX (to c++, commonly) -Internal - - renamed lexer.hh, mylexer.cc My_flex_lexer to my.lily.lexer.* - -pl 42.2 - - new lilyinput (Mudela 0.1) doc. -Examples - - new-twinkle.ly (in Mudela 0.1, hopefully) - -pl 42.1 - - further Makefile revamping. - - moved flowerlib - -******* -pl 42 - - -pl 41.hwn3 - - struct Lexer_prefs - - parser bug - - make uninstall - -pl 41.hwn2 - - make file rehack - - spec update - - make install - - detect TeX directory - -pl 41.hwn1 - - cygnus configure, - - updated versioning - - install.pod - -pl 41.jn1 -Bugfix - - doze compile -******* -pl 41 - - release - -pl 40.3 - - all of the above - - hw's configure.in - - p-name.xx fixes - -pl 40.hwn1 - - hairpin dynamics - - notename now as identifier. Parser/lexer cleanup - -pl 40.2 - - mi2mu --blonde-durations, --no-silly options. - - mi2mu starts to look promising, see examples -Examples - - pre1.midi.ly, fugue.midi.ly -Internal - - Duration handles blonde midi-durations - - More settings for Duration_convert - - lily writes meter too (ugh, howto?) -Bugfix - - mi2mu auto track number fix - - mi2mu / lily Midi_tempo fixed/added - -pl 40.1 -Bugfix - - lily midi output track 0 name - - mi2mu tempo fixed - - make out/make and out/make/Site.make in configure script! - - mi2mu double newline fix - - -****** -Mar 11 -pl 40 - - release - -pl 39-5 - - own versioning for mi2mu: 0.0.10 - - some file renaming mi2mu -pl 39-4 - - all of the above - -pl 39-hwn2 - - last bar bugfix -Internal - - simple dynamics - - experimental RPM spec. - - doco update. - -pl 39-3 - - all of the above - - m2m renamed to mi2mu - - better line breaking in mi2mu - - (somewhat broken) progress indicator for mi2mu - - mi2mu output === lily input (in names and durations, - always assuming voices > 1 though) - -Bugfix - - midi: note on/off only once per pitch per track - (sending all note-on events introduces cool mi2mu feature) - - make clean removes deps too - - mi2mu notename/accidental/octave, and key fixed - -Internal - - auto create of out-dirs, config headers, using tag file .GENERATE - -Examples - - stanchen.ly debugged - -pl 39-2 - - configure script help and in topdir again, duh. - - auto configure upon virgin make - - configured makefile stuff in make/out/ - - -******** -pl 39-1 - - doze target (for 16 bit dos xcompiler: gcc-go32) -Internal - - make/User.make; C..FLAGS sorted out -Bugfix - - make clean... - -pl 39 - - new make structure, featuring: - * top-level/sub-level build - * auto custom-library dependencies/build - * top-level/sub-level dist - * minimal(? can even smaller) specific Makefiles - * which makes for simple lib/exe module split (make/Template.make) - * integrated flowerlib - * all stuff into subbirs (make/Stuff.make) - * all headers into /include dirs (make/Include.make) - * all output into /out (executables into bin/) - * more make features, like make config, make help - * small lily lib - * lilypond-x.x.x/.version for toplevel lily version - * lilypond-x.x.x//.version for version (eg: flower) - * versioning using additional optional MY_PATCH_LEVEL - for easy make_patch - - - bin/cptogen - -Internal - - generic m2m header: m2m.hh - -Bugfix - - small fixes, make, dist, configure - -pl 38-5 - - all of the below, e.g. new filenames and new makefile - structure patches merged -****** -pl 38 - -Internal - - great filename renaming operation with - convention. - - printing methods for paper_def/lookup/symtab(s) - - untied all registers from complexwalker. Now registers are -intrinsically hierarchical. All walker communication is done via a -"top level" register. - -pl 37-3 - - m2m handles voices - - instrument, track_name, copyright/left stuff for m2m/ly - -Internal - - Midi_voice - -pl 37-1 - - text, key, tempo event in midi output/ly input - -Internal - - simple makefile structure, allows for multiple projects - -****** -pl 37 - - -Documentation - - language.pod as starting point for mudela devel. - - - Jan's patches: -Features - - m2m patchy --no-triplet option; - lilypond accepts m2m's real midi output (hand-add red tape) - - m2m output only valid durations, resync option wip - - m2m produces .ly output -Internal - - simpler and better naming for Duration* - - the great String renaming / index to base=0 change - - Track_column, Lily_stream - - Duration, Plet, Duration_convert taking load off duration calc. -Bugfix - - m2m duration calc - - - -****** -pl 36 - - Jan's patches: - - do MIDI rests cleanly. - - lily/m2m: time and tempo fixed for metric timing -Internal - - Midi_tempo - - m2m parses more midi stuff (all of bach-wtc); timing?? - - m2m recognises some commandline options -Examples - - fixed midi.ly - -******* -Feb 25 -pl 35 - - Register_group -Bugfix - - alignment of breakable items. - -******* -pl 34 - - better midi syntax. - - --midi,-M option. - - preliminary midi2mudela (/mudela2midi) converter: m2m (JCN) -Internal - - m2m sources: midi-*; (JCN) - - new Midi_walker, fixes several MIDI bugs. - - junked Midi_staff, Staff_column children, Midi_walker - - Midi_output - -pl 33-1 - - m2m parses midi -Internal - - Binary_source_file - - Source_file::error_str simplified -******* -pl33 -Examples - - Swedish notenames (MB) - -pl pre33-2 - -Bugfix - - midi pitch - -Features - - Jan's patches, see below -Bugfix - - some midi bugfixes. - -pl pre33-1 (JCN) - - - - midi output using pitches iso notename -Examples - - added midi output (some midi output files broken?) - - all melodic fixed (except for error.ly:-) - - midi.ly -Bugfix - - midiwalker line break - - empty/nonexistent include at top of ly - - midi #tracks - - midi pitch c0 - - midi poor man-s staff dynamics -Internal - - Midi_column, Midi_staff, Midi_walker - -pl pre33 (JCN) - - Jan's patches, see below - -Features - - simple plet notation (JCN) - - lyrics centred, but no fully suppored? (JCN) -Internal - - Midi_stream - - Mididef - - Midi_item, Midi_pitch, Midi_duration - - Midi_chunk, Midi_header, Midi_track - - preparations for midi output - - no exit upon context error (JCN) - - converted some "warnings" to errors; no output (JCN) -Bugfix: - - simple plet bugfix -Examples - - updated standchen, menuetto (JCN) - - new plet notation (JCN) - - plet.ly (parse and spacing tests) (JCN) - -******* -pl 32 -Features - - multiple meters, see rhythm.ly - - skip syntax/Skip_req - - score_wide_music: commands in staff now override commands in score. -Internal: - - command carnage - - Key_register - - Bar_register - - Meter_register - - meters now kept in baseclass Staff_walker - - Score_walker (to ease MIDI output) -Doc: - - Hungarian doco added to CodingStyle - -pl 32-1 - - music processing speedup - - website added to doco - - clef must *inside* music - - fixed spurious "beam too narrow" messages. -Internal: - - merge musical / non-musical staff_column - - musical/ non-musical requests - - Clef_register - - split up request.hh, Musical_req vs. Nonmusical_req -******* -pl 31 - -Examples - - Coriolan example (JN) - - standchen updated -Bugfix - - calcideal assertion bugfix -******* -Feb 12 13:55 -pl 30 - -Features - - better multivoice spacing - - move rest in multivoice staff - - errors in TeX output now warnings - - progress indicator - - music processing speedup. -Internal - - make spanner for staffsym; scrap Line_pstaff - - scrap simplestaff (Rhythmic_staff temporarily disabled) - - docxx 3.0 format comments - - split register source files - - hardcoded dimensions compile time - - Lookup::tex_hairpin -Bugfix - - non G-clef clefs - - script junking (2x) - - empty files - - beam::center (plet position!) - -pl 29 - - multiplatform Makefile (JN) - - context errors: bugfixes (JN) -******* -pl 28 - -Internal - - idealspacing slightly better for multivoice. -Doc - - Request_register -Bugfix - - Script.cc : float exception (MB) - - Request::Request(Request) copying of definition pointer (JN) - - cleaned dependencies for broken spanners - - stupid typo in Staff_elem::post_processing() - - init of hpos in PCol::PCol - - Word_wrap::solve() bug -******* -pl 27 - - preliminary WIN32 support (JN) -Features - - errors converted to warnings (JN) - - context errors (JN) - - As vs. as notename. - - WARNING: "melodic" stafftype will create the new Complex_staff! -Examples - - Lohman's Viola Quartet (JN) - - JS Bach Solo Cello suite II menuet (JN) - - -pl pre27 - -Features - - option --init - - last_duration_mode: default_duration is last duration entered - (\duration{\last}) - - syntax: grouping 2*4 3*8 - - preliminary multivoice support -Examples - - JS Bach's WTK example added. - -Internal: - - Text_reg and Script_reg -******* -pl 26 - - Documentation/lelie_logo.png - - 8-bit chars for input (see ltest.tex) (MB) - - quotes around string now optional -Bugfixes: - - unmatched ] (MB) -Internal: - - print/name methods of Staff_elem - - added Request_register - - Voice_group_registers, Voice_registers, *_register - - Complex_staff -******* - Jan 27 '97 -pl 25 - - other clefs added, keys typeset properly (MB) - -******* -pl 24: - - Lyrics (JCN) - - Commands in music-mode (an input feature) (there you are, Mats) - -******* -pl 23: - - TODO file inc'd - - cadenza mode. - - default extension, search path. - - error.pod,faq.pod - - Markers - - configure script - - inputfile name in output. -Internal changes: - - scrapped VPATH - - Make dependencies per .o - - Split Input_* parsing steps to enable marking -Bugfixes: - - unconnected columns - - -******* -pl 22: - - doco from mpp - - repeat signs - - | checks for bar in a voice (Barcheck_req) -Internal changes: - - naming (Hungarian notation, svec vs. Array) - - cleanup PScore, Score - - removed Staff_commands, plugging commands into Staff_column directly -Bugfixes: - - bug noteheadswap - - huge memleak fixed; unearthed lots of bugs - -******* -pl 21: - - scripts - - texts - - nplets (triplets!) -Internal changes: - - Move breaking stuff into a separate class Break_algorithm - - dependencies for Staff_elem's - -******* -Dec 23 -pl 20: - - updated doco to .pod - - include files from .ly -Internal changes: - - Rational for time measurement - - directionalspanner/textspanner - -******* -pl 19: - - grouping code: LilyPond can set advanced multibeams. -Internal changes: - - struct Moment - -******* - -pl 18: - - robust Staff_commands - -******* -pl 17: - - robust Input_commands - - merged Vertical_/Horizontal music - - PARTIALs with duration - - modularized lexer: multiple runs - -******* -pl 16 - - notenames configurable - -******* -pl 15 - - grouping code - - multibeams (simple) - -******* -pl 14 - - symtables from .ly - - Input_command - - Input_{score/staff} - -******* -Dec 2 -pl 13 - - Horizontal/Vertical music - - Input_commands diff --git a/ONEWS b/ONEWS new file mode 100644 index 0000000000..f936254a1f --- /dev/null +++ b/ONEWS @@ -0,0 +1,1170 @@ + +This file documents changes in version 0.0 + +august 1 + +VERSION 0.1.0 + + - bf: output tempo to track 0 too + - bf: don't forget to copy id_str_, so moved into Music + +pl 78.jcn2 + - INFTY doze fixes + +pl 78.jcn1 + - fix for multi-staff midi: wohltemperirt.ly, standchen.ly + - doze fixes + - bf: conflily, configure (text) +***** +july 31 +pl 78 + - bf: Midi_instrument + - added enable/disable defaults to help. + - incredibly ugly NAME_MEMBERS(); bug. Immediately changed to +DECLARE_MY_RUNTIME_TYPEINFO; + - \stem -1 -> \stem \down in input + - bf: slurchar index + - configure warnings + - preliminary stuff for multiarch building + - #!/usr/bin/perl fixes (AO) + - some Makefile cleanups: now faster. + +pl 77.jcn2 + - Midi_instrument + +****** +july 29 +pl 77 + - some fixes for internal compiler errors +derive from Pointer_list with default dtor gives error with -O2 + - .ini -> .ly + - lyrics fix + - Performer beautification: got rid of set_track(), midi_output() + - pseudo RTTI for midi-items + - bf: Performer*::print() + - links.pod + - Voice_element -> Request_chord + - fixed flex problems: stdin input works again + - Documentation/Rules.make, make-website via make + - spacing: now add basicspace + +******* +july 28 +pl 76 + - mudela version bumped to 0.1 + - mudela-book + - doco updates, now some stuff in LaTeX + - junked book.{ly,tex} example + - progress indicator + - rhythm.ly updated + - removed mf sources from distribution due to (c) stuff + - allowal of breaks handled cleanly + - junked Subtle_reqs, junked Request_iterator. Request + iteration now by Voice_element_iterator + - Piano_bar, Piano_bar_engraver, Span_score_bar_engraver, + Span_score_bar + - Swallow_performer + - removed Staff_engravers, grouping into Line_group_engraver + - Head_column as base for Rest_column,Note_column + - Score_column derived from PCol + - regurgled Line spacing: interface and implementation + separate. Idealspacing moved into Spring_spacer + - Gourlay style linespacing + +pl 75.jcn6 + - {lyric,meter,key}-performer + - span-brace-* (Removed again. Such is life) + - doze compile + - midi output, notes only + - working midi output -- hacked + - doze compile, mingw32 configure (still triggers gcc int. comp err) + +pl 74pre.jcn2 + - mi2mu fixes after scott snyder [sss] + - mi2mu update for mudela 0.0.61 + - conflily fixes + +******* +july 21 + +pl 75 + - inbook.ly & book.tex example. + - natural width: linewidth = -1.0\cm + +pl 74pre.jcn1 + - oversimplified midi output thru performer hierarchy + - bf: Spanner::doprint + +pl 72pre.jcn1 + - naming fixes; some iter*() explicitations + - removed acceptor.hh + - *performer*: second draft of midi (audio/...) + +******* +july 9 + +pl 74pre + - Input_engraver -> Input_translator + - bf: span start/stop is now a "used" col. + - Rest_column/Rest_collisions bugfixes + - bf: crescendi. + - Spanner do_print() + +****** +july 7 +pl 73pre + - some refs doco. + - move Input_engraver into Paper_def + - junk Interpreter + - naming: Request_engraver -> Engraver, + - Music_iterator::next() -> process_and_next() + - junk Voice_engravers + - Span_bar, Span_bar_engraver + - Vertical_align_engraver + +******* +july 2 +pl 72pre + - \paper{} syntax: var = 1.0\pt;, with an Assoc array + - sketch of MIDI Performer classes. + - bf: memleak in parser + - naming: Acceptor -> Translator + - input: bf collisions.ly, scales.ly + - bf: [r8 c8] + - naming: Register -> Engraver + - force \\ on identifiers + - doco updates + - musixtex T73 fonts + +pl 70.mb + - bf: find syntax in Variables.make +***** +july 1 +pl 71pre + - nested \melodic and \lyric constructs + - init id's, Input_register aliases. + - bf: notehead x-swap + - bf: auto-keys. + - bf: first clef + - junked \init_end; construct + - Preparatory work for MIDI output: + * Acceptor as baseclass for Register_group_register + * Global_acceptor as interface of Register to Score + - bf: empty voice + - Lyrics: partially working + - some doco updates (junks, mostly) + + +****** +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] + +pl 67.jcn2 + - first attempt at rest collisions + - rests.ly + +pl 67.jcn1 + - beam stem length: beams.ly + - bf: mingw configure + - re: conflily + +****** +june 26 +pl 68pre + - doco: other-packages.pod, lots of lilyliterature.pod + - last duration mode now is default. + - some OpusTeX stuff. + - bf Y2K in convert-mudela + - Grand rewrite of Music/Register stuff: + * 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 empty_b_ and transparent_b_ flag + * Junk Staff_column, and find the requests while walking the + Voices. + * Score_register + * Staff_group, Score_request_register. + * align key/Meters/bar across staffs + * junked Staff, Staff_column, Staff_walker, Complex_walker, + Request_column Pulk_voice, Pulk_voices, Walker_registers, + Voice_element, + Input_score, Input_staff, Input_music and a lot of + parserjunk. + * mudela: lots of structure changes : now much simpler + * generation of pre/postbreak items now in Score_elem with deps. + + - bf: make_patch explanation + - bf: make install TeX stuff + - mudela: . mandatory for REALs + + +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 + - bf: clean lib/out/liblily.a + - bf: rests shorter than 1/4 + +pl 66.jcn3 + - bf: make uninstall + - conflily + - f: some pedaling + - plet hack removed :-( [ c c c ]2/3 -> [2/3 c c c ]1/1 + +pl 66.jcn2 + - bf: bar, Hilfslinie + - bf: configure for mingw32 + +pl 66.jcn1 + - WIN32 -> WINDOWS32, more win32->windows32 + - some GNU/Linux changes + - cygnus b18 / mingw update + - doze compile; bf: p-score.cc compares + - reincluded toccata fixes + - small stuff: vi tags, typos, bibl + +****** +may 27 +pl 66 + - make_website --jpeg, --png and --gif + - win32 -> windows32 + - bf: Score_elem::TeXstring assert fail + - bf: headswap with stemdown + - bf: broken tie + - bf: broken slur + - bf: accidental dims + - bf: measure bar width + + +****** +may 26 + +pl 65 + - bf pathfind /root/file + - massive Score_elem rewrite: + * group_element_i_ count + * support for removing an individual Score_elem cleanly. + * moved dep stuff into class Directed_graph_node + * Score_elems can be copied and deleted freely. + * junk PStaff + * Spanner_elem_group + * Line_of_{score,staff} now are Score_elems + * clean dep handling upon deletion + * delete unbroken spanners + * added a break_processing round. + * Super_elem + - junk Complex_staff, + - clean {lily}?proto.hh + - Element_group + - Score_elem now as virtual base class everywhere + - naming: Staff_elem -> Score_elem + - bf: make in toplevel dir + - bf: broken tie y-pos + - bf: sharing 4th, 8th and 16th noteheads + - bf: overlapping chords. <\multivoice c d > + +pl 64.wl + - new stem direction code + - bfs: wohltemperirt.ly (thanks, Werner) + - bf: stem direction + +pl 63.jcn2 + - doze compile + +pl 63.jcn1 + - bf: mi2mu mudela commands + - bf: mi2mu tracks + - mi2mu quantify tuning + - mi2mu TODO + +********* +may 16 +pl 64 + - exe's now built in out/ + - toplevel Makefile dep from make/Toplevel.make.in + - make_website: add version footer + - make_website: bf dist *.txt + - bf: fix loose bars : \meter 4/4; c1. + - Staff_elem -> Score_elem + - bf + - vbrace lookup + - resync barcheck + +******* + +may 15 +pl 63 + - bf: segfault during MIDI output with mi2mu output. + - kludge: parse error beyond eof + - don't read ini if toplevel file not found + - accumulate \kern in TeX output. + - bf: try to prevent long lines; TeX breaks on them. + - naming: Pointer->Link, IPointer->Pointer + - bf: \plet didn't work (MB) + - GMP manifesto. + +pl 61.jcn4 + - mi2mu -p -s16 fugua2.midi getting better! + plus factor 2 mi2mu speedup (fugue2.midi 5.50user) + - bf: Duration_convert quantify threshold down + - bf: (on quantify): tcols quantified; no silly voices + +pl 61.jcn3 + - lily parsing speedup: backup rules for lexer.l + - bf: mi2mu, using midi_voice list... + +pl 61.jcn2 + - all in all mi2mu speedup of about factor 8 since pl61 + (fugue.midi 82.72user to 10.30user on a 586.133) + what about lily? + - binary search on track-columns + - mi2mu IP*list to Array (implications?!) conversion + - mi2mu parsing speedup: backup rules for midi-lexer.l + - bf: zero denominator + +********** +may 14 +pl 62 + - make clean bf: remove lex & yacc files too + - added kludge in case measure too long + - added kludge in case of unconnected columns. + - kludged columns get error marker + - kludged lines get error marker + + +pl 61.jcn1 + - smarter + faster duration-convert using Array + - bf: mi2mu compilation/duration-conversions + - lots faster mi2mu, hopefully does type 1 too... +pl 60.jcn1 + - mi2mu handles non-quantified rests, try mi2mu -b wtk-i/fugue2.midi + + + +********** +pl 61 + - scales.ly bugfix: dimensions default to ((0,0), (0,0)) + - naming: PointerList->Pointer_list + - tied notes don't get accidental + - bf: crescendo size + - fixes: make_patch, + - bf: _"text" direction + - mailing list into lilypond.pod + +pl 60.mb + - set_flower_debug: Warning if -d is used when NPRINT is defined. + - Fixed several TeX details. vcenter renamed since it interfered + with LaTeX. Position of accents changed. + - New example; scripts.ly + - table_sixteen: added scriptdefinition (Lilypond breaks if a + script is defined without dimensions). + - bf: ifndef typos in p-score.cc, choleski.cc + - bf: Slur::do_post_processing(), whole notes caused SIGSEGV. + +(ascension break :-) +******* +pl 57.jcn4 + - mi2mu handles rests (quantified only) + - fixed configure buglet + - "!date" Fri May 2 02:18:12 MET DST 1997 + +pl 60 + - Request_register::get_feature(), tie direction, Slur direction + - lilypond output is now directly texable. + - make_website checks return status + +******* +may 5 +pl 59 + - Slur now into voicegroups, and take stems into account. + - bf: rest size in table. + - split Slur in baseclass Bow + - Tie, Tie_req, Tie_register + +****** +may 2 +pl 58.jcn1 + - bf: toccata-fuga-E.ly + +pl 57.jcn4 + - mi2mu handles rests (quantified only) + - fixed configure buglet + - "!date" Fri May 2 02:18:12 MET DST 1997 + +pl 58 + - lexer cleanup + - national chars in lyrics + - \stem 2; bf + - long comments: %{ %} + - *.ini mode bf + - bf: partial may be everywhere + - bf: meterchange not at start of measure + - some doc updates + - bf: stem too long if stem is down. + +pl 57.jcn3 + - dank je schat, voor wtk-i + - mi2mu tries to handle rests + - "!date" Thu May 1 02:34:04 MET DST 1997 + - maak je het niet te laat schat? + XXXX HWN + +pl 57.jcn2 + - small toccata-fuga-E.ly fixes + - \bar "||"; is now doublebar, "|." is finishbar + - collision hshift fix, with on-line assistance +****** +pl 57 + - lots of TODO doco + - text alignment bugfix + - bugfix Voice_group_regs::get_register_p() now is actually called too + - bugfix init of Text_item::pos_i_ + +pl 56.jcn1 + - toccata-fuga-in-E.ly, excerpts with real-life collisions + - \{l,r}{b,f}{toe,heel} --- using cmsy fonts... + - pedal.ly + +pl 55.jcn1 + - mi2mu man page + - make doc fixlet + - \[lr]heel \[lr]toe scripts (happy pedal studies, pa) + - lyric with width + - removal of some example files + +pl 56.mb: + - last duration fix + - makefile fixes + - space rest + - swedish note name update + +****** +pl 56 + - Massive Rest/Stem/Collision/Note_column rewrite: resolve +notehead/rest ambiguities and bugs. eg, [c8 r8 c8] + +pl 54.jcn1 + - standchen.ly: repeats; lyricii to end + - convert-mudela: help + usage + - fixed midi key/meter-change (triggered by martien.ly) bug + +****** +April 23 +pl 55 + - staff-side robustification + - script-on-rest bug + - doc update + - transpose syntax +****** +pl 54 + - bugfix Colhpos.cc::OK assert fail. + - Inclusion of MusixTeX MF files, + - detection of MF dir +pl 53.hwn + - stacked lyrics + - configure/make buglets. +****** +pl 53 + - spurious accidental bug. + - simultaneity check. + - added AUTHORS.pod + - convert-mudela auto from guess + - include -> \include + - change order of opening parse/init file + - Pulk_voice, Pulk_voices + - Request_column + - revised request-from-voice extraction. Now much faster + +****** +april 17 +pl 52 + - Buildroot RPM + - tex-prefix and tex-dir sep'd (here you are jan) + - convert-mudela framework + - Collision_register, Collision + - \hshift 1; input + - Features changed +pl 50.jcn1 + - LILYINCLUDE dir searched before DIR_DATADIR(?) + - lily reads from stdin again (but does not now when to stop) +****** +pl 51 + - transposition bugfix + doco + - LilyPond -> GNU LilyPond + - bugfixes for Staff_side and Note_column* + - wohltemperirt: complete + +****** +april 11 + +pl 50 + - merge rest / notehead. + - Staff_side as a base class for most "staff-side" symbols. + - version check + - Note_column_register, Note_column + - multiple scripts + +******** +april 8 +pl 49.jcn1 +Bugfix + - configure[.in], make/Configure_variables.make.in c++ (=doze fix) + - "configure; make" ok for doze, win32 target may be removed now + - win32/gcc 2.7.2 compile fixes -- why does this all compile + (without warnings, why can-t i even trigger warnings) under + linux/gcc-2.7.2.1? it's quite a tedious job fixing this + shit _on doze_ all the time. + * fixed #includes global-regs.cc, staff-info.cc, staff.cc + * key.hh:Key() -> Octave_key() + * added missing lily/include/input.hh: Input( Input const& ) + +pl 49 + - lsm template + - clef in cadenza mode. + - notename clear + - \command bla; for \meter, \clef, \octave etc. +******* +pl 48 + - notenames init + - Duration order -> grouping + - broken key s + - default octave + +****** +april 3 +pl 47 + - dynamic flowerlib + - Input mods: now use Source_file iso Sources + - makefile lib deps restructured + - make_website now produces in out/ + +pl 46 + - examples.pod + - LILYINCLUDE env var. + - push/popgroup + - website updated + - Swallow_register + - Lyric_register. + - Staff_sym_register + - user settable register config + - struct Input now used iso defined_ch_C_ + - Walker_registers and Staff_registers separated + - dynamic-reg -> hairpins + +pl 44.jcn2 + - doze configure/compile fixes + - doze make refixed + - faq + - install mudela manpage too + - RedHat spec lilypond.spec fixed + - target: rpm (make RedHat packages) + +****** +Mar 26 +pl 45 + - Removing unused Voice_regs & Voice_groups + - -O2 bugfix + +pl 44.jcn1 + - merged 42.3 42.jcn4 code trees (see stuff below) + - moving towards Mudela 0.1 (again) + * keyword "music" dropped for horizontal music + * keywords "\lyric" "\melodic" introduced, e.g.: + melody = \melodic { c c | g g } + * removed level of indirection: + - staff initialisable with music identifier list: + \staff{ global melody } + - \score and staffs alike + - gnu standard(?) help texts + - configure "creates" toplevel Makefile from make/Toplevel.make + +Bugfix + - fixed mi2mu + - write meter to track0 too... + - default octave + - new Sources in My_midi_lexer: sourcefile_p_ = get_file_l(): oeps. + (ain-t hungarian grand?) + +Examples + - updated for mudela 0.1 + +****** +pl 44 + - naming: _c_l -> _C + - pure parser, My_lily_parser + - ''a iso ``a + - Includable_lexer + - junk Input_file + - Duration in parser, Duration restructuring + - grandiose lexer hax. Flex should be fixed, really. + Lexer much faster now. + - opps. mi2mu broken + +****** +pl 43 + - transposition. + - $variable&@name + - warnings if incorrect mode + - missing scsii measure + - declaration used check. + - + +pl 42.jcn4 + - lily writes midi meter/key changes from requests + - mi2mu: + + write mudela 0.1 + + write bar change requests + + more tunable quantisation + +Examples + - half-new-menuetto.ly converted to mudela -almost- 0.1 + - new mi2mu of bach's wtk pre1/fugue1 + +pl 42.3 (jcn version) + - oeps, branched source tree + +pl 42.hwn3 + - const naming change (T const <-> const T) + - Mudela 0.1 (roughly the same as below..) + +pl 42.3 + - moving towards Mudela 0.1: + * all keywords must be preceded by backslash '\' + * explicit lexer switches '$' and '@' dropped + * keyword "music" dropped for horizontal music + * keywords "\lyric" " introduced, e.g.: + melody = \melodic { c c | g g } + * staff initialisable with music identifier: + \staff{ melody } + * chords: < c e > + * octavate ''c`` + * \meter{ 2/4 } + * \octave{ ''`` } + - configure sets CXX (to c++, commonly) +Internal + - renamed lexer.hh, mylexer.cc My_flex_lexer to my.lily.lexer.* + +pl 42.2 + - new lilyinput (Mudela 0.1) doc. +Examples + - new-twinkle.ly (in Mudela 0.1, hopefully) + +pl 42.1 + - further Makefile revamping. + - moved flowerlib + +******* +pl 42 + + +pl 41.hwn3 + - struct Lexer_prefs + - parser bug + - make uninstall + +pl 41.hwn2 + - make file rehack + - spec update + - make install + - detect TeX directory + +pl 41.hwn1 + - cygnus configure, + - updated versioning + - install.pod + +pl 41.jn1 +Bugfix + - doze compile +******* +pl 41 + - release + +pl 40.3 + - all of the above + - hw's configure.in + - p-name.xx fixes + +pl 40.hwn1 + - hairpin dynamics + - notename now as identifier. Parser/lexer cleanup + +pl 40.2 + - mi2mu --blonde-durations, --no-silly options. + - mi2mu starts to look promising, see examples +Examples + - pre1.midi.ly, fugue.midi.ly +Internal + - Duration handles blonde midi-durations + - More settings for Duration_convert + - lily writes meter too (ugh, howto?) +Bugfix + - mi2mu auto track number fix + - mi2mu / lily Midi_tempo fixed/added + +pl 40.1 +Bugfix + - lily midi output track 0 name + - mi2mu tempo fixed + - make out/make and out/make/Site.make in configure script! + - mi2mu double newline fix + + +****** +Mar 11 +pl 40 + - release + +pl 39-5 + - own versioning for mi2mu: 0.0.10 + - some file renaming mi2mu +pl 39-4 + - all of the above + +pl 39-hwn2 + - last bar bugfix +Internal + - simple dynamics + - experimental RPM spec. + - doco update. + +pl 39-3 + - all of the above + - m2m renamed to mi2mu + - better line breaking in mi2mu + - (somewhat broken) progress indicator for mi2mu + - mi2mu output === lily input (in names and durations, + always assuming voices > 1 though) + +Bugfix + - midi: note on/off only once per pitch per track + (sending all note-on events introduces cool mi2mu feature) + - make clean removes deps too + - mi2mu notename/accidental/octave, and key fixed + +Internal + - auto create of out-dirs, config headers, using tag file .GENERATE + +Examples + - stanchen.ly debugged + +pl 39-2 + - configure script help and in topdir again, duh. + - auto configure upon virgin make + - configured makefile stuff in make/out/ + + +******** +pl 39-1 + - doze target (for 16 bit dos xcompiler: gcc-go32) +Internal + - make/User.make; C..FLAGS sorted out +Bugfix + - make clean... + +pl 39 + - new make structure, featuring: + * top-level/sub-level build + * auto custom-library dependencies/build + * top-level/sub-level dist + * minimal(? can even smaller) specific Makefiles + * which makes for simple lib/exe module split (make/Template.make) + * integrated flowerlib + * all stuff into subbirs (make/Stuff.make) + * all headers into /include dirs (make/Include.make) + * all output into /out (executables into bin/) + * more make features, like make config, make help + * small lily lib + * lilypond-x.x.x/.version for toplevel lily version + * lilypond-x.x.x//.version for version (eg: flower) + * versioning using additional optional MY_PATCH_LEVEL + for easy make_patch + + - bin/cptogen + +Internal + - generic m2m header: m2m.hh + +Bugfix + - small fixes, make, dist, configure + +pl 38-5 + - all of the below, e.g. new filenames and new makefile + structure patches merged +****** +pl 38 + +Internal + - great filename renaming operation with - convention. + - printing methods for paper_def/lookup/symtab(s) + - untied all registers from complexwalker. Now registers are +intrinsically hierarchical. All walker communication is done via a +"top level" register. + +pl 37-3 + - m2m handles voices + - instrument, track_name, copyright/left stuff for m2m/ly + +Internal + - Midi_voice + +pl 37-1 + - text, key, tempo event in midi output/ly input + +Internal + - simple makefile structure, allows for multiple projects + +****** +pl 37 + + +Documentation + - language.pod as starting point for mudela devel. + + - Jan's patches: +Features + - m2m patchy --no-triplet option; + lilypond accepts m2m's real midi output (hand-add red tape) + - m2m output only valid durations, resync option wip + - m2m produces .ly output +Internal + - simpler and better naming for Duration* + - the great String renaming / index to base=0 change + - Track_column, Lily_stream + - Duration, Plet, Duration_convert taking load off duration calc. +Bugfix + - m2m duration calc + + + +****** +pl 36 + - Jan's patches: + - do MIDI rests cleanly. + - lily/m2m: time and tempo fixed for metric timing +Internal + - Midi_tempo + - m2m parses more midi stuff (all of bach-wtc); timing?? + - m2m recognises some commandline options +Examples + - fixed midi.ly + +******* +Feb 25 +pl 35 + - Register_group +Bugfix + - alignment of breakable items. + +******* +pl 34 + - better midi syntax. + - --midi,-M option. + - preliminary midi2mudela (/mudela2midi) converter: m2m (JCN) +Internal + - m2m sources: midi-*; (JCN) + - new Midi_walker, fixes several MIDI bugs. + - junked Midi_staff, Staff_column children, Midi_walker + - Midi_output + +pl 33-1 + - m2m parses midi +Internal + - Binary_source_file + - Source_file::error_str simplified +******* +pl33 +Examples + - Swedish notenames (MB) + +pl pre33-2 + +Bugfix + - midi pitch + +Features + - Jan's patches, see below +Bugfix + - some midi bugfixes. + +pl pre33-1 (JCN) + + + - midi output using pitches iso notename +Examples + - added midi output (some midi output files broken?) + - all melodic fixed (except for error.ly:-) + - midi.ly +Bugfix + - midiwalker line break + - empty/nonexistent include at top of ly + - midi #tracks + - midi pitch c0 + - midi poor man-s staff dynamics +Internal + - Midi_column, Midi_staff, Midi_walker + +pl pre33 (JCN) + - Jan's patches, see below + +Features + - simple plet notation (JCN) + - lyrics centred, but no fully suppored? (JCN) +Internal + - Midi_stream + - Mididef + - Midi_item, Midi_pitch, Midi_duration + - Midi_chunk, Midi_header, Midi_track + - preparations for midi output + - no exit upon context error (JCN) + - converted some "warnings" to errors; no output (JCN) +Bugfix: + - simple plet bugfix +Examples + - updated standchen, menuetto (JCN) + - new plet notation (JCN) + - plet.ly (parse and spacing tests) (JCN) + +******* +pl 32 +Features + - multiple meters, see rhythm.ly + - skip syntax/Skip_req + - score_wide_music: commands in staff now override commands in score. +Internal: + - command carnage + - Key_register + - Bar_register + - Meter_register + - meters now kept in baseclass Staff_walker + - Score_walker (to ease MIDI output) +Doc: + - Hungarian doco added to CodingStyle + +pl 32-1 + - music processing speedup + - website added to doco + - clef must *inside* music + - fixed spurious "beam too narrow" messages. +Internal: + - merge musical / non-musical staff_column + - musical/ non-musical requests + - Clef_register + - split up request.hh, Musical_req vs. Nonmusical_req +******* +pl 31 + +Examples + - Coriolan example (JN) + - standchen updated +Bugfix + - calcideal assertion bugfix +******* +Feb 12 13:55 +pl 30 + +Features + - better multivoice spacing + - move rest in multivoice staff + - errors in TeX output now warnings + - progress indicator + - music processing speedup. +Internal + - make spanner for staffsym; scrap Line_pstaff + - scrap simplestaff (Rhythmic_staff temporarily disabled) + - docxx 3.0 format comments + - split register source files + - hardcoded dimensions compile time + - Lookup::tex_hairpin +Bugfix + - non G-clef clefs + - script junking (2x) + - empty files + - beam::center (plet position!) + +pl 29 + - multiplatform Makefile (JN) + - context errors: bugfixes (JN) +******* +pl 28 + +Internal + - idealspacing slightly better for multivoice. +Doc + - Request_register +Bugfix + - Script.cc : float exception (MB) + - Request::Request(Request) copying of definition pointer (JN) + - cleaned dependencies for broken spanners + - stupid typo in Staff_elem::post_processing() + - init of hpos in PCol::PCol + - Word_wrap::solve() bug +******* +pl 27 + - preliminary WIN32 support (JN) +Features + - errors converted to warnings (JN) + - context errors (JN) + - As vs. as notename. + - WARNING: "melodic" stafftype will create the new Complex_staff! +Examples + - Lohman's Viola Quartet (JN) + - JS Bach Solo Cello suite II menuet (JN) + + +pl pre27 + +Features + - option --init + - last_duration_mode: default_duration is last duration entered + (\duration{\last}) + - syntax: grouping 2*4 3*8 + - preliminary multivoice support +Examples + - JS Bach's WTK example added. + +Internal: + - Text_reg and Script_reg +******* +pl 26 + - Documentation/lelie_logo.png + - 8-bit chars for input (see ltest.tex) (MB) + - quotes around string now optional +Bugfixes: + - unmatched ] (MB) +Internal: + - print/name methods of Staff_elem + - added Request_register + - Voice_group_registers, Voice_registers, *_register + - Complex_staff +******* + Jan 27 '97 +pl 25 + - other clefs added, keys typeset properly (MB) + +******* +pl 24: + - Lyrics (JCN) + - Commands in music-mode (an input feature) (there you are, Mats) + +******* +pl 23: + - TODO file inc'd + - cadenza mode. + - default extension, search path. + - error.pod,faq.pod + - Markers + - configure script + - inputfile name in output. +Internal changes: + - scrapped VPATH + - Make dependencies per .o + - Split Input_* parsing steps to enable marking +Bugfixes: + - unconnected columns + + +******* +pl 22: + - doco from mpp + - repeat signs + - | checks for bar in a voice (Barcheck_req) +Internal changes: + - naming (Hungarian notation, svec vs. Array) + - cleanup PScore, Score + - removed Staff_commands, plugging commands into Staff_column directly +Bugfixes: + - bug noteheadswap + - huge memleak fixed; unearthed lots of bugs + +******* +pl 21: + - scripts + - texts + - nplets (triplets!) +Internal changes: + - Move breaking stuff into a separate class Break_algorithm + - dependencies for Staff_elem's + +******* +Dec 23 +pl 20: + - updated doco to .pod + - include files from .ly +Internal changes: + - Rational for time measurement + - directionalspanner/textspanner + +******* +pl 19: + - grouping code: LilyPond can set advanced multibeams. +Internal changes: + - struct Moment + +******* + +pl 18: + - robust Staff_commands + +******* +pl 17: + - robust Input_commands + - merged Vertical_/Horizontal music + - PARTIALs with duration + - modularized lexer: multiple runs + +******* +pl 16 + - notenames configurable + +******* +pl 15 + - grouping code + - multibeams (simple) + +******* +pl 14 + - symtables from .ly + - Input_command + - Input_{score/staff} + +******* +Dec 2 +pl 13 + - Horizontal/Vertical music + - Input_commands diff --git a/README b/README index 39909a29c3..81977e3603 100644 --- a/README +++ b/README @@ -5,15 +5,6 @@ GNU LilyPond which converts music definition files into visual or audio output: it can typeset formatted sheet music in TeX and and (mechanical) perfomances to MIDI files. -0. - -LilyPond is known to have a minor bug if you use glibc; we will look into it -Please download 0.1.1 when it's available. - -LilyPond exhibits a g++ bug on Solaris 2.5 (The stack frame gets corrupted by -a constructor) if you compile with -O2. We don't know workarounds - - 1. VERSIONING if you have downloaded a @@ -23,6 +14,7 @@ if you have downloaded a version, then this is version is *not* meant for producing nice output (but to keep your patchsets up to date). It might not even compile. + 2. REQUIREMENTS For the compilation and running of LilyPond you need some additional @@ -30,11 +22,13 @@ packages. The most unusual one of this are the mf sources to MusixTeX. Please refer to the installation instructions on how to obtain and install them. + 3. INSTALLATINON For your convenience, a formatted copy of the INSTALL instructions are in the toplevel directory, as INSTALL.text + 4. DOCUMENTATION Please refer to the directory Documentation/ for the real doco. @@ -45,6 +39,8 @@ and then do this: make doc You can also simply read the .pod sources. They are ASCII text. +.pod is the documentation format of perl (see perlpod(1)) + 5. COMMENTS diff --git a/TODO b/TODO index 78cecc175e..f617a2a566 100644 --- a/TODO +++ b/TODO @@ -6,6 +6,27 @@ 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 + * generate stuff in out/default, out/sun5-irix etc iso out/ +and out-sun5/ + + * derive dstream, texstream from ostream? + + * A typical pop-music example. + + * check libtool, automake + + * have make dist produce tarball in out/ directory. + + * write a faster Spring_spacer ( without matrices if possible ) + + * A decent scalar type + + * relate energybound to linelen unitspace fontsize etc. + + * naming of Voice_group/Voice + + * benchmark band_matrices. + * versioning stuff (cvt mudela, mudela, etc.) * get rid of gif files. @@ -23,6 +44,13 @@ grep for TODO and ugh/ugr * lyrics in chords still fuck up. * rewire acknowledge_element() logic with a process_acknowledged() + + * Global type registration. + + My_class * p = create_object( My_class ) + Type t = get_type ( *p ); + if ( t <= get_type( q )) + .. * progress when creating MIDI elts. @@ -32,16 +60,36 @@ grep for TODO and ugh/ugr * piano staff - * implement better breaking algorithm - * update 20 pt table * decent TeX page layout * a tutorial +3RD PARTY BUGS: + + * bugreport to doc++ devel: struct not in class hier; public + virtual baseclasses + + * DOC++ bugs/ newer version? + + * Rational infty(HUGE_VAL) on glibc / w32 + + * Fix profiling. gprof bugreport? + + * read from mmap directly: bugreport to flex developers-> + yy_scan_buffer in C++.. + + * (where are the) gcc compile warnings on linux + + PROJECTS + * input converters + - NIFF? + - ABC? + - SMDL? + * add to MIDI output: - tempo change - repeat @@ -134,16 +182,10 @@ PARSER BUGS - * fix mysterious Flex malloc bug - * should adjust stemlength for flag number. * lilypond - -> crash - * standchen triool beam up/down - - * (where are the) gcc compile warnings on linux - SEVERELY LACKING: * SPEED! @@ -214,11 +256,6 @@ SMALLISH PROJECTS * shared lib on Solaris too. - * bugreport to doc++ devel: struct not in class hier; public - virtual baseclasses - - * get rid of init_end; - * cleanup lily-proto.hh and proto.hh * half-sharps, half-flats @@ -250,9 +287,6 @@ SMALLISH PROJECTS * parshape - * read from mmap directly: bugreport to flex developers-> - yy_scan_buffer in C++.. - * binsearch/hash for identifiers * stafftypes: voice names/ instrument names. @@ -303,8 +337,6 @@ FUTURE * guitar chord - * better beamslope calculation: QLP for beams? - * Text_crescendo * clean solution for staffsize in items. diff --git a/VERSION b/VERSION index e014f462b8..4f48ae745f 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,6 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 1 -TOPLEVEL_PATCH_LEVEL = 0 +TOPLEVEL_PATCH_LEVEL = 1 # use to send patches, always empty for released version: -# include separator: ".postfix", don't use -, -# it makes rpm barf TOPLEVEL_MY_PATCH_LEVEL = diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000000..5f629705bf --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,85 @@ + +AC_DEFUN(AC_JUNK_ARGS, [ +]) + +AC_DEFUN(AC_LILY_WARN, [ + AC_MSG_WARN($1) + warn_b=yes +]) + +dnl should cache result. +dnl should look in $prefix first. + +AC_DEFUN(AC_TEX_PREFIX, [ + + + AC_MSG_CHECKING(TeX/MF root dir directory) + + find_root_prefix="$prefix" + + + test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix" + find_texpostfix=""; + for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do + find_texprefix="$find_root_prefix$postfix" + if test -d $find_texprefix; then + find_texpostfix=$postfix + break; + fi + done + + if test "x$find_texpostfix" = x; then + find_texpostfix='/lib/texmf/tex' + AC_LILY_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix) + fi + + find_texprefix="$find_root_prefix/$find_texpostfix" + + # only assign if variablename not empty + if test x != "x$1"; then + $1='${prefix}'/"$find_texpostfix" + fi + AC_MSG_RESULT($find_texprefix) + +]) + + +# find a directory inside a prefix, +# $1 the prefix (expanded version) +# $2 variable to assign +# $3 the directory name +# $4 description +AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [ + + AC_MSG_CHECKING($4 directory) + find_dirdir=`(cd $1; + $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')` + + + if test "x$find_dirdir" = x; then + find_dirdir="/$3"; + AC_LILY_WARN(Cannot determine $4 subdirectory. Please set from command-line) + true + fi + $2=$find_dirdir + AC_MSG_RESULT($1/$find_dirdir) +]) + +AC_DEFUN(AC_TEX_SUBDIR, [ +dnl AC_REQUIRE([AC_TEX_PREFIX]) + AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input) + $1="$TEXPREFIX/$$1" +]) + +AC_DEFUN(AC_MF_SUBDIR, [ +dnl AC_REQUIRE([AC_TEX_PREFIX]) + AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input) + $1="$TEXPREFIX/$$1" +]) + +AC_DEFUN(AC_CHECK_SEARCH_RESULT, [ + if test $1 = "error" + then + AC_LILY_WARN(can't find $2. $3) + fi +]) diff --git a/bin/Makefile b/bin/Makefile index 5f98246cec..bfee282e45 100644 --- a/bin/Makefile +++ b/bin/Makefile @@ -4,7 +4,7 @@ depth = .. include $(depth)/make/Include.make # list of distribution files: -SCRIPTS = clearlily cpgento make_patch lily.efence \ +SCRIPTS = clearlily cpgento make-patch lily.efence \ make-version release conflily PERL_SCRIPTS_IN = $(wildcard *.in) PERL_SCRIPTS = $(addprefix $(outdir)/, $(PERL_SCRIPTS_IN:.in=)) diff --git a/bin/make_patch b/bin/make-patch similarity index 100% rename from bin/make_patch rename to bin/make-patch diff --git a/bin/mudela-book.in b/bin/mudela-book.in index 2481b37f16..11f27a40aa 100644 --- a/bin/mudela-book.in +++ b/bin/mudela-book.in @@ -1,8 +1,8 @@ -#!@PERL@ -w +#!@PERL@ -w +# -*-Perl-*- my $mudcount = 0; my $mudela_b = 0; -my $outdir = ""; -my $outname = ""; +my $outname = "-"; use Getopt::Long; sub gen_mufile @@ -19,7 +19,7 @@ sub close_mudela { $mudela_b = 0; if ($fragment_b) { - print MUDELA "}\n \\paper { linewidth = -1.0\\cm; } }\n"; + print MUDELA "}\n \\paper { linewidth = -1.0\\cm; castingalgorithm = \\Wordwrap; } }\n"; $fragment_b =0; } if ( $verbatim_b) { @@ -80,14 +80,42 @@ sub parse_mudela_opts $fragment_b = 1 if ($s =~ /fragment/ ); } +sub help +{ + print "usage: convert-mudela [options] [file] +options: +--help +--outdir=DIRECTORY write all files in directory DIRECTORY +--outname=NAME use NAME as base for the output +"; + exit; +} + sub main { - GetOptions( 'outdir=s', 'outname=s'); - $outdir = $opt_outdir; - $outname = $opt_outname if (defined ($opt_outname) && $opt_outname); - open INFILE, $ARGV[0]; + GetOptions( 'outdir=s', 'outname=s', 'help'); + help if ( $opt_help ) ; + + if (defined ($opt_outdir)) { + $outdir = $opt_outdir . "/"; + } else { + $outdir = ""; + } + + if (defined ($ARGV[0])) { + $infile = $ARGV[0] ; + } else { + $infile = "-"; + } + if (defined ($opt_outname)) { + $outname = $opt_outname ; + } else { + die "Need to have an output name, use --outname" if ( $infile == "-"); + $outname = "$infile.tex"; + } - open BOOK, ">$outdir/$outname"; + open INFILE, "<$infile"; + open BOOK, ">$outdir$outname"; while () { if ($mudela_b) { if (end_b "mudela") { @@ -117,4 +145,5 @@ sub main close BOOK; } + main; diff --git a/bin/release b/bin/release index d95553a8b6..7521b49f11 100755 --- a/bin/release +++ b/bin/release @@ -50,7 +50,7 @@ patch=patch-$LILYVER.gz mv $tarball $releasedir/ cd ../test -$heredir/bin/make_patch $LASTVER $NEWVER lilypond +$heredir/bin/make-patch $LASTVER $NEWVER lilypond gzip -f9 patch-$NEWVER mv $patch $patchdir// diff --git a/bin/show-latest.in b/bin/show-latest.in index e87a6ad630..a75250b54f 100644 --- a/bin/show-latest.in +++ b/bin/show-latest.in @@ -1,28 +1,30 @@ #!@PERL@ +# -*-Perl-*- -$reldir="~/musix/releases"; +$reldir="/home/hw/musix/releases"; use FileHandle; +use Getopt::Long; -sub 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]); - } - return $a cmp $b; + my(@a)= split( /\./, $a); + my(@b)= split( /\./, $b); + + for $i (0,1,2) { + return $a[$i] <=> $b[$i] if ($a[$i] != $b[$i]); + } + return $a cmp $b; } my @versions; open LS, "ls -1 $reldir|"; +GetOptions( 'print', 'news', 'latest'); + while () { - $_ =~ /lilypond-([^.]+\.[^.]+\.[^.]+).tar.gz/; push @versions, $1; } @@ -32,12 +34,20 @@ while () { my $last= (pop @versions); -system "rm $reldir/zZ*"; -system "> $reldir/zZ_LATEST_IS_$last"; +if ( $opt_print ) { + print $last; +} + +if ( $opt_latest) { + system "rm $reldir/zZ*"; + system "> $reldir/zZ_LATEST_IS_$last"; +} +if ( $opt_news ) { + open NEWS, "tar --to-stdout -zxf $reldir/lilypond-$last.tar.gz lilypond-$last/NEWS |"; + input_record_separator NEWS "****"; + $desc = ; + chop ($desc); + close NEWS; -open NEWS, "tar --to-stdout -zxf $reldir/lilypond-$last.tar.gz lilypond-$last/NEWS |"; -input_record_separator NEWS "****"; -$desc = ; -chop ($desc); -close NEWS; print $desc; +} diff --git a/configure b/configure index d2c4808da7..ab1ca42f27 100755 --- a/configure +++ b/configure @@ -14,9 +14,9 @@ ac_default_prefix=/usr/local ac_help="$ac_help enable-printing turn on debug printing" ac_help="$ac_help - enable-checking set runtime checks (assert calls). Default: on" + enable-checking set runtime checks (assert calls). Default: on" ac_help="$ac_help - enable-debugging set debug info. Default: on" + enable-debugging set debug info. Default: on" ac_help="$ac_help enable-optimise use maximal speed optimisations. Default: off" ac_help="$ac_help @@ -28,7 +28,7 @@ ac_help="$ac_help ac_help="$ac_help tex-dir=DIR set the directory to put LilyPond TeX files in. " ac_help="$ac_help - mf-dir=DIR set the directory to put LilyPond MetaFont files in." + out-dir set the directory for machine generated files. Default out or out-HOST" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -538,22 +538,27 @@ fi +if test x$srcdir != x.; then + echo Please look in the INSTALL instructions for + echo directions for multi-architecture building + + { echo "configure: error: This package does not support --srcdir." 1>&2; exit 1; } +fi + # if given here, these vars are initted at the checking point. if test x$host = xNONE; then - buildprefix=. + OUTDIR_NAME=${OUTDIR_NAME-"out"} else - buildprefix="$host-build-dir" - mkdir $buildprefix; - for a in `find -type d -and -not -name '*-build-dir'`; do - mkdir $buildprefix/$a; - done + OUTDIR_NAME=${OUTDIR_NAME-"out-$host"} fi + printing_b=no checking_b=yes debug_b=yes optimise_b=no profile_b=no warn_b=no + ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' @@ -625,12 +630,14 @@ else fi -# Check whether --enable-mf-dir or --disable-mf-dir was given. -if test "${enable_mf_dir+set}" = set; then - enableval="$enable_mf_dir" - MFDIR=$enableval -else - MFDIR=auto + + + +# Check whether --enable-out-dir or --disable-out-dir was given. +if test "${enable_out_dir+set}" = set; then + enableval="$enable_out_dir" + OUTDIR_NAME=$enableval + fi @@ -660,6 +667,14 @@ if test $optimise_b = yes; then DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED" fi +if test "x$OSTYPE" = "xWindows_NT"; then + LN=cp # hard link does not work under cygnus-nt (yet?) + ZIP="zip -r -9" # +else + LN=ln + ZIP="zip -r -9" +fi + AUTOHEADER="This file was automatically generated by configure" CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk @@ -669,7 +684,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:673: checking for $ac_word" >&5 +echo "configure:688: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -700,7 +715,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:704: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:719: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -710,11 +725,11 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -734,12 +749,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:738: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:753: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:743: checking whether we are using GNU C++" >&5 +echo "configure:758: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -748,7 +763,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -763,7 +778,7 @@ if test $ac_cv_prog_gxx = yes; then ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:767: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:782: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -793,7 +808,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:797: checking for $ac_word" >&5 +echo "configure:812: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -849,7 +864,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:853: checking for a BSD compatible install" >&5 +echo "configure:868: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -903,7 +918,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:907: checking for $ac_word" >&5 +echo "configure:922: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -937,7 +952,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:941: checking for $ac_word" >&5 +echo "configure:956: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -973,7 +988,11 @@ if test FIND = error; then warn_b=yes fi - + + + + + @@ -995,7 +1014,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:999: checking for $ac_word" >&5 +echo "configure:1018: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1029,7 +1048,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1033: checking for $ac_word" >&5 +echo "configure:1052: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1063,7 +1082,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1067: checking for $ac_word" >&5 +echo "configure:1086: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1095,7 +1114,7 @@ test -n "$MAKE" || MAKE="error" # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1099: checking for $ac_word" >&5 +echo "configure:1118: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1129,7 +1148,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1133: checking for $ac_word" >&5 +echo "configure:1152: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_PODMAN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1165,7 +1184,7 @@ if test "x$TEXPREFIX" = xauto ; then echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6 -echo "configure:1169: checking TeX/MF root dir directory" >&5 +echo "configure:1188: checking TeX/MF root dir directory" >&5 find_root_prefix="$prefix" @@ -1206,7 +1225,7 @@ if test "x$TEXDIR" = xauto ; then echo $ac_n "checking TeX input directory""... $ac_c" 1>&6 -echo "configure:1210: checking TeX input directory" >&5 +echo "configure:1229: checking TeX input directory" >&5 find_dirdir=`(cd $find_texprefix; $FIND ./ -type d -a -name tex -print |sort|head -1|sed 's#^\./##')` @@ -1227,59 +1246,73 @@ echo "configure:1210: checking TeX input directory" >&5 fi -if test $MAKE = "error" -then - { echo "configure: error: Please install GNU make" 1>&2; exit 1; } -else - $MAKE -v| grep GNU > /dev/null - if test "$?" = 1 + + + if test $MAKE = "error" then - - echo "configure: warning: Please install *GNU* make" 1>&2 + + echo "configure: warning: can't find GNU make. You should install GNU make" 1>&2 warn_b=yes - - fi -fi - -if test $BISON = "error" -then - - echo "configure: warning: can't find bison. Please install Bison (1.25 or better)" 1>&2 + + fi + + + if test $BISON = "error" + then + + echo "configure: warning: can't find bison. Please install Bison" 1>&2 warn_b=yes -else - bison_version=`$BISON --version| sed 's/^.*version 1.//g' ` - if test $bison_version -lt 25; then - - echo "configure: warning: Your bison is too old (1.$bison_version). Please install 1.25" 1>&2 + fi + + + if test $PERL = "error" + then + + echo "configure: warning: can't find perl. You should install Perl" 1>&2 warn_b=yes - fi -fi + fi -if test $PERL = "error" -then - - echo "configure: warning: can't find perl. You should install Perl (version 5 or better)" 1>&2 + + if test $PODMAN = "error" + then + + echo "configure: warning: can't find pod. You should install Perl" 1>&2 warn_b=yes - PERL=/usr/bin/perl -fi + fi -if test $PODMAN = "error" -then - - echo "configure: warning: can't find pod. You should install Perl (version 5 or better)" 1>&2 + + if test $FLEX = "error" + then + + echo "configure: warning: can't find flex. Please install Flex" 1>&2 warn_b=yes -fi + fi -if test $FLEX = "error" -then + + +if test $MAKE != "error" ; then + $MAKE -v| grep GNU > /dev/null + if test "$?" = 1 + then + + echo "configure: warning: Please install *GNU* make" 1>&2 + warn_b=yes + + fi +fi + +if test $BISON != "error"; then + bison_version=`$BISON --version| sed 's/^.*version 1.//g' ` + if test $bison_version -lt 25; then - echo "configure: warning: can't find flex. Please install Flex (2.5 or better)" 1>&2 + echo "configure: warning: Your bison is too old (1.$bison_version). Please install 1.25" 1>&2 warn_b=yes + fi fi if $CXX --version | grep '2\.7' > /dev/null @@ -1293,7 +1326,7 @@ else fi echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 -echo "configure:1297: checking how to run the C++ preprocessor" >&5 +echo "configure:1330: checking how to run the C++ preprocessor" >&5 if test -z "$CXXCPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1306,12 +1339,12 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L cross_compiling=$ac_cv_prog_cxx_cross CXXCPP="${CXX-g++} -E" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1331,17 +1364,17 @@ echo "$ac_t""$CXXCPP" 1>&6 ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6 -echo "configure:1335: checking for FlexLexer.h" >&5 +echo "configure:1368: checking for FlexLexer.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1367,8 +1400,18 @@ else fi +for a in `find -type d -and -not -name 'out*'`; do + if test ! -d $a/$OUTDIR_NAME; then + mkdir $a/$OUTDIR_NAME + fi +done + subdirs="flower" + +# ugh +eval "DIR_DATADIR=$datadir/lilypond" + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -1482,7 +1525,9 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "$buildprefix/make/out/Configure_variables.make:make/Configure_variables.make.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "make/$OUTDIR_NAME/Configure_variables.make:make/Configure_variables.make.in + lib/$OUTDIR_NAME/config.hh:lib/config.hh.in + Makefile:make/Toplevel.make.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -1744,49 +1795,20 @@ if test "$no_recursion" != yes; then fi - - -eval "DIR_DATADIR=$datadir" -DIR_DATADIR="$DIR_DATADIR/lilypond" -echo $ac_n "checking ""... $ac_c" 1>&6 -echo "configure:1753: checking " >&5 - -cat << EOF > $buildprefix/lib/out/config.hh - -/* automatically generated by configure */ -/* include this file only once! */ - -#define DIR_DATADIR "$DIR_DATADIR" - -EOF - -CXX="$ac_cv_prog_CXX" bin/make-version >> $buildprefix/lib/out/config.hh - -touch $buildprefix/make/out/Site.make - -# ugr -(cd mi2mu; CXX="$ac_cv_prog_CXX" ../bin/make-version > ../$buildprefix/mi2mu/out/version.hh - -) -(cd lily; CXX="$ac_cv_prog_CXX" ../bin/make-version > ../$buildprefix/lily/out/version.hh -) - -echo '# WARNING : Automatically generated from make/Toplevel.make.in' \ - | cat - make/Toplevel.make.in > Makefile - +touch make/$OUTDIR_NAME/Site.make cat << END For making everything, do: make # GNU make -or if you used --host=SunUltraWitteReus +or if you used --outdir=blabla - make buildprefix=SunUltraWitteReus-build-dir + make OUTDIR_NAME=blabla If you want to make site-wide extensions to the makefiles, please use - make/out/Site.make + make/$OUTDIR_NAME/Site.make END diff --git a/configure.in b/configure.in index 4df3d11ff7..ffe79f3e4a 100644 --- a/configure.in +++ b/configure.in @@ -1,99 +1,30 @@ dnl -*-shell-script-*- dnl Process this file with autoconf to produce a configure script. -dnl should cache result. -dnl should look in $prefix first. - -AC_DEFUN(AC_LILY_WARN, [ - AC_MSG_WARN($1) - warn_b=yes -]) -AC_DEFUN(AC_TEX_PREFIX, [ - - - AC_MSG_CHECKING(TeX/MF root dir directory) - - find_root_prefix="$prefix" - - - test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix" - find_texpostfix=""; - for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do - find_texprefix="$find_root_prefix$postfix" - if test -d $find_texprefix; then - find_texpostfix=$postfix - break; - fi - done - - if test "x$find_texpostfix" = x; then - find_texpostfix='/lib/texmf/tex' - AC_LILY_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix) - fi - - find_texprefix="$find_root_prefix/$find_texpostfix" - - # only assign if variablename not empty - if test x != "x$1"; then - $1='${prefix}'/"$find_texpostfix" - fi - AC_MSG_RESULT($find_texprefix) +AC_INIT(flower/choleski.cc) -]) - -# find a directory inside a prefix, -# $1 the prefix (expanded version) -# $2 variable to assign -# $3 the directory name -# $4 description -AC_DEFUN(AC_FIND_DIR_IN_PREFIX, [ - - AC_MSG_CHECKING($4 directory) - find_dirdir=`(cd $1; - $FIND ./ -type d -a -name $3 -print |sort|head -1|sed 's#^\./##')` +if test x$srcdir != x.; then + echo Please look in the INSTALL instructions for + echo directions for multi-architecture building - - if test "x$find_dirdir" = x; then - find_dirdir="/$3"; - AC_LILY_WARN(Cannot determine $4 subdirectory. Please set from command-line) - true - fi - $2=$find_dirdir - AC_MSG_RESULT($1/$find_dirdir) -]) - -AC_DEFUN(AC_TEX_SUBDIR, [ -dnl AC_REQUIRE([AC_TEX_PREFIX]) - AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, tex,TeX input) - $1="$TEXPREFIX/$$1" -]) - -AC_DEFUN(AC_MF_SUBDIR, [ -dnl AC_REQUIRE([AC_TEX_PREFIX]) - AC_FIND_DIR_IN_PREFIX($find_texprefix, $1, source, MF input) - $1="$TEXPREFIX/$$1" -]) - -AC_INIT(flower/choleski.cc) - + AC_MSG_ERROR(This package does not support --srcdir.) +fi # if given here, these vars are initted at the checking point. if test x$host = xNONE; then - buildprefix=. + OUTDIR_NAME=${OUTDIR_NAME-"out"} else - buildprefix="$host-build-dir" - mkdir $buildprefix; - for a in `find -type d -and -not -name '*-build-dir'`; do - mkdir $buildprefix/$a; - done + OUTDIR_NAME=${OUTDIR_NAME-"out-$host"} fi + printing_b=no checking_b=yes debug_b=yes optimise_b=no profile_b=no warn_b=no + AC_LANG_CPLUSPLUS AC_ARG_ENABLE(printing, @@ -102,11 +33,11 @@ AC_ARG_ENABLE(printing, AC_ARG_ENABLE(checking, - [ enable-checking set runtime checks (assert calls). Default: on], + [ enable-checking set runtime checks (assert calls). Default: on], [checking_b=$enableval] ) AC_ARG_ENABLE(debugging, - [ enable-debugging set debug info. Default: on], + [ enable-debugging set debug info. Default: on], [debug_b=$enableval]) AC_ARG_ENABLE(optimise, @@ -132,10 +63,15 @@ AC_ARG_ENABLE(tex-dir, [TEXDIR=$enableval], [TEXDIR=auto] ) -AC_ARG_ENABLE(mf-dir, - [ mf-dir=DIR set the directory to put LilyPond MetaFont files in.], - [MFDIR=$enableval], - [MFDIR=auto] ) +AC_JUNK_ARGS( AC_ARG_ENABLE(mf-dir, + [ mf-dir=DIR set the directory to put LilyPond MetaFont files in. (obsolete)], + [MFDIR=$enableval], + [MFDIR=auto] )) + +AC_ARG_ENABLE(out-dir, + [ out-dir set the directory for machine generated files. Default out or out-HOST], + [OUTDIR_NAME=$enableval] + []) if test $profile_b = yes; then EXTRA_LIBES="-pg" @@ -163,6 +99,14 @@ if test $optimise_b = yes; then DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED" fi +if test "x$OSTYPE" = "xWindows_NT"; then + LN=cp # hard link does not work under cygnus-nt (yet?) + ZIP="zip -r -9" # +else + LN=ln + ZIP="zip -r -9" +fi + dnl COMPILEINFO="$HOST $host $TARGET $target" AUTOHEADER="This file was automatically generated by configure" CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk @@ -178,7 +122,8 @@ dnl should check out -print if test FIND = error; then AC_LILY_WARN(Couldn't find \`find'. Please use --enable-tex-dir) fi - + +AC_SUBST(OUTDIR_NAME) AC_SUBST(CXXFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(CXX) @@ -189,10 +134,13 @@ AC_SUBST(COMPILEINFO) AC_SUBST(AUTOHEADER) AC_SUBST(BISON) AC_SUBST(FLEX) +AC_SUBST(LN) AC_SUBST(PERL) +AC_SUBST(ZIP) AC_SUBST(TEXPREFIX) AC_SUBST(TEXDIR) AC_SUBST(MFDIR) +AC_SUBST(DIR_DATADIR) AC_SUBST(EXTRA_LIBES) AC_CHECK_PROGS(BISON, bison, error) @@ -216,43 +164,29 @@ dnl if test "x$MFDIR" = xauto; then dnl AC_MF_SUBDIR(MFDIR) dnl fi -if test $MAKE = "error" -then - AC_MSG_ERROR(Please install GNU make) -else - $MAKE -v| grep GNU > /dev/null - if test "$?" = 1 - then + +AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make) +AC_CHECK_SEARCH_RESULT( $BISON, bison, Please install Bison, 1.25 or better) +AC_CHECK_SEARCH_RESULT($PERL, perl, You should install Perl, version 5 or better) +AC_CHECK_SEARCH_RESULT($PODMAN, pod, You should install Perl, version 5 or better) +AC_CHECK_SEARCH_RESULT( $FLEX, flex, Please install Flex, 2.5 or better) + + +if test $MAKE != "error" ; then + $MAKE -v| grep GNU > /dev/null + if test "$?" = 1 + then AC_LILY_WARN(Please install *GNU* make) fi fi -if test $BISON = "error" -then - AC_LILY_WARN(can't find bison. Please install Bison (1.25 or better)) -else +if test $BISON != "error"; then bison_version=`$BISON --version| sed 's/^.*version 1.//g' ` if test $bison_version -lt 25; then AC_LILY_WARN(Your bison is too old (1.$bison_version). Please install 1.25) fi fi -if test $PERL = "error" -then - AC_LILY_WARN(can't find perl. You should install Perl (version 5 or better)) - PERL=/usr/bin/perl -fi - -if test $PODMAN = "error" -then - AC_LILY_WARN(can't find pod. You should install Perl (version 5 or better)) -fi - -if test $FLEX = "error" -then - AC_LILY_WARN(can't find flex. Please install Flex (2.5 or better)) -fi - if $CXX --version | grep '2\.7' > /dev/null then true @@ -263,52 +197,35 @@ fi AC_CHECK_HEADER(FlexLexer.h, true, AC_LILY_WARN(can't find flex header. Please install Flex headers correctly)) -AC_CONFIG_SUBDIRS(flower) -AC_OUTPUT($buildprefix/make/out/Configure_variables.make:make/Configure_variables.make.in) - - - -dnl URG!!!!!! -eval "DIR_DATADIR=$datadir" -DIR_DATADIR="$DIR_DATADIR/lilypond" -AC_MSG_CHECKING - -cat << EOF > $buildprefix/lib/out/config.hh - -/* automatically generated by configure */ -/* include this file only once! */ - -#define DIR_DATADIR "$DIR_DATADIR" - -EOF - -CXX="$ac_cv_prog_CXX" bin/make-version >> $buildprefix/lib/out/config.hh - -touch $buildprefix/make/out/Site.make - -# ugr -(cd mi2mu; CXX="$ac_cv_prog_CXX" ../bin/make-version > ../$buildprefix/mi2mu/out/version.hh +for a in `find -type d -and -not -name 'out*'`; do + if test ! -d $a/$OUTDIR_NAME; then + mkdir $a/$OUTDIR_NAME + fi +done -) -(cd lily; CXX="$ac_cv_prog_CXX" ../bin/make-version > ../$buildprefix/lily/out/version.hh -) +AC_CONFIG_SUBDIRS(flower) -echo '# WARNING : Automatically generated from make/Toplevel.make.in' \ - | cat - make/Toplevel.make.in > Makefile +# ugh +eval "DIR_DATADIR=$datadir/lilypond" + +AC_OUTPUT(make/$OUTDIR_NAME/Configure_variables.make:make/Configure_variables.make.in + lib/$OUTDIR_NAME/config.hh:lib/config.hh.in + Makefile:make/Toplevel.make.in) +touch make/$OUTDIR_NAME/Site.make cat << END For making everything, do: make # GNU make -or if you used --host=SunUltraWitteReus +or if you used --outdir=blabla - make buildprefix=SunUltraWitteReus-build-dir + make OUTDIR_NAME=blabla If you want to make site-wide extensions to the makefiles, please use - make/out/Site.make + make/$OUTDIR_NAME/Site.make END diff --git a/flower/Makefile b/flower/Makefile index 30b2a6f8f4..1089809e21 100644 --- a/flower/Makefile +++ b/flower/Makefile @@ -39,7 +39,7 @@ SUBDIRS = include test # list of distribution files: # SCRIPTS = -README_FILES = NEWS README TODO +README_FILES = ONEWS NEWS README TODO EXTRA_DISTFILES= configure config.hh.in configure.in VERSION $(README_FILES) $(SCRIPTS) Flower-flags.make.in # @@ -74,3 +74,6 @@ endif localuninstall: rm -f $(libdir)/libflower.{so,a} + + +$(outdir)/flower-version.o: $(outdir)/version.hh diff --git a/flower/NEWS b/flower/NEWS index a93f485302..57ad102788 100644 --- a/flower/NEWS +++ b/flower/NEWS @@ -1,4 +1,9 @@ -version 1.1: + + +pl 25 + - unordered_substitute and unordered_del + - Full_storage inline functions + - more Diagonal_storage fixes pl 24 - Diagonal_storage for band matrices. @@ -9,6 +14,7 @@ pl 24 pl 23: - virtual-methods : static_is_type_b - Choleski checks off if not PARANOID + pl 22: - ACursor and PACursor to give array a List like interface. @@ -18,6 +24,7 @@ pl 20.mb pl 20 - List::junk_links() + pl 19 - Array::reverse() @@ -29,6 +36,7 @@ pl 18 pl 17 - naming: Pointer->Link, IPointer->Pointer + pl 16 - Array::get() - P< > doco. @@ -39,6 +47,7 @@ pl 15 pl 14 - interval methods + pl 13 - better test-bed - Heap PQueue implementation @@ -115,36 +124,3 @@ pl 1 0: ------------------- -1.0: - -pl 27-3 - - debug memmove code - - StringData bugfix - - old String::String( char, int ) bugfix - -pl 27-1,2 (not released) - patches by JCN - - stringutils.cc included again - - bin2hex_str bugfix - - String class handles null bytes - - StringUtils inlined/outlined by #define - - StringConversion (only hex for now) - -pl 27 - - (temporarily?) removed findcursor* t*mat* - -pl 26 - - docxx 3.0 - -pl 25 - - merge sstack and Array - -pl 24 - - small fix in vector print - -pl 23 - - win32 patches (JN) - -pl 22 - - Array::add -> Array::push diff --git a/flower/ONEWS b/flower/ONEWS new file mode 100644 index 0000000000..9f4df5bb07 --- /dev/null +++ b/flower/ONEWS @@ -0,0 +1,34 @@ +history of flower lib 0.0 + +version 1.1 release + +pl 27-3 + - debug memmove code + - StringData bugfix + - old String::String( char, int ) bugfix + +pl 27-1,2 (not released) + patches by JCN + - stringutils.cc included again + - bin2hex_str bugfix + - String class handles null bytes + - StringUtils inlined/outlined by #define + - StringConversion (only hex for now) + +pl 27 + - (temporarily?) removed findcursor* t*mat* + +pl 26 + - docxx 3.0 + +pl 25 + - merge sstack and Array + +pl 24 + - small fix in vector print + +pl 23 + - win32 patches (JN) + +pl 22 + - Array::add -> Array::push diff --git a/flower/TODO b/flower/TODO index 169a0525e6..b71ad836c0 100644 --- a/flower/TODO +++ b/flower/TODO @@ -1,5 +1,8 @@ * write a String_hash template + + * Array::slice() upper too + * write a Pointer_hash template * fix/junk ambiguous String constructor overloads, e.g.: diff --git a/flower/VERSION b/flower/VERSION index fafe5106a4..d05f7ff918 100644 --- a/flower/VERSION +++ b/flower/VERSION @@ -1,6 +1,6 @@ MAJOR_VERSION = 1 MINOR_VERSION = 1 -PATCH_LEVEL = 24 +PATCH_LEVEL = 25 # use to send patches, always empty for released version: MY_PATCH_LEVEL = # include separator: "-1" or ".a" # diff --git a/flower/choleski.cc b/flower/choleski.cc index d619b97460..086759193f 100644 --- a/flower/choleski.cc +++ b/flower/choleski.cc @@ -12,13 +12,15 @@ const Real EPS = 1e-7; // so sue me. Hard coded // for testing new Matrix_storage. //#define PARANOID -Vector -Choleski_decomposition::solve(Vector rhs)const +void +Choleski_decomposition::full_matrix_solve(Vector &out, Vector const &rhs)const { int n= rhs.dim(); assert(n == L.dim()); - Vector y(n); - + Vector y; + y.set_dim( n); + out.set_dim(n); + // forward substitution for (int i=0; i < n; i++) { Real sum(0.0); @@ -26,18 +28,67 @@ Choleski_decomposition::solve(Vector rhs)const sum += y(j) * L(i,j); y(i) = (rhs(i) - sum)/L(i,i); } + for (int i=0; i < n; i++) y(i) /= D(i); // backward subst - Vector &x(rhs); // using input as return val. + Vector &x(out); // using input as return val. for (int i=n-1; i >= 0; i--) { Real sum(0.0); for (int j=i+1; j < n; j++) sum += L(j,i)*x(j); x(i) = (y(i) - sum)/L(i,i); } - return x; +} + +void +Choleski_decomposition::band_matrix_solve(Vector &out, Vector const &rhs)const +{ + int n= rhs.dim(); + int b = L.band_i(); + assert(n == L.dim()); + + out.set_dim(n); + + Vector y; + y.set_dim(n); + + // forward substitution + for (int i=0; i < n; i++) { + Real sum(0.0); + for (int j= 0 >? i - b; j < i; j++) + sum += y(j) * L(i,j); + y(i) = (rhs(i) - sum)/L(i,i); + } + for (int i=0; i < n; i++) + y(i) /= D(i); + + // backward subst + Vector &x(out); // using input as return val. + for (int i=n-1; i >= 0; i--) { + Real sum(0.0); + for (int j=i+1; j <= i + b&&j < n ; j++) + sum += L(j,i)*x(j); + x(i) = (y(i) - sum)/L(i,i); + } +} + +void +Choleski_decomposition::solve(Vector &x, Vector const &rhs)const +{ + if (L.band_b()) { + band_matrix_solve(x,rhs); + } else + full_matrix_solve(x,rhs); +} + +Vector +Choleski_decomposition::solve(Vector rhs)const +{ + Vector r; + solve(r, rhs); + return r; } void @@ -126,9 +177,10 @@ Choleski_decomposition::inverse() const int n=L.dim(); Matrix invm(n); Vector e_i(n); + Vector inv(n); for (int i = 0; i < n; i++) { e_i.set_unit(i); - Vector inv(solve(e_i)); + solve(inv, e_i); for (int j = 0 ; j&6 -echo "configure:582: checking for $ac_word" >&5 +echo "configure:594: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -609,7 +621,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:613: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:625: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -619,11 +631,11 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -643,12 +655,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:647: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:659: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:652: checking whether we are using GNU C++" >&5 +echo "configure:664: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -657,7 +669,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -672,7 +684,7 @@ if test $ac_cv_prog_gxx = yes; then ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:676: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:688: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -700,7 +712,7 @@ else fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:704: checking for 8-bit clean memcmp" >&5 +echo "configure:716: checking for 8-bit clean memcmp" >&5 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -708,7 +720,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -739,12 +751,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:743: checking for vprintf" >&5 +echo "configure:755: checking for vprintf" >&5 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -794,12 +806,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:798: checking for _doprnt" >&5 +echo "configure:810: checking for _doprnt" >&5 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -852,12 +864,12 @@ fi for ac_func in memmem snprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:856: checking for $ac_func" >&5 +echo "configure:868: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -908,8 +920,10 @@ fi done +if test ! -d $OUTDIR_NAME ; then + mkdir $OUTDIR_NAME +fi -CXX="$ac_cv_prog_CXX" ../bin/make-version > $flowerbuildprefix/out/version.hh trap '' 1 2 15 cat > confcache <<\EOF @@ -1011,7 +1025,7 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo "$flowerbuildprefix/out/Flower-flags.make:Flower-flags.make.in $flowerbuildprefix/out/config.hh:config.hh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "$OUTDIR_NAME/Flower-flags.make:Flower-flags.make.in $OUTDIR_NAME/config.hh:config.hh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -1163,7 +1177,7 @@ ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi diff --git a/flower/configure.in b/flower/configure.in index 619a5fe71e..dd20827eae 100644 --- a/flower/configure.in +++ b/flower/configure.in @@ -7,16 +7,18 @@ optimise_b=yes shared_b=no LIB_SUFFIX=.a -# if given here, these vars are initted at the checking point. if test x$host = xNONE; then - flowerbuildprefix=. + OUTDIR_NAME=${OUTDIR_NAME-"out"} else - flowerbuildprefix="../$host-build-dir/Flower" - mkdir $flowerbuildprefix; - for a in `find -type d -and -not -name '*-build-dir'`; do - mkdir $flowerbuildprefix/$a; - done + OUTDIR_NAME=${OUTDIR_NAME-"out-$host"} fi + +for a in `find -type d -and -not -name 'out'`; do + if test ! -d $a/$OUTDIR_NAME; then + mkdir $a/$OUTDIR_NAME; + fi +done + AC_ARG_ENABLE(shared, [ enable-shared shared flower library], @@ -26,6 +28,11 @@ AC_ARG_ENABLE(optimise, [ disable-optimise optimisations off], [optimise_b=$enableval]) +AC_ARG_ENABLE(out-dir, + [ out-dir set the directory for machine generated files. Default out or out-HOST], + [OUTDIR_NAME=$enableval] + []) + if test $shared_b = yes; then MODULE_CXXFLAGS="$MODULE_CXXFLAGS -fPIC" MODULE_LDFLAGS="-shared -Wl,-soname,libflower.so " @@ -44,9 +51,11 @@ AC_PROG_CXX AC_FUNC_MEMCMP AC_FUNC_VPRINTF AC_CHECK_FUNCS(memmem snprintf ) -AC_CONFIG_HEADER($flowerbuildprefix/out/config.hh:config.hh.in) -CXX="$ac_cv_prog_CXX" ../bin/make-version > $flowerbuildprefix/out/version.hh +if test ! -d $OUTDIR_NAME ; then + mkdir $OUTDIR_NAME +fi -AC_OUTPUT($flowerbuildprefix/out/Flower-flags.make:Flower-flags.make.in) +AC_CONFIG_HEADER($OUTDIR_NAME/config.hh:config.hh.in) +AC_OUTPUT($OUTDIR_NAME/Flower-flags.make:Flower-flags.make.in) diff --git a/flower/diagonal-storage.cc b/flower/diagonal-storage.cc index 3cf2f93d20..fc812423e5 100644 --- a/flower/diagonal-storage.cc +++ b/flower/diagonal-storage.cc @@ -9,6 +9,15 @@ #include "diagonal-storage.hh" + +#ifdef INLINE +#undef INLINE +#endif + +#define INLINE inline + +#include "full-storage.icc" + int Diagonal_storage::dim()const { @@ -40,6 +49,7 @@ Diagonal_storage::band_size_i()const void Diagonal_storage::set_band_size(int s) { + assert( s>=0); Full_storage f(dim(), 2*s+1); for (int i=0; i < dim(); i++) { int k=-s; @@ -110,7 +120,7 @@ void Diagonal_storage::resize_dim(int d) { Full_storage f(d, 2*band_size_i()+1); - for (int i=0; i < d&& i < dim(); i++) { + for (int i=0; i < d && i < dim(); i++) { for ( int k=0; k < 2*band_size_i(); k++) f.elem(i,k) = elem(i,k); } @@ -134,9 +144,7 @@ Diagonal_storage::mult_next(int &i, int &j)const j = i- band_size_i(); if ( j > i + band_size_i() || j >= dim() ) { i++; - j = i - band_size_i(); - if (j < 0) - j=0; + j = 0 >? i - band_size_i(); } } @@ -155,9 +163,7 @@ Diagonal_storage::trans_next(int &i, int& j)const if ( i >= dim() || i > j + band_size_i() ) { j++; - i = j - band_size_i(); - if (i < 0) - i=0; + i = 0 >? j - band_size_i(); } } @@ -178,8 +184,9 @@ Diagonal_storage::elem(int i, int j) /* if this fails, the previous call fucked up */ - assert(nul_entry); - if (abs ( i-j ) > band_size_i()) + assert(!nul_entry); + + if (abs ( i-j ) > band_size_i()) return nul_entry; else return band_.elem(i, j - i + band_size_i()); @@ -196,8 +203,8 @@ Diagonal_storage::try_right_multiply(Matrix_storage*dest, if ( right->name() != Diagonal_storage::static_name() ) return false; - const Diagonal_storage* diag = (Diagonal_storage const*)right; - int band2 = diag->band_size_i(); + const Diagonal_storage* right_diag = (Diagonal_storage const*)right; + int band2 = right_diag->band_size_i(); int n = dim(); /* should check if dest is a Diagonal_storage of sufficient size too. @@ -209,7 +216,7 @@ Diagonal_storage::try_right_multiply(Matrix_storage*dest, int relk = startk + band_size_i() -i; Real sum =0.0; for ( int k = startk; k <= stopk; k++) - sum += band_.elem(i, relk) * diag->elem(relk, j); + sum += band_.elem(i, relk++) * right_diag->elem(k, j); dest->elem(i, j) = sum; } @@ -234,3 +241,5 @@ Diagonal_storage::OK() const { band_.OK(); } + +IMPLEMENT_VIRTUAL_COPY_CONS(Diagonal_storage, Matrix_storage); diff --git a/flower/directed-graph.cc b/flower/directed-graph.cc index c47285c71d..a08f456381 100644 --- a/flower/directed-graph.cc +++ b/flower/directed-graph.cc @@ -68,7 +68,7 @@ Directed_graph_node::remove_edge_out_idx(int i) int j = d_l->edge_in_l_arr_.find_i(this); assert(j>=0); - d_l->edge_in_l_arr_.del(j); + d_l->edge_in_l_arr_.unordered_del(j); PARANOID_OK(); } diff --git a/flower/full-storage.cc b/flower/full-storage.cc index 223796ba35..fd0d9f550b 100644 --- a/flower/full-storage.cc +++ b/flower/full-storage.cc @@ -8,6 +8,7 @@ #include "full-storage.hh" + void Full_storage::operator=(Full_storage const &fs) { @@ -19,6 +20,7 @@ Full_storage::operator=(Full_storage const &fs) els_p_p_[i][j]= fs.els_p_p_[i][j]; } + void Full_storage::OK() const { @@ -30,63 +32,18 @@ Full_storage::OK() const #endif } -void -Full_storage::resize_cols(int newh) -{ - if (newh <= max_height_i_) { - height_i_=newh; - return; - } - - Real ** newa=new Real*[newh]; - int j=0; - for (; j < height_i_; j++) - newa[j] = els_p_p_[j]; - for (; j < newh; j++) - newa[j] = new Real[max_width_i_]; - delete[] els_p_p_; - els_p_p_=newa; - height_i_ = max_height_i_ = newh; -} -Full_storage::Full_storage(Matrix_storage*m) +Full_storage::~Full_storage() { - set_size(m->rows(), m->cols()); - if ( !m->is_type_b ( Full_storage::static_name())) - for (int i=0; imult_ok(i,j); m->mult_next(i,j)) - els_p_p_[i][j] = m->elem(i,j); -} - -void -Full_storage::resize_rows(int neww) -{ - if (neww <= max_width_i_) { - width_i_=neww; - return; - } - for (int i=0; i < max_height_i_ ; i++) { - Real* newa = new Real[neww]; - for (int k=0; k < width_i_; k++) - newa[k] = els_p_p_[i][k]; - - delete[] els_p_p_[i]; - els_p_p_[i] = newa; - } - width_i_ = max_width_i_ = neww; -} - -Full_storage::~Full_storage() { for (int i=0; i < max_height_i_; i++) delete [] els_p_p_[i]; delete[] els_p_p_; } void + Full_storage::resize(int rows, int cols) { OK(); @@ -95,12 +52,14 @@ Full_storage::resize(int rows, int cols) } + bool Full_storage::mult_ok(int i, int ) const { return i < height_i_; } + bool Full_storage::trans_ok(int , int j) const { @@ -108,6 +67,7 @@ Full_storage::trans_ok(int , int j) const } + void Full_storage::trans_next(int &i, int &j) const { @@ -119,6 +79,7 @@ Full_storage::trans_next(int &i, int &j) const } } + void Full_storage::mult_next(int &i, int &j) const { @@ -130,6 +91,7 @@ Full_storage::mult_next(int &i, int &j) const } } + void Full_storage::delete_column(int k) { @@ -139,6 +101,8 @@ Full_storage::delete_column(int k) els_p_p_[i][j-1]=els_p_p_[i][j]; width_i_--; } + + void Full_storage::delete_row(int k) { @@ -150,6 +114,7 @@ Full_storage::delete_row(int k) } + void Full_storage::insert_row(int k) { @@ -161,19 +126,6 @@ Full_storage::insert_row(int k) } -int -Full_storage::dim()const -{ - assert (rows()==cols()); - return rows(); -} - -Full_storage::Full_storage(Full_storage const&s) -{ - init(); - (*this) = s; -} - bool Full_storage::try_right_multiply(Matrix_storage * dest, Matrix_storage const * right)const { @@ -198,3 +150,61 @@ Full_storage::try_right_multiply(Matrix_storage * dest, Matrix_storage const * r } IMPLEMENT_IS_TYPE_B1(Full_storage,Matrix_storage); +void +Full_storage::resize_cols(int newh) +{ + if (newh <= max_height_i_) { + height_i_=newh; + return; + } + + Real ** newa=new Real*[newh]; + int j=0; + for (; j < height_i_; j++) + newa[j] = els_p_p_[j]; + for (; j < newh; j++) + newa[j] = new Real[max_width_i_]; + delete[] els_p_p_; + els_p_p_=newa; + + height_i_ = max_height_i_ = newh; +} + + + +Full_storage::Full_storage(Matrix_storage*m) +{ + set_size(m->rows(), m->cols()); + if ( !m->is_type_b ( Full_storage::static_name())) + for (int i=0; imult_ok(i,j); m->mult_next(i,j)) + els_p_p_[i][j] = m->elem(i,j); +} + + +void +Full_storage::resize_rows(int neww) +{ + if (neww <= max_width_i_) { + width_i_=neww; + return; + } + for (int i=0; i < max_height_i_ ; i++) { + Real* newa = new Real[neww]; + for (int k=0; k < width_i_; k++) + newa[k] = els_p_p_[i][k]; + + delete[] els_p_p_[i]; + els_p_p_[i] = newa; + } + width_i_ = max_width_i_ = neww; +} + +#ifdef INLINE +#undef INLINE +#endif +#define INLINE + +#include "full-storage.icc" diff --git a/flower/include/Makefile b/flower/include/Makefile index 1ad45cb463..b7716f2676 100644 --- a/flower/include/Makefile +++ b/flower/include/Makefile @@ -14,5 +14,6 @@ include ./$(depth)/flower/VERSION # MODULE_NAME = flower + # diff --git a/flower/include/choleski.hh b/flower/include/choleski.hh index a3a02a11e0..abd19ee676 100644 --- a/flower/include/choleski.hh +++ b/flower/include/choleski.hh @@ -30,7 +30,7 @@ struct Choleski_decomposition { solve Px = rhs */ Vector solve(Vector rhs) const; - + void solve (Vector &dest, Vector const &rhs)const; Vector operator * (Vector rhs) const { return solve (rhs); } /** return the inverse of the matrix P. @@ -41,6 +41,8 @@ struct Choleski_decomposition { */ Matrix original() const; private: + void full_matrix_solve(Vector &,Vector const&)const; + void band_matrix_solve(Vector &, Vector const&)const; void full_matrix_decompose(Matrix const & P); void band_matrix_decompose(Matrix const &P); diff --git a/flower/include/diagonal-storage.hh b/flower/include/diagonal-storage.hh index 517c5cd814..f4515edfb1 100644 --- a/flower/include/diagonal-storage.hh +++ b/flower/include/diagonal-storage.hh @@ -12,9 +12,9 @@ #include "full-storage.hh" /** - Store a single-band matrix; + Store a matrix with a single-band. - INVARIANT + @invariant Diagonal_storage(i,j) == band_(i, j-i + band_size_i()) @@ -58,7 +58,7 @@ public: virtual void mult_next(int &i, int &j) const ; virtual bool trans_ok(int i, int j) const; virtual void trans_next(int &i, int &j) const; - VIRTUAL_COPY_CONS(Diagonal_storage, Matrix_storage); + DECLARE_VIRTUAL_COPY_CONS(Diagonal_storage, Matrix_storage); DECLARE_MY_RUNTIME_TYPEINFO; virtual bool try_right_multiply(Matrix_storage * dest, Matrix_storage const *)const; }; diff --git a/flower/include/full-storage.hh b/flower/include/full-storage.hh index 78bafab43d..1dfb96e8fa 100644 --- a/flower/include/full-storage.hh +++ b/flower/include/full-storage.hh @@ -26,57 +26,28 @@ class Full_storage : public Matrix_storage Real** els_p_p_; void - init() { - els_p_p_=0; - height_i_=width_i_=max_height_i_=max_width_i_=0; - - } - - bool valid(int i, int j) const { - return (i>=0 && i < height_i_) - && (j < width_i_ && j >=0); - } - + init() ; + + bool valid(int i, int j) const ; void resize_rows(int); void resize_cols(int); public: - virtual int rows() const { - return height_i_; - } - virtual int cols() const { - return width_i_; - } + virtual int rows() const; + virtual int cols() const ; virtual void resize(int i, int j); - virtual void resize(int i) { - resize(i,i); - } - - virtual Real& elem(int i,int j) { - assert(valid(i,j)); - return els_p_p_[i][j]; - } - virtual Real elem(int i, int j) const { - assert(valid(i,j)); - return els_p_p_[i][j]; - } + virtual void resize(int i); + virtual Real& elem(int i,int j); + virtual Real elem(int i, int j)const ; int dim()const; Full_storage(Matrix_storage*); - Full_storage() { - init(); - } - Full_storage(int i, int j) { - init(); - set_size(i,j); - } + Full_storage(); + Full_storage(int i, int j); Full_storage(Full_storage const&); - Full_storage(int i) { - init(); - set_size(i); - } + Full_storage(int i); void OK() const; void operator=(Full_storage const &); @@ -89,7 +60,7 @@ public: virtual void mult_next(int &i, int &j) const ; virtual bool trans_ok(int i, int j) const; virtual void trans_next(int &i, int &j) const; - VIRTUAL_COPY_CONS(Full_storage,Matrix_storage); + DECLARE_VIRTUAL_COPY_CONS(Full_storage,Matrix_storage); DECLARE_MY_RUNTIME_TYPEINFO; virtual bool try_right_multiply(Matrix_storage * dest, Matrix_storage const * )const; }; diff --git a/flower/include/full-storage.icc b/flower/include/full-storage.icc new file mode 100644 index 0000000000..06bcc9d70c --- /dev/null +++ b/flower/include/full-storage.icc @@ -0,0 +1,94 @@ +/* + full-storage.icc -- implement Full_storage inline functions + + source file of the Flower Library + + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef FULL_STORAGE_ICC +#define FULL_STORAGE_ICC + + +INLINE void +Full_storage::init() +{ + els_p_p_=0; + height_i_=width_i_=max_height_i_=max_width_i_=0; +} +INLINE bool +Full_storage::valid(int i, int j)const +{ + return (i>=0 && i < height_i_) + && (j < width_i_ && j >=0); +} + + +INLINE +Full_storage::Full_storage(Full_storage const&s) +{ + init(); + (*this) = s; +} + +INLINE Real& +Full_storage::elem(int i,int j) +{ + assert(valid(i,j)); + return els_p_p_[i][j]; +} + +INLINE Real +Full_storage::elem(int i, int j) const { + assert(valid(i,j)); + return els_p_p_[i][j]; +} + +INLINE +Full_storage::Full_storage() { + init(); +} + + +INLINE int +Full_storage::rows() const +{ + return height_i_; +} +INLINE int +Full_storage::cols() const +{ + return width_i_; +} +INLINE int +Full_storage::dim()const +{ + assert (rows()==cols()); + return rows(); +} + +INLINE void +Full_storage::resize(int i) +{ + resize(i,i); +} + +INLINE +Full_storage::Full_storage(int i,int j) +{ + init(); + set_size(i,j); +} + +INLINE +Full_storage::Full_storage(int i) +{ + init(); + set_size(i); +} + +INLINE +IMPLEMENT_VIRTUAL_COPY_CONS(Full_storage,Matrix_storage); + +#endif // FULL_STORAGE_ICC diff --git a/flower/include/parray.hh b/flower/include/parray.hh index 1e7404ee55..61c69495c2 100644 --- a/flower/include/parray.hh +++ b/flower/include/parray.hh @@ -39,6 +39,17 @@ public: else del(i); } + void unordered_substitute(T* old, T * new_l) + { + int i; + while ((i = find_i(old)) >=0) + if (new_l) + elem(i) =new_l; + else { + unordered_del( i ); + } + + } void default_sort() { sort(default_compare); } diff --git a/flower/include/rational.hh b/flower/include/rational.hh index 30fa2cb6d6..d3b68f726f 100644 --- a/flower/include/rational.hh +++ b/flower/include/rational.hh @@ -1 +1,17 @@ +/* + rational.hh -- declare + + source file of the Flower Library + + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef RATIONAL_HH +#define RATIONAL_HH #include + +/// print a Rational. To be called from the debugger +void print_rat(Rational const&); + +#endif // RATIONAL_HH diff --git a/flower/include/real.hh b/flower/include/real.hh index 0533af2111..457b82f967 100644 --- a/flower/include/real.hh +++ b/flower/include/real.hh @@ -1,3 +1,12 @@ +/* + real.hh -- declare Real + + source file of the Flower Library + + (c) 1997 Han-Wen Nienhuys +*/ + + #ifndef REAL_HH #define REAL_HH @@ -5,12 +14,15 @@ #include #include #include +#include typedef double Real; +const Real infinity_f = HUGE_VAL; inline Real distance(Real x,Real y) { return abs(x-y); } + #endif diff --git a/flower/include/varray.hh b/flower/include/varray.hh index 5fe5fa3943..6f0e18aedc 100644 --- a/flower/include/varray.hh +++ b/flower/include/varray.hh @@ -164,6 +164,11 @@ public: del (i); return t; } + void unordered_del(int i) + { + elem(i) = top(); + set_size(size() -1); + } void del(int i) { assert(i >=0&& i < size_); arrcpy(thearray+i, thearray+i+1, size_-i-1); @@ -192,7 +197,7 @@ public: set_size(size_ + src.size_); arrcpy(thearray+s,src.thearray, src.size_); } - Array subvec(int lower, int upper) { + Array slice(int lower, int upper) { assert(lower >= 0 && lower <=upper&& upper <= size_); Array r; int s =upper-lower; diff --git a/flower/include/vector.hh b/flower/include/vector.hh index fdeab97f13..7f75735344 100644 --- a/flower/include/vector.hh +++ b/flower/include/vector.hh @@ -23,6 +23,11 @@ public: dat.set_size(n); fill(0); } + void set_dim(int i) + { + dat.set_size(i); + } + void insert(Real v, int i) { dat.insert(v,i); } diff --git a/flower/include/virtual-methods.hh b/flower/include/virtual-methods.hh index 88dad44aeb..ceb12694e3 100644 --- a/flower/include/virtual-methods.hh +++ b/flower/include/virtual-methods.hh @@ -24,10 +24,18 @@ int a_stupid_nonexistent_function_to_allow_the_semicolon_come_out() #define IMPLEMENT_STATIC_NAME(c)\ char const *c::static_name() { return #c; } + + #define VIRTUAL_COPY_CONS(T, R)\ virtual R *clone() const { return new T(*this); } \ int yet_another_stupid_function_to_allow_semicolon() + +#define DECLARE_VIRTUAL_COPY_CONS(T,R)\ + virtual R *clone() const +#define IMPLEMENT_VIRTUAL_COPY_CONS(T,R)\ + R *T::clone() const { return new T(*this); } \ + #define IMPLEMENT_IS_TYPE_B(D) \ IMPLEMENT_STATIC_NAME(D)\ bool D::static_is_type_b(const char *s) \ diff --git a/flower/matrix-storage.cc b/flower/matrix-storage.cc index 76b89f7f36..54deb7d673 100644 --- a/flower/matrix-storage.cc +++ b/flower/matrix-storage.cc @@ -19,8 +19,8 @@ Matrix_storage::set_addition_result(Matrix_storage *&dat, Matrix_storage *right) if ( R->band_size_i() > L->band_size_i()) { L->set_band_size(R->band_size_i()); - return ; } + return ; } if (!dat || !dat->is_type_b(Full_storage::static_name() )) { diff --git a/flower/matrix.cc b/flower/matrix.cc index 78e3d777b0..7e1854827b 100644 --- a/flower/matrix.cc +++ b/flower/matrix.cc @@ -108,6 +108,10 @@ Matrix::operator=(Matrix const &m) int Matrix::band_i()const { + if ( band_b() ) { + Diagonal_storage const * diag = (Diagonal_storage*) dat; + return diag->band_size_i(); + } int starty = dim(); while (starty >= 0 ) { for ( int i = starty, j = 0; i < dim(); i++, j++ ) @@ -206,9 +210,13 @@ operator /(Matrix const& m1,Real a) return m; } +/* + ugh. Only works for square matrices. + */ void Matrix::transpose() // delegate to storage? { +#if 1 for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j)) { if (i >= j) continue; @@ -216,6 +224,7 @@ Matrix::transpose() // delegate to storage? dat->elem(i,j) = dat->elem(j,i); dat->elem(j,i)=r; } +#endif } Matrix @@ -252,6 +261,7 @@ Matrix::set_product(Matrix const &m1, Matrix const &m2) if (m1.dat->try_right_multiply(dat, m2.dat)) return; + for (int i=0, j=0; dat->mult_ok(i,j); dat->mult_next(i,j)) { Real r=0.0; diff --git a/flower/rational.cc b/flower/rational.cc new file mode 100644 index 0000000000..b1056c2430 --- /dev/null +++ b/flower/rational.cc @@ -0,0 +1,18 @@ +/* + rational.cc -- implement Rational related functions + + source file of the Flower Library + + (c) 1997 Han-Wen Nienhuys +*/ + +#include "rational.hh" +#include "string.hh" + +void +print_rat(Rational const &m) +{ + cout << String(m) << flush; +} + + diff --git a/flower/test/mat-test.cc b/flower/test/mat-test.cc index f7ce01bfc5..8fdc7d794e 100644 --- a/flower/test/mat-test.cc +++ b/flower/test/mat-test.cc @@ -47,7 +47,7 @@ matrix() Matrix hilbert(N,N), h2(hilbert); for (int i=0; i < N; i++) { for (int j=0; j < N; j++) { - hilbert(i,j) = 1/(i+j+1); + hilbert(i,j) = 1/Real(i+j+1); h2 (i,j) = (abs(i-j) > 3) ?0 : hilbert(i,j); } } @@ -55,6 +55,10 @@ matrix() Choleski_decomposition ch(h2); cout << "red Hilbert " << h2; cout << "choleski " << ch.L; + Matrix T =ch.L.transposed(); + cout << "L^T " << T; + cout << "L * L^T" << ch.L * T; + cout << "H2^{-1} * H2" << h2 * ch.inverse(); } ADD_TEST(matrix); diff --git a/init/paper16.ly b/init/paper16.ly index 04e0bb2855..de6a68c3ac 100644 --- a/init/paper16.ly +++ b/init/paper16.ly @@ -2,6 +2,9 @@ \include "table16.ly" \include "engraver.ly" +Gourlay = 1.0 +Wordwrap = 0.0 + default_paper = \paper { linewidth = 15.0 \cm; rule_thickness = 0.4\pt; @@ -15,6 +18,9 @@ default_paper = \paper { % interbeam = 2.667\pt; geometric = 1.414; + gourlay_energybound = 50000.; + gourlay_maxmeasures = 6.; + castingalgorithm = \Gourlay; \symboltables { \table_sixteen } \requesttranslator { \orchestral_score_translator } } diff --git a/input/rock.ly b/input/rock.ly new file mode 100644 index 0000000000..b6434ab2b8 --- /dev/null +++ b/input/rock.ly @@ -0,0 +1,4 @@ + +mel = \melodic { + [c8 c32 c16] +} diff --git a/input/wohltemperirt.ly b/input/wohltemperirt.ly index 49d0062a91..6807b651d5 100644 --- a/input/wohltemperirt.ly +++ b/input/wohltemperirt.ly @@ -174,8 +174,7 @@ bassdux = > \paper{ -% unitspace = 40.0\pt; geometric = 1.6; -% geometric= 1.4; unitspace= 34.\pt; +% castingalgorithm=0.; } \midi { \tempo 4:84; diff --git a/lib/Makefile b/lib/Makefile index 280af9ce06..1fbb2d83c2 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -37,7 +37,7 @@ VERSION_DEPENDENCY =# # list of distribution files: # -DISTFILES = Makefile $(ALL_SOURCES) +EXTRA_DISTFILES = config.hh.in # # list of custom libraries: diff --git a/lib/config.hh.in b/lib/config.hh.in new file mode 100644 index 0000000000..2aa23dfdaa --- /dev/null +++ b/lib/config.hh.in @@ -0,0 +1,6 @@ +/* @configure_input@ */ +#ifndef CONFIG_HH +#define CONFIG_HH +#define DIR_DATADIR "@DIR_DATADIR@" + +#endif diff --git a/lib/include/moment.hh b/lib/include/moment.hh index 4f44c07fd9..bbd3388e74 100644 --- a/lib/include/moment.hh +++ b/lib/include/moment.hh @@ -5,10 +5,24 @@ #ifndef MOMENT_HH #define MOMENT_HH +#include #include "rational.hh" + +/** + A really big time-moment. + + Windhoze-suck-suck-suck-suck-suck-thank-you-cygnus + + I get tired of all these incompatibilities. Let's just assume that + INT_MAX is really, really, really big. + + Can't we name this Saint_jut_mom (Sintjuttemis ?) */ + +const infinity_mom = Rational(INT_MAX); + class String; typedef Rational Moment; -void printm(Moment const&); + #endif // diff --git a/lily/Makefile b/lily/Makefile index 65065454be..785fb9e0e4 100644 --- a/lily/Makefile +++ b/lily/Makefile @@ -12,6 +12,8 @@ depth = .. # +NAME = lilypond + # generic variables: # include Stable.make @@ -21,7 +23,6 @@ include VERSION # identify module: # -NAME = lilypond # @@ -69,3 +70,5 @@ localclean: localinstall: installexe localuninstall: uninstallexe + +$(outdir)/lily-version.o: $(outdir)/version.hh diff --git a/lily/Stable.make b/lily/Stable.make index 57ea2528d1..885745a247 100644 --- a/lily/Stable.make +++ b/lily/Stable.make @@ -5,8 +5,6 @@ stablecc=atom.cc command-request.cc musical-request.cc bar.cc boxes.cc \ keyword.cc leastsquares.cc \ lookup.cc meter.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\ + template*.cc template6.cc version.cc tex-stream.cc tex.cc\ identifier.cc note.cc diff --git a/lily/VERSION b/lily/VERSION index a31769b185..013490db64 100644 --- a/lily/VERSION +++ b/lily/VERSION @@ -1,6 +1,6 @@ MAJOR_VERSION = 0 MINOR_VERSION = 1 -PATCH_LEVEL = 0 +PATCH_LEVEL = 1 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf diff --git a/lily/boxes.cc b/lily/boxes.cc index f83f7659e9..1798cb93c3 100644 --- a/lily/boxes.cc +++ b/lily/boxes.cc @@ -1,5 +1,4 @@ #include "boxes.hh" -#include "const.hh" #include "varray.hh" diff --git a/lily/break-caching.cc b/lily/break-caching.cc new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/lily/break-caching.cc @@ -0,0 +1 @@ + diff --git a/lily/break.cc b/lily/break.cc index 8d3779e4da..1ef5c4bc6f 100644 --- a/lily/break.cc +++ b/lily/break.cc @@ -15,26 +15,89 @@ #include "p-score.hh" #include "p-col.hh" +String +Col_stats::str() const { + String s(count_i_); + s += " lines"; + if (count_i_) + s += String(Real(cols_i_)/count_i_, ", (with an average of %.1f columns)"); + + return s; +} + +void +Col_stats::add(Line_of_cols const& line) +{ + count_i_++; + cols_i_ += line.size(); +} + + +Col_stats::Col_stats() +{ + count_i_ =0; + cols_i_ =0; +} + +/* **************************************************************** */ + +Line_of_cols +Break_algorithm::all_cols()const +{ + Line_of_cols retval; + for (PCursor c(pscore_l_->col_p_list_.top()); + c.ok(); c++) { + + retval.push(c); + } + return retval; +} + +Array +Break_algorithm::find_break_indices() const +{ + Line_of_cols all(all_cols()); + Array retval; + + for (int i=0; i < all.size(); i++) + if (all[i]->breakable_b()) + retval.push(i); + + if ( linelength <=0) + while ( retval.size() >2) + retval.del(1); + + return retval; +} + /// return all breakable columns Line_of_cols Break_algorithm::find_breaks() const { + Line_of_cols all(all_cols()); Line_of_cols retval; - for (iter_top(pscore_l_->col_p_list_,c); c.ok(); c++) { - if (c->breakable_b()) - retval.push(c); - } + + for (int i=0; i < all.size(); i++) + if (all[i]->breakable_b()) + retval.push(all[i]); + + if ( linelength <=0) while ( retval.size() >2) retval.del(1); return retval; } + + + + Line_spacer* Break_algorithm::generate_spacing_problem(Line_of_cols curline)const { Line_spacer * sp= (*get_line_spacer)(); + sp->paper_l_ = pscore_l_->paper_l_; sp->add_column(curline[0], true, 0.0); for (int i=1; i< curline.size()-1; i++) @@ -44,46 +107,24 @@ Break_algorithm::generate_spacing_problem(Line_of_cols curline)const sp->add_column(curline.top(), true, linelength); else sp->add_column(curline.top()); - return sp; -} -Col_hpositions -Break_algorithm::stupid_solution(Line_of_cols curline)const -{ - Line_spacer *sp =generate_spacing_problem(curline); - Col_hpositions colhpos; - colhpos.cols = curline; - colhpos.energy = INFTY_f; - colhpos.ugh_b_ = true; - colhpos.config = sp->default_solution(); - delete sp; - return colhpos; + sp->prepare(); + return sp; } -/// construct an appropriate Spacing_problem and solve it. -Col_hpositions -Break_algorithm::solve_line(Line_of_cols curline) const +Break_algorithm::Break_algorithm() { - Line_spacer *sp = generate_spacing_problem(curline); - sp->prepare(); - - Array the_sol=sp->solve(); - Col_hpositions col_hpos; - col_hpos.cols = curline; - col_hpos.energy = the_sol.pop(); - col_hpos.config = the_sol; - col_hpos.error_col_l_arr_ = sp->error_pcol_l_arr(); - col_hpos.OK(); - delete sp; - - return col_hpos; + pscore_l_ = 0; + get_line_spacer =0; + linelength = 0; } -Break_algorithm::Break_algorithm(PScore&s) +void +Break_algorithm::set_pscore(PScore*s) { - pscore_l_ = &s; - get_line_spacer =0; - linelength = s.paper_l_->linewidth_f(); + pscore_l_ = s; + linelength = s->paper_l_->linewidth_f(); + do_set_pscore(); } bool @@ -124,3 +165,17 @@ Break_algorithm::solve()const return do_solve(); } +void +Break_algorithm::do_set_pscore() +{ + +} + +void +Break_algorithm::print_stats()const +{ + if (approx_stats_.count_i_) + *mlog << "\nApproximated: " << approx_stats_.str() << "\n"; + if (exact_stats_.count_i_) + *mlog << "Calculated exactly: " << exact_stats_.str() << "\n"; +} diff --git a/lily/colhpos.cc b/lily/colhpos.cc index e87c22f3c5..aade26ac49 100644 --- a/lily/colhpos.cc +++ b/lily/colhpos.cc @@ -1,13 +1,28 @@ +/* + colhpos.cc -- implement Col_hpositions + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + #include "colhpos.hh" #include "real.hh" #include "debug.hh" -#include "const.hh" #include "vector.hh" +#include "line-spacer.hh" Col_hpositions::Col_hpositions() { - energy = INFTY_f; + energy_f_ = infinity_f; ugh_b_ = false; + satisfies_constraints_b_ = false; + spacer_l_ =0; +} + +Col_hpositions::~Col_hpositions() +{ + } void @@ -20,7 +35,7 @@ void Col_hpositions::print() const { #ifndef NPRINT - mtor << "energy : " << energy << '\n'; + mtor << "energy : " << energy_f_ << '\n'; mtor << "line of " << config.size() << " cols\n"; Vector v(config); mtor << v; @@ -34,3 +49,26 @@ Col_hpositions::OK()const assert(config.size() == cols.size()); #endif } + +void +Col_hpositions::stupid_solution() +{ + energy_f_ = infinity_f; + ugh_b_ = true; + config = spacer_l_->default_solution(); +} + +void +Col_hpositions::solve_line() +{ + spacer_l_->solve(this); +} + + +void +Col_hpositions::approximate_solve_line() +{ + spacer_l_->lower_bound_solution(this); +} + + diff --git a/lily/command-request.cc b/lily/command-request.cc index 0d44ccbd35..cf5ef632f8 100644 --- a/lily/command-request.cc +++ b/lily/command-request.cc @@ -186,9 +186,11 @@ Key_change_req::squash_octaves() void Key_change_req::do_print() const { +#ifndef NPRINT for (int i=0; i < melodic_p_arr_.size(); i++) { melodic_p_arr_[i]->print(); } +#endif } Key_change_req::Key_change_req() diff --git a/lily/debug.cc b/lily/debug.cc index 3d046bd414..654578dcb1 100644 --- a/lily/debug.cc +++ b/lily/debug.cc @@ -9,7 +9,7 @@ Dstream *monitor=0; ostream * nulldev =0; -static void (*rat_printer)(Moment const&); + // ugh struct _Dinit { @@ -41,10 +41,13 @@ float_handler(int) assert(false); } +/// just to make sure print_rat is linked in +static void (*rat_printer)(Moment const&); + void debug_init() { - rat_printer = printm; // make sure this is linked in + rat_printer = print_rat; #ifndef NDEBUG set_new_handler(&mynewhandler); #endif diff --git a/lily/elem-group-item.cc b/lily/elem-group-item.cc index c1903ffcd0..138bd146a3 100644 --- a/lily/elem-group-item.cc +++ b/lily/elem-group-item.cc @@ -8,6 +8,7 @@ #include "elem-group-item.hh" +#include "p-col.hh" void Horizontal_vertical_group_item::do_print()const @@ -16,6 +17,3 @@ Horizontal_vertical_group_item::do_print()const } IMPLEMENT_IS_TYPE_B2(Horizontal_vertical_group_item,Horizontal_vertical_group,Item); - -IMPLEMENT_IS_TYPE_B2(Horizontal_group_item, Horizontal_group, Item); - diff --git a/lily/elem-group.cc b/lily/elem-group.cc index e60570ed66..badb6db851 100644 --- a/lily/elem-group.cc +++ b/lily/elem-group.cc @@ -17,6 +17,11 @@ Elbement_group::contains_b(Score_elem const*e)const return elem_l_arr_.find_l(e); } +Elbement_group::Elbement_group(Elbement_group const &s) + : Score_elem(s) +{ +} + Interval Vertical_group::do_height()const { @@ -54,14 +59,17 @@ Elbement_group::add_element(Score_elem*i_l) void Horizontal_group::add_element(Score_elem*elt) { - elt->x_group_element_i_ ++; + assert ( !elt->x_group_l_ ); + elt->x_group_l_ = this; Elbement_group::add_element(elt); } void Vertical_group::add_element(Score_elem*e) { - e->y_group_element_i_++; + assert( ! e->y_group_l_ ); + e->y_group_l_ = this; + Elbement_group::add_element(e); } @@ -98,13 +106,13 @@ Horizontal_group::do_substitute_dependency(Score_elem* old, Score_elem *new_l) int i; while ((i=elem_l_arr_.find_i(old))>=0) { - old->x_group_element_i_--; + old->x_group_l_ =0; if (new_l){ - new_l->x_group_element_i_ ++; + new_l->x_group_l_ = this; elem_l_arr_[i] = new_l; }else { - elem_l_arr_.del(i); + elem_l_arr_.unordered_del(i); } } } @@ -115,13 +123,13 @@ Vertical_group::do_substitute_dependency(Score_elem* old, Score_elem *new_l) int i; while ((i=elem_l_arr_.find_i(old))>=0) { - old->y_group_element_i_--; + old->y_group_l_ =0; if (new_l){ - new_l->y_group_element_i_ ++; + new_l->y_group_l_ =this; elem_l_arr_[i] = new_l; }else { - elem_l_arr_.del(i); + elem_l_arr_.unordered_del(i); } } } @@ -130,16 +138,12 @@ Vertical_group::Vertical_group(Vertical_group const &s) : Elbement_group(s) { - for (int i=0; i < elem_l_arr_.size(); i++) - elem_l_arr_[i]->y_group_element_i_ ++; } Horizontal_group::Horizontal_group(Horizontal_group const &s) - : Elbement_group(s) + : Elbement_group(s) { - for (int i=0; i < elem_l_arr_.size(); i++) - elem_l_arr_[i]->x_group_element_i_ ++; } Elbement_group::Elbement_group() @@ -185,3 +189,17 @@ Horizontal_group::do_print() const { Elbement_group::do_print(); } + + + +void +Vertical_group::remove_element(Score_elem*s) +{ + remove_dependency( s ); +} + +void +Horizontal_group::remove_element(Score_elem*s) +{ + remove_dependency( s ); +} diff --git a/lily/engraver-group.cc b/lily/engraver-group.cc index a1a77d7da1..672c8f2e5f 100644 --- a/lily/engraver-group.cc +++ b/lily/engraver-group.cc @@ -174,6 +174,8 @@ void Engraver_group_engraver::do_print()const { #ifndef NPRINT + if ( !check_debug) + return ; mtor << "ID: " << id_str_ << "\n"; for (PCursor i(grav_list_.top()); i.ok(); i++) i->print(); diff --git a/lily/gourlay-breaking.cc b/lily/gourlay-breaking.cc new file mode 100644 index 0000000000..03f6d3cd7c --- /dev/null +++ b/lily/gourlay-breaking.cc @@ -0,0 +1,177 @@ +/* + gourlay-breaking.cc -- implement Gourlay_breaking + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + +#include "gourlay-breaking.hh" +#include "colhpos.hh" +#include "spring-spacer.hh" +#include "debug.hh" +#include "p-col.hh" +#include "p-score.hh" +#include "paper-def.hh" + + +const HAPPY_DOTS_I = 3; + +/** + Helper to trace back an optimal path + */ +struct Break_node { + /** this was the previous. If negative, this break should not be + considered: this path has infinite energy + + */ + int prev_break_i_; + Real energy_f_; + Col_hpositions line_config_; + Break_node() { + prev_break_i_ = -1; + } +}; + +/** + This algorithms is adapted from + */ + +Array +Gourlay_breaking::do_solve()const +{ + + Array optimal_paths; + Line_of_cols all = all_cols(); + Array breaks = find_break_indices(); + + optimal_paths.set_size(breaks.size()); + + Break_node first_node ; + first_node.prev_break_i_ = -1; + first_node.line_config_.energy_f_ = 0; + + optimal_paths[0] = first_node; + int break_idx=1; + + + for (; break_idx< breaks.size(); break_idx++) { + Array candidates; + Array candidate_lines; + Pointer_list spacer_p_list; + + /* + start with a short line, add measures. At some point + the line becomes infeasible. Then we don't try to add more + */ + for (int start_idx = break_idx; start_idx--; ){ + if (break_idx - start_idx > max_measures_i_) + break; + + if (optimal_paths[start_idx].prev_break_i_ < 0 + && optimal_paths[start_idx].line_config_.energy_f_) + + continue; + + Line_of_cols line = all.slice(breaks[start_idx], breaks[break_idx]+1); + + line[0] = line[0]->postbreak_p_; + line.top() = line.top()->prebreak_p_; + + if (!feasible(line)) + break; + + Col_hpositions approx; + approx.cols = line; + + approx.spacer_l_ = generate_spacing_problem( line ); + spacer_p_list.bottom().add(approx.spacer_l_); + + ((Break_algorithm*)this)->approx_stats_.add( approx.cols ); + approx.approximate_solve_line( ); + + if (approx.energy_f_ > energy_bound_f_ ){ + continue; + } + + + // this is a likely candidate. Store it. + candidate_lines.push( approx ); + candidates.push( start_idx ); + } + + + int minimal_j = -1; + Real minimal_energy = infinity_f; + for (int j=0; j < candidates.size(); j++) { + int start = candidates[j]; + if ( optimal_paths[start].line_config_.energy_f_ + + candidate_lines[j].energy_f_ > minimal_energy) + + continue; + + if ( !candidate_lines[j].satisfies_constraints_b_) { + candidate_lines[j].solve_line( ); + ((Break_algorithm*)this)->exact_stats_.add ( candidate_lines[j].cols ); + } + + Real this_energy + = optimal_paths[start].line_config_.energy_f_ + + candidate_lines[j].energy_f_ ; + + if ( this_energy < minimal_energy ) { + minimal_j = j; + minimal_energy = this_energy; + } + } + + if (minimal_j < 0) { + optimal_paths[break_idx].prev_break_i_ = -1; + optimal_paths[break_idx].line_config_.energy_f_ = infinity_f; + } else { + optimal_paths[break_idx].prev_break_i_ = candidates[minimal_j]; + optimal_paths[break_idx].line_config_ = candidate_lines[minimal_j]; + } + + if ( !(break_idx % HAPPY_DOTS_I) ) + *mlog << "[" << break_idx << "]"< final_breaks; + + /* skip 0-th element, since it is a "dummy" elt*/ + for (int i = optimal_paths.size()-1; i> 0; ) { + final_breaks.push ( i ); + assert ( i > optimal_paths[i].prev_break_i_); + i = optimal_paths[i].prev_break_i_; + } + + Array lines; + for (int i= final_breaks.size(); i--; ) + lines.push ( optimal_paths[final_breaks[i]].line_config_ ); + + + return lines; +} + + +Gourlay_breaking::Gourlay_breaking() +{ + get_line_spacer = Spring_spacer::constructor; + energy_bound_f_ = infinity_f; + max_measures_i_ = INT_MAX; +} + +void +Gourlay_breaking::do_set_pscore() +{ + energy_bound_f_ = pscore_l_->paper_l_->get_var( "gourlay_energybound"); + max_measures_i_ =int (rint( pscore_l_->paper_l_->get_var( "gourlay_maxmeasures"))); +} + diff --git a/lily/grouping.cc b/lily/grouping.cc index 9d466b912f..0781bf9cb3 100644 --- a/lily/grouping.cc +++ b/lily/grouping.cc @@ -140,7 +140,7 @@ Rhythmic_grouping::split(Array splitpoints) ch.push(children[i]); } else { Rhythmic_grouping *newchild=new Rhythmic_grouping( - children.subvec(starti, i+1)); + children.slice(starti, i+1)); ch.push(newchild); } diff --git a/lily/groupregs.cc b/lily/groupregs.cc deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lily/horizontal-align-item.cc b/lily/horizontal-align-item.cc index 972b52f8e0..46c9b70b85 100644 --- a/lily/horizontal-align-item.cc +++ b/lily/horizontal-align-item.cc @@ -10,8 +10,12 @@ IMPLEMENT_IS_TYPE_B1(Horizontal_align_item,Item); - - +void +Horizontal_align_item::OK() const +{ + for (int i =0; i < item_l_arr_.size(); i++) + assert ( pcol_l_ == item_l_arr_[i]->pcol_l_ ); +} bool Horizontal_align_item::contains_b(Item *i)const { @@ -57,6 +61,7 @@ struct Horizontal_align_item_content { void Horizontal_align_item::do_pre_processing() { + OK(); { Array content; for (int i =0; i < item_l_arr_.size(); i++) diff --git a/lily/horizontal-group-item.cc b/lily/horizontal-group-item.cc new file mode 100644 index 0000000000..15af0bd803 --- /dev/null +++ b/lily/horizontal-group-item.cc @@ -0,0 +1,41 @@ +/* + horizontal-group-item.cc -- implement Horizontal_group_item + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + +#include "p-col.hh" +#include "horizontal-group-item.hh" + +IMPLEMENT_IS_TYPE_B2(Horizontal_group_item, Horizontal_group, Item); + +void +Horizontal_group_item::OK() const +{ + for (int i=0; i < elem_l_arr_.size(); i++) { + Item * it_l = elem_l_arr_[i]->item(); + + assert(it_l&& it_l->pcol_l_ == pcol_l_ ); + } +} + +void +Horizontal_group_item::do_breakable_col_processing() +{ + if (!pcol_l_->breakable_b()) + return; + OK(); + copy_breakable_items(); + + Link_array elems = elem_l_arr_; + + for (int i=0; i < elems.size(); i++) { + Item* it_l = elems[i]->item(); + for ( int j=0; j < 2; j++) { + Item *new_l = it_l->find_prebroken_piece(broken_to_a_[j]->pcol_l_); + ((Horizontal_group_item*)broken_to_a_[j])->add_element( new_l ); + } + } +} diff --git a/lily/include/break-caching.hh b/lily/include/break-caching.hh new file mode 100644 index 0000000000..73b07d21ee --- /dev/null +++ b/lily/include/break-caching.hh @@ -0,0 +1,23 @@ +/* + break-caching.hh -- declare Break_caching + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef BREAK_CACHING_HH +#define BREAK_CACHING_HH + +/** + TODO : store breakpoints on the disk. + */ +struct Break_caching : Break_algorithm +{ + void do_set_pscore(); + Array do_solve()const; +}; + + +#endif // BREAK_CACHING_HH diff --git a/lily/include/break.hh b/lily/include/break.hh index bb37f4aeab..e016a8806a 100644 --- a/lily/include/break.hh +++ b/lily/include/break.hh @@ -13,37 +13,63 @@ #include "lily-proto.hh" #include "colhpos.hh" + +/** + Statistics for the number of columns calced. + */ +struct Col_stats +{ + int count_i_; + int cols_i_; + + Col_stats(); + void add(Line_of_cols const&l); + String str()const; +}; + /** Class representation of an algorithm which decides where to put the column, and where to break lines. - TODO: a decent algorithm, based on dynamic programming or something - a like. A "parindent", caching of breakpoints + TODO: A "parindent", caching of breakpoints */ class Break_algorithm { - Line_spacer* generate_spacing_problem(Line_of_cols)const; protected: + PScore *pscore_l_; Real linelength; /// search all pcols which are breakable. Line_of_cols find_breaks() const; - /// helper: solve for the columns in #curline#. - Col_hpositions solve_line(Line_of_cols) const; + Line_of_cols all_cols() const; + Array find_break_indices()const; + + + /// helper: solve for the columns in #curline#. + void solve_line(Col_hpositions*) const; + + /// helper: approximate the energyv + void approximate_solve_line(Col_hpositions*) const; /// does curline fit on the paper? bool feasible(Line_of_cols)const; - /** generate a solution with no regard to idealspacings or - constraints. should always work */ - Col_hpositions stupid_solution(Line_of_cols) const; + Line_spacer* generate_spacing_problem(Line_of_cols)const; + virtual Array do_solve()const=0; + void print_stats()const; + + virtual void do_set_pscore(); public: + Col_stats approx_stats_; + Col_stats exact_stats_; + Line_spacer* (*get_line_spacer)(); - Break_algorithm(PScore&); + Break_algorithm(); + void set_pscore(PScore*); /// check if the spacing/breaking problem is well-stated void problem_OK()const; diff --git a/lily/include/colhpos.hh b/lily/include/colhpos.hh index a1407366ea..a8891ea004 100644 --- a/lily/include/colhpos.hh +++ b/lily/include/colhpos.hh @@ -6,21 +6,29 @@ #ifndef COLHPOS_HH #define COLHPOS_HH + #include "varray.hh" #include "lily-proto.hh" typedef Array Line_of_cols; struct Col_hpositions { + Line_spacer * spacer_l_; bool ugh_b_; Line_of_cols error_col_l_arr_; Line_of_cols cols; Array config; - Real energy; + Real energy_f_; + bool satisfies_constraints_b_; /* ************** */ void OK()const; - + ~Col_hpositions(); + void solve_line(); + void approximate_solve_line(); + /** generate a solution with no regard to idealspacings or + constraints. should always work */ + void stupid_solution(); Col_hpositions(); void add( PCol*c); void print() const; diff --git a/lily/include/const.hh b/lily/include/const.hh index 4b45edc597..531d002106 100644 --- a/lily/include/const.hh +++ b/lily/include/const.hh @@ -7,7 +7,6 @@ #include #include "real.hh" -const Real INFTY=HUGE_VAL; -const Real INFTY_f=(Real)INT_MAX; +#error #endif diff --git a/lily/include/elem-group-item.hh b/lily/include/elem-group-item.hh index a3e1ea6d16..bf532c035d 100644 --- a/lily/include/elem-group-item.hh +++ b/lily/include/elem-group-item.hh @@ -1,6 +1,6 @@ /* - elem-group-item.hh -- declare Element_group_item - + elem-group-item.hh -- declare Horizontal_vertical_group_item + source file of the GNU LilyPond music typesetter (c) 1997 Han-Wen Nienhuys @@ -21,11 +21,4 @@ protected: virtual void do_print() const; }; -class Horizontal_group_item : public Item, public Horizontal_group { - DECLARE_MY_RUNTIME_TYPEINFO; - SCORE_ELEM_CLONE(Horizontal_group_item); -protected: - virtual void do_print() const { Elbement_group::do_print(); } -}; - #endif // ELEM_GROUP_ITEM_HH diff --git a/lily/include/elem-group.hh b/lily/include/elem-group.hh index 650dc613ce..9569dcd90c 100644 --- a/lily/include/elem-group.hh +++ b/lily/include/elem-group.hh @@ -9,6 +9,7 @@ #ifndef ELEM_GROUP_HH #define ELEM_GROUP_HH + #include "score-elem.hh" class Elbement_group: public virtual Score_elem { @@ -17,23 +18,26 @@ protected: virtual void do_print() const ; public: + Elbement_group(Elbement_group const&); Elbement_group(); bool contains_b(Score_elem const *)const; void add_element(Score_elem*); DECLARE_MY_RUNTIME_TYPEINFO; - }; class Horizontal_group : public Elbement_group { public: DECLARE_MY_RUNTIME_TYPEINFO; - Horizontal_group(Horizontal_group const&); Horizontal_group(){} void add_element(Score_elem*); + Horizontal_group(Horizontal_group const&); + void remove_element(Score_elem*); + protected: + virtual Horizontal_group * horizontal_group() { return this; } virtual void do_substitute_dependency(Score_elem*,Score_elem*); virtual void do_print() const ; - virtual void translate_x(Real); + virtual void translate_x(Real); virtual Interval do_width()const; }; @@ -41,10 +45,13 @@ class Vertical_group : public Elbement_group { protected: virtual void translate_y(Real); virtual void do_print() const ; - virtual Interval do_height()const; + virtual Interval do_height()const; virtual void do_substitute_dependency(Score_elem*,Score_elem*); - void add_element(Score_elem*); + virtual Vertical_group * vertical_group() { return this; } public: + void add_element(Score_elem*); + void remove_element(Score_elem*); + Vertical_group(Vertical_group const &); Vertical_group(){} DECLARE_MY_RUNTIME_TYPEINFO; diff --git a/lily/include/gourlay-breaking.hh b/lily/include/gourlay-breaking.hh new file mode 100644 index 0000000000..99fa0c9340 --- /dev/null +++ b/lily/include/gourlay-breaking.hh @@ -0,0 +1,28 @@ +/* + gourlay-breaking.hh -- declare Gourlay_breaking + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef GOURLAY_BREAKING_HH +#define GOURLAY_BREAKING_HH + +#include "break.hh" + +/** + A dynamic programming solution to breaking scores into lines + */ +struct Gourlay_breaking : public Break_algorithm +{ + Real energy_bound_f_ ; + + /// maximum number of measures in a line + int max_measures_i_; + void do_set_pscore(); + Array do_solve()const; + Gourlay_breaking(); +}; +#endif // GOURLAY_BREAKING_HH diff --git a/lily/include/horizontal-align-item.hh b/lily/include/horizontal-align-item.hh index 639ce1b22e..d66a85a99f 100644 --- a/lily/include/horizontal-align-item.hh +++ b/lily/include/horizontal-align-item.hh @@ -35,6 +35,7 @@ public: DECLARE_MY_RUNTIME_TYPEINFO; SCORE_ELEM_CLONE(Horizontal_align_item); void add(Item*, int p); + void OK()const; Horizontal_align_item(); protected: diff --git a/lily/include/horizontal-group-item.hh b/lily/include/horizontal-group-item.hh new file mode 100644 index 0000000000..3495af9f97 --- /dev/null +++ b/lily/include/horizontal-group-item.hh @@ -0,0 +1,25 @@ +/* + horizontal-group-item.hh -- declare Horizontal_group_item + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef HORIZONTAL_GROUP_ITEM_HH +#define HORIZONTAL_GROUP_ITEM_HH + +#include "elem-group.hh" +#include "item.hh" + +class Horizontal_group_item : public Item, public Horizontal_group { + DECLARE_MY_RUNTIME_TYPEINFO; + SCORE_ELEM_CLONE(Horizontal_group_item); +protected: + virtual void do_breakable_col_processing(); + void OK()const; + virtual void do_print() const { Elbement_group::do_print(); } +}; + +#endif // HORIZONTAL_GROUP_ITEM_HH diff --git a/lily/include/ineq-constrained-qp.hh b/lily/include/ineq-constrained-qp.hh index 161bc51f46..d3cab9322c 100644 --- a/lily/include/ineq-constrained-qp.hh +++ b/lily/include/ineq-constrained-qp.hh @@ -31,6 +31,10 @@ public: */ void assert_solution(Vector sol) const; /// solve the problem using a projected gradient method + Vector constraint_solve(Vector)const; + /** + Solve it. First try it the easy way. + */ Vector solve(Vector start) const; /** diff --git a/lily/include/item.hh b/lily/include/item.hh index 6f3eb6a7cb..dcbae6374f 100644 --- a/lily/include/item.hh +++ b/lily/include/item.hh @@ -8,7 +8,7 @@ #ifndef ITEM_HH #define ITEM_HH -#include "glob.hh" + #include "boxes.hh" #include "string.hh" #include "score-elem.hh" @@ -40,11 +40,14 @@ public: Real hpos_f() const; DECLARE_MY_RUNTIME_TYPEINFO; virtual Line_of_score * line_l() const; + protected: virtual void do_breakable_col_processing(); virtual void handle_prebroken_dependencies(); virtual void do_print()const; + void copy_breakable_items(); + }; diff --git a/lily/include/line-group-grav.hh b/lily/include/line-group-grav.hh index e7153be0f5..2c3393806f 100644 --- a/lily/include/line-group-grav.hh +++ b/lily/include/line-group-grav.hh @@ -16,7 +16,7 @@ Engravers put elements on the same or lowel level in a line */ class Line_group_engraver : public Engraver{ - Line_of_staff *staffline_p_; + Vertical_group_spanner *staffline_p_; protected: virtual void do_creation_processing(); diff --git a/lily/include/line-spacer.hh b/lily/include/line-spacer.hh index c8bf02b48c..96ef38d42f 100644 --- a/lily/include/line-spacer.hh +++ b/lily/include/line-spacer.hh @@ -29,15 +29,16 @@ public: Paper_def *paper_l()const; Line_spacer(); - virtual Array error_pcol_l_arr() const=0; - /** solve the spacing problem - - @return the column positions, and the energy (last element) - */ - virtual Array solve() const=0; + virtual void solve(Col_hpositions *) const=0; + /** + Approximate the spacing problem: + return a lower bound on the energy + */ + virtual void lower_bound_solution(Col_hpositions *) const=0; + /** add a col to the problem. columns have to be added left to right. The column contains info on it's minimum width. */ virtual void add_column(PCol *, bool fixed=false, Real fixpos=0.0)=0; @@ -56,6 +57,7 @@ public: generate a solution which can't fail */ virtual Vector default_solution() const=0; + virtual void OK() const{} virtual void print() const{} diff --git a/lily/include/linespace.hh b/lily/include/linespace.hh index 587ecf912c..60e52bed6c 100644 --- a/lily/include/linespace.hh +++ b/lily/include/linespace.hh @@ -10,7 +10,7 @@ #ifndef LINESPACE_HH #define LINESPACE_HH -#include "glob.hh" + #include "plist.hh" #include "varray.hh" #include "vector.hh" diff --git a/lily/include/music-list.hh b/lily/include/music-list.hh index 8b26d3ee18..bcae7cff83 100644 --- a/lily/include/music-list.hh +++ b/lily/include/music-list.hh @@ -48,6 +48,10 @@ public: virtual MInterval time_int()const; }; +/** + The request is a collection of Requests. A note that you enter in mudela is + one Request_chord, one syllable of lyrics is one Request_chord + */ class Request_chord : public Chord { public: DECLARE_MY_RUNTIME_TYPEINFO; diff --git a/lily/include/p-col.hh b/lily/include/p-col.hh index 2b2266fb7a..136d25293c 100644 --- a/lily/include/p-col.hh +++ b/lily/include/p-col.hh @@ -1,7 +1,7 @@ #ifndef COLS_HH #define COLS_HH -#include "glob.hh" + #include "boxes.hh" #include "plist.hh" #include "item.hh" diff --git a/lily/include/performer.hh b/lily/include/performer.hh index 35911605d9..353f1f9b13 100644 --- a/lily/include/performer.hh +++ b/lily/include/performer.hh @@ -14,6 +14,10 @@ #include "score-elem-info.hh" #include "staff-info.hh" +/** + Convert a music definition into a audio representation. + A baseclass + */ class Performer { bool init_b_; public: diff --git a/lily/include/request.hh b/lily/include/request.hh index 9a7055bf8f..37bf51caa8 100644 --- a/lily/include/request.hh +++ b/lily/include/request.hh @@ -9,7 +9,7 @@ #ifndef REQUEST_HH #define REQUEST_HH -#include "glob.hh" + #include "string.hh" #include "moment.hh" #include "virtual-methods.hh" diff --git a/lily/include/score-elem-info.hh b/lily/include/score-elem-info.hh index 05c1413ddf..4e6b609ff2 100644 --- a/lily/include/score-elem-info.hh +++ b/lily/include/score-elem-info.hh @@ -14,7 +14,9 @@ #include "lily-proto.hh" #include "varray.hh" -/// data container. +/** + Data container for broadcasts + */ struct Score_elem_info { Score_elem * elem_l_; Request*req_l_; diff --git a/lily/include/score-elem.hh b/lily/include/score-elem.hh index 2adf9a8911..39c0615262 100644 --- a/lily/include/score-elem.hh +++ b/lily/include/score-elem.hh @@ -58,8 +58,8 @@ class Score_elem : private Directed_graph_node { public: PScore *pscore_l_; - int x_group_element_i_; - int y_group_element_i_; + Vertical_group *y_group_l_; + Horizontal_group *x_group_l_; Score_elem(Score_elem const&); virtual String TeX_string () const ; virtual void print() const; @@ -99,8 +99,19 @@ public: add a dependency. It may be the 0 pointer, in which case, it is ignored. */ void add_dependency(Score_elem* ); + void copy_dependencies(Score_elem const&); + /** + junk the dependency array. Don't do derived stuff. + */ + void junk_dependencies(); - + + /* + virtual accessors + */ + virtual Vertical_group * vertical_group() { return 0; } + virtual Horizontal_group * horizontal_group() { return 0; } + virtual Spanner* spanner() { return 0; } virtual Horizontal_vertical_group* elem_group() { return 0; } virtual Item * item() { return 0; } diff --git a/lily/include/scoreline.hh b/lily/include/scoreline.hh index ef95d6d078..abde4af7a2 100644 --- a/lily/include/scoreline.hh +++ b/lily/include/scoreline.hh @@ -17,7 +17,6 @@ public: bool error_mark_b_; virtual String TeX_string() const; - DECLARE_MY_RUNTIME_TYPEINFO; Line_of_score(); @@ -28,9 +27,9 @@ public: Link_array get_lines()const; void set_breaking(Array const&); - + protected: - virtual void break_into_pieces(); + virtual void break_into_pieces(bool); virtual Interval do_width()const; virtual void do_print() const; SCORE_ELEM_CLONE(Line_of_score); diff --git a/lily/include/spanner.hh b/lily/include/spanner.hh index f2afbfb241..30a72290c0 100644 --- a/lily/include/spanner.hh +++ b/lily/include/spanner.hh @@ -10,8 +10,6 @@ #include "lily-proto.hh" #include "score-elem.hh" - - /** a symbol which is attached between two columns. A spanner is a symbol which spans across several columns, so its final appearance can only be calculated after the breaking problem is solved. @@ -43,8 +41,13 @@ public: bool broken_b() const; Spanner* find_broken_piece(Line_of_score*)const; protected: + void set_my_columns(); SCORE_ELEM_CLONE(Spanner); - virtual void break_into_pieces(); + + /** + this is virtual; for instance, Line_of_score overrides it. + */ + virtual void break_into_pieces(bool); Link_array broken_into_l_arr_; diff --git a/lily/include/spring-spacer.hh b/lily/include/spring-spacer.hh index 55864615a2..85b828d2fa 100644 --- a/lily/include/spring-spacer.hh +++ b/lily/include/spring-spacer.hh @@ -13,10 +13,12 @@ #include "line-spacer.hh" #include "plist.hh" #include "col-info.hh" +#include "colhpos.hh" -/** the problem, given by the columns (which include constraints) and - intercolumn spacing. The problem is: - +/** + Determine positions of columns connected by springs and held apart by rods + + Generate a spacing which \begin{itemize} \item @@ -24,6 +26,7 @@ \item Looks good, ie tries to conform to an ideal spacing as much as possible. \end{itemize} + This is converted by regarding idealspacing as "springs" attached to columns. The equilibrium of one spring is the ideal distance. The columns have a size, this imposes "hard" constraints @@ -33,7 +36,7 @@ The quality is given by the total potential energy in the springs. The lower the energy, the better the configuration. - TODO: make item widths work per pstaff. + TODO: make item widths work per Staff. */ @@ -77,22 +80,24 @@ class Spring_spacer : public Line_spacer { void add_ideal(Idealspacing const *i); Vector try_initial_solution() const; void calc_idealspacing(); + void set_fixed_cols(Mixed_qp&)const; Score_column* scol_l(int); void connect(int i,int j, Real,Real); + Line_of_cols error_pcol_l_arr()const; public: static Line_spacer *constructor(); - Array error_pcol_l_arr() const; - virtual Array solve() const; - virtual void add_column(PCol *, bool fixed=false, Real fixpos=0.0); + virtual void solve(Col_hpositions*) const; + virtual void lower_bound_solution(Col_hpositions*) const; + virtual void add_column(PCol *, bool fixed=false, Real fixpos=0.0); virtual Vector default_solution() const; - virtual bool check_constraints(Vector v) const; - virtual void OK() const; - virtual void print() const; - virtual void prepare(); + virtual bool check_constraints(Vector v) const; + virtual void OK() const; + virtual void print() const; + virtual void prepare(); virtual ~Spring_spacer(){} }; diff --git a/lily/include/vertical-group-spanner.hh b/lily/include/vertical-group-spanner.hh new file mode 100644 index 0000000000..d092d96488 --- /dev/null +++ b/lily/include/vertical-group-spanner.hh @@ -0,0 +1,35 @@ +/* + vertical-group-spanner.hh -- declare Vertical_group_spanner + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + + +#ifndef SPAN_VERTICAL_GROUP_HH +#define SPAN_VERTICAL_GROUP_HH + +#include "spanner.hh" +#include "elem-group.hh" + +/** An element which groups a line. Due to technical problems, this + cannot be used as a baseclass */ +class Vertical_group_spanner : public Spanner, public Vertical_group +{ +protected: + virtual void do_break_processing(); + virtual void do_print()const; + VIRTUAL_COPY_CONS(Vertical_group_spanner, Score_elem); + +private: + void remove_all(); + /// shouldn't be copied. + Vertical_group_spanner(Vertical_group_spanner const&); + +public: + Vertical_group_spanner(); + DECLARE_MY_RUNTIME_TYPEINFO; +}; + +#endif // SPAN_VERTICAL_GROUP_HH diff --git a/lily/include/word-wrap.hh b/lily/include/word-wrap.hh index b7b7d42cfa..6f16af30c8 100644 --- a/lily/include/word-wrap.hh +++ b/lily/include/word-wrap.hh @@ -15,7 +15,7 @@ /// wordwrap type algorithm: move to next line if current is optimal. struct Word_wrap : Break_algorithm { virtual Array do_solve()const; - Word_wrap(PScore&); + Word_wrap(); }; #endif // WORD_WRAP_HH diff --git a/lily/ineq-constrained-qp.cc b/lily/ineq-constrained-qp.cc index 56d9a555ad..204c6a4b51 100644 --- a/lily/ineq-constrained-qp.cc +++ b/lily/ineq-constrained-qp.cc @@ -7,8 +7,9 @@ */ #include "ineq-constrained-qp.hh" #include "qlpsolve.hh" -#include "const.hh" #include "debug.hh" +#include "choleski.hh" + /* MAy be this also should go into a library */ @@ -75,14 +76,14 @@ Ineq_constrained_qp::eval (Vector v) int min_elt_index(Vector v) { - Real m=INFTY_f; + Real m=infinity_f; int idx=-1; for (int i = 0; i < v.dim(); i++){ if (v(i) < m) { idx = i; m = v(i); } - assert(v(i) <= INFTY_f); + assert(v(i) <= infinity_f); } return idx; } @@ -102,24 +103,24 @@ min_elt_index(Vector v) */ Vector -Ineq_constrained_qp::solve(Vector start) const +Ineq_constrained_qp::constraint_solve(Vector start) const { if (!dim()) return Vector(0); + // experimental -// quad.try_set_band(); + if (quad.dim() > 10) + quad.try_set_band(); Active_constraints act(this); - - act.OK(); Vector x(start); Vector gradient=quad*x+lin; -// Real fvalue = x*quad*x/2 + lin*x + const_term; -// it's no use. - + // Real fvalue = x*quad*x/2 + lin*x + const_term; + // it's no use. + Vector last_gradient(gradient); int iterations=0; @@ -131,15 +132,15 @@ Ineq_constrained_qp::solve(Vector start) const if (direction.norm() > EPS) { mtor << act.status() << '\n'; - Real minalf = INFTY_f; + Real minalf = infinity_f; Inactive_iter minidx(act); /* - we know the optimum on this "hyperplane". Check if we - bump into the edges of the simplex - */ + we know the optimum on this "hyperplane". Check if we + bump into the edges of the simplex + */ for (Inactive_iter ia(act); ia.ok(); ia++) { @@ -197,3 +198,14 @@ Ineq_constrained_qp::solve(Vector start) const } +Vector +Ineq_constrained_qp::solve(Vector start)const +{ + /* no hassle if no constraints*/ + if ( ! cons.size() ) { + Choleski_decomposition chol( quad ); + return - chol.solve(lin); + } else { + return constraint_solve( start ); + } +} diff --git a/lily/input-translator.cc b/lily/input-translator.cc index 748f516bd5..47e93160fb 100644 --- a/lily/input-translator.cc +++ b/lily/input-translator.cc @@ -27,6 +27,8 @@ void Input_translator::print() const { #ifndef NPRINT + if ( ! check_debug) + return ; mtor << base_str_ <<" " << type_str_<<" {\n"; mtor << "Consists of "; for (int i=0; i< consists_str_arr_.size(); i++) diff --git a/lily/item.cc b/lily/item.cc index 2481e4a350..083798be00 100644 --- a/lily/item.cc +++ b/lily/item.cc @@ -5,20 +5,20 @@ (c) 1997 Han-Wen Nienhuys */ + #include "p-score.hh" #include "debug.hh" #include "item.hh" #include "p-col.hh" +#include "elem-group.hh" Item::Item() { pcol_l_ = 0; - broken_to_a_[0] = broken_to_a_[1]=0; } - IMPLEMENT_IS_TYPE_B1(Item, Score_elem); void @@ -58,6 +58,23 @@ Item::break_status_i() const return 1; } +void +Item::copy_breakable_items() +{ + for (int i=0; i < 2; i++) { + Item * item_p = clone()->item(); + item_p->copy_dependencies(*this); + /* add our pre and postbreaks blondly to our own y_group + Let Vertical_group_spanner figure out the mess. + */ + if ( y_group_l_ ) + y_group_l_->add_element( item_p ); + pscore_l_->typeset_item(item_p, pcol_l_, -1+ 2*i); + item_p->handle_prebroken_dependencies(); + broken_to_a_[i] = item_p; + } +} + void Item::do_breakable_col_processing() { @@ -65,12 +82,7 @@ Item::do_breakable_col_processing() if (!c->breakable_b()) return; - for (int i=0; i < 2; i++) { - broken_to_a_[i] = clone()->item(); - pscore_l_->typeset_item(broken_to_a_[i], c, -1+ 2*i); - broken_to_a_[i]->handle_prebroken_dependencies(); - } - + copy_breakable_items(); handle_prebroken_dependencies(); } diff --git a/lily/keyword.cc b/lily/keyword.cc index 965630964e..1e4385f14a 100644 --- a/lily/keyword.cc +++ b/lily/keyword.cc @@ -4,10 +4,7 @@ #include -#include "glob.hh" #include "my-lily-lexer.hh" -//#include "mudobs.hh" -//#include "gram.hh" /* for the keyword table */ struct Keyword_ent diff --git a/lily/line-group-grav.cc b/lily/line-group-grav.cc index 843fa5b551..2e4b506335 100644 --- a/lily/line-group-grav.cc +++ b/lily/line-group-grav.cc @@ -7,12 +7,12 @@ */ #include "staff-sym.hh" -#include "line-group-grav.hh" +#include "vertical-group-spanner.hh" #include "command-request.hh" #include "bar.hh" #include "debug.hh" #include "staffline.hh" - +#include "line-group-grav.hh" Line_group_engraver::Line_group_engraver() { @@ -22,7 +22,8 @@ Line_group_engraver::Line_group_engraver() void Line_group_engraver::acknowledge_element(Score_elem_info elem) { - staffline_p_->add_element(elem.elem_l_); + if ( !elem.elem_l_->y_group_l_ ) + staffline_p_->add_element(elem.elem_l_); } @@ -37,7 +38,7 @@ Line_group_engraver::do_removal_processing() void Line_group_engraver::do_creation_processing() { - staffline_p_ = new Line_of_staff; + staffline_p_ = new Vertical_group_spanner ; staffline_p_->left_col_l_ = get_staff_info().command_pcol_l(); // don't broadcast to self. diff --git a/lily/line-spacer.cc b/lily/line-spacer.cc index bc5ef29f34..3729744ec0 100644 --- a/lily/line-spacer.cc +++ b/lily/line-spacer.cc @@ -16,7 +16,5 @@ Line_spacer::Line_spacer() Paper_def* Line_spacer::paper_l()const { - - return paper_l_ ; } diff --git a/lily/lookup.cc b/lily/lookup.cc index 9a0c8c7093..6bc298e147 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -47,9 +47,11 @@ Lookup::add(String s, Symtable*p) void Lookup::print()const { + #ifndef NPRINT mtor << "Lookup: " << texsetting << " {\n"; symtables_->print(); mtor << "}\n"; + #endif } Symbol diff --git a/lily/misc.cc b/lily/misc.cc index 093af7f0d4..5ee56d8045 100644 --- a/lily/misc.cc +++ b/lily/misc.cc @@ -1,27 +1,17 @@ +/* + misc.cc -- implement various stuff + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + #include #include "item.hh" #include "misc.hh" -#include "glob.hh" #include "moment.hh" - -// depreciated, see struct Duration* -Moment -wholes(int dur, int dots) -{ - if (!dur) - return 0; - - Moment f = Rational(1)/Moment(dur); - Moment delta = f; - - while (dots--) { - delta /= 2.0; - f += delta; - } - return f; -} int intlog2(int d) { int i=0; @@ -38,6 +28,7 @@ log_2(double x) { return log(x) /log(2.0); } +#if 1 Interval itemlist_width(const Array &its) { @@ -51,3 +42,4 @@ itemlist_width(const Array &its) return iv; } +#endif diff --git a/lily/molecule.cc b/lily/molecule.cc index 2c946484c8..ee4fe5e485 100644 --- a/lily/molecule.cc +++ b/lily/molecule.cc @@ -129,8 +129,12 @@ Molecule::Molecule(Molecule const &s) void Molecule::print() const { +#ifndef NPRINT + if (! check_debug) + return; for (iter_top(ats,c); c.ok(); c++) c->print(); +#endif } void diff --git a/lily/music-iterator.cc b/lily/music-iterator.cc index 09ee833db0..25e5f2b63f 100644 --- a/lily/music-iterator.cc +++ b/lily/music-iterator.cc @@ -29,6 +29,8 @@ void Music_iterator::print() const { #ifndef NPRINT + if ( !check_debug) + return ; mtor << name() << "{"; mtor << "report to " << report_to_l() << " (" << report_to_l()->name() << ")\n"; @@ -200,8 +202,6 @@ Chord_iterator::process_and_next(Moment until) i++; } Music_iterator::process_and_next(until); - -// assert(!ok() || next_moment() > until); } @@ -210,7 +210,7 @@ IMPLEMENT_IS_TYPE_B1(Chord_iterator,Music_iterator); Moment Chord_iterator::next_moment()const { - Moment next_ = INFTY_f; + Moment next_ = infinity_mom; for (PCursor i(children_p_list_.top()); i.ok(); i++) next_ = next_ next_moment() ; return next_; diff --git a/lily/music-list.cc b/lily/music-list.cc index 4952096697..bd1cef64d8 100644 --- a/lily/music-list.cc +++ b/lily/music-list.cc @@ -27,12 +27,12 @@ IMPLEMENT_IS_TYPE_B1(Chord,Music_list); MInterval Chord::time_int()const { -// MInterval m( -(Real)INT_MAX, (Real)INT_MAX ); - MInterval m( 0, 0 ); + MInterval m; for (iter(music_p_list_.top(), i); i.ok(); i++) m.unite(i->time_int()); return m; } + void Chord::translate(Moment m) { diff --git a/lily/music.cc b/lily/music.cc index 4949e2737b..7bc52fcd42 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -21,6 +21,8 @@ void Music::print()const { #ifndef NPRINT + if ( ! check_debug) + return ; mtor << name() << "{"; if (type_str_!="" || id_str_!="") mtor << "`" <print(); mtor << "\n elements: "; @@ -203,9 +207,27 @@ PScore::set_breaking(Array const &breaking) void PScore::calc_breaking() { - Word_wrap w(*this); - - set_breaking(w.solve()); + Break_algorithm *algorithm_p; + Array sol; + bool try_wrap = ! paper_l_->get_var( "castingalgorithm"); + + if (!try_wrap) { + algorithm_p = new Gourlay_breaking ; + algorithm_p->set_pscore(this); + sol = algorithm_p->solve(); + delete algorithm_p; + if ( ! sol.size()) { + error ( "Can not solve this casting problem exactly; revert to Word_wrap"); + try_wrap = true; + } + } + if (try_wrap) { + algorithm_p = new Word_wrap; + algorithm_p->set_pscore(this); + sol = algorithm_p->solve(); + delete algorithm_p; + } + set_breaking(sol); } void diff --git a/lily/parser.y b/lily/parser.y index 67acc1d8ae..d494a11a48 100644 --- a/lily/parser.y +++ b/lily/parser.y @@ -441,7 +441,7 @@ paper_body: | paper_body STRING '=' dim ';' { $$->set_var(*$2, $4); } - | paper_body STRING '=' REAL ';' { + | paper_body STRING '=' real ';' { $$->set_var(*$2, $4); } | paper_body input_translator_spec { diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index 66471128e2..55c5e18994 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -167,6 +167,8 @@ void Performer_group_performer::do_print()const { #ifndef NPRINT + if ( !check_debug) + return ; for ( PCursor i( perf_p_list_.top() ); i.ok(); i++ ) i->print(); #endif diff --git a/lily/qlp.cc b/lily/qlp.cc index 833a76f4e4..fd235d6df2 100644 --- a/lily/qlp.cc +++ b/lily/qlp.cc @@ -7,10 +7,7 @@ */ #include "debug.hh" -#include "const.hh" #include "qlp.hh" -#include "choleski.hh" - void Mixed_qp::add_equality_cons(Vector , double ) diff --git a/lily/qlpsolve.cc b/lily/qlpsolve.cc index 31ec4a85b4..46f0ce64f4 100644 --- a/lily/qlpsolve.cc +++ b/lily/qlpsolve.cc @@ -11,11 +11,10 @@ #include "ineq-constrained-qp.hh" #include "qlpsolve.hh" -#include "const.hh" #include "debug.hh" #include "choleski.hh" -const Real TOL=1e-2; // roughly 1/10 mm +const Real TOL=1e-1; // roughly 1/30 mm String Active_constraints::status() const @@ -63,9 +62,7 @@ Active_constraints::OK() Vector Active_constraints::get_lagrange(Vector gradient) { - Vector l(A*gradient); - - return l; + return (A*gradient); } void @@ -121,8 +118,9 @@ Active_constraints::drop(int k) */ Real q = a*opt->quad*a; - H += Matrix(a,a/q); - A -= A*opt->quad*Matrix(a,a/q); + Matrix aaq(a,a/q); + H += aaq; + A -= A*opt->quad*aaq; }else WARN << "degenerate constraints"; #ifndef NDEBUG @@ -142,6 +140,10 @@ Active_constraints::Active_constraints(Ineq_constrained_qp const *op) for (int i=0; i < op->cons.size(); i++) inactive.push(i); Choleski_decomposition chol(op->quad); + + /* + ugh. + */ H=chol.inverse(); OK(); } diff --git a/lily/score-align-grav.cc b/lily/score-align-grav.cc index f284563237..babf47bd32 100644 --- a/lily/score-align-grav.cc +++ b/lily/score-align-grav.cc @@ -7,7 +7,7 @@ */ -#include "elem-group-item.hh" +#include "horizontal-group-item.hh" #include "score-align-grav.hh" #include "item.hh" diff --git a/lily/score-elem.cc b/lily/score-elem.cc index c95817d9fd..3e945a5e2b 100644 --- a/lily/score-elem.cc +++ b/lily/score-elem.cc @@ -67,18 +67,22 @@ Score_elem::TeX_string() const } - -Score_elem::Score_elem(Score_elem const&s) +void +Score_elem::copy_dependencies(Score_elem const &s) { - transparent_b_ = s.transparent_b_; - empty_b_ = s.empty_b_; /* called from derived ctor, so most info points to the same deps as (Directed_graph_node&)s. Nobody points to us, so don't copy dependents. */ copy_edges_out(s); - x_group_element_i_ = 0; - y_group_element_i_ = 0; +} + +Score_elem::Score_elem(Score_elem const&s) +{ + transparent_b_ = s.transparent_b_; + empty_b_ = s.empty_b_; + x_group_l_ = 0; + y_group_l_ = 0; status_ = s.status_; assert(!s.output); output = 0; @@ -93,7 +97,7 @@ Score_elem::~Score_elem() delete output; status_ = DELETED; output = 0; - assert(!x_group_element_i_ && !y_group_element_i_); + } void @@ -192,8 +196,8 @@ Score_elem::print()const Score_elem::Score_elem() { transparent_b_ = empty_b_ = false; - x_group_element_i_ = 0; - y_group_element_i_ =0; + x_group_l_ = 0; + y_group_l_ =0; pscore_l_=0; offset_ = Offset(0,0); output = 0; @@ -240,7 +244,10 @@ Score_elem::breakable_col_processing() if (status_ >= PREBROKEN ) return; - assert(status_ != PREBREAKING); // cyclic dependency + if(status_== PREBREAKING) { + status_ = PREBROKEN; + return ; + } status_ = PREBREAKING; for (int i=0; i < dependency_size(); i++) @@ -257,7 +264,10 @@ Score_elem::break_processing() if (status_ >= BROKEN ) return; - assert(status_ != BREAKING); // cyclic dependency + if (status_ == BREAKING) { + status_ = BROKEN; + return; + } status_ = BREAKING; for (int i=0; i < dependency_size(); i++) @@ -266,6 +276,7 @@ Score_elem::break_processing() do_break_processing(); status_ = BROKEN; + } void @@ -338,8 +349,13 @@ Score_elem::do_substitute_dependency(Score_elem*,Score_elem*) { } void -Score_elem::do_substitute_dependent(Score_elem*,Score_elem*) +Score_elem::do_substitute_dependent(Score_elem*o,Score_elem*n) { + if ( o== y_group_l_ ) { + y_group_l_ = n ? n->vertical_group() : 0; + } else if (o == x_group_l_ ) { + x_group_l_ = n ? n->horizontal_group() : 0; + } } @@ -387,6 +403,14 @@ Score_elem::substitute_dependency(Score_elem* old, Score_elem* new_l) old->do_substitute_dependent(this, 0); } +void +Score_elem::junk_dependencies() +{ + while ( dependency_size() ) { + remove_edge_out( dependency( 0 )); + } +} + void Score_elem::handle_broken_dependencies() { @@ -421,10 +445,6 @@ Score_elem::handle_broken_dependencies() for (int i=0; i unlink_all(); junk_links(); - y_group_element_i_ = 0; - x_group_element_i_ = 0; + y_group_l_ = 0; + x_group_l_ = 0; } void diff --git a/lily/score.cc b/lily/score.cc index 531c120f99..861bf4b00f 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -58,7 +58,7 @@ Score::run_translator(Global_translator * trans_l) trans_l->start(); while ( iter->ok() || trans_l->moments_left_i() ) { - Moment w = INFTY_f; + Moment w = infinity_mom; if (iter->ok() ) { w = iter->next_moment(); iter->print(); diff --git a/lily/scoreline.cc b/lily/scoreline.cc index 64a7df296d..d4951dbb83 100644 --- a/lily/scoreline.cc +++ b/lily/scoreline.cc @@ -101,6 +101,7 @@ Line_of_score::set_breaking(Array const &breaking) if (breaking.size() >1) { line_p = (Line_of_score*)clone()->spanner(); + line_p->copy_dependencies( *this ); line_l = line_p; } else line_l = this; @@ -122,7 +123,7 @@ Line_of_score::set_breaking(Array const &breaking) } void -Line_of_score::break_into_pieces() +Line_of_score::break_into_pieces(bool) { } @@ -131,7 +132,7 @@ Line_of_score::get_lines()const { Link_array ret; - if(broken_into_l_arr_.size()) + if (broken_into_l_arr_.size()) for (int i=0; i < broken_into_l_arr_.size(); i++) { ret.push((Line_of_score*)broken_into_l_arr_[i]); } diff --git a/lily/spanner.cc b/lily/spanner.cc index 1ca347172b..0039caefb5 100644 --- a/lily/spanner.cc +++ b/lily/spanner.cc @@ -19,14 +19,11 @@ Spanner::do_print()const { #ifndef NPRINT mtor << "Between col "; -// huh? this does not work -// mtor << ( left_col_l_ ? left_col_l_->rank_i() : "nop" ); if ( left_col_l_ ) mtor << left_col_l_->rank_i(); else mtor << "nop"; mtor << ", "; -// mtor << ( right_col_l_ ? right_col_l_->rank_i() : "nop" ); if ( right_col_l_ ) mtor << right_col_l_->rank_i(); else @@ -37,7 +34,7 @@ Spanner::do_print()const } void -Spanner::break_into_pieces() +Spanner::break_into_pieces(bool copy_deps_b) { PCol * left = left_col_l_; PCol * right = right_col_l_; @@ -53,6 +50,8 @@ Spanner::break_into_pieces() for (int i=1; i < break_cols.size(); i++) { Spanner* span_p = clone()->spanner(); + if (copy_deps_b) + span_p->copy_dependencies( *this ); left = break_cols[i-1]; right = break_cols[i]; if (!right->line_l_) @@ -68,21 +67,26 @@ Spanner::break_into_pieces() pscore_l_->typeset_broken_spanner(span_p); broken_into_l_arr.push( span_p ); } - + broken_into_l_arr_ = broken_into_l_arr; } void -Spanner::do_break_processing() +Spanner::set_my_columns() { - if (!left_col_l_->line_l_) + if (!left_col_l_->line_l_) left_col_l_ = left_col_l_->postbreak_p_; if (!right_col_l_->line_l_) right_col_l_ = right_col_l_->prebreak_p_; - +} + +void +Spanner::do_break_processing() +{ + set_my_columns(); if (!line_l()) { - break_into_pieces(); + break_into_pieces(true); for (int i=0; i < broken_into_l_arr_.size(); i++) broken_into_l_arr_[i]->handle_broken_dependencies(); } else { diff --git a/lily/spring-spacer.cc b/lily/spring-spacer.cc index 7684e5de5f..81196d6b24 100644 --- a/lily/spring-spacer.cc +++ b/lily/spring-spacer.cc @@ -19,7 +19,8 @@ #include "score-column.hh" #include "paper-def.hh" #include "dimen.hh" -#include "minterval.hh" +#include "colhpos.hh" + Vector Spring_spacer::default_solution()const @@ -96,8 +97,8 @@ Spring_spacer::position_loose_cols(Vector &sol_vec)const assert(sol_vec.dim()); Array fix_b_arr; fix_b_arr.set_size(cols.size() + loose_col_arr_.size()); - Real utter_right_f=-INFTY_f; - Real utter_left_f =INFTY_f; + Real utter_right_f=-infinity_f; + Real utter_left_f =infinity_f; for (int i=0; i < loose_col_arr_.size(); i++) { fix_b_arr[loose_col_arr_[i].rank_i_] = false; } @@ -235,6 +236,16 @@ Spring_spacer::make_matrices(Matrix &quad, Vector &lin, Real &c) const } } +void +Spring_spacer::set_fixed_cols(Mixed_qp &qp)const +{ + for (int j=0; j < cols.size(); j++) + if (cols[j].fixed()) + qp.add_fixed_var(j,cols[j].fixed_position()); + + +} + // put the constraints into the LP problem void Spring_spacer::make_constraints(Mixed_qp& lp) const @@ -242,9 +253,6 @@ Spring_spacer::make_constraints(Mixed_qp& lp) const int dim=cols.size(); for (int j=0; j < dim; j++) { Colinfo c=cols[j]; - if (c.fixed()) { - lp.add_fixed_var(j,c.fixed_position()); - } if (j > 0){ Vector c1(dim); @@ -256,26 +264,44 @@ Spring_spacer::make_constraints(Mixed_qp& lp) const } } -Array -Spring_spacer::solve() const +void +Spring_spacer::lower_bound_solution(Col_hpositions*positions)const +{ + Mixed_qp lp(cols.size()); + make_matrices(lp.quad,lp.lin, lp.const_term); + set_fixed_cols(lp); + + Vector start(cols.size()); + start.fill(0.0); + Vector solution_vec(lp.solve(start)); + + positions->energy_f_ = lp.eval(solution_vec); + positions->config = solution_vec; + positions->satisfies_constraints_b_ = check_constraints(solution_vec); +} + +void +Spring_spacer::solve(Col_hpositions*positions) const { assert(check_feasible()); Mixed_qp lp(cols.size()); make_matrices(lp.quad,lp.lin, lp.const_term); make_constraints(lp); + set_fixed_cols(lp); Vector start=find_initial_solution(); - Vector sol(lp.solve(start)); - if (!check_constraints(sol)) { - WARN << "solution doesn't satisfy constraints.\n" ; - } - Real energy_f =lp.eval(sol); - position_loose_cols(sol); + Vector solution_vec(lp.solve(start)); - Array posns(sol); - posns.push(energy_f); - return posns; + positions->satisfies_constraints_b_ = check_constraints(solution_vec); + if (!positions->satisfies_constraints_b_) { + WARN << "solution doesn't satisfy constraints.\n" ; + } + position_loose_cols(solution_vec); + positions->energy_f_ = lp.eval(solution_vec); + positions->config = solution_vec; + positions->error_col_l_arr_ = error_pcol_l_arr(); + } /** @@ -292,7 +318,7 @@ Spring_spacer::add_column(PCol *col, bool fixed, Real fixpos) cols.push(c); } -Array +Line_of_cols Spring_spacer::error_pcol_l_arr()const { Array retval; @@ -445,7 +471,7 @@ Spring_spacer::calc_idealspacing() } if ( d_iter.ok() && now >= d_iter.when()) { Durations_iter d2 = d_iter; - Moment shortest = (Real)INT_MAX; //ugh INFTY; + Moment shortest = infinity_mom; while (d2.ok() && d2.when() <= now) { shortest = shortest musical_b()) { - ideal_arr_[i] = cols[i].minright() + 2 PT; - hooke_arr_[i] = 2.0; + Real symbol_distance =cols[i].minright() + 2 PT; + Real durational_distance = 0; + if (i+1 < cols.size()) { Moment delta_t = scol_l(i+1)->when() - scol_l(i)->when() ; - Real dist = delta_t ? paper_l()->duration_to_dist(delta_t) : 0; - if (delta_t && dist > ideal_arr_[i]) - ideal_arr_[i] = dist; + if (delta_t) + durational_distance = paper_l()->duration_to_dist(delta_t) ; + symbol_distance += cols[i+1].minleft(); } + + ideal_arr_[i] = symbol_distance >? durational_distance; + hooke_arr_[i] = 2.0; } } for (int i=0; i < cols.size(); i++) { @@ -495,11 +525,14 @@ Spring_spacer::calc_idealspacing() dist *= delta_t / shortest_len; if (!scol_l(i+1)->musical_b() ) { - if (ideal_arr_[i+1] + cols[i+1].minleft() < dist) { - ideal_arr_[i+1] = dist/2 + cols[i+1].minleft(); - hooke_arr_[i+1] =1.0; - } - ideal_arr_[i] = dist/2; + Real minimum_dist = cols[i+1].minleft() + 2 PT + cols[i].minright() ; + if (ideal_arr_[i+1] + minimum_dist < dist) { + ideal_arr_[i] = dist - ideal_arr_[i+1]; + // hooke_arr_[i+1] =1.0; + } else { + ideal_arr_[i] = minimum_dist; + } + } else ideal_arr_[i] = dist; } @@ -509,7 +542,6 @@ Spring_spacer::calc_idealspacing() assert (ideal_arr_[i] >=0 && hooke_arr_[i] >=0); connect(i, i+1, ideal_arr_[i], hooke_arr_[i]); } - } @@ -527,56 +559,4 @@ Spring_spacer::constructor() { return new Spring_spacer; } - -#if 0 -void obsolete() -{ - for (int i=0; i < cols.size(); i++) { - if (!scol_l(i)->used_b()) - continue; - - - int j = i+1; - - if (scol_l(i)->musical_b()) { - assert ( j < cols.size()); - - for (int n=0; n < scol_l(i)->durations.size(); n++) { - Moment d = scol_l(i)->durations[n]; - Real dist = paper_l()->duration_to_dist(d); - Real strength = scol_l(i)->durations[0]/scol_l(i)->durations[n]; - assert(strength <= 1.0); - - while (j < cols.size()) { - if (scol_l(j)->used_b() - && scol_l(j)->when() >= d + scol_l(i)->when() ) - break; - j++; - } - if ( j < cols.size() ){ - Moment delta_desired = scol_l(j)->when() - (d+scol_l(i)->when()); - dist += paper_l()->duration_to_dist(delta_desired); - if (scol_l(j)->musical_b()) { - dist += cols[j].minleft() + 2 PT; - } - connect(i, j, dist, strength); - } - } - } else if (j < cols.size()) { - while (!scol_l(j)->used_b()) - j++; - - /* attach i to the next column in use. This exists, since - the last col is breakable, and therefore in use - */ - - Moment d = scol_l(j)->when() - scol_l(i)->when(); - Real minimal_f = cols[i].minright() +cols[j].minleft() + 2 PT; - Real durdist_f = (d) ? paper_l()->duration_to_dist(d) : 0; // todo - - connect(i, j, minimal_f y_group_element_i_) - Horizontal_vertical_group::add_element(elem_l); -} diff --git a/lily/template2.cc b/lily/template2.cc index 385fc14160..b09b378aee 100644 --- a/lily/template2.cc +++ b/lily/template2.cc @@ -1,13 +1,13 @@ /* - template2.cc -- instantiate some list templates. + template2.cc -- Instantiate some list templates. source file of the GNU LilyPond music typesetter (c) 1997 Han-Wen Nienhuys */ -#include "score-column.hh" +#include "line-spacer.hh" #include "plist.tcc" #include "pcursor.tcc" -IPL_instantiate(Score_column); +IPL_instantiate(Line_spacer); diff --git a/lily/template5.cc b/lily/template5.cc index bffae6d080..e57925bf5b 100644 --- a/lily/template5.cc +++ b/lily/template5.cc @@ -17,25 +17,9 @@ Interval__instantiate(Rational); Interval__instantiate(int); -const Real INFTY_f = (Real)INT_MAX; -#if defined AIX || defined _WIN32 -const Real INFTY = 1e8; // ARGh. AIX sucks -- so does doze -#else -const Real INFTY = HUGE_VAL; -#endif - Rational Interval_t::infinity() { -/* - windhoze-suck-suck-suck-suck-suck-thank-you-cygnus - - I get tired of all these incompatibilities. We'll just assume: - - that 2^31 is *Big* - - */ - return Rational(INT_MAX); } diff --git a/lily/tex.cc b/lily/tex.cc index 3b8fe8aa20..470dd49ea6 100644 --- a/lily/tex.cc +++ b/lily/tex.cc @@ -1,7 +1,14 @@ +/* + tex.cc -- implement TeX related misc functions + + source file of the GNU LilyPond music typesetter + + (c) 1996,1997 Han-Wen Nienhuys +*/ + #include "dimen.hh" #include "tex.hh" #include "symbol.hh" -#include "const.hh" #include "varray.hh" String diff --git a/lily/vertical-align-grav.cc b/lily/vertical-align-grav.cc index 83cfae7acc..c6690f6ef1 100644 --- a/lily/vertical-align-grav.cc +++ b/lily/vertical-align-grav.cc @@ -36,7 +36,7 @@ Vertical_align_engraver::acknowledge_element(Score_elem_info i) { if ( i.origin_grav_l_arr_.size() == 2 && i.elem_l_->is_type_b(Vertical_group::static_name()) && - !i.elem_l_->y_group_element_i_ ) { + !i.elem_l_->y_group_l_ ) { assert( !valign_p_->contains_b( i.elem_l_) ); valign_p_->add ( i.elem_l_ ); diff --git a/lily/vertical-group-spanner.cc b/lily/vertical-group-spanner.cc new file mode 100644 index 0000000000..d858349ca5 --- /dev/null +++ b/lily/vertical-group-spanner.cc @@ -0,0 +1,104 @@ +/* + vertical-group-spanner.cc -- implement Vertical_group_spanner + + source file of the GNU LilyPond music typesetter + + (c) 1997 Han-Wen Nienhuys +*/ + +#include "vertical-group-spanner.hh" +#include "item.hh" +#include "p-col.hh" + +/** + Uncouple all elements of this Vertical_group. Ugh! + */ +void +Vertical_group_spanner::remove_all() +{ + for (int i=0; i < elem_l_arr_.size(); i++){ + elem_l_arr_[i]->y_group_l_ = 0; + } + elem_l_arr_.set_size(0); + junk_dependencies(); +} + +void +Vertical_group_spanner::do_break_processing() +{ + set_my_columns(); + if ( line_l() ) { + return; + } + break_into_pieces( false ); + + Link_array elem_l_arr = elem_l_arr_; + remove_all(); + + + + for (int i=0; i < elem_l_arr.size(); i++) { + Score_elem * elt = elem_l_arr[i]; + Line_of_score *elt_line = elt->line_l(); + + if ( elt-> y_group_l_ ) + continue; + + if ( ! elt_line ){ + if (elt->spanner()) { + Spanner * sp = elt->spanner(); + + for (int j =0; j < broken_into_l_arr_.size(); j++) { + Vertical_group_spanner * my_broken_l + = (Vertical_group_spanner*)broken_into_l_arr_[j]; + + Spanner * broken_span_l + = sp->find_broken_piece(my_broken_l->line_l()); + + if (broken_span_l) { + my_broken_l->add_element(broken_span_l ); + } + } + } else if (elt->item() && elt->item()->pcol_l_->breakpoint_b() + && elt->item()->break_status_i() == 0) { + for (int j =0; j < 2; j++) { + Item * my_item = elt->item()->broken_to_a_[j]; + Line_of_score * item_line_l_ = my_item->line_l() ; + if ( ! item_line_l_ ) + continue; + + Vertical_group_spanner * v + = (Vertical_group_spanner*)find_broken_piece( item_line_l_); + if (v) { + v->add_element( my_item ); + } + } + } + } else { + Vertical_group_spanner * my_broken_l + = (Vertical_group_spanner*)find_broken_piece( elt->line_l() ); + my_broken_l->add_element( elt ); + } + } + for (int j =0; j < broken_into_l_arr_.size(); j++) + broken_into_l_arr_[j]->break_processing(); +} + +Vertical_group_spanner::Vertical_group_spanner() +{ +} + +void +Vertical_group_spanner::do_print() const +{ + Vertical_group::do_print(); +} + + + +IMPLEMENT_IS_TYPE_B2(Vertical_group_spanner, Spanner, Vertical_group); + +Vertical_group_spanner::Vertical_group_spanner(Vertical_group_spanner const &s) + : Spanner(s), Vertical_group(s) +{ +} diff --git a/lily/wordwrap.cc b/lily/word-wrap.cc similarity index 72% rename from lily/wordwrap.cc rename to lily/word-wrap.cc index 7d25bb9e94..a2ac4e9ff8 100644 --- a/lily/wordwrap.cc +++ b/lily/word-wrap.cc @@ -1,5 +1,5 @@ /* - wordwrap.cc -- implement Word_wrap + word-wrap.cc -- implement Word_wrap source file of the LilyPond music typesetter @@ -13,17 +13,19 @@ #include "spring-spacer.hh" -/** el stupido. This should be done more accurately: - - It would be nice to have a Dynamic Programming type of algorithm - similar to TeX's +/** el stupido. + + A Dynamic Programming type of algorithm + similar to TeX's is in Gourlay_breaking + */ Array Word_wrap::do_solve()const { problem_OK(); - iter_top(pscore_l_->col_p_list_,curcol); + + PCursor curcol(pscore_l_->col_p_list_.top()); Array breaking; Line_of_cols breakpoints(find_breaks()); assert(breakpoints.size()>=2); @@ -40,7 +42,7 @@ Word_wrap::do_solve()const break_idx_i++; while (break_idx_i < breakpoints.size()) { - + // add another measure. while (breakpoints[break_idx_i] != curcol.ptr()){ current.add(curcol); @@ -48,24 +50,30 @@ Word_wrap::do_solve()const } current.add(breakpoints[break_idx_i]->prebreak_p_ ); + current.spacer_l_ = generate_spacing_problem( current.cols ); + // try to solve if (!feasible(current.cols)) { if (!minimum.cols.size()) { warning("Ugh, this measure is too long, breakpoint: " + String(break_idx_i) + " (generating stupido solution)"); - current = stupid_solution(current.cols); - current.energy = - 1; // make sure we break out. + current.stupid_solution(); + current.energy_f_ = - 1; // make sure we break out. } else - current.energy = INFTY_f; // make sure we go back + current.energy_f_ = infinity_f; // make sure we go back } else { - current = solve_line(current.cols); + + current.solve_line(); current.print(); } + delete current.spacer_l_; + current.spacer_l_ =0; + // update minimum, or backup. - if (current.energy < minimum.energy || current.energy < 0) { - minimum = current; + if (current.energy_f_ < minimum.energy_f_ || current.energy_f_ < 0) { + minimum = current; } else { // we're one col too far. break_idx_i--; while (curcol.ptr() != breakpoints[break_idx_i]) @@ -83,12 +91,11 @@ Word_wrap::do_solve()const *mlog << "[" < $@ chmod +x configure localclean: +install-strip: + $(MAKE) INSTALL="$(INSTALL) -s" install install: localinstall ifdef SUBDIRS diff --git a/make/Toplevel.make.in b/make/Toplevel.make.in index 8a42ab0f91..7e971fcc72 100644 --- a/make/Toplevel.make.in +++ b/make/Toplevel.make.in @@ -1,4 +1,5 @@ # -*-Makefile-*- +# @configure_input@ ######################################################## # project LilyPond -- the musical typesetter # title top level makefile for LilyPond @@ -32,9 +33,10 @@ SUBDIRS = flower lib lily mi2mu \ # list of distribution files: # -SCRIPTS = configure configure.in install-sh -README_FILES = BUGS DEDICATION ANNOUNCE COPYING NEWS README TODO INSTALL.text AUTHORS.text -EXTRA_DISTFILES= .dstreamrc VERSION $(README_FILES) $(SCRIPTS) $(SYMLINKS) +SCRIPTS = configure configure.in install-sh aclocal.m4 +README_FILES = BUGS DEDICATION ANNOUNCE COPYING ONEWS NEWS README TODO \ + INSTALL.text AUTHORS.text +EXTRA_DISTFILES = .dstreamrc VERSION $(README_FILES) $(SCRIPTS) $(SYMLINKS) # do not dist ./Makefile (is copied from make/Toplevel.make) DISTFILES:=$(EXTRA_DISTFILES)# Makefile $(ALL_SOURCES) diff --git a/make/Variables.make b/make/Variables.make index a3bc6eee5c..b601cbd8a4 100644 --- a/make/Variables.make +++ b/make/Variables.make @@ -5,8 +5,10 @@ # abstract # # do not change this file for site-wide extensions; please use -# make/out/Site.make; -# Any change in files in this directory (make/) would be distributed. +# make/$(OUTDIR_NAME)/Site.make; +# +# Any change in files in this directory (make/) would be distributed, if +# you do make dist # # Copyright (c) 1997 by # Jan Nieuwenhuizen @@ -15,23 +17,21 @@ # toplevel version info, might be handy? # include $(depth)/VERSION -# + + ifeq (0,${MAKELEVEL}) + +# Don't try to outsmart us, you puny computer! MAKE:=$(MAKE) --no-builtin-rules endif -# directory names: - +ifndef OUTDIR_NAME +OUTDIR_NAME=out +endif -ifdef buildprefix -top-directory := $(shell cd $(depth); pwd) -abs-sub-directory := $(shell pwd) -relative-sub-directory := $(subst $(top-directory),,$(abs-sub-directory)) -outdir=$(buildprefix)/$(relative-sub-directory)/out/ -else +# directory names: buildprefix=$(depth) -outdir=out -endif +outdir=$(OUTDIR_NAME) # derived names lily_bindir = $(depth)/bin @@ -39,13 +39,13 @@ distdir = $(depth)/$(DIST_NAME) module-distdir = $(depth)/$(MODULE_DIST_NAME) depdir = $(outdir) -flowerout = $(buildprefix)/flower/out -libout = $(buildprefix)/lib/out -lilyout = $(buildprefix)/lily/out -mi2muout = $(buildprefix)/mi2mu/out -makeout = $(buildprefix)/make/out -docout = $(buildprefix)/Documentation/out -binout = $(buildprefix)/bin/out +flowerout = $(buildprefix)/flower/$(OUTDIR_NAME) +libout = $(buildprefix)/lib/$(OUTDIR_NAME) +lilyout = $(buildprefix)/lily/$(OUTDIR_NAME) +mi2muout = $(buildprefix)/mi2mu/$(OUTDIR_NAME) +makeout = $(buildprefix)/make/$(OUTDIR_NAME) +docout = $(buildprefix)/Documentation/$(OUTDIR_NAME) +binout = $(buildprefix)/bin/$(OUTDIR_NAME) doc-dir = $(depth)/Documentation flower-dir = $(depth)/flower @@ -85,6 +85,7 @@ TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_ # fix naming, use TOPLEVEL_ prefix _or_ MODULE? MODULE_DIST_NAME = $(MODULE_NAME)-$(VERSION) DIST_NAME = lilypond-$(TOPLEVEL_VERSION) +NO_DOOS_DIST = bin flower lib lily make mi2mu out # # list of object files: @@ -122,8 +123,8 @@ mi2mu-version = $(mi2muout)/version.hh # custom libraries: # -LIBFLOWER = $(depth)/flower/$(outdir)/$(LIB_PREFIX)flower$(LIB_SUFFIX) -LIBLILY = $(depth)/lib/$(outdir)/$(LIB_PREFIX)lily$(LIB_SUFFIX) +LIBFLOWER = $(flowerout)/$(LIB_PREFIX)flower$(LIB_SUFFIX) +LIBLILY = $(libout)/$(LIB_PREFIX)lily$(LIB_SUFFIX) # # compile and link options: @@ -141,7 +142,7 @@ EXTRA_CXXFLAGS= -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversio CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS) INCLUDES = -Iinclude -I$(outdir) -I$(include-lib) -I$(libout) -I$(include-flower) -I$(flowerout) CXX_OUTPUT_OPTION = $< -o $@ -LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) -L$(depth)/lib/out -L$(depth)/flower/out +LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) -L$(depth)/lib/$(OUTDIR_NAME) -L$(depth)/flower/$(OUTDIR_NAME) LOADLIBES = $(EXTRA_LIBES) $(MODULE_LIBES) -lg++ # need lg++ for win32, really! # @@ -180,7 +181,12 @@ DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)" # generic target names: # +ifdef NAME EXECUTABLE = $(outdir)/$(NAME)$(EXE) +else +EXECUTABLE = +endif + EXECUTABLES = $(EXECUTABLE) LIB_PREFIX = lib @@ -199,7 +205,7 @@ DOCDIR=$(depth)/$(outdir) # .hh should be first. Don't know why # take some trouble to auto ignore sources and obsolete stuff. -progdocs=$(shell $(FIND) ./ -name '*.hh' |egrep -v 'out/') $(shell $(FIND) ./ -name '*.cc'|egrep -v 'out/') +progdocs=$(shell $(FIND) ./ -name '*.hh' |egrep -v '$(OUTDIR_NAME)') $(shell $(FIND) ./ -name '*.cc'|egrep -v '$(OUTDIR_NAME)') pod2html=pod2html diff --git a/make/lilypond.lsm b/make/lilypond.lsm index 6ff4c32b1a..40fca3deca 100644 --- a/make/lilypond.lsm +++ b/make/lilypond.lsm @@ -1,7 +1,7 @@ Begin3 Title: LilyPond -Version: 0.1.0 -Entered-date: 08/01/97 +Version: 0.1.1 +Entered-date: 05AUG97 Description: GNU LilyPond is a program which converts music definition files into visual or auditive output: it can typeset formatted sheet music to a TeX file and and @@ -14,9 +14,8 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys) jan@digicash.com (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps - 340k lilypond-0.1.0.tar.gz + 340k lilypond-0.1.1.tar.gz Original-site: pcnov095.win.tue.nl /pub/lilypond/ - 340k lilypond-0.1.0.tar.gz -Platform: Unix/windoze32, GNU C++ + 340k lilypond-0.1.1.tar.gz Copying-policy: GPL End diff --git a/make/lilypond.lsm.in b/make/lilypond.lsm.in index a3c98fc523..aa442688fe 100644 --- a/make/lilypond.lsm.in +++ b/make/lilypond.lsm.in @@ -17,6 +17,5 @@ Primary-site: sunsite.unc.edu /pub/Linux/apps 340k lilypond-@TOPLEVEL_VERSION@.tar.gz Original-site: pcnov095.win.tue.nl /pub/lilypond/ 340k lilypond-@TOPLEVEL_VERSION@.tar.gz -Platform: Unix/windoze32, GNU C++ Copying-policy: GPL End diff --git a/make/lilypond.spec b/make/lilypond.spec index ffb03cd6fd..604160109c 100644 --- a/make/lilypond.spec +++ b/make/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 0.1.0 +Version: 0.1.1 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.0.tar.gz +Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.1.tar.gz Summary: A preprocessor to make TeX typeset music. URL: http://www.stack.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys @@ -28,7 +28,7 @@ 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/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/links.text Documentation/out/mi2mu.text Documentation/out/mudela-book.text Documentation/out/other-packages.text BUGS TODO NEWS DEDICATION ANNOUNCE README -%doc input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.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/mudela-course.doc Documentation/mudela-man.doc +%doc input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/header.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/rock.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/mudela-course.doc Documentation/mudela-man.doc %doc Documentation/lelie_logo.gif /usr/bin/convert-mudela /usr/bin/mudela-book @@ -43,3 +43,5 @@ make prefix="$RPM_BUILD_ROOT/usr" install /usr/share/lilypond/ %post +texhash # takes some time... + diff --git a/make/lilypond.spec.in b/make/lilypond.spec.in index 5ae3aede2e..772371bd2d 100644 --- a/make/lilypond.spec.in +++ b/make/lilypond.spec.in @@ -43,3 +43,5 @@ make prefix="$RPM_BUILD_ROOT/usr" install /usr/share/lilypond/ %post +texhash # takes some time... + diff --git a/mi2mu/Makefile b/mi2mu/Makefile index 2df411c6fa..84286dc182 100644 --- a/mi2mu/Makefile +++ b/mi2mu/Makefile @@ -79,3 +79,6 @@ localclean: localinstall: installexe localuninstall: uninstallexe + + +$(outdir)/mi2mu-version.o: $(outdir)/version.hh -- 2.39.2