TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 51
+TOPLEVEL_PATCH_LEVEL = 52
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
Multiple staffs in one score. Each staff can have a different meters.
Multiple voices within one staff; beams optionally shared between
-voices. (well, more than 2 voices won't look pretty --yet.) Multiple
-scores within one input file. Each score is output to a different
-file.
+voices. Multiple scores within one input file. Each score is output
+to a different file.
Beams, slurs, chords, super/subscripts (accents and text), triplets,
general n-plet (triplet, quadruplets, etc.), lyrics, transposition
/*
C style comments for multiline comments.
+ They come before the thing to document.
[...]
*/
=item *
use non-ambiguous postfixes C<identifier_name_type_modifier[_modifier]>
+
=back
Macros, C<enum>s and C<const>s are all uppercase,
=over 5
=item *
+
Unix. GNU LilyPond is known to run on Linux, AIX, Digital Unix and
Solaris
even work in Lose NT/95, but don't promise to support it.
=item *
+
GNU C++ v2.7 or better, with libg++ installed. Version 2.7.2
or better recommended. I almost positive that it will not compile with
AT&T CC.
=item *
-Bash. Most scripts will continue to work with a stock sh, but they
-might generate (harmless) syntax errors
-=item *
GNU make.
=item *
+
Flex (2.5.1 or better).
=item *
+
Bison.
=back
=over 5
=item *
-Perl. Some (mostly unimportant scripts) use Perl for trivial
-operations. The documentation was created with the perl's Plain Old
-Documentation.
+
+Perl. Most scripts are written in Perl. The documentation was created
+with the perl's Plain Old Documentation.
=item *
(GNU) find
/usr/lib/texmf/texmf/tex/lilypond/*
The TeX include directory is detected dynamically, but it can be
-adjusted with B<--enable-texprefix>. 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 your taste:
+adjusted with B<--enable-tex-prefix> and B<--enable-tex-dir>. 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 your taste:
export CPPFLAGS="-I /home/me/my_include -DWEIRD_FOOBAR"
configure
configure --prefix=/home/me_myself_and_I/
-Since GNU LilyPond currently is beta, You are advised to also use
+If you want to install GNU LilyPond in F</usr/local>, and your TeX has
+no default hooks for local stuff (mine is broken too), you can do:
+
+ configure --prefix=/usr/local --enable-tex-prefix=/usr/lib/texmf
+
+Since GNU LilyPond currently is beta, you are advised to also use
--enable-debug
--enable-checking
--enable-printing
--enable-optimise
--enable-profiling
+ --enable-tex-prefix
+ --enable-tex-dir
The option B<--enable-optimise> is recommended for Real Life usage.
=head1 REDHAT LINUX
RedHat Linux users should be able to get a RPM. A spec file is in
-F<make/lilypond.spec>.
+F<make/lilypond.spec>. 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<Variables.make>
=head1 WINDOZE
GNU LilyPond (pl 0.0.39) is known to compile on the following platforms:
- * linux 2.0.28, g++ 2.7.2[.1]
+ * linux 2.0.x, g++ 2.7.2[.1]
* aix 4.1, g++ 2.7.2
* windows-nt 4.0, cygnus gnu-win32 beta17.1 (~=g++ 2.7.2)
* linux 2.0.28 X to doze, gcc-go32 (~=g++ 2.7.2) [exec. untested]
=head1 AUTHORS
- Han-Wen Nienhuys <hanwen@stack.nl>
+Han-Wen Nienhuys <hanwen@stack.nl>
- Jan Nieuwenhuizen <jan@digicash.com>
+Jan Nieuwenhuizen <jan@digicash.com>
Have fun!
#
default: do-doc
- echo $(TEXTFILES) $(OUTPODFILES) $(PODFILES)
+ true
do-doc: $(TEXTFILES)
html: $(HTMLFILES)
$(INSTALL) -d $(mandir)/man1
$(INSTALL) -m 755 $(outdir)/lilypond.1 $(mandir)/man1
$(INSTALL) -m 755 $(outdir)/mudela.5 $(mandir)/man5
-
+
localuninstall:
rm -f $(mandir)/man1/lilypond.1
Copyright: public domain
+=head2 F<collisions.ly>
+
+Random counterpoint to demonstrate features.
+
+Features: \multivoice, collision resolution.
+
+
=head2 F<coriolan-alto.ly>
Ludwig van Beethoven (1770-1792), Opus 62 Ouverture zu Collins
-
=head1 NAME
language.pod -- state of the art mudela-vapourware.
-=head1 SYNOPSIS
-
-(damn pod)
-
=head1 DESCRIPTION
+[this document is slowly merged into the mudela doco, as the
+implementation progresses. If you want to see our previous musings,
+take out an old version of lilypond]
+
here are some thoughts on the language. Most of the examples are in
pseudo current mudela. Some stuff gratuitously taken from your mails.
+
=head1 NOTE
I dislike vapourware. That's why I oppose to concrete plans on how to
do input for features we don't know how to produce on paper
-=head1 AIM
-
-A musical notation that is relatively easy to comprehend to both
-programmers and non programmers. The final aim is to be able to
-express what can be expressed in sheet music.
-
-=over 5
-
-=item *
-play pieces
-
-=item *
-typeset the pieces
-
-=back
-
-further requirements:
-
-=over 5
-
-=item *
-Possible to edit the layout without danger of changing the
-original music. (fingerings, interpretation)
-
-=item *
-Simple music manipulations, such as transposing, creating a
-score for individual instruments as well as for the conductor,
-extracting short pieces from a longer one, glueing several shorter
-pieces into a single score.
-
-=back
-
-Pieces could be:
-
-
-=over 5
-
-=item *
-Mahlerian orchestral score
-
-=item *
-piano pieces
-
-=item *
-pop songs (lyrics + chords)
-
-=item *
-gregorian chant (?)
-
-=item *
-bach multivoice organ music.
-
-=item *
-short excerpts to be used in musicological publications.
-
-=back
-
=head1 REQUIREMENTS
=head2 Parser output
=item *
-\keyword, bo difference notes vs. notenames,
-
-=item *
-
-{} hierachical, nest.,
-
-=item *
-
-<> chords,
-
-=item *
-
-drop staff (NOT)?,
-
-=item *
-
-melody = \melodic{ } vs. \melodic melody = { }
-
-=item *
-
-lexer mode switch by types: \lyric{ }, \melodic{ }, etc.,
-
-=item *
-
-octaves: low 'C C c c' c'' high; 'c' == c === "c-klein", comment: a '
-' a . Which ' for which a? Now using a!'`.
-
-=over 4
-
-=item *
-
-\meter{ 2/4 },
-
-=item *
-
-\grouping{ 2*8 3*8 },
-
-=item *
-
-\skip{ 2: 2*8 3*32 },
-
-=item *
-
abbrev: [c2 c2]\noplet{1/2} (wat bout [c2 c2]1/2\noplet?),
=item *
=item *
-++ concat
-
-=item *
-
C<+> is merge
-=item *
-
- \transpose{ \from c \to g \melodic{ c d e } }
- \transpose{ \from c \to g melody } %!?
=item *
This will only be readable if the Mudela-user rigidly uses hungarian,
which he/she won't.
-=head2 Backslash
-
-I like it. Let's keep it in the language if we need it, it's a
-universally accepted escape sequence.
-
-=head2 Braces
-
-I like the idea of <> vs. {}. Not because I think it is more clear,
-but I dislike the word "music", I can't seem to find the proper word
-for what "music" currently does, so I'd like to flush it.
-
-I would like to point that both <> and {} are indicating a
-hierarchy. I think, we should continue to allow them to nest. I still
-have no preference what to use for what.
-
-=head2 Command syntax
-
-Braces on commands are here now, because the {} are the only nesting
-braces. We need to avoid that, since the brace is overused as it
-is. We don't like lisp that much. (the key is the only commands which
-really needs {} now)
-
-How about
-
- \bar "some args", "some more";
-
-(note the ; ), which is a mix of perl and TeX.
-
Of course \key should take a \notename. In fact, I think we should
program the note intervals (which are now hardcoded for midi purposes)
To allow adaptation to other scales.
portability. Suppose some commercial systems want to read mudela
too.
-=head2 Lexer modes
-
-the $ and @ were quick hacks, which suck badly. Replacing it by a
-mechanism that switches the lexer automatically would be better, but
-it is still error prone, and it hurts uniformity. What I would like
-best is unified syntax, but this seems impossible since lyrics could
-clash with notenames. If possible it would simplify the parser, the
-scanner, and the explanation of the language.
-
-What about:
-
- bes c d e f % notes
- 'bes- sen sap % some lyric syllables
-
-We can make one of the ' ` " a lyric-indication, but then we would
-have to change the octave indication, eg.
-
- _bes % lower
- ^bes % higher
-
-or
-
- +bes % higher
- -bes % lower
-
-And I am still not sure if it would be possible now, but I think this
-is worthwile to investigate. Or we could replace @ by a
-quote (take your pick) sign, which is a lot more intuitive.
-
-The big question remaining is: do we want to add any more modes than
-lyric and note?
-
-
-[LOOSE THOUGHT]
-
-Even looser ideas: we can take a look at the perl wagon. It has numerous
-inputmodes. What about:
-
- lyric << ENDLYRIC
-
- bes- sen- sap
-
- ENDLYRIC
-
- music << ENDMUSIC
-
- c d e f g
-
- ENDMUSIC
-
-
-[LOOSE THOUGHT]
-
-If we free up $ @ from their current meaning, $ and @ could be used to
-signify other things.
-
-=head2 Concrete solution to lyric vs. note
-
-I think
-
- "lyric"
-
-is a valid lyric too. This implies that any bare string is checked if
-it is a note. Now it prints an error if not, but I could change it to
-assume it is a STRING (and can be reduced to lyric). Heck! I could
-implement this tonight. We'd lose one mode! (after checking lexer
-source) the only problem is preventing puctuation and the - and _ from
-clashing with script symbols.
-
=head2 Command placement:
uhh?
-=head2 Numbers
-
-The syntax of /, * and : has to be settled, we have
-
- - notes (1, 2, 4, 8 etc)
- - meter 2*4
- - plet 2/3
- - multiple notes: 3*4
- - abbreviations (not implemented) c4/4 or c4*4
-
=head2 Filtering
This is a idea of mine: we could filter some request types from
++ concatenation of voices
+ merging of voices
-
-=head2 C++ OOP like input.
-
-I don't see the big win of this.
-
- score sc1= melody;
- sc1.staff{\verse};
- sc1.staff{<\b1 \b2>}
- sc1.paper=mypaperdef;
-
-
-We're not doing a programming language. In this syntax the parser has
-to lookup what sc1 means, decide if it should copied shallow/deep,
-decide if has a staff block, switch the mode after it finds that staff
-takes music. May be I'm just ranting, but it looks hairy to
-me. Remember that at this stage we're just filling structs.
-
-In a distant future there might be a need for programming (are you
-listening, Philip Glass?), but I think that would be something for
-Mudela version 3. And I think using m4 (or something alike) would be
-just as convenient.
-
-=head2 Transposition
-
-Has to be done. How about:
-
- \transpose { \from c \to g \music { ... }}
-
=head2 Quoting
Difficult. Hmm...
=item *
multiple voices within one staff; beams optionally shared
-between voices. (well, more than 2 voices won't look pretty --yet.)
+between voices. Up to four voices is handled cleanly.
=item *
This is what the output looks like over here:
- GNU LilyPond 0.0.40 #0/FlowerLib 1.1.7 #2. Compile: Mar 11 1997, 22:58:47 (g++ 2.7.2)
- Parsing ... [./init//symbol.ini[./init//dynamic.ini][./init//dutch.ini]
- [./init//script.ini][./init//table_sixteen.ini]][./input/wohltemperirt.ly]
- Setting up music ...Processing music ............
- Preprocessing ...
- Calculating column positions ... [3][6][9]
+ hw:~/musix/spacer$ lilypond input/kortjakje.ly
+ GNU LilyPond 0.0.52 #1/FlowerLib 1.1.12 #1
+ Parsing ... [/home/hw/share/lilypond/init//symbol.ini[
+ <lots of stuff deleted>
+ ][./input/kortjakje.ly]
+
+ Setting up music ...Processing music ...[8][16][24][25]
+ Preprocessing ...
+ Calculating column positions ... [3][9][14][18][22][25]
Postprocessing ...
TeX output to lelie.out ...
- midi output to lelie.midi ...
hw:~/musix/spacer$ tex test
This is TeX, Version 3.14159 (C version 6.1)
- (test.tex
+ (/home/hw/lib/texmf/tex/lilypond/test.tex
Hyphenation patterns for english, dutch, loaded.
- (lilyponddefs.tex) (lelie.uit) [1] [2] )
- Output written on test.dvi (2 pages, 8420 bytes).
+ (/home/hw/lib/texmf/tex/lilypond/lilyponddefs.tex) (lelie.out) [1] )
+ Output written on test.dvi (1 page, 9180 bytes).
Transcript written on test.log.
hw:~/musix/spacer$ xdvi test&
=head1 DESCRIPTION
This document describes the the GNU LilyPond input format, which is an
-effective language for definining music. We call this language
+effective language for defining music. We call this language
(rather arrogantly) The Musical Definition Language (S<Mudela 0.1>).
The first aim of Mudela is to define a piece of music,
=head1 Overview
-The Musical Definition Language (Mudela) S<version 2>,
-has a logical structure,
-making use of typing and naming (using identifiers),
-that allows for flexible input, and definition reuse.
+The Musical Definition Language (Mudela) S<version 2>, has a logical
+structure, making use of typing and naming (using identifiers), that
+allows for flexible input, and definition reuse.
-The below included for explanatory
-purposes only (i.e., for a complete and up-to-date definition, see
-F<lily/parser.y> and F<lily/lexer.l>):
+The below included for explanatory purposes only (i.e., for a complete
+and up-to-date definition, see F<lily/parser.y> and F<lily/lexer.l>):
+
+As a related note, you should take a look at the examples and the init
+file, as this document does not cover every aspect of mudela yet.
=head2 Files
its elements. The C<\multivoice> is a construct which is explained
below.
+You can also glue two horizontal pieces music together with
+concatenation operator:
+
+ \horOne = \melodic { c c g g }
+ \horTwo = \melodic { a a g2 }
+ \twinkle = \melodic { \horOne ++ \horTwo }
+
=head2 Transposition
You can transpose horizontal music in the following way:
P\bP\bP\bPR\bR\bR\bRE\bE\bE\bER\bR\bR\bRE\bE\bE\bEQ\bQ\bQ\bQU\bU\bU\bUI\bI\bI\bIS\bS\bS\bSI\bI\bI\bIT\bT\bT\bTE\bE\bE\bES\bS\bS\bS
For compilation you need.
- +\bo Unix. GNU LilyPond is known to run on Linux, AIX,
+ +\bo Unix. GNU LilyPond is known to run on Linux, AIX,
Digital Unix and Solaris
+
If you have the Cygnus WIN32 port of the GNU utils,
it will even work in Lose NT/95, but don't promise to
support it.
- +\bo GNU C++ v2.7 or better, with libg++ installed. Version
- 2.7.2 or better recommended. I almost positive that
- it will not compile with AT&T CC.
-
- +\bo Bash. Most scripts will continue to work with a stock
- sh, but they might generate (harmless) syntax errors
+ +\bo GNU C++ v2.7 or better, with libg++ installed.
+ Version 2.7.2 or better recommended. I almost
+ positive that it will not compile with AT&T CC.
- +\bo GNU make.
+ +\bo GNU make.
- +\bo Flex (2.5.1 or better).
+ +\bo Flex (2.5.1 or better).
- +\bo Bison.
+ +\bo Bison.
R\bR\bR\bRE\bE\bE\bEC\bC\bC\bCO\bO\bO\bOM\bM\bM\bMM\bM\bM\bME\bE\bE\bEN\bN\bN\bND\bD\bD\bDE\bE\bE\bED\bD\bD\bD
- +\bo Perl. Some (mostly unimportant scripts) use Perl for
- trivial operations. The documentation was created
- with the perl's Plain Old Documentation.
+ +\bo Perl. Most scripts are written in Perl. The
+ documentation was created with the perl's Plain Old
+ Documentation.
+\bo (GNU) find
-14/Apr/97 LilyPond 0.0.51 1
+
+
+17/Apr/97 LilyPond 0.0.52 1
/usr/lib/texmf/texmf/tex/lilypond/*
The TeX include directory is detected dynamically, but it
- can be adjusted with -\b-\b-\b--\b-\b-\b-e\be\be\ben\bn\bn\bna\ba\ba\bab\bb\bb\bbl\bl\bl\ble\be\be\be-\b-\b-\b-t\bt\bt\bte\be\be\bex\bx\bx\bxp\bp\bp\bpr\br\br\bre\be\be\bef\bf\bf\bfi\bi\bi\bix\bx\bx\bx. 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 your taste:
+ can be adjusted with -\b-\b-\b--\b-\b-\b-e\be\be\ben\bn\bn\bna\ba\ba\bab\bb\bb\bbl\bl\bl\ble\be\be\be-\b-\b-\b-t\bt\bt\bte\be\be\bex\bx\bx\bx-\b-\b-\b-p\bp\bp\bpr\br\br\bre\be\be\bef\bf\bf\bfi\bi\bi\bix\bx\bx\bx and -\b-\b-\b--\b-\b-\b-e\be\be\ben\bn\bn\bna\ba\ba\bab\bb\bb\bbl\bl\bl\ble\be\be\be-\b-\b-\b-t\bt\bt\bte\be\be\bex\bx\bx\bx-\b-\b-\b-
+ d\bd\bd\bdi\bi\bi\bir\br\br\br. 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
+ your taste:
export CPPFLAGS="-I /home/me/my_include -DWEIRD_FOOBAR"
configure
configure --prefix=/home/me_myself_and_I/
- Since GNU LilyPond currently is beta, You are advised to
+ If you want to install GNU LilyPond in _\b/_\bu_\bs_\br_\b/_\bl_\bo_\bc_\ba_\bl, and
+ your TeX has no default hooks for local stuff (mine is
+ broken too), you can do:
+
+ configure --prefix=/usr/local --enable-tex-prefix=/usr/lib/texmf
+
+ Since GNU LilyPond currently is beta, you are advised to
also use
--enable-debug
--enable-printing
--enable-optimise
--enable-profiling
+ --enable-tex-prefix
+ --enable-tex-dir
The option -\b-\b-\b--\b-\b-\b-e\be\be\ben\bn\bn\bna\ba\ba\bab\bb\bb\bbl\bl\bl\ble\be\be\be-\b-\b-\b-o\bo\bo\bop\bp\bp\bpt\bt\bt\bti\bi\bi\bim\bm\bm\bmi\bi\bi\bis\bs\bs\bse\be\be\be is recommended for Real Life
usage.
make all
everything will be compiled, but nothing will be
- installed. The resulting binaries can be found in the
- subdirectory _\bb_\bi_\bn_\b/.
-R\bR\bR\bRU\bU\bU\bUN\bN\bN\bNN\bN\bN\bNI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
- GNU LilyPond does use a lot of resources. For operation
- you need the following:
- +\bo A fast computer (a full page of music typically takes 1
- minute on my 486/66, using the -\b-\b-\b--\b-\b-\b-e\be\be\ben\bn\bn\bna\ba\ba\bab\bb\bb\bbl\bl\bl\ble\be\be\be-\b-\b-\b-c\bc\bc\bch\bh\bh\bhe\be\be\bec\bc\bc\bck\bk\bk\bki\bi\bi\bin\bn\bn\bng\bg\bg\bg
+17/Apr/97 LilyPond 0.0.52 2
-14/Apr/97 LilyPond 0.0.51 2
+INSTALL(1) LilyPond documentation INSTALL(1)
-INSTALL(1) LilyPond documentation INSTALL(1)
+ installed. The resulting binaries can be found in the
+ subdirectory _\bb_\bi_\bn_\b/.
+R\bR\bR\bRU\bU\bU\bUN\bN\bN\bNN\bN\bN\bNI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
+ GNU LilyPond does use a lot of resources. For operation
+ you need the following:
+ +\bo A fast computer (a full page of music typically takes 1
+ minute on my 486/66, using the -\b-\b-\b--\b-\b-\b-e\be\be\ben\bn\bn\bna\ba\ba\bab\bb\bb\bbl\bl\bl\ble\be\be\be-\b-\b-\b-c\bc\bc\bch\bh\bh\bhe\be\be\bec\bc\bc\bck\bk\bk\bki\bi\bi\bin\bn\bn\bng\bg\bg\bg
compile. It's lot slower than most MusiXTeX
preprocessors)
R\bR\bR\bRE\bE\bE\bED\bD\bD\bDH\bH\bH\bHA\bA\bA\bAT\bT\bT\bT L\bL\bL\bLI\bI\bI\bIN\bN\bN\bNU\bU\bU\bUX\bX\bX\bX
RedHat Linux users should be able to get a RPM. A spec
- file is in _\bm_\ba_\bk_\be_\b/_\bl_\bi_\bl_\by_\bp_\bo_\bn_\bd_\b._\bs_\bp_\be_\bc.
+ file is in _\bm_\ba_\bk_\be_\b/_\bl_\bi_\bl_\by_\bp_\bo_\bn_\bd_\b._\bs_\bp_\be_\bc. You should be able to
+ create an rpm as a normal user. Be sure you have a
+ ~/.rpmrc, and edit the RPM-dir in _\bV_\ba_\br_\bi_\ba_\bb_\bl_\be_\bs_\b._\bm_\ba_\bk_\be
W\bW\bW\bWI\bI\bI\bIN\bN\bN\bND\bD\bD\bDO\bO\bO\bOZ\bZ\bZ\bZE\bE\bE\bE
Windows NT:
GNU LilyPond (pl 0.0.39) is known to compile on the
following platforms:
- * linux 2.0.28, g++ 2.7.2[.1]
+ * linux 2.0.x, g++ 2.7.2[.1]
* aix 4.1, g++ 2.7.2
* windows-nt 4.0, cygnus gnu-win32 beta17.1 (~=g++ 2.7.2)
* linux 2.0.28 X to doze, gcc-go32 (~=g++ 2.7.2) [exec. untested]
A\bA\bA\bAU\bU\bU\bUT\bT\bT\bTH\bH\bH\bHO\bO\bO\bOR\bR\bR\bRS\bS\bS\bS
- Han-Wen Nienhuys <hanwen@stack.nl>
+ Han-Wen Nienhuys <hanwen@stack.nl>
- Jan Nieuwenhuizen <jan@digicash.com>
+ Jan Nieuwenhuizen <jan@digicash.com>
Have fun!
-
-
-
-
-
-
-
-
-
-
-
-14/Apr/97 LilyPond 0.0.51 3
+17/Apr/97 LilyPond 0.0.52 3
+******
+pl 52
+ - Buildroot RPM
+ - tex-prefix and tex-dir sep'd (here you are jan)
+ - convert-mudela framework
+ - Collision_register, Collision
+ - \hshift 1; input
+ - Features changed
+pl 50.jcn1
+ - LILYINCLUDE dir searched before DIR_DATADIR(?)
+ - lily reads from stdin again (but does not now when to stop)
+******
pl 51
- transposition bugfix + doco
- LilyPond -> GNU LilyPond
- bugfixes for Staff_side and Note_column*
- - wohltemperirt: 12 more bars
+ - wohltemperirt: complete
******
april 11
+
pl 50
- merge rest / notehead.
- Staff_side as a base class for most "staff-side" symbols.
+++ /dev/null
-Testing for 0.1 in 3 stages:
-
- 1. Announce "beta testers wanted"
- to linux.dev.apps, gnu.announce, mutex
-
- Source only dist
-
- GOAL: bugfixes & doco updates
-
- create mailing list
-
- 2. Announce to LilyPond list, GNU "internal" list, RoseGarden
-list ?, LDA, Mutex
-
- Source & binary dist too, beta release to fsf?
-
- GOAL: distribution & portability testing
-
- 3. Announce to COLA, gnu.announce
-
- Public release
-before 0.1
+IMPORTANT
* update 20 pt table
* script priority
+ * slur direction
+
+ * problems with empty staff.->revise staff-column/score-walker.
+
+
This is an assorted collection of stuff that will be done, might be
done, or is an idea that I want to think about
* hairpin width
- * problems with empty staff.
-
- * help-lines
-
* help-lines for rests
* [c8. c32 c32]
* lilypond - -> crash
- * \stem -1 < chord > rest
-
SEVERELY LACKING:
* SPEED!
SMALLISH PROJECTS
+ * use rest size in Collision
+
* bugreport to doc++ devel: struct not in class hier; public
virtual baseclasses
* command priority into enum
- * don't broadcast Staff_sym
-
* C meter iso 4/4
* textspanner: center position
+
* script-spacing
* Brackets
* configure idealspacing: arithmetic
- * collision Request_register.
-
* add (good guess of) width to lyric items
* midi output: eat-up dynamic, key/meter/tempo changes, and
* Reg_configure_request
+ * bring Collision::do_pre_processing to haircutter
+
* slurs per voicegroup.
* slur parts as a script
- * multiple scripst.
-
* mixed fontsizes
* put scripts on bars
* MIDI repeat: make lily understand repeats
-
* better beamslope calculation: QLP for beams?
* implement better breaking algorithm
* piano staff
* vertical spanner
+
IDEAS
+ * scoping in Lexer?
+
* integrate Register/Midi stuff
* create libmudela, or liblily_frontend
- * Horizontal_align_item, Vertical_align_item.
-
- * move MIDI io to a ANSI C libmidi library.
+ * move MIDI stuff (including Quantization) to a ANSI C libmidi library.
* use an embedded language: scheme, lisp, S-lang, Perl, GUILE, ?
+ for :
- Items/Spanners
- Registers
#!/usr/bin/perl -w
-print "todo\n!";
+=head1 NAME
+
+convert-mudela - convert mudela to newer versions
+
+=head1 SYNOPSIS
+
+ convert-mudela --from=FROM_PATCHLEVEL --to=TO_PATCHLEVEL
+
+=head1 DESCRIPTION
+
+convert-mudela sequentially applies different mudela-conversions to
+upgrade a Mudela input file from FROM_PATCHLEVEL to TO_PATCHLEVEL
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--output>
+
+The output file to write
+
+=item B<--edit>
+
+Do an inline edit of the input file. override B<--output>
+
+=item B<--show-rules>
+
+shows all known conversions.
+
+=item B<--from>=FROM_PATCHLEVEL
+
+=item B<--to>=TO_PATCHLEVEL
+
+=back
+
+=cut
+
+
+use Getopt::Long;
+sub
+ version_string_conv
+{
+ my ($from_version, $to_version) = @_;
+ s/\version \"0.0.$from_version\"/\version \"0.0.$to_version\"/g;
+}
+
+sub
+ conv_pl0_0_50_pl0_0_52
+{
+
+}
+
+sub
+ usage
+{
+ print STDERR "Usage: convert-mudela --from=XX --to=XX\n";
+ print STDERR "other options: --edit --output=FILE --show-rules\n";
+ exit 2;
+}
+
+my %minor_conversions = ("50" => \&no_conv,
+ "52" => \&conv_pl0_0_50_pl0_0_52);
+
+sub
+ show_rules
+{
+ print "Rules: ", join(", ", keys %minor_conversions), "\n";
+
+}
+
+sub
+ do_conversion
+{
+ my ($from,$to) = @_;
+
+ my @applicable_conversion;
+ my @mudela_levels;
+
+ die "This is too old to convert " if $from < 50;
+
+ foreach $a (sort keys %minor_conversions) {
+ if ($a > $from && $a <= $to ){
+ push @applicable_conversion, $minor_conversions{$a};
+ push @mudela_levels, $a;
+ }
+ }
+
+ print STDERR "Applying following rules: ", join(", ", @mudela_levels) , "\n";
+
+ while (<INLY>) {
+ foreach $subroutine (@applicable_conversion) {
+
+ &$subroutine;
+
+ }
+ version_string_conv $from, $to;
+ print OUTLY;
+ }
+}
+
+
+sub
+ set_files
+{
+ $infile = "-";
+ $outfile = "-";
+ $outfile = $opt_output if (defined($opt_output));
+
+ if ($ARGV [0]) {
+ $infile = $ARGV[0];
+ }
+
+ if ($opt_edit && $infile ne "-") {
+ $opt_edit = 1;
+ rename $infile, "$infile~";
+ $outfile = $infile;
+ $infile = "$infile~";
+ }
+}
+
+GetOptions ("output=s", "from=i", "to=i", "minor=i", "edit", "show-rules");
+
+if ($opt_show_rules) {
+ show_rules ;
+ $opt_show_rules = 0; # to extinguish typo check.
+ exit 0;
+}
+
+usage if (!defined($opt_from) || !defined($opt_to));
+local ( $infile,$outfile);
+set_files;
+
+die "can't open \`$infile\'" unless open INLY,$infile ;
+die "can't open \`$outfile\'" unless open OUTLY, ">$outfile";
+
+do_conversion $opt_from, $opt_to;
+close INLY;
+close OUTLY;
+
#!/usr/bin/perl -w
# stuff should be generated in out directory.
-sub
- set_hrefs
+sub set_hrefs
{
while (<HTMLIN>) {
s#href=([A-Za-z.]+)#href=$base/$1#g;
}
local $base="lilypond/";
-local @examples=("wohltemperirt" ,"standchen", "scsii-menuetto", "rhythm", "martien");
+local @examples=("wohltemperirt" ,"standchen", "scsii-menuetto", "rhythm", "martien", "collisions");
-#mkdir "lilypond";
-sub
- gen_html
+
+sub gen_html
{
print "generating HTML\n";
system "make -kC .. html";
}
-sub
- gen_examples
+sub gen_examples
{
print "generating examples: \n";
foreach $a (@examples) {
}
-sub
- gen_list
+sub gen_list
{
print "generating HTML list\n";
open HTMLLIST, ">example_output.html";
print HTMLLIST "<ul>
<li><a href=$inputf> The input file</a>
<li><a href=$giff>The output (gif)</a>
-<li><a href=$psf>The output (PS)</a>
-<li><a href=$midif>The output (MIDI)</a>
-</ul>";
+<li><a href=$psf>The output (PS)</a>\n";
+
+ print HTMLLIST "<li><a href=$midif>The output (MIDI)</a>\n"
+ if ( -f $midif );
+ print HTMLLIST "</ul>";
}
close HTMLLIST;
}
-sub
- copy_files
+sub copy_files
{
print "copying files\n";
print `ln -s $depth/out ./docxx` if ( ! -x "docxx" ) ;
system "cp ../lelie*gif .";
}
+sub docxx_update
+{
+ system "make -C $depth doc++";
+}
+
sub
do_tar
{
die "need to be in directory Documentation\n" if ( ! ($cwd =~ /Documentation$/));
chdir ("out");
+
gen_html;
gen_examples;
gen_list;
copy_files;
+docxx_update;
do_tar;
ac_help="$ac_help
enable-profiling compile with gprof support"
ac_help="$ac_help
- texprefix=DIR set the tex-directory to put the lilypond subdir in."
+ tex-prefix=DIR set the tex-directory to find TeX subdirectories."
+ac_help="$ac_help
+ tex-dir=DIR set the directory to put LilyPond TeX files in."
# Initialize some variables set by options.
# The variables have the same names as the options, with
optimise_b=no
profile_b=no
#shared_b=no
+
# Check whether --enable-printing or --disable-printing was given.
if test "${enable_printing+set}" = set; then
enableval="$enable_printing"
fi
-# Check whether --enable-texprefix or --disable-texprefix was given.
-if test "${enable_texprefix+set}" = set; then
- enableval="$enable_texprefix"
+# Check whether --enable-tex-prefix or --disable-tex-prefix was given.
+if test "${enable_tex_prefix+set}" = set; then
+ enableval="$enable_tex_prefix"
TEXPREFIX=$enableval
else
TEXPREFIX=auto
fi
-
+
+# Check whether --enable-tex-dir or --disable-tex-dir was given.
+if test "${enable_tex_dir+set}" = set; then
+ enableval="$enable_tex_dir"
+ TEXDIR=$enableval
+else
+ TEXDIR=auto
+fi
+
+
if test $profile_b = yes; then
EXTRA_LIBES="-pg"
DEFINES="$DEFINES -pg"
if test $optimise_b = yes; then
DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
fi
+
AUTOHEADER="This file was automatically generated by configure"
CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
for ac_prog in $CCC c++ g++ gcc CC cxx cc++
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:623: checking for $ac_word" >&5
+echo "configure:636: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:654: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:667: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 664 "configure"
+#line 677 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:688: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:701: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:693: checking whether we are using GNU C++" >&5
+echo "configure:706: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:717: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:730: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:747: checking for $ac_word" >&5
+echo "configure:760: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:803: checking for a BSD compatible install" >&5
+echo "configure:816: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:857: checking for $ac_word" >&5
+echo "configure:870: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test FIND = error; then
- echo "configure: warning: Couldn't find \`find'. Please use --enable-texprefix" 1>&2
-else
+ echo "configure: warning: Couldn't find \`find'. Please use --enable-tex-dir" 1>&2
+fi
+
for ac_prog in bison
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:905: checking for $ac_word" >&5
+echo "configure:919: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:939: checking for $ac_word" >&5
+echo "configure:953: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:973: checking for $ac_word" >&5
+echo "configure:987: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1007: checking for $ac_word" >&5
+echo "configure:1021: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_PODMAN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
test -n "$PODMAN" || PODMAN="error"
-if test $TEXPREFIX = auto ; then
+
+if test "x$TEXPREFIX" = xauto ; then
+
- # do something sensible if root hasn't specced dir yet attempts install
-
- echo $ac_n "checking TeX installation directory""... $ac_c" 1>&6
-echo "configure:1043: checking TeX installation directory" >&5
+ echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6
+echo "configure:1057: checking TeX/MF root dir directory" >&5
- ac_tmp_prefix=$prefix
- test "x$ac_tmp_prefix" = xNONE && ac_tmp_prefix=$ac_default_prefix
+ find_root_prefix="$prefix"
+
- for texdir in $ac_tmp_prefix $ac_tmp_prefix/lib; do
- if test -d $texdir/texmf; then
- TEXTOP=$texdir/texmf
- break
- else
- if test -d $texdir/tex; then
- TEXTOP=$texdir/tex
- break
- fi
+ test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
+ find_texpostfix="";
+ for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
+ find_texprefix="$find_root_prefix$postfix"
+ if test -d $find_texprefix; then
+ find_texpostfix=$postfix
+ break;
fi
done
- TEXPREFIX=$ac_tmp_prefix/lib/texmf/tex
- if test x = "x$TEXTOP"; then
- echo "configure: warning: Cannot determine a tex-directory. Please use --enable-texprefix" 1>&2
- else
- TEXPREFIX=`$FIND $TEXTOP -type d -a -name tex -print |sort|head -1`
+
+ if test "x$find_texpostfix" = x; then
+ find_texpostfix='/lib/texmf/tex'
+ echo "configure: warning: Cannot determine the TeX-directory. Please use --enable-tex-prefix" 1>&2
fi
+
+ find_texprefix="$find_root_prefix/$find_texpostfix"
+ TEXPREFIX='${prefix}'/"$find_texpostfix"
+
+ echo "$ac_t""$find_texprefix" 1>&6
+
+
+fi
+
+if test "x$TEXDIR" = xauto ; then
+
+
+ # do something sensible if root hasn't specced dir yet attempts install
+ test "x$find_texprefix" != x || find_texprefix="$TEXPREFIX"
+
+ echo $ac_n "checking TeX tex input directory""... $ac_c" 1>&6
+echo "configure:1092: checking TeX tex input directory" >&5
+ find_texdir=`(cd $find_texprefix;
+ $FIND -type d -a -name tex -print |sort|head -1|sed 's#^\./##')`
+
+
+ if test "x$find_texdir" = x; then
+ find_texdir="/tex";
+ echo "configure: warning: Cannot determine the TeX-subdirectory. Please use --enable-tex-dir" 1>&2
+ true
fi
+
+ TEXDIR="$TEXPREFIX/$find_texdir"
+
+ echo "$ac_t""$find_texprefix/$find_texdir" 1>&6
- echo "$ac_t""$TEXPREFIX" 1>&6
fi
$MAKE -v| grep GNU > /dev/null
if test "$?" = 1
then
- echo "configure: warning: Please install *GNU* make" 1>&2
- fi
-fi
-
-
+ echo "configure: warning: Please install *GNU* make" 1>&2
+ fi
+fi
+
if test $BISON = "error"
then
echo "configure: warning: can't find bison. Please install Bison (1.24 or better)" 1>&2
fi
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1106: checking how to run the C++ preprocessor" >&5
+echo "configure:1144: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
-#line 1119 "configure"
+#line 1157 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:1144: checking for FlexLexer.h" >&5
+echo "configure:1182: checking for FlexLexer.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1149 "configure"
+#line 1187 "configure"
#include "confdefs.h"
#include <FlexLexer.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
s%@BISON@%$BISON%g
s%@FLEX@%$FLEX%g
s%@TEXPREFIX@%$TEXPREFIX%g
+s%@TEXDIR@%$TEXDIR%g
s%@EXTRA_LIBES@%$EXTRA_LIBES%g
s%@MAKE@%$MAKE%g
s%@PODMAN@%$PODMAN%g
eval "DIR_DATADIR=$datadir"
DIR_DATADIR="$DIR_DATADIR/lilypond"
echo $ac_n "checking ""... $ac_c" 1>&6
-echo "configure:1556: checking " >&5
+echo "configure:1595: checking " >&5
cat << EOF > lib/out/config.hh
dnl should cache result.
dnl should look in $prefix first.
-AC_DEFUN(AC_TEX_SUBDIR, [
-
- # do something sensible if root hasn't specced dir yet attempts install
+AC_DEFUN(AC_TEX_PREFIX, [
+
- AC_MSG_CHECKING(TeX installation directory)
+ AC_MSG_CHECKING(TeX/MF root dir directory)
- ac_tmp_prefix=$prefix
- test "x$ac_tmp_prefix" = xNONE && ac_tmp_prefix=$ac_default_prefix
+ find_root_prefix="$prefix"
+
- for texdir in $ac_tmp_prefix $ac_tmp_prefix/lib; do
- if test -d $texdir/texmf; then
- TEXTOP=$texdir/texmf
- break
- else
- if test -d $texdir/tex; then
- TEXTOP=$texdir/tex
- break
- fi
+ test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
+ find_texpostfix="";
+ for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
+ find_texprefix="$find_root_prefix$postfix"
+ if test -d $find_texprefix; then
+ find_texpostfix=$postfix
+ break;
fi
done
- $1=$ac_tmp_prefix/lib/texmf/tex
- if test x = "x$TEXTOP"; then
- AC_MSG_WARN(Cannot determine a tex-directory. Please use --enable-texprefix)
- else
- $1=`$FIND $TEXTOP -type d -a -name tex -print |sort|head -1`
+
+ if test "x$find_texpostfix" = x; then
+ find_texpostfix='/lib/texmf/tex'
+ AC_MSG_WARN(Cannot determine the TeX-directory. Please use --enable-tex-prefix)
fi
+
+ find_texprefix="$find_root_prefix/$find_texpostfix"
+ $1='${prefix}'/"$find_texpostfix"
+
+ AC_MSG_RESULT($find_texprefix)
+
+])
+
+AC_DEFUN(AC_TEX_SUBDIR, [
+
+ # do something sensible if root hasn't specced dir yet attempts install
+ test "x$find_texprefix" != x || find_texprefix="$TEXPREFIX"
+
+ AC_MSG_CHECKING(TeX tex input directory)
+ find_texdir=`(cd $find_texprefix;
+ $FIND -type d -a -name tex -print |sort|head -1|sed 's#^\./##')`
+
+
+ if test "x$find_texdir" = x; then
+ find_texdir="/tex";
+ AC_MSG_WARN(Cannot determine the TeX-subdirectory. Please use --enable-tex-dir)
+ true
fi
+
+ $1="$TEXPREFIX/$find_texdir"
+
+ AC_MSG_RESULT($find_texprefix/$find_texdir)
- AC_MSG_RESULT($$1)
])
AC_INIT(flower/choleski.cc)
optimise_b=no
profile_b=no
#shared_b=no
+
AC_ARG_ENABLE(printing,
[ enable-printing set debug printing],
[printing_b=$enableval])
[ enable-profiling compile with gprof support],
[profile_b=$enableval])
-AC_ARG_ENABLE(texprefix,
- [ texprefix=DIR set the tex-directory to put the lilypond subdir in.],
+AC_ARG_ENABLE(tex-prefix,
+ [ tex-prefix=DIR set the tex-directory to find TeX subdirectories.],
[TEXPREFIX=$enableval],
[TEXPREFIX=auto] )
-
+
+AC_ARG_ENABLE(tex-dir,
+ [ tex-dir=DIR set the directory to put LilyPond TeX files in.],
+ [TEXDIR=$enableval],
+ [TEXDIR=auto] )
+
if test $profile_b = yes; then
EXTRA_LIBES="-pg"
DEFINES="$DEFINES -pg"
if test $optimise_b = yes; then
DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
fi
+
dnl COMPILEINFO="$HOST $host $TARGET $target"
AUTOHEADER="This file was automatically generated by configure"
CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
dnl should check out -print
if test FIND = error; then
- AC_MSG_WARN(Couldn't find \`find'. Please use --enable-texprefix)
-else
+ AC_MSG_WARN(Couldn't find \`find'. Please use --enable-tex-dir)
+fi
AC_SUBST(CXX)
AC_SUBST(DEFINES)
AC_SUBST(BISON)
AC_SUBST(FLEX)
AC_SUBST(TEXPREFIX)
+AC_SUBST(TEXDIR)
AC_SUBST(EXTRA_LIBES)
AC_CHECK_PROGS(BISON, bison, error)
AC_CHECK_PROGS(MAKE, make, error)
AC_CHECK_PROGS(PODMAN, pod2man, error)
-if test $TEXPREFIX = auto ; then
- AC_TEX_SUBDIR(TEXPREFIX)
+
+if test "x$TEXPREFIX" = xauto ; then
+ AC_TEX_PREFIX(TEXPREFIX)
+fi
+
+if test "x$TEXDIR" = xauto ; then
+ AC_TEX_SUBDIR(TEXDIR)
fi
if test $MAKE = "error"
$MAKE -v| grep GNU > /dev/null
if test "$?" = 1
then
- AC_MSG_WARN(Please install *GNU* make)
- fi
-fi
-
-
+ AC_MSG_WARN(Please install *GNU* make)
+ fi
+fi
+
if test $BISON = "error"
then
AC_MSG_WARN(can't find bison. Please install Bison (1.24 or better))
MAJOR_VERSION = 1
MINOR_VERSION = 1
-PATCH_LEVEL = 11
+PATCH_LEVEL = 12
# use to send patches, always empty for released version:
MY_PATCH_LEVEL = # include separator: "-1" or ".a"
#
+pl 1.1.11.jcn1
+ - No path search for "" and "-"
+
pl 1.1.11
- template<> class P
- assoc elem() methods
#include "real.hh"
-/** a T interval.
- this represents the closed interval [left,right].
- No invariants. T must be a totally ordered ring
+/** a T interval. this represents the closed interval [left,right].
+ No invariants. T must be a totally ordered ring (with division, anyway ..)
+ At instantiation, the function infinity() has to be defined explicitely.
+
*/
template<class T>
struct Interval_t {
/* ************** */
+ static T infinity() ;
+
T center() { return (left + right) / T(2);}
void translate(T t) {
left += t;
T length() const;
void set_empty() ;
bool empty_b() const { return left > right; }
+ bool contains_b(Interval_t<T> const&) const;
Interval_t() {
set_empty();
}
return -2;
}
+template<class T>
+bool
+Interval_t<T>::contains_b(Interval_t<T> const& a)const
+{
+ int c_i= _Interval__compare( *this, a);
+ if (c_i == -2)
+ return false;
+ return c_i >= 0;
+}
template<class T>
int
return i;
}
-#ifdef AIX
-const Real INFTY = 1e8; // ARGh. AIX sucks
-#else
-const Real INFTY = HUGE_VAL;
-#endif
-
template<class T>
void
Interval_t<T>::set_empty()
{
- left = INFTY;
- right = -INFTY;
+ left = (T) infinity();
+ right = (T) -infinity();
}
template<class T>
--- /dev/null
+/*
+ interval.cc -- instantiate Interval_t<Real>
+
+ source file of the Flower Library
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "interval.hh"
+#include "real.hh"
+#include "interval.tcc"
+
+Interval__instantiate(Real);
+
+Real
+Interval_t<Real>::infinity()
+{
+ return HUGE;
+}
{
fdebug << "looking for " << nm ;
+ if ( !nm.length_i() || ( nm == "-" ) )
+ return nm;
for (int i=0; i < size(); i++) {
String path = (*this)[i];
\inputregister {Meter_register}
\inputregister {Local_key_register}
\inputregister { Staff_sym_register }
+ \inputregister { Collision_register }
\inputregister {
Voice_group_registers
\inputregister { Dynamic_register }
-\version "0.0.50";
+\version "0.0.52";
include "register.ini"
include "dynamic.ini"
--- /dev/null
+% test the Collision resolution
+
+two_voice_steminvert = \melodic {
+ < \multivoice
+ { \octave c'; \stem 1;
+ c d e f() g2 g a }
+ { \stem -1;
+ g f e g ()g2 g2 }
+
+ >
+}
+
+two_voice = \melodic {
+ < \multivoice
+ { \octave c'; \stem -1;
+ c d e f g2() g a }
+ { \stem 1;
+ g f e g ()g2 g2 }
+
+ >
+}
+
+three_voice = \melodic {
+ < \multivoice
+ { \stem 1;
+ g f e f g a g2 }
+ { \hshift 1; \stem 1;
+ e2 e2 e2 e2 }
+ { \stem -1;
+ c d e d c d es }
+ >
+}
+
+rests = \melodic {
+ < \multivoice
+ { \stem 1;\duration "last";
+ r8 r r r r r r r
+ [c' b a g] [f e d c]
+ }
+ { \stem -1;
+ [c8 d e f] [g a b c']
+ r r r r r r r r r
+ }
+ >
+}
+\score{
+ \staff{ melodicregs
+ \melodic { \$two_voice ++ \$two_voice_steminvert
+ ++ \$three_voice ++ \rests
+ }
+ }
+ \paper {}
+% \midi { \tempo 4:80 }
+}
% copyright: None
%
% declare melody (which will be in *one* staff ) for the lead voice
+\version "0.0.52";
melodie = \melodic {
% switch Lilypond in note-mode
% The purpose of this file is to demonstrate features of LilyPond.
% (there is an accompanying LaTeX file, scsii-menuetto.tex)
%
-\version "0.0.50";
+\version "0.0.52";
%% Stuff from MPP version
% \lefttitle{Menuetto}
% \tempo{Moderato}
< [ e' g > d' cis'_"2" e' a( )g ] |
%%11
< \multivoice
- {\stem 1; a4(\stem 1;) d'4 cis'4-. }
+ {\stem 1; a4() d'4 cis'4-. }
{ \stem -1; f2 e4 } > |
%%12
< [ g'^"4" d > f' e' f' d'^"3"( ) c' ] |
\clef "alto";
< \multivoice
{ \stem 1; bes2 c'4 }
- { \stem -1; g4(\stem -1;) f4 e4 }% ugh
+ { \stem -1; g4() f4 e4 }% ugh
> |
%%14
< [ a f > g a f ] < d'4-\upbow e4 'bes4 > |
[ e' \f( )dis' e' ]2/3 g'4.^> cis' |
%%48
\textstyle "italic";
- < \multivoice {
- \stem 1 ; fis2.(
- | \stem -1 ; )f2. }
- { \stem 1 ; d'2.( | \stem 1 ; )d'4 r4_"decresc." d'4 } >
+ <
+ { fis2.( \group "+1"; \stem -1; )f2. }
+ { d'2. ( \stem 1 ; )d'4 r4_"decresc." d'4 }
+ >
\textstyle "roman"; |
%%50
< bes2. e2. > |
''a r4 |
%%5
\duration 8 ;
- < \multivoice { \stem 1 ; [ 'f 'a d 'a d 'a ] }
- { \stem -1 ; 'd2 r4 } > |
-%%6
- < \multivoice { \stem 1 ; [ 'd 'e 'g 'e 'g 'e ] }
- { \stem -1 ; ''bes2 r4 } > |
-%%7
- < \multivoice { \stem 1 ; [ 'cis 'e 'g 'e 'g e ] }
- { \stem -1 ; ''a2 r4 } > |
- %%8
- < \multivoice { \stem 1 ; [ 'd 'a d 'a d 'a ] }
- { \stem -1 ; 'd2 r4 } > |
+ < \multivoice { \stem 1 ;
+ [ 'f 'a d 'a d 'a ]
+ [ 'd 'e 'g 'e 'g 'e ]
+ [ 'cis 'e 'g 'e 'g e ]
+ [ 'd 'a d 'a d 'a ]
+ }
+ { \stem -1;
+ 'd2 r4
+ ''bes2 r4
+ ''a2 r4
+ 'd2 r4
+ } >
%%9
[ 'a e g e g e ] |
%%10
[ 'd 'a d 'a d 'a ] |
%%11
- < \multivoice { \stem 1 ; [ 'f 'a d 'a d 'a ] }
- { \stem -1 ; 'd2 r4 } > |
-%%12 == 6
- < \multivoice { \stem 1 ; [ 'd 'e 'g 'e 'g 'e ] }
- { \stem -1 ; ''bes2 r4 } > |
-%13
- < \multivoice { [ 'e 'g 'bes 'g 'bes 'g ] }
- { \stem -1 ; 'c2 r4 } > |
-%%14
- < \multivoice { \stem 1 ; [ 'a c f c f c ] }
- { \stem -1 ; 'f2 r4 } > |
+ < \multivoice
+ { \stem 1 ;
+ [ 'f 'a d 'a d 'a ]
+ [ 'd 'e 'g 'e 'g 'e ]
+ [ 'e 'g 'bes 'g 'bes 'g ]
+ [ 'a c f c f c ]
+ } { \stem -1;
+ 'd2 r4
+ ''bes2 r4
+ 'c2 r4
+ 'f2 r4 }
+ >
%%15
[ 'c 'g 'bes 'g 'bes 'g ] |
%%16
[ ''f 'c 'f 'c 'f 'c ] |
-%%17
- < \multivoice { \stem 1 ; [ ''a 'e 'g 'e 'g 'e ] }
- { \stem -1 ; ''a2 r4 } > |
-%%18
- < \multivoice { \stem 1 ; [ 'd 'a d 'a d 'a ] }
- { \stem -1 ; 'd2 r4 } > |
-%%19
- < \multivoice { \stem 1 ; [ ''bes 'f 'bes 'f 'bes 'f ] }
- { \stem -1 ; ''bes2 r4 } > |
-%%20
- < \multivoice { \stem 1 ; [ ''f 'c 'f 'c 'f 'c ] }
- { \stem -1 ; ''f2 r4 } > |
+ < \multivoice
+ { \stem 1;
+ [ ''a 'e 'g 'e 'g 'e ][ 'd 'a d 'a d 'a ]
+ [ ''bes 'f 'bes 'f 'bes 'f ][ ''f 'c 'f 'c 'f 'c ] }
+ { \stem -1;
+ ''a2 r4
+ 'd2 r4
+ ''bes2 r4
+ ''f2 r4
+ } >
%%21
< [ 'e 'c > 'g c 'g c 'g ] |
%%22
[ 'f 'a c 'a 'f 'c ] |
-%%23
- < \multivoice { \stem 1 ; [ ''a 'e 'g 'e 'g 'e ] }
- { \stem -1 ; ''a2 r4 } > |
-%%24
- < \multivoice { \stem 1 ; [ 'd 'fis 'a 'fis 'a 'fis ] }
- { \stem -1 ; 'd2 r4 } > |
-%%25
- < \multivoice { \stem 1 ; [ ''g 'd 'b 'd 'b 'd ] }
- { \stem -1 ; ''g2 r4 } > |
-%%26
- < \multivoice { \stem 1 ; [ 'd 'a d 'a d 'a ] }
- { \stem -1 ; 'd2 r4 } > |
-%%27
+ < \multivoice {
+ \stem 1;
+ [ ''a 'e 'g 'e 'g 'e ]
+ [ 'd 'fis 'a 'fis 'a 'fis ]
+ [ ''g 'd 'b 'd 'b 'd ]
+ [ 'd 'a d 'a d 'a ]
+ }
+ {\stem -1;
+ ''a2 r4
+ 'd2 r4
+ ''g2 r4
+ 'd2 r4
+ }
+ >
< [ 'cis ''a > 'e 'a 'e 'a 'e ] |
%%28
[ 'd 'a d 'a d 'a ] |
%%44
< [ 'd ''b > 'fis 'b 'fis 'b 'fis ] |
%%45
- < \multivoice { \stem 1 ; [ ''g 'd 'b 'd 'b 'd ] }
- { \stem -1 ; ''g2 r4 } > |
-%%46
- < \multivoice { \stem 1 ; [ 'd 'a d 'a d 'a ] }
- { \stem -1 ; 'd2 r4 } > |
+ < \multivoice { \stem 1;
+ [ ''g 'd 'b 'd 'b 'd ]
+ [ 'd 'a d 'a d 'a ]
+ } {
+ \stem -1;
+ ''g2 r4
+ 'd2 r4
+ } >
+
%%47
< [ 'cis ''a > 'e 'a 'e 'a 'e ] |
%%48
}
\score{
- \staff{ lyricregs tekstI tekstII }
+ \staff{ lyricregs tekstI }
+% sorry. Have to fix
+% \staff{ lyricregs tekstII }
+
\staff{ melodicregs melodie }
\staff{ melodicregs begeleiding }
\paper{
%
% Public Domain -- typed by by HWN
%
-\version "0.0.50";
+\version "0.0.52";
global = \melodic{
\meter 4/4 ;
\duration \last ;
\stem -1;
- r8-"dux"
+ r8
[c'16 b] [c'8 g] [as c'16 b] [c'8 d'] |
[g c'16 b] [c'8 d'] [f16 g] as4 [g16 f] |
[es c' b a] [ g f es d] [c8 es' d' c'] |
\stem 1;
r1 |
r1 |
- r8-"comes" [g16 fis] [g8 c] [es g16 f] [g8 a]|
+ r8 [g16 fis] [g8 c] [es g16 f] [g8 a]|
[d8 g16 fis] [g8 a] [c16 d] es4 [d16 c] |
['bes8 es16 d] [es8 'g8] ['as f16 es] [f8 'a]
['bes8 g16 f] [g8 'b] [c8 d16 es] f4( |
istream_p_ = 0;
open();
- map();
+ if ( fildes_i_ > 0 )
+ map();
}
istream*
Source_file::istream_l()
{
- assert( fildes_i_ );
+ if ( !fildes_i_ )
+ return &cin;
if ( !istream_p_ ) {
if ( size_off_ ) // can-t this be done without such a hack?
istream_p_ = new istrstream( ch_C(), size_off_ );
void
Source_file::open()
{
+ if ( !name_str_.length_i() || ( name_str_ == "-" ) ) {
+ fildes_i_ = 0;
+ return;
+ }
+
fildes_i_ = ::open( name_str_, O_RDONLY );
if ( fildes_i_ == -1 ) {
open a file
@param file_str the file to be opened, name might be changed if it
- is found in a search path.
+ is found in a search path. UGH!
@return 0 if no file found
*/
Source_file*
-Sources::get_file_l(String &file_str )
+Sources::get_file_l(String &file_str ) //UGH
{
if (path_C_){
- file_str = path_C_->find(file_str);
- if (file_str== "")
+ String file_str_o = path_C_->find(file_str);
+ if ( ( file_str_o == "" ) && ( file_str != "" ) )
return 0;
+ file_str = file_str_o;
}
Source_file * f_p= (!binary_b_) ?
new Source_file(file_str) : new Binary_source_file(file_str);
void
warning(String m)
{
- cerr << "warning" <<m <<endl;
+ cerr << "warning: " <<m <<endl;
}
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 51
+PATCH_LEVEL = 52
# use to send patches, always empty for released version:
# include separator: ".postfix", "-pl" makes rpm barf
void
Clef_item::read(String t)
{
- type = t;
- if (type == "violin")
+ type_= t;
+ if (type_ == "violin")
y_off = 2;
- if (type == "alto")
+ if (type_ == "alto")
y_off = 4;
- if (type == "tenor")
+ if (type_ == "tenor")
y_off = 6;
- if (type == "bass")
+ if (type_ == "bass")
y_off = 6;
}
void
Molecule*
Clef_item::brew_molecule_p()const
{
- String t = type;
+ String t = type_;
if (change)
t += "_change";
Symbol s = paper()->lookup_l()->clef(t);
--- /dev/null
+/*
+ collision-reg.cc -- implement Collision_register
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "note-column.hh"
+#include "collision-reg.hh"
+#include "collision.hh"
+
+void
+Collision_register::acknowledge_element(Staff_elem_info i)
+{
+ if (!(i.elem_l_->name() == Note_column::static_name()))
+ return;
+
+ if (!col_p_)
+ col_p_ = new Collision;
+
+ col_p_->add((Note_column*)i.elem_l_);
+}
+
+void
+Collision_register::pre_move_processing()
+{
+ if (col_p_) {
+ typeset_element(col_p_);
+ col_p_ =0;
+ }
+}
+Collision_register::Collision_register()
+{
+ col_p_ =0;
+}
+
+IMPLEMENT_STATIC_NAME(Collision_register);
+ADD_THIS_REGISTER(Collision_register);
--- /dev/null
+/*
+ collision.cc -- implement Collision
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+#include "debug.hh"
+#include "collision.hh"
+#include "note-column.hh"
+#include "notehead.hh"
+#include "paper-def.hh"
+
+Collision::Collision()
+{
+}
+
+void
+Collision::add(Note_column* ncol_l)
+{
+ clash_l_arr_.push(ncol_l);
+ add_dependency(ncol_l);
+}
+static
+int idx(int dir, bool h_shift_b)
+{
+ assert(abs (dir) == 1);
+ int j = dir > 0 ? 0 : 3;
+ if ( h_shift_b )
+ j += dir;
+ return j;
+}
+
+/** This complicated routine moves note columns around horizontally
+ (and rests vertically) to ensure that notes don't clash.
+
+ This should be done better, probably.
+
+ This routine is dedicated to Stine Randmael :-)
+
+ */
+void
+Collision::do_pre_processing()
+{
+ if (clash_l_arr_.size() <= 1)
+ return;
+
+ /*
+ [stem up, stem up shifted, stem down shifted, stem down]
+ */
+ Array<Note_column*> clash_group_arr_a[4];
+
+ for (int i=0; i < clash_l_arr_.size(); i++) {
+ Note_column* c_l = clash_l_arr_[i];
+ int d = (c_l->dir_i_);
+
+ clash_group_arr_a[idx(d, c_l->h_shift_b_)].push(c_l);
+ }
+
+ for (int j=0; j < 4; j++) {
+ if (clash_group_arr_a[j].size() > 1) {
+ warning("Too many clashing notecolumns. Ignoring them.");
+ return;
+ }
+ }
+ int d = 1;
+ do {
+ if (!clash_group_arr_a[idx(d, false)].size()){
+ clash_group_arr_a[idx(d, false)] = clash_group_arr_a[idx(d, true)];
+ clash_group_arr_a[idx(d, true)].set_size(0);
+ }
+ } while ((d *= -1) != 1);
+
+
+ Interval_t<int> y_extent[4];
+ Note_column * col_l_a[4];
+ Real x_off [4];
+ int y_off[4];
+ bool rest_b_a[4];
+
+ for (int j =0 ; j < 4; j++) {
+ if (clash_group_arr_a[j].size())
+ col_l_a[j] = clash_group_arr_a[j][0];
+ else
+ col_l_a[j] = 0;
+
+ if (col_l_a[j]) {
+ y_extent[j] = col_l_a[j]->head_positions_interval();
+ }
+
+ rest_b_a[j] = (col_l_a[j]) ? col_l_a[j]->rest_b_ : false;
+ x_off [j] = 0.0;
+ y_off[j] = 0;
+ }
+
+ do {
+ x_off[idx(d, true)] = d*0.5;
+ } while ((d *= -1) != 1);
+
+ do {
+ int i1 = idx(d, false);
+ int i2 = idx(d,true);
+ if (!intersection(y_extent[i1] ,
+ y_extent[i2]).empty_b()) {
+ if (rest_b_a[i1]) {
+ y_off[i1] = -y_extent[i1][-d] + y_extent[1][d] + d*4; // ugh
+ y_extent[i1] += y_off[i1];
+ }
+ }
+ } while ((d *= -1) != 1);
+
+ do {
+ int i1 = idx(d, false);
+ int i2 = idx(-d,false);
+
+ if (d*(y_extent[i1][-d] - y_extent[i2][d] )< 0&& rest_b_a[i1]) {
+ y_off[i1] = -y_extent[i1][-d] + y_extent[i2][d] +d* 4; // ugh
+ y_extent[i1] += y_off[i1];
+ }
+ } while ((d *= -1) != 1);
+
+ Interval_t<int> middle( y_extent[0].min(), y_extent[3].max());
+ Interval_t<int> open_middle( y_extent[3].max()+1, y_extent[0].min()-1);
+ do{
+ if (!open_middle.contains_b(y_extent[idx(d,true)]))
+ x_off[idx(d, true)] = d *1.0 ;
+ } while ((d *= -1) != 1);
+
+ if (!middle.empty_b() &&
+ middle.length() <= 1 && col_l_a[idx(1,0)] && col_l_a[idx(-1,0)]
+ && !rest_b_a[idx(1,0)] && !rest_b_a[idx(-1,0)]) {
+
+ Notehead * nu_l= col_l_a[idx(1,0)]->head_l_arr_[idx(1,0)];
+ Notehead * nd_l = col_l_a[idx(-1,0)]->head_l_arr_[idx(1,0)];
+ if (! (nu_l->balltype == nd_l->balltype && nu_l->dots == nd_l->dots)) {
+ x_off[idx(1,0)] -= 0.5;
+ x_off[1] -= 0.5;
+ x_off[2] += 0.5;
+ x_off[idx(-1,0)] += 0.5;
+ }
+ }
+ Real inter_f = paper()->internote();
+ Real wid_f = paper()->note_width();
+ for (int j=0; j < 4; j++) {
+ if (col_l_a[j])
+ col_l_a[j]->translate(Offset(x_off[j] * wid_f,
+ y_off[j] * inter_f));
+
+ }
+}
+IMPLEMENT_STATIC_NAME(Collision);
Group_feature_req::do_print() const
{
#ifndef NPRINT
- mtor << "stemdir " << stemdir_i_;
+ mtor << type_str_ << "=" << value_str_;
#endif
}
-Group_feature_req::Group_feature_req()
-{
- stemdir_i_ = 0;
-}
-
IMPLEMENT_STATIC_NAME(Group_change_req);
void
}
void
-Dynamic_register::set_feature(Features i)
+Dynamic_register::set_feature(Feature i)
{
- dir_i_ = i.direction_i_;
+ if (i.type_ == "vdir")
+ dir_i_ = i.value_;
}
IMPLEMENT_STATIC_NAME(Dynamic_register);
Notehead_register::Notehead_register()
{
note_p_ = 0;
- set_feature(Features::dir(0));
post_move_processing();
}
return true;
}
-void
-Notehead_register::set_feature(Features d)
-{
- if(d.direction_i_ || d.initialiser_b_)
- dir_i_ = d.direction_i_;
-}
void
Notehead_register::process_requests()
Notehead_register::pre_move_processing()
{
if (note_p_) {
- if (dir_i_ && note_p_->rest_b_ ) {
- note_p_->position +=4*dir_i_ ;
- }
typeset_element(note_p_);
note_p_ = 0;
}
#define CLEFITEM_HH
#include "item.hh"
-
-struct Clef_item : Item {
- String type;
+/**
+ Set a clef in a staff.
+ */
+class Clef_item : public Item {
+protected:
+ Molecule* brew_molecule_p()const;
+public:
+
+ String type_;
int y_off;
/// is this a change clef (smaller size)?
bool change;
-
/* *************** */
NAME_MEMBERS(Clef_item);
Clef_item();
void read(Clef_register const&);
void read(String);
- Molecule* brew_molecule_p()const;
};
#endif // CLEFITEM_HH
--- /dev/null
+/*
+ collision-reg.hh -- declare Collision_register
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef COLLISION_REG_HH
+#define COLLISION_REG_HH
+
+#include "register.hh"
+
+class Collision_register : public Request_register {
+ Collision* col_p_;
+
+protected:
+ virtual void acknowledge_element(Staff_elem_info);
+ virtual void pre_move_processing();
+public:
+ Collision_register();
+ NAME_MEMBERS(Collision_register);
+};
+#endif // COLLISION_REG_HH
--- /dev/null
+/*
+ collision.hh -- declare Collision
+
+ source file of the LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef COLLISION_HH
+#define COLLISION_HH
+#include "lily-proto.hh"
+#include "item.hh"
+
+class Collision : public Item {
+ Array<Note_column*> clash_l_arr_;
+protected:
+ virtual void do_pre_processing();
+public:
+ NAME_MEMBERS(Collision);
+ void add (Note_column*ncol_l);
+ Collision();
+
+};
+#endif // COLLISION_HH
class Group_feature_req : public Command_req {
public:
- int stemdir_i_;
- Group_feature_req();
+ String type_str_;
+ String value_str_;
+
REQUESTMETHODS(Group_feature_req, groupfeature);
};
virtual void pre_move_processing();
virtual void post_move_processing();
virtual bool acceptable_request_b(Request*) const;
- virtual void set_feature(Features);
+ virtual void set_feature(Feature);
};
#endif // DYNAMIC_REG_HH
struct Notehead_register : Request_register {
Notehead* note_p_;
Rhythmic_req * note_req_l_;
- int dir_i_;
/* *************** */
Notehead_register();
virtual void process_requests();
virtual void pre_move_processing();
virtual void post_move_processing();
- void set_feature(Features);
NAME_MEMBERS(Notehead_register);
};
virtual Item *item() { return this; }
Item();
void do_print()const;
-
+ Real hpos_f() const;
NAME_MEMBERS(Item);
};
struct Durational_req;
struct Dynamic_req;
struct Group_change_req;
+struct Feature;
struct Group_feature_req;
struct Key_change_req;
struct Lyric_req;
struct Meter_change_req;
struct Musical_req;
struct Command_req;
+struct Collision_register;
+struct Collision;
struct Note_req;
struct Plet_req;
struct Partial_measure_req;
class Note_column_register :public Request_register {
Note_column *ncol_p_;
+ bool h_shift_b_;
+ int dir_i_;
/* *************** */
bool acceptable_elem_b(Staff_elem const*)const;
protected:
+ virtual void set_feature(Feature);
virtual void acknowledge_element(Staff_elem_info);
virtual void pre_move_processing();
#ifndef NOTE_COLUMN_HH
#define NOTE_COLUMN_HH
#include "item.hh"
+#include "interval.hh"
-/**
- a struct for treating a group of noteheads (noteheads, stem, scripts )
- as a single entity.
- */
+/** a struct for treating a group of noteheads (noteheads, stem
+ (chord) and scripts ) as a single entity. */
class Note_column : public Item {
- Stem * stem_l_;
- Array<Notehead*> head_l_arr_;
- Array<Script *> script_l_arr_;
-
-protected:
- virtual void translate(Offset);
virtual Interval do_height()const;
virtual void do_print() const ;
virtual void do_pre_processing();
virtual Interval do_width()const;
public:
+ bool h_shift_b_;
+ Stem * stem_l_;
+ Array<Script *> script_l_arr_;
+ bool rest_b_;
+ Array<Notehead*> head_l_arr_;
+
+ /** The relative position of the "voice" containing this
+ chord. Normally this would be the same as the stem direction,
+ but rests do not have stems. */
+ int dir_i_;
+
+ Interval_t<int> head_positions_interval()const;
NAME_MEMBERS(Note_column);
Note_column();
void add(Notehead *);
void add(Stem *);
+ virtual void translate(Offset);
+ void sort();
void add(Script *);
};
#endif // NOTE_COLUMN_HH
int position;
/// -1 = lowest, 0 = inside, 1 = top
int extremal;
+
/// needed for the help-lines
int staff_size;
int dots;
/*
- paper-def.hh -- declare
+ paper-def.hh -- declare Paper_def
source file of the LilyPond music typesetter
*/
-#ifndef Paper_def_HH
-#define Paper_def_HH
+#ifndef PAPER_DEF_HH
+#define PAPER_DEF_HH
#include "proto.hh"
#include "real.hh"
#include "string.hh"
void set(Lookup*);
~Paper_def();
Paper_def(Paper_def const&);
+ /**
+ The distance between lines
+ */
Real interline()const;
+ /// half the distance between lines
Real internote()const;
+
+ /// thickness of the standard line
Real rule_thickness()const;
+
+ /// height of the staff
Real standard_height()const;
+
+ /// width of a quaver ball
Real note_width() const;
void print() const;
Lookup const * lookup_l(); // TODO naming
+
+ /** convert a duration to an idealspacing
+ influence using the geometric_ and whole_width parameters.
+ */
Real duration_to_dist(Moment);
};
Request*get_text_req(int d , Text_def*def);
Request* get_stemdir_req(int);
Request*get_grouping_req(Array<int> i_arr);
+Request* get_hshift_req(int);
#endif // PARSECONSTRUCT_HH
Remove #reg_l# from the list, and return it.
*/
Request_register * get_register_p(Request_register*reg_l);
- virtual void set_feature(Features i);
+ virtual void set_feature(Feature i);
virtual bool acceptable_request_b(Request*)const;
virtual void pre_move_processing();
virtual void post_move_processing();
*/
virtual void announce_element(Staff_elem_info);
/**
- Set features of the register(s). Default: ignore features.
+ Set Feature of the register(s). Default: ignore Feature.
*/
- virtual void set_feature(Features){}
+ virtual void set_feature(Feature){}
/**
Does this equal or contain a certain register?
*/
NAME_MEMBERS(Script_register);
Script_register();
protected:
- virtual void set_feature(Features dir_i_);
virtual bool try_request(Request*);
virtual void process_requests();
virtual void acknowledge_element(Staff_elem_info);
#include "register.hh"
-struct Slur_register : Request_register {
+class Slur_register :public Request_register {
Array<Slur_req*> requests_arr_;
Array<Slur_req*> new_slur_req_l_arr_;
Array<Slur *> slur_l_stack_;
Array<Slur*> end_slur_l_arr_;
- int dir_i_;
-
/* *************** */
- ~Slur_register();
- Slur_register();
+protected:
+ virtual ~Slur_register();
virtual bool try_request(Request*);
virtual void process_requests();
virtual void acknowledge_element(Staff_elem_info);
virtual void pre_move_processing();
virtual void post_move_processing();
- virtual void set_feature(Features);
+public:
NAME_MEMBERS(Slur_register);
};
#ifndef STAFFELEMINFO_HH
#define STAFFELEMINFO_HH
+#include "scalar.hh"
#include "proto.hh"
#include "varray.hh"
};
-struct Features {
- bool initialiser_b_;
- int direction_i_;
-
- Features();
- static Features dir(int);
+struct Feature {
+ Scalar type_;
+ Scalar value_;
};
#endif // STAFFELEMINFO_HH
Overridable, since this staff-elem might act as a pseudo-list.
*/
virtual void translate(Offset);
+ Offset offset()const;
void add_processing();
void pre_processing();
void post_processing();
/* *************** */
Stem_beam_register();
~Stem_beam_register();
- virtual void set_feature(Features dir_i_);
+ virtual void set_feature(Feature dir_i_);
virtual bool try_request(Request*);
virtual void process_requests();
virtual void acknowledge_element(Staff_elem_info);
int dir_i_;
/* *************** */
protected:
- virtual void set_feature(Features );
+ virtual void set_feature(Feature );
virtual bool try_request(Request*);
virtual void process_requests();
virtual void pre_move_processing();
/* *************** */
NAME_MEMBERS(Voice_registers);
+
virtual bool acceptable_request_b(Request*);
virtual void acknowledge_element(Staff_elem_info info);
virtual bool try_request(Request*);
-#include "debug.hh"
-#include "item.hh"
+/*
+ item.cc -- implement Item
+ source file of the LilyPond music typesetter
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "debug.hh"
+#include "item.hh"
+#include "p-col.hh"
Item::Item()
{
#endif
}
+
+Real
+Item::hpos_f()const
+{
+ return pcol_l_->hpos + offset().x;
+}
main (int argc, char **argv)
{
debug_init(); // should be first
- File_path path(String(DIR_DATADIR)+"/init/") ;
- path_l = & path;
- path_l->push(DIR_DATADIR );
+// File_path path(String(DIR_DATADIR)+"/init/") ;
+ // silly File_path, now has two .:.
+ File_path path( "." );
+
+ // must override (come before) "/usr/local/share/lilypond"!
char const * env_l=getenv("LILYINCLUDE");
if (env_l) {
path.add(env_l);
}
+ path.add( String( DIR_DATADIR ) + "/init/" );
+
+ path_l = & path;
+ path_l->push(DIR_DATADIR );
+
Getopt_long oparser(argc, argv,theopts);
cout << get_version_str() << endl;
String init_str("symbol.ini");
exit(0);
break;
case 'V':
- version_ignore_b_ = false;
+ version_ignore_b_ = true;
break;
case 'd':
set_debug(true);
{"absdynamic", ABSDYNAMIC},
{"group", GROUP},
{"geometric", GEOMETRIC},
+ {"hshift", HSHIFT},
{"in", IN_T},
{"inputregister", INPUT_REGS},
{"lyric", LYRIC},
Note_column_register::pre_move_processing()
{
if (ncol_p_) {
+ if (! ncol_p_->dir_i_ )
+ ncol_p_->dir_i_ = dir_i_;
+ if (! ncol_p_->h_shift_b_)
+ ncol_p_->h_shift_b_ = h_shift_b_;
typeset_element(ncol_p_);
ncol_p_ =0;
}
}
+
+void
+Note_column_register::set_feature(Feature i)
+{
+ if (i.type_ == "vdir")
+ dir_i_ = i.value_;
+ if (i.type_ == "hshift")
+ h_shift_b_ = i.value_;
+}
+
Note_column_register::Note_column_register()
{
+ dir_i_ =0;
+ h_shift_b_ = false;
ncol_p_=0;
}
IMPLEMENT_STATIC_NAME(Note_column_register);
void
Note_column::add(Notehead* n_l)
{
+ if (head_l_arr_.size())
+ assert(n_l->rest_b_ == rest_b_);
+ else
+ rest_b_ = n_l->rest_b_;
+
head_l_arr_.push(n_l);
add_dependency(n_l);
}
void
Note_column::do_pre_processing()
{
+ if (stem_l_ && !dir_i_)
+ dir_i_ = stem_l_->dir_i_;
+
if (!script_l_arr_.size())
return;
}
}
}
+
Note_column::Note_column()
{
+ h_shift_b_ =false;
stem_l_ =0;
+ rest_b_ = false;
+ dir_i_ =0;
+}
+void
+Note_column::sort()
+{
+ head_l_arr_.sort( Notehead::compare);
}
+Interval_t<int>
+Note_column::head_positions_interval()const
+{
+ ( (Note_column*)this)->sort();
+ return Interval_t<int> ( head_l_arr_[0]->position,
+ head_l_arr_.top()->position);
+
+}
get_stemdir_req(int d)
{
Group_feature_req * gfreq_p = new Group_feature_req;
- gfreq_p->stemdir_i_ =d;
+ gfreq_p->type_str_ = "vdir";
+ gfreq_p->value_str_ = String(d);
return gfreq_p;
}
-
+Request*
+get_hshift_req(int i)
+{
+ Group_feature_req * gfreq_p = new Group_feature_req;
+ gfreq_p->type_str_ = "hshift";
+ gfreq_p->value_str_ = String(i);
+ return gfreq_p;
+}
+
Request*
get_grouping_req(Array<int> i_arr)
{
%{ // -*-Fundamental-*-
#include <iostream.h>
-#define MUDELA_VERSION "0.0.50"
+#define MUDELA_VERSION "0.0.52"
#include "script-def.hh"
#include "symtable.hh"
%token GROUPING
%token GROUP
%token INPUT_REGS
+%token HSHIFT
%token IN_T
%token LYRIC
%token KEY
%type <moment> duration_length
%type <music> init_music
%type <mvoice> transposed_music_voice init_lyrics_voice
-%type <mvoice> music_voice_body music_voice init_music_voice
+%type <mvoice> music_voice_body music_voice init_music_voice concat_body
%type <paper> paper_block paper_body
%type <real> dim real
%type <real> unit
}
;
-music_voice: '{' music_voice_body '}' { $$ = $2; }
+music_voice: '{' concat_body '}' { $$ = $2; }
| TRANSPOSE '{' transposed_music_voice '}' {
$$ = $3;
}
;
+
+concat_body:
+ music_voice_body {
+ $$ = $1;
+ }
+ | concat_body CONCAT music_voice_body {
+ $$->add($3);/* niet echt */
+ }
+ ;
+
music_voice_body:
VOICE_IDENTIFIER {
$$ = $1->mvoice(true);
| music_voice_body music_chord {
$$->add($2);
}
- | music_voice_body CONCAT music_voice {
- $$->add($3);/* niet echt */
- }
| music_voice_body error {
}
| music_voice_body '>' {
| STEM int {
$$ = get_stemdir_req($2);
}
+ | HSHIFT int {
+ $$ = get_hshift_req($2);
+ }
| CLEF STRING {
$$ = new Clef_change_req(*$2);
delete $2;
}
void
-Register_group_register::set_feature(Features d)
+Register_group_register::set_feature(Feature d)
{
for (iter_top(reg_list_, i); i.ok(); i++) {
i->set_feature(d);
script_req_l_arr_.set_size(0);
}
-void
-Script_register::set_feature(Features )
-{
-// if (i.direction_i_|| i.initialiser_b_)
- //dir_i_ = i.direction_i_;
-}
IMPLEMENT_STATIC_NAME(Script_register);
ADD_THIS_REGISTER(Script_register);
#include "debug.hh"
#include "notehead.hh"
-void
-Slur_register::set_feature(Features i)
-{
- dir_i_ = i.direction_i_;
-}
-
-Slur_register::Slur_register()
-{
- set_feature(Features::dir(0));
-}
-
bool
Slur_register::try_request(Request *req_l)
{
Slur_register::pre_move_processing()
{
for (int i = 0; i < end_slur_l_arr_.size(); i++) {
- if (dir_i_)
- end_slur_l_arr_[i]->dir_i_ = dir_i_;
typeset_element(end_slur_l_arr_[i]);
}
end_slur_l_arr_.set_size(0);
req_l_ = 0;
}
-Features::Features()
-{
- direction_i_ = 0;
- initialiser_b_ = false;
-}
-
-Features
-Features::dir(int d) return f;
-{
- f.initialiser_b_ = true;
- f.direction_i_ = d;
-}
Atom a(paper()->lookup_l()->fill(Box(Interval(0,0), Interval(0,0))));
return new Molecule (a);
}
+Offset
+Staff_elem::offset() const
+{
+ return offset_;
+}
Stem_beam_register::Stem_beam_register()
{
post_move_processing();
+
current_grouping = 0;
beam_p_ = 0;
- set_feature(Features::dir(0));
+ default_dir_i_ =0;
start_req_l_ = 0;
}
}
void
-Stem_beam_register::set_feature(Features i)
+Stem_beam_register::set_feature(Feature i)
{
- default_dir_i_ = i.direction_i_;
+ if (i.type_ == "vdir")
+ default_dir_i_ = i.value_;
}
IMPLEMENT_STATIC_NAME(Stem_beam_register);
Real dy = p->internote();
Symbol ss =p->lookup_l()->stem(bot*dy,top*dy);
-
out = new Molecule(Atom(ss));
if (print_flag&&abs(flag) > 4){
Real
Stem::hindex()const
{
- return pcol_l_->hpos + stem_xoffset; // hmm. + offset_.x;
+ return hpos_f() + stem_xoffset;
}
+#include <limits.h>
#include "proto.hh"
#include "string.hh"
#include "moment.hh"
#include "interval.tcc"
-Interval__instantiate(Real);
Interval__instantiate(Rational);
+Interval__instantiate(int);
+
+#ifdef AIX
+const Real INFTY = 1e8; // ARGh. AIX sucks
+#else
+const Real INFTY = HUGE_VAL;
+#endif
+
+Rational
+Interval_t<Rational>::infinity()
+{
+ return INFTY;
+}
+
+int
+Interval_t<int>::infinity()
+{
+ return INT_MAX;
+}
Text_register::Text_register()
{
text_p_ = 0;
- set_feature(Features::dir(0));
+ dir_i_ =0;
post_move_processing();
}
}
}
void
-Text_register::set_feature(Features i)
+Text_register::set_feature(Feature i)
{
- dir_i_ = i.direction_i_;
+ if (i.type_ == "vdir")
+ dir_i_ = i.value_;
}
void
Text_register::post_move_processing()
{
for (int i=0; i < voice_regs_l_.size(); i++) {
if (voice_regs_l_[i]->voice_l_ == r_l->voice_l())
- goto gotcha;
+ goto gotcha; // yeah, yeah, I know
}
return false;
gotcha:
Command_req* c_l = r_l->command();
if (c_l&& c_l->groupfeature()) {
- set_feature(Features::dir(c_l->groupfeature()->stemdir_i_));
+ Feature f;
+ f.type_ = c_l->groupfeature()->type_str_;
+ f.value_ = c_l->groupfeature()->value_str_;
+ set_feature(f);
return true;
}
return Register_group_register::try_request(r_l);
libdir = @libdir@
prefix = @prefix@
TEXPREFIX = @TEXPREFIX@
+TEXDIR = @TEXDIR@
mandir = @mandir@
exec_prefix = @exec_prefix@
bindir = @bindir@
# list of distribution files:
#
-EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in Toplevel.make.in lilypond.lsm.in
+EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in Toplevel.make.in lilypond.lsm.in $(outdir)/lilypond.spec
#
# generic variables:
# RedHat rpm package:
#
-#rpm: dist
-# mv ./$(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
rpm:
- make -C ./$(depth) dist
- cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
- cp $(doc-dir)/*.gif $(rpm-sources)
+ -cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources)
+ -cp $(doc-dir)/*.gif $(rpm-sources)
$(MAKE) -C $(make-dir) spec
rpm -ba $(makeout)/lilypond.spec
#
include-lib = ./$(depth)/lib/include
include-flower = ./$(depth)/flower/include
#
-rpm-sources = /usr/src/redhat/SOURCES
+rpm-sources = ${HOME}/rpms/SOURCES
#
# user settings:
--- /dev/null
+Name: lilypond
+Version: 0.0.52
+Release: 1
+Copyright: GPL
+Group: Applications/Publishing
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.52.tar.gz
+Summary: A preprocessor to make TeX typeset music.
+URL: http://www.stack.nl/~hanwen/lilypond
+Packager: Han-Wen Nienhuys <hanwen@stack.nl>
+Icon: lelie_icon.gif
+Buildroot: /tmp/lilypond_build
+
+%description
+LilyPond is a program which converts a music-script (mudela) into
+TeX output, or MIDI to produce multi-staff scores. Features include multiple
+meters, clefs, keys, lyrics, versatile input-language, cadenzas
+beams, slurs, triplets, multi voices.
+
+%prep
+%setup
+%build
+configure --enable-checking --enable-printing --prefix=/usr --enable-optimise
+make all
+%install
+strip bin/lilypond bin/mi2mu
+make prefix="$RPM_BUILD_ROOT/usr" install
+%files
+%doc Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/error.text Documentation/out/examples.text Documentation/out/faq.text Documentation/out/index.text Documentation/out/language.text Documentation/out/lilygut.text Documentation/out/lilypond.text Documentation/out/mudela.text Documentation/lelie_logo.gif
+/usr/bin/lilypond
+/usr/bin/mi2mu
+/usr/man/man1/lilypond.1
+/usr/man/man5/mudela.5
+/usr/lib/texmf/texmf/tex/lilypond/
+/usr/share/lilypond/
+
+%post
+texhash
+%post
+texhash
+
URL: http://www.stack.nl/~hanwen/lilypond
Packager: Han-Wen Nienhuys <hanwen@stack.nl>
Icon: lelie_icon.gif
+Buildroot: /tmp/lilypond_build
%description
LilyPond is a program which converts a music-script (mudela) into
TeX output, or MIDI to produce multi-staff scores. Features include multiple
meters, clefs, keys, lyrics, versatile input-language, cadenzas
-beams, slurs, triplets.
+beams, slurs, triplets, multi voices.
%prep
%setup
%build
-configure --enable-checking --enable-optimise --enable-printing --prefix=/usr
+configure --enable-checking --enable-printing --prefix=/usr --enable-optimise
make all
%install
-make install
-strip /usr/bin/lilypond /usr/bin/mi2mu
+strip bin/lilypond bin/mi2mu
+make prefix="$RPM_BUILD_ROOT/usr" install
%files
%doc @TEXT_DOCS@ Documentation/lelie_logo.gif
/usr/bin/lilypond
#
localinstall:
- $(INSTALL) -d $(TEXPREFIX)/lilypond
- $(INSTALL) -m 755 $(TEXFILES) $(TEXPREFIX)/lilypond/
+ $(INSTALL) -d $(TEXDIR)/lilypond
+ $(INSTALL) -m 755 $(TEXFILES) $(TEXDIR)/lilypond/
localuninstall:
- for i in $(TEXFILES) ; do rm -f $(TEXPREFIX)/lilypond/$$i; done
- -rmdir $(TEXPREFIX)/lilypond/
+ for i in $(TEXFILES) ; do rm -f $(TEXDIR)/lilypond/$$i; done
+ -rmdir $(TEXDIR)/lilypond/