From 1bdf3db27451a0873b2c97545f0beab2f5cce06a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 5 Jan 1998 15:14:45 +0100 Subject: [PATCH] release: 0.1.39 --- .dstreamrc | 2 + ANNOUNCE | 134 ++------- ANNOUNCE-0.1 | 165 ++++++++++ AUTHORS.text | 70 ++++- Documentation/AUTHORS.pod | 13 +- Documentation/INSTALL.pod | 118 ++++---- Documentation/MANIFESTO.pod | 6 +- Documentation/Rules.make | 8 +- Documentation/index.pod | 2 +- Documentation/language.pod | 66 ---- Documentation/lilypond.pod | 18 +- Documentation/links.pod | 24 +- Documentation/mutopia.pod | 4 +- INSTALL.text | 276 ++++++++--------- NEWS | 37 ++- TODO | 30 +- VERSION | 4 +- bin/clean-diaper.sh | 5 +- bin/lilypython.py | 54 ++++ bin/make-examples.sh | 9 + bin/make-website.pl | 365 ----------------------- bin/make-website.py | 261 ++++++++++++++++ bin/mudela-book.pl | 8 +- bin/ps-to-gifs.sh | 24 ++ configure | 2 +- configure.in | 2 +- debian/Makefile | 2 +- debian/{README.debian => README.Debian} | 0 flower/NEWS | 4 + flower/VERSION | 2 +- flower/dstream.cc | 2 +- flower/include/dstream.hh | 2 +- flower/include/path.hh | 11 +- flower/include/string.hh | 8 +- flower/path.cc | 93 +++--- flower/string-convert.cc | 54 ++-- flower/string.cc | 71 +++-- init/engraver.ly | 4 +- init/feta16.ly | 8 +- init/feta20.ly | 8 +- init/script.ly | 4 +- init/table20.ly | 10 +- input/beams.ly | 33 +- input/collisions.ly | 1 + input/font.ly | 8 +- input/font20.ly | 13 +- input/rhythm.ly | 15 +- input/spacing.ly | 52 +++- input/standchen-16.ly | 1 + input/standchen-20.ly | 1 + input/standchen-20.tex | 2 +- input/standchen.ly | 5 +- input/toccata-fuga-E.ly | 4 +- input/wtk1-fugue2.ly | 2 +- lib/binary-source-file.cc | 4 +- lib/source-file.cc | 2 +- lily/VERSION | 2 +- lily/atom.cc | 37 ++- lily/axis.cc | 2 +- lily/beam-grav.cc | 48 ++- lily/beam.cc | 156 +++++----- lily/bow.cc | 17 +- lily/colhpos.cc | 10 +- lily/crescendo.cc | 14 +- lily/include/atom.hh | 6 +- lily/include/beam.hh | 15 +- lily/include/bow.hh | 4 +- lily/include/colhpos.hh | 39 +-- lily/include/lookup.hh | 10 +- lily/include/main.hh | 9 +- lily/include/midi-def.hh | 2 + lily/include/music-output-def.hh | 1 + lily/include/paper-def.hh | 3 +- lily/include/spring-spacer.hh | 3 - lily/include/text-spanner.hh | 31 +- lily/lexer.l | 2 +- lily/lookup.cc | 9 +- lily/main.cc | 63 ++-- lily/midi-def.cc | 10 +- lily/midi-stream.cc | 6 +- lily/music-output-def.cc | 9 + lily/musical-request.cc | 2 +- lily/my-lily-parser.cc | 6 +- lily/p-score.cc | 11 +- lily/paper-def.cc | 11 +- lily/performance.cc | 14 +- lily/score-grav.cc | 10 +- lily/score.cc | 19 +- lily/scores.cc | 11 +- lily/slur.cc | 8 +- lily/spring-spacer.cc | 186 +++++------- lily/stem.cc | 9 +- lily/tex-beam.cc | 26 +- lily/tex-slur.cc | 102 +++---- lily/text-spanner.cc | 8 +- lily/tie.cc | 19 +- make/Toplevel.make.in | 2 +- make/lelievijver.lsm | 8 +- make/lilypond.lsm | 11 +- make/lilypond.lsm.in | 7 +- make/lilypond.spec | 8 +- make/lilypond.spec.in | 2 - mf/TODO | 2 +- mf/{autometric.mf => feta-autometric.mf} | 0 mf/feta-beugel.mf | 2 +- mf/feta-din10.mf | 16 +- mf/{ital-f.mf => feta-ital-f.mf} | 0 mf/{ital-m.mf => feta-ital-m.mf} | 0 mf/{ital-p.mf => feta-ital-p.mf} | 0 mf/{ital-r.mf => feta-ital-r.mf} | 0 mf/{ital-s.mf => feta-ital-s.mf} | 0 mf/{ital-z.mf => feta-ital-z.mf} | 0 mf/feta-klef.mf | 2 +- mf/feta-nummer-generic.mf | 2 +- mf/feta-schrift.mf | 4 +- mf/feta-test16.mf | 2 +- mf/feta-test20.mf | 2 +- mf/feta16.mf | 2 +- mf/feta20.mf | 2 +- mf/round-pixel-gray.mf | 92 ------ mi2mu/main.cc | 2 +- mi2mu/mudela-stream.cc | 2 +- tex/feta16.tex | 2 +- tex/feta20.tex | 2 +- tex/fetdefs.tex | 115 +------ tex/lily-ps-defs.tex | 148 +++++++++ tex/lilyponddefs.tex | 38 ++- tex/taupindefs.tex | 10 +- 128 files changed, 1926 insertions(+), 1642 deletions(-) create mode 100644 ANNOUNCE-0.1 create mode 100644 bin/make-examples.sh delete mode 100644 bin/make-website.pl create mode 100644 bin/make-website.py create mode 100644 bin/ps-to-gifs.sh rename debian/{README.debian => README.Debian} (100%) rename mf/{autometric.mf => feta-autometric.mf} (100%) rename mf/{ital-f.mf => feta-ital-f.mf} (100%) rename mf/{ital-m.mf => feta-ital-m.mf} (100%) rename mf/{ital-p.mf => feta-ital-p.mf} (100%) rename mf/{ital-r.mf => feta-ital-r.mf} (100%) rename mf/{ital-s.mf => feta-ital-s.mf} (100%) rename mf/{ital-z.mf => feta-ital-z.mf} (100%) delete mode 100644 mf/round-pixel-gray.mf create mode 100644 tex/lily-ps-defs.tex diff --git a/.dstreamrc b/.dstreamrc index 636a2a37df..69b2d30c72 100644 --- a/.dstreamrc +++ b/.dstreamrc @@ -13,6 +13,8 @@ InitLexer 1 Lexer 1 +walking 1 + # flower lib File_path 1 Matrix 1 diff --git a/ANNOUNCE b/ANNOUNCE index 9f7d6e2e37..6bdaf16333 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,45 +1,14 @@ -Keywords: midi notation music typesetting gnu -Subject: LilyPond 0.1 released - The GNU Project music typesetter - - BORN - - August 1, 1997 - - Lily - - (GNU LilyPond 0.1) - - daughter to Jan 'Janneke' Nieuwenhuizen and Han-Wen 'Wendy' Nienhuys - -Lily is a healthy, bouncing baby weighing 345 kilobytes - -Visiting hours: 24 hours a day at - - ftp://pcnov095.win.tue.nl/pub/lilypond/lilypond-0.1.0.tar.gz (Europe) - ftp://alpha.gnu.ai.mit.edu/gnu/lilypond-0.1.0.tar.gz (US) - -You can see some babyfood, diapers and pictures at - - http://www.stack.nl/~hanwen/lilypond/index.html - -You can send your congratulations to Janneke (jan@digicash.com) and -Wendy (hanwen@stack.nl) - +Keywords: midi notation music typesetting gnu font +Subject: LilyPond 0.2 released - The GNU Project music typesetter GNU LilyPond - The GNU Project Music Typesetter - ``WHAT IS GNU LilyPond?'' -Well Mike, 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 (mechanical) performances to MIDI files. - - -We have been working very hard on this system for the past year, and -we finally think that it is ready to be used and hacked at by a larger -public than us. +GNU LilyPond is the GNU Project Music typesetter: it reads a music +definition file and outputs formatted sheet music to a TeX file or +(mechanical) performances to MIDI files. WHY ? @@ -48,48 +17,31 @@ We want to create tools to produce production quality scores and parts of public domain music. -BUT .. - -We haven't yet reached that goal: - -* The quality of the output isn't good enough yet due to some -unsophisticated algorithms - -* Some features haven't been implemented, due to lack of time; most of -them can be done quite simply +WHAT'S NEW -This is why we don't consider this software stable yet. It generally -does what it is supposed to, but we reserve the right to make -(incompatible) changes to the input format. We consider it -of BETA quality. +* LilyPond now includes a completely rewritten font: the Feta font. +We did our best to copy the best symbol designs available and We're +proud of the result. We hope you agree, so go check it out! +* More elegant output due to -WE WANT YOU! + * better spacing + * better breaking + * better font design + * PostScript output for variable symbols. -You can become a user, but we'd really appreciate it if you would start -hacking at Lily, and help us advance our project more quickly. +* Lots of bugfixes +* More robust, flexible, tweakable design -``YES, IT IS FANTASTIC! WHAT DO I NEED?'' +* Better MIDI importing -For compilation you need +* Easier to use due to better scripts and input format enhancements. - Unix. (windows32 is known to work, too) - GNU C++ v2.7 or better, with libg++ installed. - GNU make. - Flex (2.5.1 or better). - Bison. (1.25 or better) +* MusixTeX not needed anymore -For running you need - TeX - MusiXTeX fonts - -The MusiXTeX fonts are part of the MusiXTeX package version T.73, -available at any CTAN mirror, or http://www.gmd.de/Misc/Music/ - - -``WHAT CAN LILYPOND DO?'' +WHAT CAN LILYPOND DO? ASCII script input (mudela), with identifiers (for music reuse), customizable notenames. @@ -110,56 +62,14 @@ changes, cadenza-mode, key changes, repeat bars. Integration with LaTeX through Perl scripts. -``WHERE CAN I FIND MORE INFO?'' +MORE INFO Sources for this project are on ftp://pcnov095.win.tue.nl/pub/lilypond/ (Europe) - ftp://alpha.gnu.ai.mit.edu/gnu/ (US) + ftp://alpha.gnu.org/gnu/ (US) More detailed info and examples can be found on the webpage at http://www.stack.nl/~hanwen/lilypond/index.html - -THANK YOU, - -Thanks go out to Mats Bengtsson, Werner Lemberg and Richard Stallman -for comments and contributions. - - -**** NOTE - -LilyPond might have a minor bug if you use glibc-2; we will look into it -If you use glibc-2, please try 0.1.0 to see if it works and, download 0.1.1 -when it's available. - -LilyPond might exhibit a g++ bug on Solaris 1.5 (The stack frame gets corrupted -by a constructor) if you compile with -O2. We don't know workarounds. - - --- * --- - - We would like to dedicate this program to all the friends that we - met through music. - - - Those deserving special mention (in no particular order): -Esther, Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn, -Maartje, Suzanne, Ilse (gee, again?) and last (but certainly not least) -Janneke! - - HWN - - That's a nice thought, Wendy. I've got a few too, to spread -the credits a bit (Again, no particular order) Michelle, Illushka, -Ruth, Eva, Fro/ydis, Monique, Noor, Sascha, Monique, Ilse, Monique, -Eva, Roos, Judith, Tim and, of course, Wendy! - - JCN - - -Of course, our other friends in the `Eindhovens Jongeren Ensemble' -(http://www.stack.nl/~hanwen/eje.html) cannot go unmentioned either. - - - --- * --- diff --git a/ANNOUNCE-0.1 b/ANNOUNCE-0.1 new file mode 100644 index 0000000000..9f7d6e2e37 --- /dev/null +++ b/ANNOUNCE-0.1 @@ -0,0 +1,165 @@ +Keywords: midi notation music typesetting gnu +Subject: LilyPond 0.1 released - The GNU Project music typesetter + + BORN + + August 1, 1997 + + Lily + + (GNU LilyPond 0.1) + + daughter to Jan 'Janneke' Nieuwenhuizen and Han-Wen 'Wendy' Nienhuys + +Lily is a healthy, bouncing baby weighing 345 kilobytes + +Visiting hours: 24 hours a day at + + ftp://pcnov095.win.tue.nl/pub/lilypond/lilypond-0.1.0.tar.gz (Europe) + ftp://alpha.gnu.ai.mit.edu/gnu/lilypond-0.1.0.tar.gz (US) + +You can see some babyfood, diapers and pictures at + + http://www.stack.nl/~hanwen/lilypond/index.html + +You can send your congratulations to Janneke (jan@digicash.com) and +Wendy (hanwen@stack.nl) + + +GNU LilyPond - The GNU Project Music Typesetter + + + +``WHAT IS GNU LilyPond?'' + +Well Mike, 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 (mechanical) performances to MIDI files. + + +We have been working very hard on this system for the past year, and +we finally think that it is ready to be used and hacked at by a larger +public than us. + + +WHY ? + +We want to create tools to produce production quality scores and parts +of public domain music. + + +BUT .. + +We haven't yet reached that goal: + +* The quality of the output isn't good enough yet due to some +unsophisticated algorithms + +* Some features haven't been implemented, due to lack of time; most of +them can be done quite simply + +This is why we don't consider this software stable yet. It generally +does what it is supposed to, but we reserve the right to make +(incompatible) changes to the input format. We consider it +of BETA quality. + + +WE WANT YOU! + +You can become a user, but we'd really appreciate it if you would start +hacking at Lily, and help us advance our project more quickly. + + +``YES, IT IS FANTASTIC! WHAT DO I NEED?'' + +For compilation you need + + Unix. (windows32 is known to work, too) + GNU C++ v2.7 or better, with libg++ installed. + GNU make. + Flex (2.5.1 or better). + Bison. (1.25 or better) + +For running you need + + TeX + MusiXTeX fonts + +The MusiXTeX fonts are part of the MusiXTeX package version T.73, +available at any CTAN mirror, or http://www.gmd.de/Misc/Music/ + + +``WHAT CAN LILYPOND DO?'' + +ASCII script input (mudela), with identifiers (for music reuse), +customizable notenames. + +MIDI output lets you check if you have entered the correct notes. +MIDI to Mudela conversion through the mi2mu program. + +Multiple staffs in one score. Each staff can have a different meters. +Multiple voices within one staff (up to four handled graciously); +beams optionally shared between voices. Multiple scores within one +input file. Each score is output to a different file. + +Beams, slurs, chords, super/subscripts (accents and text), +general n-plet (triplet, quadruplets, etc.), lyrics, transposition, +dynamics (both absolute and hairpin style), clef changes, meter +changes, cadenza-mode, key changes, repeat bars. + +Integration with LaTeX through Perl scripts. + + +``WHERE CAN I FIND MORE INFO?'' + +Sources for this project are on + + ftp://pcnov095.win.tue.nl/pub/lilypond/ (Europe) + ftp://alpha.gnu.ai.mit.edu/gnu/ (US) + +More detailed info and examples can be found on the webpage at + + http://www.stack.nl/~hanwen/lilypond/index.html + + +THANK YOU, + +Thanks go out to Mats Bengtsson, Werner Lemberg and Richard Stallman +for comments and contributions. + + +**** NOTE + +LilyPond might have a minor bug if you use glibc-2; we will look into it +If you use glibc-2, please try 0.1.0 to see if it works and, download 0.1.1 +when it's available. + +LilyPond might exhibit a g++ bug on Solaris 1.5 (The stack frame gets corrupted +by a constructor) if you compile with -O2. We don't know workarounds. + + --- * --- + + We would like to dedicate this program to all the friends that we + met through music. + + + Those deserving special mention (in no particular order): +Esther, Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn, +Maartje, Suzanne, Ilse (gee, again?) and last (but certainly not least) +Janneke! + + HWN + + That's a nice thought, Wendy. I've got a few too, to spread +the credits a bit (Again, no particular order) Michelle, Illushka, +Ruth, Eva, Fro/ydis, Monique, Noor, Sascha, Monique, Ilse, Monique, +Eva, Roos, Judith, Tim and, of course, Wendy! + + JCN + + +Of course, our other friends in the `Eindhovens Jongeren Ensemble' +(http://www.stack.nl/~hanwen/eje.html) cannot go unmentioned either. + + + --- * --- diff --git a/AUTHORS.text b/AUTHORS.text index 7dd8753de2..ab8f2d8e3e 100644 --- a/AUTHORS.text +++ b/AUTHORS.text @@ -29,6 +29,9 @@ CCCCOOOONNNNTTTTRRRRIIIIBBBBUUUUTTTTOOOORRRRSS +o Jan Arne Fagertun , TeX titling and lytodvi.sh + +o Shay Rojanski + Some mudela source. + +o Werner Lemberg , misc bugfixes, some Beam and Stem code. @@ -36,7 +39,7 @@ CCCCOOOONNNNTTTTRRRRIIIIBBBBUUUUTTTTOOOORRRRSS mf/ital-*.mf (these were taken from the CM fonts) +o Alexandre Oliva , - http://?.unicamp.br/ + http://sunsite.unicamp.br/? testing +o Anthony Fok , @@ -48,10 +51,25 @@ CCCCOOOONNNNTTTTRRRRIIIIBBBBUUUUTTTTOOOORRRRSS +o Neil Jerram . Documentation/Vocab* + +o David R. Linn , + Mailing list maintenance. + Your name could be here! If you want to help, then take a look at the SMALLISH PROJECTS section of in the file _T_O_D_O. Some do not involve coding C++ + + + +5/Jan/98 LilyPond 0.1.39 1 + + + + + +AUTHORS(1) LilyPond documentation AUTHORS(1) + + [And of course we sincerely thank J.S.Bach, F.Schubert, T. Merula and W.A.Mozart for their beautiful music] @@ -61,6 +79,54 @@ CCCCOOOONNNNTTTTRRRRIIIIBBBBUUUUTTTTOOOORRRRSS -25/Nov/97 LilyPond 0.1.38 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +5/Jan/98 LilyPond 0.1.39 2 diff --git a/Documentation/AUTHORS.pod b/Documentation/AUTHORS.pod index c6fedeb9b0..e922f5c3d3 100644 --- a/Documentation/AUTHORS.pod +++ b/Documentation/AUTHORS.pod @@ -36,16 +36,19 @@ logs/longa/brevis etc TeX titling and lytodvi.sh +=item * Shay Rojanski + +Some mudela source. + =item * Werner Lemberg , -misc bugfixes, some -Beam and Stem code. +misc bugfixes, some Beam and Stem code. =item * Donald Ervin Knuth, http://www.cs.stanford.edu/~? mf/ital-*.mf (these were taken from the CM fonts) -=item * Alexandre Oliva , http://?.unicamp.br/ +=item * Alexandre Oliva , http://sunsite.unicamp.br/? testing @@ -61,6 +64,10 @@ Documentation/Vocab*, internationalization stuff Documentation/Vocab* +=item * David R. Linn , + +Mailing list maintenance. + =back Your name could be here! If you want to help, then take a look at the diff --git a/Documentation/INSTALL.pod b/Documentation/INSTALL.pod index b9580ea831..c15658f917 100644 --- a/Documentation/INSTALL.pod +++ b/Documentation/INSTALL.pod @@ -13,8 +13,7 @@ You do something which looks remotely like configure make make install - tar -C /usr/lib/texmf/fonts/source/ -zxf musixtex-T73.tgz 'mf/*' - + The detailed instructions follow here. =head1 PREREQUISITES @@ -63,29 +62,10 @@ TeX =item * -The MusixTeX fonts (I included those found in MusixTeX T.73). Beware, -the clef symbol seems to have changed its position in some versions, -(notably Egler's, a.k.a. OpusTeX). The MusixTeX fonts are included in -MusixTeX (T73 or better), which can be had from any CTAN site, e.g. at - -=over 4 - -=item ftp://ftp.shsu.edu/tex-archive/macros/musixtex/taupin - -=item ftp://ftp.tex.ac.uk/tex-archive/macros/musixtex/taupin - -=item ftp://ftp.dante.de/tex-archive/macros/musixtex/taupin +A PostScript printer and/or viewer (such as Ghostscript). =back -You only need the contents of the F subdirectory of the -package. The primary site of the Taupin version is -ftp://hprib.lps.u-psud.fr/pub/music_zips/musixtex.zip - -Andreas Egler's version of MusixTeX, now called OpusTeX, will also -work. Andreas moved some characters around in the fonts, so you have -to edit the definitions in tex/eglerdefs.tex (patch appreciated) - =head1 RECOMMENDED @@ -167,35 +147,35 @@ other options include: =over 4 -=item --enable-shared +=item B<--enable-shared> Make a shared library (gnu/linux, solaris (?) only ) -=item --enable-printing +=item B<--enable-printing> Enable debugging print routines (lilypond B<-d> option) -=item --enable-optimise +=item B<--enable-optimise> Set maximum optimisation: compile with B<-O2> -=item --enable-profiling +=item B<--enable-profiling> Compile with support for profiling -=item --enable-tex-prefix +=item B<--enable-tex-prefix> Set the directory where TeX and Metafont live -=item --enable-tex-dir +=item B<--enable-tex-dir> Set then directory TeX input is in (detected as a subdir of tex-prefix) -=item --enable-mf-dir +=item B<--enable-mf-dir> Set the directory mf input is in (idem) -=item --enable-out-dir +=item B<--enable-out-dir> Set the directory for machine generated output. @@ -248,17 +228,6 @@ If you have done a successful C, then a simple should do the trick. -Install the musixtex fonts in a directory which TeX and MF knows (if -you are root, look for a directory which 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 -applicable) - -Example: my fonts are in F, and I -have a symlink pointing to that in -F. After I copied the -files, I ran "texhash" - =head1 CAVEATS =over 5 @@ -268,9 +237,9 @@ 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 * +=item * -Perl5.003 and Perl5.004 use different syntax for pod2html: +Perl5.003 and Perl5.004 use different syntax for pod2html. =back @@ -279,8 +248,8 @@ Perl5.003 and Perl5.004 use different syntax for pod2html: This is what I type in my xterm: lilypond someinput.ly - tex lelie.tex - xdvi test& + tex someinput.tex + xdvi someinput& This is what the output looks like over here: @@ -292,11 +261,11 @@ This is what the output looks like over here: Preprocessing elements... Calculating column positions ... [14][25] Postprocessing elements... - TeX output to lelie.tex ... - Creating MIDI elements ...MIDI output to lelie.midi ... + TeX output to someinput.tex ... + Creating MIDI elements ...MIDI output to someinput.midi ... - hw:~/musix/spacer$ xdvi lelie& + hw:~/musix/spacer$ xdvi someinput& [1] 855 Check out the input files, some of them have comments @@ -305,15 +274,16 @@ Please refer to the man page for more information. =head1 REDHAT LINUX RedHat Linux users should be able to get a RPM. A spec file is in -F. You should be able to create an rpm as a normal -user. Be sure you have a ~/.rpmrc, and edit the RPM-dir in +F. You should be able to create an rpm as a +normal user. Be sure you have a F<~/.rpmrc>, and edit the RPM-dir in 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 +A Debian package is also available; contact Anthony Fok +. The build scripts are in the subdirectory debian/ =head1 WINDOWS NT/95 @@ -333,6 +303,52 @@ to unpack the distribution, make sure the B source tree is unpacked correctly, in particular the empty out directories (F, F et. al.) +=head1 MUSIXTEX + +Previous versions (before 0.1.39) used fonts from the TeX macro +package "MusixTeX". You can still use these, but they are not +supported. Since LilyPond's Feta font is much prettier, you'd be +stupid to use them, but anyway, here are the installation instructions +for those deprecated fonts. + + +[obsolete] I use the MusixTeX fonts those found in MusixTeX +T.73. Beware, the clef symbol seems to have changed its position in +some versions, (notably Egler's, a.k.a. OpusTeX). The MusixTeX fonts +are included in MusixTeX (T73 or better), which can be had from any +CTAN site, e.g. at + +=over 4 + +=item ftp://ftp.shsu.edu/tex-archive/macros/musixtex/taupin + +=item ftp://ftp.tex.ac.uk/tex-archive/macros/musixtex/taupin + +=item ftp://ftp.dante.de/tex-archive/macros/musixtex/taupin + +=back + +You only need the contents of the F subdirectory of the +package. The primary site of the Taupin version is +ftp://hprib.lps.u-psud.fr/pub/music_zips/musixtex.zip + +Install the musixtex fonts in a directory which TeX and MF knows (if +you are root, look for a directory which 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 +applicable) + +Example: my fonts are in F, and I +have a symlink pointing to that in +F. After I copied the +files, I ran "texhash" + +Andreas Egler's version of MusixTeX, now called OpusTeX, will also +work. Andreas moved some characters around in the fonts, so you have +to edit the definitions in F. + + + =head1 AUTHORS Han-Wen Nienhuys diff --git a/Documentation/MANIFESTO.pod b/Documentation/MANIFESTO.pod index 9f28246c03..58847a4d84 100644 --- a/Documentation/MANIFESTO.pod +++ b/Documentation/MANIFESTO.pod @@ -47,9 +47,9 @@ Further considerations while doing the programming =item * -GNU LilyPond uses MusiXTeX fonts and TeX for its output. This is not a key -issue: in a future version, GNU LilyPond might bypass TeX, but at the moment -TeX is convenient for producing output. +GNU LilyPond uses TeX for its output. This is not a key issue: in a +future version, GNU LilyPond might bypass TeX, but at the moment TeX +is convenient for producing output. =item * diff --git a/Documentation/Rules.make b/Documentation/Rules.make index 3eaf8cd967..eac8dfc8f2 100644 --- a/Documentation/Rules.make +++ b/Documentation/Rules.make @@ -45,7 +45,7 @@ $(outdir)/%.gz: $(outdir)/% name-stem= $(notdir $(basename $<)) $(outdir)/%.dvi: $(depth)/input/%.ly $(depth)/VERSION (cd $(outdir); \ - lilypond -I. -o $(name-stem) ../$< ) + lilypond -I/ ../$< ) (cd $(outdir); \ if [ -f ../$(basename $< ).tex ]; \ then \ @@ -55,9 +55,11 @@ $(outdir)/%.dvi: $(depth)/input/%.ly $(depth)/VERSION fi) -# generate the pixmap at twice the size, then rescale (for antialiasing) + $(outdir)/%.gif: $(outdir)/%.ps - gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE $< -c quit |pnmscale 0.5| ppmtogif > $@ + sh $(depth)/bin/ps-to-gifs.sh $< + mv $(name-stem)-page*.gif $(outdir)/ + touch $@ $(outdir)/%.ly.txt: $(depth)/input/%.ly ln -f $< $@ diff --git a/Documentation/index.pod b/Documentation/index.pod index 3f862dc841..595170662b 100644 --- a/Documentation/index.pod +++ b/Documentation/index.pod @@ -46,7 +46,7 @@ top_of_NEWS =over 4 =item * - The announce of 0.1 is merge - - -=item * \extract{ \from 2:3*4 \to 5 oboe } -=back - - =head1 THOUGHTS @@ -101,14 +63,6 @@ As simple fix, we might do key declarations: -[LOOSE THOUGHT] - -We might drop this {} argument altogether, by merely enforcing -that each "statement" (music,score,staff,chord) takes a LIST as -argument, and use the {} to group lists. This is admittedly perl. This -is very sketchy. - - =head2 Requests I want to give the user some access to the internals. Technically, @@ -125,25 +79,6 @@ portability. Suppose some commercial systems want to read mudela too. =head2 Command placement: -Mats is an arduous fan of having the commands inside music. I am -not. I see the Mudela music as something which can be plugged into -different staffs, transposed, translated in time, copied, quoted, -etc. Encouraging "inline" commands would be bad since they hinder this -reuse of typed music. - -The way I figure it, the bad part is essentially counting -bars/wholes. Maybe we can get rid of it, by reinstalling the "mark" -commands. - -I definitely want to avoid complicated logic ("Hey there is another -bar request, should we merge this bar with another staff's", this kind -of "smartness" makes a lot M$ software inconsistent) inside LilyPond, -by making the input unambiguous in this respect. - -There is another complication: some symbols (bars) sometimes are -linked across staffs. I should first think of a way to do this in -LilyPond, before even considering a syntax. - =head2 Volta @@ -192,7 +127,6 @@ editions: Just ideas: || && ! filter syntax - + merging of voices =head2 Quoting diff --git a/Documentation/lilypond.pod b/Documentation/lilypond.pod index fdee220387..26a6664150 100644 --- a/Documentation/lilypond.pod +++ b/Documentation/lilypond.pod @@ -175,7 +175,7 @@ compile/configure options please). Send a description of the bug itself. =item * -Send it to bug-gnu-music@vuse.vanderbilt.edu. +Send it to bug-gnu-music@gnu.org. =back @@ -256,29 +256,29 @@ mailing list have been setup: =over 4 -=item info-gnu-music@vuse.vanderbilt.edu +=item info-gnu-music@gnu.org For information on the GNU Music project, to subscribe: send mail with -subject "subscribe" to info-gnu-music-request@vuse.vanderbilt.edu +subject "subscribe" to info-gnu-music-request@gnu.org -=item help-gnu-music@vuse.vanderbilt.edu +=item help-gnu-music@gnu.org For help with programs from the GNU music project. To subscribe: send mail with subject "subscribe" to -help-gnu-music-request@vuse.vanderbilt.edu +help-gnu-music-request@gnu.org -=item bug-gnu-music@vuse.vanderbilt.edu +=item bug-gnu-music@gnu.org If you have bugreports, you should send them to this list. If you want to read all bugreports, you should subscribe to this list. To subscribe: send mail with subject "subscribe" to -bug-gnu-music-request@vuse.vanderbilt.edu +bug-gnu-music-request@gnu.org -=item gnu-music-discuss@vuse.vanderbilt.edu, +=item gnu-music-discuss@gnu.org, For discussions concerning the GNU Music project, to subscribe: send mail with subject "subscribe" to -gnu-music-discuss-request@vuse.vanderbilt.edu, +gnu-music-discuss-request@gnu.org, =back diff --git a/Documentation/links.pod b/Documentation/links.pod index dc1d9d8004..26a0026b5c 100644 --- a/Documentation/links.pod +++ b/Documentation/links.pod @@ -65,13 +65,13 @@ The following newsgroups all contain material relevant to LilyPond =over 4 -=item news:comp.music.research +=item news://comp.music.research -=item news:rec.music.compose +=item news://rec.music.compose -=item news:gnu.announce +=item news://gnu.announce -=item news:comp.os.linux.announce +=item news://comp.os.linux.announce =back @@ -82,30 +82,30 @@ mailing list have been setup: =over 4 -=item info-gnu-music@vuse.vanderbilt.edu +=item info-gnu-music@gnu.org A moderated list for information on the GNU Music project, to subscribe: send mail with subject "subscribe" to -info-gnu-music-request@vuse.vanderbilt.edu +info-gnu-music-request@gnu.org -=item help-gnu-music@vuse.vanderbilt.edu +=item help-gnu-music@gnu.org For help with programs from the GNU music project. To subscribe: send mail with subject "subscribe" to -help-gnu-music-request@vuse.vanderbilt.edu +help-gnu-music-request@gnu.org -=item bug-gnu-music@vuse.vanderbilt.edu +=item bug-gnu-music@gnu.org If you have bugreports, you should send them to this list. If you want to read all bugreports, you should subscribe to this list. To subscribe: send mail with subject "subscribe" to -bug-gnu-music-request@vuse.vanderbilt.edu +bug-gnu-music-request@gnu.org -=item gnu-music-discuss@vuse.vanderbilt.edu, +=item gnu-music-discuss@gnu.org, For discussions concerning the GNU Music project, to subscribe: send mail with subject "subscribe" to -gnu-music-discuss-request@vuse.vanderbilt.edu +gnu-music-discuss-request@gnu.org =back diff --git a/Documentation/mutopia.pod b/Documentation/mutopia.pod index 783d5bd74a..ed95d6ff0b 100644 --- a/Documentation/mutopia.pod +++ b/Documentation/mutopia.pod @@ -50,11 +50,11 @@ Just as an aside, the LilyPond package includes the following music: J.S. Bach, Das Wohltemperierte Clavier I: C major Prelude & Fugue, C minor fugue. Solo cello suites: suite II, menuetto (alto version). -=item * +=item * F. Schubert, St\"andchen (Serenade) "Leise flehen meine Lieder" -=item * +=item * Tarquinio Merula, La Gallina a 2 violini diff --git a/INSTALL.text b/INSTALL.text index 012ed4cf70..12cb41dfd7 100644 --- a/INSTALL.text +++ b/INSTALL.text @@ -17,11 +17,9 @@ AAAABBBBSSSSTTTTRRRRAAAACCCCTTTT configure make make install - tar -C /usr/lib/texmf/fonts/source/ -zxf musixtex-T73.tgz 'mf/*' The detailed instructions follow here. - PPPPRRRREEEERRRREEEEQQQQUUUUIIIISSSSIIIITTTTEEEESSSS For compilation you need. @@ -47,59 +45,37 @@ RRRRUUUUNNNNNNNNIIIINNNNGGGG +o TeX - +o The MusixTeX fonts (I included those found in - MusixTeX T.73). Beware, the clef symbol seems to have - changed its position in some versions, (notably - Egler's, a.k.a. OpusTeX). The MusixTeX fonts are - included in MusixTeX (T73 or better), which can be - had from any CTAN site, e.g. at - - ftp://ftp.shsu.edu/tex-archive/macros/musixtex/taupin - - ftp://ftp.tex.ac.uk/tex-archive/macros/musixtex/taupin - - - + +o A PostScript printer and/or viewer (such as + Ghostscript). -24/Dec/97 LilyPond 0.1.38 1 +RRRREEEECCCCOOOOMMMMMMMMEEEENNNNDDDDEEEEDDDD + Although not strictly necessary, these are recommended to + have. + +o Perl-5. Most documentation was created with the + perl's Plain Old Documentation. (I use 5.003) + +o Python. Although perl is nice, python is better. We + will shift towards python for build scripts -INSTALL(1) LilyPond documentation INSTALL(1) +5/Jan/98 LilyPond 0.1.39 1 - ftp://ftp.dante.de/tex-archive/macros/musixtex/taupin - You only need the contents of the _m_f_/ - subdirectory of the package. The primary site of - the Taupin version is ftp://hprib.lps.u- - psud.fr/pub/music_zips/musixtex.zip - Andreas Egler's version of MusixTeX, now called - OpusTeX, will also work. Andreas moved some - characters around in the fonts, so you have to - edit the definitions in tex/eglerdefs.tex (patch - appreciated) -RRRREEEECCCCOOOOMMMMMMMMEEEENNNNDDDDEEEEDDDD - Although not strictly necessary, these are recommended to - have. - +o Perl-5. Most documentation was created with the - perl's Plain Old Documentation. (I use 5.003) +INSTALL(1) LilyPond documentation INSTALL(1) - +o Python. Although perl is nice, python is - better. We will shift towards python for build - scripts - +o GNU find + +o GNU find - +o A fast computer (a full page of music typically - takes 1 minute on my 486/133, using the - --------eeeennnnaaaabbbblllleeee----cccchhhheeeecccckkkkiiiinnnngggg compile. It's lot slower than - most MusiXTeX preprocessors) + +o A fast computer (a full page of music typically takes + 1 minute on my 486/133, using the --------eeeennnnaaaabbbblllleeee----cccchhhheeeecccckkkkiiiinnnngggg + compile. It's lot slower than most MusiXTeX + preprocessors) CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG aaaannnndddd CCCCOOOOMMMMPPPPIIIILLLLIIIINNNNGGGG to install GNU LilyPond, simply type: @@ -124,18 +100,6 @@ CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG a ddddiiiirrrr. The above assumes that you are root and have the GNU development tools, and your make is GNU make. If this is not the case, you can adjust your environment variables to - - - -24/Dec/97 LilyPond 0.1.38 2 - - - - - -INSTALL(1) LilyPond documentation INSTALL(1) - - your taste: export CPPFLAGS="-I /home/me/my_include -DWEIRD_FOOBAR" @@ -161,62 +125,59 @@ INSTALL(1) LilyPond documentation INSTALL(1) Since GNU LilyPond currently is beta, you are advised to also use - --enable-debugging - --enable-checking - - other options include: - --enable-shared - Make a shared library (gnu/linux, solaris (?) - only ) - --enable-printing - Enable debugging print routines (lilypond ----dddd - option) +5/Jan/98 LilyPond 0.1.39 2 - --enable-optimise - Set maximum optimisation: compile with ----OOOO2222 - --enable-profiling - Compile with support for profiling - --enable-tex-prefix - Set the directory where TeX and Metafont live - --enable-tex-dir - Set then directory TeX input is in (detected as a - subdir of tex-prefix) - --enable-mf-dir - Set the directory mf input is in (idem) +INSTALL(1) LilyPond documentation INSTALL(1) + --enable-debugging + --enable-checking + other options include: -24/Dec/97 LilyPond 0.1.38 3 + --------eeeennnnaaaabbbblllleeee----sssshhhhaaaarrrreeeedddd + Make a shared library (gnu/linux, solaris (?) only ) + --------eeeennnnaaaabbbblllleeee----pppprrrriiiinnnnttttiiiinnnngggg + Enable debugging print routines (lilypond ----dddd option) + --------eeeennnnaaaabbbblllleeee----ooooppppttttiiiimmmmiiiisssseeee + Set maximum optimisation: compile with ----OOOO2222 + --------eeeennnnaaaabbbblllleeee----pppprrrrooooffffiiiilllliiiinnnngggg + Compile with support for profiling + --------eeeennnnaaaabbbblllleeee----tttteeeexxxx----pppprrrreeeeffffiiiixxxx + Set the directory where TeX and Metafont live -INSTALL(1) LilyPond documentation INSTALL(1) + --------eeeennnnaaaabbbblllleeee----tttteeeexxxx----ddddiiiirrrr + Set then directory TeX input is in (detected as a + subdir of tex-prefix) + --------eeeennnnaaaabbbblllleeee----mmmmffff----ddddiiiirrrr + Set the directory mf input is in (idem) - --enable-out-dir - Set the directory for machine generated output. + --------eeeennnnaaaabbbblllleeee----oooouuuutttt----ddddiiiirrrr + 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. + 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. - If you do + If you do - make all + make all - everything will be compiled, but nothing will be - installed. The resulting binaries can be found - in the subdirectories _o_u_t_/ (which contain all - files generated during compilation). + everything will be compiled, but nothing will be + installed. The resulting binaries can be found in the + subdirectories _o_u_t_/ (which contain all files generated + during compilation). BBBBuuuuiiiillllddddiiiinnnngggg ffffoooorrrr mmmmuuuullllttttiiiipppplllleeee hhhhoooossssttttssss @@ -230,6 +191,17 @@ INSTALL(1) LilyPond documentation INSTALL(1) Example: on my system, I do debugging and lots compiling. For this I use the configuration as follows: + + +5/Jan/98 LilyPond 0.1.39 3 + + + + + +INSTALL(1) LilyPond documentation INSTALL(1) + + configure --prefix=~ --enable-debugging --enable-printing --enable-checking make all @@ -254,45 +226,20 @@ IIIINNNNSSSSTTTTAAAALLLLLLLLIIIINNNNGGGG should do the trick. - Install the musixtex fonts in a directory which TeX and MF - knows (if you are root, look for a directory which - - - -24/Dec/97 LilyPond 0.1.38 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 - applicable) - - Example: my fonts are in - _/_u_s_r_/_l_o_c_a_l_/_l_i_b_/_t_e_x_f_o_n_t_s_/_m_u_s_i_x_t_e_x_/, and I have a symlink - pointing to that in - _/_u_s_r_/_l_i_b_/_t_e_x_m_f_/_t_e_x_m_f_/_f_o_n_t_s_/_s_o_u_r_c_e_/_p_u_b_l_i_c_/. After I copied - the files, I ran "texhash" - CCCCAAAAVVVVEEEEAAAATTTTSSSS - +o The -O2 option to gcc triggers a gcc bug on DEC - Alpha in dstream.cc. You should turn off this - flag for this file. + +o The -O2 option to gcc triggers a gcc bug on DEC Alpha + in dstream.cc. You should turn off this flag for this + file. - +o Perl5.003 and Perl5.004 use different syntax for - pod2html: + +o Perl5.003 and Perl5.004 use different syntax for + pod2html. EEEEXXXXAAAAMMMMPPPPLLLLEEEE This is what I type in my xterm: lilypond someinput.ly - tex lelie.tex - xdvi test& + tex someinput.tex + xdvi someinput& This is what the output looks like over here: @@ -304,38 +251,38 @@ EEEEXXXXAAAAMMMMPPPPLLLLEEEE Preprocessing elements... Calculating column positions ... [14][25] Postprocessing elements... - TeX output to lelie.tex ... - Creating MIDI elements ...MIDI output to lelie.midi ... + TeX output to someinput.tex ... + Creating MIDI elements ...MIDI output to someinput.midi ... - hw:~/musix/spacer$ xdvi lelie& + hw:~/musix/spacer$ xdvi someinput& [1] 855 - Check out the input files, some of them have comments - Please refer to the man page for more information. - -RRRREEEEDDDDHHHHAAAATTTT LLLLIIIINNNNUUUUXXXX - RedHat Linux users should be able to get a RPM. A spec - file is in _m_a_k_e_/_o_u_t_/_l_i_l_y_p_o_n_d_._s_p_e_c. You should be able to - create an rpm as a normal user. Be sure you have a - ~/.rpmrc, and edit the RPM-dir in _V_a_r_i_a_b_l_e_s_._m_a_k_e. (If you - create the RPM as a normal user the permissions will not - be set correctly, unfortunately) - +5/Jan/98 LilyPond 0.1.39 4 -24/Dec/97 LilyPond 0.1.38 5 +INSTALL(1) LilyPond documentation INSTALL(1) -INSTALL(1) LilyPond documentation INSTALL(1) + Check out the input files, some of them have comments + Please refer to the man page for more information. +RRRREEEEDDDDHHHHAAAATTTT LLLLIIIINNNNUUUUXXXX + RedHat Linux users should be able to get a RPM. A spec + file is in _m_a_k_e_/_o_u_t_/_l_i_l_y_p_o_n_d_._s_p_e_c. You should be able to + create an rpm as a normal user. Be sure you have a + _~_/_._r_p_m_r_c, and edit the RPM-dir in _V_a_r_i_a_b_l_e_s_._m_a_k_e. (If you + create the RPM as a normal user the permissions will not + be set correctly, unfortunately) DDDDEEEEBBBBIIIIAAAANNNN GGGGNNNNUUUU////LLLLIIIINNNNUUUUXXXX - A Debian package is in the works + A Debian package is also available; contact Anthony Fok + . The build scripts are in the + subdirectory debian/ WWWWIIIINNNNDDDDOOOOWWWWSSSS NNNNTTTT////99995555 So, you're stuck with Windows, eh? Well, don't worry, you @@ -354,6 +301,61 @@ WWWWIIIINNNNDDDDOOOOWWWWSSSS NNNNTTTT////99995 eeeennnnttttiiiirrrreeee source tree is unpacked correctly, in particular the empty out directories (_f_l_o_w_e_r_/_o_u_t, _l_i_b_/_o_u_t et. al.) +MMMMUUUUSSSSIIIIXXXXTTTTEEEEXXXX + Previous versions (before 0.1.39) used fonts from the TeX + macro package "MusixTeX". You can still use these, but + they are not supported. Since LilyPond's Feta font is + much prettier, you'd be stupid to use them, but anyway, + here are the installation instructions for those + deprecated fonts. + + [obsolete] I use the MusixTeX fonts those found in + MusixTeX T.73. Beware, the clef symbol seems to have + changed its position in some versions, (notably Egler's, + a.k.a. OpusTeX). The MusixTeX fonts are included in + MusixTeX (T73 or better), which can be had from any CTAN + site, e.g. at + + ftp://ftp.shsu.edu/tex-archive/macros/musixtex/taupin + + ftp://ftp.tex.ac.uk/tex-archive/macros/musixtex/taupin + + ftp://ftp.dante.de/tex-archive/macros/musixtex/taupin + + + + +5/Jan/98 LilyPond 0.1.39 5 + + + + + +INSTALL(1) LilyPond documentation INSTALL(1) + + + You only need the contents of the _m_f_/ subdirectory of the + package. The primary site of the Taupin version is + ftp://hprib.lps.u-psud.fr/pub/music_zips/musixtex.zip + + Install the musixtex fonts in a directory which TeX and MF + knows (if you are root, look for a directory which + 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 + applicable) + + Example: my fonts are in + _/_u_s_r_/_l_o_c_a_l_/_l_i_b_/_t_e_x_f_o_n_t_s_/_m_u_s_i_x_t_e_x_/, and I have a symlink + pointing to that in + _/_u_s_r_/_l_i_b_/_t_e_x_m_f_/_t_e_x_m_f_/_f_o_n_t_s_/_s_o_u_r_c_e_/_p_u_b_l_i_c_/. After I copied + the files, I ran "texhash" + + Andreas Egler's version of MusixTeX, now called OpusTeX, + will also work. Andreas moved some characters around in + the fonts, so you have to edit the definitions in + _t_e_x_/_e_g_l_e_r_d_e_f_s_._t_e_x. + AAAAUUUUTTTTHHHHOOOORRRRSSSS Han-Wen Nienhuys @@ -389,8 +391,6 @@ AAAAUUUUTTTTHHHHOOOORRRRSSSS - - -24/Dec/97 LilyPond 0.1.38 6 +5/Jan/98 LilyPond 0.1.39 6 diff --git a/NEWS b/NEWS index dc4641d511..bb0e37a02d 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,35 @@ -pl 38.jcn3 +pl 39 + - 0.2 ANNOUNCE sketch + - unix style paths for LILYINCLUDE env + - show all output pages on website + - ps-to-gifs.sh + - bf: wtk1-fugue2 + - python make-website + - higher brace resolution + - phased out musixtex stuff + - bf: rhythm.ly + - PS slurs + - PS beams + - Bow units + - turn on PS by default + - turn off barnumbers by default. + - bf: halfbeam size. + - bf: -M bug + - stafflinethick in PS (crescendi) + - continued (de)crescendi (in PS) + - bf: spurious beam reqs + - handle unfeasible spacing cleanly. + - ML-address change + - output naming: default to basename[-serialnumber].{midi,tex} + - bf: clef width + +pl 39.jcn2 + - make-examples.sh + - leftright repeat sign + repeatbar dims + - smaller minimum sized rod at end of bar + - bf: spacing.ly + - less space at begin of bar - experimental whitespace fixes at begin and end of bar - -pl 38.jcn2 - added to beams.ly - open-up beam spacing for mult > 3 - fixed hang/sit to overlap iso aligne with staffline @@ -9,10 +37,9 @@ pl 38.jcn2 - scsii-menuetto.ly fixes - init/property.ly - property settings for beam quantiseing and damping - -pl 38.jcn1 - provisionary multiple-beam fix +****** pl 38 - bf: \> \! \ff (crescendo overlap) - misc feta-fixes, flageolet sign. diff --git a/TODO b/TODO index 02e8452ce5..a9b64f1dd9 100644 --- a/TODO +++ b/TODO @@ -7,20 +7,16 @@ Most of the items are marked in the code as well, with full explanation. grep for TODO and ugh/ugr 0.2: - * -M bug - * unended beam: [c4 + * beam quanting - * continued hairpins + * disable spaces in TeX stuff * height of dyns. - * output naming: - - default to basename[-serialnumber].{midi,tex} - * handle ^C for tmp/file creation. - * PS for beams. + * WWW mirror/archive for the mailing lists. * dots & rest collisions. @@ -32,18 +28,12 @@ grep for TODO and ugh/ugr * documentation - * spurious "Junk beam" warnings - - * standchen: warning: Excentric column (Meter dims?) - * naming Mozarella, Madeira, Muella? * versioning for Feta * bf: abbrevs over whole note - * bf: wtk1-fug2 ending - STUFF * give Items/Spanners access to unbroken originals @@ -71,7 +61,10 @@ STUFF - MIDI instrument - staff title - * optimal pagebreaking. + * page handling: + - papersizes + - PS output + - optimal pagebreaking. * put errorlevel in Input class @@ -79,6 +72,8 @@ STUFF 3RD PARTY BUGS: + * xdvi: PS magnifying glass. + * Rational infty(HUGE_VAL) on glibc / w32 * Fix profiling. gprof bugreport? @@ -93,14 +88,11 @@ PROJECTS * Spring_spacer: - write a faster Spring_spacer (without matrices if possible) - - use straight QP to find minimal "fitting force" + - use straight LP to find minimal "fitting force" - relate energybound to linelen unitspace fontsize etc. - used fixed point fp * \header - - write perl/python script for handling it into databases - - write TeX macros to generate titles - - adapt make-website to use \header info. - output header info to MIDI too. @@ -297,8 +289,6 @@ SMALLISH PROJECTS * adaptive accidental spacing. - * unix style paths for LILYINCLUDE env - * handle EOF graciously in error messages. * caching Item/spanner dimensions. diff --git a/VERSION b/VERSION index c4ead0b530..1cb7a136d9 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 1 -TOPLEVEL_PATCH_LEVEL = 38 -TOPLEVEL_MY_PATCH_LEVEL = jcn3 +TOPLEVEL_PATCH_LEVEL = 39 +TOPLEVEL_MY_PATCH_LEVEL = # use the above to send patches, always empty for released version: # please don't move these comments up; the patch should fail if diff --git a/bin/clean-diaper.sh b/bin/clean-diaper.sh index dc25ffeaca..e02b17ddf9 100644 --- a/bin/clean-diaper.sh +++ b/bin/clean-diaper.sh @@ -1,14 +1,17 @@ #!/bin/sh # unclobber current dir. -rm -vf *.aux *.log `grep -li "^% Creator: GNU LilyPond" *.out` *.orig *~ +rm -vf *.aux *.log *.orig *~ +rm -vf `grep -li "^% Creator: GNU LilyPond" *.out *.tex` rm -vf `grep -li "Creator: mi2mu" *.midi.ly` +rm -vf `grep -li "%Creator: dvipsk" *.ps` rm -vf `grep -li "Creator: GNU LilyPond" *.midi` rm -vf `grep -li "Creator: ly2dvi" *.tex` rm -vf `find -name 'core'` rm -vf `find -name *.orig` rm -vf `find -name *.rej` + # docxx mess rm -vf *dvi rm -vf *.class HIER*.html dxxgifs.tex gifs.db icon?.gif logo.gif down.gif \ diff --git a/bin/lilypython.py b/bin/lilypython.py index fb6f1a51f5..5b68b97739 100644 --- a/bin/lilypython.py +++ b/bin/lilypython.py @@ -117,6 +117,7 @@ class Lilydirs: return v + lilydirs = Lilydirs() if __name__ == '__main__': @@ -127,3 +128,56 @@ if __name__ == '__main__': print version_tuple_to_str(pv), prev_version(pv), next_version(pv) print version_tuple_to_str((0,1,1,'')) print mv, version_str_to_tuple(mv) + + + +def dump_file(f, s): + i = open(f, 'w') + i.write(s) + i.close () + +def gulp_file(f): + i = open(f) + i.seek (0, 2) + len = i.tell () + i.seek (0,0) + return i.read (len) + + +header_regex = regex.compile('\\header[ \t\n]*{\([^}]*\)}') +header_entry_regex = regex.compile('[\n\t ]*\([^\n\t ]+\)[\n\t ]*=[\n \t]*\([^;]+\)[\n \t]*;') + +# +# FIXME breaks on multiple strings. +# +def read_mudela_header (fn): + s = gulp_file(fn) + s = regsub.gsub('%.*$', '', s) + s = regsub.gsub('\n', ' ', s) + + dict = {} + if header_regex.search(s) <> -1: + h = header_regex.group(1) + else: + return dict + + while regex.search('=', h) <> -1: + + if header_entry_regex.search (h) == -1: + + raise 'format error' + + h = regsub.sub(header_entry_regex, '', h) + left = header_entry_regex.group(1) + right = header_entry_regex.group(2) + + right = regsub.gsub('\([^\\]\)\"', '\\1', right) + right = regsub.gsub('^"', '', right) + left = regsub.gsub('\([^\\]\)\"', '', left) + left = regsub.gsub('^"', '', left) + + dict[left] = right + + return dict + + diff --git a/bin/make-examples.sh b/bin/make-examples.sh new file mode 100644 index 0000000000..620a28a7dd --- /dev/null +++ b/bin/make-examples.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# make-examples + +examples="twinkle-pop wtk1-fugue2 standchen-16 standchen-20 wtk1-prelude1 toccata-fuga-E scsii-menuetto cadenza gallina twinkle collisions font font20 scales rhythm multi spacing beams stem" +pss=$(echo $examples | sed "s/[^ ][^ ]*/out\\/&.ps/g") + +# cd ~/lelie/current/Documentation/out +cd ~/lelie/current/input +make -C ../Documentation $pss diff --git a/bin/make-website.pl b/bin/make-website.pl deleted file mode 100644 index 2159716e96..0000000000 --- a/bin/make-website.pl +++ /dev/null @@ -1,365 +0,0 @@ -#!@PERL@ -w -# -*-Perl-*- - - -# stupid script to generate WWW site. The WWW site is my -# test-suite for LilyPond, I usually don't distribute versions that -# fail to make the website - -use FileHandle; -use Getopt::Long; - -my $lily_version; -my $footstr; -my $mw_id = ""; -my $id_str = "make-website 0.4"; -my $TAR="tar"; -my $MAKE="make"; - -sub get_version -{ - my ($vstr)=(""); - open V, "$depth/VERSION"; - while () { - s/#.*$//g; - next if (/^ *$/); - s/^/\$/; - s/= *(.*)$/=\"$1\";/; - $vstr .= $_; - } - eval ($vstr); - - $lily_version= "$TOPLEVEL_MAJOR_VERSION.$TOPLEVEL_MINOR_VERSION.$TOPLEVEL_PATCH_LEVEL$TOPLEVEL_MY_PATCH_LEVEL"; - - # stupid checks. - $lily_version= $lily_version; - - close V; -} - -sub set_html_footer -{ - my $MAILADDRESS=$ENV{MAILADDRESS}; - my @pw=(getpwuid($<)); - my $username=$pw[6]; - - $footstr = - "\n
Please take me back to the index\n -of LilyPond -- The GNU Project Music typesetter -
- -This page was built using " . $id_str . " from lilypond-" - . $lily_version . - " by

-


$username <" . $MAILADDRESS .">
-

"; -} - - -# do something, check return status -sub my_system -{ - my (@cmds) = @_; - foreach $cmd (@cmds) { - my ($ignoreret)=0; - if ( $cmd =~ /^-/ ) { - $ignoreret = 1; - $cmd = substr ($cmd, 1); - } - - my $ret = ( system ($cmd)); - if ($ret) { - if ($ignoreret) { - print STDERR "ignoring failed command \`$cmd\' (status $ret)\n"; - }else { - print STDERR "\nmake_website: failed on command \`$cmd\' (status $ret)\n"; - exit 2; - } - } - } -} - - -local $base="lilypond/"; - -local @examples=("twinkle-pop", - "wtk1-fugue2", - "standchen-16", - "standchen-20", - "wtk1-prelude1", - "toccata-fuga-E", - "scsii-menuetto", - "cadenza", - "gallina", - "twinkle", - "collisions", - "font", - "font20", - #"scales", - "rhythm", - "multi" ); - - -sub gen_html -{ - print "generating HTML\n"; - my_system "$MAKE -kC .. html"; -} - -sub gen_examples -{ - print "generating examples: \n"; - my @todo=(); - foreach $a (@examples) { - push @todo, "out/$a.ps.gz", "out/$a.gif", "out/$a.ly.txt"; - } - - my_system ("$MAKE -C .. " . join(' ', @todo)); -} - -my @texstuff = ("mudela-man", "mudela-course"); - -sub gen_manuals -{ - print "generating TeX doco list\n"; - open HTMLLIST, ">tex_manuals.html"; - print HTMLLIST "PostScript Manuals\n" ; - print HTMLLIST "

LilyPond manuals (in PostScript)

"; - print HTMLLIST "
    \n"; - my @todo=(); - foreach $a (@texstuff) { - push @todo , "out/$a.ps.gz"; - print HTMLLIST "
  • $a.ps.gz"; - } - print HTMLLIST "
"; - - print HTMLLIST ""; - close HTMLLIST; - - my_system( "$MAKE -C .. " . join(' ', @todo)); -} - -sub gen_list -{ - print "generating HTML list\n"; - open HTMLLIST, ">example_output.html"; - - print HTMLLIST "Rendered Examples\n -These example files are taken from the LilyPond distribution. -LilyPond currently only outputs TeX and MIDI. The pictures and -PostScript files were generated using TeX, Ghostscript and some -graphics tools. The papersize used for these examples is A4. The GIF -files have been scaled to eliminate aliasing."; - - - - foreach $a (@examples) - { - $name=$a; print HTMLLIST "

example file: $name

\n\n"; - - open IF, "$depth/input/$a.ly"; - input_record_separator IF "\n}"; - - $desc = <IF>; - close IF; - - print HTMLLIST "$desc\n"; - - $inputf="$a.ly.txt"; - $giff="$a.gif"; - $jpegf="$a.jpeg"; - $pngf = "$a.png"; - $psf="$a.ps.gz"; - $midif="$a.midi"; - - print HTMLLIST ""; - } - print HTMLLIST ""; - close HTMLLIST; -} - -sub edit_html -{ - print STDERR "adding footer\n"; - - OUTER: - foreach $a (<*.html>) { - open H, "$a"; - my $sep=""; - input_record_separator H $sep; - my $file=""; - - while () { - if (/$mw_id/) { - close H; - next OUTER; - } - $file .= $_; - - } - close H; - - my $subst = $footstr; - $subst .= $back if (! $a =~ /index.html/ ); - $file =~ s/$sep/$subst$sep/g ; - $file =~ s/\.gif/\.$image/g; - $file =~ s!(.*)!LilyPond WWW: $1!g; - open H, ">$a"; - print H $mw_id; - - print H $file; - close H; - } -} - -sub copy_txt_file -{ - my ($f) = @_; - my $d = $f; - $d =~ s!^.*\/!!; - if (! $f =~ /.txt$/) { - $d = "$f.txt"; - } - print, $d; -} - -sub top_of_NEWS -{ - open NEWS, "NEWS.txt"; - input_record_separator NEWS "****"; - $desc = ; - chop ($desc); - close NEWS; - - return $desc; -} - -sub edit_index -{ - $ton = top_of_NEWS(); - $ton = "\n\n$ton\n\n"; - open INDEX, "index.html"; - input_record_separator NEWS undef; - $index = ; - close INDEX; - $index =~ s/top_of_NEWS/$ton/; - open INDEX, ">index.html"; - print INDEX $index; - close INDEX; -} - - -sub copy_files -{ - print "copying files\n"; - my_system "ln -s $depth/out ./docxx" if ( ! -x "docxx" ) ; - my_system "cp $depth/TODO ./TODO.txt", - "cp $depth/ANNOUNCE ./ANNOUNCE.txt", - "cp $depth/NEWS ./NEWS.txt", - "cp $depth/DEDICATION ./DEDICATION.txt"; - my_system "make -C .. gifs"; - -} - -sub set_images -{ - for $a (<*.gif>) { - if ($opt_png) { - my_system "gif2png -d $a"; - } - if ($opt_jpeg) { - my $b=$a; - $b =~ s/.gif/.jpeg/; - my_system "cjpeg -o $b $a"; - } - } -} - -sub docxx_update -{ - open BANNER, ">/tmp/lilybanner.html"; - my $ban = $footstr; - $ban =~ s!index.html!../index.html!g; - print BANNER $ban; - close BANNER; - my_system("BANNEROPT=\"-B /tmp/lilybanner.html\" $depth/bin/out/make-docxx"); - unlink "/tmp/lilybanner.html"; -} - -sub do_tar -{ - print "tarring.\n"; - $files = join (' ', < *.html *.$image *.ps.gz *.txt *.midi docxx/*>); - my_system - "-$TAR zvhcf website.tar.gz $files;", -# "gzip -f9 website.tar;"; -} - -sub identify -{ - print STDERR "This is " . $id_str . "\n"; - -} -sub clean_tmp -{ - @a = ; - unlink @a; -} - -sub main -{ - identify; - GetOptions("jpeg", "gif", "png", "noexamples"); - - local $image="gif" ; - $image = "png" if ($opt_png); - $image = "jpeg" if ($opt_jpeg); - - $depth = "../"; - my $cwd; - chomp($cwd = `pwd`); - die "need to be in directory Documentation\n" if ( ! ($cwd =~ /Documentation$/)); - get_version; - print "lily v. " . $lily_version . "\n"; - set_html_footer; - - - $depth = "../../"; - - chdir ("out"); - $ENV{"TEXINPUTS"} .= ":$depth/input/:"; - $ENV{"LILYINCLUDE"} = "$depth/input/"; - $ENV{"LILYTOP"} = $depth; - - gen_html; - copy_files; - - if (! $opt_noexamples) { - gen_examples; - gen_list; - gen_manuals; - } - set_images; - - edit_html; - edit_index; - docxx_update; - do_tar; - clean_tmp; -} - -main; diff --git a/bin/make-website.py b/bin/make-website.py new file mode 100644 index 0000000000..52bc149378 --- /dev/null +++ b/bin/make-website.py @@ -0,0 +1,261 @@ +#!@PYTHON@ +# +# make-website.py -- implement The lilypond WWW site +# +# source file of the GNU LilyPond music typesetter +# +# (c) 1997 Han-Wen Nienhuys +# + +""" + stupid script to generate WWW site. + + The WWW site is my test-suite for LilyPond, I usually don't + distribute versions that fail to complete this script """ + +from lilypython import * +import __main__ +import glob + +depth = '' +makewebsite_id = ""; +id_str = "make-website 0.6"; +tar = "tar"; +make = "make"; +mailaddress = "unknown" +fullname = "unknown" +footstr = "" +lilyversion= '' + +def set_vars(): + __main__.lilyversion = version_tuple_to_str(lilydirs.version_tuple()) + os.environ["TEXINPUTS"] = os.environ["TEXINPUTS"] + ":%s/input/:" % depth; + os.environ["LILYINCLUDE"] = "%s/input/" % depth; + os.environ["LILYTOP"] = depth; + __main__.mailaddress= os.environ['MAILADDRESS'] + pw = pwd.getpwuid (os.getuid()); + + __main__.fullname= pw[4]; + +backstr = '\n
Please take me back to the index\n\ +of LilyPond -- The GNU Project Music typesetter\n\ +
\n\ +This page was built using %s from lilypond-%s by

\n\ +


%s ><%s>
\n\ +

' + + +def footstr(index): + return backstr % (index, id_str, lilyversion, fullname, mailaddress, mailaddress) + + + +# do something, check return status +def my_system(cmds): + for cmd in cmds: + ignoreret=0; + if cmd[0] == '-': + ignoreret = 1 + cmd = cmd[1:] + + ret = os.system (cmd) + if ret: + if ignoreret: + sys.stderr.write( "ignoring failed command \`%s\' (status %d)\n" % (cmd, ret)) + else: + sys.stderr.write( 'make-website: failed on command %s (status %d)\n' % (cmd, ret)) + sys.exit (2) + +base="lilypond/"; + +examples=["twinkle-pop", + "wtk1-fugue2", + "standchen-16", + "standchen-20", + "wtk1-prelude1", + "toccata-fuga-E", + "scsii-menuetto", + "cadenza", + "gallina", + "twinkle", + "collisions", + "font", + "font20", + #"scales", + "rhythm", + "multi"] + +def gen_html(): + print 'generating HTML' + my_system (["make -kC .. html"]); + + +def gen_examples(): + print 'generating examples:\n' + list = map(lambda x: 'out/%s.ps.gz out/%s.gif out/%s.ly.txt' % (x,x,x), examples) + my_system (['make -C .. ' + join(' ', list)]) + +texstuff = ["mudela-man", "mudela-course"] + +def gen_manuals(): + print 'generating TeX doco manuals' + list = open('tex_manuals.html', 'w') + list.write( "PostScript Manuals\n" + "

LilyPond manuals (in PostScript)

" + "
    \n") + todo='' + for stuff in texstuff: + todo = todo + ' out/' + stuff + '.ps.gz' + list.write("
  • %s.ps.gz" % (stuff, stuff)) + list.write('
') + list.close () + + my_system (['make -C .. ' + todo]) + +def file_exist_b(name): + try: + f = open(name) + except IOError: + return 0 + f.close () + return 1 + +def gen_list(): + print "generating HTML list\n"; + list = open('example_output.html', 'w') + list.write ('Rendered Examples\n' + 'These example files are taken from the LilyPond distribution.\n' + 'LilyPond currently only outputs TeX and MIDI. The pictures and\n' + 'PostScript files were generated using TeX, Ghostscript and some\n' + 'graphics tools. The papersize used for these examples is A4. The GIF\n' + 'files have been scaled to eliminate aliasing.\n'); + + for ex in examples: + header = read_mudela_header(ex + '.ly.txt') + def read_dict(s, default, h =header): + try: + ret = h[s] + except KeyError: + ret = default + return ret + head = read_dict('title', ex) + composer = read_dict('composer', '') + desc = read_dict('description', '') + list.write('
') + list.write('

example file: %s

' % head); + if composer <> '': + list.write('

%s

\n' % composer) + if desc <> '': + list.write('%s

' % desc) + list.write ('

    ') + def list_item(filename, desc, l = list): + if file_exist_b(filename): + l.write ('
  • %s\n' % (filename, desc)) + + list_item(ex + '.ly.txt', 'The input') + for pageno in range(1,10): + f = ex + '-page%d.gif' % pageno + if not file_exist_b (f): + break + list_item(f, 'The output (picture, page %d)' % pageno) + list_item(ex + '.ps.gz', 'The output (gzipped PostScript)') + list_item(ex + '.midi', 'The output (MIDI)') + list.write ("
"); + + list.write( ""); + list.close() + +def copy_files(): + print "copying files\n" + +# my_system ("ln -s depth/out ./docxx" ) + my_system([ "cp %s/TODO ./TODO.txt" % depth, + "cp %s/ANNOUNCE-0.1 ./ANNOUNCE.txt" % depth, + "cp %s/NEWS ./NEWS.txt" % depth, + "cp %s/DEDICATION ./DEDICATION.txt" % depth]); + my_system([ "make -C .. gifs"]); + +def docxx_update(): + print 'docxx.. \n' + banner= open('/tmp/lilybanner.html', 'w'); + banner.write (footstr('../index.html')) + banner.close () + my_system(['BANNEROPT=\"-B /tmp/lilybanner.html\" %s/bin/out/make-docxx' % depth]); +# os.unlink( "/tmp/lilybanner.html"); + +def get_glob(exts): + result = [] + for a in exts: + result = result + glob.glob1('./', '*.' + a) + + return result + +def join(inter, list): + return reduce (lambda x,y, i=inter: x + i + y, list) + +def do_tar(): + print "tarring.\n"; + list = get_glob( ['html', 'gif', 'ps.gz' , 'txt', 'midi']) + files = join (' ', list) + print files + my_system( ['-tar zvhcf website.tar.gz ' + files + ' docxx/*']) + + +def identify(): + print 'This is %s\n' % id_str + +def clean_tmp(): + my_system(['rm -f /tmp/gs*']) + +def get_top_of_NEWS(): + i = open('NEWS.txt') + lines = i.readlines() + i.close () + s = '' + for l in lines: + if regex.search('^\*\*\*\*\*\*', l) <> -1: + return s; + s = s + l + return s + +def edit_index(): + s = gulp_file('index.html') + s = regsub.sub ('top_of_NEWS', '\n' + get_top_of_NEWS () + '\n', s) + dump_file ('index.html', s) + +def edit_html(): + files = get_glob(['html']) + for f in files: + + s = gulp_file(f) + if regex.search(makewebsite_id, s) <> -1: + continue; + + s = regsub.sub ('', footstr('index.html') + makewebsite_id + '', s) + s = regsub.sub('\(.*\)$', + 'LilyPond WWW: \\1', s) + dump_file (f,s) + +def main(): + identify(); + + os.chdir (lilydirs.topdir + 'Documentation/out') + __main__.depth = "../../"; + + set_vars(); + gen_html(); + copy_files(); + gen_examples(); + gen_list(); + gen_manuals(); + #set_images(); + edit_html(); + edit_index(); + docxx_update() + do_tar() + clean_tmp(); + + +main() + + diff --git a/bin/mudela-book.pl b/bin/mudela-book.pl index 9aec75cb60..37206c3c81 100644 --- a/bin/mudela-book.pl +++ b/bin/mudela-book.pl @@ -34,9 +34,13 @@ sub gen_mufile return "$outdir/$outname$mudcount.ly"; } +sub gen_texbase +{ + return "$outname$mudcount.tex"; +} sub gen_texfile { - return "$outdir/$outname$mudcount.tex"; + return "$outdir/" . gen_texbase; } sub close_mudela @@ -64,7 +68,7 @@ sub close_mudela if ( ! -f gen_texfile) { my_system "lilypond ". gen_mufile; - rename "lelie.tex", gen_texfile; + rename gen_texbase, gen_texfile; } print BOOK "\\preexample\\input " . gen_texfile . "\n\\postexample\n"; diff --git a/bin/ps-to-gifs.sh b/bin/ps-to-gifs.sh new file mode 100644 index 0000000000..dc51988675 --- /dev/null +++ b/bin/ps-to-gifs.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +usage() +{ + echo 'ps-to-gifs.sh FILE.ps' + exit 2; +} + +case $# in +1) + FILE=`basename $1 .ps` + ;; +*) + usage + ;; +esac + +# generate the pixmap at twice the size, then rescale (for antialiasing) +cat $1 | gs -q -sDEVICE=ppmraw \ + -sOutputFile="|pnmscale 0.5|ppmtogif > $FILE-page%d.gif" \ + -r200 -dNOPAUSE - -c quit + + + diff --git a/configure b/configure index dfc33d3ad9..dc086365e8 100755 --- a/configure +++ b/configure @@ -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. (obsolete)" + mf-dir=DIR set the directory to put LilyPond MetaFont files in. " ac_help="$ac_help out-dir set the directory for machine generated files. Default out or out-HOST" diff --git a/configure.in b/configure.in index ee5bc6a4f7..a971abbae7 100644 --- a/configure.in +++ b/configure.in @@ -63,7 +63,7 @@ AC_ARG_ENABLE(tex-dir, [TEXDIR=auto] ) AC_ARG_ENABLE(mf-dir, - [ mf-dir=DIR set the directory to put LilyPond MetaFont files in. (obsolete)], + [ mf-dir=DIR set the directory to put LilyPond MetaFont files in. ], [MFDIR=$enableval], [MFDIR=auto]) diff --git a/debian/Makefile b/debian/Makefile index 6bb008a5cd..7f35925fb6 100644 --- a/debian/Makefile +++ b/debian/Makefile @@ -15,5 +15,5 @@ include ./$(depth)/make/Rules.make # -EXTRA_DISTFILES = README.debian TODO changelog control copyright \ +EXTRA_DISTFILES = README.Debian TODO changelog control copyright \ info.ex menu.ex postinst postinst.old.sh postrm preinst rules watch diff --git a/debian/README.debian b/debian/README.Debian similarity index 100% rename from debian/README.debian rename to debian/README.Debian diff --git a/flower/NEWS b/flower/NEWS index 5610f02a09..f7db23a49c 100644 --- a/flower/NEWS +++ b/flower/NEWS @@ -1,3 +1,7 @@ +pl 33 + - String naming + - unix style paths + pl 32 - Assoc::clear - bf: Assoc[PreviouslyUsedAndDeletedKey] = foo diff --git a/flower/VERSION b/flower/VERSION index 942ef52905..636df4b25f 100644 --- a/flower/VERSION +++ b/flower/VERSION @@ -1,6 +1,6 @@ MAJOR_VERSION = 1 MINOR_VERSION = 1 -PATCH_LEVEL = 32 +PATCH_LEVEL = 33 # use to send patches, always empty for released version: MY_PATCH_LEVEL = # include separator: "-1" or ".a" # diff --git a/flower/dstream.cc b/flower/dstream.cc index 4d7ec7e7a9..f22365bf55 100644 --- a/flower/dstream.cc +++ b/flower/dstream.cc @@ -71,7 +71,7 @@ Dstream::identify_as (String name) } bool -Dstream::silence (String s) +Dstream::silent_b (String s) const { if (!silent_assoc_p_->elt_b (s)) return false; diff --git a/flower/include/dstream.hh b/flower/include/dstream.hh index 4d14ae34ec..752b78bca4 100644 --- a/flower/include/dstream.hh +++ b/flower/include/dstream.hh @@ -42,7 +42,7 @@ class Dstream Assoc *silent_assoc_p_; public: void clear_silence(); - bool silence (String); + bool silent_b (String) const; /** if rcfile == 0, then do not read any rc file. diff --git a/flower/include/path.hh b/flower/include/path.hh index 1f3a5eb97a..caa6bbb752 100644 --- a/flower/include/path.hh +++ b/flower/include/path.hh @@ -26,12 +26,13 @@ class File_path : private Array { public: - /// locate a file in the search path - String find (String nm) const; + /// locate a file in the search path + String find (String nm) const; - /// add to end of path. - Array::push; - void add (String str) { push (str); } + /// add to end of path. + Array::push; + void add (String str) { push (str); } + void parse_path (String); }; /** split a path into its components. diff --git a/flower/include/string.hh b/flower/include/string.hh index 91342a1de3..067ea3358e 100644 --- a/flower/include/string.hh +++ b/flower/include/string.hh @@ -130,7 +130,7 @@ public: /// return a piece starting at index_i (first char = index_i 0), length n - String mid_str (int index_i, int n) const; + String cut (int index_i, int n) const; /// cut out a middle piece, return remainder String nomid_str (int index_i, int n) const; @@ -141,10 +141,14 @@ public: /// index of rightmost c int index_last_i (char c) const; - /// index of rightmost element of string + /// index of rightmost element of string (???) int index_last_i (char const* string) const; + /// index of leftmost #c# int index_i (char c) const; + + + /// index of leftmost occurance of STRING int index_i (String) const; int index_any_i (String) const; diff --git a/flower/path.cc b/flower/path.cc index b69d85d77a..a499d0abf4 100644 --- a/flower/path.cc +++ b/flower/path.cc @@ -5,8 +5,12 @@ #include "path.hh" #include "flower-debug.hh" +#ifndef DIRSEP +#define DIRSEP '/' +#endif + #ifndef PATHSEP -#define PATHSEP '/' +#define PATHSEP ':' #endif /** @@ -15,40 +19,58 @@ */ void split_path (String path, - String &drive, String &dirs, String &filebase, String &extension) + String &drive, String &dirs, String &filebase, String &extension) { // peel off components, one by one. int di = path.index_i (':'); if (di >= 0) - { - drive = path.left_str (di + 1); - path = path.right_str (path.len() - di -1); - } + { + drive = path.left_str (di + 1); + path = path.right_str (path.len() - di -1); + } else - drive = ""; + drive = ""; - di = path.index_last_i (PATHSEP); + di = path.index_last_i (DIRSEP); if (di >=0) - { - dirs = path.left_str (di + 1); - path = path.right_str (path.len()-di -1); - } + { + dirs = path.left_str (di + 1); + path = path.right_str (path.len()-di -1); + } else - dirs = ""; + dirs = ""; di = path.index_last_i ('.'); if (di >= 0) - { - filebase = path.left_str (di); - extension =path.right_str (path.len()-di); - } + { + filebase = path.left_str (di); + extension =path.right_str (path.len()-di); + } else - { - extension = ""; - filebase = path; - } + { + extension = ""; + filebase = path; + } } +void +File_path::parse_path (String p) +{ + int l; + + while ( (l = p.length_i ()) ) + { + int i = p.index_i(PATHSEP); + if (i <0) + i = l; + add (p.left_str(i)); + p = p.right_str (l- i - 1); + } +} + + + + /** find a file. It will search in the current dir, in the construction-arg, and in any other added path, in this order. @@ -59,25 +81,24 @@ File_path::find (String nm) const { fdebug << _("looking for ") << nm << ": "; if (!nm.length_i() || (nm == "-") ) - return nm; + return nm; for (int i=0; i < size(); i++) { + String path = elem(i); + if (path.length_i() ) + path += "/"; - String path = elem(i); - if (path.length_i() ) - path += "/"; + path += nm; - path += nm; - - fdebug << path << "? "; - FILE *f = fopen (path.ch_C(), "r"); // ugh! - if (f) - { - fdebug << _("found\n"); - fclose (f); - return path; - } - } + fdebug << path << "? "; + FILE *f = fopen (path.ch_C(), "r"); // ugh! + if (f) + { + fdebug << _("found\n"); + fclose (f); + return path; + } + } fdebug << "\n"; return ""; } diff --git a/flower/string-convert.cc b/flower/string-convert.cc index ab7c6ab3e6..a8f6619048 100644 --- a/flower/string-convert.cc +++ b/flower/string-convert.cc @@ -31,8 +31,8 @@ String_convert::bin2hex_str (String bin_str) Byte const* byte_C = bin_str.byte_C(); for (int i = 0; i < bin_str.length_i(); i++) { - str += (char)nibble2hex_byte (*byte_C >> 4); - str += (char)nibble2hex_byte (*byte_C++); + str += (char)nibble2hex_byte (*byte_C >> 4); + str += (char)nibble2hex_byte (*byte_C++); } return str; } @@ -51,8 +51,8 @@ String_convert::bin2_u (String bin_str) unsigned result_u = 0; for (int i = 0; i < bin_str.length_i(); i++) { - result_u <<= 8; - result_u += (Byte)bin_str[ i ]; + result_u <<= 8; + result_u += (Byte)bin_str[ i ]; } return result_u; } @@ -62,7 +62,7 @@ int String_convert::dec2_i (String dec_str) { if (!dec_str.length_i()) - return 0; + return 0; long l = 0; int conv = sscanf (dec_str.ch_C(), "%ld", &l); @@ -76,7 +76,7 @@ String_convert::i64_str (I64 i64, char const* fmt) { char buffer[STRING_BUFFER_LEN]; snprintf (buffer, STRING_BUFFER_LEN, - (fmt ? fmt : "%Ld"), i64); // assume radix 10 + (fmt ? fmt : "%Ld"), i64); // assume radix 10 return String (buffer); } @@ -85,7 +85,7 @@ double String_convert::dec2_f (String dec_str) { if (!dec_str.length_i()) - return 0; + return 0; double d = 0; int conv = sscanf (dec_str.ch_C(), "%lf", &d); assert (conv); @@ -96,7 +96,7 @@ int String_convert::hex2bin_i (String hex_str, String& bin_str_r) { if (hex_str.length_i() % 2) - hex_str = "0" + hex_str; + hex_str = "0" + hex_str; bin_str_r = ""; Byte const* byte_C= hex_str.byte_C(); @@ -106,7 +106,7 @@ String_convert::hex2bin_i (String hex_str, String& bin_str_r) int high_i = hex2nibble_i (*byte_C++); int low_i = hex2nibble_i (*byte_C++); if (high_i < 0 || low_i < 0) - return 1; // illegal char + return 1; // illegal char bin_str_r += String ((char)(high_i << 4 | low_i), 1 ); i += 2; } @@ -117,8 +117,8 @@ String String_convert::hex2bin_str (String hex_str) { String str; -// silly, asserts should alway be "on"! -// assert (!hex2bin_i (hex_str, str) ); + // silly, asserts should alway be "on"! + // assert (!hex2bin_i (hex_str, str) ); int error_i = hex2bin_i (hex_str, str); assert (!error_i); return str; @@ -128,11 +128,11 @@ int String_convert::hex2nibble_i (Byte byte) { if (byte >= '0' && byte <= '9') - return byte - '0'; + return byte - '0'; if (byte >= 'A' && byte <= 'F') - return byte - 'A' + 10; + return byte - 'A' + 10; if (byte >= 'a' && byte <= 'f') - return byte - 'a' + 10; + return byte - 'a' + 10; return -1; } @@ -142,7 +142,7 @@ String_convert::i2dec_str (int i, int length_i, char ch) { char fill_ch = ch; if (fill_ch) - fill_ch = '0'; + fill_ch = '0'; // ugh String dec_str (i); @@ -158,13 +158,13 @@ String_convert::u2hex_str (unsigned u, int length_i, char fill_ch) { String str; if (!u) - str = "0"; + str = "0"; #if 1 // both go... while (u) { - str = String ((char)((u % 16)["0123456789abcdef"] ) ) + str; - u /= 16; + str = String ((char)((u % 16)["0123456789abcdef"] ) ) + str; + u /= 16; } #else str += int_str (u, "%x"); // hmm. %lx vs. %x -> portability? @@ -172,7 +172,7 @@ String_convert::u2hex_str (unsigned u, int length_i, char fill_ch) str = String (fill_ch, length_i - str.length_i()) + str; while ((str.length_i() > length_i) && (str[ 0 ] == 'f' ) ) - str = str.mid_str (2, INT_MAX); + str = str.cut (2, INT_MAX); return str; } @@ -187,9 +187,9 @@ Byte String_convert::nibble2hex_byte (Byte byte) { if ((byte & 0x0f) <= 9 ) - return (byte & 0x0f) + '0'; + return (byte & 0x0f) + '0'; else - return (byte & 0x0f) - 10 + 'a'; + return (byte & 0x0f) - 10 + 'a'; } /** Convert an integer to a string @@ -202,7 +202,7 @@ String_convert::int_str (int i, char const* fmt) { char buffer[STRING_BUFFER_LEN]; snprintf (buffer, STRING_BUFFER_LEN, - (fmt ? fmt : "%d"), i); // assume radix 10 + (fmt ? fmt : "%d"), i); // assume radix 10 return String (buffer); } @@ -245,12 +245,12 @@ String_convert::rational_str (Rational r) String s = n; if (r.denominator() != 1) { - char * d = Itoa (r.denominator()); - s += String ('/') + String (d); - //delete d; + char * d = Itoa (r.denominator()); + s += String ('/') + String (d); + //delete d; } -/* delete n; - */ + /* delete n; + */ return s; } diff --git a/flower/string.cc b/flower/string.cc index 74ae9a7865..2076a2a19b 100644 --- a/flower/string.cc +++ b/flower/string.cc @@ -34,10 +34,10 @@ void String::print_on (ostream& os) const { if (!strh_.is_binary_bo()) - os << ch_C(); + os << ch_C(); else - for (int i = 0; i < length_i(); i++) - os << (Byte)(*this)[ i ]; + for (int i = 0; i < length_i(); i++) + os << (Byte)(*this)[ i ]; } /* @@ -153,7 +153,7 @@ String::compare_i (String const& s1, String const& s2) Byte const* p1 = s1.byte_C(); Byte const* p2 = s2.byte_C(); if (p1 == p2) - return 0; + return 0; int i1 = s1.length_i(); int i2 = s2.length_i(); @@ -167,12 +167,12 @@ int String::index_last_i (char const c) const { if (!length_i()) - return -1; + return -1; char const* me = strh_.ch_C(); char const* p = memrchr (me, length_i(), c); if (p) - return p - me; + return p - me; return -1; } @@ -182,17 +182,17 @@ String::index_last_i (char const* string) const // UGK! assert (false); // broken int length = strlen (string); // ugrh if (!length_i() || !length) - return -1; + return -1; int next_i = index_i (string); if (next_i == -1) - return -1; + return -1; int index_i = 0; while (next_i >= 0) { - index_i += next_i; - next_i = right_str (length_i() - index_i - length).index_i (string ); + index_i += next_i; + next_i = right_str (length_i() - index_i - length).index_i (string ); } return index_i; } @@ -211,7 +211,7 @@ String::index_i (char c) const char const* me = strh_.ch_C(); char const* p = (char const *) memchr (me,c, length_i()); if (p) - return p - me; + return p - me; return -1; } @@ -226,12 +226,12 @@ String::index_i (String searchfor) const { char const* me = strh_.ch_C(); char const* p = (char const *) memmem ( - me, length_i(), searchfor.ch_C(), searchfor.length_i ()); + me, length_i(), searchfor.ch_C(), searchfor.length_i ()); if (p) - return p - me; + return p - me; else - return -1; + return -1; } /** find chars of a set. @@ -244,16 +244,16 @@ String::index_any_i (String set) const { int n = length_i(); if (!n) - return -1; + return -1; void const * me_l = (void const *) strh_.ch_C(); for (int i=0; i < set.length_i(); i++) { - char * found=(char*) memchr (me_l, set[i], n ); - if (found) - { - return found - me_l; - } + char * found=(char*) memchr (me_l, set[i], n ); + if (found) + { + return found - me_l; + } } return -1; } @@ -262,11 +262,11 @@ String String::left_str (int n) const { if (n >= length_i()) - return *this; + return *this; String retval; if (n < 1) - return retval; + return retval; retval = *this; retval.strh_.trunc (n); @@ -277,10 +277,10 @@ String String::right_str (int n) const { if (n > length_i()) - return *this; + return *this; if (n < 1) - return ""; + return ""; return String (strh_.byte_C() + length_i() - n, n); } @@ -291,34 +291,31 @@ String::nomid_str (int index_i, int n) const { if (index_i < 0) { - n += index_i; - index_i = 0; + n += index_i; + index_i = 0; } if (n <= 0) - return *this; + return *this; return - left_str (index_i) + - right_str (length_i() - index_i - n) ; + left_str (index_i) + + right_str (length_i() - index_i - n) ; } -/* - proposal: change to "cut()" - */ String -String::mid_str (int index_i, int n) const +String::cut (int index_i, int n) const { if (index_i <0) { - n += index_i; - index_i=0; + n += index_i; + index_i=0; } if (!length_i() || (index_i < 0) || (index_i >= length_i () ) || (n < 1 ) ) - return String(); + return String(); if ((n > length_i()) || (index_i + n > length_i () ) ) - n = length_i() - index_i; + n = length_i() - index_i; return String (byte_C() + index_i, n); } diff --git a/init/engraver.ly b/init/engraver.ly index eebafed3fd..e8869c0de9 100644 --- a/init/engraver.ly +++ b/init/engraver.ly @@ -81,8 +81,8 @@ Score = \translator { \type Score_engraver; \consists "Timing_engraver"; - \consists "Bar_column_engraver"; - \consists "Bar_number_engraver"; + %\consists "Bar_column_engraver"; + %\consists "Bar_number_engraver"; \consists "Span_score_bar_engraver"; \consists "Score_priority_engraver"; diff --git a/init/feta16.ly b/init/feta16.ly index ca8ce0a267..8cee634ab2 100644 --- a/init/feta16.ly +++ b/init/feta16.ly @@ -1,5 +1,5 @@ % Creator: mf-to-table.py version 0.4 -% Automatically generated on Mon Dec 29 10:52:00 1997 +% Automatically generated on Mon Jan 5 15:23:51 1998 % Do not edit % input from out/feta16.log % name=\symboltables { @@ -53,7 +53,7 @@ "upbow" "\\upbow" -2.60\pt 2.60\pt -0.00\pt 8.32\pt "downbow" "\\downbow" -3.00\pt 3.00\pt -0.00\pt 5.33\pt "turn" "\\turn" -4.38\pt 4.38\pt -2.12\pt 2.12\pt - "trill" "\\trill" -0.00\pt 8.00\pt -0.00\pt 9.00\pt + "trill" "\\trill" -4.00\pt 4.00\pt -0.00\pt 9.00\pt "pedalheel" "\\pedalheel" -2.00\pt 2.00\pt -2.00\pt 2.67\pt "pedaltoe" "\\pedaltoe" -2.00\pt 2.00\pt -0.00\pt 6.00\pt "flageolet" "\\flageolet" -2.13\pt 2.13\pt -2.13\pt 2.13\pt @@ -73,7 +73,7 @@ "alto_change" "\\caltoclef" -3.20\pt 11.91\pt -6.40\pt 6.40\pt "bass" "\\bassclef" -2.00\pt 14.40\pt -10.00\pt 4.00\pt "bass_change" "\\cbassclef" -1.60\pt 11.52\pt -8.00\pt 3.20\pt - "violin" "\\violinclef" -4.11\pt 14.95\pt -12.00\pt 20.00\pt - "violin_change" "\\cviolinclef" -3.53\pt 11.72\pt -9.60\pt 16.00\pt + "violin" "\\violinclef" -3.49\pt 14.95\pt -12.00\pt 20.00\pt + "violin_change" "\\cviolinclef" -3.03\pt 11.72\pt -9.60\pt 16.00\pt } % } % $name diff --git a/init/feta20.ly b/init/feta20.ly index 7c855c23d3..af554f556a 100644 --- a/init/feta20.ly +++ b/init/feta20.ly @@ -1,5 +1,5 @@ % Creator: mf-to-table.py version 0.4 -% Automatically generated on Mon Dec 29 10:52:03 1997 +% Automatically generated on Mon Jan 5 15:23:56 1998 % Do not edit % input from out/feta20.log % name=\symboltables { @@ -53,7 +53,7 @@ "upbow" "\\upbow" -3.25\pt 3.25\pt -0.00\pt 10.40\pt "downbow" "\\downbow" -3.75\pt 3.75\pt -0.00\pt 6.67\pt "turn" "\\turn" -5.47\pt 5.47\pt -2.65\pt 2.65\pt - "trill" "\\trill" -0.00\pt 10.00\pt -0.00\pt 11.25\pt + "trill" "\\trill" -5.00\pt 5.00\pt -0.00\pt 11.25\pt "pedalheel" "\\pedalheel" -2.50\pt 2.50\pt -2.50\pt 3.33\pt "pedaltoe" "\\pedaltoe" -2.50\pt 2.50\pt -0.00\pt 7.50\pt "flageolet" "\\flageolet" -2.67\pt 2.67\pt -2.67\pt 2.67\pt @@ -73,7 +73,7 @@ "alto_change" "\\caltoclef" -4.00\pt 14.89\pt -8.00\pt 8.00\pt "bass" "\\bassclef" -2.50\pt 18.00\pt -12.50\pt 5.00\pt "bass_change" "\\cbassclef" -2.00\pt 14.40\pt -10.00\pt 4.00\pt - "violin" "\\violinclef" -5.14\pt 18.69\pt -15.00\pt 25.00\pt - "violin_change" "\\cviolinclef" -4.41\pt 14.65\pt -12.00\pt 20.00\pt + "violin" "\\violinclef" -4.36\pt 18.69\pt -15.00\pt 25.00\pt + "violin_change" "\\cviolinclef" -3.79\pt 14.65\pt -12.00\pt 20.00\pt } % } % $name diff --git a/init/script.ly b/init/script.ly index 3ccbb82b2e..8db8016258 100644 --- a/init/script.ly +++ b/init/script.ly @@ -51,4 +51,6 @@ rftoe = \script { "ftoe" 0 0 1 0 0 } back = \script { "back" 0 -1 -1 0 0 } front = \script { "front" 0 -1 1 0 0 } -trill =\script { "trill" 0 0 1 0 0 } +trill =\script { "trill" 0 0 1 0 + 2000 % be above text. +} diff --git a/init/table20.ly b/init/table20.ly index 7015bf914a..6742e05630 100644 --- a/init/table20.ly +++ b/init/table20.ly @@ -51,12 +51,12 @@ table_twenty = "empty" "\emptybar" "" "" 0.0\pt 0.0\pt 0.0\pt 16.0\pt "|" "\maatstreep{%}" 0.0\pt 0.64\pt 0.0\pt 20.0\pt - "||" "\doublebar{%}" 0.0\pt 4.0\pt 0.0\pt 20.0\pt - "|." "\finishbar{%}" 0.0\pt 2.0\pt 0.0\pt 20.0\pt + "||" "\doublebar{%}" 0.0\pt 5.0\pt 0.0\pt 20.0\pt + "|." "\finishbar{%}" -5.0\pt 0.0\pt 0.0\pt 20.0\pt ".|" "\startbar{%}" 0.0\pt 4.0\pt 0.0\pt 20.0\pt - ":|" "\repeatbar" -8.0\pt 0.0\pt 0.0\pt 20.0\pt - "|:" "\startrepeat" 0.0\pt 8.0\pt 0.0\pt 20.0\pt - ":|:" "\repeatbarstartrepeat" 0.0\pt 16.0\pt 0.0\pt 20.0\pt + ":|" "\repeatbar" -10.0\pt 0.0\pt 0.0\pt 20.0\pt + "|:" "\startrepeat" 0.0\pt 10.0\pt 0.0\pt 20.0\pt + ":|:" "\repeatbarstartrepeat" 0.0\pt 20.0\pt 0.0\pt 20.0\pt } "meters" = \table { diff --git a/input/beams.ly b/input/beams.ly index 9453f0da6f..64db731f8e 100644 --- a/input/beams.ly +++ b/input/beams.ly @@ -38,7 +38,7 @@ TestedFeatures = "beams and beamflags"; r32 } - { \octave c'; + { \octave c'; \meter 8/4; \duration8; \stemdown [a' 'a c e] @@ -64,21 +64,28 @@ TestedFeatures = "beams and beamflags"; \duration 128; \stemdown [d'' d'' d'' d''] r32 + } > - { + + {\duration "last"; % ugh, "duration mode" - \duration 8; + [g8 g] [a a] [b b] [c' c'] - \duration 16; - [g16 g g g] [a a a a] [b b b b] [c' c' c' c'] - \meter 4/4; - \duration 32; - [g32 g g g g g g g] [a a a a a a a a] - [b b b b b b b b] [c' c' c' c' c' c' c' c'] - \duration 64; - \meter 2/4; - [g64 g g g g g g g g g g g g g g g] - [c' c' c' c' c' c' c' c' c' c' c' c' c' c' c' c'] + + [g16 g ] [a a] [b b] [c' c'] + [g32 g] [a a] [b b] [c' c'] + + [g64 g ] [c' c' ] + } + { + \transpose d { + \octave c'''; + | [g8 g] [a a] [b b] [c' c'] + [g16 g ] [a a] [b b] [c' c'] + [g32 g] [a a] [b b] [c' c'] + [g64 g] + [c' c'] + } } } \paper{ diff --git a/input/collisions.ly b/input/collisions.ly index 861ec2d936..cf6c5ad39d 100644 --- a/input/collisions.ly +++ b/input/collisions.ly @@ -81,6 +81,7 @@ restsII = \melodic { \two_voice_steminvert \three_voice \rests + % UGH ! bug! %\restsII } diff --git a/input/font.ly b/input/font.ly index 1ba29f30b2..f1f1e8a006 100644 --- a/input/font.ly +++ b/input/font.ly @@ -1,10 +1,10 @@ \header{ -title= "The Feta font"; +title= "The Feta Font"; subtitle = "proofsheet"; -enteredby = "jcn"; +enteredby = "jcn & hwn"; copyright = "public domain"; -TestedFeatures = "This file tests the Feta music-font" - "(Feta definitively is not an abbreviation of Font-En-TjA)"; +description = "This file tests the Feta music font"; +% "(Feta definitively is not an abbreviation of Font-En-TjA)"; } \version "0.1.7"; diff --git a/input/font20.ly b/input/font20.ly index a0c2192c45..c83989e8e0 100644 --- a/input/font20.ly +++ b/input/font20.ly @@ -1,7 +1,16 @@ +% "This file is a stub to fool make-website" + \header{ -TestedFeatures = "This file is a stub to fool make-website" - "this will display the 20pt version of the proofsheet"; +title= "The Feta font"; +subtitle = "proofsheet"; +enteredby = "jcn"; +copyright = "public domain"; +description = "This file tests the Feta music-font"; +TestedFeatures = + "(Feta definitively is not an abbreviation of Font-En-TjA)"; } + + diff --git a/input/rhythm.ly b/input/rhythm.ly index 897770ad63..8b6ecb031a 100644 --- a/input/rhythm.ly +++ b/input/rhythm.ly @@ -61,20 +61,21 @@ yanother = Score = \translator { \type Score_engraver; - \consists "Bar_align_engraver"; - \consists "Clef_align_engraver"; - \consists "Key_align_engraver"; - \consists "Meter_align_engraver"; - \consists "Score_horizontal_align_engraver"; - \consists "Vertical_align_engraver"; + %\consists "Timing_engraver"; + %\consists "Bar_column_engraver"; + %\consists "Bar_number_engraver"; + \consists "Span_score_bar_engraver"; + \consists "Score_priority_engraver"; + \consists "Priority_horizontal_align_engraver"; + \consists "Vertical_align_engraver"; \accepts "Staff_group"; \accepts "Staff"; \accepts "Lyrics"; \accepts "Grandstaff"; - } +} %% add Timing_engraver to the staff Staff = \translator { diff --git a/input/spacing.ly b/input/spacing.ly index fb1f1085c0..10bb206640 100644 --- a/input/spacing.ly +++ b/input/spacing.ly @@ -8,15 +8,63 @@ TestedFeatures = "This file tests various spacings"; \version "0.1.7"; -\score{ - \melodic{ +multipart = \melodic{ + \multi 3 < + { + c4 + c + c c + } + { + [c8 c] + [c c] + [c c] [c c] + } + { + [2/3 c8 c c]1/1 + [2/3 c c c]1/1 + [2/3c c c]1/1 [2/3c c c]1/1 + } + { + [2/4 c8 c c c]1/1 + [2/4 c c c c]1/1 + [2/4c c c c]1/1 [2/4c c c c]1/1 + } + { + [2/5 c8 c c c c]1/1 + [2/5 c c c c c]1/1 + [2/5c c c c c]1/1 [2/5c c c c c]1/1 + } + { + [2/6c8 c c c c c]1/1 + [2/6c c c c c c]1/1 + [2/6c c c c c c]1/1 [2/6c c c c c c]1/1 + } + { + [2/7c8 c c c c c c]1/1 + [2/7c c c c c c c]1/1 + [2/7c c c c c c c]1/1 [2/7c c c c c c c]1/1 + } + > + } + +singlepart = \melodic{ c4 d e f c4 d e [f8 f] c4 d e f8 [f16 f] c4 d e f8 f16 [f32 f] c4 d e f8 f16 f32 [f64 f] + c4 c4 c4 c4 + + } + + \score{ + \melodic { + \singlepart + \multipart } \paper { +% linewidth= 18.\cm; % gourlay_maxmeasures = 4.0 } } diff --git a/input/standchen-16.ly b/input/standchen-16.ly index 412c202ca2..d8966dfbde 100644 --- a/input/standchen-16.ly +++ b/input/standchen-16.ly @@ -5,6 +5,7 @@ opus = "D. 957 No. 4"; composer = "Franz Schubert (1797-1828)" "Text by Ludwig Rellstab (1799-1860)"; enteredby = "JCN"; +description = "A schubert song in 16 pt"; copyright = "public domain"; } diff --git a/input/standchen-20.ly b/input/standchen-20.ly index cb13ab64d6..ba4a3a043a 100644 --- a/input/standchen-20.ly +++ b/input/standchen-20.ly @@ -6,6 +6,7 @@ composer = "Franz Schubert (1797-1828)" "Text by Ludwig Rellstab (1799-1860)"; enteredby = "JCN"; copyright = "public domain"; +description = "A schubert song in 20 pt"; } \version "0.1.7"; diff --git a/input/standchen-20.tex b/input/standchen-20.tex index f7af3f5151..9d0f09b67d 100644 --- a/input/standchen-20.tex +++ b/input/standchen-20.tex @@ -3,7 +3,7 @@ % % UGH UGH -\advance\oddsidemargin-25mm +\advance\oddsidemargin-30mm \evensidemargin\oddsidemargin \advance\textwidth30mm \addtolength{\textheight}{20mm} diff --git a/input/standchen.ly b/input/standchen.ly index b2a00d2996..739d06d3be 100644 --- a/input/standchen.ly +++ b/input/standchen.ly @@ -493,8 +493,9 @@ themusic = \paper{ \paper_twenty % 20pt music uses whole pagewidth - % ja Vette Pech. Koop maar aan A4 printer - linewidth= 185.\mm; + % ja Vette Pech. Koop maar een A3 printer + % huh? [jcn] + linewidth= 195.\mm; arithmetic_multiplier = 7.\pt; gourlay_maxmeasures = 9.; diff --git a/input/toccata-fuga-E.ly b/input/toccata-fuga-E.ly index 0d5cb37007..1bb3e31ba6 100644 --- a/input/toccata-fuga-E.ly +++ b/input/toccata-fuga-E.ly @@ -1,8 +1,8 @@ \header{ filename = "toccata-fuga-E.ly"; title = "toccata and fuga in E-major "; -opus = "BWV 566" - "toccata 3 bar excerpt" +opus = "BWV 566"; +description = "toccata 3 bar excerpt, " "2nd fuga transposed subject --- 4 bar excerpt"; composer = "Johann Sebastian Bach (1685-1750)"; diff --git a/input/wtk1-fugue2.ly b/input/wtk1-fugue2.ly index 3c9e2f9391..50a2166a00 100644 --- a/input/wtk1-fugue2.ly +++ b/input/wtk1-fugue2.ly @@ -21,7 +21,7 @@ global = \melodic { \meter 4/4; % should be \meter C \keyCminor - \skip 1*32; + \skip 1*31; \bar "|."; | } diff --git a/lib/binary-source-file.cc b/lib/binary-source-file.cc index 306ca97855..111ee743e6 100644 --- a/lib/binary-source-file.cc +++ b/lib/binary-source-file.cc @@ -39,11 +39,11 @@ Binary_source_file::error_str(char const* pos_ch_c_l) const String pre_str((Byte const*)begin_ch_c_l, pos_ch_c_l - begin_ch_c_l); pre_str = String_convert::bin2hex_str(pre_str); for (int i = 2; i < pre_str.length_i(); i += 3) - pre_str = pre_str.left_str(i) + " " + pre_str.mid_str(i, INT_MAX); + pre_str = pre_str.left_str(i) + " " + pre_str.cut(i, INT_MAX); String post_str((Byte const*)pos_ch_c_l, end_ch_c_l - pos_ch_c_l); post_str = String_convert::bin2hex_str(post_str); for (int i = 2; i < post_str.length_i(); i += 3) - post_str = post_str.left_str(i) + " " + post_str.mid_str(i, INT_MAX); + post_str = post_str.left_str(i) + " " + post_str.cut(i, INT_MAX); String str = pre_str + String('\n') diff --git a/lib/source-file.cc b/lib/source-file.cc index 8ad4784259..66a13de2bb 100644 --- a/lib/source-file.cc +++ b/lib/source-file.cc @@ -111,7 +111,7 @@ Source_file::error_str(char const* pos_ch_C) const String str = line_str.left_str(pos_ch_C - begin_ch_C) + String('\n') + String(' ', error_col_i) - + line_str.mid_str(pos_ch_C - begin_ch_C, INT_MAX); // String::mid should take 0 arg.. + + line_str.cut(pos_ch_C - begin_ch_C, INT_MAX); // String::mid should take 0 arg.. return str; } diff --git a/lily/VERSION b/lily/VERSION index 45c0a9da44..15ba649ddb 100644 --- a/lily/VERSION +++ b/lily/VERSION @@ -1,4 +1,4 @@ MAJOR_VERSION = 0 MINOR_VERSION = 1 -PATCH_LEVEL = 38 +PATCH_LEVEL = 39 MY_PATCH_LEVEL = diff --git a/lily/atom.cc b/lily/atom.cc index 090cad2b19..68d85f8e0e 100644 --- a/lily/atom.cc +++ b/lily/atom.cc @@ -56,28 +56,39 @@ Atom::str() const + dim_.y ().str () + "))"; } -String -Atom::TeX_string() const -{ - String tex_str = tex_; - Offset off = off_; +bool +Atom::check_infinity_b ()const +{ + bool ridiculous = false; +#ifndef NDEBUG + /* infinity checks. */ for (int a = X_AXIS; a < NO_AXES; a++) { Axis ax = (Axis)a; - if (abs (off[ax]) >= 100 CM) + if (abs (off_[ax]) >= 100 CM) { warning (_("ridiculous dimension ") + axis_name_str (ax) + ", " - +print_dimen(off[ax])); - off[ax] = 0.0; - tex_str += "\errormark"; + +print_dimen(off_[ax])); + ((Atom*)this)->off_[ax] = 0.0; + ridiculous = true; } } - // whugh.. Hard coded... +#endif + return ridiculous; +} +String +Atom::TeX_string() const +{ + String tex_str = tex_; + if (check_infinity_b ()) + tex_str += "\errormark"; + + // whugh.. Hard coded... String s ("\\placebox{"); - s += print_dimen (off[Y_AXIS])+"}{"; - s += print_dimen (off[X_AXIS]) + "}{"; + s += print_dimen (off_[Y_AXIS])+"}{"; + s += print_dimen (off_[X_AXIS]) + "}{"; s += tex_str + "}"; return s; } @@ -86,10 +97,12 @@ void Atom::translate_axis (Real r, Axis a) { off_[a] += r; + check_infinity_b (); } void Atom::translate (Offset o) { off_ += o; + check_infinity_b (); } diff --git a/lily/axis.cc b/lily/axis.cc index 8689e1c1fe..ff8566988d 100644 --- a/lily/axis.cc +++ b/lily/axis.cc @@ -14,7 +14,7 @@ String axis_name_str (Axis a) { - return String (a + 'x'); + return String (char(a + 'x')); } /* diff --git a/lily/beam-grav.cc b/lily/beam-grav.cc index ffa1cda9e2..2d931e150f 100644 --- a/lily/beam-grav.cc +++ b/lily/beam-grav.cc @@ -50,39 +50,37 @@ Beam_engraver::do_try_request(Request*r) void Beam_engraver::do_process_requests() { - if ( !beam_p_ && span_reqs_drul_[LEFT]) { - current_grouping_p_ = new Rhythmic_grouping; - beam_p_ = new Beam; - if (span_reqs_drul_[LEFT]->nplet) - { - plet_spanner_p_ = new Text_spanner(); - Text_def *defp = new Text_def; - plet_spanner_p_->set_support (beam_p_); - - // ugh - plet_spanner_p_->set_bounds (LEFT, get_staff_info ().command_pcol_l ()); + if ( !beam_p_ && span_reqs_drul_[LEFT]) + { + current_grouping_p_ = new Rhythmic_grouping; + beam_p_ = new Beam; + if (span_reqs_drul_[LEFT]->nplet) + { + plet_spanner_p_ = new Text_spanner; + Text_def *defp = new Text_def; + plet_spanner_p_->set_support (beam_p_); - defp->align_i_ = 0; - defp->text_str_ = span_reqs_drul_[LEFT]->nplet; - defp->style_str_="italic"; - plet_spanner_p_->spec_p_ = defp; - announce_element (Score_elem_info(plet_spanner_p_,0)); - } + defp->align_i_ = 0; + defp->text_str_ = span_reqs_drul_[LEFT]->nplet; + defp->style_str_="italic"; + plet_spanner_p_->spec_p_ = defp; + announce_element (Score_elem_info(plet_spanner_p_,0)); + } Scalar prop = get_property ("beamslopedamping"); if (prop.isnum_b ()) - { - beam_p_->damping_i_ = prop; - } + { + beam_p_->damping_i_ = prop; + } prop = get_property ("beamquantisaton"); if (prop.isnum_b ()) - { - beam_p_->quantisation_ = (Beam::Quantise)(int)prop; - } + { + beam_p_->quantisation_ = (Beam::Quantise)(int)prop; + } - announce_element (Score_elem_info (beam_p_, span_reqs_drul_[LEFT])); - } + announce_element (Score_elem_info (beam_p_, span_reqs_drul_[LEFT])); + } } void diff --git a/lily/beam.cc b/lily/beam.cc index aba565e760..450c12db14 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -35,7 +35,7 @@ IMPLEMENT_IS_TYPE_B1 (Beam, Spanner); // ugh, hardcoded -const int MINIMUM_STEMLEN[6] = { +const int MINIMUM_STEMLEN[] = { 0, // just in case 5, 4, @@ -46,8 +46,8 @@ const int MINIMUM_STEMLEN[6] = { Beam::Beam () { - slope_f = 0; - left_y = 0.0; + slope_f_ = 0; + left_y_ = 0.0; damping_i_ = 1; quantisation_ = NORMAL; multiple_i_ = 0; @@ -56,7 +56,7 @@ Beam::Beam () void Beam::add (Stem*s) { - stems.push (s); + stems_.push (s); s->add_dependency (this); s->beam_l_ = this; @@ -71,16 +71,16 @@ Beam::brew_molecule_p () const { Molecule *mol_p = new Molecule; Real inter_f = paper ()->internote_f (); - Real x0 = stems[0]->hpos_f (); - for (int j=0; j hpos_f (); + for (int j=0; j 0)? stems[j-1] : 0; - Stem * next = (j < stems.size ()-1) ? stems[j+1] :0; + Stem *i = stems_[j]; + Stem * prev = (j > 0)? stems_[j-1] : 0; + Stem * next = (j < stems_.size ()-1) ? stems_[j+1] :0; Molecule sb = stem_beams (i, next, prev); Real x = i->hpos_f ()-x0; - sb.translate (Offset (x, (x * slope_f + left_y)* inter_f)); + sb.translate (Offset (x, (x * slope_f_ + left_y_)* inter_f)); mol_p->add (sb); } mol_p->translate_axis (x0 - spanned_drul_[LEFT]->absolute_coordinate (X_AXIS), X_AXIS); @@ -91,7 +91,7 @@ Offset Beam::center () const { Real w= (paper ()->note_width () + width ().length ())/2.0; - return Offset (w, (left_y + w* slope_f)*paper ()->internote_f ()); + return Offset (w, (left_y_ + w* slope_f_)*paper ()->internote_f ()); } void @@ -105,7 +105,7 @@ void Beam::do_print () const { #ifndef NPRINT - DOUT << "slope_f " <is_type_b (Stem::static_name ())) - stems.substitute ((Stem*)o->item (), n? (Stem*) n->item ():0); + stems_.substitute ((Stem*)o->item (), n? (Stem*) n->item ():0); } Interval Beam::do_width () const { - return Interval (stems[0]->hpos_f (), - stems.top ()->hpos_f ()); + return Interval (stems_[0]->hpos_f (), + stems_.top ()->hpos_f ()); } void @@ -146,9 +146,9 @@ Beam::set_default_dir () count[UP] = count[DOWN] = 0; Direction d = DOWN; - for (int i=0; i dir_ ? (1 + d * s->dir_)/2 : s->get_center_distance (Direction (-d)); @@ -166,29 +166,30 @@ Beam::set_default_dir () count[d] = 1; } while ((d *= -1) != DOWN); - /* the following relation is equal to - up / up_count > down / down_count - */ - dir_ = (total[UP] * count[DOWN] > total[DOWN] * count[UP]) ? UP : DOWN; + /* + + [Ross] states that the majority of the notes dictates the + direction (and not the mean of "center distance") + */ + dir_ = (total[UP] > total[DOWN]) ? UP : DOWN; - for (int i=0; i dir_ = dir_; } } /* should use minimum energy formulation (cf linespacing) - */ void Beam::solve_slope () { Array sinfo; - for (int j=0; j set_default_extents (); if (i->invisible_b ()) @@ -198,11 +199,11 @@ Beam::solve_slope () sinfo.push (info); } if (! sinfo.size ()) - slope_f = left_y = 0; + slope_f_ = left_y_ = 0; else if (sinfo.size () == 1) { - slope_f = 0; - left_y = sinfo[0].idealy_f_; + slope_f_ = 0; + left_y_ = sinfo[0].idealy_f_; } else { @@ -215,38 +216,38 @@ Beam::solve_slope () l.input.push (Offset (sinfo[i].x, sinfo[i].idealy_f_)); } - l.minimise (slope_f, left_y); + l.minimise (slope_f_, left_y_); } Real dy = 0.0; for (int i=0; i < sinfo.size (); i++) { - Real y = sinfo[i].x * slope_f + left_y; + Real y = sinfo[i].x * slope_f_ + left_y_; Real my = sinfo[i].miny_f_; if (my - y > dy) dy = my -y; } - left_y += dy; - left_y *= dir_; + left_y_ += dy; + left_y_ *= dir_; - slope_f *= dir_; + slope_f_ *= dir_; /* - This neat trick is by Werner Lemberg, damped = tanh (slope_f) corresponds + This neat trick is by Werner Lemberg, damped = tanh (slope_f_) corresponds with some tables in [Wanske] */ if (damping_i_) - slope_f = 0.6 * tanh (slope_f) / damping_i_; + slope_f_ = 0.6 * tanh (slope_f_) / damping_i_; quantise_yspan (); // y-values traditionally use internote dimension: therefore slope = (y/in)/x // but mf and beam-lookup use PT dimension for y (as used for x-values) // ugh --- there goes our simplified but careful quantisation - Real sl = slope_f * paper ()->internote_f (); - paper ()->lookup_l ()->beam (sl, 20 PT); - slope_f = sl / paper ()->internote_f (); + Real sl = slope_f_ * paper ()->internote_f (); + paper ()->lookup_l ()->beam (sl, 20 PT, 1 PT); + slope_f_ = sl / paper ()->internote_f (); } void @@ -254,7 +255,7 @@ Beam::quantise_yspan () { /* [Ross] (simplification of) - Try to set slope_f complying with y-span of: + Try to set slope_f_ complying with y-span of: - zero - beam_thickness / 2 + staffline_thickness / 2 - beam_thickness + staffline_thickness @@ -276,9 +277,9 @@ Beam::quantise_yspan () beam_thickness + staffline_thickness }; - Real xspan_f = stems.top ()->hpos_f () - stems[0]->hpos_f (); + Real xspan_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f (); // y-values traditionally use internote dimension: therefore slope = (y/in)/x - Real yspan_f = xspan_f * abs (slope_f * internote_f); + Real yspan_f = xspan_f * abs (slope_f_ * internote_f); int yspan_i = (int)(yspan_f / interline_f); Real q = (yspan_f / interline_f - yspan_i) * interline_f; int i = 0; @@ -297,7 +298,7 @@ Beam::quantise_yspan () yspan_f = (Real)yspan_i * interline_f + q; // y-values traditionally use internote dimension: therefore slope = (y/in)/x - slope_f = yspan_f / xspan_f / internote_f * sign (slope_f); + slope_f_ = yspan_f / xspan_f / internote_f * sign (slope_f_); } void @@ -341,7 +342,7 @@ Beam::quantise_left_y (Beam::Pos pos, bool extend_b) }; // y-values traditionally use internote dimension - Real y = left_y * internote_f; + Real y = left_y_ * internote_f; int y_i = (int)floor(y / interline_f); y = (y / interline_f - y_i) * interline_f; @@ -381,15 +382,15 @@ Beam::quantise_left_y (Beam::Pos pos, bool extend_b) Real lower_y = (qy[lower_i] + interline_f * y_i) / internote_f; if (extend_b) - left_y = (dir_ > 0 ? upper_y : lower_y); + left_y_ = (dir_ > 0 ? upper_y : lower_y); else - left_y = (upper_y - left_y < y - lower_y ? upper_y : lower_y); + left_y_ = (upper_y - left_y_ < y - lower_y ? upper_y : lower_y); } void Beam::set_stemlens () { - Real x0 = stems[0]->hpos_f (); + Real x0 = stems_[0]->hpos_f (); Real dy = 0; Real interline_f = paper ()->interline_f (); @@ -399,11 +400,11 @@ Beam::set_stemlens () Real interbeam_f = paper ()->interbeam_f (); if (multiple_i_ > 3) interbeam_f += 2.0 * staffline_thickness / 4; - Real xspan_f = stems.top ()->hpos_f () - stems[0]->hpos_f (); + Real xspan_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f (); /* ugh, y values are in "internote" dimension */ - Real yspan_f = xspan_f * abs (slope_f * internote_f); + Real yspan_f = xspan_f * abs (slope_f_ * internote_f); int yspan_i = (int)(yspan_f / interline_f); Pos left_pos = NONE; @@ -411,7 +412,7 @@ Beam::set_stemlens () if ((yspan_f < staffline_thickness / 2) || (quantisation_ == NORMAL)) left_pos = (Pos)(STRADDLE | SIT | HANG); else - left_pos = (Pos) (sign (slope_f) > 0 ? STRADDLE | HANG + left_pos = (Pos) (sign (slope_f_) > 0 ? STRADDLE | HANG : SIT | STRADDLE); /* @@ -422,24 +423,24 @@ Beam::set_stemlens () if (q < interline_f / 3 - beam_thickness / 2) left_pos = (Pos) (left_pos | INTER); - if (stems[0]->beams_right_i_ > 1) + if (multiple_i_ > 1) left_pos = (Pos) (dir_ > 0 ? HANG : SIT); // ugh, rounding problems! const Real EPSILON = interline_f / 10; do { - left_y += dy * dir_; + left_y_ += dy * dir_; quantise_left_y (left_pos, dy); dy = 0; - for (int j=0; j < stems.size (); j++) + for (int j=0; j < stems_.size (); j++) { - Stem *s = stems[j]; + Stem *s = stems_[j]; Real x = s->hpos_f () - x0; - s->set_stemend (left_y + slope_f * x); + s->set_stemend (left_y_ + slope_f_ * x); Real y = s->stem_length_f (); - int mult = max (stems[j]->beams_left_i_, stems[j]->beams_right_i_); + int mult = max (stems_[j]->beams_left_i_, stems_[j]->beams_right_i_); if (mult > 1) // dim(y) = internote y -= (mult - 1) * interbeam_f / internote_f; @@ -454,16 +455,16 @@ Beam::set_grouping (Rhythmic_grouping def, Rhythmic_grouping cur) { def.OK (); cur.OK (); - assert (cur.children.size () == stems.size ()); + assert (cur.children.size () == stems_.size ()); cur.split (def); Array b; { Array flags; - for (int j=0; j flag_i_ - 2; assert (f>0); @@ -473,12 +474,12 @@ Beam::set_grouping (Rhythmic_grouping def, Rhythmic_grouping cur) b= cur.generate_beams (flags, fi); b.insert (0,0); b.push (0); - assert (stems.size () == b.size ()/2); + assert (stems_.size () == b.size ()/2); } - for (int j=0, i=0; i < b.size () && j beams_left_i_ = b[i]; s->beams_right_i_ = b[i+1]; multiple_i_ = multiple_i_ >? (b[i] >? b[i+1]); @@ -493,14 +494,18 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const { assert (!next || next->hpos_f () > here->hpos_f ()); assert (!prev || prev->hpos_f () < here->hpos_f ()); + Real staffline_thickness = paper ()->rule_thickness (); Real interbeam_f = paper ()->interbeam_f (); + Real internote_f =paper ()->internote_f (); + Real interline_f = 2 * internote_f; + Real beamheight_f = 0.48 * (interline_f - staffline_thickness); if (multiple_i_ > 3) interbeam_f += 2.0 * staffline_thickness / 4; Real dy = interbeam_f; Real stemdx = staffline_thickness; - Real sl = slope_f*paper ()->internote_f (); - paper ()->lookup_l ()->beam (sl, 20 PT); + Real sl = slope_f_* internote_f; + paper ()->lookup_l ()->beam (sl, 20 PT, 1 PT); Molecule leftbeams; Molecule rightbeams; @@ -510,10 +515,10 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const { int lhalfs= lhalfs = here->beams_left_i_ - prev->beams_right_i_ ; int lwholebeams= here->beams_left_i_ beams_right_i_ ; - Real w = (here->hpos_f () - prev->hpos_f ())/4; + Real w = (here->hpos_f () - prev->hpos_f ())/4 note_width ();; Atom a; if (lhalfs) // generates warnings if not - a = paper ()->lookup_l ()->beam (sl, w); + a = paper ()->lookup_l ()->beam (sl, w, beamheight_f); a.translate (Offset (-w, -w * sl)); for (int j = 0; j < lhalfs; j++) { @@ -529,8 +534,8 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const int rwholebeams = here->beams_right_i_ beams_left_i_; Real w = next->hpos_f () - here->hpos_f (); - Atom a = paper ()->lookup_l ()->beam (sl, w + stemdx); - + Atom a = paper ()->lookup_l ()->beam (sl, w + stemdx, beamheight_f); + a.translate_axis( - stemdx/2, X_AXIS); int j = 0; Real gap_f = 0; if (here->beam_gap_i_) @@ -545,7 +550,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const // TODO: notehead widths differ for different types gap_f = paper ()->note_width () / 2; w -= 2 * gap_f; - a = paper ()->lookup_l ()->beam (sl, w + stemdx); + a = paper ()->lookup_l ()->beam (sl, w + stemdx, beamheight_f); } for (; j < rwholebeams; j++) @@ -555,9 +560,9 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const rightbeams.add (b); } - w /= 4; + w = w/4 note_width (); if (rhalfs) - a = paper ()->lookup_l ()->beam (sl, w); + a = paper ()->lookup_l ()->beam (sl, w, beamheight_f); for (; j < rwholebeams + rhalfs; j++) { @@ -568,5 +573,12 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const } leftbeams.add (rightbeams); + + /* + Does beam quanting think of the asymetry of beams? + Refpoint is on bottom of symbol. (FIXTHAT) --hwn. + */ + if (experimental_features_global_b && dir_ < 0) + leftbeams.translate_axis (-beamheight_f, Y_AXIS); return leftbeams; } diff --git a/lily/bow.cc b/lily/bow.cc index 918d4c503a..1f75bba5de 100644 --- a/lily/bow.cc +++ b/lily/bow.cc @@ -13,7 +13,7 @@ Bow::Bow() { - pos_i_drul_[LEFT] = pos_i_drul_[RIGHT] = 0; + dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0; dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0; } @@ -21,11 +21,11 @@ Bow::Bow() Offset Bow::center() const { - int dy = pos_i_drul_[RIGHT]-pos_i_drul_[LEFT]; + Real dy = dy_f_drul_[RIGHT]-dy_f_drul_[LEFT]; Real w = width().length (); - return Offset (w/2,dy * paper()->internote_f ()); + return Offset (w/2,dy ); } @@ -35,19 +35,20 @@ Bow::brew_molecule_p() const Molecule*output = new Molecule; Real w = width().length (); - int dy = pos_i_drul_[RIGHT] - pos_i_drul_[LEFT]; + Real dy_f = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]; Real nw_f = paper()->note_width (); Real nh_f = paper()->internote_f (); - w+= (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]) * nw_f ; + w+= (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]); Real round_w = w; // slur lookup rounds the slurwidth . - Atom a = paper()->lookup_l ()->slur (dy , round_w, dir_); + Atom a = paper()->lookup_l ()->slur (dy_f, round_w, dir_); Real error = w-round_w; - a.translate (Offset ((dx_f_drul_[LEFT] + 0.5)*nw_f + error/2, - pos_i_drul_[LEFT] * nh_f)); + a.translate (Offset ((dx_f_drul_[LEFT] + 0.5*nw_f) + + error/2, + dy_f_drul_[LEFT])); output->add (a); return output; } diff --git a/lily/colhpos.cc b/lily/colhpos.cc index 62cc881bde..a220298777 100644 --- a/lily/colhpos.cc +++ b/lily/colhpos.cc @@ -51,11 +51,17 @@ Col_hpositions::OK() const } void -Col_hpositions::stupid_solution() +Col_hpositions::set_stupid_solution(Vector v) { energy_f_ = infinity_f; ugh_b_ = true; - config = spacer_l_->default_solution(); + config = v; +} + +void +Col_hpositions::stupid_solution() +{ + set_stupid_solution (spacer_l_->default_solution()); } void diff --git a/lily/crescendo.cc b/lily/crescendo.cc index ffe6648c53..22920506ec 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -12,11 +12,12 @@ #include "lookup.hh" #include "paper-def.hh" #include "debug.hh" +#include "score-column.hh" Crescendo::Crescendo() { grow_dir_ =0; - dir_ = DOWN ; + dir_ = DOWN; dyn_b_drul_[LEFT] = dyn_b_drul_[RIGHT] =false; } @@ -47,7 +48,16 @@ Crescendo::get_symbol() const w_dim = 0; } - return Atom (paper()->lookup_l ()->hairpin (w_dim, grow_dir_ < 0)); + Drul_array broken; + Direction d = LEFT; + do { + Score_column* s = (Score_column* )spanned_drul_[d] ; // UGH + broken[d] = (!s->musical_b()); + } while ((d *= -1) != LEFT); + + + bool continued = broken[(Direction)-grow_dir_]; + return Atom (paper()->lookup_l ()->hairpin (w_dim, grow_dir_ < 0, continued)); } Molecule* diff --git a/lily/include/atom.hh b/lily/include/atom.hh index 22b4cec972..4b76e4018c 100644 --- a/lily/include/atom.hh +++ b/lily/include/atom.hh @@ -15,10 +15,11 @@ /// a symbol which can be translated, and freely copied -struct Atom { +class Atom { + Offset off_; +public: String tex_; Box dim_; - Offset off_; String str() const; // for printing. Atom (String, Box); @@ -29,5 +30,6 @@ struct Atom { Box extent() const; void print() const; String TeX_string() const; + bool check_infinity_b () const; }; #endif diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 7106cbf0d5..1b9710034c 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -10,21 +10,22 @@ #include "directional-spanner.hh" #include "plist.hh" -/** a beam connects multiple stems Beam adjusts the stems its owns to - make sure that they reach the beam and that point in the correct - direction */ +/** a beam connects multiple stems. + + Beam adjusts the stems its owns to make sure that they reach the + beam and that point in the correct direction */ class Beam: public Directional_spanner { public: enum Pos { NONE, SIT = 1, STRADDLE = 2, HANG = 4, INTER = 8 }; // ugh, silly C++ enum Quantise { NUN, NORMAL, TRADITIONAL }; - Link_array stems; + Link_array stems_; /// the slope of the beam in posns / point (dimension) - Real slope_f; + Real slope_f_; /// position of leftmost end of beam - Real left_y; + Real left_y_; /// should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams int damping_i_; /// should beam pos / slope be quantised? 0: no, 1: yes, 2: traditional @@ -32,7 +33,7 @@ public: /// maximum number of beams (for opening-up of beam-spacing) int multiple_i_; - /* *************** */ + DECLARE_MY_RUNTIME_TYPEINFO; Beam(); void add (Stem*); diff --git a/lily/include/bow.hh b/lily/include/bow.hh index 1ef139c60e..5583156743 100644 --- a/lily/include/bow.hh +++ b/lily/include/bow.hh @@ -17,9 +17,9 @@ */ class Bow : public Directional_spanner { protected: - Drul_array pos_i_drul_; + Drul_array dy_f_drul_; Drul_array dx_f_drul_; - + Molecule*brew_molecule_p() const; public: Bow(); diff --git a/lily/include/colhpos.hh b/lily/include/colhpos.hh index 56f70c8506..3c42dd98cb 100644 --- a/lily/include/colhpos.hh +++ b/lily/include/colhpos.hh @@ -13,25 +13,26 @@ 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_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 (Paper_column*c); - void print() const; + Line_spacer * spacer_l_; + bool ugh_b_; + Line_of_cols error_col_l_arr_; + Line_of_cols cols; + Array config; + 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(); + void set_stupid_solution (Vector); + Col_hpositions(); + void add (Paper_column*c); + void print() const; }; diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index 31f496a4b4..39dc5ae9b0 100644 --- a/lily/include/lookup.hh +++ b/lily/include/lookup.hh @@ -32,7 +32,9 @@ struct Lookup { Atom beam_element (int,int,Real=0) const; /// round slope to closest TeXslope - Atom beam (Real&,Real) const; + Atom beam (Real&,Real, Real) const; + Atom ps_beam (Real, Real, Real)const; + Atom tex_beam (Real&, Real) const; Atom streepje (int type) const; @@ -48,13 +50,15 @@ struct Lookup { Atom bar (String, Real height) const; Atom dots () const; - Atom slur (int dy, Real &dx, Direction dir) const; + Atom slur (Real &dy, Real &dx, Direction dir) const; + Atom tex_slur (int dy, Real &dx, Direction dir) const; + Atom ps_slur (Real dy, Real dx, Real dir) const; Atom half_slur (int dy, Real &dx, Direction dir, int xpart) const; Atom half_slur_middlepart (Real &dx, Direction dir) const; Atom big_slur (int dy, Real &dx, Direction dir) const; Atom text (String style, String text, int align = 1) const; Atom script (String idx) const; - Atom hairpin (Real & width, bool decresc) const; + Atom hairpin (Real & width, bool decresc, bool continued) const; Atom dynamic (String) const; }; diff --git a/lily/include/main.hh b/lily/include/main.hh index 13f3c8fb7b..1a95d9d203 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -18,12 +18,13 @@ void set_default_output (String s); String find_file (String); String get_version_str(); String get_version_number_str(); -extern Sources* source_l_g; -extern bool only_midi; +extern Sources* source_global_l; +extern bool no_paper_global_b; extern int exit_status_i_; extern bool experimental_features_global_b; extern bool postscript_global_b; -extern String default_out_fn; - +extern String default_outname_base_global; +extern String default_outname_suffix_global; +extern int default_count_global; #endif diff --git a/lily/include/midi-def.hh b/lily/include/midi-def.hh index dbdcead0ff..9d58a1b311 100644 --- a/lily/include/midi-def.hh +++ b/lily/include/midi-def.hh @@ -20,6 +20,7 @@ definitions for midi output. Rather empty */ class Midi_def : public Music_output_def { + static int default_count_i_; public: VIRTUAL_COPY_CONS(Midi_def, Music_output_def); DECLARE_MY_RUNTIME_TYPEINFO; @@ -34,6 +35,7 @@ public: int get_tempo_i (Moment moment); void print() const; void set_tempo (Moment moment, int count_per_minute_i); + virtual int get_next_default_count () const; }; #endif // MIDI_DEF_HH diff --git a/lily/include/music-output-def.hh b/lily/include/music-output-def.hh index 26dacffa31..2c8fa3093a 100644 --- a/lily/include/music-output-def.hh +++ b/lily/include/music-output-def.hh @@ -37,6 +37,7 @@ public: void assign_translator (String, Translator*); String outfile_str_; Translator * find_translator_l (String) const; + virtual int get_next_default_count () const; }; #endif // Music_output_DEF_HH diff --git a/lily/include/paper-def.hh b/lily/include/paper-def.hh index 826918fa2f..162bb656e6 100644 --- a/lily/include/paper-def.hh +++ b/lily/include/paper-def.hh @@ -35,7 +35,7 @@ class Paper_def : public Music_output_def { Lookup *lookup_p_; Dictionary *real_vars_p_; - + static int default_count_i_; protected: VIRTUAL_COPY_CONS(Paper_def,Music_output_def); public: @@ -83,6 +83,7 @@ public: Real geometric_spacing(Moment) const; Real arithmetic_constant(Moment minimal_mom) const; Real arithmetic_spacing( Moment mom,Real constant) const; + virtual int get_next_default_count () const; String TeX_output_settings_str () const; }; diff --git a/lily/include/spring-spacer.hh b/lily/include/spring-spacer.hh index f5a40b63da..7d30e4493a 100644 --- a/lily/include/spring-spacer.hh +++ b/lily/include/spring-spacer.hh @@ -56,9 +56,6 @@ class Spring_spacer : public Line_spacer { /// generate an (nonoptimal) solution Vector find_initial_solution() const; - /// check if problem is too tight - bool check_feasible() const; - /// does #this# contain the column #w#? bool contains (Paper_column const *w); diff --git a/lily/include/text-spanner.hh b/lily/include/text-spanner.hh index c5c9cae052..9a6665625a 100644 --- a/lily/include/text-spanner.hh +++ b/lily/include/text-spanner.hh @@ -15,23 +15,24 @@ triplets, eentweetjes, ottava, etc. */ class Text_spanner : public Spanner { public: - Directional_spanner * support_span_l_; - General_script_def * spec_p_; - Offset text_off_; - DECLARE_MY_RUNTIME_TYPEINFO; + Directional_spanner * support_span_l_; + General_script_def * spec_p_; + Offset text_off_; + DECLARE_MY_RUNTIME_TYPEINFO; - void set_support (Directional_spanner*); - Text_spanner(); - Text_spanner (Text_spanner const&); + void set_support (Directional_spanner*); + Text_spanner(); + Text_spanner (Text_spanner const&); protected: - SCORE_ELEM_CLONE(Text_spanner); - ~Text_spanner(); - virtual void do_substitute_dependency (Score_elem*,Score_elem*); - virtual void do_pre_processing(); - virtual void do_post_processing(); - virtual Interval height() const ; - virtual Molecule* brew_molecule_p() const; - virtual void do_print() const; + SCORE_ELEM_CLONE(Text_spanner); + ~Text_spanner(); + virtual void do_add_processing (); + virtual void do_substitute_dependency (Score_elem*,Score_elem*); + virtual void do_pre_processing(); + virtual void do_post_processing(); + virtual Interval height() const ; + virtual Molecule* brew_molecule_p() const; + virtual void do_print() const; }; #endif // TEXTSPANNER_HH diff --git a/lily/lexer.l b/lily/lexer.l index 840e2b31ce..f2d6c9214e 100644 --- a/lily/lexer.l +++ b/lily/lexer.l @@ -132,7 +132,7 @@ ESCAPED [nt\\'"] String s (YYText ()+1); s = s.left_str (s.length_i ()-1); DOUT << "#include `" << s << "\'\n"; - new_input (s,source_l_g); + new_input (s,source_global_l); yy_pop_state (); } \"[^"]* { // backup rule diff --git a/lily/lookup.cc b/lily/lookup.cc index 319b038bad..a4dc393ec0 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -8,7 +8,7 @@ TODO This doth suck. We should have PS output, and read spacing info from TFMs - Glissando, bracket + Glissando, */ @@ -157,7 +157,7 @@ Lookup::streepje (int type) const } Atom -Lookup::hairpin (Real &wid, bool decresc) const +Lookup::hairpin (Real &wid, bool decresc, bool continued) const { bool embedded_b = postscript_global_b; String embed; @@ -167,7 +167,8 @@ Lookup::hairpin (Real &wid, bool decresc) const Real height = 2 PT; embed = "\\embeddedps{\n" ; embed += String (wid) + " " - + String (height) + + String (height) + " " + + String (continued ? height/2 : 0) + + " draw_" + String(decresc ? "de" : "") + "cresc}\n"; ret.tex_ = embed; } @@ -237,7 +238,7 @@ Lookup::vbrace (Real &y) const Interval ydims = brace.dim_[Y_AXIS]; Real min_y = ydims[LEFT]; Real max_y = ydims[RIGHT]; - Real step = 2.0 PT; + Real step = 1.0 PT; if (y < min_y) { diff --git a/lily/main.cc b/lily/main.cc index 897c84daaa..4bed727ec5 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -21,10 +21,11 @@ #include "my-lily-parser.hh" static bool version_ignore_b = false; -Sources* source_l_g = 0; -bool only_midi = false; +Sources* source_global_l = 0; +bool no_paper_global_b = false; + bool experimental_features_global_b = false; -bool postscript_global_b = false; +bool postscript_global_b = true; int exit_status_i_; void destill_inname (String &name_str_r); @@ -37,8 +38,8 @@ Long_option_init theopts[] = { {0, "debug", 'd'}, {1, "init", 'i'}, {1, "include", 'I'}, - {0, "midi", 'M'}, - {0, "postscript", 'p'}, + {0, "no-midi", 'M'}, + {0, "no-postscript", 'P'}, {0, "ignore-version", 'V'}, {0,0,0} }; @@ -47,7 +48,7 @@ void usage() { cout << - _("Usage: lilypond [options] [mudela-file]\n" + _("Usage: lilypond [options] [mudela-files]\n" "Typeset and or produce midi output from mudela-file or stdin\n" "\n" "Options:\n" @@ -58,9 +59,9 @@ usage() " -w, --warranty show warranty and copyright\n" " -o, --output=FILE set FILE as default output\n" " -t, --test switch on experimental features\n" - " -M, --midi produce midi output only\n" + " -M, --no-paper produce midi output only\n" " -V, --ignore-version ignore mudela version\n" - " -p, --postscript try to use PostScript\n" + " -P, --no-postscript don't use PostScript\n" "\n" "GNU LilyPond was compiled with the following settings:\n") #ifdef NDEBUG @@ -87,7 +88,7 @@ notice() cout << _("\n" "GNU LilyPond -- The GNU Project music typesetter.\n" - "Copyright 1996,97 by\n" + "Copyright 1996, 97, 98 by\n" " Han-Wen Nienhuys \n" " Jan Nieuwenhuizen \n" "\n" @@ -124,13 +125,22 @@ do_one_file (String init_str, String file_str) } Sources sources; - source_l_g = &sources; - source_l_g->set_path (&path); + source_global_l = &sources; + source_global_l->set_path (&path); { - My_lily_parser parser (source_l_g); + My_lily_parser parser (source_global_l); parser.set_version_check (version_ignore_b); parser.parse_file (init_str, file_str); - + + if (file_str.length_i() && file_str[0] != '-') + { + String a,b,c,d; + split_path (file_str, a, b, c, d); + default_outname_base_global = c; + } + else + default_outname_base_global = "lelie"; + if (parser.error_level_i_) { exit_status_i_ = 1; @@ -139,28 +149,33 @@ do_one_file (String init_str, String file_str) do_scores(); clear_scores (); } - source_l_g = 0; + source_global_l = 0; +} + +void +identify () +{ + cout << get_version_str() << endl; } int main (int argc, char **argv) { + identify (); debug_init(); // should be first // must override (come before) "/usr/local/share/lilypond"! - char const * env_l=getenv ("LILYINCLUDE"); - if (env_l) - { - path.add (env_l); - } + char const *env_sz = getenv ("LILYINCLUDE"); + if (env_sz) + path.parse_path (env_sz); + path.add (""); path.add (String (DIR_DATADIR) + "/init/"); path.push (DIR_DATADIR); Getopt_long oparser (argc, argv,theopts); - cout << get_version_str() << endl; String init_str ("lily-init.ly"); while (Long_option_init const * opt = oparser()) @@ -171,7 +186,7 @@ main (int argc, char **argv) experimental_features_global_b = true; break; case 'o': - set_default_output (oparser.optional_argument_ch_C_); + default_outname_base_global = oparser.optional_argument_ch_C_; break; case 'w': notice(); @@ -190,14 +205,14 @@ main (int argc, char **argv) case 'V': version_ignore_b = true; break; - case 'p': - postscript_global_b = true; + case 'P': + postscript_global_b = false; break; case 'd': set_debug (true); break; case 'M': - only_midi = true; + no_paper_global_b = true; break; default: assert (false); diff --git a/lily/midi-def.cc b/lily/midi-def.cc index 1415298439..480e0a7969 100644 --- a/lily/midi-def.cc +++ b/lily/midi-def.cc @@ -23,7 +23,6 @@ Midi_def::Midi_def() { - outfile_str_ = ""; // ugh set_tempo (Moment (1, 4), 60); } @@ -61,12 +60,19 @@ void Midi_def::print() const { #ifndef NPRINT + Music_output_def::print (); DOUT << "Midi {"; DOUT << "4/min: " << Real (60) / (whole_in_seconds_mom_ * 4); - DOUT << "out: " << outfile_str_; DOUT << "}\n"; #endif } IMPLEMENT_IS_TYPE_B1(Midi_def, Music_output_def); + +int Midi_def::default_count_i_=0; +int +Midi_def::get_next_default_count () const +{ + return default_count_i_++; +} diff --git a/lily/midi-stream.cc b/lily/midi-stream.cc index 6d2cb2699a..34833fb24b 100644 --- a/lily/midi-stream.cc +++ b/lily/midi-stream.cc @@ -36,12 +36,12 @@ Midi_stream::~Midi_stream() Midi_stream& Midi_stream::operator <<(String str) { - if (check_debug && !monitor->silence("Midistrings")) + if (check_debug && !monitor->silent_b("Midistrings")) str = String_convert::bin2hex_str (str); *os_p_ << str; - if (check_debug && !monitor->silence("Midistrings")) + if (check_debug && !monitor->silent_b ("Midistrings")) *os_p_ << "\n"; return *this; @@ -52,7 +52,7 @@ Midi_stream::operator <<(Midi_item const& mitem_c_r) { // *this << mitem_c_r.str(); mitem_c_r.output (this); - if (check_debug && !monitor->silence("Midistrings")) + if (check_debug && !monitor->silent_b("Midistrings")) *os_p_ << "\n"; return *this; } diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index 0c93fb55ab..297584d539 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -11,6 +11,12 @@ #include "global-translator.hh" #include "dictionary-iter.hh" +int +Music_output_def::get_next_default_count () const +{ + return 0; +} + IMPLEMENT_IS_TYPE_B(Music_output_def); Music_output_def::Music_output_def () @@ -25,6 +31,7 @@ Music_output_def::~Music_output_def () Music_output_def::Music_output_def (Music_output_def const &s) { + outfile_str_ = s.outfile_str_; for (Dictionary_iter i (s.translator_p_dict_); i.ok (); i++) assign_translator (i.key (), i.val ()->clone ()); } @@ -58,6 +65,7 @@ Music_output_def::assign_translator (String s, Translator*t) { t->type_str_ = s; t->output_def_l_ = this; + if (translator_p_dict_.elt_b (s)) delete translator_p_dict_[s]; translator_p_dict_[s] = t; @@ -72,5 +80,6 @@ Music_output_def::print () const DOUT << i.key () << " = "; i.val ()->print (); } + DOUT << "output: " << outfile_str_; #endif } diff --git a/lily/musical-request.cc b/lily/musical-request.cc index d247215876..0e3dd06ce8 100644 --- a/lily/musical-request.cc +++ b/lily/musical-request.cc @@ -298,7 +298,7 @@ bool Span_req:: do_equal_b (Request*r) const { Span_req * s = r->span(); - return spantype - s->spantype; + return spantype == s->spantype; } Span_req::Span_req() diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index e323034c0e..1c1f31860b 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -57,8 +57,8 @@ My_lily_parser::set_debug() String s = ""; if (init_parse_b_) s = "Init"; - set_yydebug (!monitor->silence (s+"Parser") && check_debug); - lexer_p_->set_debug (!monitor->silence (s+"Lexer") && check_debug); + set_yydebug (!monitor->silent_b (s+"Parser") && check_debug); + lexer_p_->set_debug (!monitor->silent_b (s+"Lexer") && check_debug); #endif } @@ -70,7 +70,7 @@ My_lily_parser::print_declarations() if (init_parse_b_) s = "Init"; - if (!monitor->silence (s+"Declarations") && check_debug) + if (!monitor->silent_b (s+"Declarations") && check_debug) { lexer_p_->print_declarations (init_parse_b_); } diff --git a/lily/p-score.cc b/lily/p-score.cc index 4ca78c5993..d38fb8f2c0 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -192,8 +192,15 @@ Paper_score::tex_output () // output String outname = paper_l_->outfile_str_ ; if (outname.empty_b ()) - outname = default_out_str_+ ".tex"; - + { + outname = default_outname_base_global; + int def = paper_l_->get_next_default_count (); + if (def) + { + outname += "-" + String(def); + } + outname += ".tex"; + } *mlog << _("TeX output to ") << outname << " ...\n"; Tex_stream tex_out (outname); diff --git a/lily/paper-def.cc b/lily/paper-def.cc index 0f9ee0f4d0..052f0c48d9 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -38,7 +38,6 @@ Paper_def::Paper_def (Paper_def const&s) lookup_p_ = s.lookup_p_? new Lookup (*s.lookup_p_) : 0; lookup_p_->paper_l_ = this; real_vars_p_ = new Dictionary (*s.real_vars_p_); - outfile_str_ = s.outfile_str_; } void @@ -143,7 +142,6 @@ Paper_def::print() const #ifndef NPRINT Music_output_def::print (); DOUT << "Paper {"; - DOUT << "out: " <print(); for (Assoc_iter i (*real_vars_p_); i.ok(); i++) { @@ -165,10 +163,17 @@ IMPLEMENT_IS_TYPE_B1(Paper_def, Music_output_def); String Paper_def::TeX_output_settings_str () const { - String s("\n "); s += lookup_p_->texsetting + "%(Tex id)\n"; for (Assoc_iter i (*real_vars_p_); i.ok(); i++) s += String ("\\def\\mudelapaper") + i.key () + "{" + i.val () + "}\n"; return s; } + +int Paper_def::default_count_i_ = 0; + +int +Paper_def::get_next_default_count () const +{ + return default_count_i_ ++; +} diff --git a/lily/performance.cc b/lily/performance.cc index 8d05ec325d..aaf926965f 100644 --- a/lily/performance.cc +++ b/lily/performance.cc @@ -115,8 +115,18 @@ Performance::process() String out=midi_l_->outfile_str_; if (out.empty_b ()) - out = default_out_str_ + ".midi"; - + { + + out = default_outname_base_global; + int def = midi_l_->get_next_default_count (); + if (def) + { + out += "-" + String(def); + } + + out += ".midi"; + } + Midi_stream midi_stream (out); *mlog << _("MIDI output to ") << out<< " ..." << endl; diff --git a/lily/score-grav.cc b/lily/score-grav.cc index e624ac88fe..03947306a1 100644 --- a/lily/score-grav.cc +++ b/lily/score-grav.cc @@ -131,16 +131,20 @@ Score_engraver::typeset_all() Spanner *s = elem_p->spanner (); pscore_p_->typeset_unbroken_spanner (s); - /* + + + /* do something sensible if spanner not spanned on 2 items. */ Direction d = LEFT; do { if (!s->spanned_drul_[d]) - s->set_bounds(d, command_column_l_); + { + s->set_bounds(d, command_column_l_); + warning ("Unbound spanner"); + } } while ((d *= -1) != LEFT); - } else { diff --git a/lily/score.cc b/lily/score.cc index 135ebf9821..a32773e433 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -17,8 +17,9 @@ #include "global-translator.hh" #include "header.hh" #include "cpu-timer.hh" +#include "main.hh" +#include "paper-def.hh" -extern String default_out_fn; Score::Score() { @@ -75,11 +76,14 @@ Score::run_translator (Music_output_def *odef_l) { w = iter->next_moment(); DOUT << "proccing: " << w <<"\n"; - iter->print(); + if (!monitor->silent_b ("walking")) + iter->print(); } + trans_p->modify_next (w); trans_p->prepare (w); - trans_p->print(); + if (!monitor->silent_b ("walking")) + trans_p->print(); iter->process_and_next (w); trans_p->process(); @@ -100,7 +104,6 @@ Score::run_translator (Music_output_def *odef_l) output->header_l_ = header_p_; - output->default_out_str_ = default_out_fn; output->origin_str_ = location_str(); *mlog << endl; @@ -116,12 +119,16 @@ Score::process() print(); for (int i=0; i < def_p_arr_.size (); i++) - run_translator (def_p_arr_[i]); + { + if (no_paper_global_b + && def_p_arr_[i]->is_type_b (Paper_def::static_name ())) + continue; + run_translator (def_p_arr_[i]); + } } - void Score::print() const { diff --git a/lily/scores.cc b/lily/scores.cc index edb4bbec80..a5081a25b3 100644 --- a/lily/scores.cc +++ b/lily/scores.cc @@ -15,7 +15,10 @@ #include "parray.hh" static Link_array global_score_array; -String default_out_fn = "lelie"; +String default_outname_suffix_global = ""; +String default_outname_base_global = "lelie"; +int default_count_global; + void do_scores() @@ -26,6 +29,7 @@ do_scores() if (!is_p->header_p_) is_p->header_p_ = new Header; + is_p->header_p_->lily_id_str_ = "Lily was here, " + get_version_number_str(); if (is_p->errorlevel_i_) @@ -56,8 +60,3 @@ add_score (Score * s) global_score_array.push (s); } -void -set_default_output (String s) -{ - default_out_fn = s; -} diff --git a/lily/slur.cc b/lily/slur.cc index 2597c5e032..c7be481d4c 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -100,13 +100,13 @@ Slur::do_post_processing() if (extrema[d] != spanned_drul_[d]) { dx_f_drul_[d] = -d - *(spanned_drul_[d]->width ().length ()/nw_f -0.5); + *(spanned_drul_[d]->width ().length () -0.5*nw_f); } else if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_) - pos_i_drul_[d] = (int)rint (extrema[d]->stem_l_->height()[dir_]/inter_f); + dy_f_drul_[d] = (int)rint (extrema[d]->stem_l_->height()[dir_]); else - pos_i_drul_[d] = (int)rint (extrema[d]->head_positions_interval()[dir_]); - pos_i_drul_[d] += dir_; + dy_f_drul_[d] = (int)rint (extrema[d]->head_positions_interval()[dir_])* inter_f; + dy_f_drul_[d] += dir_ * inter_f; } while ((d *= -1) != LEFT); } diff --git a/lily/spring-spacer.cc b/lily/spring-spacer.cc index 6dc6e441be..3439557f2c 100644 --- a/lily/spring-spacer.cc +++ b/lily/spring-spacer.cc @@ -175,14 +175,8 @@ Spring_spacer::check_constraints (Vector v) const return true; } -bool -Spring_spacer::check_feasible() const -{ - Vector sol (try_initial_solution()); - return check_constraints (sol); -} - -/// generate a solution which obeys the min distances and fixed positions +/// try to generate a solution which obeys the min distances and fixed +/// positions Vector Spring_spacer::try_initial_solution() const { @@ -198,10 +192,7 @@ Spring_spacer::try_initial_solution() const { Real r =initsol (i-1) + cols[i-1].width_[RIGHT]; if (initsol (i) < r) - { - warning (_("overriding fixed position")); initsol (i) =r; - } } } @@ -220,14 +211,6 @@ Spring_spacer::try_initial_solution() const -Vector -Spring_spacer::find_initial_solution() const -{ - Vector v (try_initial_solution()); - assert (check_constraints (v)); - return v; -} - // generate the matrices void Spring_spacer::make_matrices (Matrix &quad, Vector &lin, Real &c) const @@ -259,8 +242,6 @@ 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 @@ -306,6 +287,7 @@ Spring_spacer::lower_bound_solution (Col_hpositions*positions) const start.fill (0.0); Vector solution_vec (lp.solve (start)); + DOUT << "Lower bound sol: " << solution_vec; positions->energy_f_ = calculate_energy_f (solution_vec); positions->config = solution_vec; positions->satisfies_constraints_b_ = check_constraints (solution_vec); @@ -314,26 +296,32 @@ Spring_spacer::lower_bound_solution (Col_hpositions*positions) const void Spring_spacer::solve (Col_hpositions*positions) const { - assert (check_feasible()); + Vector solution_try (try_initial_solution()); + + if (check_constraints (solution_try)) + { + Mixed_qp lp (cols.size()); + make_matrices (lp.quad,lp.lin, lp.const_term); + make_constraints (lp); + set_fixed_cols (lp); - 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 solution_vec (lp.solve (start)); + Vector solution_vec (lp.solve (solution_try)); - positions->satisfies_constraints_b_ = check_constraints (solution_vec); - if (!positions->satisfies_constraints_b_) + 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_ = calculate_energy_f (solution_vec); + positions->config = solution_vec; + positions->error_col_l_arr_ = error_pcol_l_arr(); + } + else { - WARN << _("solution doesn't satisfy constraints.\n") ; + positions->set_stupid_solution (solution_try); } - position_loose_cols (solution_vec); - positions->energy_f_ = calculate_energy_f (solution_vec); - positions->config = solution_vec; - positions->error_col_l_arr_ = error_pcol_l_arr(); - } /** @@ -445,8 +433,10 @@ Spring_spacer::get_ruling_durations(Array &shortest_playing_arr, Array &context_shortest_arr) { for (int i=0; i < cols.size(); i++) - scol_l (i)->preprocess(); - + { + scol_l (i)->preprocess(); + scol_l (i)->print (); + } int start_context_i=0; Moment context_shortest = infinity_mom; context_shortest_arr.set_size(cols.size()); @@ -467,6 +457,7 @@ Spring_spacer::get_ruling_durations(Array &shortest_playing_arr, { context_shortest = context_shortest durations[0]; } + // ji was j, but triggered ICE for (int ji=i+1; ji --;) { @@ -521,20 +512,22 @@ Spring_spacer::calc_idealspacing() Array ideal_arr_; Array hooke_arr_; - for (int i=0; i < cols.size(); i++){ + for (int i=0; i < cols.size() - 1; i++){ ideal_arr_.push (-1.0); hooke_arr_.push (1.0); } + /* + First do all non-musical columns + */ for (int i=0; i < cols.size(); i++) { - if (!scol_l (i)->musical_b()) + if (!scol_l (i)->musical_b() && i+1 < cols.size()) { Real symbol_distance =cols[i].width_[RIGHT] + 2 PT; Real durational_distance = 0; - if (i+1 < cols.size()) - { + Moment delta_t = scol_l (i+1)->when() - scol_l (i)->when () ; Real k= paper_l()->arithmetic_constant(context_shortest_arr[i]); @@ -544,12 +537,16 @@ Spring_spacer::calc_idealspacing() if (delta_t) durational_distance = paper_l()->duration_to_dist (delta_t,k); symbol_distance += -cols[i+1].width_[LEFT]; - } + ideal_arr_[i] = symbol_distance >? durational_distance; - hooke_arr_[i] = 2.0; + hooke_arr_[i] = 1; //2.0; } } + + /* + Then musicals + */ for (int i=0; i < cols.size(); i++) { if (scol_l (i)->musical_b()) @@ -574,23 +571,16 @@ Spring_spacer::calc_idealspacing() dist *= delta_t / shortest_playing_len; /* - this is an experimental try to fix the spacing - at the beginning and end of bars. - if -t option is not used, the old algorithm should still - be in effect. - - the "old" comment below about ugliness seems to indicate that - the code below it address the same problem? but it sounds real - bad. - According to [Ross] and [Wanske], and from what i've seen: + * whitespace at the begin of the bar should be fixed at - (about) two interlines. + (about) one interline. [Ross]: when spacing gets real tight, a smaller fixed value may be used, so that there are two discrete amounts of whitespace possible at the begin of a bar; but this is not implemented right now. + * whitespace at the end of the bar is the normal amount of "hinterfleish" that would have been used, had there been yet another note in the bar. @@ -598,75 +588,53 @@ Spring_spacer::calc_idealspacing() some editors argue that the bar line should not take any space, not to hinder the flow of music spaced around a bar line. - [Ross] and [Wanske] do not suggest this, however. Further, + [Ross] and [Wanske] do not suggest this, however. Further, it introduces some spacing problems and think that it is ugly too. + [jcn] */ - if (experimental_features_global_b) + /* + first musical column of bar + */ + if (i && scol_l (i - 1)->breakable_b_) { - /* - first musical column of bar? - */ - Moment now_mom = scol_l (i)->when (); - if (i && !scol_l (i - 1)->musical_b () - && ((Moment) floor (now_mom) == now_mom)) - { - /* - wtk1-fugue2: very nice - standchen: fuk, koor dump in check_feasible () - */ - // fixed: probably should set minimum (rod/spring)? - cols[i-1].width_[RIGHT] += 1.5 * interline_f; - // should adjust dist too? - ideal_arr_[i-1] += 1.5 * interline_f; - } - - /* - last musical column of bar? - */ - Moment next_mom = scol_l (i + 1)->when (); - if ((i + 1 < cols.size ()) && !scol_l (i + 1)->musical_b () - && ((Moment) floor (next_mom) == next_mom)) - { - // hmm, how bout? - dist = dist >? interline_f; - - // uhuh, this looks fine, already?? - // someone is junking this last "hinterfleisch" whitespace?! - /* - wtk1-fugue2: very nice - standchen: fuk, koor dump in check_feasible () - */ - cols[i].width_[RIGHT] = cols[i].width_[RIGHT] >? dist; - } - - // ugh, do we need this? - if (!scol_l (i + 1)->musical_b ()) - { - Real minimum = -cols[i + 1].width_[LEFT] + cols[i].width_[RIGHT] - + interline_f / 2; - dist = dist >? minimum; - } + // fixed: probably should set minimum (rod/spring)? + cols[i-1].width_[RIGHT] += interline_f; + // should adjust dist too? + ideal_arr_[i-1] = ideal_arr_[i-1] >? interline_f; } - /* all sorts of ugliness to avoid running into bars/clefs, - but not taking extra space if this is not needed + /* + last musical column of bar */ - else if (!scol_l (i + 1)->musical_b ()) + if (i + 1 < cols.size () && scol_l(i+1)->breakable_b_) + { + // hmm, how bout? + dist = dist >? interline_f; + + /* + uhuh, this code looks fine, already? + someone was junking this last "hinterfleisch" whitespace?! + + but this seems to be fixed now :-) + */ + // set minimum rod + cols[i].width_[RIGHT] += interline_f; + } + + // ugh, do we need this? + if (i < cols.size () - 1 && !scol_l (i + 1)->musical_b ()) { - Real minimum_dist = -cols[i + 1].width_[LEFT] + 2 PT - + cols[i].width_[RIGHT]; - if (ideal_arr_[i + 1] + minimum_dist < dist) - dist -= ideal_arr_[i + 1]; - else - dist = minimum_dist; + Real minimum = -cols[i + 1].width_[LEFT] + cols[i].width_[RIGHT] + + interline_f / 2; + dist = dist >? minimum; } ideal_arr_[i] = dist; } } - for (int i=0; i < ideal_arr_.size()-1; i++) + for (int i=0; i < ideal_arr_.size(); i++) { assert (ideal_arr_[i] >=0 && hooke_arr_[i] >=0); connect (i, i+1, ideal_arr_[i], hooke_arr_[i]); diff --git a/lily/stem.cc b/lily/stem.cc index 9bdfd99f80..92e5ca0c51 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -269,21 +269,22 @@ Stem::abbrev_mol () const { Real dy = paper ()->interbeam_f (); Real w = 1.5 * paper ()->lookup_l ()->ball (2).dim_.x ().length (); - Real beamdy = paper ()->interline_f () / 2; + Real interline_f = paper ()->interline_f (); + Real beamdy = interline_f/2; int beams_i = 0; Real slope_f = paper ()->internote_f () / 4; if (beam_l_) { // huh? - slope_f = 2 * beam_l_->slope_f; + slope_f = 2 * beam_l_->slope_f_; // ugh, rather calc from Abbreviation_req beams_i = beams_right_i_ >? beams_left_i_; } - paper ()->lookup_l ()->beam (slope_f, 20 PT); + paper ()->lookup_l ()->beam (slope_f, 20 PT, 1 PT); Molecule beams; - Atom a (paper ()->lookup_l ()->beam (slope_f, w)); + Atom a (paper ()->lookup_l ()->beam (slope_f, w, .48 * interline_f)); a.translate (Offset(- w / 2, stem_end_f () - (w / 2 * slope_f))); // ugh diff --git a/lily/tex-beam.cc b/lily/tex-beam.cc index 4380e8911f..d756461a6f 100644 --- a/lily/tex-beam.cc +++ b/lily/tex-beam.cc @@ -19,6 +19,7 @@ #include "debug.hh" #include "lookup.hh" #include "misc.hh" +#include "main.hh" Atom Lookup::beam_element (int sidx, int widx, Real slope) const @@ -51,8 +52,31 @@ Lookup::rule_symbol (Real height, Real width) const return bs; } +Atom +Lookup::beam(Real &slope, Real width, Real y_thick) const +{ + if (postscript_global_b) + { + return ps_beam (slope, width, y_thick); + } + else + return tex_beam(slope, width); +} + +Atom +Lookup::ps_beam (Real slope, Real width, Real y_thickness)const +{ + Atom ret; + String ps(String (width) + " "+ String(slope) + + " " + String(y_thickness) + " draw_beam"); + ret.tex_ = String("\\embeddedps{" + ps + "}"); + ret.dim_[X_AXIS] = Interval(0, width); + ret.dim_[Y_AXIS] = Interval(0, slope * width + y_thickness); + return ret; +} + Atom -Lookup::beam (Real &slope, Real width) const +Lookup::tex_beam (Real &slope, Real width) const { const Real MAX_SLOPE = 0.6; const Real SLOPES = 20.0; diff --git a/lily/tex-slur.cc b/lily/tex-slur.cc index cee16dbeb8..eb140c4768 100644 --- a/lily/tex-slur.cc +++ b/lily/tex-slur.cc @@ -134,50 +134,34 @@ Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const } Atom -Lookup::slur (int dy , Real &dx, Direction dir) const +Lookup::ps_slur (Real dy , Real dx, Real dir) const { - assert (abs (dir) <= 1); - if (dx < 0) - { - warning (_("Negative slur/tie length: ") + print_dimen (dx)); - dx = 4.0 PT; - } + String ps = "\\embeddedps{\n"; + + ps += String_convert::double_str (dx) + " " + + String_convert::double_str (dy) + " " + + String_convert::double_str (dir) + + " draw_slur}"; + + String mf = "\\embeddedmf{\n"; + mf += "input feta-sleur;\n"; + mf += "draw_slur((0,0),"; + mf += "(" + String_convert::double_str (dx) + "," + + String_convert::double_str (dy) + "),"; + mf += String_convert::double_str (dir) + ");\n"; + mf += "end.\n"; + mf += "}\n"; Atom s; - s.dim_[X_AXIS] = Interval (0, dx); - s.dim_[Y_AXIS] = Interval (min (0, dy), max (0, dy)); - - // duh - // let's try the embedded stuff - - /* bool embedded_b = experimental_features_global_b; - // embedded stuff still sucks for slurs - */ - bool embedded_b = false; - String embed; - if (embedded_b) - { - Real fdy = dy*paper_l_->internote_f (); - Real fdx = dx; - String ps = "\\embeddedps{\n"; - // ugh, how bout " /draw_slur { ... } def " - ps += String_convert::double_str (fdx) + " " - + String_convert::double_str (fdy) + " " - + String_convert::double_str (dir) + - " draw_slur}"; - - String mf = "\\embeddedmf{\n"; - mf += "input feta-sleur;\n"; - mf += "draw_slur((0,0),"; - mf += "(" + String_convert::double_str (fdx) + "," - + String_convert::double_str (fdy) + "),"; - mf += String_convert::double_str (dir) + ");\n"; - mf += "end.\n"; - mf += "}\n"; - - embed = ps + mf; - } + s.tex_ = ps + mf; + return s; +} +Atom +Lookup::tex_slur (int dy , Real &dx, Direction dir) const +{ + assert (abs (dir) <= 1); + Atom s; Direction y_sign = (Direction) sign (dy); bool large = abs (dy) > 8; @@ -192,11 +176,6 @@ Lookup::slur (int dy , Real &dx, Direction dir) const if (large) { s = big_slur (dy, dx, dir); - if (embedded_b) - { - s.tex_ = "\\embeddedtex{\n" + s.tex_ + "\n}\n"; - s.tex_ += embed; - } return s; } Real orig_dx = dx; @@ -243,12 +222,6 @@ Lookup::slur (int dy , Real &dx, Direction dir) const assert (idx < 256); f+=String ("{") + String (idx) + "}"; s.tex_ = f; - if (embedded_b) - { - s.tex_ = "\\embeddedtex{\n" + s.tex_ + "\n}\n"; - s.tex_ += embed; - } - s.translate_axis (dx/2, X_AXIS); return s; } @@ -288,3 +261,30 @@ Lookup::big_slur (int dy , Real &dx, Direction dir) const s.dim_ = mol.extent(); return s; } + + +Atom +Lookup::slur (Real &dy_f , Real &dx, Direction dir) const +{ + if (dx < 0) + { + warning (_("Negative slur/tie length: ") + print_dimen (dx)); + dx = 4.0 PT; + } + Atom s; + + if (postscript_global_b) + s = ps_slur (dy_f, dx, dir); + else + { + Real nh = paper_l_->internote_f (); + int dy_i = (int) rint(dy_f / nh); + + s = tex_slur (dy_i, dx, dir); + dy_f = dy_i * nh; + } + + s.dim_[X_AXIS] = Interval (0, dx); + s.dim_[Y_AXIS] = Interval (0 ? dy_f); + return s; +} diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index c23bb7e645..f100b72ae7 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -19,11 +19,17 @@ void Text_spanner::set_support (Directional_spanner*d) { if (support_span_l_) - remove_dependency (support_span_l_); + remove_dependency (support_span_l_); support_span_l_ =d; add_dependency (d); } +void +Text_spanner::do_add_processing () +{ + set_bounds (LEFT, support_span_l_->spanned_drul_[LEFT]); + set_bounds (RIGHT, support_span_l_->spanned_drul_[RIGHT]); +} Text_spanner::Text_spanner() { diff --git a/lily/tie.cc b/lily/tie.cc index 9418bfb997..a181bedde3 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -61,13 +61,16 @@ void Tie::do_post_processing() { Real nw_f = paper()->note_width (); + Real space_f = paper()->interline_f (); assert (head_l_drul_[LEFT] || head_l_drul_[RIGHT]); Direction d = LEFT; do { - pos_i_drul_[d] = (head_l_drul_[d])? - head_l_drul_[d]->position_i_ : head_l_drul_[(Direction)-d]->position_i_; + dy_f_drul_[d] = + .5 *space_f * (head_l_drul_[d] + ? head_l_drul_[d]->position_i_ + : head_l_drul_[(Direction)-d]->position_i_); } while ((d *= -1) != LEFT); @@ -75,16 +78,16 @@ Tie::do_post_processing() { if (head_l_drul_[d] && head_l_drul_[d]->extremal_i_) { - pos_i_drul_[d] += 2*dir_; - dx_f_drul_[d] += d * 0.25; + dy_f_drul_[d] += dir_ * space_f; + dx_f_drul_[d] += d * 0.25 * nw_f; } else if (head_l_drul_[d]) - dx_f_drul_[d] += d*0.5; + dx_f_drul_[d] += d*0.5 * nw_f; else { - pos_i_drul_[d] = pos_i_drul_[(Direction) -d]; - dx_f_drul_[d] = -d - *(spanned_drul_[d]->width ().length ()/nw_f -0.5); + dy_f_drul_[d] = dy_f_drul_[(Direction) -d]; + dx_f_drul_[d] = -d *(spanned_drul_[d]->width ().length () + -0.5* nw_f); } } while ((d *= -1) != LEFT); diff --git a/make/Toplevel.make.in b/make/Toplevel.make.in index 9493966c26..83ed45bd66 100644 --- a/make/Toplevel.make.in +++ b/make/Toplevel.make.in @@ -34,7 +34,7 @@ SUBDIRS = bin flower lib lily mf mi2mu debian\ # list of distribution files: # SCRIPTS = configure configure.in install-sh aclocal.m4 -README_FILES = BUGS DEDICATION ANNOUNCE COPYING ONEWS NEWS README TODO \ +README_FILES = BUGS DEDICATION ANNOUNCE-0.1 ANNOUNCE COPYING ONEWS NEWS README TODO \ INSTALL.text AUTHORS.text EXTRA_DISTFILES = .dstreamrc mudela-mode.el VERSION $(README_FILES) $(SCRIPTS) $(SYMLINKS) diff --git a/make/lelievijver.lsm b/make/lelievijver.lsm index 524589af89..999574b297 100644 --- a/make/lelievijver.lsm +++ b/make/lelievijver.lsm @@ -1,7 +1,7 @@ Begin3 Titel: LilyPond -Versie: 0.1.38 -Inschrijf datum: 24DEC97 +Versie: 0.1.39 +Inschrijf datum: 05JAN98 Beschrijving: LilyPond is de muziek typesetter van het GNU Project. Het programma genereert muziek in zichtbare of hoorbare vorm uit uit een muzikale definitie file: @@ -16,8 +16,8 @@ Auteur: hanwen@stack.nl (Han-Wen Nienhuys) jan@digicash.com (Jan Nieuwenhuizen) Onderhouden door: hanwen@stack.nl (Han-Wen Nienhuys) Voornaamste plek: sunsite.unc.edu /pub/Linux/apps - 395k lilypond-0.1.38.tar.gz + 395k lilypond-0.1.39.tar.gz Oorspronkelijke plek: pcnov095.win.tue.nl /pub/lilypond/ - 395k lilypond-0.1.38.tar.gz + 395k lilypond-0.1.39.tar.gz Copi"eer politie: GPL End diff --git a/make/lilypond.lsm b/make/lilypond.lsm index cc3aa4563b..1461f9666e 100644 --- a/make/lilypond.lsm +++ b/make/lilypond.lsm @@ -1,7 +1,7 @@ Begin3 Title: LilyPond -Version: 0.1.38 -Entered-date: 24DEC97 +Version: 0.1.39 +Entered-date: 05JAN98 Description: LilyPond is the GNU Project music typesetter. The program generates visual or auditive output from a music definition file: it can typeset formatted sheet music @@ -9,13 +9,14 @@ Description: LilyPond is the GNU Project music typesetter. The program MIDI file. Features include multiple staffs, meters, clefs, keys, lyrics, versatile input-language, cadenzas, beams, slurs, triplets. -Keywords: music notation typesetting midi + It includes a nice font of musical symbols. +Keywords: music notation typesetting midi fonts 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/sound/convert - 460k lilypond-0.1.38.tar.gz + 470k lilypond-0.1.39.tar.gz Original-site: pcnov095.win.tue.nl /pub/lilypond/development/ - 460k lilypond-0.1.38.tar.gz + 470k lilypond-0.1.39.tar.gz Copying-policy: GPL End diff --git a/make/lilypond.lsm.in b/make/lilypond.lsm.in index b98fc8e244..603ef5272d 100644 --- a/make/lilypond.lsm.in +++ b/make/lilypond.lsm.in @@ -9,13 +9,14 @@ Description: LilyPond is the GNU Project music typesetter. The program MIDI file. Features include multiple staffs, meters, clefs, keys, lyrics, versatile input-language, cadenzas, beams, slurs, triplets. -Keywords: music notation typesetting midi + It includes a nice font of musical symbols. +Keywords: music notation typesetting midi fonts 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/sound/convert - 460k lilypond-@TOPLEVEL_VERSION@.tar.gz + 470k lilypond-@TOPLEVEL_VERSION@.tar.gz Original-site: pcnov095.win.tue.nl /pub/lilypond/development/ - 460k lilypond-@TOPLEVEL_VERSION@.tar.gz + 470k lilypond-@TOPLEVEL_VERSION@.tar.gz Copying-policy: GPL End diff --git a/make/lilypond.spec b/make/lilypond.spec index 57db1d4144..b4f4b9e0b7 100644 --- a/make/lilypond.spec +++ b/make/lilypond.spec @@ -1,9 +1,9 @@ Name: lilypond -Version: 0.1.38 +Version: 0.1.39 Release: 1 Copyright: GPL Group: Applications/Publishing -Source0: alpha.gnu.org:/gnu/lilypond/development/lilypond-0.1.38.tar.gz +Source0: alpha.gnu.org:/gnu/lilypond/development/lilypond-0.1.39.tar.gz Summary: A program for typesetting music. URL: http://www.stack.nl/~hanwen/lilypond Packager: Han-Wen Nienhuys @@ -19,8 +19,6 @@ MIDI file. Features include multiple staffs, meters, clefs, keys, lyrics, versatile input-language, cadenzas, beams, slurs, triplets. -[you need the musixtex fonts to use LilyPond] - %prep %setup %build @@ -33,7 +31,7 @@ make -C Documentation gifs 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/internals.text Documentation/out/language.text Documentation/out/lilypond.text Documentation/out/links.text Documentation/out/literature.text Documentation/out/mi2mu.text Documentation/out/mudela-book.text Documentation/out/mutopia.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/font.ly input/font20.ly input/gallina.ly input/gallina.tex input/gourlay.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/sleur.ly input/slurs.ly input/standchen-16.ly input/standchen-16.tex input/standchen-20.ly input/standchen-20.tex input/standchen.ly input/stem.ly input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wtk1-fugue1.ly input/wtk1-fugue2.ly input/wtk1-prelude1.ly Documentation/mudela-course.doc Documentation/mudela-man.doc +%doc input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/font.ly input/font20.ly input/gallina.ly input/gallina.tex input/gourlay.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/sleur.ly input/slurs.ly input/spacing.ly input/standchen-16.ly input/standchen-16.tex input/standchen-20.ly input/standchen-20.tex input/standchen.ly input/stem.ly input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wtk1-fugue1.ly input/wtk1-fugue2.ly input/wtk1-prelude1.ly Documentation/mudela-course.doc Documentation/mudela-man.doc %doc Documentation/out/lelie_logo.gif /usr/bin/convert-mudela /usr/bin/mudela-book diff --git a/make/lilypond.spec.in b/make/lilypond.spec.in index 0ac1082b11..9f9ac9b447 100644 --- a/make/lilypond.spec.in +++ b/make/lilypond.spec.in @@ -19,8 +19,6 @@ MIDI file. Features include multiple staffs, meters, clefs, keys, lyrics, versatile input-language, cadenzas, beams, slurs, triplets. -[you need the musixtex fonts to use LilyPond] - %prep %setup %build diff --git a/mf/TODO b/mf/TODO index ffeed55f44..b1e9c59a82 100644 --- a/mf/TODO +++ b/mf/TODO @@ -1,6 +1,6 @@ - - design macro for penstroke with rounded endings - design decent macro for bulbed endings + - printer dependencies. - y-refpoint for rests should be the 4th staffline (gclef: b') - versioning - lo-res fixes. diff --git a/mf/autometric.mf b/mf/feta-autometric.mf similarity index 100% rename from mf/autometric.mf rename to mf/feta-autometric.mf diff --git a/mf/feta-beugel.mf b/mf/feta-beugel.mf index df625dc0c3..7acd135471 100644 --- a/mf/feta-beugel.mf +++ b/mf/feta-beugel.mf @@ -39,6 +39,6 @@ endchar; enddef; -for h := 2 staffsize# step 2 pt# until (6 * staffsize#): +for h := 2 staffsize# step 1 pt# until (6 * staffsize#): draw_brace(h, interline# ); endfor diff --git a/mf/feta-din10.mf b/mf/feta-din10.mf index af28aa0f13..63ed200622 100644 --- a/mf/feta-din10.mf +++ b/mf/feta-din10.mf @@ -112,12 +112,12 @@ flare#:=52/36pt#; % diameter of bulbs or breadth of terminals mode_setup; font_setup; -input autometric; +input feta-autometric; fet_beginfont("feta-din", 10); num=-1; xbar:=u; -input ital-f; +input feta-ital-f; bar#:=17/36pt#; % lowercase bar thickness slant:=.38; % tilt ratio $(\Delta x/\Delta y)$ @@ -125,14 +125,14 @@ stem#:=58/36pt#; % lowercase stem breadth font_setup; xbar:=.4u; -input ital-f; +input feta-ital-f; stem#:=54/36pt#; % lowercase stem breadth hair#:=12/36pt#; % lowercase hairline breadth vair#:=7/36pt#; % vertical diameter of hairlines font_setup; -input ital-p; +input feta-ital-p; slant:=.28; % tilt ratio $(\Delta x/\Delta y)$ %stem#:=38/36pt#; % lowercase stem breadth @@ -162,10 +162,10 @@ x_height#:=135/36pt#; % height of lowercase without ascenders font_setup; -input ital-m; -input ital-r; -input ital-s; -input ital-z; +input feta-ital-m; +input feta-ital-r; +input feta-ital-s; +input feta-ital-z; font_slant slant; font_x_height x_height#; diff --git a/mf/ital-f.mf b/mf/feta-ital-f.mf similarity index 100% rename from mf/ital-f.mf rename to mf/feta-ital-f.mf diff --git a/mf/ital-m.mf b/mf/feta-ital-m.mf similarity index 100% rename from mf/ital-m.mf rename to mf/feta-ital-m.mf diff --git a/mf/ital-p.mf b/mf/feta-ital-p.mf similarity index 100% rename from mf/ital-p.mf rename to mf/feta-ital-p.mf diff --git a/mf/ital-r.mf b/mf/feta-ital-r.mf similarity index 100% rename from mf/ital-r.mf rename to mf/feta-ital-r.mf diff --git a/mf/ital-s.mf b/mf/feta-ital-s.mf similarity index 100% rename from mf/ital-s.mf rename to mf/feta-ital-s.mf diff --git a/mf/ital-z.mf b/mf/feta-ital-z.mf similarity index 100% rename from mf/ital-z.mf rename to mf/feta-ital-z.mf diff --git a/mf/feta-klef.mf b/mf/feta-klef.mf index 3d78d804f4..d65822695e 100644 --- a/mf/feta-klef.mf +++ b/mf/feta-klef.mf @@ -215,7 +215,7 @@ def draw_gclef (expr exact_center, reduction)= set_char_box( left_space# + - -xpart exact_center + 1.1 * breapth_factor* reduced_il#, + -xpart exact_center + 1.0 * breapth_factor* reduced_il#, right_space# + xpart exact_center + .66 breapth_factor* reduced_il#, -ypart exact_center + 3 * reduced_il#, diff --git a/mf/feta-nummer-generic.mf b/mf/feta-nummer-generic.mf index 141dd70dd0..fca2c215cc 100644 --- a/mf/feta-nummer-generic.mf +++ b/mf/feta-nummer-generic.mf @@ -3,7 +3,7 @@ test:=0; -input autometric; +input feta-autometric; fet_beginfont("feta-nummer", size); mode_setup; diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index cec0283fcd..9cc309f3fb 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -372,7 +372,7 @@ fet_beginchar("Trill (`tr')","trill","trill") slant = .2; local_copy(transform)(currenttransform); - currenttransform := currenttransform slanted slant; + currenttransform := currenttransform slanted slant shifted (- interline, 0) ; y1 = ascender; x1l = 0; @@ -438,7 +438,7 @@ fet_beginchar("Trill (`tr')","trill","trill") --- z9r{up} .. z8r{left} .. z7r{z5-z7} -- cycle; fill r_p; - set_char_box(0,2 interline#, 0,ascender#); + set_char_box(interline# , interline#, 0,ascender#); penpos11(1/4 r_fatness, -20); diff --git a/mf/feta-test16.mf b/mf/feta-test16.mf index c561ed1d72..c7c8db872b 100644 --- a/mf/feta-test16.mf +++ b/mf/feta-test16.mf @@ -4,7 +4,7 @@ % font_identifier:="font-en-tja16"; % font_size 16pt#; -input autometric; +input feta-autometric; fet_beginfont("feta-test", 16); staffsize#:=16pt#; test:=1; diff --git a/mf/feta-test20.mf b/mf/feta-test20.mf index 4c1a4f80b7..b70e54a4f6 100644 --- a/mf/feta-test20.mf +++ b/mf/feta-test20.mf @@ -4,7 +4,7 @@ % font_identifier:="font-en-tja20"; % font_size 20pt#; -input autometric; +input feta-autometric; fet_beginfont("feta-test", 20); staffsize#:=20pt#; test:=1; diff --git a/mf/feta16.mf b/mf/feta16.mf index fa359d51c0..bcc8c41c7f 100644 --- a/mf/feta16.mf +++ b/mf/feta16.mf @@ -4,7 +4,7 @@ % font_identifier:="font-en-tja16"; % font_size 16pt#; -input autometric; +input feta-autometric; fet_beginfont("feta", 16); staffsize#:=16pt#; test:=0; diff --git a/mf/feta20.mf b/mf/feta20.mf index 5364504155..f4cbfaa95f 100644 --- a/mf/feta20.mf +++ b/mf/feta20.mf @@ -3,7 +3,7 @@ staffsize#:=20pt#; -input autometric; +input feta-autometric; fet_beginfont("feta", 20); % AFBLIJVEN! Gebruik feta-test16/20, anders verneuk je de distributie. diff --git a/mf/round-pixel-gray.mf b/mf/round-pixel-gray.mf deleted file mode 100644 index 6ffafd49e5..0000000000 --- a/mf/round-pixel-gray.mf +++ /dev/null @@ -1,92 +0,0 @@ -% Black font for Imagen with proofsheet resolution 75 pixels per inch - -% if mode<>imagen: errmessage "This file is for imagen only"; fi - -font_identifier "BLACKIMAGEN"; -picture pix_picture; pix_wd := pix_ht := 8; -pix_picture := nullpicture; -addto pix_picture contour (fullcircle scaled (8*1.6) shifted (4,4)); - -%pix_picture := unitpixel scaled 4; -% More-or-less general gray font generator -% See Appendix H of The METAFONTbook for how to use it - -forsuffixes m = mag,rep: - if unknown m: m := 1; - elseif (m<1) or (m<>floor m): - errmessage "Sorry, " & str m & " must be a positive integer"; - m := 1; fi endfor - -mg := mag; mag := 1; mode_setup; -if mg>1: hppp := hppp*mg; vppp := vppp*mg; - extra_endchar:= - "if charcode>0:currentpicture:=currentpicture scaled mg;fi" - & extra_endchar; fi; - -if picture pix_picture: rep := 1; - cull pix_picture keeping (1,infinity); -else: for z=(0,2),(1,0),(2,3),(3,1): - fill unitsquare shifted z; endfor - if not boolean lightweight: addto currentpicture also - currentpicture rotated 90 xscaled -1; fi - if unknown scale: scale := max(1,round(pixels_per_inch/300)); fi - pix_wd := pix_ht := 4scale; - if rep>1: picture pix; - currentpicture := currentpicture shifted-(1,1); pix := currentpicture; - for r=1 upto rep-1: addto currentpicture also pix shifted(4r,0); endfor - cullit; pix := currentpicture; - for r=1 upto rep-1: addto currentpicture also pix shifted(0,4r); endfor - unfill unitsquare xscaled 4rep yscaled 2 shifted-(1,1); - unfill unitsquare yscaled 4rep xscaled 2 shifted-(1,1); cullit; fi - picture pix_picture; pix_picture := currentpicture scaled scale; - pix_wd := pix_ht := 4scale*rep; fi - -def # = *72.27/pixels_per_inch enddef; -if unknown dotsize: dotsize := 2.5pix_wd/rep; fi - -beginchar(0,1.2dotsize#,1.2dotsize#,0); -fill fullcircle scaled dotsize scaled mg; endchar; - -numeric a[]; newinternal b,k; -def next_binary = - k := 0; forever: if k>b: a[incr b] := 0; fi - exitif a[k]=0; a[k] := 0; k := k+1; endfor - a[k] := 1 enddef; -def next_special_binary = - if a[0]=1: for k=0 upto b: a[k] := 0; endfor a[incr b] - else: k := 0; forever: exitif a[incr k]=1; endfor - a[k-1] fi := 1 enddef; - -def make_char = - clearit; next_binary; - for k=0 upto b: if a[k]=1: - addto currentpicture also pix_picture shifted(0,-k*pix_ht); fi endfor - charcode := charcode+1; chardp := b*charht; - scantokens extra_endchar; shipout currentpicture enddef; - -charwd := pix_wd#; charht := pix_ht#; chardx := pix_wd*mg; -b := -1; - -if boolean large_pixels: - for k=1 upto 7: make_char; charlist k:k+120; endfor - charcode := 120; b := -1; - addto pix_picture also pix_picture shifted (chardx,0); - charwd := 2charwd; chardx := 2chardx; - for k=1 upto 7: make_char; endfor -else: for k=1 upto 63: make_char; endfor - let next_binary = next_special_binary; - for k=64 upto 120: make_char; endfor - for k=121,122: charcode := k; - addto currentpicture also currentpicture shifted (chardx,0); - charwd := 2charwd; chardx := 2chardx; - scantokens extra_endchar; shipout currentpicture; endfor - charlist 120:121:122; fi - -font_coding_scheme "GFGRAY"; -font_size 8(pix_wd#); -font_normal_space pix_wd#; -font_x_height pix_ht#; -font_quad pix_wd#; -fontdimen 8: if known rulethickness: rulethickness - else: pix_wd#/(2rep) fi; -bye. diff --git a/mi2mu/main.cc b/mi2mu/main.cc index 28cf48688a..623fc816e0 100644 --- a/mi2mu/main.cc +++ b/mi2mu/main.cc @@ -135,7 +135,7 @@ main (int argc_i, char* argv_sz_a[]) int i = str.index_i (':'); i = (i >=0 ? i : str.length_i ()); key.accidentals_i_ = String_convert::dec2_i (str.left_str (i)); - key.minor_i_ = (int)(bool)String_convert::dec2_i (str.mid_str (i + 1,1)); + key.minor_i_ = (int)(bool)String_convert::dec2_i (str.cut (i + 1,1)); break; } case 'n': diff --git a/mi2mu/mudela-stream.cc b/mi2mu/mudela-stream.cc index 73b231d168..ed1350645b 100644 --- a/mi2mu/mudela-stream.cc +++ b/mi2mu/mudela-stream.cc @@ -46,7 +46,7 @@ Mudela_stream::operator << (String str) if (!i) i = str.length_i(); String word = str.left_str (i); - str = str.mid_str (i, str.length_i()); + str = str.cut (i, str.length_i()); output_wrapped (word); } return *this; diff --git a/tex/feta16.tex b/tex/feta16.tex index f7a8acd462..c7d3d10960 100644 --- a/tex/feta16.tex +++ b/tex/feta16.tex @@ -1,5 +1,5 @@ % Creator: mf-to-table.py version 0.4 -% Automatically generated on Mon Dec 29 10:52:00 1997 +% Automatically generated on Mon Jan 5 15:23:51 1998 % Do not edit % input from out/feta16.log % name diff --git a/tex/feta20.tex b/tex/feta20.tex index 21be64fb9d..f45420f5c0 100644 --- a/tex/feta20.tex +++ b/tex/feta20.tex @@ -1,5 +1,5 @@ % Creator: mf-to-table.py version 0.4 -% Automatically generated on Mon Dec 29 10:52:03 1997 +% Automatically generated on Mon Jan 5 15:23:56 1998 % Do not edit % input from out/feta20.log % name diff --git a/tex/fetdefs.tex b/tex/fetdefs.tex index 2a6385abf4..ab31cb344f 100644 --- a/tex/fetdefs.tex +++ b/tex/fetdefs.tex @@ -8,8 +8,10 @@ \font\dynfont=feta-din10 scaled \magstep1 \font\bracefont=feta-braces16 \font\fingerfont=feta-nummer4 + \interlinedist=4pt } \def\fettwentydefs{ + \interlinedist=5pt \font\fontentja=feta20 \font\vetfont=feta-beams20 \font\fetanummer=feta-nummer10 @@ -18,6 +20,9 @@ \font\fingerfont=feta-nummer5 } +\def\sixteenfonts{\fetsixteendefs\cmrsixteen} +\def\twentyfonts{\fettwentydefs\cmrtwenty} + \def\fetdef#1#2{\def#1{% \hbox{\fetchar{#2}}}} @@ -35,9 +40,9 @@ % oeps: \meter 12/8; \def\generalmeter#1#2{% \vbox to 0pt{\vss% - \hbox to0.45\balkheight{\hss\fetanummer #1\hss}% + \hbox to0.45\staffheight{\hss\fetanummer #1\hss}% \nointerlineskip% - \hbox to0.45\balkheight{\hss\fetanummer #2\hss}% + \hbox to0.45\staffheight{\hss\fetanummer #2\hss}% \vss}} \def\pianobrace#1{{\bracefont\char #1}} @@ -67,109 +72,7 @@ -% -% WARNING: don't leave blank lines in the PS-code; they are -% transformed into \par -% - - -\def\turnOnPostScript{ -\def\embeddedps##1{ - % - % This sets CTM so that you get to the currentpoint - % by executing a 0 0 moveto - \special{ps: @beginspecial @setspecial ##1 @endspecial} -} -\special{ps: -/draw_decresc - { - /ht exch def - /wd exch def -% - 0 ht moveto - wd ht neg rlineto - wd neg ht neg rlineto - stroke - } - def - /draw_cresc - { - /ht exch def - /wd exch def -% - 0 0 moveto - wd ht rmoveto - wd neg ht neg rlineto - wd ht neg rlineto - stroke - } - def -} -} - -\def\turnOnExperimentalFeatures{ -% draw a slur in embedded postscript -\special{ps: -/xbow 1 3 div def -/ybow 1 4 div def -/thin 0.2 def -/thick thin 5 mul def -/draw_slur { - % up or down? - /dir exch def -% -% for mo*tex shift -% exch -% 1 copy /dx exch def -% exch -% - % calc angle alpha - 2 copy exch atan /alpha exch def - % calc len(gth) - 2 exp exch 2 exp add sqrt /len exch def -% - % add and calc z2, z3 - len xbow mul - len ybow mul dir mul - 1 xbow sub len mul - len ybow mul dir mul -% - % add z4, z1 - len 0 - 0 0 -% - % add and calc z5..z8 - 8 copy - thin dir mul sub - 8 2 roll - thin dir mul sub - 8 2 roll - thick dir mul sub - 8 2 roll - thick dir mul sub -% - % reverse order, must be cycle - 8 6 roll - 6 2 roll - 4 2 roll - 8 6 roll -% - % set z1..z4 - 16 8 roll -% - alpha rotate -% silly mo*tex convention -% dx 2 div -1 mul 0 translate - % draw z1..z4 - moveto curveto - % draw z5..z8 - lineto curveto - % cycle - 0 0 lineto - fill -} def } -} - +\input lily-ps-defs \def\embeddedtex#1{#1} \def\embeddedmf#1{ @@ -196,7 +99,7 @@ % dat heb je handig gedaan, lieverd! \nometafont %\nopostscript -%\notex +\notex \def\EndLilyPondOutput{ \storeembedcount diff --git a/tex/lily-ps-defs.tex b/tex/lily-ps-defs.tex new file mode 100644 index 0000000000..9b0ed425a5 --- /dev/null +++ b/tex/lily-ps-defs.tex @@ -0,0 +1,148 @@ +% +% WARNING: don't leave blank lines in the PS-code; they are +% transformed into \par +% + +% +% Should put in a lily-ps.ps header? +% +% + +% +% header info (macros/defs, etc) should go into a \special{! ... }, +% note the ! sign. See dvips.info for details. +% + +% Use of +% /foo { operatorname } bind def +% +% ``compiles'' operatorname binding in the body of foo, making +% the code faster, and more reliable (less flexible) + + +% transplant a TeX dimension into the PS output. +\def\PSsetTeXdimen#1{\expandafter\special{! /#1 (\the\csname #1\endcsname) deftexdimen}} + +\def\turnOnPostScript{ +\def\embeddedps##1{% + % This sets CTM so that you get to the currentpoint + % by executing a 0 0 moveto + \special{ps: @beginspecial @setspecial ##1 @endspecial} +} + +% +% width, slope, height +% +\special{! % round cappings +1 setlinecap +/draw_beam +{ + /beam_thick exch def + /beam_slope exch def + /beam_wd exch def + beam_slope beam_wd mul /beam_ht exch def + 0 0 moveto + beam_wd beam_ht rlineto + 0 beam_thick rlineto + 0 beam_thick lineto + closepath fill +} bind def +% PS helper: convert (0.2pt) to the token 0.2 +/settexdimen { /thestring exch def + thestring 0 thestring length 2 sub + getinterval + token + pop exch pop } +def +% +/deftexdimen { + settexdimen + def +} def +} + + +\PSsetTeXdimen{staffrulethickness} +\PSsetTeXdimen{staffheight} +\special{! % +/draw_decresc + { + staffrulethickness setlinewidth + /cresc_cont exch def + /cresc_ht exch def + /cresc_wd exch def +% + cresc_wd cresc_cont moveto + 0 cresc_ht lineto + stroke + cresc_wd cresc_cont neg moveto + 0 cresc_ht neg lineto + stroke + } + bind def + /draw_cresc + { + /cresc_cont exch def + /cresc_ht exch def + /cresc_wd exch def +% + 0 cresc_cont moveto + cresc_wd cresc_ht lineto + stroke + 0 cresc_cont neg moveto + cresc_wd cresc_ht neg lineto + stroke + } + bind def + /lily_distance { + 1 copy mul exch 1 copy mul add sqrt + } bind def + staffheight 2 div + /slurhtlimit exch def + /slurratio 0.3333 def + % + % (b*ratio)/(1 + b / htlimit) + /getslurcontrol + { + slurhtlimit 90 div /slur_alpha exch def + slurratio 60 div slur_alpha div /slur_beta exch def + slur_beta mul 1 atan slur_alpha mul + } bind def + staffrulethickness 1.5 mul /slur_thick exch def + /draw_slur + { + staffrulethickness setlinewidth + 0 0 moveto + /slur_dir exch def + /slur_dy exch def + /slur_dx exch def + slur_dy slur_dx lily_distance /slur_b exch def + slur_b getslurcontrol + slur_dir mul /slur_ht exch def + slur_b getslurcontrol /slur_indent exch def +% + slur_dy slur_dx atan rotate + slur_indent slur_ht + slur_b slur_indent sub slur_ht + slur_b 0 + % pstack + rcurveto + % + slur_indent neg slur_ht slur_dir slur_thick mul sub + slur_indent slur_b sub slur_ht slur_dir slur_thick mul sub + slur_b neg 0 + rcurveto + % + gsave + fill + grestore + stroke + } bind def}} + + + + +\def\turnOnExperimentalFeatures{ +% draw a slur in embedded postscript +\special{ps: +}} diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 3e2300989e..02116e998c 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -53,7 +53,7 @@ \newdimen\interlinedist \newdimen\stemthickness \newcount\n -\newdimen\balkheight +\newdimen\staffheight \newdimen\notewidth \newdimen\noteheight \newdimen\staffrulethickness @@ -64,20 +64,32 @@ % set fonts and primary dimensions % ugh \def\musixtwentydefs{ - \balkheight=20pt + \staffheight=20pt \notewidth=7.15pt \noteheight=5pt - \musixtwentyfonts - \font\textmusic=cmmi12 + \twentyfonts \musixcalc } +\def\cmrtwenty{ + \font\meterfont=cmbx15 + \font\italicfont=cmti10 + \font\musicmathfont=cmsy10 + \font\normaltextfont=cmr10 %\textfont is a primitive + \font\smalltextfont=cmr8 +} +\def\cmrsixteen{ + \font\smalltextfont=cmr6 + \font\normaltextfont=cmr8 %\textfont is a primitive + \font\meterfont=cmbx12 + \font\italicfont=cmti8 + \font\textmusic=cmmi10 +} \def\musixsixteendefs{ - \balkheight=16pt + \staffheight=16pt \notewidth=5.93pt \noteheight=4pt - \musixsixteenfonts - \font\textmusic=cmmi10 + \sixteenfonts \musixcalc } @@ -96,9 +108,8 @@ % this has to be synced with the font definition \def\musixcalc{ - \interlinedist=\fontdimen5\musicfnt \smallspace=.3\interlinedist - \interstaffrule=\balkheight + \interstaffrule=\staffheight \divide\interstaffrule by 4 % [D.K.Roush & J.S.Gourlay] say this should be 0.072 @@ -115,19 +126,20 @@ % stacked horizontal lines \input dyndefs +\input fetdefs -\input taupindefs +%\input taupindefs %\input eglerdefs \def\emptybar{} -\def\defaultthinbar{\thinbar{\balkheight}} -\def\defaultthickbar{\thickbar{\balkheight}} +\def\defaultthinbar{\thinbar{\staffheight}} +\def\defaultthickbar{\thickbar{\staffheight}} %? what-s wrong with rightalign? \def\repeatstopbar{\hss\rightalign{\repeatcolon\hskip2\smallspace\defaultthinbar\hskip\smallspace\defaultthickbar}} \def\repeatstartbar{\hbox{\defaultthickbar\kern\smallspace\defaultthinbar\kern2\smallspace\repeatcolon}} -\def\repeatstopstart{\hbox{\repeatcolon\kern2\smallspace\defaultthinbar\kern\smallspace\defaultthickbar\kern\smallspace\defaultthickbar\kern\smallspace\defaultthinbar\kern2\smallspace\repeatcolon}} +\def\repeatstopstart{\hbox{\repeatcolon\kern2\smallspace\defaultthickbar\kern\smallspace\defaultthickbar\kern2\smallspace\repeatcolon}} %compatibility \def\repeatbar{\repeatstopbar} diff --git a/tex/taupindefs.tex b/tex/taupindefs.tex index 582c4dcd90..a6aa7c70fb 100644 --- a/tex/taupindefs.tex +++ b/tex/taupindefs.tex @@ -1,7 +1,5 @@ \def\musixtwentyfonts{ - \font\normaltextfont=cmr10 %\textfont is a primitive - \font\smalltextfont=cmr8 - \font\meterfont=cmbx15 + \font\dynfont=cmbxti10 scaled \magstep2 \font\slurufont=xslu20 \font\slurdfont=xsld20 \font\slurhfont=xslz20 @@ -10,9 +8,6 @@ \font\hslurhfont=xslhz20 \font\musicfnt=musix20 \font\musicdraw=musixsps - \font\italicfont=cmti10 - \font\dynfont=cmbxti10 scaled \magstep2 - \font\musicmathfont=cmsy10 \fettwentydefs } @@ -20,8 +15,6 @@ \def\musixsixteenfonts{ \font\normaltextfont=cmr8 %\textfont is a primitive \font\smalltextfont=cmr6 - \font\meterfont=cmbx12 - \font\italicfont=cmti8 \font\slurufont=xslu16 \font\slurdfont=xsld16 \font\slurhfont=xslz20 % sigh @@ -136,4 +129,3 @@ % \musicfnt\char\count0}} -\input fetdefs -- 2.39.2