]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.0.23 release/0.0.23
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 20 Jan 1997 00:19:48 +0000 (01:19 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 20 Jan 1997 00:19:48 +0000 (01:19 +0100)
131 files changed:
.dstreamrc
Documentation/CodingStyle.pod
Documentation/Makefile
Documentation/README.pod
Documentation/error.pod [new file with mode: 0644]
Documentation/faq.pod [new file with mode: 0644]
Documentation/lilyinput.pod
Generate.make [new file with mode: 0644]
Initial.make [new file with mode: 0644]
Makefile
NEWS
Sources.make
TODO [new file with mode: 0644]
Variables.make
cadenza.ly [deleted file]
clean [new file with mode: 0755]
configure [new file with mode: 0755]
deps/Makefile [new file with mode: 0644]
dimen.tex
hdr/Makefile
hdr/accidental.hh
hdr/bar.hh
hdr/beam.hh
hdr/break.hh
hdr/clef.hh
hdr/clefitem.hh
hdr/debug.hh
hdr/directionalspanner.hh
hdr/getcommand.hh
hdr/grouping.hh
hdr/idealspacing.hh
hdr/identifier.hh
hdr/identparent.hh
hdr/inputcommand.hh
hdr/inputcommands.hh
hdr/inputmusic.hh
hdr/inputscore.hh
hdr/inputstaff.hh
hdr/key.hh
hdr/keyitem.hh
hdr/keyword.hh
hdr/leastsquares.hh
hdr/lexer.hh
hdr/localkeyitem.hh
hdr/lookup.hh
hdr/main.hh
hdr/melodicstaff.hh
hdr/meter.hh
hdr/moment.hh
hdr/notehead.hh
hdr/notename.hh
hdr/offset.hh
hdr/parseconstruct.hh
hdr/proto.hh
hdr/request.hh
hdr/rest.hh
hdr/rhythmstaff.hh
hdr/sccol.hh
hdr/score.hh
hdr/scoreline.hh
hdr/script.hh
hdr/scriptdef.hh
hdr/simplestaff.hh
hdr/simplewalker.hh
hdr/slur.hh
hdr/spanner.hh
hdr/staff.hh
hdr/staffcommands.hh
hdr/staffelem.hh
hdr/staffline.hh
hdr/stcol.hh
hdr/stem.hh
hdr/swalker.hh
hdr/symtable.hh
hdr/textdef.hh
hdr/textitem.hh
hdr/textspanner.hh
hdr/timedescription.hh
init/Makefile
init/symbol.ini [new file with mode: 0644]
init/table_sixteen.ini
input/Makefile [new file with mode: 0644]
input/cadenza.ly [new file with mode: 0644]
input/kortjakje.ly [new file with mode: 0644]
input/maartje.ly [new file with mode: 0644]
input/pavane.ly [new file with mode: 0644]
input/scales.ly [new file with mode: 0644]
input/standchen.lily [new file with mode: 0644]
kortjakje.ly [deleted file]
lilyponddefs.tex
maartje.ly [deleted file]
objects/Makefile [new file with mode: 0644]
pavane.ly [deleted file]
scales.ly [deleted file]
src/Makefile
src/beam.cc
src/debug.cc
src/getcommands.cc
src/grouping.cc
src/inputcommand.cc
src/inputcommands.cc
src/inputscore.cc
src/inputstaff.cc
src/lexer.l
src/lexerinit.cc
src/linespace.cc
src/main.cc
src/mylexer.cc
src/note.cc
src/parser.y
src/pcol.cc
src/pscore.cc
src/request.cc
src/score.cc
src/scores.cc
src/script.cc
src/simpleprint.cc
src/simplestaff.cc
src/simplewalker.cc
src/staff.cc
src/staffcommands.cc
src/staffelem.cc
src/stcol.cc
src/texbeam.cc
src/textspanner.cc
src/timedescription.cc
src/voice.cc
src/warn.cc
standchen.tex [new file with mode: 0644]
symbol.ini [deleted file]
test.tex

index 0c3afc09bd245376c5842f6540d6589c8901f059..12afafc563eb9e1e39f55622c74250f63335d67c 100644 (file)
@@ -2,7 +2,7 @@
 
 My_flex_lexer          1
 yyFlexLexer            1
 
 My_flex_lexer          1
 yyFlexLexer            1
-PCol                   1
+PCol                   0
 Score_column           0
 Ineq_constrained_qp    1
 Spacing_problem        0
 Score_column           0
 Ineq_constrained_qp    1
 Spacing_problem        0
@@ -12,17 +12,17 @@ PScore                      1
 Idealspacing           1
 
 # yydebug
 Idealspacing           1
 
 # yydebug
-Parser                 1
+Parser                 0
 
 # FlexLexer debug
 
 # FlexLexer debug
-Lexer                  1
+Lexer                  0
 
 parse_duration         1
 parse_pitchmod         1
 Col_configuration      1
 
 parse_duration         1
 parse_pitchmod         1
 Col_configuration      1
-Request                        1
+Request                        0
 Note_req               0
 Note_req               0
-Rhythmic_req           1
+Rhythmic_req           0
 Rest_req               1
 delete_identifiers     1
 Command                        1
 Rest_req               1
 delete_identifiers     1
 Command                        1
@@ -33,6 +33,6 @@ Score                 1
 Voice                  0
 Voice_element          0
 Input_cursor           1
 Voice                  0
 Voice_element          0
 Input_cursor           1
-Commands_at            1
+Commands_at            0
 Input_command          0
 Input_command          0
-Time_description       1
\ No newline at end of file
+Time_description       0
\ No newline at end of file
index 995188dec2fe1b6d4ebbb3275a14e1d75a52e78a..460935f859cab1a3a64e64636be460fd3293651c 100644 (file)
@@ -32,9 +32,10 @@ in emacs:
 =head2 DATA MEMBERS
 
        Class::member()
 =head2 DATA MEMBERS
 
        Class::member()
-       Class::member_type_()
+       Type Class::member_type_
+
+the C<type> is a Hungarian notation postfix for $C<Type>$.
 
 
-the C<type> is a Hungarian notation postfix
 
 =head2 COMMENTS
 
 
 =head2 COMMENTS
 
@@ -63,6 +64,7 @@ F<http://www.ZIB-Berlin.DE/VisPar/doc++/doc++.html>
 
 Unfortunately most of the code isn't really documented that good.
 
 
 Unfortunately most of the code isn't really documented that good.
 
+
 =head2 CLASSNAMES (2)
 
 A lot of classes in LilyPond start with 'P', this is to distinguish
 =head2 CLASSNAMES (2)
 
 A lot of classes in LilyPond start with 'P', this is to distinguish
index 5eb21d58ce3c3c1c88e10fc91bf3b1b05f696a64..618bd6f111b234fbfd31c9e919e5820dd42cc0f8 100644 (file)
@@ -1,7 +1,8 @@
-PODS=README.pod CodingStyle.pod lilygut.pod lilyinput.pod
+PODS=README.pod CodingStyle.pod lilygut.pod lilyinput.pod error.pod\
+       faq.pod
 TXTS=$(PODS:.pod=.txt)
 MANS=$(PODS:.pod=.1)
 TXTS=$(PODS:.pod=.txt)
 MANS=$(PODS:.pod=.1)
-DOCFILES=$(PODS) Makefile 
+DISTFILES=$(PODS) Makefile
 
 
 default:
 
 
 default:
@@ -10,7 +11,7 @@ default:
 doc: $(TXTS)
 
 dist:
 doc: $(TXTS)
 
 dist:
-       ln $(DOCFILES) $(DDIR)/Documentation/
+       ln $(DISTFILES) $(DDIR)/$(SUBDIR)
 clean:
        rm -f $(TXTS) $(MANS)
 
 clean:
        rm -f $(TXTS) $(MANS)
 
index 750aa773ea77ec72aff46e4999fe62e1addf1d4b..491c18e06ab9653e69efc4de61c4bff3663805f1 100644 (file)
@@ -9,10 +9,10 @@ Lilypond - a music typesetter
 =head1 DESCRIPTION
 
 LilyPond typesets music. It translates script files (mudela files or
 =head1 DESCRIPTION
 
 LilyPond typesets music. It translates script files (mudela files or
-F<.ly>'s) into TeX input.  Typesetting music is a complex task,
+F<*.ly>'s) into TeX input.  Typesetting music is a complex task,
 whereas the message that printed music conveys is usually a simple
 one. LilyPond is a try at providing a simple interface for setting
 whereas the message that printed music conveys is usually a simple
 one. LilyPond is a try at providing a simple interface for setting
-music LilyPond has these features:
+music. LilyPond has these features:
 
 
 =over 5
 
 
 =over 5
@@ -39,27 +39,25 @@ a different file.
 
 =head1 DESIGN CONSIDERATIONS
 
 
 =head1 DESIGN CONSIDERATIONS
 
-LilyPond was written with some
-considerations in mind:
+LilyPond was written with some considerations in mind:
 
 =over 5
 
 
 =over 5
 
-=item *
-Describing a well-defined language for defining music. We call this
-language (rather arrogantly) The Musical Definition Language (mudela
-for short). LilyPond reads a mudela sourcefile
-and outputs a TeX file.  This musical definition language should:
+=item * Describing a well-defined language for defining music. We call
+this language (rather arrogantly) The Musical Definition Language
+(mudela for short). LilyPond reads a mudela sourcefile and outputs a
+TeX file.  This musical definition language should:
 
 =over 5
 
 
 =over 5
 
-=item 1
+=item 1.
 define the musical message of the writer as unambigiously as
 possible.
 
 define the musical message of the writer as unambigiously as
 possible.
 
-=item 2
+=item 2.
 be easily readable. (as compared to, say, MusixTeX input)
 
 be easily readable. (as compared to, say, MusixTeX input)
 
-=item 3
+=item 3.
 be writable in ASCII (with a simple texteditor).
 
 =back
 be writable in ASCII (with a simple texteditor).
 
 =back
@@ -80,7 +78,7 @@ issue: in a future version, LilyPond might bypass TeX, but at the moment
 TeX is very convenient for producing output.
 
 =item  *
 TeX is very convenient for producing output.
 
 =item  *
- Generate high-quality output. Ideally it should be of a professional
+Generate high-quality output. Ideally it should be of a professional
 quality. We'd like to render Herbert Chlapiks words, "Fine music
 setting is not possible without a knowledgeable printer,"  untrue.
 
 quality. We'd like to render Herbert Chlapiks words, "Fine music
 setting is not possible without a knowledgeable printer,"  untrue.
 
@@ -111,21 +109,25 @@ broken systems.
 
 =over 5
 
 
 =over 5
 
+=item  B<-I,--include>=F<FILE>
+
+add F<FILE> to the search path for input files.
+
 =item  B<-d,--debug>,
 
 debugging. LilyPond will read the file F<.dstreamrc>, which tells for what functions to produce copious debugging output. 
 
 =item  B<-w,--warranty>,
 
 =item  B<-d,--debug>,
 
 debugging. LilyPond will read the file F<.dstreamrc>, which tells for what functions to produce copious debugging output. 
 
 =item  B<-w,--warranty>,
 
-warranty
+Show the warranty with which LilyPond comes. (It comes with B<NO WARRANTY>!)
 
 
-=item  B<-o,--output>,
+=item  B<-o,--output=>F<FILE>,
 
 
-default output file
+Set the default output file to F<FILE>.
 
 =item  B<-h,--help>,
 
 
 =item  B<-h,--help>,
 
-help
+Show a summary of usage
 
 =back
 
 
 =back
 
@@ -146,41 +148,37 @@ Compilation:
 
 =item *
  Unix. Any decent Linux distribution is fine. LilyPond is known to run
 
 =item *
  Unix. Any decent Linux distribution is fine. LilyPond is known to run
-on Linux and Solaris
+on Linux, AIX, Digital Unix and Solaris
 
 =item *
 
 =item *
- GNU C++ v2.7  or better (with libg++ )
+GNU C++ v2.7  or better, with libg++. Version 2.7.2 or better recommended.
 
 =item *
 
 =item *
- GNU make.
+GNU make.
 
 =item *
 
 =item *
- flex (2.5.1 or better)
+flex (2.5.1 or better)
 
 =item *
 
 =item *
-bison/yacc
+Bison or YACC.
 
 
-=item *
-The "flower" library,
-which should be available from the
-same source you got this from.
+=item * The "Flower" library, which should be available from the same
+source you got this from.
 
 
-=item *
-perl
+=item * perl.  The Makefile uses perl for trivial operations, and you
+could tinker with it to use sed or awk.
 
 =back
 
 
 =back
 
-
-The Makefile uses  perl for trivial operations,  and you could  tinker
-with it to use sed or awk.
-
-Operation:
+LilyPond does use a lot of resources. For operation you need the following:
 
 =over 5
 
 
 =over 5
 
-=item *        TeX
+=item *
+TeX
 
 
-=item *        the MusixTeX fonts
+=item *
+The MusixTeX fonts. (I use version T.59)
 
 =back
 
 
 =back
 
@@ -193,6 +191,7 @@ Do:
        cd flower; make; cd ..
        tar zxf lilypond-1.2.13.tar.gz
        cd lilypond-1.2.13
        cd flower; make; cd ..
        tar zxf lilypond-1.2.13.tar.gz
        cd lilypond-1.2.13
+       configure
        make
 
 You might want to edit Variables.make to tailor the compilation flags.
        make
 
 You might want to edit Variables.make to tailor the compilation flags.
@@ -206,16 +205,16 @@ builtin bool
 =item *
 typeof
 
 =item *
 typeof
 
-=item   *
+=item *
 operator <?, operator >?
 
 operator <?, operator >?
 
-=item   *
+=item *
 the new for-scope
 
 =item   *
 class Rational (libg++)
 
 the new for-scope
 
 =item   *
 class Rational (libg++)
 
-=item   *
+=item *
 named return values
 
 =back
 named return values
 
 =back
@@ -231,18 +230,19 @@ Han-Wen Nienhuys <hanwen@stack.nl>, Main author
 Jan Nieuwenhuizen <jan@digicash.com>, bits of FlowerLib, general comments.
 
 =item *
 Jan Nieuwenhuizen <jan@digicash.com>, bits of FlowerLib, general comments.
 
 =item *
-Mats Bengtsson <matsb@s3.kth.se>, bugfixes, testing.
+Mats Bengtsson <matsb@s3.kth.se>, bugfixes, testing, general comments.
 
 =back
 
 Your name could be here! If you want to help, then take a look at the
 
 =back
 
 Your name could be here! If you want to help, then take a look at the
-SMALLISH PROJECTS section of LilyPond. Some do not involve coding C++
+SMALLISH PROJECTS section of in the file F<TODO>. Some do not involve
+coding C++
 
 =head1 EXAMPLES
 
 At this time, LilyPond is only suited for Quick & Dirty jobs (the
 
 =head1 EXAMPLES
 
 At this time, LilyPond is only suited for Quick & Dirty jobs (the
-output quality still is too low). If you're not discouraged; this is
-what I type in my xterm:
+output quality of multistaff material still is too low). If you're not
+discouraged; this is what I type in my xterm:
 
        lilypond someinput.ly
        tex test
 
        lilypond someinput.ly
        tex test
@@ -250,24 +250,25 @@ what I type in my xterm:
 
 This is what the output looks like over here:
 
 
 This is what the output looks like over here:
 
-       hw:~/musix/spacer$ lilypond maartje.ly
-       LilyPond 0.0.17/FlowerLib 1.0.14. Compile: Dec 17 1996, 11:33:54 (g++ 2.7.2)
-       Parsing ... [symbol.ini][maartje.ly]
-       Processing ... Calculating ... Postprocessing ... 
-       output to lelie.uit...
+       hw:~/musix/spacer$ lilypond input/maartje
+       LilyPond 0.0.23/FlowerLib 1.0.20. Compile: Jan 20 1997, 00:51:06 (g++ 2.7.2)
+       Parsing ... [./init//symbol.ini[./init/dutch.ini][./init/script.ini][./init/table_sixteen.ini]][./input/maartje.ly]
+       Processing music ... warning: process_requests(): beamed note should have a stem (t = 5/8)
+       Preprocessing ... Calculating ... Postprocessing ... 
+       output to lelie.out...
 
        hw:~/musix/spacer$ tex test
        This is TeX, Version 3.14159 (C version 6.1)
        (test.tex
        Hyphenation patterns for english, dutch, loaded.
        (lilyponddefs.tex) (lelie.uit) [1] [2] )
 
        hw:~/musix/spacer$ tex test
        This is TeX, Version 3.14159 (C version 6.1)
        (test.tex
        Hyphenation patterns for english, dutch, loaded.
        (lilyponddefs.tex) (lelie.uit) [1] [2] )
-       Output written on test.dvi (2 pages, 8072 bytes).
+       Output written on test.dvi (2 pages, 8420 bytes).
        Transcript written on test.log.
 
        hw:~/musix/spacer$ xdvi test&
        Transcript written on test.log.
 
        hw:~/musix/spacer$ xdvi test&
-       [1] 1468
+       [1] 855
 
 
-Check out kortjakje.ly, it has some comments
+Check out F<kortjakje.ly>, it has some comments
 
 
 =head1 PROBLEMS
 
 
 =head1 PROBLEMS
@@ -275,7 +276,7 @@ Check out kortjakje.ly, it has some comments
 If LilyPond bombs out, then please recompile using B<-g>, and send a
 copy of the input which causes the error and a gdb stacktrace of the
 crash. It also helps if you can print the values of the objects. So if
 If LilyPond bombs out, then please recompile using B<-g>, and send a
 copy of the input which causes the error and a gdb stacktrace of the
 crash. It also helps if you can print the values of the objects. So if
-you trace is
+your trace is
 
        (gdb) backtrace 12
        #0  Interval::operator+= (this=0x11fffec60..)
 
        (gdb) backtrace 12
        #0  Interval::operator+= (this=0x11fffec60..)
@@ -286,7 +287,7 @@ you trace is
          :
 
 Than it would help if you send a dump of the Interval and the Item
          :
 
 Than it would help if you send a dump of the Interval and the Item
-(use: 'print *this' or use LilyPond print() methods).
+(use: C<print *this> or use LilyPond C<print()> methods).
 
 This is a beta version of LilyPond. Please send your helpful comments
 and patches to me (see AUTHORS section)
 
 This is a beta version of LilyPond. Please send your helpful comments
 and patches to me (see AUTHORS section)
@@ -303,9 +304,36 @@ includes files from the directory F<init/>.
 
 =head1 SEE ALSO
 
 
 =head1 SEE ALSO
 
-lilygut(1), lilyinput(1)
+There are some documentation files  in the subdirectory F<Documentation/>,
+among others: lilygut, lilyinput, error, faq, 
 
 
-=head1 REMARKS
+=head1  REMARKS
 
 LilyPond has no connection with the music package RoseGarden, other
 than the names being similar.
 
 LilyPond has no connection with the music package RoseGarden, other
 than the names being similar.
+
+
+=head1 HISTORY
+
+(for a  detailed changelog, see F<NEWS>)
+
+LilyPond's roots lie in MPP, a preprocessor to the rather arcane
+MusiXTeX macro package for TeX. A friend of mine, Jan Nieuwenhuizen
+wrote the first 44 versions (0.01 to 0.44), then his program caught my
+attention, and I was slowly sucked in to the interesting problem of
+easily producing beautifully printed music. I contributed some
+code. We soon realised that MPP's design was too fundamentally broken
+to be repaired. It was decided to rewrite MPP.  We debated a lot about
+the requirements to an inputformat (fall 1995). I sat down and started
+with a parser-first, bottom-up rewrite called mpp95 (which totally
+failed, obviously).
+
+After long and hard thinking, I came up with an algorithm for the
+horizontal spacing of multiple staffs (april 1996) I coded it (and did
+not test it). After starting with this fundamental piece, I slowly
+added the stages which come before spacing, and after a few months, I
+had a first working version, (october 1996).  I announced Patchlevel 0.0.7
+(or 8) to the mutex list after asking some technical details on
+spacing; it was downloaded approximately 4 times.  Then I got the hang
+of it, and in the subsequent two months, I coded until it had
+doubled in size (pl 23).
diff --git a/Documentation/error.pod b/Documentation/error.pod
new file mode 100644 (file)
index 0000000..1888bea
--- /dev/null
@@ -0,0 +1,29 @@
+=head1 NAME
+
+LilyError - LilyPond error messages
+
+=head1 DESCRIPTION
+
+This page documents error messages.
+
+A correctly parsed F<input.ly> does not guarantuee output. A lot
+(most) of the checking is done B<after> parsing (some checks even are
+done after the break calc!); I'm sorry.
+
+The parser's job is to construct appropriate objects. It will B<only>
+detect parse errors.
+
+        can't find slur to end
+
+Eg. with:
+
+       {d g ( } ) g8
+
+The {} part generates two one-note C<Voice>s, the C<g8> another, which
+is translated to start right after the chord.  Slurs are contained
+within voices.  LilyPond can't find a slur which started in this
+C<g8>'s voice. (what should C<{ d( g ( } )g8 )g8 }> look like?  Use
+
+       { \music { d } \music { g()g8 } }
+
+
diff --git a/Documentation/faq.pod b/Documentation/faq.pod
new file mode 100644 (file)
index 0000000..0b841b9
--- /dev/null
@@ -0,0 +1,26 @@
+=head1 NAME
+
+FAQ - LilyPond FAQs
+
+=head1 DESCRIPTION
+
+
+
+Q: I want to enter meterchanges inside the music.
+
+A: You can't; a meterchange is scorewide (well, staffwide in some
+modern music). If allowed inside the music, we get complicated and
+conflicting situations if two voices asked for (possibly different)
+meterchanges.
+
+You can mark certain spots, though: please check out F<cadenza.ly>
+
+
+Q: Why are [] around the notes, and () inbetween?
+
+A: [] designate beams, a note can only be in one beam at the same
+time. () is a slur, which connects notes. You need to be able to specify
+
+       a()a()a
+
+
index 99c58aaee245542d7ea5f8c7185d774d938473b0..d359bb39bd7483a62e23586bab45a3ea82d47b75 100644 (file)
@@ -61,17 +61,10 @@ Not really crystallized; you can use '#' or '%' as line comment
 
 =head2 other
 
 
 =head2 other
 
-A correctly parsed .ly does not guarantuee output. A lot (most) of the
-checking is done B<after> parsing (some checks even are done after the
-break calc!);  I'm sorry.
-
-The parser's job is to construct appropriate objects. It will *only*
-detect parse errors.
-
 LilyPond first reads 'symbol.ini', which contains declarations crucial
 to proper operation of LilyPond (symbol tables, note names).
 
 This language looks a lot like Rayce's which in turn owes a lot to the
 POVRay raytracer. Now, I know, musictypesetting and Raytracing do not
 necessarily require the same input format, but I was just to lazy to
 LilyPond first reads 'symbol.ini', which contains declarations crucial
 to proper operation of LilyPond (symbol tables, note names).
 
 This language looks a lot like Rayce's which in turn owes a lot to the
 POVRay raytracer. Now, I know, musictypesetting and Raytracing do not
 necessarily require the same input format, but I was just to lazy to
-make up a new and/or better input format. Suggestions welcome.
+make up a new and/or better input format. Suggestions appreciated.
diff --git a/Generate.make b/Generate.make
new file mode 100644 (file)
index 0000000..08d53ba
--- /dev/null
@@ -0,0 +1,26 @@
+
+parsheadorig=$(CCDIR)/parser.tab.h
+parsheadnew=$(HEADERDIR)/parser.hh
+
+#
+# take some trouble to avoid overwriting the old y.tab.h
+$(CCDIR)/parser.cc: $(CCDIR)/parser.y
+       $(BISON) -d $<
+       (if diff  $(parsheadorig) $(parsheadnew)>/dev/null; then \
+               echo leaving $(parsheadnew);  \
+       else \
+               mv $(parsheadorig) $(parsheadnew); \
+       fi )
+       mv $(CCDIR)/parser.tab.c $@
+
+$(parsheadnew): $(CCDIR)/parser.cc
+
+$(HEADERDIR)/version.hh: Variables.make make_version
+       make_version $(MAJVER) $(MINVER) $(PATCHLEVEL) "$(CXX) $(CXXVER)" > $@
+
+$(CCDIR)/lexer.cc: $(CCDIR)/lexer.l
+       $(FLEX)  -t $< > $@
+
+
+
+
diff --git a/Initial.make b/Initial.make
new file mode 100644 (file)
index 0000000..1c2d8ab
--- /dev/null
@@ -0,0 +1,12 @@
+include Variables.make
+
+initdefault: $(CCDIR)/parser.cc $(CCDIR)/lexer.cc hdr/version.hh alldeps
+
+include Generate.make
+
+alldeps: #$(ALLDEPS)
+       touch $(DEPDIR)/dummy.dep
+
+$(DEPDIR)/%.dep:  $(CCDIR)/%.cc
+       $(DODEP) $(CXX) -E  $(CXXFLAGS) $^ > /dev/null
+
index 5044425dcdbb399e9853dc453b0fccdbb1c98264..584d0dc60c2db92312a496c58d73839824b9094a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,19 @@
 include Variables.make 
 
 .SUFFIXES:
 include Variables.make 
 
 .SUFFIXES:
-.SUFFIXES: .cc .o .hh .y .l .pod .txt .1
+.SUFFIXES: .cc .o .hh .y .l .pod .txt .1 .dep
 
 $(exe): $(obs)
        $(CXX) -o $@ $^ $(LOADLIBES)
 
 
 $(exe): $(obs)
        $(CXX) -o $@ $^ $(LOADLIBES)
 
+depend:        ; # automatically by gnu make.
 clean:
 clean:
-#      $(MAKE) -C objects clean
        rm -f $(exe) objects/*.o $(DOCDIR)/* core  
        $(MAKE) -C $(CCDIR) clean
        $(MAKE) -C $(HEADERDIR) clean
 
 distclean: clean
        rm -f $(exe) objects/*.o $(DOCDIR)/* core  
        $(MAKE) -C $(CCDIR) clean
        $(MAKE) -C $(HEADERDIR) clean
 
 distclean: clean
-       rm -f  depend version.hh $(gencc) .GENERATE *~
+       rm -f  version.hh $(gencc) .GENERATE *~ deps/*.dep
 
 all: kompijl doc
 
 
 all: kompijl doc
 
@@ -25,62 +25,32 @@ docpp: $(progdocs)
        -mkdir $(DOCDIR)
        doc++ -p -I -d $(DOCDIR) $^
 
        -mkdir $(DOCDIR)
        doc++ -p -I -d $(DOCDIR) $^
 
-depend: Sources.make .GENERATE
-       touch depend
-       $(MAKE) realdepend
+%.o: $(CCDIR)/%.cc
+       $(DODEP)\
+       $(CXX) -c $(CXXFLAGS) $^  -o $(OBJECTDIR)/$@
 
 
 $(OBJECTDIR)/%.o: $(CCDIR)/%.cc
 
 
 $(OBJECTDIR)/%.o: $(CCDIR)/%.cc
-       $(CXX) -c $(CXXFLAGS) $(OUTPUT_OPTION)
+       $(DODEP)\
+       $(CXX) -c $(CXXFLAGS) $(OUTPUT_OPTION) 
 
 
-# hack to create these sources once, before the dependencies
-.GENERATE:
-       touch .GENERATE depend
-       $(MAKE) version.hh
-       $(MAKE) $(gencc)
-       rm -f depend
 
 
-realdepend: $(cc)
-       $(CXX) $(CXXFLAGS) -MM $^ |  perl -ne 's#hdr/proto.hh##; s/^(.+)\.o/'$(OBJECTDIR)'\/\1.o/; print;' > depend
-
-include depend
-
-parsheadorig=$(CCDIR)/parser.tab.h
-parsheadnew=$(HEADERDIR)/parser.hh
-
-#
-# take some trouble to avoid overwriting the old y.tab.h
-$(CCDIR)/parser.cc: parser.y
-       $(BISON) -d $<
-       (if diff -q $(parsheadorig) $(parsheadnew); then \
-               echo leaving $(parsheadnew);  \
-       else \
-               mv $(parsheadorig) $(parsheadnew); \
-       fi )
-       mv $(CCDIR)/parser.tab.c $@
-
-$(parsheadnew): $(CCDIR)/parser.cc
+include $(DEPDIR)/*.dep
 
 version.o: $(obs) version.hh
 
 
 version.o: $(obs) version.hh
 
-hdr/version.hh: Variables.make make_version
-       make_version $(MAJVER) $(MINVER) $(PATCHLEVEL) "$(CXX) $(CXXVER)" > $@
-
-$(CCDIR)/lexer.cc: lexer.l
-       $(FLEX)  -t $< > $@
+include Generate.make
 
 dist:
        -mkdir $(DDIR)
        ln $(DFILES) $(DDIR)/
 
 dist:
        -mkdir $(DDIR)
        ln $(DFILES) $(DDIR)/
-       for a in $(SUBDIRS); \
-       do      mkdir $(DDIR)/$$a; \
-               $(MAKE) -C $$a dist;\
+       for SUBDIR in $(SUBDIRS); \
+       do      mkdir $(DDIR)/$$SUBDIR; \
+               $(MAKE) SUBDIR=$$SUBDIR -C $$SUBDIR dist;\
        done
        tar cfz $(DNAME).tar.gz $(DNAME)/
        rm -rf $(DDIR)/
 
        done
        tar cfz $(DNAME).tar.gz $(DNAME)/
        rm -rf $(DDIR)/
 
-
-
 TAGS:
        $(MAKE) -C $(HEADERDIR) TAGS
        $(MAKE) -C $(CCDIR) TAGS
 TAGS:
        $(MAKE) -C $(HEADERDIR) TAGS
        $(MAKE) -C $(CCDIR) TAGS
diff --git a/NEWS b/NEWS
index a2033eb3665e15ea6a448a9e7fc0a34fc1587eed..93baaa2807e1839743436aa14c94d6c93894134f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,13 +1,30 @@
+
+pl 23:
+       - TODO file inc'd
+       - cadenza mode.
+       - default extension, search path.
+       - error.pod,faq.pod
+       - Markers
+       - configure script
+       - scrapped VPATH
+       - inputfile name in output.
+Internal changes:
+       - Split Input_* parsing steps to enable marking 
+Bugfixes:
+       - unconnected columns
+
+
 pl 22:
        - doco from mpp
        - repeat signs
        - | checks for bar in a voice (Barcheck_req)
 Internal changes:
        - naming (Hungarian notation, svec vs. Array)
 pl 22:
        - doco from mpp
        - repeat signs
        - | checks for bar in a voice (Barcheck_req)
 Internal changes:
        - naming (Hungarian notation, svec vs. Array)
-       - huge memleak fixed; unearthed lots of bugs
-       - bug noteheadswap
        - cleanup PScore, Score
        - removed Staff_commands, plugging commands into Staff_column directly
        - cleanup PScore, Score
        - removed Staff_commands, plugging commands into Staff_column directly
+Bugfixes:
+       - bug noteheadswap
+       - huge memleak fixed; unearthed lots of bugs
 
 pl 21:
        - scripts
 
 pl 21:
        - scripts
index 0be964c269eb5e309252ba96fe578daea28ab1f9..afadfff786cdf877b1c85934ab4d022092784c29 100644 (file)
@@ -1,26 +1,20 @@
 # -*- Makefile-*-
 # sourcefiles to be shipped. Also for dependencies
 
 # -*- Makefile-*-
 # sourcefiles to be shipped. Also for dependencies
 
-hdr=    qlp.hh linespace.hh qlpsolve.hh\
-       pcol.hh proto.hh pstaff.hh  scoreline.hh staffline.hh\
-       const.hh glob.hh molecule.hh  boxes.hh pscore.hh item.hh tex.hh\
-       request.hh voice.hh command.hh staff.hh  linestaff.hh \
-       tstream.hh rhythmstaff.hh\
-       parseconstruct.hh debug.hh globvars.hh keyword.hh\
-       misc.hh score.hh notename.hh lexer.hh symtable.hh\
-       symbol.hh main.hh dimen.hh paper.hh lookup.hh\
-       spanner.hh  beam.hh directionalspanner.hh slur.hh textspanner.hh\
-       sccol.hh stcol.hh staffcommands.hh melodicstaff.hh\
-       identifier.hh simplestaff.hh  stem.hh\
-       notehead.hh leastsquares.hh  rest.hh\
-       swalker.hh bar.hh meter.hh accidental.hh\
-       key.hh keyitem.hh localkeyitem.hh simplewalker.hh\
-       clef.hh clefitem.hh  inputcommands.hh\
-       getcommand.hh inputmusic.hh timedescription.hh\
-       inputscore.hh inputstaff.hh identparent.hh\
-       inputcommand.hh grouping.hh moment.hh offset.hh\
-       staffelem.hh idealspacing.hh break.hh\
-       scriptdef.hh script.hh textdef.hh textitem.hh
+hdr=   accidental.hh bar.hh beam.hh boxes.hh break.hh clef.hh clefitem.hh\
+       command.hh const.hh debug.hh dimen.hh directionalspanner.hh\
+       getcommand.hh glob.hh globvars.hh grouping.hh idealspacing.hh\
+       identifier.hh identparent.hh inputcommand.hh inputcommands.hh\
+       inputmusic.hh inputscore.hh inputstaff.hh item.hh key.hh keyitem.hh\
+       keyword.hh leastsquares.hh lexer.hh linespace.hh linestaff.hh\
+       localkeyitem.hh lookup.hh main.hh melodicstaff.hh meter.hh misc.hh\
+       molecule.hh moment.hh notehead.hh notename.hh offset.hh paper.hh\
+       parseconstruct.hh pcol.hh proto.hh pscore.hh pstaff.hh qlp.hh\
+       qlpsolve.hh request.hh rest.hh rhythmstaff.hh sccol.hh score.hh\
+       scoreline.hh script.hh scriptdef.hh simplestaff.hh simplewalker.hh\
+       slur.hh spanner.hh staff.hh staffcommands.hh staffelem.hh staffline.hh\
+       stcol.hh stem.hh swalker.hh symbol.hh symtable.hh tex.hh textdef.hh\
+       textitem.hh textspanner.hh timedescription.hh tstream.hh voice.hh
 
 mycc=bar.cc beam.cc boxes.cc break.cc calcideal.cc clef.cc\
        clefitem.cc command.cc debug.cc dimen.cc directionalspanner.cc\
 
 mycc=bar.cc beam.cc boxes.cc break.cc calcideal.cc clef.cc\
        clefitem.cc command.cc debug.cc dimen.cc directionalspanner.cc\
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..70e3590
--- /dev/null
+++ b/TODO
@@ -0,0 +1,117 @@
+BUGS
+       * first clef
+
+       * position of key acc's
+
+SEVERELY LACKING:
+
+       * grace notes
+
+INPUTLANGUAGE
+
+       * figured bass?
+
+       * transposition
+
+       * voicegroups.
+
+       * rest name configurable
+
+SMALLISH PROJECTS
+
+       * Lookup::tex_glissando, Lookup::tex_bracket,
+       Lookup::tex_cresc, Lookup::tex_decresc (use texbeam.cc as an
+       example.)
+
+       * Decent TeX titledefs (\tempo, \metron, etc. )
+
+       * command priority into enum
+       
+       * C meter iso 4/4
+
+       * textspanner: dir of beam.
+
+       * script-spacing
+
+       * Brackets
+
+       * space rest.
+
+       * use (char *) iso. String for communication between lexer and parser.
+
+       * As vs. as  notename.
+
+       * configure idealspacing: arithmetic spacing
+
+       * fix symbols in parser.o: `Warning: size of symbol'
+
+       * Viola clef (->jan?!)
+
+DOC
+
+       * beam generation.
+
+       * all errors
+
+FUTURE
+
+       * Text_pstaff/Lyric_staff
+
+       * put requests on barcommands 
+
+       * glissando
+
+       * guitar chord
+
+       * better beamslope calculation
+
+       * implement better breaking algorithm
+
+       * check out linux -> go32 crosscompiler: dos port
+
+       * Implement all requests
+
+       * QLP for beams?
+
+       * stacked slurs.
+
+       * revise calcideal
+
+       * eentje/tweetje
+
+IDEAS
+
+       * itemcolumns
+
+       * check out PMX
+
+       * dependencies: -> implement children more elegantly. Handle
+       spanner with broken deps.
+
+       * use an embedded language: scheme, lisp, S-lang, Perl, ?
+
+       * Broadcasts in Walker of Request and Item.
+
+       * y -dims in internote?
+
+       * hack up mf sources for decent spacing info (and then maybe
+       read TFM directly)
+
+       * merge Atom and Symbol?
+
+       * merge Command/Input_command.
+       
+       * merge common code of Item, Atom/Molecule
+
+       * Spacing_request for manually adjusting spacing
+
+       * Staff_group.
+
+       * SHIT: meters/bars should be aligned, which is difficult if
+       we get different keychanges in different staffs.
+
+       * Integrating (objectiveC) MusicKit with LilyPond
+       
+       * MusixTeX output possible?
+
+       * PostScript output (esp. Beams, Slurs, etc)
index eea032df7fbcb6c78adce67fe626d661646daa05..768dcc5adb9e5e0d79aac375eb7d87ebbd6005b5 100644 (file)
@@ -7,7 +7,7 @@ OPTIFLAG=-DNDEBUG -DNPRINT -O2
 DEBUGFLAG=-g
 
 # turn off -pipe if linker doesn't support it
 DEBUGFLAG=-g
 
 # turn off -pipe if linker doesn't support it
-EXTRACXXFLAGS=-pipe -Wall -W   -Wmissing-prototypes 
+#EXTRACXXFLAGS=-pipe -Wall -W   -Wmissing-prototypes 
 
 #
 # -lefence = ElectricFence.
 
 #
 # -lefence = ElectricFence.
@@ -37,12 +37,12 @@ endif
 # version info
 MAJVER=0
 MINVER=0
 # version info
 MAJVER=0
 MINVER=0
-PATCHLEVEL=22
+PATCHLEVEL=23
 VERSION=$(MAJVER).$(MINVER).$(PATCHLEVEL)
 CXXVER=`$(CXX) --version`
 
 #flower version
 VERSION=$(MAJVER).$(MINVER).$(PATCHLEVEL)
 CXXVER=`$(CXX) --version`
 
 #flower version
-NEEDEFLOWERVER=1.0.17
+NEEDEFLOWERVER=1.0.20
 
 # directories
 TOPDIR  := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
 
 # directories
 TOPDIR  := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
@@ -50,11 +50,14 @@ OBJECTDIR=objects
 HEADERDIR=hdr
 CCDIR=src
 INITDIR=init
 HEADERDIR=hdr
 CCDIR=src
 INITDIR=init
-vpath %.cc $(CCDIR)
-vpath %.hh $(HEADERDIR)
-vpath %.y $(CCDIR)
-vpath %.l $(CCDIR)
-vpath %.o $(OBJECTDIR)
+DEPDIR=deps
+INPUTDIR=input
+#vpath %.cc $(CCDIR)
+#vpath %.hh $(HEADERDIR)
+#vpath %.y $(CCDIR)
+#vpath %.l $(CCDIR)
+#vpath %.o $(OBJECTDIR)
+#vpath %.dep $(DEPDIR)
 
 # 
 #
 
 # 
 #
@@ -62,8 +65,10 @@ include Sources.make
 progdocs=$(hdr) $(mycc)
 gencc=parser.cc lexer.cc
 cc=$(mycc) $(gencc)
 progdocs=$(hdr) $(mycc)
 gencc=parser.cc lexer.cc
 cc=$(mycc) $(gencc)
-obs=$(cc:.cc=.o) 
 
 
+CCSOURCE=$(addprefix $(CCDIR)/, $(cc))
+obs=$(addprefix $(OBJECTDIR)/,$(cc:.cc=.o)) 
+ALLDEPS=$(addprefix $(DEPDIR)/,$(cc:.cc=.dep))
 
 #dist
 .EXPORT_ALL_VARIABLES:
 
 #dist
 .EXPORT_ALL_VARIABLES:
@@ -75,12 +80,12 @@ DNAME=$(PACKAGENAME)-$(VERSION)
 
 # distribution files.
 othersrc=lexer.l parser.y
 
 # distribution files.
 othersrc=lexer.l parser.y
-SCRIPTS=make_version make_patch genheader
-IFILES=dimen.tex symbol.ini kortjakje.ly pavane.ly  maartje.ly\
-       lilyponddefs.tex test.tex .dstreamrc cadenza.ly scales.ly\
-       titledefs.tex pavane.tex
-OFILES=Makefile Variables.make Sources.make COPYING README NEWS
-DFILES=$(OFILES) $(IFILES) $(SCRIPTS)
+SCRIPTS=make_version make_patch genheader clean
+MAKFILES=Makefile Variables.make Sources.make Initial.make Generate.make \
+       configure
+OFILES=COPYING README NEWS TODO
+IFILES= standchen.tex titledefs.tex pavane.tex lilyponddefs.tex test.tex .dstreamrc dimen.tex 
+DFILES=$(MAKFILES) $(OFILES) $(IFILES) $(SCRIPTS)
 
 #compiling
 LOADLIBES=-L$(FLOWERDIR) -lflower $(EXTRALIB)
 
 #compiling
 LOADLIBES=-L$(FLOWERDIR) -lflower $(EXTRALIB)
@@ -92,4 +97,9 @@ BISON=bison
 exe=$(PACKAGENAME)
 OUTPUT_OPTION=$< -o $@
 DDIR=$(TOPDIR)/$(DNAME)
 exe=$(PACKAGENAME)
 OUTPUT_OPTION=$< -o $@
 DDIR=$(TOPDIR)/$(DNAME)
-SUBDIRS=Documentation $(OBJECTDIR) $(CCDIR) $(HEADERDIR) $(INITDIR)
+SUBDIRS=Documentation $(OBJECTDIR) $(CCDIR) $(HEADERDIR) $(INITDIR) $(DEPDIR) \
+       $(INPUTDIR)
+
+depfile=deps/$(subst .o,.dep,$(notdir $@)) 
+DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(OBJECTDIR)/$(notdir $@)"
+
diff --git a/cadenza.ly b/cadenza.ly
deleted file mode 100644 (file)
index b61616c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-%
-% Cadenza to Mozart Horn/3
-%
-
-cad = music { $
-       \duration { 8}
-       \textstyle "italic" 
-       'c4._"f" g8
-       \textstyle  "roman" 
-                                       ['e^"accel" ()'d 'c b]
-       [b()'c] g-\fermata c [c_"rubato" e g 'c]
-       \octave{'}
-       e4. e [g ()f_"rit" e d]
-
-       \duration{16}
-       dis4()e4 r8 [c d] [e f g gis]
-       \duration{4}
-       a-> `f()`e g
-       f-> `d()`cis e
-       \duration{8}    
-       d4^\fermata r8 `a [`b cis]
-       \duration{16}
-       [d cis d e]
-       f4()[f e d c] `b4
-       \octave{} \plet{2/3} ['d8 'c8 a8] \plet{1/1} % triplet!
-       g2 [g c e g] ['c e g 'c]\octave{'} 
-       [e `g c e] g4^\fermata %()% BUG!
-       [g8.(_"a tempo" e g8. )e]
-       a4. g8 [f8 e8 d8 c8]
-       `g2 d2^"tr"
-       c4 $}
-
-score {
-       staff { melodic
-               music { cad }
-       }
-       commands { meter 4 4 skip 13:0 }
-}
diff --git a/clean b/clean
new file mode 100755 (executable)
index 0000000..34eb6c9
--- /dev/null
+++ b/clean
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# unclobber current dir.
+rm -v *.aux *.log `grep -li "^% Creator: LilyPond" *.out` *.orig *~
\ No newline at end of file
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..37d5742
--- /dev/null
+++ b/configure
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+PREFIX="."
+echo '#define LIBDIR "'$PREFIX'/"'> hdr/config.hh
+
+touch depend
+make -f Initial.make
\ No newline at end of file
diff --git a/deps/Makefile b/deps/Makefile
new file mode 100644 (file)
index 0000000..0d303b3
--- /dev/null
@@ -0,0 +1,4 @@
+DISTFILES=Makefile
+dist:
+       ln $(DISTFILES) $(DDIR)/$(SUBDIR)
+       
\ No newline at end of file
index b8a062179a544cac64fb36edb482de072fbf3865..e53263181d0802276d372c8fb7ed561d868e1fba 100644 (file)
--- a/dimen.tex
+++ b/dimen.tex
@@ -1,6 +1,6 @@
-\font\musicfnt=musix20
+\font\musicfont=musixsps
 \font\slurfont=xslu16
 \font\slurfont=xslu16
-\def\thefont{\slurfont}
+\def\thefont{\musicfont}
 
 \def\mb#1{{\thefont\char#1}}
 
 
 \def\mb#1{{\thefont\char#1}}
 
index 29358a5d9d857b374f5d97c60595bffa72263241..2ee609e881c75f080c0a05588b4705a7188a2b6c 100644 (file)
@@ -1,8 +1,9 @@
 default:
        $(MAKE) -C ..
 default:
        $(MAKE) -C ..
-
+DISTFILES=Makefile $(hdr)
 dist:
 dist:
-       ln Makefile $(hdr) $(DDIR)/$(HEADERDIR)
+       ln $(DISTFILES) $(DDIR)/$(SUBDIR)
+
 
 TAGS: $(hdr) 
        etags -CT $(hdr) 
 
 TAGS: $(hdr) 
        etags -CT $(hdr) 
index 8c601863ae82c00ab0565261bf6c20d9b414e77d..a1c5d80d30bb19267acbee01e7afdb410c12b550 100644 (file)
@@ -1,7 +1,7 @@
 /*
   accidental.hh -- part of LilyPond
 
 /*
   accidental.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef ACCIDENTAL_HH
 */
 
 #ifndef ACCIDENTAL_HH
index 634940121e82e853c18568b5b07cf218d00a465f..2a360b0d73a7e5646713903f6e60d3f92b624b68 100644 (file)
@@ -1,7 +1,7 @@
 /*
   bar.hh -- part of LilyPond
 
 /*
   bar.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef BAR_HH
 */
 
 #ifndef BAR_HH
index 912f47dc72005f28867a1b2181b45825e064a294..96c65b12b0733f0d6ac4271b63d7df60679afcda 100644 (file)
@@ -1,7 +1,7 @@
 /*
   beam.hh -- part of LilyPond
 
 /*
   beam.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef BEAM_HH
 */
 
 #ifndef BEAM_HH
index 4475e7d1730e699c9e8a67eeaaae85c7407295fc..2f471fd4fd1d2d5b656d4170212aca3916d5dca3 100644 (file)
@@ -1,7 +1,7 @@
 /*
   break.hh -- part of LilyPond
 
 /*
   break.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef BREAK_HH
 */
 
 #ifndef BREAK_HH
index 3b61ca3bc76f739e5fc92752b32ec0e01b2842c2..2c56cb497e73a21fe1a4275cc050703fd3391e5e 100644 (file)
@@ -1,7 +1,7 @@
 /*
   clef.hh -- part of LilyPond
 
 /*
   clef.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef CLEF_HH
 */
 
 #ifndef CLEF_HH
index 525aa0aeb042c24a253fcc72868fb2be275b5038..ccedc4e9a7684145544e8f2d529ad8d2a4fc6d67 100644 (file)
@@ -2,7 +2,7 @@
 /*
   clefitem.hh -- part of LilyPond
 
 /*
   clefitem.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef CLEFITEM_HH
 */
 
 #ifndef CLEFITEM_HH
index 2f5c4ba47e48a65680f88101323c76d2b4d2bb4e..0e35476b39d73b586fe448182990398f38cc8b0b 100644 (file)
@@ -1,12 +1,15 @@
 #ifndef DEBUG_HH
 #define DEBUG_HH
 #ifndef DEBUG_HH
 #define DEBUG_HH
+
 #include <assert.h>
 #include <iostream.h>
 #include "dstream.hh"
 #include "real.hh"
 #include <assert.h>
 #include <iostream.h>
 #include "dstream.hh"
 #include "real.hh"
+#include "proto.hh"
 
 void error(String s);          // errors
 
 void error(String s);          // errors
-
+void error_t(const String& s, Time_description const &  t_tdes);
+void error_t(String const &s, const Moment &when);
 // warnings
 void warning(String s);
 #define WARN warnout << "warning: "<<__FUNCTION__ << "(): "
 // warnings
 void warning(String s);
 #define WARN warnout << "warning: "<<__FUNCTION__ << "(): "
index 3c734b3474afb79b85aa9000ad09dbe9a2cd48c7..f0e4716432acffd22637aa3c0f6f63a4d105a506 100644 (file)
@@ -1,7 +1,7 @@
 /*
   directionalspanner.hh -- part of LilyPond
 
 /*
   directionalspanner.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef DIRECTIONALSPANNER_HH
 */
 
 #ifndef DIRECTIONALSPANNER_HH
index e2ce456cf79acec76d25fecd674b6309ca2f9e40..77123e85dcc1b35562034ccfc5b225b196ae27ce 100644 (file)
@@ -1,7 +1,7 @@
 /*
   getcommand.hh -- part of LilyPond
 
 /*
   getcommand.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef GETCOMMAND_HH
 */
 
 #ifndef GETCOMMAND_HH
index 6e13f3217e54bfa29938e47d0e273fa96359dc60..6f89456d8bd5db90d6b93ab027179d9191c95ee3 100644 (file)
@@ -1,7 +1,7 @@
 /*
   grouping.hh -- part of LilyPond
 
 /*
   grouping.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef GROUPING_HH
 */
 
 #ifndef GROUPING_HH
@@ -44,6 +44,9 @@ struct Rhythmic_grouping {
 
     Array<int> generate_beams(Array<int>, int&);
 
 
     Array<int> generate_beams(Array<int>, int&);
 
+    /// multiply self to span #i#
+    void extend(MInterval i);
+    void translate(Moment);
 private:
     void init();
     void junk();
 private:
     void init();
     void junk();
index 801818e7a33863ae33d5ff520e922605b546045e..05f58ba9c8675a01b06e52037c0b74a6ea17eb43 100644 (file)
@@ -1,7 +1,7 @@
 /*
   idealspacing.hh -- part of LilyPond
 
 /*
   idealspacing.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef IDEALSPACING_HH
 */
 
 #ifndef IDEALSPACING_HH
index f634e216dc692d377a6d7f7bc200b09d08e98efc..04bee62255fe6053d8c967d6ee51e61db15e6f45 100644 (file)
@@ -2,7 +2,7 @@
 /*
   identifier.hh -- part of LilyPond
 
 /*
   identifier.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef IDENTIFIER_HH
 */
 
 #ifndef IDENTIFIER_HH
index f4e1705d4152e24466485eeaf8d02157a65acc16..c74be844c878000164f7ba4d5cf29e1101c22f3e 100644 (file)
@@ -1,7 +1,7 @@
 /*
   identparent.hh -- part of LilyPond
 
 /*
   identparent.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef IDENTPARENT_HH
 */
 
 #ifndef IDENTPARENT_HH
index 61f968ee53cbea66cc8f35781fffefab9749d2d0..2654d06b7c8470046d133c2c82d9598d7f3d28b0 100644 (file)
@@ -1,7 +1,7 @@
 /*
   inputcommand.hh -- part of LilyPond
 
 /*
   inputcommand.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef INPUTCOMMAND_HH
 */
 
 #ifndef INPUTCOMMAND_HH
@@ -19,6 +19,7 @@ struct Input_command {
 
     operator Command();
 };
 
     operator Command();
 };
+Input_command*get_cadenza_toggle(int i);
 Input_command *get_meterchange_command( int,int);
 Input_command *get_key_interpret_command(Array<int >);
 Input_command *get_clef_interpret_command(String w);
 Input_command *get_meterchange_command( int,int);
 Input_command *get_key_interpret_command(Array<int >);
 Input_command *get_clef_interpret_command(String w);
@@ -28,6 +29,7 @@ Input_command *get_skip_command(int,Moment);
 Input_command *get_grouping_command(Array<int>);
 Input_command *get_bar_command(String);
 Input_command *get_newmeasure_command();
 Input_command *get_grouping_command(Array<int>);
 Input_command *get_bar_command(String);
 Input_command *get_newmeasure_command();
+Input_command *get_goto_command(String);
 Array<int> get_default_grouping(int count);
 #endif // INPUTCOMMAND_HH
 
 Array<int> get_default_grouping(int count);
 #endif // INPUTCOMMAND_HH
 
index 20e6a1cb06ecf8cbc519c4ae0f3b13a8e67dd05e..6457c1c686f04aac4f3d594ceff6ba7c3c1abe8b 100644 (file)
@@ -1,7 +1,7 @@
 /*
   inputcommands.hh -- part of LilyPond
 
 /*
   inputcommands.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef INPUTCOMMANDS_HH
 */
 
 #ifndef INPUTCOMMANDS_HH
@@ -19,7 +19,7 @@ struct Commands_at : public IPointerList<Input_command*> {
     /****************/
 
     Moment when();
     /****************/
 
     Moment when();
-    void     parse(Staff_commands_at*);
+    void parse(Staff_commands_at*);
     void print() const;
     Moment barleft();
     void add(Input_command*);
     void print() const;
     Moment barleft();
     void add(Input_command*);
@@ -45,7 +45,7 @@ struct Input_commands : public IPointerList<Commands_at*> {
     /****************/
 
     void find_moment(Moment);
     /****************/
 
     void find_moment(Moment);
-    void add(Input_command c);
+    void add(Input_command c,Assoc<String,Moment> &marks_assoc_r);
     void do_skip(int bars, Moment wholes);
         
     Input_commands();
     void do_skip(int bars, Moment wholes);
         
     Input_commands();
index 5b6da2968aa7538bceae3d7e56b4c095021fe3bc..4ef8eebb464e386f1e39572db671a9e9689aa3ea 100644 (file)
@@ -1,7 +1,7 @@
 /*
   inputmusic.hh -- part of LilyPond
 
 /*
   inputmusic.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef INPUTMUSIC_HH
 */
 
 #ifndef INPUTMUSIC_HH
index 39e6a367fdce4f23f0db53067b17ca7b7e8cc74b..973d4814dab5720151249cc7f72ae9f1254121ed 100644 (file)
@@ -3,10 +3,14 @@
 #include "varray.hh"
 #include "proto.hh"
 #include "plist.hh"
 #include "varray.hh"
 #include "proto.hh"
 #include "plist.hh"
+#include "string.hh"
 
 
 /// the total music def of one movement
 struct Input_score {
 
 
 /// the total music def of one movement
 struct Input_score {
+    /// defined where?    
+    String define_spot_str_;
+    
     /// paper_, staffs_ and commands_ form the problem definition.
     Paperdef *paper_;
     IPointerList<Input_staff*> staffs_;
     /// paper_, staffs_ and commands_ form the problem definition.
     Paperdef *paper_;
     IPointerList<Input_staff*> staffs_;
index 6fac2046434e417069f64f352c352a44ffc698b6..01062de99cf76535ce94238142b6573786033413 100644 (file)
@@ -1,7 +1,7 @@
 /*
   inputstaff.hh -- part of LilyPond
 
 /*
   inputstaff.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef INPUTSTAFF_HH
 */
 
 #ifndef INPUTSTAFF_HH
@@ -13,6 +13,9 @@
 #include "proto.hh"
 
 struct Input_staff {
 #include "proto.hh"
 
 struct Input_staff {
+    
+    /// defined where?    
+    String define_spot_str_;
     String type;
     IPointerList<Input_command*> commands_;
     IPointerList<Input_music*> music_;
     String type;
     IPointerList<Input_command*> commands_;
     IPointerList<Input_music*> music_;
@@ -20,10 +23,10 @@ struct Input_staff {
     /****************/
 
     void add(Input_music*m);
     /****************/
 
     void add(Input_music*m);
-    Input_staff(Input_staff&);
+    Input_staff(Input_staff const&);
     Input_staff(String);
     void add(Array<Input_command*> &s);
     Input_staff(String);
     void add(Array<Input_command*> &s);
-    Staff* parse(PointerList<Input_command*>, Score*);
+    Staff* parse(Score*);
     void print() const;
 };
 
     void print() const;
 };
 
index 791c0861cf880e69d030b540f382bca48ecde5ab..a0ea3e833d4ea58a2757a4c5f20357c29cd4fe03 100644 (file)
@@ -1,7 +1,7 @@
 /*
   key.hh -- part of LilyPond
 
 /*
   key.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef KEY_HH
 */
 
 #ifndef KEY_HH
index 43ce9ca0a7fa7bf56c3cf20b40329233fdd08b7d..72f9680e1a6a3440a48a53a858dc2a519d1c841f 100644 (file)
@@ -1,7 +1,7 @@
 /*
   keyitem.hh -- part of LilyPond
 
 /*
   keyitem.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef KEYITEM_HH
 */
 
 #ifndef KEYITEM_HH
index b081df3a6294e759c5f29d7764dd1a98499800fa..152d9dc15d8a178b61fb0dac55ace5ec53df3c57 100644 (file)
@@ -1,7 +1,7 @@
 /*
   keyword.hh -- part of LilyPond
 
 /*
   keyword.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef KEYWORD_HH
 */
 
 #ifndef KEYWORD_HH
index e7368e398bfacbaedbb12e17eab66677c6dd3955..4d3931ee945888cdc0c3ca74e32a2d27657eda47 100644 (file)
@@ -1,7 +1,7 @@
 /*
   leastsquare.hh -- part of LilyPond
 
 /*
   leastsquare.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef LEASTSQUARE_HH
 */
 
 #ifndef LEASTSQUARE_HH
index 767a12c95efdb18db69d31defb73cd76c34044e5..7cbbbe37475397003f976c3c75efe68f3637f80b 100644 (file)
@@ -36,6 +36,7 @@ struct My_flex_lexer : yyFlexLexer {
     int lookup_keyword(String);
     void lookup_notename(int &large, int &small, String s);
     void LexerError(const char *);
     int lookup_keyword(String);
     void lookup_notename(int &large, int &small, String s);
     void LexerError(const char *);
+    String spot() const;
     Identifier*lookup_identifier(String s);
     My_flex_lexer();
     void add_identifier(Identifier*i);
     Identifier*lookup_identifier(String s);
     My_flex_lexer();
     void add_identifier(Identifier*i);
index 6276977b776f1ccab8427d6a7bd60ebeee70b8e8..c8cca9d7c10e5b6e28164b02231b655782476c57 100644 (file)
@@ -1,7 +1,7 @@
 /*
   localkeyitem.hh -- part of LilyPond
 
 /*
   localkeyitem.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef LOCALKEYITEM_HH
 */
 
 #ifndef LOCALKEYITEM_HH
index f947a7d734f7ac9a4f8cee3aafd5c8c2945e6a52..ac479b8549b3db534f899c04de87956b7fc1514e 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
-  lilypond, (c) 1996 Han-Wen Nienhuys
+  lilypond, (c) 1996,97 Han-Wen Nienhuys
 */
 #ifndef LOOKUPSYMS_HH
 #define LOOKUPSYMS_HH
 */
 #ifndef LOOKUPSYMS_HH
 #define LOOKUPSYMS_HH
index f5a795a951998b221851004274654e7e5244c304..e73ba2390b338525345ac2fac8d158d00fe0109b 100644 (file)
@@ -7,6 +7,7 @@ void set_debug(bool);
 void do_scores();
 void add_score(Input_score * s);
 void set_default_output(String s);
 void do_scores();
 void add_score(Input_score * s);
 void set_default_output(String s);
+String find_file(String);
 const char *get_version();
 
 #endif
 const char *get_version();
 
 #endif
index db7dd88b8311bea4277519d242dc4e26281ce9a3..e3a5ff1f6184a3bfcaac76d4d638b00b486ce0a3 100644 (file)
@@ -1,7 +1,7 @@
 /*
   rhythmstaf.hh -- part of LilyPond
 
 /*
   rhythmstaf.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef MELODICSTAFF_HH
 */
 
 #ifndef MELODICSTAFF_HH
index ca364cf59c47f535b5491c10d0760180c770b61b..11166232add4416834174ad2200ff04eae7717f8 100644 (file)
@@ -1,7 +1,7 @@
 /*
   meter.hh -- part of LilyPond
 
 /*
   meter.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef METER_HH
 */
 
 #ifndef METER_HH
index 1f34eae5abf04bdd47166a2fc7d49075cc8873f2..0037d940784dae5bb5d6d7c6a49d87fad2e26c9c 100644 (file)
@@ -8,7 +8,7 @@
 #include "rational.hh"
 class String;
 typedef Rational Moment;
 #include "rational.hh"
 class String;
 typedef Rational Moment;
-void error_t(String const &s, Moment when);
+
 
 #endif // 
 
 
 #endif // 
 
index 860d16280d39d004c08dfc337ee2421e4701e249..18612b06c666d33c07ad410dd13a303e126dfb08 100644 (file)
@@ -1,7 +1,7 @@
 /*
   notehead.hh -- part of LilyPond
 
 /*
   notehead.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef NOTEHEAD_HH
 */
 
 #ifndef NOTEHEAD_HH
index fc134c926f6227b19927aab1f0c9173ec90a2b91..b533f4d3604b86829bfdfede8f37c7061eee466b 100644 (file)
@@ -1,7 +1,7 @@
 /*
   notename.hh -- part of LilyPond
 
 /*
   notename.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef NOTENAME_HH
 */
 
 #ifndef NOTENAME_HH
index b1867007fa388a4c4beb1875de87a8635a6dcf51..e0b62bba7616716e14cf7e21191773387cbb5021 100644 (file)
@@ -1,7 +1,7 @@
 /*
   offset.hh -- part of LilyPond
 
 /*
   offset.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef OFFSET_HH
 */
 
 #ifndef OFFSET_HH
index 8afb32d94bf1ae6854dea50f1ed7e1ac9c644a4e..6a22127a384035641ceea8ae14e0e7e39372208d 100644 (file)
@@ -1,13 +1,15 @@
 /*
   parseconstruct.hh -- part of LilyPond
 
 /*
   parseconstruct.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef PARSECONSTRUCT_HH
 #define PARSECONSTRUCT_HH
 
 #include "proto.hh"
 */
 
 #ifndef PARSECONSTRUCT_HH
 #define PARSECONSTRUCT_HH
 
 #include "proto.hh"
+
+Voice_element*get_mark_element(String);
 void set_default_duration(int *);
 void get_default_duration(int *);
 void set_default_octave(String);
 void set_default_duration(int *);
 void get_default_duration(int *);
 void set_default_octave(String);
index ac215970feaaee45908b813bc0be418b8d815462..8be03e72f70e9ae0c615827ed8b6012f9be0c1ae 100644 (file)
@@ -2,7 +2,7 @@
 /*
   proto.hh -- part of LilyPond
 
 /*
   proto.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef PROTO_HH
 */
 
 #ifndef PROTO_HH
@@ -42,8 +42,11 @@ struct Local_key;
 struct Local_key_item;
 struct Lookup;
 struct Lyric_req;
 struct Local_key_item;
 struct Lookup;
 struct Lyric_req;
+struct Mark_req;
 struct Mixed_qp;
 struct Molecule;
 struct Mixed_qp;
 struct Molecule;
+struct Rational;
+typedef Rational Moment;
 struct Note_req;
 struct Notehead;
 struct Offset;
 struct Note_req;
 struct Notehead;
 struct Offset;
index a6ae0fbc88aa30b0066a06b8a912d91a5ced6350..12382d0bf7b317ea68f1283124a2f1d963c3a93f 100644 (file)
@@ -32,6 +32,7 @@ struct Request {
     virtual Slur_req *slur() { return 0 ; }
     virtual Rhythmic_req*rhythmic() { return 0; }
     virtual Melodic_req *melodic() { return 0; }
     virtual Slur_req *slur() { return 0 ; }
     virtual Rhythmic_req*rhythmic() { return 0; }
     virtual Melodic_req *melodic() { return 0; }
+    virtual Mark_req * mark() { return 0; }
 };
 
 /**
 };
 
 /**
@@ -107,6 +108,7 @@ struct Stem_req : Request {
     virtual Stem_req *stem() {return this;}
     Stem_req(int s) { stem_number = s; }
     Request*clone() const;
     virtual Stem_req *stem() {return this;}
     Stem_req(int s) { stem_number = s; }
     Request*clone() const;
+    virtual void print() const;
 };
 
 /// requests to start or stop something.
 };
 
 /// requests to start or stop something.
@@ -178,6 +180,16 @@ struct Text_req : Request {
     Text_req(Text_req const&);
 };
 
     Text_req(Text_req const&);
 };
 
+/// designate this spot with a name.
+struct Mark_req : Request {
+    String mark_str_;
+    /****************/
+    Mark_req(String);
+    Mark_req* mark() { return this; }
+    virtual void print() const;
+    Request *clone() const;
+};
+
 
 #if 0
 
 
 #if 0
 
@@ -214,12 +226,12 @@ Start/stop a bracket at this note. if #nplet# is set, the staff will
 try to put an appropriate number over the bracket
 */
 
 try to put an appropriate number over the bracket
 */
 
-struct Subtle_request {
+struct Subtle_req {
     Moment subtime;
 };
 
 /// helper in the hierarchy
     Moment subtime;
 };
 
 /// helper in the hierarchy
-struct Dynamic:Subtle_request {
+struct Dynamic:Subtle_req {
 
 };
 /** Each dynamic is bound to one note ( a crescendo spanning multiple
 
 };
 /** Each dynamic is bound to one note ( a crescendo spanning multiple
@@ -249,7 +261,7 @@ struct Absdynamic_req : Request, Dynamic {
     Loudness loudness;
 };
 
     Loudness loudness;
 };
 
-struct Grace_req : Subtle_request {
+struct Grace_req : Subtle_req {
     
 };
 
     
 };
 
@@ -264,5 +276,15 @@ struct Grace_note : Melodic_req {
 struct Grace_notes {
     
 };
 struct Grace_notes {
     
 };
+
+struct Spacing_req {
+    Moment next;
+    Real distance;
+};
+
+struct Glissando_req : Span_req {
+    
+};
+
 #endif
 #endif
 #endif
 #endif
index 2280611be8e4c5159907478edc4530534472d564..e13c540212ae78e5f2cc385ce6d3b3715db26c00 100644 (file)
@@ -1,7 +1,7 @@
 /*
   rest.hh -- part of LilyPond
 
 /*
   rest.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef REST_HH
 */
 
 #ifndef REST_HH
index 978594dcd38230f868a0b1146fc5e1890ac03d32..741be45e787c3e55fe0354e6262616b6925d849e 100644 (file)
@@ -1,7 +1,7 @@
 /*
   rhythmstaf.hh -- part of LilyPond
 
 /*
   rhythmstaf.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef RHYTHMSTAF_HH
 */
 
 #ifndef RHYTHMSTAF_HH
index 615376309c77f256ee6792814d983dd5ffd0239d..75f1bcd89b43683fca64f5236ed51f20bea6a106 100644 (file)
@@ -1,7 +1,7 @@
 /*
   sccol.hh -- part of LilyPond
 
 /*
   sccol.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef SCCOL_HH
 */
 
 #ifndef SCCOL_HH
index f58367c30ecfad4b5ff229590ec7c4f440cc0a75..152e578493ca4c2ac12b7970f44eece2316a6931 100644 (file)
@@ -4,6 +4,7 @@
 #include "proto.hh"
 #include "plist.hh"
 #include "moment.hh"
 #include "proto.hh"
 #include "plist.hh"
 #include "moment.hh"
+#include "assoc.hh"
 
 /// the total music def of one movement
 struct Score {
 
 /// the total music def of one movement
 struct Score {
@@ -15,13 +16,17 @@ struct Score {
     IPointerList<Score_column*> cols_;
     PScore *pscore_p_;
 
     IPointerList<Score_column*> cols_;
     PScore *pscore_p_;
 
+    String define_spot_str_;
+    
+    Assoc<String, Moment> markers_assoc_;
     /****************************************************************/
 
     /// construction
     Score(Paperdef*);
     ~Score();    
     /****************************************************************/
 
     /// construction
     Score(Paperdef*);
     ~Score();    
-    void add(Staff*);        
+    void add(Staff*);
 
 
+    void add_marks(Array<String>, Array<Moment>);
     /// do everything except outputting to file
     void process();
     
     /// do everything except outputting to file
     void process();
     
@@ -37,9 +42,10 @@ struct Score {
     PCursor<Score_column *> find_col(Moment,bool);
     /// when does the last *musical* element finish?
     Moment last() const;
     PCursor<Score_column *> find_col(Moment,bool);
     /// when does the last *musical* element finish?
     Moment last() const;
-    
+
 private:
     Score(Score const&){}
 private:
     Score(Score const&){}
+    ///
     void do_cols();
     /**
       make the pcol_l_ fields of each Score_column point to the correct PCol,
     void do_cols();
     /**
       make the pcol_l_ fields of each Score_column point to the correct PCol,
index 233496932a9926f27e78df3506681b3cfc038eaf..26e1285c447b42e0badfb6536e102f00cb5c7b85 100644 (file)
@@ -1,7 +1,7 @@
 /*
   scoreline.hh -- part of LilyPond
 
 /*
   scoreline.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef SCORELINE_HH
 */
 
 #ifndef SCORELINE_HH
index 01dd75c53d50258fcb21edcad6d42b063096e639..7b6cf37b247a731520a2297ec1a02dc5cd6314e2 100644 (file)
@@ -1,7 +1,7 @@
 /*
   script.hh -- part of LilyPond
 
 /*
   script.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef SCRIPT_HH
 */
 
 #ifndef SCRIPT_HH
index ea5793e21cf7fe340bf714769b9efdd695f81b05..fb1dc4317f07833fe0e0ad715da4b9ec7c78e617 100644 (file)
@@ -1,7 +1,7 @@
 /*
   scriptdef.hh -- part of LilyPond
 
 /*
   scriptdef.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef SCRIPTDEF_HH
 */
 
 #ifndef SCRIPTDEF_HH
index f074dc169d6541029f0a1915f257355a0a548552..bdd1f061361e9793bb0a0c40a71009a5485f08d5 100644 (file)
@@ -1,7 +1,7 @@
 /*
   simplestaff.hh -- part of LilyPond
 
 /*
   simplestaff.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef SIMPLESTAFF_HH
 */
 
 #ifndef SIMPLESTAFF_HH
@@ -32,7 +32,7 @@ struct Simple_column : Staff_column {
     Stem_req *stem_;
     Moment stem_requester_len;
     Beam_req *beam_;
     Stem_req *stem_;
     Moment stem_requester_len;
     Beam_req *beam_;
-    Simple_staff* staff_;
+    Simple_staff* staff_l_;
     Text_req *text_;
     
     /****************/
     Text_req *text_;
     
     /****************/
index 34403e465ca425be6265ac4744398e3dbab28963..192419ef2ee842d73813b6290ec762f1126db41a 100644 (file)
@@ -1,7 +1,7 @@
 /*
   simplewalker.hh -- part of LilyPond
 
 /*
   simplewalker.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef SIMPLEWALKER_HH
 */
 
 #ifndef SIMPLEWALKER_HH
index 9a3333f0630dd1da79a677a715bc8cfeb1769156..8c0cbd4ebefdf44b1e6d2c10a6d6d0b19e509f46 100644 (file)
@@ -1,7 +1,7 @@
 /*
   slur.hh -- part of LilyPond
 
 /*
   slur.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef SLUR_HH
 */
 
 #ifndef SLUR_HH
index fd646a4b913c813efa728aa082393691c947bfac..d04f0736a6252a95d2abd7314f61e18b8aae5cbf 100644 (file)
@@ -1,7 +1,7 @@
 /*
   spanner.hh -- part of LilyPond
 
 /*
   spanner.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef SPANNER_HH
 */
 
 #ifndef SPANNER_HH
index 7d6be0e12f0adc704dbd7ef95b944f4d740b233f..d02f94437337423bdb9e399d0d48caad7cc1ac93 100644 (file)
@@ -14,10 +14,14 @@ struct Staff {
 
     Score *score_l_;
     PScore *pscore_l_;
 
     Score *score_l_;
     PScore *pscore_l_;
-
+    String define_spot_str_;
     /****************************************************************/
     void add(PointerList<Voice*> &s);
     /****************************************************************/
     void add(PointerList<Voice*> &s);
+    void do_commands(PointerList<Input_command*> score_wide,
+                    PointerList<Input_command*> staff_wide);
 
 
+    void get_marks(Array<String>&, Array<Moment>&);
+    
     /// throw away cols later the #l#
     void truncate_cols(Moment l);
 
     /// throw away cols later the #l#
     void truncate_cols(Moment l);
 
index e0e27be4be8ce75eebee3500e8b3f29e4e189b65..1a25b9bdb4cee95c4569fa03dbab95498cbe0693 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
-  lilypond, (c) 1996 Han-Wen Nienhuys
+  lilypond, (c) 1996,97 Han-Wen Nienhuys
 */
 #ifndef SCORECOMMANDS_HH
 #define SCORECOMMANDS_HH
 */
 #ifndef SCORECOMMANDS_HH
 #define SCORECOMMANDS_HH
index bd10f216a858b3ddcc39fbae5a757993978dc034..e48170d4d213c38f9171f05a767a8f923fcad704 100644 (file)
@@ -1,7 +1,7 @@
 /*
   staffelem.hh -- part of LilyPond
 
 /*
   staffelem.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef STAFFELEM_HH
 */
 
 #ifndef STAFFELEM_HH
@@ -63,6 +63,11 @@ private:
       NULL.
       */
 };
       NULL.
       */
 };
+/** Both Spanner and Item are Staff_elem's. Most Staff_elem's depend
+  on other Staff_elem's, eg, Beam needs to know and set direction of
+  Stem. So the Beam has to be calculated *before* Stem. This is
+  accomplished with the dependencies field of struct Staff_elem.
 
 
+  */
 #endif // STAFFELEM_HH
 
 #endif // STAFFELEM_HH
 
index 663c9584b25bbc931fa522b606509a84e6d84ccc..e08aabd17ee1c79c44d6227ca014a8e15cd747c4 100644 (file)
@@ -1,7 +1,7 @@
 /*
   staffline.hh --     horizontal structures for broken scores.
 
 /*
   staffline.hh --     horizontal structures for broken scores.
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef STAFFLINE_HH
 */
 
 #ifndef STAFFLINE_HH
index 2bdd3b8bb9f6ed113b144cfd627eb8186a2d55da..b9e3a9bba8f0ab11aab231143160bca01d3e99c0 100644 (file)
@@ -1,7 +1,7 @@
 /*
   stcol.hh -- part of LilyPond
 
 /*
   stcol.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef STCOL_HH
 */
 
 #ifndef STCOL_HH
index b7d7e05e29517daf7532308061b3e29e838ed2e5..977a719ae900c4f712f1cbe0994b98c1d80dcaff 100644 (file)
@@ -1,7 +1,7 @@
 /*
   stem.hh -- 
 
 /*
   stem.hh -- 
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef STEM_HH
 */
 
 #ifndef STEM_HH
index 046ded590e9b3eef7058b0a876066552cffffb50..d224477b605923659bd5aec9137314bacc320b79 100644 (file)
@@ -2,7 +2,7 @@
 /*
   swalker.hh -- part of LilyPond
 
 /*
   swalker.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef SWALKER_HH
 */
 
 #ifndef SWALKER_HH
index b4217c12b8a59996dfe8aab96fb7d9490505ae84..61dc38b42e68445ab10585575a84f8c2565fb8c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
-  lilypond, (c) 1996 Han-Wen Nienhuys
+  lilypond, (c) 1996,97 Han-Wen Nienhuys
 */
 #ifndef SYMTABLE_HH
 #define SYMTABLE_HH
 */
 #ifndef SYMTABLE_HH
 #define SYMTABLE_HH
index 784420c44b23d64f93f56e31d852571e6423a3e1..2befb6bb4dbabb4a7a761ea2cca9b2b1f82bb8ae 100644 (file)
@@ -1,7 +1,7 @@
 /*
   textdef.hh -- part of LilyPond
 
 /*
   textdef.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef TEXTDEF_HH
 */
 
 #ifndef TEXTDEF_HH
index 1d37be3286ec557ac50c6e675e4d746b31d914bb..ffeeafbb820fb305eae41538d31141d155486a07 100644 (file)
@@ -1,7 +1,7 @@
 /*
   text.hh -- part of LilyPond
 
 /*
   text.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef TEXT_ITEM_HH
 */
 
 #ifndef TEXT_ITEM_HH
index 1e9d06d54338b3ca5da63a45228050bc0fc7f235..4baf832a39ed892aedaa8d6bcf05b30a5eb248fb 100644 (file)
@@ -1,7 +1,7 @@
 /*
   textspanner.hh -- part of LilyPond
 
 /*
   textspanner.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef TEXTSPANNER_HH
 */
 
 #ifndef TEXTSPANNER_HH
index 2194ee0a16641ac93be9864fe126c12fc9c8ba6a..5fb77497938b5e4de71b779b42c3646b15b6d83b 100644 (file)
@@ -1,7 +1,7 @@
 /*
   moment.hh -- part of LilyPond
 
 /*
   moment.hh -- part of LilyPond
 
-  (c) 1996 Han-Wen Nienhuys
+  (c) 1996,97 Han-Wen Nienhuys
 */
 
 #ifndef tdes_HH
 */
 
 #ifndef tdes_HH
 #include "real.hh"
 #include "moment.hh"
 
 #include "real.hh"
 #include "moment.hh"
 
+/// full info on where we are
 struct Time_description {
 struct Time_description {
-    Rational when;
+    Moment when;
+
+    /// if true, no bars needed, no reduction of whole_in_measure
+    bool cadenza_b_;
+    
     /// current measure info
     /// current measure info
-    Rational whole_per_measure;
+    Moment whole_per_measure;
 
     /// where am i 
 
     /// where am i 
-    Rational whole_in_measure;
+    Moment whole_in_measure;
 
     /// how long is one beat?
 
     /// how long is one beat?
-    Rational one_beat;
+    Moment one_beat;
 
     /// idem
     int bars;
 
     /// idem
     int bars;
+
     /****************/
     /****************/
+    void set_cadenza(bool);
     void OK() const;
     void OK() const;
-    Time_description(Rational, const Time_description*);
+    Time_description(Moment, const Time_description*);
     String str()const;
     void print() const;
     String str()const;
     void print() const;
-    void setpartial(Rational p);
-    Rational barleft();
+    void setpartial(Moment p);
+    Moment barleft();
     void set_meter(int,int);
     static int compare (Time_description&, Time_description&);
 };
     void set_meter(int,int);
     static int compare (Time_description&, Time_description&);
 };
index 19dfcbfcaf555311d300d5d6d259515660f4b34a..bb93a1c6fdb1ccece55f119ef9f187a8d758b877 100644 (file)
@@ -1,5 +1,5 @@
 DFILES=dutch.ini table_sixteen.ini table_twenty.ini\
 DFILES=dutch.ini table_sixteen.ini table_twenty.ini\
-       english.ini script.ini
+       english.ini script.ini symbol.ini
 
 default:
        echo huh?
 
 default:
        echo huh?
diff --git a/init/symbol.ini b/init/symbol.ini
new file mode 100644 (file)
index 0000000..eab55e8
--- /dev/null
@@ -0,0 +1,7 @@
+
+
+include "init/dutch.ini"
+include "init/script.ini"
+include "init/table_sixteen.ini"
+
+
index 5eb42dde18783ae671ce08f81696e05a9f978605..77297efbfaa6d722971e6ac29d788c28ff8845bb 100644 (file)
@@ -11,8 +11,8 @@ symboltables {
    % index TeXstring,  xmin xmax ymin ymax
 
     "scripts" = table {
    % index TeXstring,  xmin xmax ymin ymax
 
     "scripts" = table {
-           "fermata" "\fermata"                0pt  0pt        0pt 11.25pt
-           "-fermata" "\ifermata"              0pt  0pt        -11.25pt 0pt
+           "fermata" "\fermata"                0pt  0pt        0pt 6pt
+           "-fermata" "\ifermata"              0pt  0pt        -6pt 0pt
            "portato" "\portato"                0pt 0pt         0pt 0pt
            "-portato" "\iportato"              0pt 0pt         0pt 0pt
            "tenuto" "\tenuto"                  0pt 0pt         0pt 0pt
            "portato" "\portato"                0pt 0pt         0pt 0pt
            "-portato" "\iportato"              0pt 0pt         0pt 0pt
            "tenuto" "\tenuto"                  0pt 0pt         0pt 0pt
diff --git a/input/Makefile b/input/Makefile
new file mode 100644 (file)
index 0000000..439a77e
--- /dev/null
@@ -0,0 +1,7 @@
+default: ;
+
+DISTFILES=Makefile  kortjakje.ly pavane.ly  maartje.ly\
+       cadenza.ly scales.ly standchen.lily
+
+dist:
+       ln $(DISTFILES) $(DDIR)/$(SUBDIR)
diff --git a/input/cadenza.ly b/input/cadenza.ly
new file mode 100644 (file)
index 0000000..445ec08
--- /dev/null
@@ -0,0 +1,64 @@
+%
+% Cadenza to Mozart Horn/3
+%
+
+cad = music { $
+       \duration { 8}
+       \textstyle "italic" 
+       'c4._"f" g8
+       \textstyle  "roman" 
+                                       ['e^"accel" ()'d 'c b]
+       [b()'c] g-\fermata
+               \mark"br1"
+                       c [c_"rubato" e g 'c]
+       \octave{'}
+       e4. e [g ()f_"rit" e d]
+
+       \duration{16}
+       dis4()e4
+               \mark"br2"
+               r8 [c d] [e f g gis]
+       \duration{4}
+       a-> `f()`e g
+       f-> `d()`cis e
+       \duration{8}    
+       d4^\fermata
+               \mark"br3"
+
+       r8 `a [`b cis]
+       \duration{16}   [d cis d e]
+       f4()[f e d c]
+       `b4
+       \octave{} \plet{2/3} ['d8 'c8 a8]
+       \plet{1/1}
+       g2
+               \mark "br4"
+       [g c e g] ['c e g 'c]\octave{'} 
+       [e `g c e] g4^\fermata %()% BUG!
+               \mark "br5"
+       [g8.(_"a tempo" e g8. )e]
+       a4. g8 [f8 e8 d8 c8]
+       `g2 d2^"tr"
+       c4
+       $}
+
+       score {
+       staff { melodic
+               music { cad }
+       }
+       commands {
+               meter 4*4
+               cadenza 1
+               grouping 1
+               goto "br1"
+               bar "empty"
+               goto "br2"
+               bar "empty"
+               goto "br3"
+               bar "empty"
+               goto "br4"
+               bar "empty"
+               goto "br5"
+               bar "empty"
+       }
+}
diff --git a/input/kortjakje.ly b/input/kortjakje.ly
new file mode 100644 (file)
index 0000000..fa54120
--- /dev/null
@@ -0,0 +1,79 @@
+% "Ah, je vous dirai, maman" (Mozart)
+% 
+% bare bones version. (written down from memory :-)
+
+% the % is a comment.
+
+% declare music (which will be in *one* staff ) for the lead voice
+
+melodie = music {
+       $                       % switch Lilypond in note-mode
+       \octave {}              % set the default octave
+       % the default note duratino is 4
+       %%% theme
+       c c |                   % the '|' checks if there is a new measure here.
+       g g|
+       a a|
+
+       g2|     % g2 means a "g-1" pitched half-note 
+       f f|    e e|    d d|  c2
+       g g|    f f|    e e|    d d|    g g|    f f|    e e|    d d|
+       %%% var 1
+         c r8 c8               % r8 means an 8th rest.
+                 (|            % start a slur
+                               % NOTE: the slurstart should be directly after the note
+                       )       % end a slur.
+                         g r8 g8 (|    ) a r8 a8 (|    ) g r4 
+         f r8 f8 (|    ) e4 r8 e8 (    |) d4 r8 d8 (|  ) c4 r4 
+$}
+
+                               % more of this.
+begeleiding =
+$
+       \music {                % as you can see, the $ sign obliges 
+                               % you to precede keyword by a backslash: \
+       \octave { ` }           % default octave: 1 below the first octave.
+
+       %%% theme
+       `c                      % ` means one octave lower.
+                               % Similarly: ' means one higher.
+          c    e c     f c     e c     d `b    c `a    `f `g   `c2
+       \octave { ` }
+       e `g    d `g    c `g    `b `g   e `g    d `g    c `g    `b `g
+       %%%% var 1
+       r8 e8() c       r8 e8() c       r8 f8()c        r8 e8()c
+       r8 d8()`b       r8 c8()`a       r8 `a8()`f      r8 `e8()`c
+}$
+
+
+% create a staff named bstaf
+bstaf = staff {
+       melodic
+       music { begeleiding }   % use the declared music
+               commands {      % commands with Staff-wide impact.
+                       clef bass       % bass-clef
+               }
+       }
+
+% another one
+vstaf = staff {
+       melodic
+               music { melodie }
+               commands { clef violin }
+                               % default clef is violin clef
+       }
+
+
+score {
+       staff { vstaf }
+       staff { bstaf }
+       paper {
+               unitspace 2.5cm % a whole note takes 2.5 cm ideally.
+       }
+       commands {
+               meter 2* 4      % a 2/4 meter.
+               skip 33:0       % skip 32 measures, and generate the bars
+%              meter 6 8       % another meter
+       }
+}
+
diff --git a/input/maartje.ly b/input/maartje.ly
new file mode 100644 (file)
index 0000000..8941182
--- /dev/null
@@ -0,0 +1,74 @@
+ritme = staff {rhythmic
+       music {$
+       c8
+       |[a8() a8. a8 a16 a16 a16] c4.
+               
+       %[c8( )'a8() c8 c8]% BUG!
+       |c2 c2
+       
+       |[fis16 'dis16( fis16 'dis16 ][fis16) 'dis16 fis16 'dis16]
+       | r32 r32 r16 r8 r4 r2
+       |[c8. c16] [c16 c8.] [c16 c16 c8] [c16 c8 c16]
+
+        c2 c2 c2 c2 c2 c2 c2 c2 c2 c2
+
+       $}
+}
+
+melody=
+staff { melodic
+       music{$
+       c8
+       |r4 r4 r4 r4
+       |'cis2..        r8
+       | r4 r8 r16 r32 r32 
+
+       \duration {4}
+       {
+               \music { c () `bes [c8 c8] }
+               \music { 'fis ()'gisis fis8 fis8 }
+               \music { d () d dis8 dis8 }
+               \music {  a  () bes eis8 eis8 }
+               \music { fis () g gis8 gis8 }
+       }
+       { c4 'c4 }
+
+       [d8 e8 'f8 g8]  d8 e8 f8 g8
+       |''fis2
+       | a8 b8 'c8 'd8 |''c8 ```c8 c4 |c4  c4 |c4
+       \duration{ 16 } `b `a `g `f \duration{ 4}
+       
+
+       |c `b `a `g `f `e `d `c ``b ``a ``g ``f ``e ``d ``c
+       $}
+
+       commands {
+               skip 3:0
+               key $ fis cis gis $
+               skip 2:0
+               key 
+               skip 5:0
+               clef bass
+       }
+}
+
+score {
+       paper {
+               geometric 1.4
+               unitspace 3.0 cm
+       }
+       staff { ritme }
+       staff { melody }
+       commands {
+               meter 4* 4
+               partial 8
+               skip 1:2
+               bar ":|:"
+               skip 2:0
+               meter 2* 4
+               skip 19:0
+       }
+}
+
+
+
diff --git a/input/pavane.ly b/input/pavane.ly
new file mode 100644 (file)
index 0000000..ec31ea1
--- /dev/null
@@ -0,0 +1,120 @@
+% Pavane pour une Infante d\'efunte
+% by Maurice Ravel
+%
+% (Ravel has been dead for over 50 years. This does not have copyright)
+%
+% (there is an accompanying LaTeX file, pavane.tex)
+%
+horn =
+staff {melodic
+       music{  $
+       \octave { ' }
+       \duration { 8}
+
+% 1
+       d2( [)d e cis `b]               |       
+       `a4 [`b cis] [cis `b] `b4       |
+       fis2( [)fis g e d]              |
+       cis4 [d e(] [)e fis d cis]      |
+       `b4 [cis d(] [)d e cis `b]      |
+       cis2 r2^"c\'edez"               |
+       r4 fis2 fis4                    |
+       fis2^"en mesure" ()[fis e a fis]|
+       fis4-- e4-- d4-- e4--           |
+       `b2()[`b^"un peu retenu" `a( d cis]|
+% 11
+       )`b [`fis^"en \'elargissant"-- `a-- `b--] cis4-- `b4--|
+       `fis2 r2                        |
+       cis4^"1er mouvement" d4^"tr\`es lontain" ()[d cis d e]
+       \octave {  }
+       |       a4 gis2.        |
+       a4 b4()[b a b 'cis]     |
+       fis4 e4 cis2            |
+       e4 fis4 () [fis e fis gis]      |
+       cis4 `b4()`b8 r8 r4^"tr\`es soutenu"    |
+
+       r4 r4   | %2/4 meter
+
+       'cis4_"\dyn ppp" 'd4 () ['d 'cis 'd 'e] |
+       a4 gis2.        |
+       a4 b4()[b a b 'cis]     |
+       fis4 e4 cis2    |
+       e4_"\dyn pp" fis4()[fis e fis gis]      |
+       cis4_"\dyn mf" `b4()`b8 r8 r4^"un peu plus lent"        |
+       r1      |
+       r2 r4 r4 %^\fermata
+%% cut 'n paste.
+       \octave { ' }
+       | d2^"Reprenez le mouvement"( [)d e cis `b]     |
+       `a4 [`b cis] [cis `b] `b4       |
+       fis2( [)fis g e d]      |
+       cis4 [d e(] [)e fis d cis]      |
+       `b4 [cis d(] [)d e cis `b]      |
+       cis2 r2^"c\'edez"       |
+       r4 fis2 fis4    |
+       fis2^"en mesure"()[fis e a fis] |
+       fis4-- e4-- d4-- e4--   |
+       `b2() [`b `a-. d-. cis-.]       |
+       `b-. [`fis^"large" `a `b] cis4 `b4      `fis2 r2        |
+
+       %% mark B
+       r1^"1er mouvement"      
+       \duration {8}
+       | r2 [c-.( e-. c-. )`a-. ]      
+       \plet {2/3}\octave{}    |
+       |       [c e a ] \plet{1/1} b4-> () [b c-- e-- a--]     |
+       b4. b8()g2      |
+       r1      |
+       r2              [f a f d] 
+       \plet {2/3}
+       | [f a 'c] \plet{1/1} 'e4-^ () ['e f-> a-> 'c->]        |
+       'e4._"sf" 'e8()'c4 r4 |
+       r1      |
+       r4 r4-\fermata  
+       \octave { ' }
+       |d2( [)d e cis `b]      |
+       `a4 [`b cis] [cis `b] `b4       |
+       fis2( [)fis g e d]      |
+       cis4 [d e(] [)e fis d cis]      |
+       `b4 [cis d(] [)d e cis `b]      |
+       cis2 r2^"c\'edez"       |
+       r4 fis2 fis4    |
+       fis2()[fis e a fis]     |
+       fis4-- e4-- d4-- e4--   
+       \octave{ }      
+       | b2()[b a 'd 'cis]     |
+       b [fis a b ] 'cis4 b4   |
+       fis2 r2 |
+       r1-\fermata     
+               $}
+       commands {      
+               key  $fis cis $
+       }
+}
+score {
+       staff {
+               horn
+       }
+       paper {
+               output "pavane.out"
+               unitspace 1.5 cm
+               geometric 1.4
+               width 12cm
+       }
+       commands  {
+               meter 4 *4
+               skip 18:0
+               meter 2 *4
+               skip 1:0
+               meter 4 *4 
+               skip 20:0
+               bar "|:"
+               skip 9:0
+               meter 2* 4
+               skip 1:0
+               bar ":|"
+               meter 4* 4
+               skip 13:0
+               bar "||"
+       }
+}
\ No newline at end of file
diff --git a/input/scales.ly b/input/scales.ly
new file mode 100644 (file)
index 0000000..92229d0
--- /dev/null
@@ -0,0 +1,64 @@
+
+blah =
+staff {melodic
+       music{  $
+\duration { 8 }
+                       \octave{ }
+                       \plet { 6/9 } |[ a a a a a a a a a ] \plet { 1/1 }
+                       \octave{ ' }
+                       \plet { 6/9 } |[ a a a a a a a a a ] \plet { 1/1 }
+                       \octave { ` } 
+                       \plet { 6/9 } [ `c `g d a 'e 'b ''f '''c '''g ] \plet { 1/1 }
+                       \plet { 6/9 } [ '''g '''c ''f 'b 'e a d `g `c ] \plet { 1/1 }
+                       \octave{ ' }
+                       \plet { 6/9 } [ `c `g d a 'e 'b ''f '''c '''g ] \plet { 1/1 }
+                       \plet { 6/9 } [ '''g '''c ''f 'b 'e a d `g `c ] \plet { 1/1 }
+                       \octave { } 
+                       \plet { 2/3 } [ c g 'd ] \plet { 1/1 }
+                       \plet { 2/3 } [ 'd g c ] \plet { 1/1 } 
+                       \plet { 2/3 } [ f 'c 'g ] \plet { 1/1 }
+                       \plet { 2/3 } [ 'g 'c f ] \plet { 1/1 } 
+                       \octave{ ' }
+                       \plet { 2/3 } [ c g 'd ] \plet { 1/1 }
+                       \plet { 2/3 } [ 'd g c ] \plet { 1/1 } 
+                       \plet { 2/3 } [ f 'c 'g ] \plet { 1/1 }
+                       \plet { 2/3 } [ 'g 'c f ] \plet { 1/1 }
+
+c1
+       \duration { 8}
+       [c-> d-> e-> f->][g-> a-> b-> 'c->] % 1
+\octave{'}     ['c-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
+\octave{}      ['c-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
+       [c-. d-. e-. f-.][g-. a-. b-. 'c-.]
+       ['c-- b-- a-- g][f-- e-- d c--] % 5
+       [c-\portato d-\portato e-\portato f-\portato]
+               [g-\portato a-\portato b-\portato 'c-\portato]
+       ['c-\upbow b-\upbow a-\downbow g-\downbow]
+               [f-\downbow e-\downbow d-\upbow c-\upbow]
+       [c-| d-| e-| f-|][g-| a-| b-| 'c-|]
+       ['c b a g][f e d c]
+       [c d e f][g a b 'c] % 10 
+       |['c b a g][f e d c]
+                       
+               $}
+       commands {      
+       }
+}
+score {
+       staff {
+       blah
+       }
+       paper {
+               symboltables { table_sixteen}
+               unitspace 1.5 cm
+               geometric 1.4
+       }
+       commands  {
+                meter 6 8
+                skip 6:0
+               meter 4 4
+               skip 2:0
+               skip 11:0
+
+       }
+}
\ No newline at end of file
diff --git a/input/standchen.lily b/input/standchen.lily
new file mode 100644 (file)
index 0000000..9af02f0
--- /dev/null
@@ -0,0 +1,375 @@
+% st\"andchen.lily
+% Franz Schubert
+%
+% comments with # note missing stuff
+% heu, make that %#%
+%
+%% Still looks fairly on the "ugh" side the beauty scale, mainly because of
+%% LilyPond's naive idealspacing calc.
+%%
+
+%
+%#%%
+%#%\title{St\"andchen}
+%#%\subtitle{Serenade}
+%#%%
+%#%\composer{`franz Schubert}
+%#%\tempo{M\"a\ss ig}
+%#%%
+%#%\meter{3/4}
+%#%\key\`f
+%#%\clef\treble
+%#%%
+%#%\barnumbering5
+%#%%\staffnumbers
+%#%\barnumberstyle\boxed
+%#%%
+%#%\staffseparation{12}
+%#%%
+%#%\duration8
+%%1
+melodie = music { $ 
+       \duration{ 8 }
+       r_"pp" { [ d `a-^ } f-^ { d `a-^ } f-^ { d `a-^ ] }
+%%2
+       r { [ d `bes-^ } f-^ { d `bes-^ } f-^ { d `bes-^ ] }
+%%3
+       r_"simile" { [ d `bes } e { d `bes } e { d `bes ] }
+%%4
+       r { [ `a cis } e { `a cis } e { `a cis ] }
+%#%:|
+%%5
+       \plet{ 2/3 } [ a()bes a ] \plet{ 1/1 } 'd4. a
+%%6
+       \plet{ 2/3 } [ g()a g ] \plet{ 1/1 } 'd4 a r
+%#%\tighten
+%#%\newline
+%%7
+       a4.^> g \plet{ 2/3 } [ g( f )e ] \plet{ 1/1 }
+%%8
+       f2 r4
+%%9
+%#%    { 'a4.( 'cis4.\stemdown_p } { ) 'g 'e_{dolce} }
+%#%    { 'g( 'e } 'f ) 'e
+       'a4.( )g \plet{ 2/3 } { 'g 'e } { 'f } { 'e } \plet{ 1/1 }
+%%10
+       { 'f2. 'd2. }
+%%11
+       \plet { 2/3 } [ a_"pp"( )bes a ] \plet { 1/1 } 'f4. a
+%%12
+       \plet { 2/3 } [ g( ) a g ] \plet { 1/1 } 'e4. 'd
+%%13
+       'c4. bes \plet { 2/3 } [ bes( ) a g ] \plet { 1/1 }
+%%14
+%#%    a2 r { 'd(^ f_p(v }
+       a2 r { 'd f_"p" }
+%%15
+%#%    { ) e4. ) 'c4.\stemup_{dolce} } { bes g }
+       { e4. 'c4._"dolce" } { bes g }
+       \plet { 2/3 } { [ bes g } a g ] \plet { 1/1 }
+%%16
+       { a2. f2. }
+%%17
+       [ a8._"cresc." 'cis16 ] 'f4. 'e
+%%18
+       [ 'd8. a16 ] f4. d
+%%19
+%#%    'c\grace\stemup
+       \plet { 2/3 } [ bes_"pp"( ) a bes ] \plet { 1/1 } 'd4. bes
+%%20
+       a2.
+%%21
+%#%    a\grace
+       \plet { 2/3 } [ g( )fis g ] \plet { 1/1 } bes4.^> g
+%%22
+%#%    =f2.
+       f2.
+%%23
+       [ a8._"mf" 'cis16 ] 'f4. 'e
+%%24
+       [ 'd8. a16 ] fis4. d
+%%25
+%#%    'cis\grace\stemup
+       \plet { 2/3 } [ b_"mf"( ) ais b ] \plet { 1/1 } 'd4. b
+%%26
+       { a2. fis2. }
+%#%\tighten\newline
+%%27
+       \plet { 2/3 } [ 'e_"f"( )'dis 'e ] \plet { 1/1 } 'g4. 'cis
+%%28
+       { 'd2. fis2. }
+%#%\volta1
+%%29
+%#%    { bes2(^++++ g2_{mf} } 
+       { bes2 g2_"mf" } 
+%#%    [v { 'd8.( bes8. } { bes16 ) )++ g16 } ]
+       { [ 'd8. bes8. } { bes16 g16 ] }
+%%30
+       { a4. fis4. } 
+%#%    [ { [ a_. f_.( } { a_. f_. } { a_. ) f_. } ]
+       { [ a_. f_. } { a_. f_. } { a_. f_. ] }
+%%31  
+       { a4. g4. }
+%#%    [ { a cis_.( } { a e_. } { a )- g_. } ]
+       { [ a cis_. } { a e_. } { a g_. ] }
+%%32
+       { a2 fis2_"pp" } { a4 fis4 }
+%%33
+%#%    { b2(^ g2 } [v { 'd8.( b8. } { b16 ) ) g16 } ]
+       { b2( g2 } { [ 'd8. b8. } { b16 g16 ] }
+%%34
+%#%    { a4. fis4. } [ { a_. fis_.( } { a_. fis_. } { a_. ) fis_. } ]
+       { a4. fis4. } { [ a_. fis_. } { a_. fis_. } { a_. fis_. ] }
+%%35
+%#%    { a4. g4. } [ { a cis_.( } { a e_. } { a )- g_. } ]
+       { a4. g4. } { [ a cis_. } { a e_. } { a g_. ] }
+%%36
+       { a2. fis2. }
+%#%\volta2
+%#%:|
+%%37
+       [ a8. a16 ] [ 'cis8. 'cis16 ] [ 'e8. 'e16 ]
+%%38
+       'd4( )'cis4 r4
+%%39
+%#%    > a4. [ 'cis 'e8. >! 'd16 ]
+       a4. [ 'cis 'e8. 'd16 ]
+%%40
+       'cis2 r4
+%%41
+%#%    { > 'fis4. 'cis4._f } 'e [ 'e( ) 'd >! 'cis ] \plet { 1/1 }
+       { 'fis4. 'cis4._"f" } 'e \plet { 2/3 } [ 'e( )'d 'cis ] \plet { 1/1 }
+%%42
+       [ b8. 'cis16 ] 'd4^> b r
+%%43
+%#%    [^ { b8._{ }_{ }_{ }_{ }_{ }_f g2. } 'cis16 ] 'd4^> b r
+       [ b8._"f" 'cis16 ] 'd4^> b r
+%%44
+%#%    [^ { > b8. fis2 } 'cis16 ] 'd4^> b >! r
+       [ b8. 'cis16 ] 'd4^> b r
+%%45
+%#%    'cis\grace\stemup
+       \plet { 2/3 } [ b_"p"( )ais b ] \plet { 1/1 } 'd4. b
+%%46
+%#%    { =a2. fis2. }
+       { a2. fis2. }
+%%47
+       \plet { 2/3 } [ 'e_"f"( )'dis 'e ] \plet { 1/1 } 'g4.^> 'cis
+%%48
+%#%    { fis2.(v ='d2.\stemup(^ }
+       { fis2. 'd2. }
+%%49
+%#%    { ) 'd4 ) =f2._> } { r4 s4_{decr} } 'd4\stemup
+       'd4 r4_"decresc." 'd4
+%%50
+       { bes2. e2. }
+%%51
+       { a2. cis2. }
+%%52
+       { fis2 d2 } { a4 f4_"pp" }
+%%53
+%#%    { bes2 g2 } [ { 'd8.^>( bes8. } { ) bes16 g16 } ]
+       { bes2 g2 } { [ 'd8.^> bes8. } { bes16 g16 ] }
+%%54
+%#%    { a4. fis4. } [ { a_. fis_.( } { a_. fis_. } { a_. ) fis_. } ]
+       { a4. fis4. } { [ a_. fis_. } { a_. fis_. } { a_. fis_. ] }
+%%55
+%#%    { a4. g4. } [ { a cis_.( } { a e_. } { a )- g_. } ] 
+       { a4. g4. } { [ a cis_. } { a e_. } { a g_. ] }
+%%56
+       { a2. fis2._"dim." }
+%%57
+       { a2. fis2. }
+%%58
+       { a2.^\fermata fis2. }
+%#%\tighten
+$ }
+
+begeleiding = music { $
+       \duration{2}
+       `d r4
+%%2
+       ``bes r4
+
+%%3
+       ``g r4
+
+%%4
+       ``a r4
+%#%:|
+%%5
+%#%\stemlength2
+\duration{ 8 }
+%#%    { =`f `d2 } `a d `a { d r4 } `a
+% i-d rather type:
+%      { \music{ [ `f `a d `a d `a ] } \music{ `d2 r4 } }
+% output little better...
+%      { `d2 \music{ [ `f `a d `a } } { \music{ d `a ] } r4 }
+       [ `f `a d `a d `a ]
+%%6
+%#%    { `d ``bes2 } `e `g `e { `g r4 } `e
+       [ `d `e `g `e `g `e ]
+%%7
+%#%    { `cis ``a2 } `e `g `e { `g r4 } `e
+       [ `cis `e `g `e `g `e ]
+%%8
+%#%    { `d `d2 } `a d `a { d r4 } `a
+       [ `d `a d `a d `a ]
+%%9
+%#%    `a e f e f e
+       [ `a e f e f e ]
+%%10
+%#%    `d `a d `a d `a
+       [ `d `a d `a d `a ]
+%%11
+%#%    [^ { `f `d2 } `a d `a { d r4 } `a ]
+       [ `f `a d `a d `a ]
+
+%%12 == 6
+%#%    { `d ``bes2 } `e `g `e { `g r4 } `e
+       [ `d `e `g `e `g `e ]
+%%13
+%#%    { `e ``bes2 } `e `g `e { `g r4 } `e
+       [ `e `e `g `e `g `e ]
+%%14
+%#%    { `a `f2 } c f c { f r4 } c
+       [ `a c f c f c ]
+%%15
+       [ `c `g `bes `g `bes `g ]
+%%16
+       [ ``f `c `f `c `f `c ]
+%%17
+%#%    [^ { ``a ``a2 } `e `g `e { `g r4 } `e ]
+       [ ``a `e `g `e `g `e ]
+%%18
+%#%    [^ { `d `d2 } `a d `a { d r4 } `a ]
+       [ `d `a d `a d `a ]
+%%19
+%#%    s8               % skip space of `grace note
+%#%    [^ { ``bes ``bes2 } `f `bes `f { `bes r4 } `f ]
+       [ ``bes `f `bes `f `bes `f ]
+%%20
+%#%    [^ { ``f ``f2 } `c `f `c { `f r4 } `c ]
+       [ ``f `c `f `c `f `c ]
+%%21
+%#%    s8               % skip space of `grace note
+%#%    [ { `e `c } `g c `g c `g ]
+       { [ `e `c } `g c `g c `g ]
+%%22
+       [ `f `a c `a `f `c ]
+%%23
+%#%    [^ { ``a ``a2 } `e `g `e { `g r4 } `e ]
+       [ ``a `e `g `e `g `e ]
+%%24
+%#%    [^ { `d `d2 } `fis `a `fis { `a r4 } `fis]
+       [ `d `fis `a `fis `a `fis ]
+%%25
+%#%    s8               % skip space of `grace note
+%#%    [^ { ``g ``g2 } `d `b `d { `b r4 } `d]
+       [ ``g `d `b `d `b `d ]
+%%26
+%#%    [^ { `d `d2 } `a d `a { d r4 } `a]
+       [ `d `a d `a d `a ]
+%%27
+       { [ `cis ``a } `e `a `e `a `e ]
+%%28
+       [ `d `a d `a d `a ]
+%%29
+%#%    [ `d `g @ `bes `g `bes `g       ]
+       [ `d `g `bes `g `bes `g ]
+%#%\volta1
+%%30 
+       [ `d `fis `a `fis `a `fis ]
+%%31
+       [ `a `e `a `e `a `e ]
+%%32
+       [ `d `fis `a `fis `a `fis ]
+%%33
+       [ `d `g `b `g `b `g ]
+%%34
+       [ `d `fis `a `fis `a `fis ]
+%%35
+       [ `a `e `a `e `a `e ]
+%%36
+       [ `d `fis `a `fis `a `fis ]
+%#%\volta2
+%#%:|
+%%37
+       [ `a `e `g `e ``bes^> `e ]
+%%38
+       [ `a { e cis `a } { e cis `a } { e cis `a } { e cis `a } { e cis `a ] } 
+%%39
+       [ `a `e `g `e ``bes^> `e ]
+%%40
+       [ `a { e cis `a } { e cis `a } { e cis `a } { e cis `a } { e cis `a ] } 
+%%41
+       [ `ais `e `gis `e `gis `e ]
+%%42
+       { [ `d ``b } `fis `b `fis `b `fis ]
+%%43
+       { [ `e ``b } `g `b `g `b `g ]
+%%44
+       { [ `d ``b } `fis `b `fis `b `fis ]
+%%45
+%#%    s8               % skip space of `grace note
+%#%    [^{ ``g ``g2 } `d `b `d { `b r4 } `d]
+       [ ``g `d `b `d `b `d ]
+%%46
+%#%    [^ { `d `d2 } `a d `a { d r4 } `a ]
+       [ `d `a d `a d `a ]
+%%47
+       { [ `cis ``a } `e `a `e `a `e ]
+%%48
+       [ `d `fis `a `fis `a `fis ]
+%%49
+       [ `d `a d `a d `a ]
+%%50
+       [ ``g `e `g `e `g `e ]
+%%51
+       [ `a `e `g `e `g `e ]
+%%52
+       [ ``d `d `fis `d `fis `d ]
+%%53
+       [ `d `g `bes `g `bes `g ]
+%%54
+       [ `d `fis `a `fis `a `fis ]
+%%55
+       [ `a `e `g `e `g `e ]
+%%56
+       [ ``d ``a `d ``a `d ``a ]
+%%57
+       [ ``d ``a `d ``a `d ``a ]
+%%58
+       { `d2.^\fermata ``d2. }
+$ }
+
+score {
+       paper {
+               symboltables { table_sixteen }
+               output "standchen.uit"
+               unitspace 2.4 cm
+               geometric 1.4
+       }
+       staff { 
+               melodic music { melodie }
+               commands {
+                       key $bes$
+                       clef violin
+               }
+       }
+       staff { 
+               melodic music { begeleiding }
+               commands {
+                       key $bes$
+                       clef bass 
+               }
+       }
+       commands { 
+               meter 3 4 
+               skip 4:0
+               bar ":|"
+               skip 32:0
+               bar ":|"
+               skip 22:0
+       }
+}
diff --git a/kortjakje.ly b/kortjakje.ly
deleted file mode 100644 (file)
index ac78340..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-% "Ah, je vous dirai, maman" (Mozart)
-% 
-% bare bones version. (written down from memory :-)
-
-% the % is a comment.
-
-% declare music (which will be in *one* staff ) for the lead voice
-
-melodie = music {
-       $                       % switch Lilypond in note-mode
-       \octave {}              % set the default octave
-       % the default note duratino is 4
-       %%% theme
-       c c |                   % the '|' checks if there is a new measure here.
-       g g|
-       a a|
-
-       g2|     % g2 means a "g-1" pitched half-note 
-       f f|    e e|    d d|  c2
-       g g|    f f|    e e|    d d|    g g|    f f|    e e|    d d|
-       %%% var 1
-         c r8 c8               % r8 means an 8th rest.
-                 (|            % start a slur
-                               % NOTE: the slurstart should be directly after the note
-                       )       % end a slur.
-                         g r8 g8 (|    ) a r8 a8 (|    ) g r4 
-         f r8 f8 (|    ) e4 r8 e8 (    |) d4 r8 d8 (|  ) c4 r4 
-$}
-
-                               % more of this.
-begeleiding =
-$
-       \music {                % as you can see, the $ sign obliges 
-                               % you to precede keyword by a backslash: \
-       \octave { ` }           % default octave: 1 below the first octave.
-
-       %%% theme
-       `c                      % ` means one octave lower.
-                               % Similarly: ' means one higher.
-          c    e c     f c     e c     d `b    c `a    `f `g   `c2
-       \octave { ` }
-       e `g    d `g    c `g    `b `g   e `g    d `g    c `g    `b `g
-       %%%% var 1
-       r8 e8() c       r8 e8() c       r8 f8()c        r8 e8()c
-       r8 d8()`b       r8 c8()`a       r8 `a8()`f      r8 `e8()`c
-}$
-
-
-% create a staff named bstaf
-bstaf = staff {
-       melodic
-       music { begeleiding }   % use the declared music
-               commands {      % commands with Staff-wide impact.
-                       clef bass       % bass-clef
-               }
-       }
-
-% another one
-vstaf = staff {
-       melodic
-               music { melodie }
-               commands { clef violin }
-                               % default clef is violin clef
-       }
-
-
-score {
-       staff { vstaf }
-       staff { bstaf }
-       paper {
-               unitspace 2.5cm % a whole note takes 2.5 cm ideally.
-       }
-       commands {
-               meter 2 4       % a 2/4 meter.
-               skip 33:0       % skip 32 measures, and generate the bars
-%              meter 6 8       % another meter
-       }
-}
-
index eadca08e81cf2f1a1af9cc8198d3f55bbfd3c061..0a1fdeef8affe773d2eb9dfaf780eb58fcfe2ee9 100644 (file)
 \def\maatstreep{\vrule height\balkhoog}
 \def\finishbar{\vrule height\balkhoog  width 1pt}
 \maccentdef\repeatcolon{55}{2/1}
 \def\maatstreep{\vrule height\balkhoog}
 \def\finishbar{\vrule height\balkhoog  width 1pt}
 \maccentdef\repeatcolon{55}{2/1}
-
+\def\emptybar{}
 \def\repeatbar{\rightalign{\repeatcolon\kern 2pt\finishbar}}
 \def\startrepeat{\hbox{\finishbar\kern 2pt\repeatcolon}}
 \def\repeatbarstartrepeat{\hbox{\repeatbar\kern 1pt\startrepeat}}
 \def\repeatbar{\rightalign{\repeatcolon\kern 2pt\finishbar}}
 \def\startrepeat{\hbox{\finishbar\kern 2pt\repeatcolon}}
 \def\repeatbarstartrepeat{\hbox{\repeatbar\kern 1pt\startrepeat}}
 \maccentdef\iportato{19}{9/10}
 \maccentdef\tenuto{26}{0/1}
 \maccentdef\itenuto{27}{0/1}
 \maccentdef\iportato{19}{9/10}
 \maccentdef\tenuto{26}{0/1}
 \maccentdef\itenuto{27}{0/1}
-\mdef\fermata{80}
-\mdef\ifermata{81}
+\maccentdef\fermata{80}{-1/1}
+\maccentdef\ifermata{81}{1/1}
 
 
 
 
 
 
diff --git a/maartje.ly b/maartje.ly
deleted file mode 100644 (file)
index f585c27..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-ritme = staff {rhythmic
-       music {$
-       c8
-       [a8() a8. a8 a16 a16 a16] c4.
-               
-       %[c8( )'a8() c8 c8]% BUG!
-       c2 c2
-       
-       [fis16 'dis16( fis16 'dis16 ][fis16) 'dis16 fis16 'dis16]
-       c2 r32 r32 r16 r8 r4
-       [c8. c16]
-       [c16 c8.]
-       [c16 c16 c8]
-       [c16 c8 c16]
-%      [c16 r8 c16]
-
-        c2 c2 c2 c2 c2 c2 c2 c2 c2 c2
-
-       $}
-}
-
-melody=
-staff { melodic
-       music{$
-c8
-       r4 r4 r4 r4
-       'cis2.. r8
-       r4 r8 r16 r32 r32 
-
-       \duration {4}
-       {
-               \music { c () `bes [c8 c8] }
-               \music { 'fis ()'gisis fis8 fis8 }
-               \music { d () d dis8 dis8 }
-               \music {  a  () bes eis8 eis8 }
-               \music { fis () g gis8 gis8 }
-       }
-       { c4 'c4 }
-
-       [d8 e8 'f8 g8]  d8 e8 f8 g8
-       ''fis2
-       a8 b8 'c8 'd8 ''c8 ```c8 c4 c4  c4 c4
-       \duration{ 16 } `b `a `g `f \duration{ 4}
-       
-
-       c `b `a `g `f `e `d `c ``b ``a ``g ``f ``e ``d ``c
-       $}
-
-       commands {
-
-       skip 3:0%BUG
-       key $ fis cis gis $
-       skip 2:0
-       key $ $%BUG
-       skip 5:0
-       clef bass
-}
-}
-
-score {
-       paper {
-               geometric 1.4
-               unitspace 3.0 cm
-       }
-       staff { ritme }
-       staff { melody }
-       commands {
-               meter 4 4
-               partial 8
-               skip 1:2
-               bar ":|:"
-               skip 2:0
-               meter 2 4
-               skip 19:0
-       }
-}
-
-
-
diff --git a/objects/Makefile b/objects/Makefile
new file mode 100644 (file)
index 0000000..228fde3
--- /dev/null
@@ -0,0 +1,3 @@
+DISTFILES=Makefile
+dist:
+       ln $(DISTFILES) $(DDIR)/$(SUBDIR)
\ No newline at end of file
diff --git a/pavane.ly b/pavane.ly
deleted file mode 100644 (file)
index a5ad5cc..0000000
--- a/pavane.ly
+++ /dev/null
@@ -1,119 +0,0 @@
-% pavane pour une Infante d\'efunte
-% 
-% Maurice Ravel
-%
-% (Ravel has been dead for over 50 years. This does not have copyright)
-%
-
-horn =
-staff {melodic
-       music{  $
-       \octave { ' }
-       \duration { 8}
-
-% 1
-       d2( [)d e cis `b]               |       
-       `a4 [`b cis] [cis `b] `b4       |
-       fis2( [)fis g e d]              |
-       cis4 [d e(] [)e fis d cis]      |
-       `b4 [cis d(] [)d e cis `b]      |
-       cis2 r2^"c\'edez"               |
-       r4 fis2 fis4                    |
-       fis2^"en mesure" ()[fis e a fis]|
-       fis4-- e4-- d4-- e4--           |
-       `b2()[`b^"un peu retenu" `a( d cis]|
-% 11
-       )`b [`fis^"en \'elargissant"-- `a-- `b--] cis4-- `b4--|
-       `fis2 r2                        |
-       cis4^"1er mouvement" d4^"tr\`es lontain" ()[d cis d e]
-       \octave {  }
-       |       a4 gis2.        |
-       a4 b4()[b a b 'cis]     |
-       fis4 e4 cis2            |
-       e4 fis4 () [fis e fis gis]      |
-       cis4 `b4()`b8 r8 r4^"tr\`es soutenu"    |
-
-       r4 r4   | %2/4 meter
-
-       'cis4_"\dyn ppp" 'd4 () ['d 'cis 'd 'e] |
-       a4 gis2.        |
-       a4 b4()[b a b 'cis]     |
-       fis4 e4 cis2    |
-       e4_"\dyn pp" fis4()[fis e fis gis]      |
-       cis4_"\dyn mf" `b4()`b8 r8 r4^"un peu plus lent"        |
-       r1      |
-       r2 r4 r4 %^\fermata
-%% cut 'n paste.
-       \octave { ' }
-       | d2^"Reprenez le mouvement"( [)d e cis `b]     |
-       `a4 [`b cis] [cis `b] `b4       |
-       fis2( [)fis g e d]      |
-       cis4 [d e(] [)e fis d cis]      |
-       `b4 [cis d(] [)d e cis `b]      |
-       cis2 r2^"c\'edez"       |
-       r4 fis2 fis4    |
-       fis2^"en mesure"()[fis e a fis] |
-       fis4-- e4-- d4-- e4--   |
-       `b2() [`b `a-. d-. cis-.]       |
-       `b-. [`fis^"large" `a `b] cis4 `b4      `fis2 r2        |
-
-       %% mark B
-       r1^"1er mouvement"      
-       \duration {8}
-       | r2 [c-.( e-. c-. )`a-. ]      
-       \plet {2/3}\octave{}    |
-       |       [c e a ] \plet{1/1} b4-> () [b c-- e-- a--]     |
-       b4. b8()g2      |
-       r1      |
-       r2              [f a f d] 
-       \plet {2/3}
-       | [f a 'c] \plet{1/1} 'e4-^ () ['e f-> a-> 'c->]        |
-       'e4._"sf" 'e8()'c4 r4 |
-       r1      |
-       r4 r4-\fermata  
-       \octave { ' }
-       |d2( [)d e cis `b]      |
-       `a4 [`b cis] [cis `b] `b4       |
-       fis2( [)fis g e d]      |
-       cis4 [d e(] [)e fis d cis]      |
-       `b4 [cis d(] [)d e cis `b]      |
-       cis2 r2^"c\'edez"       |
-       r4 fis2 fis4    |
-       fis2()[fis e a fis]     |
-       fis4-- e4-- d4-- e4--   
-       \octave{ }      
-       | b2()[b a 'd 'cis]     |
-       b [fis a b ] 'cis4 b4   |
-       fis2 r2 |
-       r1-\fermata     
-               $}
-       commands {      
-               key  $fis cis $
-       }
-}
-score {
-       staff {
-               horn
-       }
-       paper {
-               output "pavane.out"
-               unitspace 1.5 cm
-               geometric 1.4
-       }
-       commands  {
-               meter 4 4
-               skip 18:0
-               meter 2 4
-               skip 1:0
-               meter 4 4 
-               skip 20:0
-               bar "|:"
-               skip 9:0
-               meter 2 4
-               skip 1:0
-               bar ":|"
-               meter 4 4
-               skip 13:0
-               bar "||"
-       }
-}
\ No newline at end of file
diff --git a/scales.ly b/scales.ly
deleted file mode 100644 (file)
index 99d6f56..0000000
--- a/scales.ly
+++ /dev/null
@@ -1,36 +0,0 @@
-
-blah =
-staff {melodic
-       music{  $ c1
-       \duration { 8}
-       [c-> d-> e-> f->][g-> a-> b-> 'c->]
-\octave{'}     ['c-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
-
-\octave{}      ['c-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
-
-       [c-. d-. e-. f-.][g-. a-. b-. 'c-.]
-       ['c-- b-- a-- g][f-- e-- d c--]
-       [c-\portato d-\portato e-\portato f-\portato][g-\portato a-\portato b-\portato 'c-\portato]
-       ['c-\upbow b-\upbow a-\downbow g-\downbow][f-\downbow e-\downbow d-\upbow c-\upbow]
-       [c-| d-| e-| f-|][g-| a-| b-| 'c-|]
-       ['c b a g][f e d c]
-       [c d e f][g a b 'c]
-       ['c b a g][f e d c]
-               $}
-       commands {      
-       }
-}
-score {
-       staff {
-       blah
-       }
-       paper {
-               symboltables { table_sixteen}
-               unitspace 1.5 cm
-               geometric 1.4
-       }
-       commands  {meter 4 4
-
-               skip 18:0
-       }
-}
\ No newline at end of file
index a3cc55c1e4147f15ec00f7d3291c9752c5c7b075..99c4f0a6b4a10f5d6d86706a80c4e19c91fcce07 100644 (file)
@@ -1,8 +1,9 @@
 default:
        $(MAKE) -C ..
 
 default:
        $(MAKE) -C ..
 
+DISTFILES=Makefile $(mycc) $(othersrc)
 dist:
 dist:
-       ln Makefile $(mycc) $(othersrc) $(DDIR)/src
+       ln $(DISTFILES) $(DDIR)/$(SUBDIR)
 
 TAGS: $(mycc)
        etags -CT $(mycc) 
 
 TAGS: $(mycc)
        etags -CT $(mycc) 
index 1016320deae1339c35785637aff3a4e3ebde1fc9..c65dc5811590aded016e27db29f35cfb6fe2a94e 100644 (file)
@@ -34,6 +34,7 @@ Stem_info::Stem_info(const Stem*s)
 }
 
 /****************/
 }
 
 /****************/
+
 Offset
 Beam::center()const
 {
 Offset
 Beam::center()const
 {
@@ -42,9 +43,9 @@ Beam::center()const
        Beam*me_p = (Beam*)this;
        me_p->do_post_processing();
     }
        Beam*me_p = (Beam*)this;
        me_p->do_post_processing();
     }
-    Real w=width().length()/2;
-    return Offset(w,
-                  (left_pos + w* slope)*paper()->interline());
+
+    Real w=(paper()->note_width() + width().length())/2.0;
+    return Offset(w, (left_pos + w* slope)*paper()->interline());
 }
 
 
 }
 
 
index ea0cb4b8c44c6ee9b6891a453dbfff7fc9c2ece7..228f7c70195dc058e19c59deed99468f5ad59f86 100644 (file)
@@ -7,7 +7,13 @@
 #include "vector.hh"
 
 Dstream monitor(&cout,".dstreamrc");
 #include "vector.hh"
 
 Dstream monitor(&cout,".dstreamrc");
-ostream * nulldev = new ofstream("/dev/null");
+ostream * nulldev =0;
+
+struct _Dinit {
+    _Dinit() { nulldev = new ofstream("/dev/null");}
+    ~_Dinit() { delete nulldev; }
+} dinit;
+
 
 
 /*
 
 
 /*
index 6545c0ec1c083f5cb445aa0c74d73cb3552dbb61..a11e2c0fe32b42be73231a44f93b0b4f9f83ffcc 100644 (file)
@@ -49,10 +49,7 @@ split_bar_command(Command &pre_com, Command &no_break_com, Command &post_com,
     if(s=="default")
        s = "|";
     
     if(s=="default")
        s = "|";
     
-    if (s == "|" || s == ":|" || s == "||") {
-       c.args.add(s);
-       pre_com= no_break_com= c;       
-    } else if (s == ":|:") {
+    if (s == ":|:") {
        no_break_com=post_com=pre_com = c;
        
        pre_com.args.add( ":|");
        no_break_com=post_com=pre_com = c;
        
        pre_com.args.add( ":|");
@@ -61,5 +58,8 @@ split_bar_command(Command &pre_com, Command &no_break_com, Command &post_com,
     }else if (s=="|:") {
        c.args.add(s);
        no_break_com=post_com=c;
     }else if (s=="|:") {
        c.args.add(s);
        no_break_com=post_com=c;
+    } else {
+       c.args.add(s);
+       pre_com= no_break_com= c;       
     } 
 }
     } 
 }
index 4b8efaee6cdb8b74eeda27701ef5e387e6114aed..4f02b75378edd735a06133f298c8dd08003a86e7 100644 (file)
@@ -100,11 +100,15 @@ Rhythmic_grouping::intersect(MInterval t)
 
 }
 
 
 }
 
+/* I really should be documenting what is happening here, but I find
+  that difficult, since I don't really understand what's going on here.
+
+  */
 void
 Rhythmic_grouping::split(Array<MInterval> splitpoints)
 {
     //check on splitpoints..
 void
 Rhythmic_grouping::split(Array<MInterval> splitpoints)
 {
     //check on splitpoints..
-    int j = 0, i=0, starti = 0, startj = 0;
+    int j = 0, i = 0, starti = 0, startj = 0;
     
     Array<Rhythmic_grouping*> ch;
     while (1) {
     
     Array<Rhythmic_grouping*> ch;
     while (1) {
@@ -162,8 +166,7 @@ Rhythmic_grouping::Rhythmic_grouping(Array<Rhythmic_grouping*> r)
 
 Rhythmic_grouping::~Rhythmic_grouping()
 {
 
 Rhythmic_grouping::~Rhythmic_grouping()
 {
-    junk();
-    
+    junk();    
 }
 
 void
 }
 
 void
@@ -289,3 +292,28 @@ Rhythmic_grouping::generate_beams(Array<int> flags, int &flagidx)
     return beams;
 }
 
     return beams;
 }
 
+void
+Rhythmic_grouping::translate(Moment m)
+{
+    if (interval_)
+       *interval_ += m;
+    else
+       for (int i=0; i < children.size(); i++)
+           children[i]->translate(m);
+}
+
+void
+Rhythmic_grouping::extend(MInterval m)
+{    
+    assert(m.left >= interval().left);
+    while (m.right  >interval().right ) {
+       Array<Rhythmic_grouping*> a(children);
+       for (int i=0; i < a.size(); i++) {
+           a[i] =new Rhythmic_grouping(*children[i]);
+           a[i]->translate(children.last()->interval().right);     
+       }
+       children.concat(a);
+    }
+    assert(m.right <= interval().right);
+    OK();
+}
index 9cedc52c2ab5c42d5d235999f533d85bab375d1b..02e7e7281308b15d25ddecbcd31effcf3c9946d1 100644 (file)
@@ -44,6 +44,24 @@ get_partial_command(Moment u)
     return c;
 }
 
     return c;
 }
 
+Input_command*
+get_goto_command(String s)
+{
+    Input_command*c = new Input_command;
+    c->args.add("GOTO");
+    c->args.add(s);
+    return c;
+}
+
+Input_command*
+get_cadenza_toggle(int i)
+{
+    
+    Input_command*c = new Input_command;
+    c->args.add("CADENZA");
+    c->args.add(i);
+    return c;
+}
 Input_command*
 get_grouping_command(Array<int>a ) 
 {
 Input_command*
 get_grouping_command(Array<int>a ) 
 {
@@ -90,9 +108,7 @@ Input_command *
 get_newmeasure_command()
 {
     Input_command*c = new Input_command;
 get_newmeasure_command()
 {
     Input_command*c = new Input_command;
-
     c->args.add( "NEWMEASURE");
     c->args.add( "NEWMEASURE");
-
     return c;
 }
 
     return c;
 }
 
@@ -112,6 +128,7 @@ get_skip_command(int n, Moment m)
 void
 Input_command::print()const
 {
 void
 Input_command::print()const
 {
+#ifndef NPRINT
     mtor << "{ ";
     if (args.size()) {
        mtor<< " args: ";
     mtor << "{ ";
     if (args.size()) {
        mtor<< " args: ";
@@ -119,6 +136,7 @@ Input_command::print()const
            mtor << "`"<<args[i] <<"',";
     }
     mtor << "}\n";
            mtor << "`"<<args[i] <<"',";
     }
     mtor << "}\n";
+#endif    
 }
 
 Input_command*
 }
 
 Input_command*
index 90d6eeffa64831cf2499dbfa554a1711d912e9a5..968d29c9a9136cd09352f406dc3dbce876998f85 100644 (file)
@@ -6,6 +6,7 @@
 #include "command.hh"
 #include "stcol.hh"
 #include "staff.hh"
 #include "command.hh"
 #include "stcol.hh"
 #include "staff.hh"
+#include "assoc.hh"
 
 void
 Commands_at::print() const
 
 void
 Commands_at::print() const
@@ -18,15 +19,17 @@ Commands_at::print() const
     mtor << "}\n";
 #endif
 }
     mtor << "}\n";
 #endif
 }
+
 Moment
 Commands_at::when()
 {
     return tdescription_.when;
 }
 Moment
 Commands_at::when()
 {
     return tdescription_.when;
 }
+
 Commands_at::Commands_at(Moment dt, Commands_at* prev)
     : tdescription_(dt, (prev)? &prev->tdescription_ : 0)
 {
 Commands_at::Commands_at(Moment dt, Commands_at* prev)
     : tdescription_(dt, (prev)? &prev->tdescription_ : 0)
 {
-    if (prev&& !tdescription_.whole_in_measure) {
+    if (prev && !tdescription_.whole_in_measure) {
        bottom().add(get_newmeasure_command());
     }
 }
        bottom().add(get_newmeasure_command());
     }
 }
@@ -42,7 +45,6 @@ Commands_at::add(Input_command *i)
        int o = i->args[2];
        tdescription_.set_meter(l,o);
        bottom().add(get_grouping_command( get_default_grouping(l)));
        int o = i->args[2];
        tdescription_.set_meter(l,o);
        bottom().add(get_grouping_command( get_default_grouping(l)));
-
     }
 }
 
     }
 }
 
@@ -88,7 +90,10 @@ Input_cursor::find_moment(Moment w)
     while  (1) {
        if (! ok() ) {
            *this = list().bottom();
     while  (1) {
        if (! ok() ) {
            *this = list().bottom();
-           Moment dt = (w - when()) <? ptr()->barleft();
+           
+           Moment dt = (w - when());
+           if ( !ptr()->tdescription_.cadenza_b_ )
+               dt = dt <? ptr()->barleft();
 
            Commands_at * c = new Commands_at(dt, *this);
            assert(c->when() <= w);
 
            Commands_at * c = new Commands_at(dt, *this);
            assert(c->when() <= w);
@@ -113,6 +118,7 @@ Input_cursor::find_moment(Moment w)
 
 
 /****************/
 
 
 /****************/
+
 Input_commands::Input_commands(Input_commands const&src)
     : ptr(src.ptr)
 {
 Input_commands::Input_commands(Input_commands const&src)
     : ptr(src.ptr)
 {
@@ -145,25 +151,35 @@ Input_commands::do_skip(int bars, Moment wholes)
 
 
 void
 
 
 void
-Input_commands::add(Input_command c)
-{    
-    if (c.args[0] == "PARTIAL") {      
+Input_commands::add(Input_command c, Assoc<String,Moment> &marks_assoc_r)
+{
+    String s(c.args[0]);
+    if (s == "CADENZA") {
+       ptr->tdescription_.set_cadenza(c.args[1]);
+    } if (s == "PARTIAL") {    
        ptr->setpartial(c.args[1]);
        ptr->setpartial(c.args[1]);
-    } else if (c.args[0] == "GROUPING") {
+    } else if (s == "GROUPING") {
        Input_command *ic = new Input_command(c);
        ic->args.insert(ptr->tdescription_.one_beat, 1);
        ptr->add(ic);
        Input_command *ic = new Input_command(c);
        ic->args.insert(ptr->tdescription_.one_beat, 1);
        ptr->add(ic);
-    } else if (c.args[0] == "METER") {
+    } else if (s == "METER") {
        int beats_per_meas = c.args[1];
        int one_beat = c.args[2];
        Input_command *ch = get_meterchange_command(beats_per_meas, one_beat);
        ptr->add(ch);           
        int beats_per_meas = c.args[1];
        int one_beat = c.args[2];
        Input_command *ch = get_meterchange_command(beats_per_meas, one_beat);
        ptr->add(ch);           
-    } else if (c.args[0] == "SKIP") {
+    } else if (s == "SKIP") {
        int bars = c.args[1] ;
        Moment wholes= c.args[2];
        do_skip(bars, wholes);
        int bars = c.args[1] ;
        Moment wholes= c.args[2];
        do_skip(bars, wholes);
-    } else if (c.args[0] == "RESET") {
+    } else if (s == "RESET") {
        ptr= top();
        ptr= top();
+    } else if (s=="GOTO") {
+       ptr = top();
+       String m(c.args[1]);
+       if (!marks_assoc_r.elt_query(m))
+           error("Unknown marker: `" +m + "\'");
+       
+       ptr.find_moment(marks_assoc_r[m]);
     } else {
        Input_command *ic = new Input_command(c);
        ptr->add(ic);
     } else {
        Input_command *ic = new Input_command(c);
        ptr->add(ic);
@@ -185,13 +201,6 @@ Input_commands::parse(Staff * staff_l) const
        
        if (!i->when()) {   /* all pieces should start with a breakable. */
            com_l->set_breakable();
        
        if (!i->when()) {   /* all pieces should start with a breakable. */
            com_l->set_breakable();
-           #if 0
-           Command c;//(0.0);
-           c.code = INTERPRET;
-           c.args.add("BAR");
-           c.args.add("empty");
-           com_l->add(c);
-           #endif
        }
 
        i->parse(com_l);
        }
 
        i->parse(com_l);
index cdc348c725fd3f5f9d78a5509293f06285290bd6..28e1f71599ad8d8be71f50640ca1566e3c6cd517 100644 (file)
@@ -4,6 +4,7 @@
 #include "inputstaff.hh"
 #include "score.hh"
 #include "paper.hh"
 #include "inputstaff.hh"
 #include "score.hh"
 #include "paper.hh"
+#include "staff.hh"
 
 void
 Input_score::add(Array<Input_command*> &s)
 
 void
 Input_score::add(Array<Input_command*> &s)
@@ -25,17 +26,27 @@ Input_score::set(Paperdef*p)
     delete paper_;
     paper_ = p;
 }
     delete paper_;
     paper_ = p;
 }
+Input_score::Input_score(Input_score const&)
+{
+    assert(false);
+}
 
 Score*
 Input_score::parse()
 {
     Paperdef* paper_p=new Paperdef(*paper_);
     Score *s_p = new Score(paper_p);
 
 Score*
 Input_score::parse()
 {
     Paperdef* paper_p=new Paperdef(*paper_);
     Score *s_p = new Score(paper_p);
-    
+    s_p->define_spot_str_ = define_spot_str_;
+    Array<Staff*> parsed_staffs;
     for (iter_top(staffs_,i); i.ok(); i++) {
     for (iter_top(staffs_,i); i.ok(); i++) {
-       Staff* staf_p=i->parse(commands_, s_p);
+       Staff* staf_p=i->parse(s_p);
+       parsed_staffs.add(staf_p);
        s_p->add(staf_p);
     }
        s_p->add(staf_p);
     }
+    int j = 0;
+    for (iter_top(staffs_,i); i.ok(); i++,j++) {
+       parsed_staffs[j]->do_commands(commands_, i->commands_);
+    }
     return s_p;
 }
 
     return s_p;
 }
 
@@ -54,9 +65,11 @@ Input_score::Input_score()
 void
 Input_score::print()const
 {
 void
 Input_score::print()const
 {
+    #ifndef NPRINT
     mtor << "Input_score {\n";
     for (iter_top(staffs_,i); i.ok(); i++) {
        i->print();
     }
     mtor << "}\n";
     mtor << "Input_score {\n";
     for (iter_top(staffs_,i); i.ok(); i++) {
        i->print();
     }
     mtor << "}\n";
+#endif
 }
 }
index 1786f3e29359be6e4401c522e461b9fe2f3589f6..c121984cd08aba4feed722be521a2ba1c516ae06 100644 (file)
@@ -1,8 +1,8 @@
 #include "getcommand.hh"
 #include "debug.hh"
 #include "getcommand.hh"
 #include "debug.hh"
+#include "score.hh"
 #include "inputmusic.hh"
 #include "inputstaff.hh"
 #include "inputmusic.hh"
 #include "inputstaff.hh"
-#include "inputcommands.hh"
 #include "inputcommand.hh"
 #include "staffcommands.hh"
 #include "melodicstaff.hh"
 #include "inputcommand.hh"
 #include "staffcommands.hh"
 #include "melodicstaff.hh"
@@ -30,7 +30,7 @@ Input_staff::add(Input_music*m)
 }
 
 Staff*
 }
 
 Staff*
-Input_staff::parse(PointerList<Input_command*> score_wide, Score*score_l)
+Input_staff::parse(Score*score_l)
 {
     Staff *p=0;
     
 {
     Staff *p=0;
     
@@ -39,29 +39,30 @@ Input_staff::parse(PointerList<Input_command*> score_wide, Score*score_l)
     else if (type == "rhythmic")
        p = new Rhythmic_staff;
     p->score_l_ = score_l;
     else if (type == "rhythmic")
        p = new Rhythmic_staff;
     p->score_l_ = score_l;
+    p->define_spot_str_ = define_spot_str_;
+    
     for (iter_top(music_,i); i.ok(); i++) {
        Voice_list vl = i->convert();
        p->add(vl);
     }
     for (iter_top(music_,i); i.ok(); i++) {
        Voice_list vl = i->convert();
        p->add(vl);
     }
-
-    Input_commands commands;
-    for (iter_top(score_wide,i); i.ok(); i++) 
-       commands.add(**i);
-    for (iter_top(commands_,i); i.ok(); i++) 
-       commands.add(**i);
-
-    commands.parse(p);
-
+    
+    {
+       Array<String> mark_arr;
+       Array<Moment> moment_arr;
+       p->get_marks(mark_arr, moment_arr);
+       score_l->add_marks(mark_arr, moment_arr);
+    }
+    
     return p;
 }
 
     return p;
 }
 
-Input_staff::Input_staff(Input_staff&s)
+Input_staff::Input_staff(Input_staff const&s)
 {
     for (iter_top(s.commands_,i); i.ok(); i++)
        commands_.bottom().add(new Input_command(**i));
     for (iter_top(s.music_,i); i.ok(); i++)
        add(i->clone());
 {
     for (iter_top(s.commands_,i); i.ok(); i++)
        commands_.bottom().add(new Input_command(**i));
     for (iter_top(s.music_,i); i.ok(); i++)
        add(i->clone());
-
+    define_spot_str_ = s.define_spot_str_;
     type = s.type;
 }
 
     type = s.type;
 }
 
index 9f99dd27134fafd5c4129ce9297883beeb4088ba..2b15b352e866a14fd84438e2f8ee417cd43e4399 100644 (file)
@@ -184,7 +184,7 @@ include           { BEGIN(incl); }
        mtor << "parens\n";
        return YYText()[0];
 }
        mtor << "parens\n";
        return YYText()[0];
 }
-[:=]           {
+[*:=]          {
        char c = YYText()[0];
        mtor << "misc char" <<c<<"\n";
        return c;
        char c = YYText()[0];
        mtor << "misc char" <<c<<"\n";
        return c;
index b401071f3a5c967a927de5db630fb12467724cb3..cd2dc79719a50d36e138947933fde267b83538a9 100644 (file)
@@ -1,6 +1,7 @@
 #include <fstream.h>
 #include "lexer.hh"
 #include "debug.hh"
 #include <fstream.h>
 #include "lexer.hh"
 #include "debug.hh"
+#include "main.hh"
 
 My_flex_lexer *lexer=0;
 
 
 My_flex_lexer *lexer=0;
 
@@ -41,16 +42,18 @@ Input_file::Input_file(String s)
 {
     name = s;
     line = 1;
 {
     name = s;
     line = 1;
-    if (s=="")
+    String pf(s);
+    if (pf=="")
        is = &cin;
        is = &cin;
-    else
-       is = new ifstream( s );
-    
-   if ( ! *is) {
-       String e("can\'t open `"  + s+"\'");
-      error(e);
-   }
-   cout << "["<<s<<flush;
+    else {
+       pf =find_file(pf);
+       if (pf=="") {
+           String e("can\'t open `"  + s+"\'");
+           error(e);
+       }
+       is = new ifstream(  pf);
+    }
+    cout << "["<<pf<<flush;
 }
 
 Input_file::~Input_file()
 }
 
 Input_file::~Input_file()
index 920d3ba7abb7344f8fef66aaa3545e2b3ee91ac7..8ce517a7a276f17b696f22cb5c89dcf65420c49a 100644 (file)
@@ -46,7 +46,11 @@ Spacing_problem::OK() const
     for (int i = 0; i < cols.size(); i++) {
        bool c=false;
        for (int j =0; j<fixed.size(); j++)
     for (int i = 0; i < cols.size(); i++) {
        bool c=false;
        for (int j =0; j<fixed.size(); j++)
-           c |=  connected.equiv(j,i);
+           c |=  connected.equiv(fixed[j],i);
+       if (!c)
+           WARN << "You have unconnected columns. \n"
+               "Check if bars and music fit each other\n"
+               "(crashing :-)\n";
        assert(c);
     }
 #endif    
        assert(c);
     }
 #endif    
@@ -56,12 +60,12 @@ bool
 Spacing_problem::check_constraints(Vector v) const 
 {
     int dim=v.dim();
 Spacing_problem::check_constraints(Vector v) const 
 {
     int dim=v.dim();
-    // mtor << "checking solution " << v << '\n';
     for (int i=0; i < dim; i++) {
 
     for (int i=0; i < dim; i++) {
 
-       if (cols[i].fixed()&& abs(cols[i].fixed_position() - v(i)) > COLFUDGE) {
+       if (cols[i].fixed()&&
+           abs(cols[i].fixed_position() - v(i)) > COLFUDGE) 
            return false;
            return false;
-       }
+       
        if (!i) 
            continue;
        
        if (!i) 
            continue;
        
@@ -73,19 +77,9 @@ Spacing_problem::check_constraints(Vector v) const
        bool b = (dif > - COLFUDGE);
        
 
        bool b = (dif > - COLFUDGE);
        
 
-#if 1
        if (!b)
            return false;
 
        if (!b)
            return false;
 
-#else
-       mtor << "dif= "<<dif<<" fudge= " << COLFUDGE<< " dif >fudge= "<<
-           b << "\n";
-       
-       /* fucks up for unknown reasons */
-       if (dif  < -COLFUDGE)
-           return false;
-#endif
-
     }
     return true;
 }
     }
     return true;
 }
index c4b48ff238ff6bb716beb13926387f1c0dee219a..67ccf5dfeb24f8250e5b7bfef26573a9ad030eb5 100644 (file)
@@ -4,14 +4,20 @@
 #include "misc.hh"
 #include "string.hh"
 #include "main.hh"
 #include "misc.hh"
 #include "string.hh"
 #include "main.hh"
+#include "path.hh"
+#include "config.hh"
 
 extern void parse_file(String s);
 
 
 extern void parse_file(String s);
 
+
+void
+destill_inname( String &inName);
 long_option_init theopts[] = {
     1, "output", 'o',
     0, "warranty", 'w',
     0, "help", 'h',
     0, "debug", 'd',
 long_option_init theopts[] = {
     1, "output", 'o',
     0, "warranty", 'w',
     0, "help", 'h',
     0, "debug", 'd',
+    1, "include", 'I',
     0,0,0
 };
 
     0,0,0
 };
 
@@ -23,15 +29,17 @@ help()
        "--warranty, -w         show warranty & copyright\n"
        "--output, -o           set default output\n"
        "--debug, -d            enable debug output\n"
        "--warranty, -w         show warranty & copyright\n"
        "--output, -o           set default output\n"
        "--debug, -d            enable debug output\n"
+        "--include, -I         add to file search path.\n"
        ;
     
 }
        ;
     
 }
+
 void notice()
 {
     cout <<
        "\n"
        "LilyPond, a music typesetter.\n"
 void notice()
 {
     cout <<
        "\n"
        "LilyPond, a music typesetter.\n"
-       "Copyright (C) 1996 by\n"
+       "Copyright (C) 1996,97 by\n"
        "  Han-Wen Nienhuys <hanwen@stack.nl>\n"
        "  Jan-Nieuwenhuizen <jan@digicash.com>\n"
        "\n"
        "  Han-Wen Nienhuys <hanwen@stack.nl>\n"
        "  Jan-Nieuwenhuizen <jan@digicash.com>\n"
        "\n"
@@ -50,11 +58,22 @@ void notice()
        "USA.\n";
 }
 
        "USA.\n";
 }
 
+static File_path * path =0;
+struct Main_init {
+    Main_init() {
+       path = new File_path(LIBDIR);
+       path->add(String(LIBDIR)+"init/");
+       debug_init();
+    }
+    ~Main_init() {
+       delete path;
+    }
+} main_init;
+
 int
 main (int argc, char **argv)
 int
 main (int argc, char **argv)
-{
+{    
     Getopt_long oparser(argc, argv,theopts);
     Getopt_long oparser(argc, argv,theopts);
-    debug_init();
     cout << get_version();
     
     while (long_option_init * opt = oparser()) {
     cout << get_version();
     
     while (long_option_init * opt = oparser()) {
@@ -66,6 +85,9 @@ main (int argc, char **argv)
            notice();
            exit(0);
            break;
            notice();
            exit(0);
            break;
+       case 'I':
+           path->add(oparser.optarg);
+           break;
        case 'h':
            help();
            exit(0);
        case 'h':
            help();
            exit(0);
@@ -82,7 +104,9 @@ main (int argc, char **argv)
     int p=0;
     char *arg ;
     while ( (arg= oparser.get_next_arg()) ) {
     int p=0;
     char *arg ;
     while ( (arg= oparser.get_next_arg()) ) {
-       parse_file(arg);        
+       String f(arg);
+       destill_inname(f);
+       parse_file(f);
        do_scores();
        p++;
     }
        do_scores();
        p++;
     }
@@ -90,6 +114,32 @@ main (int argc, char **argv)
        parse_file(""); 
        do_scores();
     }
        parse_file(""); 
        do_scores();
     }
-       
-    exit (0);
+
+    return 0;
 }
 }
+
+String
+find_file(String f)
+{
+    return path->find(f);
+}
+
+/// make input file name: add default extension. "" is stdin.
+void
+destill_inname( String &inName)
+{
+    if ( inName.len() )
+        {
+        if( inName[ 0 ] != '-' ) 
+           {
+           String a,b,c,d;
+           split_path(inName,a,b,c,d);
+
+           // add extension if not present.
+           if (d == "") 
+               d = ".ly";
+           inName = a+b+c+d;
+           }
+       } else inName = "";   
+}
+
index 53763a6ab24c5ed0f506dbc796baa40d588aca38..824a1ac809e3f632a13f62c754020a41be0324e0 100644 (file)
 static Keyword_ent the_key_tab[]={
     "bar", BAR,
     "bass", BASS,
 static Keyword_ent the_key_tab[]={
     "bar", BAR,
     "bass", BASS,
+    "cadenza", CADENZA,
     "clef", CLEF,
     "cm", CM,
     "commands", COMMANDS,
     "duration", DURATIONCOMMAND,
     "geometric", GEOMETRIC,
     "clef", CLEF,
     "cm", CM,
     "commands", COMMANDS,
     "duration", DURATIONCOMMAND,
     "geometric", GEOMETRIC,
+    "goto", GOTO,
     "in", IN,
     "in", IN,
-    "key", KEY, 
+    "key", KEY,
+    "mark", MARK,
     "melodic", MELODIC,
     "meter", METER,
     "mm", MM,
     "melodic", MELODIC,
     "meter", METER,
     "mm", MM,
@@ -92,14 +95,19 @@ My_flex_lexer::~My_flex_lexer()
     delete the_id_tab;
 }
 
     delete the_id_tab;
 }
 
+String
+My_flex_lexer::spot()const
+{
+    return include_stack.top()->name +  ": " + lineno();
+}
+
 void
 My_flex_lexer::LexerError(const char *s)
 {
     if (lexer->include_stack.empty()) {
 void
 My_flex_lexer::LexerError(const char *s)
 {
     if (lexer->include_stack.empty()) {
-       *mlog << "error at EOF" << s;
+       *mlog << "error at EOF" << s << '\n';
     }else 
     }else 
-       *mlog << lexer->include_stack.top()->name <<  ": " <<
-        lexer->lineno() <<  ": error:" << s << '\n';
+       *mlog << spot() << ": error:" << s << '\n';
      exit(1);
 }
 // set the  new input to s, remember old file.
      exit(1);
 }
 // set the  new input to s, remember old file.
index 4454e67727b7c054754d27dcb2cec9a91471b7ed..5c132038bcd529799aa437d7ab3932a7b3abbbc3 100644 (file)
@@ -236,3 +236,11 @@ get_text_req(int d , Text_def*def)
     return new Text_req(d, def);
 }
 
     return new Text_req(d, def);
 }
 
+Voice_element*
+get_mark_element(String s)
+{
+    Voice_element*v_p = new Voice_element;
+    v_p->add( new Mark_req(s));
+    
+    return v_p;
+}
index a2603284b3de3efecb140cc1e3290ef14ef357b0..c11143f0d1d230cffe490ab4bb7e6363533ccaa0 100644 (file)
@@ -19,6 +19,7 @@
 #endif
 
 Array<Request*> pre_reqs, post_reqs;
 #endif
 
 Array<Request*> pre_reqs, post_reqs;
+sstack<String> define_spots;
 
 Paperdef*default_paper();
 %}
 
 Paperdef*default_paper();
 %}
@@ -40,6 +41,7 @@ Paperdef*default_paper();
     int i;
     char c;
     int ii[10];
     int i;
     char c;
     int ii[10];
+       Moment *moment;
 
     Array<String> * strvec;
     Array<Input_command*> *commandvec;
 
     Array<String> * strvec;
     Array<Input_command*> *commandvec;
@@ -62,8 +64,9 @@ Paperdef*default_paper();
 %token CM IN PT MM PAPER WIDTH METER UNITSPACE SKIP COMMANDS
 %token GEOMETRIC START_T DURATIONCOMMAND OCTAVECOMMAND
 %token KEY CLEF VIOLIN BASS MULTI TABLE CHORD VOICES
 %token CM IN PT MM PAPER WIDTH METER UNITSPACE SKIP COMMANDS
 %token GEOMETRIC START_T DURATIONCOMMAND OCTAVECOMMAND
 %token KEY CLEF VIOLIN BASS MULTI TABLE CHORD VOICES
-%token PARTIAL RHYTHMIC MELODIC MUSIC GROUPING
+%token PARTIAL RHYTHMIC MELODIC MUSIC GROUPING CADENZA
 %token END SYMBOLTABLES TEXID TABLE NOTENAMES SCRIPT TEXTSTYLE PLET
 %token END SYMBOLTABLES TEXID TABLE NOTENAMES SCRIPT TEXTSTYLE PLET
+%token MARK GOTO
 
 %token <id>  IDENTIFIER
 %token <string> NEWIDENTIFIER 
 
 %token <id>  IDENTIFIER
 %token <string> NEWIDENTIFIER 
@@ -81,7 +84,7 @@ Paperdef*default_paper();
 %type <paper> paper_block paper_body
 %type <real> dim
 %type <ii> duration
 %type <paper> paper_block paper_body
 %type <real> dim
 %type <ii> duration
-%type <real> duration_length
+%type <moment> duration_length
 %type <el> voice_elt full_element
 %type <command> score_command staff_command skipcommand
 %type <score> score_block score_body
 %type <el> voice_elt full_element
 %type <command> score_command staff_command skipcommand
 %type <score> score_block score_body
@@ -182,7 +185,11 @@ notename_tab_body:                         {
 /*
        SCORE
 */
 /*
        SCORE
 */
-score_block: SCORE '{' score_body '}'  { $$ = $3;
+score_block: SCORE 
+               { define_spots.push(lexer->spot()); }
+       '{' score_body '}'      {
+               $$ = $4;
+               $$->define_spot_str_ = define_spots.pop();
                if (!$$->paper_)
                        $$->paper_ = default_paper();
        }
                if (!$$->paper_)
                        $$->paper_ = default_paper();
        }
@@ -209,7 +216,7 @@ score_commands_body:                        { $$ = new Array<Input_command*>; }
        }
        ;
 
        }
        ;
 
-staff_commands_block: COMMANDS '{' staff_commands_body '}'     {
+staff_commands_block: COMMANDS '{' staff_commands_body '}'     {       
                $$ = $3; }
        ;
 
                $$ = $3; }
        ;
 
@@ -233,14 +240,22 @@ staff_command:
        ;
 
 duration_length:       
        ;
 
 duration_length:       
-        duration               {
-               $$ = wholes($1[0], $1[1]);
+       duration                {
+               $$ = new Moment(wholes($1[0], $1[1]));
+       }
+       |int '*' duration       {
+               $$ = new Moment($1 * wholes($3[0], $3[1]));
        }
        ;
 
 skipcommand:
        SKIP int ':' duration_length            {
        }
        ;
 
 skipcommand:
        SKIP int ':' duration_length            {
-               $$ = get_skip_command($2, $4);
+               $$ = get_skip_command($2, *$4);
+               delete $4;
+       }
+       | GOTO STRING   {
+               $$ = get_goto_command(*$2);
+               delete $2;
        }
 
 score_command:
        }
 
 score_command:
@@ -249,16 +264,20 @@ score_command:
                $$ = get_bar_command(*$2);
                delete $2;
        }
                $$ = get_bar_command(*$2);
                delete $2;
        }
-       | METER  int int                {
-               $$ = get_meterchange_command($2, $3);
+       | METER  int '*' int            {
+               $$ = get_meterchange_command($2, $4);
        }
        | PARTIAL duration_length               {
        }
        | PARTIAL duration_length               {
-               $$ = get_partial_command($2);
+               $$ = get_partial_command(*$2);
+               delete $2;
        }
        | GROUPING int_list             {
                $$ = get_grouping_command(*$2);
                delete $2;
        }
        }
        | GROUPING int_list             {
                $$ = get_grouping_command(*$2);
                delete $2;
        }
+       | CADENZA int   {
+               $$ = get_cadenza_toggle($2);
+       }
        ;
 
 
        ;
 
 
@@ -267,7 +286,9 @@ score_command:
        PAPER
 */
 paper_block:
        PAPER
 */
 paper_block:
-       PAPER '{' paper_body '}'        { $$ = $3; }
+       PAPER
+
+       '{' paper_body '}'      { $$ = $3; }
        ;
 
 paper_body:
        ;
 
 paper_body:
@@ -287,7 +308,11 @@ paper_body:
        STAFFs
 */
 staff_block:
        STAFFs
 */
 staff_block:
-       STAFF '{' staff_body '}'        { $$ = $3; }
+       STAFF   { define_spots.push(lexer->spot()); }
+/*cont*/       '{' staff_body '}'      {
+               $$ = $4; 
+               $$->define_spot_str_ = define_spots.pop();
+       }
        ;
 
 
        ;
 
 
@@ -475,18 +500,23 @@ duration:         {
        | int           {
                get_default_duration($$);
                $$[0] = $1;
        | int           {
                get_default_duration($$);
                $$[0] = $1;
+               $$[1] = 0;
        }
        | int DOTS      {
                $$[0] = $1;
                $$[1] = $2;
        }
        }
        | int DOTS      {
                $$[0] = $1;
                $$[1] = $2;
        }
+       | DOTS  {
+                get_default_duration($$);
+                $$[1] = $1;
+       }
        ;
 
 pitchmod:              { $$ = new String; }
        |PITCHMOD       
        ;
 
        ;
 
 pitchmod:              { $$ = new String; }
        |PITCHMOD       
        ;
 
-voice_elt:     
+voice_elt:
        pitchmod NOTENAME duration                      {
                $$ = get_note_element(*$1, $2, $3);
                delete $1;
        pitchmod NOTENAME duration                      {
                $$ = get_note_element(*$1, $2, $3);
                delete $1;
@@ -496,6 +526,10 @@ voice_elt:
                delete $1;
 
        }
                delete $1;
 
        }
+       | MARK STRING   {
+               $$ = get_mark_element(*$2);
+               delete $2;
+       }
        ;
 
 /*
        ;
 
 /*
@@ -623,6 +657,7 @@ parse_file(String s)
    lexer->new_input(s);
    yyparse();
    kill_lexer();
    lexer->new_input(s);
    yyparse();
    kill_lexer();
+   assert(define_spots.empty());
 }
 
 Paperdef*
 }
 
 Paperdef*
index b64873345d6e4d91b9a3b16f416fdca3665a6aa9..4c9ef91afcb4de8169b0fd46c750b2e9569154c5 100644 (file)
@@ -43,7 +43,8 @@ PCol::print() const
        postbreak_p_->print();
     } else if (daddy_l_) {
        mtor<<'\n' << ((this == daddy_l_->prebreak_p_) ?
        postbreak_p_->print();
     } else if (daddy_l_) {
        mtor<<'\n' << ((this == daddy_l_->prebreak_p_) ?
-                      "prebreak_p_" : "postbreak");
+                      "prebreak" : "postbreak");
+       mtor << '\n';
     }
     mtor << "extent: " << width().str() << "\n";
     mtor << "}\n";
     }
     mtor << "extent: " << width().str() << "\n";
     mtor << "}\n";
index 696c54283848d27dc957d386d4f5db91b28d634f..8251135cdee72571a50900beb286b47a1b1d8f30 100644 (file)
@@ -33,7 +33,7 @@ PScore::clean_cols()
 {
     for (iter_top(cols,c); c.ok(); )
        if (!c->used()) {
 {
     for (iter_top(cols,c); c.ok(); )
        if (!c->used()) {
-           c.del();
+           delete c.get();
        } else
            c++;
 }
        } else
            c++;
 }
index f87f103a6c285e53445356c735bd722b7275c9d7..8cc3bf149581700abd7b040e2ee03620b482d798 100644 (file)
@@ -11,6 +11,7 @@ RCONS(Rest_req);
 RCONS(Barcheck_req);
 RCONS(Text_req);
 RCONS(Rhythmic_req);
 RCONS(Barcheck_req);
 RCONS(Text_req);
 RCONS(Rhythmic_req);
+RCONS(Mark_req);
 RCONS(Stem_req);
 RCONS(Script_req);
 RCONS(Note_req);
 RCONS(Stem_req);
 RCONS(Script_req);
 RCONS(Note_req);
@@ -18,7 +19,11 @@ RCONS(Melodic_req);
 RCONS(Span_req);
 RCONS(Slur_req);
 RCONS(Beam_req);
 RCONS(Span_req);
 RCONS(Slur_req);
 RCONS(Beam_req);
-
+void
+Stem_req::print() const
+{
+    mtor << "Stem\n";
+}
 void
 Barcheck_req::print() const    
 {
 void
 Barcheck_req::print() const    
 {
@@ -80,7 +85,7 @@ Rhythmic_req::print() const
     while (d--)
        mtor << '.';
     
     while (d--)
        mtor << '.';
     
-    mtor<<"xPlet factor"<<plet_factor<<"\n";
+    mtor<<", plet factor"<<plet_factor<<"\n";
 }
 
 void
 }
 
 void
@@ -168,4 +173,15 @@ Text_req::~Text_req()
     delete spec;
 }
 
     delete spec;
 }
 
+Mark_req::Mark_req(String s)
+{
+    mark_str_ = s;
+}
 
 
+void
+Mark_req::print()const
+{
+#ifndef NDEBUG
+    mtor<< "Mark `" << mark_str_ << "\'\n";
+#endif
+}
index 706fc53d99e2cfe854ad332f00da27671b2c96a2..edd26aaf7baf3e9b082b845dd15b7cc3cc9bc70d 100644 (file)
@@ -13,8 +13,10 @@ Score::process()
     *mlog << "\nProcessing music ... ";
     
     assert (paper_p_);
     *mlog << "\nProcessing music ... ";
     
     assert (paper_p_);
-    
-    /// distribute commands to disciples
+    if (last() == Moment(0)) {
+       error("Need to have music in a score.");
+    }
+    // distribute commands to disciples
     pscore_p_ = new PScore(paper_p_);
     for (iter_top(staffs_,i); i.ok(); i++) {
        i->truncate_cols(last());
     pscore_p_ = new PScore(paper_p_);
     for (iter_top(staffs_,i); i.ok(); i++) {
        i->truncate_cols(last());
@@ -25,6 +27,7 @@ Score::process()
     // do this after processing, staffs first have to generate PCols.
     find_col(last(), false)->set_breakable();
     do_cols();
     // do this after processing, staffs first have to generate PCols.
     find_col(last(), false)->set_breakable();
     do_cols();
+    print();
     calc_idealspacing();
 
     // debugging
     calc_idealspacing();
 
     // debugging
@@ -42,7 +45,7 @@ Score::clean_cols()
     
     for (iter_top(cols_,c); c.ok(); ) {
        if (!c->pcol_l_->used()) {
     
     for (iter_top(cols_,c); c.ok(); ) {
        if (!c->pcol_l_->used()) {
-           c.del();
+           delete c.get();
        } else {
            c->preprocess();
            c++;
        } else {
            c->preprocess();
            c++;
@@ -53,7 +56,6 @@ Score::clean_cols()
   this sux.  We should have Score_column create the appropriate PCol.
   Unfortunately, PCols don't know about their position.    
   */
   this sux.  We should have Score_column create the appropriate PCol.
   Unfortunately, PCols don't know about their position.    
   */
-// todo
 PCursor<Score_column*>
 Score::create_cols(Moment w)
 {
 PCursor<Score_column*>
 Score::create_cols(Moment w)
 {
@@ -174,7 +176,9 @@ Score::output(String s)
        paper_p_->outfile = s;
     
     *mlog << "output to " << paper_p_->outfile << "...\n";
        paper_p_->outfile = s;
     
     *mlog << "output to " << paper_p_->outfile << "...\n";
-    Tex_stream the_output(paper_p_->outfile);    
+    
+    Tex_stream the_output(paper_p_->outfile);
+    the_output << "% outputting Score, defined at: " << define_spot_str_ << "\n";
     pscore_p_->output(the_output);
 }
 
     pscore_p_->output(the_output);
 }
 
@@ -187,3 +191,16 @@ Score::add(Staff*s)
     staffs_.bottom().add(s);
 }
 
     staffs_.bottom().add(s);
 }
 
+void
+Score::add_marks(Array<String> s_arr, Array<Moment> m_arr)
+{
+    for (int i=0; i < s_arr.size(); i++) {
+       String mark_str (s_arr[i]);
+       if (markers_assoc_.elt_query(mark_str) &&
+           m_arr[i] != markers_assoc_[mark_str])
+           
+           error("Conflicting marker: `" + s_arr[i]+ "\'");
+       else
+           markers_assoc_[s_arr[i]] = m_arr[i];
+    }
+}
index 1b7b6558de72fbb02545f336fd0df2b5252448b4..bdd53716456a8c5097b30af051a06b7a9684d018 100644 (file)
@@ -5,7 +5,7 @@
 
 static Array<Input_score*> score_array_global;
 
 
 static Array<Input_score*> score_array_global;
 
-static String outfn="lelie.uit";
+static String outfn="lelie.out";
 
 // todo: check we don't overwrite default output.
 void
 
 // todo: check we don't overwrite default output.
 void
index 4f5ed1c0e7ca23e16a7e74db12bad72fd2eb1a3a..54e6d652fabb86cf5bbd5868b8ddb480822bae7c 100644 (file)
@@ -40,16 +40,17 @@ Script::set_default_dir()
 void
 Script::set_default_pos()
 {
 void
 Script::set_default_pos()
 {
-    Real inter= paper()->internote();
+    Real inter_f= paper()->internote();
     Interval dy = symbol().dim.y;
     
     int d = specs_l_->staffdir;
     Interval dy = symbol().dim.y;
     
     int d = specs_l_->staffdir;
+    Real y  ;
     if (!d) {
        Interval v= support->height();
     if (!d) {
        Interval v= support->height();
-       pos = rint((v[dir]  -dy[-dir])/inter) + dir* 2;
+       y = v[dir]  -dy[-dir] + 2*dir*inter_f;
     } else {
        Real y  = (d > 0) ? staffsize + 2: -2; // ug
     } else {
        Real y  = (d > 0) ? staffsize + 2: -2; // ug
-       y *=inter;
+       y *=inter_f;
        Interval v= support->height();
 
        if (d > 0) {
        Interval v= support->height();
 
        if (d > 0) {
@@ -57,18 +58,18 @@ Script::set_default_pos()
        } else if (d < 0) {
            y = y <? v.min();
        }
        } else if (d < 0) {
            y = y <? v.min();
        }
+    }
+    if (stem_l_) {
+       Interval v= stem_l_->height();
 
 
-       if (stem_l_) {
-           Interval v= stem_l_->height();
-
-           if (d > 0) {
-               y = y >? v.max();
-           }else if (d < 0) {
-               y = y <? v.min();
-           }
+       if (d > 0 || (!d && dir > 0)) {
+           y = y >? v.max();
+       }else if (d < 0 || (!d && dir < 0)) {
+           y = y <? v.min();
        }
        }
-       pos = int(rint(Real(y)/inter));
     }
     }
+    
+    pos = int(rint(Real(y)/inter_f));
 }
 
 Interval
 }
 
 Interval
@@ -80,8 +81,8 @@ Script::width() const
 Symbol
 Script::symbol()const
 {
 Symbol
 Script::symbol()const
 {
-    String preidx = (symdir < 0) ?"-" :"";
-    return paper()->lookup_p_->script(preidx+specs_l_->symidx);
+    String preidx_str = (symdir < 0) ?"-" :"";
+    return paper()->lookup_p_->script(preidx_str + specs_l_->symidx);
 }
 
 void
 }
 
 void
index de3d6ec921ac0db212b597d92236defbad58bcd8..e5b992ec3fa1aaa4bee884388fe93a78eeb1b88f 100644 (file)
@@ -49,13 +49,13 @@ Simple_column::typeset_item(Item *i, int breakst)
 {
     assert(i);
     
 {
     assert(i);
     
-    staff_->pscore_l_->typeset_item(i, score_column_l_->pcol_l_,
-                                 staff_->theline,breakst);
+    staff_l_->pscore_l_->typeset_item(i, score_column_l_->pcol_l_,
+                                 staff_l_->theline,breakst);
     
     if (breakst == BREAK_PRE - BREAK_PRE) {
        
         Array<Item*> to_move(
     
     if (breakst == BREAK_PRE - BREAK_PRE) {
        
         Array<Item*> to_move(
-           staff_->pscore_l_->select_items(staff_->theline,
+           staff_l_->pscore_l_->select_items(staff_l_->theline,
                                          score_column_l_->pcol_l_->prebreak_p_));
        Interval column_wid = itemlist_width(to_move);
        assert(!column_wid.empty());
                                          score_column_l_->pcol_l_->prebreak_p_));
        Interval column_wid = itemlist_width(to_move);
        assert(!column_wid.empty());
@@ -67,7 +67,7 @@ Simple_column::typeset_item(Item *i, int breakst)
 }    
 
 void
 }    
 
 void
-Simple_column::typeset_item_directional(Item *i, int dir, int breakst)
+Simple_column::typeset_item_directional(Item *i, int dir, int breakst) // UGH!
 {
     assert(i);
     PCol * c=score_column_l_->pcol_l_;
 {
     assert(i);
     PCol * c=score_column_l_->pcol_l_;
@@ -76,7 +76,7 @@ Simple_column::typeset_item_directional(Item *i, int dir, int breakst)
     else if (breakst == 2)
        c = c->postbreak_p_;
     
     else if (breakst == 2)
        c = c->postbreak_p_;
     
-    Array<Item*> to_move(staff_->pscore_l_->select_items(staff_->theline,
+    Array<Item*> to_move(staff_l_->pscore_l_->select_items(staff_l_->theline,
                                                      c));    
     typeset_item(i, breakst);
 
                                                      c));    
     typeset_item(i, breakst);
 
index f0087ebd3fda6c45786c881b3613c5507d7e3fd1..83bce6d7e4afb762500fbd545bad20e4f7d7c4db 100644 (file)
@@ -16,7 +16,7 @@ Simple_column::Simple_column(Score_column*s, Simple_staff *rs)
 {
     stem_requester_len = 0;
     stem_ = 0;    
 {
     stem_requester_len = 0;
     stem_ = 0;    
-    staff_ = rs;
+    staff_l_ = rs;
     beam_ = 0;
     text_=0;
 }
     beam_ = 0;
     text_=0;
 }
@@ -47,7 +47,6 @@ Simple_column::process_requests()
                    error("Barcheck failed, " + tdescription_->str());
                }
            }
                    error("Barcheck failed, " + tdescription_->str());
                }
            }
-                                  
            if (rq->rhythmic()){
                notes.add(rq->rhythmic());
            }
            if (rq->rhythmic()){
                notes.add(rq->rhythmic());
            }
index 21ed11573af506ead3bdbd1089fffad83bccf698..33ddf1ea69ef1d00847e165e9027964e0299fe0f 100644 (file)
@@ -185,7 +185,7 @@ Simple_walker::process_requests()
 
        if (sl->spantype == Span_req::START) {
            if  (find_slur(sl->elt_l_->voice_ )>=0)
 
        if (sl->spantype == Span_req::START) {
            if  (find_slur(sl->elt_l_->voice_ )>=0)
-               error_t("Too many slurs in voice", col()->when());
+               error_t("Too many slurs in voice", *col()->tdescription_);
            pending_slur_reqs.add(sl);
            pending_slurs.add(new Slur);
        }
            pending_slur_reqs.add(sl);
            pending_slurs.add(new Slur);
        }
@@ -206,7 +206,7 @@ Simple_walker::process_requests()
     if (beam_) {
        if (!stem_)
            WARN <<"beamed note should have a stem (t = " 
     if (beam_) {
        if (!stem_)
            WARN <<"beamed note should have a stem (t = " 
-                 <<String(c->when())<<"\n";
+                 <<String(c->when())<<")\n";
        else
            beam_->add(stem_);
 
        else
            beam_->add(stem_);
 
@@ -219,6 +219,7 @@ Simple_walker::process_requests()
     }
 
     if (c->beam_&& c->beam_->spantype == Span_req::STOP) {
     }
 
     if (c->beam_&& c->beam_->spantype == Span_req::STOP) {
+       default_grouping.extend(current_grouping->interval());
        beam_->set_grouping(default_grouping, *current_grouping);
        pscore_->typeset_spanner(beam_, s->theline);
 
        beam_->set_grouping(default_grouping, *current_grouping);
        pscore_->typeset_spanner(beam_, s->theline);
 
@@ -251,7 +252,7 @@ Simple_walker::process_requests()
        if (sl->spantype == Span_req::STOP) {
            int idx = find_slur(sl->elt_l_->voice_);
            if (idx < 0)
        if (sl->spantype == Span_req::STOP) {
            int idx = find_slur(sl->elt_l_->voice_);
            if (idx < 0)
-               error_t("can't find slur to end; ", c->when());
+               error_t("can't find slur to end; ", *c->tdescription_);
            
            pscore_->typeset_spanner(pending_slurs[idx],
                                     s->theline);
            
            pscore_->typeset_spanner(pending_slurs[idx],
                                     s->theline);
index ef54dbe466b9ac4c7b1f83113672be9770f3cba6..c6a65e016e3ea33523b530579685139102a84aae 100644 (file)
@@ -6,6 +6,22 @@
 #include "sccol.hh"
 #include "staffcommands.hh"
 #include "debug.hh"
 #include "sccol.hh"
 #include "staffcommands.hh"
 #include "debug.hh"
+#include "inputcommands.hh"
+#include "inputcommand.hh"
+#include "request.hh"
+
+void
+Staff::do_commands(PointerList<Input_command*> score_wide,
+                  PointerList<Input_command*> staff_wide)
+{
+    Input_commands commands;
+    for (iter_top(score_wide,i); i.ok(); i++) 
+       commands.add(**i, score_l_->markers_assoc_);
+    for (iter_top(staff_wide,i); i.ok(); i++) 
+       commands.add(**i,score_l_->markers_assoc_);
+
+    commands.parse(this);
+}
 
 void
 Staff::add(PointerList<Voice*> &l)
 
 void
 Staff::add(PointerList<Voice*> &l)
@@ -19,7 +35,9 @@ Staff::truncate_cols(Moment l)
 {
     iter_bot(cols, i);
     for (; i->when() > l; i=cols.bottom()) {
 {
     iter_bot(cols, i);
     for (; i->when() > l; i=cols.bottom()) {
-       i.del();
+       Staff_column * col_p = i.get();
+       assert(col_p->when() > l);
+       delete col_p;
     }
 }
 
     }
 }
 
@@ -35,7 +53,7 @@ Staff::clean_cols()
     iter_top(cols,i);
     for(; i.ok(); ){
        if (!i->score_column_l_->used())
     iter_top(cols,i);
     for(; i.ok(); ){
        if (!i->score_column_l_->used())
-           i.del();
+           delete i.get();
        else
            i++;
     }
        else
            i++;
     }
@@ -80,8 +98,22 @@ Staff::get_col(Moment w, bool mus)
     return newst;
 }
 
     return newst;
 }
 
-
-
+void
+Staff::get_marks(Array<String>&s_arr, Array<Moment>&m_arr)
+{
+     for (iter_top(voices,i); i.ok(); i++) {
+       Moment now = i->start;
+       for (iter_top(i->elts,j); j.ok(); j++) {
+           for (iter_top(j->reqs, k); k.ok(); k++) {
+               if (k->mark()) { // ugh. 4 levels
+                   s_arr.add(k->mark()->mark_str_);
+                   m_arr.add(now);
+               }
+           }
+           now += j->duration;     
+       }
+     }
+}
 /*
     put all stuff grouped vertically in the Staff_cols
     */
 /*
     put all stuff grouped vertically in the Staff_cols
     */
@@ -90,11 +122,11 @@ Staff::setup_staffcols()
 {    
     for (iter_top(voices,i); i.ok(); i++) {
        Moment now = i->start;
 {    
     for (iter_top(voices,i); i.ok(); i++) {
        Moment now = i->start;
-       for (iter_top(i->elts,ve); ve.ok(); ve++) {
+       for (iter_top(i->elts,j); j.ok(); j++) {
 
 
-           Staff_column *sc=get_col(now,true);
-           sc->add(ve);
-           now += ve->duration;            
+           Staff_column *s_l=get_col(now,true);
+           s_l->add(j);
+           now += j->duration;     
        }       
     }
     set_time_descriptions();
        }       
     }
     set_time_descriptions();
index f99a3d9726678920242fc4fd52ff103a475463c1..82286bd7d64b4d6ab3da21f1f82fb700fbd638a2 100644 (file)
@@ -8,6 +8,7 @@ Staff_commands_at::when()
 {
     return tdescription_.when;
 }
 {
     return tdescription_.when;
 }
+
 void
 Staff_commands_at::print() const
 {
 void
 Staff_commands_at::print() const
 {
index d942732e7c264bc8c96c0513656e9630065125b7..e1b5e4228b3b91e16b5f7edccb23c9f34fde10cb 100644 (file)
@@ -37,24 +37,35 @@ Interval
 Staff_elem::width() const
 {
     Molecule*m= brew_molecule();
 Staff_elem::width() const
 {
     Molecule*m= brew_molecule();
-    Interval r = m->extent().x;
-
-    if (!r.empty())            // float exception on DEC Alpha
-        r+=offset_.x;
+    Interval r;
+
+    if (!output){
+       Molecule*m      = brew_molecule();
+       r = m->extent().x;
+       delete m;
+    } else
+       r = output->extent().x;
+  
+    if (!r.empty()) // float exception on DEC Alpha
+       r+=offset_.x;
 
 
-    delete m;
     return r;
 }
 Interval
 Staff_elem::height() const
 {
     return r;
 }
 Interval
 Staff_elem::height() const
 {
-    Molecule*m= brew_molecule();
-    Interval r = m->extent().y;
+    Interval r;
 
 
+    if (!output){
+       Molecule*m      = brew_molecule();
+       r = m->extent().y;
+       delete m;
+    } else
+       r = output->extent().y;
+    
     if (!r.empty())
        r+=offset_.y;
     if (!r.empty())
        r+=offset_.y;
-     delete m;
+
   
     return r;
 }
   
     return r;
 }
index 46c04cbeadd944afee5f4118e5be90a0c8552784..9d070aa4cca57d21a414e06672b96f706ac55299 100644 (file)
@@ -12,7 +12,7 @@ Staff_column::OK() const
        assert(tdescription_->when == when());
        assert(*tdescription_ == staff_commands_p_->tdescription_);
     }
        assert(tdescription_->when == when());
        assert(*tdescription_ == staff_commands_p_->tdescription_);
     }
-    #endif
+#endif
 }
 
 bool
 }
 
 bool
index 652360eee871351fdd7e114b8840a3a04fad37fa..bded0d7751661cce243332489b5783aeda5659b7 100644 (file)
@@ -66,9 +66,10 @@ Lookup::beam(Real &slope, Real width)
     int sidx = slope_index(slope);
     if (!slope)
        return rule_symbol(convert_dimen(2,"pt"), width);
     int sidx = slope_index(slope);
     if (!slope)
        return rule_symbol(convert_dimen(2,"pt"), width);
-    if (width < convert_dimen(2,"pt"))
-       error("Beam too narrow. " );
-    
+    if (width < convert_dimen(2,"pt")) {
+       WARN<<"Beam too narrow.\n";
+       width = convert_dimen(2,"pt");
+    }
     Real elemwidth = convert_dimen(64,"pt");
     int widx = 5;
 
     Real elemwidth = convert_dimen(64,"pt");
     int widx = 5;
 
index 3fd96839262f74d18efcd66be34aaa341483ca0d..43cfda3f3586bbc6eb1236be70fd409de6f5532e 100644 (file)
@@ -2,6 +2,7 @@
 #include "boxes.hh"
 #include "textspanner.hh"
 #include "textdef.hh"
 #include "boxes.hh"
 #include "textspanner.hh"
 #include "textdef.hh"
+#include "debug.hh"
 
 Text_spanner::Text_spanner(Directional_spanner*d)
 {
 
 Text_spanner::Text_spanner(Directional_spanner*d)
 {
@@ -33,10 +34,15 @@ Text_spanner::brew_molecule() const
     output->add( tsym );
     return output;
 }
     output->add( tsym );
     return output;
 }
+
 void
 Text_spanner::print() const    // todo
 {
 void
 Text_spanner::print() const    // todo
 {
+#ifndef NDEBUG
+    mtor << "Text_spanner\n";
+#endif
 }
 }
+
 void
 Text_spanner::do_pre_processing()
 {
 void
 Text_spanner::do_pre_processing()
 {
index ce9b667aafdba0994d0de51bd16ec56dba970cd5..9ffb981c852e4970812c5294771a63bf174eb7ca 100644 (file)
@@ -3,7 +3,8 @@
 String
 Time_description::str()const
 {
 String
 Time_description::str()const
 {
-    String s( "Time_description { at ");
+    String s( "Time_description { ");
+    s+=String( " cadenza: ") + cadenza_b_ + " at ";
     s+=when;
     s+="\nmeter " + String(whole_per_measure/one_beat) +":" +(1/one_beat);
     s+= "\nposition "+String( bars) + ":"+ whole_in_measure +"\n}\n";
     s+=when;
     s+="\nmeter " + String(whole_per_measure/one_beat) +":" +(1/one_beat);
     s+= "\nposition "+String( bars) + ":"+ whole_in_measure +"\n}\n";
@@ -19,19 +20,34 @@ void
 Time_description::OK() const
 {
 #ifdef NDEBUG
 Time_description::OK() const
 {
 #ifdef NDEBUG
-    assert(whole_in_measure < whole_per_measure && 0 <= whole_in_measure);
+    if (!cadenza_b_)
+       assert(whole_in_measure < whole_per_measure);
+    assert(0 <= whole_in_measure);
     assert(one_beat);
 #endif
 }
 
     assert(one_beat);
 #endif
 }
 
+void
+Time_description::set_cadenza(bool b)
+{
+    if (cadenza_b_ && !b) {
+       if (whole_in_measure) {
+           bars ++;
+           whole_in_measure = 0;
+       }
+    }
+    cadenza_b_ = b ;
+}
+
 Time_description::Time_description(Moment dt, Time_description const *prev)
 {
     if (prev) {
        assert(dt >= 0);
        *this = *prev;
 Time_description::Time_description(Moment dt, Time_description const *prev)
 {
     if (prev) {
        assert(dt >= 0);
        *this = *prev;
-       when += + dt;
+       when +=  dt;
        whole_in_measure += dt;
        whole_in_measure += dt;
-       while ( whole_in_measure >= whole_per_measure ) {
+       
+       while ( !cadenza_b_ && whole_in_measure >= whole_per_measure ) {
            whole_in_measure -= whole_per_measure;
            bars ++;
        }
            whole_in_measure -= whole_per_measure;
            bars ++;
        }
@@ -41,7 +57,8 @@ Time_description::Time_description(Moment dt, Time_description const *prev)
        one_beat = 0.25;
        when = 0.0;
        bars = 0;
        one_beat = 0.25;
        when = 0.0;
        bars = 0;
-    }  
+       cadenza_b_ = false;
+    }
 }
 
 void
 }
 
 void
@@ -50,21 +67,24 @@ Time_description::set_meter(int l, int o)
     assert(o);
     one_beat = 1/Moment(o);
     whole_per_measure = Moment(l) * one_beat;
     assert(o);
     one_beat = 1/Moment(o);
     whole_per_measure = Moment(l) * one_beat;
+    if(whole_in_measure)
+       error_t("Meterchange should be at start of measure", when);
 }
 
 void
 Time_description::setpartial(Moment p)
 {
     if (when)
 }
 
 void
 Time_description::setpartial(Moment p)
 {
     if (when)
-       error_t ("Partial measure only allowed at beginning.", when);
+       error_t ("Partial measure only allowed at beginning.", *this);
     if (p<0||p > whole_per_measure)
     if (p<0||p > whole_per_measure)
-       error_t ("Partial measure has incorrect size", when);
+       error_t ("Partial measure has incorrect size", *this);
     whole_in_measure = whole_per_measure - p;
 }
 
 Moment
 Time_description::barleft()
 {
     whole_in_measure = whole_per_measure - p;
 }
 
 Moment
 Time_description::barleft()
 {
+    assert(!cadenza_b_);
     return whole_per_measure-whole_in_measure;
 }
 
     return whole_per_measure-whole_in_measure;
 }
 
index f4372893afa62993b60ccb7a1faf5a2ddaa8996f..334d1b4a5f6b5c2bce0adc89ac4a11eca5a71258 100644 (file)
@@ -27,17 +27,20 @@ Voice::print() const
 {
 #ifndef NPRINT
     mtor << "start: "<< start<<eol;
 {
 #ifndef NPRINT
     mtor << "start: "<< start<<eol;
-    for (iter_top(elts,vec); vec.ok(); vec++)
-       vec->print();
+    for (iter_top(elts,i); i.ok(); i++)
+       i->print();
 #endif
 }
 
 Moment
 Voice::last() const
 {
 #endif
 }
 
 Moment
 Voice::last() const
 {
-    Moment l =start;
-    for (iter_top(elts,vec); vec.ok(); vec++)
-       l  += vec->duration;
+    Moment l =0;
+    if (elts.size())
+       l = start;
+    
+    for (iter_top(elts,i); i.ok(); i++)
+       l  += i->duration;
     return l;
 }
 /****************************************************************/
     return l;
 }
 /****************************************************************/
index 0c3cac1186d1d1b3022aa209497fdaa18e7e0b15..82a004875aaa91b17cfed0f40c566c317aca6da1 100644 (file)
@@ -1,6 +1,7 @@
 #include "debug.hh"
 #include "lexer.hh"
 #include "moment.hh"
 #include "debug.hh"
 #include "lexer.hh"
 #include "moment.hh"
+#include "timedescription.hh"
 
 ostream &warnout (cerr);
 ostream *mlog(&cerr);
 
 ostream &warnout (cerr);
 ostream *mlog(&cerr);
@@ -24,10 +25,17 @@ error(String s)
 }
 
 void
 }
 
 void
-error_t(const String& s, Moment r)
+error_t(const String& s, const Moment& r)
 {
 {
-    String e=s+ "(t = " + String(r) + ")";
+    String t_mom = String(trunc(r)) +  (r - Moment(trunc(r)));
+    String e=s+ "(t = " +  t_mom + ")";
     error(e);
     error(e);
-    exit(1);
 }
 
 }
 
+
+void
+error_t(const String& s, Time_description const &t_tdes)
+{
+    String e=s+ "(at " + t_tdes.bars + ": " + t_tdes.whole_in_measure + ")\n";
+    error(e);
+}
diff --git a/standchen.tex b/standchen.tex
new file mode 100644 (file)
index 0000000..5ef590b
--- /dev/null
@@ -0,0 +1,13 @@
+\documentclass{article}         %UGH
+\usepackage{a4}
+\begin{document}
+\input lilyponddefs
+\input titledefs
+\def\interscoreline{\vskip12pt}
+\title{St\"andchen}
+\composer{Franz Schubert}
+\instrument{M\"a\ss ig} % heu
+%#%\tempo{M\"a\ss ig}
+\maketit
+\input standchen.uit
+\end{document}
diff --git a/symbol.ini b/symbol.ini
deleted file mode 100644 (file)
index eab55e8..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-include "init/dutch.ini"
-include "init/script.ini"
-include "init/table_sixteen.ini"
-
-
index b6bcb4fe13526c5e485ae1c0b5784ff5b6527b1a..b55575709d31b14d3baf8eadb84e5c0de874ff30 100644 (file)
--- a/test.tex
+++ b/test.tex
@@ -1,3 +1,3 @@
 \input lilyponddefs
 \input lilyponddefs
-\input lelie.uit
+\input lelie.out
 \vfil\bye
\ No newline at end of file
 \vfil\bye
\ No newline at end of file