]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.0.49 release/0.0.49
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 7 Apr 1997 20:44:56 +0000 (22:44 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 7 Apr 1997 20:44:56 +0000 (22:44 +0200)
107 files changed:
.dstreamrc
.version
ANNOUNCE
Documentation/CodingStyle.pod
Documentation/examples.pod
Documentation/lilygut.pod
Documentation/mudela.pod
INSTALL.text
NEWS
TODO
bin/genheader
bin/make_website
bin/release
configure
configure.in
flower/.version
flower/Makefile
flower/NEWS
flower/TODO
flower/config.hh.in
flower/configure
flower/configure.in
flower/dstream.cc
flower/include/assoc.hh
flower/include/list.hh
flower/include/list.tcc
flower/include/plist.hh
flower/include/plist.tcc
flower/include/pointer.hh [new file with mode: 0644]
flower/include/pointer.tcc [new file with mode: 0644]
flower/lgetopt.cc
flower/test/Makefile
init/dutch.ini
init/dynamic.ini
init/swedish.ini
input/cadenza.ly
input/coriolan-alto.ly
input/kortjakje.ly
input/maartje.ly
input/martien.ly
input/martien.tex
input/mlalt.ly
input/mlcello.ly
input/mlvio1.ly
input/mlvio2.ly
input/scales.ly
input/scsii-menuetto.ly
input/scsii-menuetto.tex
input/standchen.ly
input/standchen.tex
input/twinkle.ly
input/wohltemperirt.ly
lib/binary-source-file.cc
lib/duration-convert.cc
lib/duration.cc
lib/include/debug.hh [deleted file]
lib/include/duration.hh
lib/include/warn.hh [new file with mode: 0644]
lib/input.cc
lib/source-file.cc
lib/warn.cc [new file with mode: 0644]
lily/.version
lily/clef-reg.cc
lily/command-request.cc
lily/grouping.cc
lily/identifier.cc
lily/include/clef-reg.hh
lily/include/command-request.hh
lily/include/commandrequest.hh [deleted file]
lily/include/debug.hh [new file with mode: 0644]
lily/include/grouping.hh
lily/include/identifier.hh
lily/include/key-reg.hh
lily/include/key.hh
lily/include/lily-proto.hh
lily/include/local-key-item.hh
lily/include/local-key-reg.hh
lily/include/musical-request.hh
lily/include/my-lily-lexer.hh
lily/include/my-lily-parser.hh
lily/include/notename-table.hh [new file with mode: 0644]
lily/include/score-walker.hh
lily/include/staff-info.hh
lily/key-item.cc
lily/key-reg.cc
lily/key.cc
lily/lexer.l
lily/local-key-reg.cc
lily/main.cc
lily/my-lily-lexer.cc
lily/my-lily-parser.cc
lily/note.cc
lily/notename-table.cc [new file with mode: 0644]
lily/parser.y
lily/score-walker.cc
lily/stem-beam-reg.cc
lily/symtable.cc
lily/warn.cc
make/Makefile
make/lilypond.lsm.in [new file with mode: 0644]
mi2mu/include/mi2mu.hh
mi2mu/lily-stream.cc
mi2mu/main.cc
mi2mu/midi-event.cc
mi2mu/midi-lexer.l
mi2mu/my-midi-lexer.cc
mi2mu/my-midi-parser.cc

index c992908ec43a1c50b96cd66fd5c80ee8de7330da..4e1e791e3e57c96438b73b5b5609c1819026c800 100644 (file)
@@ -2,7 +2,7 @@
 Dstream                        1
 
 File_path              1
-My_lily_lexer          1
+My_lily_lexer          0
 PCol                   1
 Score_column           1
 Ineq_constrained_qp    1
@@ -14,7 +14,7 @@ Idealspacing          1
 
 # yydebug
 InitParser             1
-Parser                 1
+Parser                 0
 InitDeclarations       1
 Declarations           1
 # FlexLexer debug
index d10f3583e1c58cfd725058b678fc81fc185befab..65d7dba42d77b94591d61e68bb8cc14aef3b635b 100644 (file)
--- a/.version
+++ b/.version
@@ -1,6 +1,6 @@
 TOPLEVEL_MAJOR_VERSION = 0
 TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 47
+TOPLEVEL_PATCH_LEVEL = 49
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index f011b485f39c57be97fb8168fddaab35b4a625e2..6d05b1d38c7e8c552194f7749d99f51887aecfbe 100644 (file)
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,4 +1,10 @@
 
+       Announcing
+       
+               LILYPOND
+
+       The Music Typesetter
+
 Do you pine for the nice days of Linux 0.95, when men were men and
 wrote their own applications? Are you without a nice project and just
 dying to cut your teeth into a bleeding edge application you can
@@ -52,8 +58,8 @@ for running you need
 
 FEATURES
 
-ASCII script input, with identifiers (for music reuse), customizable
-notenames
+ASCII script input (mudela), with identifiers (for music reuse),
+customizable notenames
 
 MIDI output lets you check if you have entered the correct notes.
 MIDI to Mudela conversion through the mi2mu program.
index 5ce7a20e04bd83982c930ff5ed7d419fc8a5cdee..c1a9c7aed0981db668ecd76276027c59b2f65aba 100644 (file)
@@ -375,3 +375,5 @@ Variable foo: an C<Int*> that you must delete
 Variable bar: an C<Int*> that you must not delete
 
 =back
+
+Generally default arguments are taboo, except for nil pointers.
index 580ab8c809596f99d0c94948e6e092e72a01594c..48920157ee3b4fd14acaee2b6152cff827f3aa5f 100644 (file)
@@ -72,7 +72,8 @@ Features: auto beams, multiple parralel meters.
 
 =head2 F<scales.ly>
 
-Features: plets, accents, beam steepnesses.
+Features: plets, accents, beam steepnesses, dynamics, crescendi,
+\octave command.
 
 =head2 F<scsii-menuetto.ly>
 
index da7ebcea598b03e70f6162e56afe88c8450b95c7..a1b8497f52071d6d346be5ae1fafa88e88c44707 100644 (file)
@@ -47,6 +47,77 @@ Very simple, just walk all Line_of_* and follow the links over there
 
 =back
 
+Some of the important requests are:
+
+=over 4
+
+=item C<Barcheck_req>
+
+Checks during music processing if start of this voice element
+coincides with the start of a measure. Handy to check if you left out
+some voice elts.
+
+=item C<Note_req>
+
+Staff has to decide if the ball should be hanging left or right. This
+influences the horizontal dimensions of a column, and this  is why
+request processing should be done before horizontal spacing.
+
+Other voices' frivolities may cause the need for accidentals, so this
+is also for the  C<Staff> to decide. The  C<Staff> can decide on positioning
+based on ottava commands and the appropriate clef.
+
+=item C<Rest_req>
+
+Typeset a rest.
+
+=item C<Span_req>
+
+This type of request typically results in the creation of a C<Spanner>
+
+=item C<Beam_req>
+
+Start/stop a beam.
+
+Staff has to combine this request with the stem_request, since the
+number of flags that a stem wants to carry will determine the
+number of beams.
+
+=item  C<Dynamic>
+
+Each dynamic is bound to one note (a crescendo spanning multiple
+notes is thought to be made of two "dynamics": a start and a stop).
+Dynamic changes can occur in a smaller time than the length of its
+note, therefore fore each  C<Dynamic> request carries a time, measured
+from the start of its note.
+
+=head2 Voice
+
+=head2 Voice_element
+
+=head2 Voice groups
+
+=head1 Requests
+
+inc
+The result of a request will be an C<Item> or a C<Spanner>, which
+will be put on a C<PStaff>. Note that the C<PStaff> and the original
+C<Staff> need not have anything in common. For example, the
+``double'' piano Staff could interpret commands which juggle
+melodies across the left and right hand, and may put the result in
+two five-line PStaffs (maybe with extra PStaffs to carry the dynamic
+signs and any lyric.
+
+The class C<Staff> should be thought as a container for the
+C<Voice>s, and an interpreter for C<Request>s.
+Different staffs can produce different outputs; a melodious voice
+which is put into a percussion-Staff, will be typeset as the rythm of
+that voice.
+
+After C<Staff> made up her mind, the resultant items and
+spanners are put on the PScore.
+
+
 =head1 Request_register
 
 In the previous section the idea of Request has been explained, but
@@ -233,8 +304,12 @@ into symbols of other columns.)
 
 [partly by Mark Basinski <basinski@arizona.edu>]
 
-Herbert Chlapik, 
+Herbert Chlapik, Die Praxis des Notengraphikers. Doblinger, 1987.
 
+Maxwell Weaner and Walter Boelke, Standard Music Notation Practice,
+revised edition by Arnold Broido and Daniel Dorff. Music Publisher's
+Association of the United States Inc., 1993.
 W.A. Hegazy and J. S. Gourlay. Optimal line breaking in music. In
 ``Document Manipulation and Typography'', J.C. van Vliet (ed) 1988.
 
@@ -286,3 +361,74 @@ Rosecrans, Glen. Music Notation Primer. New York: Passantino, 1979.
 Stone, Kurt. Music Notation in the Twentieth Century. New York: Norton, 1980.
 
 
+=head2 On typesettig programs
+
+From: Miguel Filgueiras <mig@ncc.up.pt>
+
+... as well as other systems. I contribute with some references:
+
+
+D. Blostein, L. Haken, The Lime Music Editor: a Diagram Editor
+Involving Complex Translations. {\em
+Software --- Practice and Experience}, Vol. 24(3), 289--306, 1994.
+
+Alexander Brinkman, {\em PASCAL Programming for Music Research}.
+The University of Chicago Press, 1990.
+
+Miguel Filgueiras, Implementing a Symbolic Music Processing
+System. LIACC, Universidade do Porto, 1996; submitted.
+
+Miguel Filgueiras, Some Music Typesetting Algorithms. LIACC,
+Universidade do Porto, {\em forthcoming}.
+
+ Miguel Filgueiras and Jos\'e Paulo Leal, A First Formulation of
+\SceX, a Music Typesetting System. Centro de Inform\'atica da
+Universidade do Porto, 1993.
+
+Miguel Filgueiras and Jos\'e Paulo Leal. Representation and
+manipulation of music documents in \SceX. {\em Electronic Publishing},
+vol. 6 (4), 507--518, 1993.
+
+Eric Foxley, Music --- A language for typesetting music scores. {\em
+Software --- Practice and Experience}, Vol. 17(8), 485--502, 1987.
+
+John S. Gourlay, A language for music printing. {\em Communications of
+the ACM}, Vol. 29(5), 388--401, 1986.
+
+Cindy Grande, NIFF6a Notation Interchange File Format.
+Grande Software Inc., 1995. {\tt ftp:blackbox.cartah.washington.edu}
+
+Fran\c{c}ois Jalbert, Mu\TeX\  User's Guide (Version $1.1$). Computer
+Science Department, University of British Columbia, 1989.
+
+Peter S. Langston, Unix music tools at Bellcore. {\em
+Software --- Practice and Experience}, Vol. 20(S1), S1/47--S1/61, 1990.
+
+Andreas Mahling, J. Herczeg, M. Herczeg and S<H.-D.> B\"ocker, Beyond
+visualization: knowing and understanding. In P.~Gorny, M.~J. Tauber
+(eds.), {\em Visualization in Human-Computer Interaction}, Lecture
+Notes in Computer Science, 439, 16--26, Springer-Verlag, 1990.
+
+Jan Nieuwenhuizen, Using \TeX\ and the MusiX\TeX\  macro package to
+write parts and scores of music. Department of Physics, Eindhoven
+University of Technology, 1995.
+
+Don Simons, PMX, A Preprocessor for MusiX\TeX\  (Version 1.04).
+dsimons@logicon.com.
+
+Daniel Taupin. Music\TeX: Using \TeX\  to Write Polyphonic or
+Instrumental Music (Version 5.17). Laboratoire de Physique des
+Solides, Centre Universitaire, Orsay, 1996.
+
+Daniel Taupin, Ross Mitchell and Andreas Egler, Musix\TeX: Using \TeX\
+to Write Polyphonic or Instrumental Music (Version T.64). Laboratoire
+de Physique des Solides, Centre Universitaire, Orsay, 1993.
+
+Barry Vercoe, Csound --- A Manual for the Audio Processing System and
+Supporting Programs with Tutorials. Media Lab, M.I.T., Cambridge,
+Massachusetts, 1986 (rev. 1992).
+
+Chris Walshaw, {\tt ABC2M\TeX} --- An easy way of transcribing folk
+and traditional music. School of Maths, University of Greenwich, 1993.
+
+
index abce9ee643f32254b34faf860300c2869b9062a6..159a4050dce29e73ce4eecec9b9646d4f5e20c44 100644 (file)
@@ -39,8 +39,8 @@ Other considerations were (and will be):
 
 =item *
 
-be able to edit the layout 
-without danger of changing the original music (Urtext),
+be able to edit the layout without danger of changing the original
+music (Urtext),
 
 =item *
 
@@ -314,6 +314,14 @@ Mudela defines the following dynamic identifiers:
 
        ppp pp p mp mf df ff fff        % df iso f, f is a notename.
 
+and the following abbreviations:
+
+       \<      %start crescendo
+       \>      % start decrescendo
+       \!      % end crescendo/decrescendo
+
+=head2 General
+
 The general form of a note is:
 
        post-requests de-octavate notename octavate duration pre-requests 
@@ -321,6 +329,8 @@ The general form of a note is:
 Notenames are just identifiers, and can be declared for any
 language appropriate (see F<dutch.ini>). 
 
+
+
 =head2 Defaults
 
 If omit the duration of a, a default value is substituted. For this
@@ -353,9 +363,10 @@ Thus the following inputs are  equivalent
 
 If you are typing music which does not lie in the "small" and "large"
 octave, you can prevent having to type C<'> all the time by using the
-C<\octave> command: These two notes have the same pitch.
+C<\octave> command: These two lines have the same pitch.
 
-       c''     \octave{2} c
+       c'' d'' e''     
+       \octave{c''} c d e
 
 By default the setting of C<\octave> is 0.
 
@@ -407,6 +418,25 @@ below.
 Rhythms in Mudela are entered identical to Simple mudela.
 The melodic part of the information is ignored.
 
+=head2 Durations
+
+A duration always starts with the duration type (1,2,4 etc), and then
+any optional multipliers/dots
+
+=head2 Meters/groupings
+
+A meter has this form:
+
+       \meter { 3/4 }
+
+Rhythmic grouping is  a concept closely associated with this. For
+example, in a 5/8 meter, the counts are grouped 2+3. In mudela this is
+entered as
+
+       \grouping { 8*2 8*3 }
+
+
+
 =head1 STRUCTURE
 
 In concrete, a piece of Mudela has the following structure:
@@ -434,7 +464,7 @@ maintenance no long examples are included in this document.
 
 This chapter deals with the internals of Mudela. In the end Mudela
 converted to Voice, which contain Voice_elements which (in turn)
-contain Requests. The former 2 types are basically containers.
+contain Requests. The former 2 types are basically containers (lists).
 Consider the following simple mudela
 
        \music { c4 <e4 g4> }
@@ -491,72 +521,6 @@ whether to to honor the request, ignore it, or merge it with other
 requests. Merging of requests is preferably done with other requests
 done by members of the same voicegroups (beams, brackets, stems)
 
-Please refer to the documentation of the Child classes of
-C<Request> for explanation of each request type.
-
-The result of a request will be an C<Item> or a C<Spanner>, which
-will be put on a C<PStaff>. Note that the C<PStaff> and the original
-C<Staff> need not have anything in common. For example, the
-``double'' piano Staff could interpret commands which juggle
-melodies across the left and right hand, and may put the result in
-two five-line PStaffs (maybe with extra PStaffs to carry the dynamic
-signs and any lyric.
-
-The class C<Staff> should be thought as a container for the
-C<Voice>s, and an interpreter for C<Request>s and C<Command>s.
-Different staffs can produce different outputs; a melodious voice
-which is put into a percussion-Staff, will be typeset as the rythm of
-that voice.
-
-After C<Staff> made up her mind, the resultant items and
-spanners are put on the PScore.
-
-=over 5
-
-=item C<Barcheck_req>
-
-Checks during music processing if start of this voice element
-coincides with the start of a measure. Handy to check if you left out
-some voice elts.
-
-=item C<Note_req>
-
-Staff has to decide if the ball should be hanging left or right. This
-influences the horizontal dimensions of a column, and this  is why
-request processing should be done before horizontal spacing.
-
-Other voices' frivolities may cause the need for accidentals, so this
-is also for the  C<Staff> to decide. The  C<Staff> can decide on positioning
-based on ottava commands and the appropriate clef.
-
-=item C<Rest_req>
-
-Why a request? It might be a good idea to not typeset the rest, if the
-paper is too crowded.
-
-=item C<Span_req>
-
-This type of request typically results in the creation of a C<Spanner>
-
-=item C<Beam_req>
-
-Staff has to combine this request with the stem_request, since the
-number of flags that a stem wants to carry will determine the
-number of beams.
-
-=item  C<Dynamic>
-
-Each dynamic is bound to one note (a crescendo spanning multiple
-notes is thought to be made of two "dynamics": a start and a stop).
-Dynamic changes can occur in a smaller time than the length of its
-note, therefore fore each  C<Dynamic> request carries a time, measured
-from the start of its note.
-
-=head2 Voice
-
-=head2 Voice_element
-
-=head2 Voice groups
 
 =head2 Other
 
index 8f4e22a3c76e32e06a0fbd2f401e249f9da014f8..7c2df20b4e76bd46be1349c8e8d36660590b7ecb 100644 (file)
@@ -61,7 +61,7 @@ C\bC\bC\bCO\bO\bO\bON\bN\bN\bNF\bF\bF\bFI\bI\bI\bIG\bG\bG\bGU\bU\bU\bUR\bR\bR\bRI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG a\b
 
 
 
-3/Apr/97                 LilyPond 0.0.47                        1
+3/Apr/97                 LilyPond 0.0.48                        1
 
 
 
@@ -127,7 +127,7 @@ R\bR\bR\bRU\bU\bU\bUN\bN\bN\bNN\bN\bN\bNI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
 
 
 
-3/Apr/97                 LilyPond 0.0.47                        2
+3/Apr/97                 LilyPond 0.0.48                        2
 
 
 
@@ -193,6 +193,6 @@ A\bA\bA\bAU\bU\bU\bUT\bT\bT\bTH\bH\bH\bHO\bO\bO\bOR\bR\bR\bRS\bS\bS\bS
 
 
 
-3/Apr/97                 LilyPond 0.0.47                        3
+3/Apr/97                 LilyPond 0.0.48                        3
 
 
diff --git a/NEWS b/NEWS
index e456d8d44e13cd9954c0e3e5b5e8cb4e8ee7ffcf..7176a07fcbb9012cb21ddc736f1098d35cc9ea93 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,16 @@
+pl 48.hwn1
+       - lsm template
+       - clef in cadenza mode.
+       - notename clear
+       - \command bla; for \meter, \clef, \octave etc.
+
+pl 48
+       - notenames init
+       - Duration order -> grouping
+       - broken key s
+       - default octave
+******
+april 3
 pl 47
        - dynamic flowerlib
        - Input mods: now use Source_file iso Sources
diff --git a/TODO b/TODO
index 6e3d3f5c938662d12320551c4b34b29479f40e8e..2d56c054f3cbe8ce097a7026b46c2c1925793cfd 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,5 +1,4 @@
 before 0.1
-       * fix mi2mu
 
        * update 20 pt table
 
@@ -9,6 +8,8 @@ before 0.1
        
        * remove unnecessary or confusing constructs from .ly
 
+       * key undo
+
 This is an assorted collection of stuff that will be done, might be
 done, or is an idea that I want to think about
 
@@ -17,23 +18,17 @@ PARSER
 
 MAKE-STUFF
 
-       * flower config: separate optiflags.
-
        * do platform stuff: configure, header(s), targets, build (out?)
        
 BUGS
 
-       * key at clef change.
-
-       * key undo
-
-       * key at broken :||:
+       * help-lines
 
        * [c8. c32 c32]
 
        * cis ( | ) cis
 
-       * parser error handling (can you say Segfault?)
+       * lilypond - -> 
 
 SEVERELY LACKING:
 
@@ -49,8 +44,6 @@ FURTHER FOR ORCHESTRAL SCORE:
 
 INPUTLANGUAGE
 
-       * unix style paths for LILYINCLUDE ENV
-
        * configure pitch_byte
 
        * special key.
@@ -63,9 +56,6 @@ INPUTLANGUAGE
 
        * Raw request syntax
 
-       * uniformate: \clef\violin, \clef"violin", \geometric 1.4, 
-         \meter{ 2/4 }, etc.
-
        * subtime with Subtle_reqs
 
 SMALLISH PROJECTS
@@ -73,6 +63,10 @@ SMALLISH PROJECTS
        * bugreport to doc++ devel: struct not in class hier; public
        virtual baseclasses
 
+       * half-sharps, half-flats
+       
+       * unix style paths for LILYINCLUDE EN
+
        * rpm package buildroot
 
        * indentable stream for TeX stream, lily stream, Dstream.
@@ -81,12 +75,12 @@ SMALLISH PROJECTS
        
        * caching breakpoints / saving them. 
 
-       * key { C } 
-       
        * use dstream feature in mi2mu
 
         * qtor, btor, mtor-> tor( QUIET_ver ), tor( DEBUG_ver ), etc.
 
+       - declare notenametab?
+
        * use tors feature in lily
 
        * do conventional keys (C G A, F B E, a e fis, d as des, etc ), 
@@ -141,8 +135,6 @@ DOC
 
        * all errors
 
-       * a decent webpage
-
        * a test suite
 
 FUTURE
@@ -151,7 +143,7 @@ FUTURE
        
        * multiple scripst.
 
-       * mixed  fontsizes
+       * mixed fontsizes
 
        * put scripts on bars
 
@@ -173,7 +165,7 @@ FUTURE
 
        * revise calcideal
 
-       * eentje/tweetje
+       * volta
 
        * piano staff
 
index fba3c1559e881553c2bc1e035b76e13ce0bb50b5..1f56088f930d30734d600ab34b63e4a83c10c7ff 100755 (executable)
@@ -1,36 +1,60 @@
 #!/usr/bin/perl -w
 
-die "arg needed\n" if (!($#ARGV+1));
-my $fn = $ARGV[0];
-my $hh_q = ($fn =~ /hh$/ );
-my $MAILADRESS=$ENV{MAILADRESS};
-my @pw=(getpwuid($<));
-my $username=$pw[6];
-my $what="implement ";
-$what = "declare " if ($hh_q);
-my ($PROJECT, $cwd);
-$PROJECT = "the LilyPond music typesetter";
-chop($cwd = `pwd`);
-
-$PROJECT= "the Flower Library" if ($cwd =~ /flower/);
-my $headstr ="/*
+# generate the standard header of a LilyPond source file.
+my $fn;
+
+sub
+    do_init
+{
+    $MAILADRESS=$ENV{MAILADRESS};
+     @pw=(getpwuid($<));
+     $username=$pw[6];
+
+    die "arg needed\n" if (!($#ARGV+1));
+     $fn = $ARGV[0];
+
+     $hh_b =  ($fn =~ /hh$/ );
+     $inc_b=  ($hh_b || $fn =~ /[ti]cc$/);
+}
+
+sub 
+    do_head
+{
+    
+    my $what="implement ";
+    $what = "declare " if ($hh_b);
+    my ($PROJECT, $cwd);
+    $PROJECT = "the LilyPond music typesetter";
+    chop($cwd = `pwd`);
+    
+    $PROJECT= "the Flower Library" if ($cwd =~ /flower/);
+    
+    my $headstr ="/*
   $fn -- $what
 
   source file of $PROJECT
 
   (c) 1997 $username <$MAILADRESS>
 */\n";
-
-my $startdef= $fn;
-$startdef =~ s/[\.-]/_/g;
-$startdef =~ tr/a-z/A-Z/;
-my $terminatestr="\n";
-if ($hh_q) {
-    $headstr .= "\n\n#ifndef $startdef\n#define $startdef\n";
-    $terminatestr .= "#endif // $startdef\n"  
+    print $headstr;
 }
-
-print $headstr, $terminatestr;
-
+sub do_inc
+{
+    my $headstr="";
+    my $startdef= $fn;
+    $startdef =~ s/[\.-]/_/g;
+    $startdef =~ tr/a-z/A-Z/;
+    my $terminatestr="\n";
+
+    if ($inc_b) {
+       $headstr = "\n\n#ifndef $startdef\n#define $startdef\n";
+       $terminatestr .= "#endif // $startdef\n"  
+       }
+
+    print $headstr, $terminatestr;
+}
+do_init;
+do_head;
+do_inc;
 
 
index 086d84fa8fe309385aa96f8fd673d23df7dfb550..411262ed4a4db3efeb217c2a5607e95e5b8da510 100755 (executable)
@@ -112,7 +112,12 @@ system     "gzip -f9 website.tar;";
 $depth = "../../";
 $ENV{"TEXINPUTS"} .= ":$depth/input/:";
 $ENV{"LILYINCLUDE"} = "$depth/input/";
+my $cwd;
+chomp($cwd = `pwd`);
+
+die "need to be in directory Documentation\n" if ( ! ($cwd =~ /Documentation$/));
 chdir ("out");
+
 gen_html;
 gen_examples;
 gen_list;
index faec64d8fd9c0d42f9e7058929d23c9878486f69..69fa7d4fece362b20eb730347de7abe1897164c1 100755 (executable)
@@ -1,6 +1,10 @@
 #!/bin/sh
-
-
+grep -q  '^TOP' .version
+    res=$?
+if test ! -f .version  || test $res != 0; then
+    echo not in topleveldir
+    exit 1
+fi    
 function setversion() {
 eval `sed -n 's/^\([A-Z_]*\) *= *\(.*\)$/\1=\2/p' .version`
 MJ=$TOPLEVEL_MAJOR_VERSION
index c90815475ee4e3192c61c5d048c4b775ef295245..437638ccfa1d7c0593ae145cedf780527235e729 100755 (executable)
--- a/configure
+++ b/configure
@@ -544,7 +544,7 @@ checking_b=yes
 debug_b=yes
 optimise_b=no
 profile_b=no
-    
+#shared_b=no
 # Check whether --enable-printing or --disable-printing was given.
 if test "${enable_printing+set}" = set; then
   enableval="$enable_printing"
@@ -1071,7 +1071,7 @@ if test $MAKE = "error"
 then
        { echo "configure: error: Please install GNU make" 1>&2; exit 1; }
 else
-       $MAKE -v| grep GNU >& /dev/null
+       $MAKE -v| grep GNU > /dev/null
        if test "$?" = 1
        then
                echo "configure: warning: Please install *GNU* make" 1>&2
@@ -1094,7 +1094,7 @@ then
        echo "configure: warning: can't find flex. Please install Flex (2.5 or better)" 1>&2
 fi
 
-if $CXX --version | grep '2\.7' >& /dev/null
+if $CXX --version | grep '2\.7' > /dev/null
 then
        true
 else
@@ -1584,4 +1584,10 @@ If you only want help on the make targets, do a
 
        make help
 
+
 END
+
+    
+#if test $shared_b = yes; then
+#    echo "NOTE: you are building the *shared* library. You should 
+#fi    
index ac091d7d15584b5b801155880f55c62ad5b8fb88..17f737ab456f0d226df9e0351589063ebba4c4e9 100644 (file)
@@ -44,7 +44,7 @@ checking_b=yes
 debug_b=yes
 optimise_b=no
 profile_b=no
-    
+#shared_b=no
 AC_ARG_ENABLE(printing,
     [  enable-printing        set debug printing],
     [printing_b=$enableval])
@@ -128,7 +128,7 @@ if test $MAKE = "error"
 then
        AC_MSG_ERROR(Please install GNU make)
 else
-       $MAKE -v| grep GNU >& /dev/null
+       $MAKE -v| grep GNU > /dev/null
        if test "$?" = 1
        then
                AC_MSG_WARN(Please install *GNU* make)
@@ -151,7 +151,7 @@ then
        AC_MSG_WARN(can't find flex. Please install Flex (2.5 or better))
 fi
 
-if $CXX --version | grep '2\.7' >& /dev/null
+if $CXX --version | grep '2\.7' > /dev/null
 then
        true
 else
@@ -203,4 +203,10 @@ If you only want help on the make targets, do a
 
        make help
 
+
 END
+
+    
+#if test $shared_b = yes; then
+#    echo "NOTE: you are building the *shared* library. You should 
+#fi    
index ddcbb111b978b2d382cb39ba1d7f2667b8335610..53a4af6a089909a9fdd357c53c17769f13c4f99d 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 1
 MINOR_VERSION = 1
-PATCH_LEVEL = 10
+PATCH_LEVEL = 11
 # use to send patches, always empty for released version:
 MY_PATCH_LEVEL = # include separator: "-1" or ".a"
 #
index 6272c5f509f066ed67b1cd2a455952bcda1efbe5..0a6d806a21793a4113279d5a6f992b9fa0d301da 100644 (file)
@@ -48,9 +48,11 @@ EXTRA_DISTFILES= configure config.hh.in configure.in .version $(README_FILES) $(
 include ./$(depth)/make/Targets.make
 include ./$(depth)/make/Rules.make
 #
-default: shared-lib
 
-shared-lib: $(SHAREDLIBRARY) 
+default: the-lib
+
+THE_LIB=$(outdir)/$(LIB_PREFIX)flower$(LIB_SUFFIX)
+the-lib: $(THE_LIB) 
 
 # version:
 #
index 629d06e5ddfdbf078f066787f642d3e8901ab896..1f489e042f2f67d29dc0ca143645c8859ecbfb57 100644 (file)
@@ -1,3 +1,7 @@
+pl 1.1.11
+       - template<> class P
+       - assoc elem() methods
+
 pl 1.1.10
        - Matrix_storage naming
        - Matrix_storage::try_right_multiply to help speed up
index a0188c47f8fa59a777db5f666655c6a7ceed4d2f..3e10b2b3af89a4d474951cd0926c165cba44f844 100644 (file)
@@ -1,10 +1,6 @@
-       * Autoconf configure script.
-
        * fix/junk ambiguous String constructor overloads, e.g.:
          String( int ) and String( char )
 
-       * shared lib.
-
        * LGPL?
 
        * disable this auto conv: const pointer -> bool -> string
@@ -24,3 +20,4 @@
                parsestream.h
                vector.h
 
+       * lgetopt: cmd -, or cmd --
index 8747c8ffe4759b0a1ab53ebadd4a38b09baa3b10..9f3b9821143763c3d13e4f192d2cfa6442dafb5c 100644 (file)
@@ -3,6 +3,3 @@
 
 /* define if you have snprintf */
 #define HAVE_SNPRINTF 0
-
-/* just testing */
-#define HAVE_FOOBAR 0
index cba7a2f20657c090290b7de8133f5908b1e2ecd6..2a28860b95d8a708084760aef702e3e80834f7e6 100755 (executable)
@@ -531,7 +531,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
 
 
 optimise_b=yes
-shared_b=yes
+shared_b=no
 LIB_SUFFIX=.a
 
 # Check whether --enable-shared or --disable-shared was given.
@@ -1249,3 +1249,4 @@ chmod +x $CONFIG_STATUS
 rm -fr confdefs* $ac_clean_files
 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
+
index d35ff32bdd2319b182886779907502f73b48e3c7..e58f93f485336f7552a29e939e76d4df7acc382f 100644 (file)
@@ -4,7 +4,7 @@ AC_INIT(choleski.cc)
 AC_LANG_CPLUSPLUS
 
 optimise_b=yes
-shared_b=yes
+shared_b=no
 LIB_SUFFIX=.a
 
 AC_ARG_ENABLE(shared,
@@ -25,7 +25,6 @@ if test $optimise_b = yes; then
     MODULE_CXXFLAGS="$MODULE_CXXFLAGS -O2 -DSTRING_UTILS_INLINED"
 fi
 
-dnl should enable flower specific compile flags.
 AC_SUBST(MODULE_CXXFLAGS)
 AC_SUBST(MODULE_LDFLAGS)
 AC_SUBST(LIB_SUFFIX)
@@ -39,3 +38,4 @@ AC_CONFIG_HEADER(out/config.hh:config.hh.in)
 CXX="$ac_cv_prog_CXX" ../bin/make_version > out/version.hh
 
 AC_OUTPUT(out/Flower-flags.make:Flower-flags.make.in)
+
index 05ee3e69583012356ec40188ebd37857f8b8c739..73416a4e46c8217698db8618e7a65561da6b94cd 100644 (file)
@@ -45,9 +45,9 @@ Dstream::identify_as(String name)
     String cl(strip_member(mem));
     String idx = cl;
     
-    if (silent->elt_query(mem))
+    if (silent->elt_b(mem))
        idx  = mem;
-    else if (silent->elt_query(cl))
+    else if (silent->elt_b(cl))
        idx = cl;
     else {
        (*silent)[idx] = false;
@@ -64,7 +64,7 @@ Dstream::identify_as(String name)
 bool
 Dstream::silence(String s)
 {
-    if (!silent->elt_query(s))
+    if (!silent->elt_b(s))
        return false;
     return (*silent)[s];
 }
index bf22881d90bbb57f28d1748bc42cab47b300c954..b40d68661f4e21b9c2701870b28af0ce95459c87 100644 (file)
@@ -53,11 +53,11 @@ struct Assoc {
        return arr.size() -1;
     }
 public:
-    bool elt_query(K key) const {
+    bool elt_b(K key) const {
        return find(key) >= 0;
     }
     void del(K key) {
-       assert(elt_query(key));
+       assert(elt_b(key));
        int i= find(key);
        arr[i].free = true;
     }
@@ -66,11 +66,17 @@ public:
        int i = find_creat(key);
        arr[i].val = val;
     }
-    V& operator[](K key) {
+    V& elem(K key) {
        return arr[find_creat(key)].val;
+       }
+    V& operator[](K key) {
+       return elem(key);
     }
     V const & operator[](K key) const {
-       assert(elt_query(key));
+       return elem(key);
+    }
+    V const & elem(K key) const { 
+       assert(elt_b(key));
        return arr[find(key)].val;
     }
 };
index 1cfa9f54edf397e88753ce3ab42f62cfffed02d7..a7389ed489a2ad14ca35ec62c54d0322d7157fe7 100644 (file)
@@ -86,11 +86,6 @@ class List
 #include "list.icc"
 #include "cursor.hh"
 
-// instantiate a template:  explicit instantiation.
-#define L_instantiate(a)  template class List<a>; template class Cursor<a>; \
-  template class Link<a>
-
-
 #endif // __LIST_HH //
     
    
index bd3a16b0c6fa69d86353dfdc333f22fe3f48d4be..e3fa43cdd3346677a03e2a16097832bd86e69857 100644 (file)
@@ -1,6 +1,11 @@
 #ifndef LIST_CC
 #define LIST_CC
 
+
+// instantiate a template:  explicit instantiation.
+#define L_instantiate(a)  template class List<a>; template class Cursor<a>; \
+  template class Link<a>
+
 #include "list.hh"
 
 template<class T>
index 1fc4d941ab0851e6890a32c92cc10b8915247700..80d780e3d61d390fcd761ea6f7058de2e97af96c 100644 (file)
@@ -62,10 +62,6 @@ template<class T>
 void PL_copy(IPointerList<T*> &dst,IPointerList<T*> const&src);
 
 
-#define PL_instantiate(a)  template class PointerList<a*>; \
-       template class PCursor<a*>;
-#define IPL_instantiate(a) PL_instantiate(a); \
-       template class IPointerList<a*>
 
 #include "plist.icc"
 
index ac9daedf719f77f89198045d6c8caabf2b54a0aa..d18e01f9025ac64d57d745e83a5633b6fb9358cd 100644 (file)
@@ -1,5 +1,10 @@
 #include "plist.hh"
 
+#define PL_instantiate(a)  template class PointerList<a*>; \
+       template class PCursor<a*>;
+#define IPL_instantiate(a) PL_instantiate(a); \
+       template class IPointerList<a*>
+       
 template<class T>
 IPointerList<T>::~IPointerList()
 {
diff --git a/flower/include/pointer.hh b/flower/include/pointer.hh
new file mode 100644 (file)
index 0000000..e29a298
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+  pointer.hh -- declare P
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef POINTER_HH
+#define POINTER_HH
+
+/** P<T> is a handy template to use iso T*. It inits to 0, deletes on
+  destruction, deep copies upon copying
+
+  It is probably not feasible to use P<T> as template argument, since
+  a lot of auto conversion wouldn't work. new T would be called too
+  much anyway.
+  
+  Sorry for the silly naming */
+template <class T>
+class P {
+    
+    void copy(T*);
+    T* t_p;
+    void junk();
+public:
+    
+    P(P const &src);
+    
+    T *get_p() { T*p = t_p; t_p=0; return p; }
+    T *get_l() { return t_p; }
+    T *copy_p() const;
+    void set_p (T *new_p); 
+    void set_l (T *t_l); 
+    
+    P &operator =(P const &);
+    ~P();
+    P() { t_p = 0; }
+    //P(T *p) { t_p = p; }
+    
+    T *operator ->() { return t_p; }
+    operator T * () {  return t_p; }
+    const T *operator ->() const { return t_p ; }
+    operator const T *() const { return t_p; }
+};
+#endif // POINTER_HH
+
+    
diff --git a/flower/include/pointer.tcc b/flower/include/pointer.tcc
new file mode 100644 (file)
index 0000000..d595f2b
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+  pointer.tcc -- implement P
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef POINTER_TCC
+#define POINTER_TCC
+
+template<class T>
+inline
+T *
+P<T>::copy_p()const
+{
+    return t_p? new T(*t_p) : 0;
+}
+
+template<class T>
+inline
+void
+P<T>::copy(T *l)
+{
+    t_p = l ? new T(*l) : 0;
+}
+
+template<class T>
+inline
+void
+P<T>::junk()
+{
+    delete t_p;
+    t_p =0;
+}
+
+template<class T>
+inline
+P<T>::P(P<T> const &s) 
+{
+    t_p = s.copy_p();
+}
+
+template<class T>
+inline
+P<T> &
+P<T>::operator =(P const&s)
+{
+    junk();
+    copy(s.t_p);
+    return *this;
+}
+
+template<class T>
+inline
+P<T>::~P() {
+    junk();
+}
+
+template<class T>
+inline
+void
+P<T>::set_p(T * np) 
+{
+    if (np == t_p)
+       return;
+    delete t_p;
+    
+    t_p = np;
+}
+
+
+template<class T>
+inline
+void
+P<T>::set_l(T * l) 
+{
+    if (t_p == l)
+       return;
+    
+    junk();
+    copy(l);
+}
+
+
+
+#endif // POINTER_TCC
index 37e8a00d8c3d48dc644a24098112668d7da965ec..c2e5a3b7902ed9685eb6a2a927c4921eba291262 100644 (file)
@@ -155,7 +155,8 @@ Getopt_long::parseshort()
 }
 
 Long_option_init *
-Getopt_long::operator()() {
+Getopt_long::operator()() 
+{
     if (!next())
        return 0;
     
index 3de2bbdc7069995040ccf27b3d54615e0af14c46..1d909660e28f5ba17052ca83a2354e3eb310cb70 100644 (file)
@@ -28,20 +28,6 @@ include ./$(depth)/make/Variables.make
 include ./$(depth)/make/Files.make 
 #
 
-# descent order into subdirectories:
-#
-SUBDIRS =
-#
-
-# to be remade each build:
-#
-VERSION_DEPENDENCY = #
-#
-
-# module compile settings: (not generally needed!
-#
-
-
 # list of distribution files:
 #
 EXTRA_DISTFILES = result 
@@ -56,18 +42,15 @@ MODULE_LIBES = -lflower
 
 # main target of this module:
 #
-# MAINTARGET = $(EXECUTABLE)
-# MAINTARGET = $(LIBRARY)
 MAINTARGET = $(lily_bindir)/$(EXECUTABLE)# huh?
-# MAINTARGET = $(libdir)/$(LIBRARY)# huh?
-
-#default: $(MAINTARGET)
 BUILDSTRINGTEST=$(MAINTARGET)
 EXECSTRINGTEST=$(EXECUTABLE)
 
-default:  $(BUILDSTRINGTEST) do-stringtest
+# don't do the exec, as this might fail if flowerlib isn't installed yet.
+default:  $(BUILDSTRINGTEST) 
+
 do-stringtest:
-       $(EXECSTRINGTEST) > $(outdir)/result    # should cmp with a 'standard result'
+       $(EXECSTRINGTEST) > $(outdir)/result
        cmp $(outdir)/result result
 
 dummy:
@@ -76,12 +59,7 @@ dummy:
 #
 include ./$(depth)/make/Targets.make
 include ./$(depth)/make/Rules.make
-#
 
-# list of depend files:
-#
-DEPFILES = $(wildcard $(depdir)/*.dep )
-#
 
 # auto dependencies:
 #
index 84e24a0f73b5ba9449097a10e3a66e37b23673c2..5d040d38dd3a40ffea8bc9f675bc39c2cc14d934 100644 (file)
@@ -8,82 +8,84 @@
 % actually are *melodic*s, i.e. they represent a pitch solely. Notes
 % have a rhythmic part too. This is the reason that we don't write 'note { .. }'
 %
-ceses  = \melodic_request { -1 0 -2 }
-ces    = \melodic_request { -1 0 -1 }
-c      = \melodic_request { -1 0 0 }
-cis    = \melodic_request { -1 0 1 }
-cisis  = \melodic_request { -1 0 2 }
-deses  = \melodic_request { -1 1 -2 }
-des    = \melodic_request { -1 1 -1 }
-d      = \melodic_request { -1 1 0 }
-dis    = \melodic_request { -1 1 1 }
-disis  = \melodic_request { -1 1 2 }
-eses   = \melodic_request { -1 2 -2 }
-es     = \melodic_request { -1 2 -1 }
-e      = \melodic_request { -1 2 0 }
-eis    = \melodic_request { -1 2 1 }
-eisis  = \melodic_request { -1 2 2 }
-feses  = \melodic_request { -1 3 -2 }
-fes    = \melodic_request { -1 3 -1 }
-f      = \melodic_request { -1 3 0 }
-fis    = \melodic_request { -1 3 1 }
-fisis  = \melodic_request { -1 3 2 }
-geses  = \melodic_request { -1 4 -2 }
-ges    = \melodic_request { -1 4 -1 }
-g      = \melodic_request { -1 4 0 }
-gis    = \melodic_request { -1 4 1 }
-gisis  = \melodic_request { -1 4 2 }
-ases   = \melodic_request { -1 5 -2 }
-as     = \melodic_request { -1 5 -1 }
-a      = \melodic_request { -1 5 0 }
-ais    = \melodic_request { -1 5 1 }
-aisis  = \melodic_request { -1 5 2 }
-beses  = \melodic_request { -1 6 -2 }
-bes    = \melodic_request { -1 6 -1 }
-b      = \melodic_request { -1 6 0 }
-bis    = \melodic_request { -1 6 1 }
-bisis  = \melodic_request { -1 6 2 }
+\notenames {
+       ceses   = \melodic_request { -1 0 -2 }
+       ces     = \melodic_request { -1 0 -1 }
+       c       = \melodic_request { -1 0 0 }
+       cis     = \melodic_request { -1 0 1 }
+       cisis   = \melodic_request { -1 0 2 }
+       deses   = \melodic_request { -1 1 -2 }
+       des     = \melodic_request { -1 1 -1 }
+       d       = \melodic_request { -1 1 0 }
+       dis     = \melodic_request { -1 1 1 }
+       disis   = \melodic_request { -1 1 2 }
+       eses    = \melodic_request { -1 2 -2 }
+       es      = \melodic_request { -1 2 -1 }
+       e       = \melodic_request { -1 2 0 }
+       eis     = \melodic_request { -1 2 1 }
+       eisis   = \melodic_request { -1 2 2 }
+       feses   = \melodic_request { -1 3 -2 }
+       fes     = \melodic_request { -1 3 -1 }
+       "f"     = \melodic_request { -1 3 0 }
+       fis     = \melodic_request { -1 3 1 }
+       fisis   = \melodic_request { -1 3 2 }
+       geses   = \melodic_request { -1 4 -2 }
+       ges     = \melodic_request { -1 4 -1 }
+       g       = \melodic_request { -1 4 0 }
+       gis     = \melodic_request { -1 4 1 }
+       gisis   = \melodic_request { -1 4 2 }
+       ases    = \melodic_request { -1 5 -2 }
+       as      = \melodic_request { -1 5 -1 }
+       a       = \melodic_request { -1 5 0 }
+       ais     = \melodic_request { -1 5 1 }
+       aisis   = \melodic_request { -1 5 2 }
+       beses   = \melodic_request { -1 6 -2 }
+       bes     = \melodic_request { -1 6 -1 }
+       b       = \melodic_request { -1 6 0 }
+       bis     = \melodic_request { -1 6 1 }
+       bisis   = \melodic_request { -1 6 2 }
 
 
-%
-% upper case: 1 octave lower.
-%
+       %
+       % upper case: 1 octave lower.
+       %
 
 
-Ceses  = \melodic_request { -2 0 -2 }
-Ces    = \melodic_request { -2 0 -1 }
-C      = \melodic_request { -2 0 0 }
-Cis    = \melodic_request { -2 0 1 }
-Cisis  = \melodic_request { -2 0 2 }
-Deses  = \melodic_request { -2 1 -2 }
-Des    = \melodic_request { -2 1 -1 }
-D      = \melodic_request { -2 1 0 }
-Dis    = \melodic_request { -2 1 1 }
-Disis  = \melodic_request { -2 1 2 }
-Eses   = \melodic_request { -2 2 -2 }
-Es     = \melodic_request { -2 2 -1 }
-E      = \melodic_request { -2 2 0 }
-Eis    = \melodic_request { -2 2 1 }
-Eisis  = \melodic_request { -2 2 2 }
-Feses  = \melodic_request { -2 3 -2 }
-Fes    = \melodic_request { -2 3 -1 }
-F      = \melodic_request { -2 3 0 }
-Fis    = \melodic_request { -2 3 1 }
-Fisis  = \melodic_request { -2 3 2 }
-Geses  = \melodic_request { -2 4 -2 }
-Ges    = \melodic_request { -2 4 -1 }
-G      = \melodic_request { -2 4 0 }
-Gis    = \melodic_request { -2 4 1 }
-Gisis  = \melodic_request { -2 4 2 }
-Ases   = \melodic_request { -2 5 -2 }
-As     = \melodic_request { -2 5 -1 }
-A      = \melodic_request { -2 5 0 }
-Ais    = \melodic_request { -2 5 1 }
-Aisis  = \melodic_request { -2 5 2 }
-Beses  = \melodic_request { -2 6 -2 }
-Bes    = \melodic_request { -2 6 -1 }
-B      = \melodic_request { -2 6 0 }
-Bis    = \melodic_request { -2 6 1 }
-Bisis  = \melodic_request { -2 6 2 }
+       Ceses   = \melodic_request { -2 0 -2 }
+       Ces     = \melodic_request { -2 0 -1 }
+       C       = \melodic_request { -2 0 0 }
+       Cis     = \melodic_request { -2 0 1 }
+       Cisis   = \melodic_request { -2 0 2 }
+       Deses   = \melodic_request { -2 1 -2 }
+       Des     = \melodic_request { -2 1 -1 }
+       D       = \melodic_request { -2 1 0 }
+       Dis     = \melodic_request { -2 1 1 }
+       Disis   = \melodic_request { -2 1 2 }
+       Eses    = \melodic_request { -2 2 -2 }
+       Es      = \melodic_request { -2 2 -1 }
+       E       = \melodic_request { -2 2 0 }
+       Eis     = \melodic_request { -2 2 1 }
+       Eisis   = \melodic_request { -2 2 2 }
+       Feses   = \melodic_request { -2 3 -2 }
+       Fes     = \melodic_request { -2 3 -1 }
+       F       = \melodic_request { -2 3 0 }
+       Fis     = \melodic_request { -2 3 1 }
+       Fisis   = \melodic_request { -2 3 2 }
+       Geses   = \melodic_request { -2 4 -2 }
+       Ges     = \melodic_request { -2 4 -1 }
+       G       = \melodic_request { -2 4 0 }
+       Gis     = \melodic_request { -2 4 1 }
+       Gisis   = \melodic_request { -2 4 2 }
+       Ases    = \melodic_request { -2 5 -2 }
+       As      = \melodic_request { -2 5 -1 }
+       A       = \melodic_request { -2 5 0 }
+       Ais     = \melodic_request { -2 5 1 }
+       Aisis   = \melodic_request { -2 5 2 }
+       Beses   = \melodic_request { -2 6 -2 }
+       Bes     = \melodic_request { -2 6 -1 }
+       B       = \melodic_request { -2 6 0 }
+       Bis     = \melodic_request { -2 6 1 }
+       Bisis   = \melodic_request { -2 6 2 }
 
 
+}
index e1cf6e6c238c27d9c5e9f1b7fa0bc13ad0b0a93d..4dcaf783c2cefeebea18481e32d7ac0d9bf0c4b9 100644 (file)
@@ -7,7 +7,7 @@ pp = \absdynamic { 6 }
 p = \absdynamic { 5 }
 mp = \absdynamic { 4 }
 mf = \absdynamic { 3 }
-df = \absdynamic { 2 } % f is a notename too.
+f = \absdynamic { 2 } % f is a notename too.
 ff = \absdynamic { 1 }
 fff = \absdynamic { 0 }
 
index d9c170fb4d3908f39c28dcced6c6683cf0f6b793..13438fee11cbf2d2185a569ce65fd20503f2dc69 100644 (file)
@@ -6,7 +6,7 @@
 %
 % by Mats Bengtsson.
 
-
+\notenames {
 cessess        = \melodic_request { 0 0 -2 }
 cess   = \melodic_request { 0 0 -1 }
 c      = \melodic_request { 0 0 0 }
@@ -42,3 +42,4 @@ b     = \melodic_request { 0 6 -1 }
 h      = \melodic_request { 0 6 0 }
 hiss   = \melodic_request { 0 6 1 }
 hississ        = \melodic_request { 0 6 2 }
+}
index c631aaa5d986d22f8f47c9a2c21d82a7e156c53a..c50d815ced1b76aa685d813e7c198a25f1860cb2 100644 (file)
@@ -4,42 +4,42 @@
 % author: unknown. Copyright: none
 %
 
-cad = \melodic
-               \cadenza {1}
-               \grouping{1*4}\duration { 8}\octave{c}
-       \textstyle "italic"
-       \clef \violin 
-       c'4.mf g8
-       \textstyle  "roman" 
+cad = \melodic  {
+               \cadenza 1;
+               \grouping 1*4;\duration  8;\octave c';
+
+       \clef \violin ;
+       c'4.\mf g8
+
 
        [e'^"accel" ()d' c' b]
        [b()c'] g-\fermata
-               \bar \empty
+               \bar \empty;
                        c [c_"rubato" e g c']
-       \octave{c'}
+       \octave c'';
        e4. e [g ()f_"rit" e d]
 
-       \duration{16}
+       \duration 16;
        dis4()e4
-               \bar \empty 
+               \bar \empty ;
                r8 [c d] [e f g gis]
-       \duration{4}
+       \duration 4;
        a-> 'f()'e g
        f-> 'd()'cis e
-       \duration{8}    
+       \duration 8;    
        d4^\fermata
-               \bar \empty 
+               \bar \empty ;
 
        r8 'a ['b cis]
-       \duration{16}   [d cis d e]
+       \duration 16;   [d cis d e]
        f4()[f e d c]
        'b4
-       \octave{c} [d'8 c'8 a8]2/3
+       \octave c'; [d'8 c'8 a8]2/3
        g2
-               \bar \empty 
-       [g c e g] [c' e g c']\octave{c} 
+               \bar \empty ;
+       [g c e g] [c' e g c']\octave c''; 
        [e 'g c e] g4^\fermata %()% BUG!
-               \bar \empty 
+               \bar \empty ;
        [g8.(_"a tempo" e g8. )e]
        a4. g8 [f8 e8 d8 c8]
        'g2 d2^"tr"
index 2a59761f005d225256c8dc3113e1cdc657dd560e..c2b8ed5da3c9d020f0291eae898a635136f6e7b8 100644 (file)
 
 alto = \melodic{ 
        
-       \meter {4/4} 
-       \duration{ 8 }
-       \key {bes es as}
+       \meter 4/4; 
+       \duration  8 ;
+       \key bes es as;
                
-       \clef "alto"
+       \clef "alto";
        % these are chords (i.e. non-divisi)
        
 %30     
        <       
-               { \octave{ c }
+               { \octave  c ;
                        
                        [ c c-. ] c2.( | 
 %31
@@ -31,39 +31,40 @@ alto = \melodic{
                        [ ) c c-. ] c4. c-. c4( |
 %33
                        [ ) c c-. ] c4. c-. c4 
-               \group "+bla"
-                \stem{ 1 }[ c16^"div." c16 c16 c16 ] c4 c2 
-               \group "-"
+               \group "+bla";
+                \stem  1 ;[ c16^"div." c16 c16 c16 ] c4 c2 
+               \group "-";
                }
 %30:2
                { 
-                       \octave{ 'c }
-                       \textstyle "italic"
+                       \octave  'c ;
+                       \textstyle "italic";
                        % this should be a \dynamic, rather than text
                        [ c c_"cresc. \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
                                - \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
                                - \ \ \ \ - \ \ \ \ - \ \ \ \ - \ \ \ \
                                - \ \ \ \ - \ \ \ \ -" ] c2.( |  
-                       \textstyle "roman"
+                       \textstyle "roman";
 %31:2
                        [ ) c c-. ] c2.( | 
 %32:2
                        [ ) c c-. ] c4. c-. c4( | 
 %33:2
                        [ ) c c-. ] c4. c-. c4 |
-                       \octave{c }
+                       \octave c ;
 
 %34            
-                       \group "+b"
+                       \group "+b";
        % these are two \voices (i.e. divisi)
        % the c4 and c2, however are really 16th...
        % we-ll say "simile" for now...
        % 
-                       \octave{ 'c }
-                       \textstyle "italic"
-                       \stem{ -1 } [ as16 ff as16 as16 as16 ] as4_"simile" as2
-                       \textstyle "roman"
-                       \group "-"
+                       \octave  'c ;
+                       \textstyle "italic";
+                       \stem  -1 ;
+                       [ as16 \ff as16 as16 as16 ] as4_"simile" as2
+                       \textstyle "roman";
+                       \group "-";
                }
        >
        
index a7637f4d4a7ce09d5211feb0521789bd444acea6..47624c49361821a71ee0911d5aea53eb1a08d61b 100644 (file)
@@ -9,11 +9,11 @@
 %
 % declare melody (which will be in *one* staff ) for the lead voice
 
-melodie = \melodic{
+melodie = \melodic 
                                % switch Lilypond in note-mode
        \clef\violin
-       \meter{ 2/4 }
-       \octave{ c }            % set the default octave
+       \meter{ 2/4 ;
+       \octave  c ;            % set the default octave
        % the default note duratino is 4
        %%% theme
        c c |                   % the '|' checks if there is a new measure here.
@@ -33,16 +33,16 @@ melodie = \melodic{
 }
 
                                % more of this.
-begeleiding = \melodic{
+begeleiding = \melodic 
        \clef "bass"
-       \meter{ 2/4 }
-       \octave{ c }            % default octave: 1 below the first octave.
+       \meter{ 2/4 ;
+       \octave  c ;            % default octave: 1 below the first octave.
 
        %%% theme
        'c                      % ' before note means one octave lower.
                                % Similarly: ' after means one higher.
           c    e c     f c     e c     d 'b    c 'a    'f 'g   'c2
-       \octave { 'c }
+       \octave  'c ;
        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
index f816bb734e95a415891ad1985015e11a2d0b247b..ddce8ee770d4ecb228a1a921673f92b54af46bbf 100644 (file)
@@ -4,17 +4,17 @@
 %
 %
 globals=\melodic{
-               \meter {4/ 4}
-               \partial {8}
-               \skip {1*8}
-               \skip {3*2 }
+               \meter 4/ 4;
+               \partial 8;
+               \skip 8*1;
+               \skip 2*3 ;
                \bar ":|:"
-               \skip {1*2}
-               \meter {2/4}
+               \skip 2*1;
+               \meter 2/4;
 }
 
-ritme = \staff{melodicregs
-       globals
+%ritme = \staff{melodicregs
+%      globals
 % rhythmic broken for  now
 %      \rhytmic{
 %      c8
@@ -29,17 +29,17 @@ ritme = \staff{melodicregs
 % 
 %       c2 c2 c2 c2 c2 c2 c2 c2 c2 c2
 %      }
-}
+%}
 
 melody= \staff{melodicregs
        globals
-       \melodic{
-       c8\key{fis cis gis}
+       \melodic \octave  {c;
+       c8\key fis cis gis;
        |r4 r4 r4 r4
        |cis'2..        r8
        | r4 r8 r16 r32 r32 
 
-       \duration {4}
+       \duration 4;
        <
                 { c () 'bes [c8 c8] }
                 { fis' ()gisis' fis8 fis8 }
@@ -53,7 +53,7 @@ melody= \staff{melodicregs
        [d8 e8 f'8 g8]  d8 e8 f8 g8
        |fis''2
        | a8 b8 c'8 d'8 |c''8 '''c8 c4 |c4  c4 |c4
-       \duration{ 16 } 'b 'a 'g 'f \duration{ 4}
+       \duration  16 ; 'b 'a 'g 'f \duration  4;
        \clef\bass      
 
        |c 'b 'a 'g 'f 'e 'd 'c ''b ''a ''g ''f ''e ''d ''c
@@ -66,7 +66,7 @@ melody= \staff{melodicregs
                \geometric 1.4
                \unitspace 3.0 \cm
        }
-       ritme
-       melody
+
+       \staff{  melody}
 }
 
index 17fdb9895c43a2b65bbb07688cd1d1b11280c344..b1920e411cdcf2a037bd8a1fe720b19df52411af 100644 (file)
@@ -1,3 +1,4 @@
+%% BUG in MIDI!
 %
 % Viola Quartet
 % Martien Lohman (194x-????) 
 % \barnumberstyle\boxed
 
 globalmusic= \melodic{
-               \meter {2/4}
+               \meter 2/4;
 %              \key fis
-               \skip {2*56}
+               \skip 2*56;
 %              \key bes es as
-               \skip {2*8}
-               \meter {6/8}
-               \skip{ 8*48}
-               \meter {2/4}
-               \skip {2*16}
+               \skip 2*8;
+               \meter 6/8;
+               \skip 8*48;
+               \meter 2/4;
+               \skip 2*16;
 %              \key fis
 }
 
index 3a1b732290399ccea530d97017cbefd990d26eaa..79475cd8f720a67f79ab87068245e2ef5429b84a 100644 (file)
@@ -2,9 +2,9 @@
 \usepackage{a4}
 \oddsidemargin-1in\advance\oddsidemargin7.5mm
 \evensidemargin\oddsidemargin
+\hsize210mm\vsize297mm % so what does a4 do, anyway?
 \textwidth\hsize\advance\textwidth-15mm
 \topmargin-1in\advance\topmargin5mm
-\vsize297mm % so what does a4 do, anyway?
 \textheight\vsize\advance\textheight-30mm
 \pagestyle{empty}
 \begin{document}
index 0e78987584628cb5994b9049313470616601d1a6..4fdba3a715d6f4cfa160bb7fa660fb19958fcc20 100644 (file)
 % The purpose of this file is to demonstrate features of LilyPond;
 % respect the copyright.
 %
-alto = \melodic
-       \duration{16}
-       \clef\alto
-       \octave{c}
-       \key{fis}
+alto = \melodic  {
+       \duration 16;
+       \clef\alto;
+       \octave c;
+       \key fis;
 %1
         [ 'b8. 'a ] [ 'g8 'b c ] |
 %2
@@ -47,10 +47,10 @@ alto = \melodic{
 %15
        [ e8 fis8 ] [ g8 d8 ] |
 %16
-       \textstyle "italic"
+       \textstyle "italic";
        [ c 'a 'fis 'd ] 'g4_"fine" |
-       \textstyle "roman"
-% \scoreverb{\mulooseness=-1}
+       \textstyle "roman";
+% \scoreverb \mulooseness=-1;
 % \newline
 %17
 %=1
@@ -120,7 +120,7 @@ alto = \melodic{
 %48
        [ d e d d 'b 'g ]4/6  [ 'a8 'g8 ] |
 %theme 2
-       \duration{8}
+       \duration 8;
 %49
        [ f e d ]2/3  f4 |
 %50
@@ -136,7 +136,7 @@ alto = \melodic{
 %55
        [ d g 'g ]2/3   [ 'g 'a 'b ]2/3  |
 %56
-        'b4 c4 \key{bes es as} | % || \key\Es
+        'b4 c4 \key bes es as; | % || \key\Es
 %57
        [ 'b d ] [ 'g 'b ] |
 %58
@@ -152,7 +152,7 @@ alto = \melodic{
 %63
        [ 'g 'b ] [ es d ] |
 %64
-       [ c8. 'g32 'es32 ] 'c4 | % || \meter{6/8}
+       [ c8. 'g32 'es32 ] 'c4 | % || \meter 6/8;
 %65
        es4.( [ )es d c ] |
 %66
@@ -170,9 +170,9 @@ alto = \melodic{
 %71
         d2.  |
 %72
-        c r4 r4. | % || \meter{2/4}
+        c r4 r4. | % || \meter 2/4;
 %73
-       \duration{8}
+       \duration 8;
        [ 'b d ] [ 'g 'b ] |
 %74
        [ c es ] [ 'g c ] |
@@ -191,7 +191,7 @@ alto = \melodic{
 %81
         g4 [ as g ] |
 %82
-       \duration{16}
+       \duration 16;
        [ g f es f ] g4 |
 %83
        [ g f e f ] g4 |
@@ -204,10 +204,10 @@ alto = \melodic{
 %87
         'b2 |
 %88
-       \textstyle "italic"
-        c2_"dacapo" \key{fis} |
-       \textstyle "roman"
-%\scoreverb{\mulooseness=1}
+       \textstyle "italic";
+        c2_"dacapo" \key fis; |
+       \textstyle "roman";
+%\scoreverb \mulooseness=1;
 %      \key\G ||
        
 }
index ad9f3126b657f2b79d96cf497564bfe4cf5b581d..9ce94ae171d92ae7b089d36c37d97083e2134696 100644 (file)
 % The purpose of this file is to demonstrate features of LilyPond;
 % respect the copyright.
 %
-cello = \melodic
-       \clef"bass"
-       \octave{'c}
-       \duration{4}
-       \key{fis}
+cello = \melodic  {
+       \clef"bass";
+       \octave 'c;
+       \duration 4;
+       \key fis;
 %%1
        g 'g |
 %%2
@@ -47,9 +47,9 @@ cello = \melodic{
 %%15
        [ c8 e8 ] [ g8 'g8 ] |
 %%16
-       \textstyle "italic"
+       \textstyle "italic";
        [ d8 c'8 ] b_"fine"
-       \textstyle "roman" |
+       \textstyle "roman" ;|
 % \newline
 %%17=1
        g 'g |
@@ -77,7 +77,7 @@ cello = \melodic{
 %%28
        ) 'a d |
 %%29
-       \duration{8}
+       \duration 8;
        [ 'a a ] d4 |
 %%30
        [ 'a a ] d4 |
@@ -87,7 +87,7 @@ cello = \melodic{
        [ 'a a ] d4 |
 %%variant a
 %%33
-       \duration{16}
+       \duration 16;
        [ 'g8 'g 'g ] [ 'g8 'g 'g ] |
 %%34
        [ 'g8 'g 'g ] g4 |
@@ -104,10 +104,10 @@ cello = \melodic{
 %%40
        'd4 'g4 |
 %%41
-       \duration{8}
-       \textstyle "italic"
+       \duration 8;
+       \textstyle "italic";
        r_"pizz"
-       \textstyle "roman"
+       \textstyle "roman";
        g r 'g |
 %%42
        r g e4 |
@@ -126,10 +126,10 @@ cello = \melodic{
        [ 'd 'g ] |
 %%theme 2
 %%49
-       \textstyle "italic"
+       \textstyle "italic";
        r4_"arco"
         [ 'g 'g 'g ]2/3  |
-       \textstyle "roman"
+       \textstyle "roman";
 %%50
        r4  [ c c c ]2/3  |
 %%51
@@ -143,7 +143,7 @@ cello = \melodic{
 %%55
        g2 |
 %%56
-       'g4 'c4 \key{bes es as}|
+       'g4 'c4 \key bes es as;|
 % \key\'es ||
 %%57
        g r g r |
@@ -161,7 +161,7 @@ cello = \melodic{
        g4 'g4 |
 %%64
        c4 'c4 |
-% \meter{6/8} ||
+% \meter 6/8; ||
 %%65
        [ c c c ] c4.  |
 %%66
@@ -180,7 +180,7 @@ cello = \melodic{
 %%72
        c' r4 r4. |
 %%73
-% \meter{2/4} ||
+% \meter 2/4; ||
        g r g r |
 %%74
        c r c r |
@@ -197,7 +197,7 @@ cello = \melodic{
 %%80
        c4 'c4 |
 %%81
-       \duration{2}
+       \duration 2;
        'c |
 %%82
        'c |
@@ -212,9 +212,9 @@ cello = \melodic{
 %%87
        d |
 %%88
-       \textstyle "italic"
-       d_"dacapo" \key{fis} |
-       \textstyle "roman"
+       \textstyle "italic";
+       d_"dacapo" \key fis; |
+       \textstyle "roman";
 % \key\'g ||
        
 }
index bd0aea34ab411c24b0658f1d0b620ae3d902862f..2d59b71ab309ded2046bc893186bec88b3b1a81e 100644 (file)
 % The purpose of this file is to demonstrate features of LilyPond;
 % respect the copyright.
 %
-violinI = \melodic
-       \clef "violin"
-       \octave{c}
-       \duration{4}
-       \key{fis}
+violinI = \melodic  {
+       \clef "violin";
+       \octave c;
+       \duration 4;
+       \key fis;
 %1
        g [ b8. a16 ] |
 %2
@@ -47,9 +47,10 @@ violinI = \melodic{
 %15
        c' b |
 %16
-       \textstyle "italic"
+       \textstyle "italic";
        a g_"fine"
-       \textstyle "roman" |
+       \textstyle "roman" ;
+       |
 %\newline
 %17=1
        g [ b8. a16 ] |
@@ -86,7 +87,7 @@ violinI = \melodic{
        cis' c' |
 %variant a'
 %33
-       \duration{16} [ b8 d' d' ] [ d'8 d' d' ] |
+       \duration 16; [ b8 d' d' ] [ d'8 d' d' ] |
 %34
        [ g'8 d' d' ] b4 |
 %35
@@ -102,10 +103,10 @@ violinI = \melodic{
 %40
        c'4 < b4 d'4 > |
 %41
-       \textstyle "italic"
-       \duration{8}
+       \textstyle "italic";
+       \duration 8;
        r_"pizz" d r g
-       \textstyle "roman" |
+       \textstyle "roman" ;|
 %42
        r d e4 |
 %43
@@ -122,9 +123,9 @@ violinI = \melodic{
        r d' [ d' b ] |
 %theme 2
 %49
-       \textstyle "italic"
+       \textstyle "italic";
        r4_"arco"  [ b8  b  b ]2/3 
-       \textstyle "roman" |
+       \textstyle "roman" ;|
 %50
        r4  [ g g g ]2/3  |
 %51
@@ -138,7 +139,7 @@ violinI = \melodic{
 %55
        b2 |
 %56
-       g2 \key{bes es as}|
+       g2 \key bes es as;|
 % \key\Es ||
 %57
        f r f r |
@@ -149,16 +150,16 @@ violinI = \melodic{
 %60
        c' r c'4 |
 %61
-       \duration{16}
+       \duration 16;
         [ as f d f as d' ]4/6   [ as f d 'as d f ]4/6  |
 %62
         [ g es c 'g c es ]4/6   [ g c' es' c' g es ]4/6  |
 %63
         [ g d g bes d' g' ]4/6   [ f' d' bes g f d ]4/6  |
 %64
-       \duration{8}
+       \duration 8;
        [ c g ] g4 |
-% \meter{6/8} ||
+% \meter 6/8; ||
 %65
        [ g g g ] g4.  |
 %66
@@ -175,7 +176,7 @@ violinI = \melodic{
        [ f' d' b ] [ g a8 b ] |
 %72
        c' r4 r4. |
-% \meter{2/4} ||
+% \meter 2/4; ||
 %73
        f r f r |
 %74
@@ -185,7 +186,7 @@ violinI = \melodic{
 %76
        c' r c'4 |
 %77
-       \duration{16}
+       \duration 16;
         [ as f d f as d' ]4/6   [ as f d 'as d f ]4/6  |
 %78
         [ g es c 'g c es ]4/6   [ f c' es' c' g es ]4/6  |
@@ -194,7 +195,7 @@ violinI = \melodic{
 %80
        [ c8 g8 ] g4 |
 %81
-       \duration{2}
+       \duration 2;
        c' |
 %82
        c' |
@@ -209,10 +210,10 @@ violinI = \melodic{
 %87
        d |
 %88
-       \textstyle "italic"
+       \textstyle "italic";
        a_"dacapo"
-       \textstyle "roman"
-       \key{fis} |
+       \textstyle "roman";
+       \key fis; |
 % \key\G ||
        
 }
index 33a376e9204b86b628900b1445817d2156e8d63c..8a0ada446a7760c4a565b4800a3957612b4f1b77 100644 (file)
 % The purpose of this file is to demonstrate features of LilyPond;
 % respect the copyright.
 %
-violinII = \melodic
-       \clef "violin"
-       \octave{c}
-       \duration{4}
-       \key{fis}
+violinII = \melodic  {
+       \clef "violin";
+       \octave c;
+       \duration 4;
+       \key fis;
 %1
        d2 |
 %2
@@ -47,9 +47,9 @@ violinII = \melodic{
 %15
        c d |
 %16
-       \textstyle "italic"
+       \textstyle "italic";
        d2_"fine" |
-       \textstyle "roman"
+       \textstyle "roman";
 % \newline
 %17=1
        d2 |
@@ -86,7 +86,7 @@ violinII = \melodic{
        a fis |
 %variant a
 %33
-       \duration{16}
+       \duration 16;
        [ g8 b b ] [ b8 g a ] |
 %34
        [ b8 b b ] f4 |
@@ -103,10 +103,10 @@ violinII = \melodic{
 %40
        fis4 g4 |
 %41
-       \duration{8}
-       \textstyle "italic"
+       \duration 8;
+       \textstyle "italic";
        r_"pizz"
-       \textstyle "roman"
+       \textstyle "roman";
        'b r 'b |
 %42
        r 'b 'g4 |
@@ -124,9 +124,9 @@ violinII = \melodic{
        r fis [ fis d ] |
 %theme 2
 %49
-       \textstyle "italic"
+       \textstyle "italic";
        r4_"arco"
-       \textstyle "roman"
+       \textstyle "roman";
        [ d8 d d ]2/3  |
 %50
        r4  [ g8 g g ]2/3  |
@@ -141,7 +141,7 @@ violinII = \melodic{
 %55
        d2 |
 %56
-       f4 e4 \key{bes es as}|
+       f4 e4 \key bes es as;|
 % \key\Es ||
 %57
        d r 'b r |
@@ -159,9 +159,9 @@ violinII = \melodic{
        'b d4.  |
 %64
        es2 |
-% \meter{6/8} ||
+% \meter 6/8; ||
 %65
-       \duration{8}
+       \duration 8;
        [ c c c ] c4.  |
 %66
        [ 'g 'g 'g ] 'g4.  |
@@ -178,7 +178,7 @@ violinII = \melodic{
 %72
        es r4 r4. |
 %73
-% \meter{2/4} ||
+% \meter 2/4; ||
        d r 'b r |
 %74
        'g r es r |
@@ -187,7 +187,7 @@ violinII = \melodic{
 %76
        g r es4 |
 %77
-       \duration{2}
+       \duration 2;
        f |
 %78
        es |
@@ -210,9 +210,9 @@ violinII = \melodic{
 %87
 %      = g |
 %88
-       \textstyle "italic"
-       fis_"dacapo" \key{fis}|
-       \textstyle "roman"
+       \textstyle "italic";
+       fis_"dacapo" \key fis;|
+       \textstyle "roman";
 % \key\G ||
        
 }
index 04e2abc10b381f9df19451d9b43fbd8f341c4856..2b6aa54c2907f0246d3b2fca77e76bbfa5a23d5c 100644 (file)
@@ -4,36 +4,47 @@
 
 blah = \staff{  melodicregs
        \melodic {
-               \duration { 8 }           \meter {6/8}  
-               
-               \octave{ c }
-                        |[ a cr a a a a a a a rc a ff decr ]6/9 
-                       \octave{ c }
-                        |[ a  a a a a a a a rc a ]6/9 
-                       \octave { c' } 
-                        [ 'c 'g d a e' b' f'' c''' g''' ]6/9
-                        [ g''' c''' f'' b' e' a d 'g 'c ]6/9
-                       \octave{ c'' }
-                        [ 'c 'g d a e' b' f'' c''' g''' ]6/9
-                        [ g''' c''' f'' b' e' a d 'g 'c ]6/9
-                       \octave { ''c}   
-                        [ c g d' ]2/3 
-                        [ d' g c ]2/3  
-                        [ f c' g' ]2/3 
-                        [ g' c' f ]2/3  
-                       \octave{ c }
-                        [ c g d' ]2/3 
-                        [ d' g c ]2/3  
-                        [ f c' g' ]2/3 
-                        [ g' c' f ]2/3 
-                        [ g' c' f ]2/3 
-  \meter {4/4}
+               \meter 6/8;     
+               \duration 4.;
+               \octave  'c ;
+       \clef "bass";
+                       c d
+               \octave  c ;
+                       c d 
+               \clef "violin" ;
+               \octave  c' ;
+                       c d
+               \octave  c'' ;
+                       c d 
+               \duration  8 ;
+       %ugr
+                |[ a \< a a a a a a  \! a a \ff \> ]6/9 
+               \octave  c' ;
+                |[ a  a a a a a a a \! a ]6/9 
+               \octave  c'' ; 
+                [ 'c 'g d a e' b' f'' c''' g''' ]6/9
+                [ g''' c''' f'' b' e' a d 'g 'c ]6/9
+               \octave  c' ;
+                [ 'c 'g d a e' b' f'' c''' g''' ]6/9
+                [ g''' c''' f'' b' e' a d 'g 'c ]6/9
+               \octave  c' ;   
+                [ c g d' ]2/3 
+                [ d' g c ]2/3  
+                [ f c' g' ]2/3 
+                [ g' c' f ]2/3  
+               \octave  c ;
+                [ c g d' ]2/3 
+                [ d' g c ]2/3  
+                [ f c' g' ]2/3 
+                [ g' c' f ]2/3 
+                [ g' c' f ]2/3 
+  \meter 4/4;
        
 c1
-       \duration { 8}
+       \duration  8;
        [c-> d-> e-> f->][g-> a-> b-> c'->] % 1
-\octave{c'}    [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
-\octave{c}     [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
+\octave c';    [c'-^ b-^ a-^ g-^][f-^ e-^ d-^ c-^]
+\octave 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--] % 5
        [c-portato d-portato e-portato f-portato]
index d6d189c95c5d9d1110ea8b39b80e3097ae5e066c..a2cd75861896fe823a3e5eb2755169ea1880ce21 100644 (file)
 %              % because piece is set very tightly
 
 ii_menuetto = \melodic{
-       \clef"alto"
-       \meter{3/4}
-       \key {bes}
-       \octave{c}
+       \clef"alto";
+       \meter 3/4;
+       \key bes;
+       \octave c';
 
-       \duration{8}
-       < a2 f2 d2 df > bes4-.  |
+       \duration 8;
+               < a2 f2 d2 \f > bes4-.  |
 %%2
        < [ bes^"1" e c_"2"_"4" >
                a bes-. g-. ] a4-.^"4" |
@@ -39,38 +39,39 @@ ii_menuetto = \melodic{
 %%4
        < [ f 'a > e d cis-. 'b-. 'a-. ]
 %%5
-       < a2 f2 d2 > bes4-. | %   @bes4-. |
+       < a2 f2 d2 > bes!4-. |
 %%6
        < [ bes e > a bes-. g-. ]
-       c'4-. | % =c'4-. |
+       c'!4-. |
 %%7
        < a4-. f4>
        < d'4-.-upbow f4 'bes4 >
        < e'4-.-downbow g4 'g4 > |
 %%8
-       < cis'2.-upbow e2. 'a2. > \bar ":|:"%%!! sorry!
+       < cis'2.-upbow e2. 'a2. > 
+               \bar ":|:";
 %%9
-       \clef "violin"
-       < e'2 a2 df >
+       \clef "violin";
+       < e'2 a2 \f >
        [ d'( e'16 )f'16 ] |
 %%10
        < [ e' g > d' cis'_"2" e' a( )g ] |
 %%11
        < \multivoice  
-               {\stem{1} a4(\stem{1}) d'4 cis'4-. }
-               { \stem{-1} f2 e4 } > |
+               {\stem 1; a4(\stem 1;) d'4 cis'4-. }
+               { \stem -1; f2 e4 } > |
 %%12
        < [ g'^"4" d > f' e' f' d'^"3"( ) c' ] |
 %%13
-       \clef "alto"
+       \clef "alto";
        < \multivoice
-                { \stem{1} bes2 c'4 }
-                { \stem{-1} g4(\stem{-1}) f4 e4 }% ugh
+                { \stem 1; bes2 c'4 }
+                { \stem -1; g4(\stem -1;) f4 e4 }% ugh
        > |
 %%14
-       < [ a f > g a f ] < d'4-upbow e4 'bes4 > |
+       < [ a f > g a f ] < d'4-$upbow e4 'bes4 > |
 %%15
-       < c'4-\downbow f4 'a4 > [ bes( )a g a ] |
+       < c'4-$downbow f4 'a4 > [ bes( )a g a ] |
 %%16
        [ f( e )f a-. g-. bes-. ] |
 %%17
@@ -82,13 +83,14 @@ ii_menuetto = \melodic{
 %%20
        < { [ c'( bes a )bes g( )bes ] } { [ d ] } { [ g ] } > |
 %%21
-       < \multivoice  {\stem{1}  d'4(\stem{1} ) cis'4 d'4 }  { \stem{-1} g2 f4 } > |
+       < \multivoice  {\stem 1;  d'4(\stem 1; ) cis'4 d'4 }  { \stem -1; g2 f4 } > |
 %%22
        < { [ g( )f g e ] } { [ cis ] } > < f4 d4 > |
 %%23
-       [ 'g g ] < e4. 'a4. > d-upbow |
+       [ 'g g ] < e4. 'a4. > d-\upbow |
 %%24
-       < d2.^"fine" 'a2. 'd2._"3 mins."> \bar ":|" % \bar ":||"
+       < d2.^"fine" 'a2. 'd2._"3 mins."> 
+       \bar ":|";
 %% \tighten            % use one line less
        
 }
index 4eb7231d64c07dfc2f3e0cde70d271e208f0eb1a..095e50328a0754947cf6a7adba0ae0d6af644336 100644 (file)
@@ -2,6 +2,7 @@
 \usepackage{a4}
 \oddsidemargin-1in\advance\oddsidemargin7.5mm
 \evensidemargin\oddsidemargin
+\hsize210mm\vsize297mm % so what does a4 do, anyway?
 \textwidth\hsize\advance\textwidth-15mm
 \begin{document}
 \input lilyponddefs
index 2c6a2c06a91bfe231adf0ecc7bb2f6f35870a604..847a3c323c4d5407f62891a4c691033829bc58da 100644 (file)
@@ -9,26 +9,23 @@
 % The purpose of this file is to demonstrate features of LilyPond.
 % (there is an accompanying LaTeX file, standchen.tex)
 %
-% thanks to \music group changing, all notes 
-% (except for grace notes) are printed
-%
-%%1
+
 melodie = \melodic{  
-       \meter{ 3/4 }
-       \clef\violin
-       \key{ bes }
-       \octave{ c }
-       \duration{ 8 }
-       r pp < [ d 'a-| > f-| < d 'a-| > f-| < d 'a-| ] > |
+       \meter  3/4 ;
+       \clef\violin;
+       \key  bes ;
+       \octave  c' ;
+       \duration  8 ;
+       r \pp < [ d 'a-| > f-| < d 'a-| > f-| < d 'a-| ] > |
 %%2
        r < [ d 'bes-| > f-| < d 'bes-| > f-| < d 'bes-| ] > |
 %%3
-       \textstyle "italic"
-       r_"simile" < [ d 'bes > e < d 'bes > e < d 'bes ] >
-       \textstyle "roman" |
+       \textstyle "italic";
+       r_"simile" < [ d 'bes > e < d 'bes > e < d 'bes ] >|
+       \textstyle "roman" ;
+       
 %%4
        r < [ 'a cis > e < 'a cis > e < 'a cis ] > |
-%#%:|
 %%5
        [ a()bes a ]2/3  d'4. a |
 %%6
@@ -41,11 +38,11 @@ melodie = \melodic{
 %%9
 
        < { a'4.( )g'  [ g'( f' )e' ]2/3  }
-       { cis'4. e'_"dolce"  \plet{ 2/3 } e' \plet{ 1/1 } } > |
+       { cis'4. e'_"dolce"  \plet  2/3 ; e' \plet  1/1 ; } > |
 %%10
        < f'2. d'2. > |
 %%11
-       [ a pp( )bes a ]2/3  f'4. a |
+       [ a (\pp )bes a ]2/3  f'4. a |
 %%12
        [ g( ) a g ]2/3  e'4. d' |
 %%13
@@ -53,42 +50,44 @@ melodie = \melodic{
 %%14
        a2 r 
        < { d'( | )c'4. g  [ bes a g ]2/3  }
-       { f p ( | )e4._"dolce" bes  \plet{ 2/3 } g \plet{ 1/1 }  } > |
+       { f \p ( | )e4._"dolce" bes  
+               \plet  2/3 ; g
+               \plet  1/1 ;  
+       } > |
 %%16
        < a2. f2. > |
 %%17
-       \textstyle "italic"
+       \textstyle "italic";
        [ a8._"cresc." cis'16 ] f'4. e'
-       \textstyle "roman" |
+       \textstyle "roman" ;|
 %%18
        [ d'8. a16 ] f4. d |
 %%19
 %#%    c'\grace\stemup
-       [ bes pp( ) a bes ]2/3  d'4. bes |
+       [ bes (\pp ) a bes ]2/3  d'4. bes |
 %%20
        a2. |
 %%21
 %#%    a\grace
        [ g( )fis g ]2/3  bes4.^> g |
 %%22
-%#%    =f2. |
-       f2. |
+       f!2. |
 %%23
-       [ a8. mf cis'16 ] f'4. e' |
+       [ a8. \mf cis'16 ] f'4. e' |
 %%24
        [ d'8. a16 ] fis4. d |
 %%25
-       [ b mf( ) ais b ]2/3 d'4. b |
+       [ b \mf( ) ais b ]2/3 d'4. b |
 %%26
        < a2. fis2. > |
 %%27
-       [ e' df( )dis' e' ]2/3 g'4. cis' |
+       [ e' \f( )dis' e' ]2/3 g'4. cis' |
 %%28
        < d'2. fis2. > |
 %#%\volta1
 %%29
        <  { bes2( [ d'8.( ))g16 ] }
-       { g2 mf [ bes8. bes16 ] } > |
+       { g2 \mf [ bes8. bes16 ] } > |
 %%30
        < { a4. [ a-. a-. a-. ] }
        { fis4. [ fis-.( fis-. )fis-. ] } > |
@@ -96,7 +95,7 @@ melodie = \melodic{
        < { a4. [ a-. a-. a-. ] }
        { g4. [ cis-.( e-. )g-. ] } > |
 %%32
-       < a2 fis2 pp > < a4 fis4 > |
+       < a2 fis2 \pp > < a4 fis4 > |
 %%33
        < { b2( [ d'8.( ) )g16 ] }
        { g2 [ b8. b16 ] } > |
@@ -116,36 +115,37 @@ melodie = \melodic{
        d'4( )cis'4 r4 |
 %%39
 %#%    > a4. [ cis' e'8. >! d'16 ] |
-       a4. [ cis' e'8. d'16 ] |
+       a4. \> [ cis' e'8. \! d'16 ] |
 %%40
        cis'2 r4 |
 %%41
-       < fis'4. cis'4. df > e'  [ e'( )d' cis' ]2/3  |
+       < fis'4. \> cis'4. \f > e'  [ e'( )d' \! cis' ]2/3  |
 %%42
        [ b8. cis'16 ] d'4^> b r |
 %%43
 
-       [ b8. df cis'16 ] d'4^> b r |
+       [ b8. \f cis'16 ] d'4^> b r |
 %%44
-       [ b8. cis'16 ] d'4^> b r |
+       [ b8. \> cis'16 ] d'4^> b \! r |
 %%45
-       [ b p ( )ais b ]2/3  d'4. b |
+       [ b \p ( )ais b ]2/3  d'4. b |
 %%46
-%#%    { =a2. fis2. } |
-       < a2. fis2. > |
+       <a!2. fis2. > |
 %%47
-       [ e' df( )dis' e' ]2/3  g'4.^> cis' |
+       [ e' \f( )dis' e' ]2/3  g'4.^> cis' |
 %%48
-       \textstyle "italic"
-       < \multivoice { \stem{ 1 } fis2.( | \stem{ -1 } )f2. }
-       { \stem{ 1 } d'2.( | \stem{ 1 } )d'4 r4_"decresc." d'4 } >
-       \textstyle "roman" |
+       \textstyle "italic";
+       < \multivoice {
+               \stem  1 ; fis2.( 
+               | \stem  -1 ; )f2. }
+       { \stem  1 ; d'2.( | \stem  1 ; )d'4 r4_"decresc." d'4 } >
+       \textstyle "roman"; |
 %%50
        < bes2. e2. > |
 %%51
        < a2. cis2. > |
 %%52
-       < fis2 d2 > < a4 fis4 pp > |
+       < fis2 d2 > < a4 fis4 \pp > |
 %%53
 
        < bes2 g2 > < [ d'8.^> bes8. > < bes16 g16 ] > |
@@ -156,9 +156,9 @@ melodie = \melodic{
        < { a4. [ a-. a-. a-. ] }
        { g4. [ cis-.( e-. )g-. ] } > |
 %%56
-       \textstyle "italic"
+       \textstyle "italic";
        < a2. fis2._"dim." >
-       \textstyle "roman" |
+       \textstyle "roman"; |
 %%57
        < a2. fis2. > |
 %%58
@@ -167,11 +167,11 @@ melodie = \melodic{
 }
 
 begeleiding = \melodic{ 
-       \meter{3/4}
-       \clef\bass
-       \key{bes}
-       \octave{ c }
-       \duration{2}
+       \meter 3/4;
+       \clef\bass;
+       \key bes;
+       \octave  c' ;
+       \duration 2;
        'd r4 |
 %%2
        ''bes r4 |
@@ -183,66 +183,66 @@ begeleiding = \melodic{
        ''a r4 |
 %#%:|
 %%5
-\duration{ 8 }
-       < \multivoice { \stem{ 1 } [ 'f 'a d 'a d 'a ] }
-       { \stem{ -1 } 'd2 r4 } > |
+\duration  8 ;
+       < \multivoice { \stem  1 ; [ 'f 'a d 'a d 'a ] }
+       { \stem  -1 ; 'd2 r4 } > |
 %%6
-       < \multivoice { \stem{ 1 } [ 'd 'e 'g 'e 'g 'e ] }
-       { \stem{ -1 } ''bes2 r4 } > |
+       < \multivoice { \stem  1 ; [ 'd 'e 'g 'e 'g 'e ] }
+       { \stem  -1 ; ''bes2 r4 } > |
 %%7 
-       < \multivoice { \stem{ 1 } [ 'cis 'e 'g 'e 'g e ] }
-       { \stem{ -1 } ''a2 r4 } > |
+       < \multivoice { \stem  1 ; [ 'cis 'e 'g 'e 'g e ] }
+       { \stem  -1 ; ''a2 r4 } > |
  %%8
-       < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
-       { \stem{ -1 } 'd2 r4 } > |
+       < \multivoice { \stem  1 ; [ 'd 'a d 'a d 'a ] }
+       { \stem  -1 ; 'd2 r4 } > |
 %%9
        [ 'a e g e g e ] |
 %%10
        [ 'd 'a d 'a d 'a ] |
 %%11
-       < \multivoice { \stem{ 1 } [ 'f 'a d 'a d 'a ] }
-       { \stem{ -1 } 'd2 r4 } > |
+       < \multivoice { \stem  1 ; [ 'f 'a d 'a d 'a ] }
+       { \stem  -1 ; 'd2 r4 } > |
 %%12 == 6
-       < \multivoice { \stem{ 1 } [ 'd 'e 'g 'e 'g 'e ] }
-       { \stem{ -1 } ''bes2 r4 } > |
+       < \multivoice { \stem  1 ; [ 'd 'e 'g 'e 'g 'e ] }
+       { \stem  -1 ; ''bes2 r4 } > |
 %13
        < \multivoice { [ 'e 'g 'bes 'g 'bes 'g ] }
-       { \stem{ -1 } 'c2 r4 } > |
+       { \stem  -1 ; 'c2 r4 } > |
 %%14
-       < \multivoice { \stem{ 1 } [ 'a c f c f c ] }
-       { \stem{ -1 } 'f2 r4 } > |
+       < \multivoice { \stem  1 ; [ 'a c f c f c ] }
+       { \stem  -1 ; 'f2 r4 } > |
 %%15
        [ 'c 'g 'bes 'g 'bes 'g ] |
 %%16
        [ ''f 'c 'f 'c 'f 'c ] |
 %%17
-       < \multivoice { \stem{ 1 } [ ''a 'e 'g 'e 'g 'e ] }
-       { \stem{ -1 } ''a2 r4 } > |
+       < \multivoice { \stem  1 ; [ ''a 'e 'g 'e 'g 'e ] }
+       { \stem  -1 ; ''a2 r4 } > |
 %%18
-       < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
-       { \stem{ -1 } 'd2 r4 } > |
+       < \multivoice { \stem  1 ; [ 'd 'a d 'a d 'a ] }
+       { \stem  -1 ; 'd2 r4 } > |
 %%19
-       < \multivoice { \stem{ 1 } [ ''bes 'f 'bes 'f 'bes 'f ] }
-       { \stem{ -1 } ''bes2 r4 } > |
+       < \multivoice { \stem  1 ; [ ''bes 'f 'bes 'f 'bes 'f ] }
+       { \stem  -1 ; ''bes2 r4 } > |
 %%20
-       < \multivoice { \stem{ 1 } [ ''f 'c 'f 'c 'f 'c ] }
-       { \stem{ -1 } ''f2 r4 } > |
+       < \multivoice { \stem  1 ; [ ''f 'c 'f 'c 'f 'c ] }
+       { \stem  -1 ; ''f2 r4 } > |
 %%21
        < [ 'e 'c > 'g c 'g c 'g ] |
 %%22
        [ 'f 'a c 'a 'f 'c ] |
 %%23
-       < \multivoice { \stem{ 1 } [ ''a 'e 'g 'e 'g 'e ] }
-       { \stem{ -1 } ''a2 r4 } > |
+       < \multivoice { \stem  1 ; [ ''a 'e 'g 'e 'g 'e ] }
+       { \stem  -1 ; ''a2 r4 } > |
 %%24
-       < \multivoice { \stem{ 1 } [ 'd 'fis 'a 'fis 'a 'fis ] }
-       { \stem{ -1 } 'd2 r4 } > |
+       < \multivoice { \stem  1 ; [ 'd 'fis 'a 'fis 'a 'fis ] }
+       { \stem  -1 ; 'd2 r4 } > |
 %%25
-       < \multivoice { \stem{ 1 } [ ''g 'd 'b 'd 'b 'd ] }
-       { \stem{ -1 } ''g2 r4 } > |
+       < \multivoice { \stem  1 ; [ ''g 'd 'b 'd 'b 'd ] }
+       { \stem  -1 ; ''g2 r4 } > |
 %%26
-       < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
-       { \stem{ -1 } 'd2 r4 } > |
+       < \multivoice { \stem  1 ; [ 'd 'a d 'a d 'a ] }
+       { \stem  -1 ; 'd2 r4 } > |
 %%27
        < [ 'cis ''a > 'e 'a 'e 'a 'e ] |
 %%28
@@ -283,11 +283,11 @@ begeleiding = \melodic{
 %%44
        < [ 'd ''b > 'fis 'b 'fis 'b 'fis ] |
 %%45
-       < \multivoice { \stem{ 1 } [ ''g 'd 'b 'd 'b 'd ] }
-       { \stem{ -1 } ''g2 r4 } > |
+       < \multivoice { \stem  1 ; [ ''g 'd 'b 'd 'b 'd ] }
+       { \stem  -1 ; ''g2 r4 } > |
 %%46
-       < \multivoice { \stem{ 1 } [ 'd 'a d 'a d 'a ] }
-       { \stem{ -1 } 'd2 r4 } > |
+       < \multivoice { \stem  1 ; [ 'd 'a d 'a d 'a ] }
+       { \stem  -1 ; 'd2 r4 } > |
 %%47
        < [ 'cis ''a > 'e 'a 'e 'a 'e ] |
 %%48
@@ -316,8 +316,8 @@ begeleiding = \melodic{
 
 
 tekstI = \lyric{
-       \meter{ 3/4 }
-       \duration{4}
+       \meter  3/4 ;
+       \duration 4;
        _ _ _
        _ _ _
        _ _ _
@@ -383,8 +383,8 @@ tekstI = \lyric{
 }
 
 tekstII = \lyric{
-        \meter{3/4}
-       \duration{4}
+        \meter 3/4;
+       \duration 4;
        _ _ _
        _ _ _
        _ _ _
@@ -447,9 +447,7 @@ tekstII = \lyric{
 }
 
 \score{
-       \staff{ lyricregs
-               
-               tekstI tekstII }
+       \staff{ lyricregs tekstI tekstII }
        \staff{ melodicregs melodie }
        \staff{ melodicregs begeleiding }
        \paper{
index 4b19a6aef591b24a27bc9dd335373c093fee4956..9890a2c8ffd683e49b1d69116ac729d8af7cf7f7 100644 (file)
@@ -2,17 +2,16 @@
 \usepackage{a4}
 \oddsidemargin-1in\advance\oddsidemargin7.5mm
 \evensidemargin\oddsidemargin
+\hsize210mm\vsize297mm % so what does a4 do, anyway?
 \textwidth\hsize\advance\textwidth-15mm
-\topmargin-1in\advance\topmargin5mm
-\vsize297mm % so what does a4 do, anyway?
-\textheight\vsize\advance\textheight-30mm
+\topmargin-1in\advance\topmargin10mm
+\textheight\vsize\advance\textheight-35mm
 \pagestyle{empty}
 \begin{document}
 \input lilyponddefs
 \input titledefs
-\def\interstaffline{\vskip2mm}
+\def\interstaffline{\vskip1mm}
 \def\interscoreline{\vskip3mm}
-\vbox to 10mm{\vss}
 \title{St\"andchen\normalsize\\[2ex](Serenade)}
 \composer{Franz Schubert (1797-1828)}
 \instrument{M\"a\ss ig} % heu
index 158095c36f3007d2d3247a2acdf9611dd2507694..5d29a8ca9887dfef7c28f6821da80082f8d5b327 100644 (file)
@@ -5,7 +5,7 @@
 % Copyright: none
 
 melody = \melodic{
-       \clef\violin
+       \clef\violin;
        c4 c | g g | a a | g g |
        f f | e e | d d8.( e16 | )c2 | % :|
 
@@ -14,12 +14,13 @@ melody = \melodic{
 
        c c | g g | a a | g g |
        f f | e e | d d8.( e16 | )c2 % :|
-       \bar ":|"
+       \bar ":|";
 }
 
-accompany = \melodic{
-       \clef \bass
-       \octave{'c}\duration{4}
+accompany = \melodic {
+       \clef \bass;
+       \octave'c;
+       \duration 4;
        c4 c' | e' c' | f' c' | e' c' | 
        d' b | c' a | f g | c2 | 
 
@@ -28,13 +29,13 @@ accompany = \melodic{
 
        c c' | e' c' | f' c' | e' c' | 
        d' b | c' a | f g | c2 
-       \bar ":|"
+       \bar ":|";
 }
 
-global = \melodic{
-               \meter {2 / 4}
-               \skip {2*24}
-%              \bar "||"
+global = \melodic {
+               \meter 2 / 4;
+               \skip 2*24;
+%              \bar "||";
        }
 
 tekst = \lyric{ 
@@ -57,7 +58,7 @@ hegedraagjetekst = \lyric{
 
 texte = \lyric{ 
         
-       \textstyle "italic" 
+       \textstyle "italic" ;
        Ah! vous dir- ai_- je ma man2
        Ce qui cau- se mon tour- ment2
        Pa- pa veut que je rai- sonne2
@@ -69,7 +70,7 @@ texte = \lyric{
 
 texti = \lyric{
        
-       \textstyle "roman"
+       \textstyle "roman";
        Twin- kle, twin- kle, lit- tle star,2
        How I won- der what you are.2
        Up a- bove the world so high,2
@@ -79,7 +80,6 @@ texti = \lyric{
 }
 
 textii = \lyric{
-       \textstyle "roman"
        When the bla- zing sun is gone,2
        When he no- thing shines up- on,2
        Then you show your lit- tle light,2
@@ -91,7 +91,6 @@ textii = \lyric{
 
 textiii = \lyric{
        
-       \textstyle "roman"
        Then the tra- veler in the dark2
        Thanks you for your ti- ny spark;2
        He_could not see which way to go,2
index 15723bc442c4781882f624aba2c0dbb73dd8ce31..b023a4000cd940cb60f537bd05a4609cf6361348 100644 (file)
@@ -5,17 +5,17 @@
 %      Public Domain -- typed by by HWN
 %
  global = \melodic{
-       \meter{ 4/4 }
-       \grouping{ 2*2 }
-       \key{ bes es as }
+       \meter 4/4 ;
+       \grouping 2*2; 
+       \key bes es as; 
   }
   
- dux = \melodic
-       \clef\violin
-       \octave{ c }
-       \duration{ \last }
+ dux = \melodic  {
+       \clef "violin";
+       \octave c' ;
+       \duration  \last ;
 
-       \stem{-1}
+       \stem -1;
         r8-"dux"       
        [c'16 b] [c'8 g] [as c'16 b] [c'8 d'] |
        [g c'16 b] [c'8 d'] [f16 g] as4 [g16 f] |
@@ -27,9 +27,9 @@
        r8 [as g f] [g f16 es] [f8 d] | 
 }
 
-comes = \melodic
-       \octave{ c' }
-       \stem{1}
+comes = \melodic  {
+       \octave c'' ;
+       \stem 1;
        r1 |
        r1 |
        r8-"comes" [g16 fis] [g8 c] [es g16 f] [g8 a]|
@@ -41,9 +41,9 @@ comes = \melodic{
        
 }
 
-bassdux = \melodic
-       \clef \bass
-       \octave{ c }
+bassdux = \melodic  {
+       \clef "bass";
+       \octave c' ;
        r1 |
        r |
        r |
index f080c2dab2372c89a6e60cc7be402bc66678f1a1..c2e3c152be363cf7035d9389e068a4147a0385ca 100644 (file)
@@ -13,7 +13,6 @@
 #include "proto.hh"
 #include "plist.hh"
 #include "string.hh"
-#include "debug.hh"
 #include "source-file.hh"
 #include "binary-source-file.hh"
 #include "string-convert.hh"
index 48f251fb974b63fc45e9e54989cd74c8ccb716d2..ad2e245ba4b523fef57cdac2a02e86580ef3824e 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  duration-convert.cc -- implement 
+  duration-convert.cc -- implement Duration_convert
 
   source file of the LilyPond music typesetter
 
@@ -7,7 +7,7 @@
 */
 #include <assert.h>
 #include "duration-convert.hh"
-#include "debug.hh"
+#include "warn.hh"
 
 // statics Duration_convert
 bool const Duration_convert::midi_as_plet_b_s = true;
index 48e07059a13e61452038db89683b3c862736d2e0..0c95c66a37ea94b064e33d102a48956b83ce08af 100644 (file)
@@ -8,8 +8,6 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
 
-// split into 4?
-
 #include "proto.hh"
 #include "plist.hh"
 #include "string.hh"
 #include "source.hh"
 #include "moment.hh"
 #include "duration.hh"
-#include "debug.hh"  //ugh
 #include "duration-convert.hh"
 
 // statics Duration
 int Duration::division_1_i_s = 384 * 4;
 
+bool
+Duration::duration_type_b(int t)
+{
+    int bit_i=0;
+    while (t > 0)
+    {
+       int rem = t % 2;
+       t /= 2;
+       bit_i += (rem == 1);
+    }
+    return bit_i == 1;
+}
+
 Duration::Duration( int type_i, int dots_i = 0)
 {
+    assert(duration_type_b(type_i));
        type_i_ = type_i;
        dots_i_ = dots_i;
        ticks_i_ = 0;
diff --git a/lib/include/debug.hh b/lib/include/debug.hh
deleted file mode 100644 (file)
index b3b7861..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-  Argh! this sux! implementation not liblily
- */
-
-#ifndef DEBUG_HH
-#define DEBUG_HH
-
-#include <assert.h>
-#include <iostream.h>
-#include "dstream.hh"
-#include "real.hh"
-#include "proto.hh"
-
-void warning( String message_str  );
-void error( String message_str);
-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__ << "(): "
-extern ostream &warnout ;
-
-// progress
-extern ostream *mlog;
-
-// debugging
-extern Dstream *monitor; // monitor
-
-#ifdef NPRINT
-#define mtor if (0) *monitor   // clever hack 
-#else
-#define mtor if (check_debug) monitor->identify_as(__PRETTY_FUNCTION__)
-#endif
-
-extern bool check_debug;
-
-#endif
index de576e9884d78f275f2a7207e80ae0adff73acb6..c07dcefc6068eb728af76bff3b6231db1a6a2e6f 100644 (file)
@@ -36,15 +36,15 @@ struct Plet {
   (dur)
   */
 struct Duration {
-    /* actually i hate it when other people use default arguments,
-       because it makes you easily loose track of what-s really
-       happening; in the routine-s implementation you-re not aware
-       of this defaultness (who sets this stupid value?).*/
+    /**
+      Ctor of Duration. type_i should be a power of 2. 
+       */
     Duration( int type_i = 1, int dots_i = 0);
     /// is the "plet factor" of this note != 1 ?
     bool plet_b();
     String str()const;
     void set_plet(int,int );
+    static bool duration_type_b(int t);
     void set_ticks( int ticks_i );
     Moment length() const ;    // zo naai mij
     static int division_1_i_s;
diff --git a/lib/include/warn.hh b/lib/include/warn.hh
new file mode 100644 (file)
index 0000000..6d64cc0
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+  warn.hh -- declare 
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef WARN_HH
+#define WARN_HH
+
+#include "string.hh"
+
+void warning( String message_str  );
+void error( String message_str);
+#endif // WARN_HH
index de341811bffc26f94100972dec63e779a3056de4..7df11bf2bb29ec28233b78e5135fe404dbe6d308 100644 (file)
@@ -61,7 +61,6 @@ void
 Input::error(String s)const
 {
     message("error: "+ s);
-    exit (1);
 }
 
 String
index a9af630686dfa78b785698b0ee54d5b87f5167e4..fe56cb3551df5e71e2ece32455adb04232bef97b 100644 (file)
@@ -19,7 +19,7 @@
 #include "plist.hh"
 
 
-#include "debug.hh"
+#include "warn.hh"
 #include "windhoos-suck-suck-suck-thank-you-cygnus.hh"
 
 #include "source-file.hh"
diff --git a/lib/warn.cc b/lib/warn.cc
new file mode 100644 (file)
index 0000000..51907b6
--- /dev/null
@@ -0,0 +1,24 @@
+#include "warn.hh"
+#include <stream.h>
+
+void
+error(String s)
+{
+    cerr <<  "error: " << s << "\n";
+       
+    exit(1);
+}
+
+
+void
+warning(String m)
+{
+    cerr << "warning" <<m <<endl;
+
+}
+
+void
+message(String m)
+{
+    cerr << m<<endl;
+}
index 06a9091689299e709eaf171a86ff017245b54093..a3bb0ea6504b542724cc9468d8935292c98ef0aa 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 0
-PATCH_LEVEL = 47
+PATCH_LEVEL = 48
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index f0bff0374c347e5816e0c3aa7e03cf714fa02bba..fc1aef825b00ad80e76e6d03eed287d6822a6a78 100644 (file)
@@ -6,7 +6,7 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>,
   Mats Bengtsson <matsb@s3.kth.se>
 */
-
+#include "bar.hh"
 #include "clef-reg.hh"
 #include "clef-item.hh"
 #include "debug.hh"
@@ -47,7 +47,16 @@ Clef_register::read_req(Clef_change_req*c_l)
     if (!set_type(c_l->clef_str_))
        c_l->error("unknown clef type ");
 }
-
+void
+Clef_register::acknowledge_element(Staff_elem_info info)
+{
+    if (info.elem_p_->name() == Bar::static_name()) {
+       if (!clef_p_){
+           create_clef();
+           clef_p_->change = false;
+       }
+    }
+}
 bool
 Clef_register::try_request(Request * r_l)
 {
@@ -62,22 +71,22 @@ Clef_register::try_request(Request * r_l)
     return true;
 }
 
+void 
+Clef_register::create_clef()
+{
+    clef_p_ = new Clef_item;
+    clef_p_->read(*this);
+    announce_element(Staff_elem_info(clef_p_,
+                                        clef_req_l_));
+}
+
 void
 Clef_register::process_requests()
 {
-    Time_description const *time_l = get_staff_info().time_C_;
-    if (!clef_req_l_ && (!time_l->whole_in_measure_|| !time_l->when_)) {
-       clef_p_ = new Clef_item;
-       clef_p_->change = false;
-    } else if (clef_req_l_) {
-       clef_p_ = new Clef_item;
+    if (clef_req_l_) {
+       create_clef();
        clef_p_->change = true;
     }
-    if (clef_p_) {
-       clef_p_->read(*this);
-       announce_element(Staff_elem_info(clef_p_,
-                                        clef_req_l_));
-    }
 }
 
 void
index dfa448f41f494ce8c348c40586e7011e139a02b1..55ccf54c27f25d015a292e71c372e205af8f31a5 100644 (file)
@@ -173,6 +173,13 @@ Key_change_req::transpose(Melodic_req const & d)const
 }
 
 IMPLEMENT_STATIC_NAME(Key_change_req);
+void
+Key_change_req::squash_octaves()
+{
+    for (int i=0; i < melodic_p_arr_.size(); i++) {
+       melodic_p_arr_[i]->octave_i_ = 0;
+    }
+}
 
 void
 Key_change_req::do_print() const
@@ -185,6 +192,7 @@ Key_change_req::do_print() const
 Key_change_req::Key_change_req()
 {
        minor_b_ = false;
+       multi_octave_b_= false;
 }
 
 Key_change_req::Key_change_req(Key_change_req const&c)
@@ -192,6 +200,7 @@ Key_change_req::Key_change_req(Key_change_req const&c)
        for (int i=0; i < c.melodic_p_arr_.size(); i++) 
                melodic_p_arr_.push( c.melodic_p_arr_[i]->clone()->melodic() );
        minor_b_ = c.minor_b_;
+       multi_octave_b_ = c.multi_octave_b_;
 }
 
 Key_change_req::~Key_change_req()
@@ -208,7 +217,7 @@ Key_change_req::flats_i()
                Melodic_req* mel_l = melodic_p_arr_[i]->melodic();
                assert( mel_l );
                if ( mel_l->accidental_i_ < 0 )
-                       flats_i++;
+                       flats_i -= mel_l->accidental_i_;
        }
        return flats_i;
 }
@@ -227,7 +236,7 @@ Key_change_req::sharps_i()
                Melodic_req* mel_l = melodic_p_arr_[i]->melodic();
                assert( mel_l );
                if ( mel_l->accidental_i_ > 0 )
-                       sharps_i++;
+                       sharps_i+= mel_l->accidental_i_;
        }
        return sharps_i;
 }
index 2e59f05bd242b3fdbe8e8c22a907ab4b8539d3e2..b44a9d90e4f66d2d9da2287ec141310ec1e393e5 100644 (file)
@@ -227,7 +227,7 @@ Rhythmic_grouping::print()const
 }
 
 bool
-Rhythmic_grouping::child_fit_query(Moment start)
+Rhythmic_grouping::child_fit_b(Moment start)
 {
     if (children.size())
        return ( children.top()->interval().right== start);
@@ -240,7 +240,7 @@ Rhythmic_grouping::add_child(Moment start, Moment len)
 {
     Moment stop = start+len;
 
-    assert(child_fit_query(start));
+    assert(child_fit_b(start));
     children.push(new Rhythmic_grouping(MInterval(start, stop)));
 }
 
index 8b989f9868b4bff908165956734d87662b92efbf..72224f92f91c7cfb342767476f22dce220bf9f6b 100644 (file)
 #include "request.hh"
 #include "input-register.hh"
 
+Identifier::~Identifier()
+{
+    if (!accessed_b_ && !init_b_)
+       warning("Variable not used");
+}
 void
 Identifier::error(String expect)
 {
@@ -30,7 +35,7 @@ Identifier::error(String expect)
 }
 
 Identifier::Identifier(String n, int code)
-    :  name(n) 
+    :  name_str_(n) 
 {
     token_code_i_ = code; 
     data = 0;
@@ -41,7 +46,7 @@ Identifier::Identifier(String n, int code)
 void
 Identifier::print()const
 {
-    mtor << "identifier \'" << name << "\'=";
+    mtor << "identifier \'" << name_str_ << "\'=";
     do_print();
 }
 
index cc3a8a90e9911feb4784146a4f15a867e02e3f30..434ffcd95862aa6855a9fe2abe547852afde85c2 100644 (file)
 class Clef_register : public  Request_register {
     Clef_item *clef_p_;
     Clef_change_req * clef_req_l_;
-
+    void create_clef();
+    void read_req(Clef_change_req*);
+    bool set_type(String);
+protected:
+     virtual void process_requests();
+    virtual void pre_move_processing();
+    virtual void post_move_processing();
+    virtual bool try_request(Request*);
+    virtual void acknowledge_element(Staff_elem_info);
 public:
     int c0_position_i_;
     String clef_type_str_;
 
     /* ************** */
-    virtual void process_requests();
-    virtual void pre_move_processing();
-    virtual void post_move_processing();
-    virtual bool try_request(Request*);
+   
     Clef_register();
     NAME_MEMBERS(Clef_register);
-    void read_req(Clef_change_req*);
-    bool set_type(String);
+   
 };
 #endif // CLEF_HH
 
index 87139bd42788ccd51e81c8d7e89509502c3e70da..3c257b67f193684103fe4514a43d29cb40decc52 100644 (file)
@@ -123,12 +123,16 @@ class Key_change_req  : public Command_req  {
 public:
     Array<Melodic_req*> melodic_p_arr_;
     bool minor_b_;
-  
+
+    /// don't ignore the  octaves in #melodic_p_arr_#?
+    bool multi_octave_b_;
     Key_change_req();
     Key_change_req(Key_change_req const&);
     ~Key_change_req();
     REQUESTMETHODS(Key_change_req, keychange);
 
+    /// squash the octaves to 1
+    void squash_octaves();
     /// return number of flats in key
     int flats_i();
 
diff --git a/lily/include/commandrequest.hh b/lily/include/commandrequest.hh
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/lily/include/debug.hh b/lily/include/debug.hh
new file mode 100644 (file)
index 0000000..00f0a38
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+  Argh! this sux! implementation not liblily
+ */
+
+#ifndef DEBUG_HH
+#define DEBUG_HH
+
+#include <assert.h>
+#include <iostream.h>
+#include "dstream.hh"
+#include "real.hh"
+#include "proto.hh"
+#include "warn.hh"
+
+void error_t(const String& s, Time_description const &  t_tdes);
+void error_t(String const &s, const Moment &when);
+
+#define WARN warnout << "warning: "<<__FUNCTION__ << "(): "
+extern ostream &warnout ;
+
+// progress
+extern ostream *mlog;
+
+// debugging
+extern Dstream *monitor; // monitor
+
+
+#ifdef NPRINT
+#define mtor if (0) *monitor   // clever hack 
+#else
+#define mtor if (check_debug) monitor->identify_as(__PRETTY_FUNCTION__)
+#endif
+
+extern bool check_debug;
+
+#endif
index 06b4421b0a6a22462f3256d086682550db09622e..06061743ac97e37d324ad63f4eb0841f3e15303d 100644 (file)
@@ -34,7 +34,7 @@ struct Rhythmic_grouping {
     ~Rhythmic_grouping();
 
     void add_child(Moment start, Moment len);
-    bool child_fit_query(Moment start);
+    bool child_fit_b(Moment start);
     void split(Rhythmic_grouping r);
     void split(Array<MInterval>);
     void split(int n);
index 9078f7323cf56e9cf38f843e2f5111806164ed73..49c7b954db0c86b4daedb71492f4fbc03c341a5b 100644 (file)
 
 struct Identifier : public Input {
     void *data;
-    String name;
+    String name_str_;
     bool init_b_;
     bool accessed_b_;
     int token_code_i_;
     
     Identifier(String n, int code) ;
-    virtual ~Identifier() {}
+    virtual ~Identifier() ;
 
     void print()const;
     virtual char const *classname() const{ return "new Identifier"; }
index d8a96d066e8aa49df05c10bd51ae1faf634eeeb0..a907434bf2271505919cb9883e2e90a4f869104b 100644 (file)
@@ -19,6 +19,7 @@ struct Key_register : Request_register {
     Key_item * kit_p_;
     Array<int> accidental_idx_arr_;
     bool default_key_b_;
+    bool change_key_b_;
     
     virtual bool try_request(Request *req_l);
     virtual void process_requests();
index 3d58629d5d49dd5b9c48e11ac4f16ea2530d3e2d..cbffa1e8f7d33562ab83268c99afff77302cbae2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  key.hh -- declare Key
+  key.hh -- declare Key, Octave_key
 
   (c) 1996,97 Han-Wen Nienhuys
 */
 #include "varray.hh"
 #include "scalar.hh"
 
-/// administration of current key
-class Key {
-    Array<int> accidental_i_arr_;
-
-    /* *************** */
+/// administration of current key in one octave.
+class Octave_key {
 
 public:
+    Array<int> accidental_i_arr_;
  
     Key();
     void set(int i, int acc);
@@ -24,14 +22,19 @@ public:
 };
 
 /// administration of accidentals
-struct Local_key
+class Key
 {
-    void reset(Key);    
-    Key& oct(int);
-    Local_key();
-
-private:
-    Array<Key> octaves;
+    /** for each octave a key. Has to be private since octave 0 isn't member 0.
+     */
+    Array<Octave_key> octaves;
+public:
+    bool multi_octave_b_;
+    
+    Octave_key&oct(int);
+    Octave_key  oct(int) const;
+    void set(int name, int acc);
+    void set(int oct, int name, int acc);
+    Key();
 };
 
 #endif // KEY_HH
index 88b7adaa78283851c5dba9f9cfc000de0668d34d..ff9e0fea4f87ad7f91978c7e16c8cba9ebcda906 100644 (file)
@@ -1,2 +1,56 @@
+
+/*
+  lily-proto.hh -- declare 
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef LILY_PROTO_HH
+#define LILY_PROTO_HH
+
 struct    My_lily_lexer;
 struct My_lily_parser;
+struct Notename_table;
+struct Absolute_dynamic_req;
+struct Barcheck_req;
+struct Bar_req;
+struct Beam_req;
+struct Blank_req;
+struct Bracket_req;
+struct Cadenza_req;
+struct Clef_change_req;
+struct Cresc_req;
+struct Decresc_req;
+struct Durational_req;
+struct Dynamic_req;
+struct Group_change_req;
+struct Group_feature_req;
+struct Key_change_req;
+struct Lyric_req;
+struct Melodic_req;
+struct Measure_grouping_req;
+struct Meter_change_req;
+struct Musical_req;
+struct Command_req;
+struct Note_req;
+struct Plet_req;
+struct Partial_measure_req;
+struct Rest_req;
+struct Rhythmic_grouping_req;
+struct Rhythmic_req;
+struct Script_req;
+struct Skip_req;
+struct Slur_req;
+struct Spacing_req ;
+struct Span_req;
+struct Span_dynamic_req;
+struct Subtle_req;
+struct Stem_req;
+struct Terminate_voice_req;
+struct Text_req;
+struct Timing_req;
+
+#endif // LILY_PROTO_HH
index 96bad9999e79352ff42dbdffb6ae30cc9e779514..dd4ae4b7367ac87127774be197fc29399ba075c8 100644 (file)
@@ -14,8 +14,11 @@ struct Local_acc {
     static int compare(Local_acc&, Local_acc&);
 };
 
+/**
+  Accidentals which can be different for each octave.
+ */
 struct Local_key_item : Item {
-NAME_MEMBERS(Local_key_item);
+    NAME_MEMBERS(Local_key_item);
     Array<Local_acc> accs;
     Array<Item*> support_items_;
     int c0_position;
index 628ccc7c421ea814e6b6e649698ebd0bb85ed7d6..2ab094b3b397613c7c3a142e0c637130a8d75066 100644 (file)
@@ -11,7 +11,7 @@
 #include "key.hh"
 
 struct Local_key_register : Request_register {
-    Local_key local_key_;
+    Key local_key_;
     Local_key_item* key_item_p_;
     Key const *key_C_;
     /* *************** */
index a3079b10f4affff1f65b865faffd8850a9901025..50ec8e8c9c07eb2959b6656c0bdece1003764d46 100644 (file)
@@ -177,9 +177,8 @@ public:
      REQUESTMETHODS(Plet_req,plet);
 };
 
-/** Start / stop a beam at this note.  if #nplet# is set, the staff will try to put an
-appropriate number over the beam
-    */
+/** Start / stop a beam at this note.  if #nplet# is set, the staff
+will try to put an appropriate number over the beam */
 class Beam_req  : public Span_req  {
 public:
     int nplet;
index 8dbc42e8614818a6307dbedf3259b764675aee44..f69b7e0fb4f2feeda5da61730a37e144afca04db 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <FlexLexer.h>
 
+#include "lily-proto.hh"
 #include "proto.hh"
 #include "fproto.hh"
 #include "varray.hh"
@@ -26,23 +27,23 @@ void set_lexer();
 /// lexer for Mudela
 class My_lily_lexer : public Includable_lexer {
     int lookup_keyword(String);
-    void lookup_notename(int &large, int &small, String s);
     int scan_bare_word(String);
     int scan_escaped_word(String);
 
     bool post_quotes_b_;
 public:
-   void * lexval_l;
-    
+    void * lexval_l;
     
+    Notename_table  *note_tab_p_;
     Assoc<String, Identifier*> *identifier_assoc_p_;
     Keyword_table * keytable_p_;
     int errorlevel_i_;
 
     /* *************** */
 
+    void clear_notenames();
     Identifier*lookup_identifier(String s);
+    Melodic_req* lookup_melodic_req_l(String s);
     void push_note_state();
     void push_lyric_state();
     void pop_state();
@@ -52,7 +53,7 @@ public:
     ~My_lily_lexer();
     int yylex();
     void print_declarations(bool init_b) const;
-
+    void add_notename(String, Melodic_req*);
     bool note_state_b() const;
     bool lyric_state_b() const;
 };
index 2eef0929a4cd508ec55d1bd0cbd11bcb39494b1f..1da7940b692ef945eed776b67a0858fff1d15e6c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  my-lily-parser.hh -- declare 
+  my-lily-parser.hh -- declare My_lily_parser
 
   source file of the LilyPond music typesetter
 
@@ -32,15 +32,13 @@ class My_lily_parser {
     Voice_element* get_word_element(Text_def*, Duration*);
     void set_last_duration(Duration const *);
     void set_duration_mode(String s);
-public:
     friend int yyparse( void*);
-   
+public:
     int default_octave_i_;
     Duration default_duration_;
     String textstyle_str_;
     
     bool last_duration_mode ;
-
     Array<Request*> pre_reqs, post_reqs;
     int fatal_error_i_;
     Sources * source_l_;
@@ -49,6 +47,7 @@ public:
     My_lily_lexer * lexer_p_;
  
     Moment plet_mom();
+    void add_notename(String, Melodic_req* req_p);
     Input here_input()const;
     void remember_spot();
     Input pop_spot();
@@ -56,6 +55,7 @@ public:
     Paper_def*default_paper();
     void do_yyparse();
     void parser_error(String);
+    void clear_notenames();
 
     Request* get_parens_request(char c);
     
diff --git a/lily/include/notename-table.hh b/lily/include/notename-table.hh
new file mode 100644 (file)
index 0000000..4e357a2
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+  notename-table.hh -- declare 
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef NOTENAME_TABLE_HH
+#define NOTENAME_TABLE_HH
+
+#include "pointer.hh"
+#include "string.hh"
+#include "lily-proto.hh"
+#include "assoc.hh"
+
+class Notename_table :   Assoc<String, P<Melodic_req> >{
+public:
+    void add(String, Melodic_req*);
+    Melodic_req*get_l(String);
+};
+  
+#endif // NOTENAME_TABLE_HH
index 5c766150ac2383a4a5d8a4f065b3a2270cf5bb7f..9d06975a0dc59a76ec8f8cb7d6668b99f03871e5 100644 (file)
@@ -24,6 +24,7 @@ class Score_walker : public PCursor<Score_column *>
     Array<Staff_walker *> walker_p_arr_;
     Array<Staff_walker *> disallow_break_walk_l_arr;
     int disallow_break_count_;
+    int breaks_i_;
     void reinit();
 public:
     bool break_allowed_b();
index 4873da6b490be60952ce11ad4b66dae3b6707041..2229c99ab0e81f1b88774094bf76b60ee67dc1d2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  staff-info.hh -- declare 
+  staff-info.hh -- declare Staff_info
 
   source file of the LilyPond music typesetter
 
@@ -19,6 +19,8 @@ struct Staff_info {
     /// when is now?
     Time_description const *time_C_;
     Rhythmic_grouping const *rhythmic_C_;
+
+    ///
     bool break_allowed_b_;
 
     Moment when();
index 7cc9fcbfa90cf698213323db867e35ac2a666cd9..1054fc2c739064c2ffd809b2db961dac698e6119 100644 (file)
@@ -20,10 +20,11 @@ Key_item::Key_item(int c)
 void
 Key_item::read(Key_register const & key_reg_r)
 {
+    assert(!key_reg_r.key_.multi_octave_b_);
     const Array<int> &idx_arr =key_reg_r.accidental_idx_arr_; 
     for (int i = 0 ; i< idx_arr.size(); i++) {
        int note = idx_arr[i];
-       int acc = key_reg_r.key_.acc(note);
+       int acc = key_reg_r.key_.oct(0).acc(note);
 
        add(note, acc);
     }
index ca98995b1cf3d865c8ae4282640068a7f290f0d8..0694a3b83f3fefc007d4dc7fc45ae1ce2e849703 100644 (file)
@@ -8,13 +8,14 @@
   todo: key undo
   
   */
-#include "time-description.hh"
 #include "key-reg.hh"
 #include "key-item.hh"
 #include "command-request.hh"
 #include "staff-column.hh"
 #include "local-key-reg.hh"
 #include "musical-request.hh"
+#include "local-key-item.hh"
+#include "bar.hh"
 
 Key_register::Key_register()
 {
@@ -25,11 +26,12 @@ bool
 Key_register::try_request(Request * req_l)
 {
     Command_req* creq_l= req_l->command();
-     if (!creq_l|| !creq_l->keychange())
+    if (!creq_l|| !creq_l->keychange())
        return false;
      
     assert(!keyreq_l_);                // todo
     keyreq_l_ = creq_l->keychange();
+    change_key_b_ = true;
     read_req(keyreq_l_);
     return true;
 }
@@ -38,41 +40,43 @@ void
 Key_register::acknowledge_element(Staff_elem_info info)
 {
     Command_req * r_l = info.req_l_->command() ;
-    if (r_l && r_l->clefchange() && !kit_p_) {
-       int c0_i= *get_staff_info().c0_position_i_l_;
-        kit_p_ = new Key_item(c0_i);
-        kit_p_->read(*this);
-        announce_element(Staff_elem_info(kit_p_, keyreq_l_));
+    if (r_l && r_l->clefchange()) {
+       change_key_b_ = true;
     }
+    
+    if (info.elem_p_->name() == Bar::static_name()) 
+       default_key_b_ = true;
+
 }
 
 void
 Key_register::process_requests()
 {
-    Time_description const *time_l = get_staff_info().time_C_;
+    int c0_i= *get_staff_info().c0_position_i_l_;
 
-    if (!keyreq_l_ &&
-       (!time_l->whole_in_measure_|| !time_l->when_)) {
-       default_key_b_ = true;
-    }
-
-     if ( default_key_b_ || keyreq_l_) {
-        int c0_i= *get_staff_info().c0_position_i_l_;
-        kit_p_ = new Key_item(c0_i);
-        kit_p_->read(*this);
-        announce_element(Staff_elem_info(kit_p_, keyreq_l_));
-     }
+    if (key_.multi_octave_b_)
+       assert(false); // TODO . 
+    else 
+       kit_p_ = new Key_item(c0_i);
+    kit_p_->read(*this);
+    announce_element(Staff_elem_info(kit_p_, keyreq_l_));
 }
 
 void
 Key_register::pre_move_processing()
-{
+{ 
+
+    if (! default_key_b_ && ! change_key_b_ ) {
+       delete kit_p_ ;
+       kit_p_ =0;
+    }
+    
     if (kit_p_) {
-       if (default_key_b_) 
-           typeset_breakable_item(0,0,kit_p_);
-       else 
+       if (change_key_b_) 
            typeset_breakable_item(
                new Key_item(*kit_p_), kit_p_, new Key_item(*kit_p_));
+       else 
+           typeset_breakable_item(0,0,kit_p_);
        kit_p_ = 0;
     }
 }
@@ -82,10 +86,17 @@ Key_register::pre_move_processing()
 void
 Key_register::read_req(Key_change_req * r)
 {
+    key_.multi_octave_b_ = r->multi_octave_b_;
     accidental_idx_arr_.set_size(0);
     for (int i = 0; i < r->melodic_p_arr_.size(); i ++) {
-       int n_i=r->melodic_p_arr_[i]->notename_i_;
-       key_.set(n_i, r->melodic_p_arr_[i]->accidental_i_);
+       Melodic_req *  m_l =r->melodic_p_arr_[i];
+       int n_i=m_l->notename_i_;
+       int a_i = m_l->accidental_i_;
+       int o_i = m_l->octave_i_;
+       if (r->multi_octave_b_)
+           key_.set(o_i, n_i, a_i);
+       else
+           key_.set(n_i, a_i);
        accidental_idx_arr_.push(n_i);
     }
 }
@@ -96,6 +107,7 @@ Key_register::post_move_processing()
     keyreq_l_ = 0;
     default_key_b_ = false;
     kit_p_ = 0;
+    change_key_b_ = false;
 }
 IMPLEMENT_STATIC_NAME(Key_register);
 ADD_THIS_REGISTER(Key_register);
index 7e23464ccfec917464e06d63eeaad6f3219dca28..0f02ef845d0d3b4a9d854233ae2ec726531f1bb9 100644 (file)
@@ -3,36 +3,47 @@
 const int OCTAVES=14;          // ugh..
 const int ZEROOCTAVE=7;
 
-Key::Key()
+Octave_key::Octave_key()
 {
     accidental_i_arr_.set_size(7);
     for (int i= 0; i < 7 ; i++)
        accidental_i_arr_[i] = 0;
 }
 
-Local_key::Local_key()
+Key::Key()
 {
+    multi_octave_b_ = false;
     octaves.set_size(OCTAVES);
 }
 
-Key&
-Local_key::oct(int i)
+Octave_key&
+Key::oct(int i)
+{
+    return octaves[i+ZEROOCTAVE];    
+}
+
+Octave_key
+Key::oct(int i)const
 {
     return octaves[i+ZEROOCTAVE];    
 }
 
 void
-Key::set(int i, int a)
+Octave_key::set(int i, int a)
 {
     assert(a > -3 && a < 3);
     accidental_i_arr_[i]=a;    
 }
 
+void
+Key::set(int o, int n , int a)
+{
+    octaves[o + ZEROOCTAVE].set(n,a);
+}
 
 void
-Local_key::reset(Key k)
+Key::set (int n, int a)
 {
     for (int i= 0; i < OCTAVES ; i++)
-       octaves[i] = k;
+       octaves[i].set(n,a);
 }
-
index 9ecc6f9e4d4d09bb852ad413a2b85ed01f699a7f..00180d66a0abfc5cbd7cee9d48d2e2fdccf463ee 100644 (file)
@@ -67,6 +67,7 @@ COMMENT               %.*\n
 
 
 
+<notes,INITIAL,lyrics>
 include           {
        yy_push_state(incl);
 }
@@ -186,7 +187,7 @@ include           {
 <lyrics>[{}]   {
        return YYText()[0];
 }
-<lyrics>[()\[\]|/.^>_-] {
+<lyrics>[()\[\]|/.^>;_-] {
        return yylval.c = YYText()[0];
 }
 
@@ -228,6 +229,20 @@ include           {
 <notes>.       {
        return yylval.c = YYText()[0];
 }
+<INITIAL,lyrics,notes>\\. {
+    char c= YYText()[1];
+    yylval.c = c;
+    switch (c) {
+    case '>':
+       return E_BIGGER;
+    case '<':
+       return E_SMALLER;
+    case '!':
+       return E_EXCLAMATION;
+    default:
+       return E_CHAR;
+    }
+}
 
 <*>.           {
        LexerError( String( "illegal character: " ) +String( YYText()[0] ));
@@ -262,6 +277,12 @@ My_lily_lexer::scan_escaped_word(String str)
                mtor << "(keyword)\n";
                return l;
        }
+       Identifier * id = lookup_identifier(str);
+       if (id) {
+               mtor << "(identifier)\n";
+               yylval.id = id;
+               return id->token_code_i_;
+       }
        String *sp = new String( str);
        yylval.string=sp;
        return STRING;
@@ -270,13 +291,23 @@ int
 My_lily_lexer::scan_bare_word(String str)
 {
        mtor << "word: `" << str<< "'\n";       
-       Identifier * id = lookup_identifier(str);
-       if (id) {
-               mtor << "(identifier)\n";
-               yylval.id = id;
-               return id->token_code_i_;
+       if (YYSTATE == notes){
+               Melodic_req * mel_l = lookup_melodic_req_l(str);
+               if (mel_l) {
+                   mtor << "(notename)\n";
+                   yylval.melreq = mel_l;
+                   return NOTENAME_ID;
+               }
+       }
+       if (YYSTATE != notes) {
+               // ugr. Should do this in note mode?
+               Identifier * id = lookup_identifier(str);
+               if (id) {
+                       mtor << "(identifier)\n";
+                       yylval.id = id;
+                       return id->token_code_i_;
+               }
        }
-
        yylval.string=new String( str );
        return STRING;
 }
index 308a7ac432c6d933b54f888adda7baa7bb611705..caf3e524a66e8539a790e0a60a2074526f510caf 100644 (file)
@@ -52,7 +52,7 @@ Local_key_register::acknowledge_element(Staff_elem_info info)
        Key_register * key_reg_l =
            (Key_register*)info.origin_reg_l_arr_[0];
        key_C_ = &key_reg_l->key_;
-       local_key_.reset(*key_C_);
+       local_key_ = *key_C_;
     }  
 }
 
@@ -62,7 +62,7 @@ Local_key_register::process_requests()
     Time_description const * time_C_ = get_staff_info().time_C_;
     if (! time_C_->whole_in_measure_){
        if (key_C_)  
-           local_key_.reset(*key_C_);
+           local_key_= *key_C_;
        else if( time_C_->when_ >Moment(0))
            warning ("Help me! can't figure  current key");
     }
index 1576773e860582bfc50b6c3969d48930087a55df..ab0aced86008bd3f8267d1bf6e16914855b1f8b6 100644 (file)
@@ -26,14 +26,14 @@ bool only_midi = false;
 void
 destill_inname( String &name_str_r);
 Long_option_init theopts[] = {
-    1, "output", 'o',
-    0, "warranty", 'w',
-    0, "help", 'h',
-    0, "debug", 'd',
-    1, "init", 'i',
-    1, "include", 'I',
-    0, "midi", 'M',
-    0,0,0
+    {1, "output", 'o'},
+    {0, "warranty", 'w'},
+    {0, "help", 'h'},
+    {0, "debug", 'd'},
+    {1, "init", 'i'},
+    {1, "include", 'I'},
+    {0, "midi", 'M'},
+    {0,0,0}
 };
 
 void
index 6ff46f282cabfc19e7360bfe133e8df452bf94ae..28505097c045e5db9e9119ecf89834da8968d24e 100644 (file)
@@ -8,11 +8,11 @@
 
 #include <strstream.h>
 #include <ctype.h>
-
+#include "notename-table.hh"
 #include "interval.hh"
 #include "identifier.hh"
 #include "assoc-iter.hh"
-#include "out/parser.hh"
+#include "parser.hh"
 #include "keyword.hh"
 #include "assoc.hh"
 #include "my-lily-lexer.hh"
 #include "parseconstruct.hh"
 
 static Keyword_ent the_key_tab[]={
-    "bar", BAR,
-    "cadenza", CADENZA,
-    "clef", CLEF,
-    "cm", CM_T,
-    "duration", DURATIONCOMMAND,
-    "absdynamic", ABSDYNAMIC,
-    "group", GROUP,
-    "geometric", GEOMETRIC,
-    "in", IN_T,
-    "inputregister", INPUT_REGS,
-    "lyric", LYRIC,
-    "key", KEY,
-    "melodic" , MELODIC,
-    "melodic_request", MELODIC_REQUEST,
-    "meter", METER,
-    "midi", MIDI,
-    "mm", MM_T,
-    "multivoice", MULTIVOICE,
-    "note", NOTE,
-    "octave", OCTAVECOMMAND,
-    "output", OUTPUT,
-    "partial", PARTIAL,
-    "paper", PAPER,
-    "plet", PLET,
-    "pt", PT_T,
-    "score", SCORE,
-    "script", SCRIPT,
-    "skip", SKIP,
-    "staff", STAFF,
-    "start", START_T,
-    "stem", STEM,
-    "table", TABLE,
-    "spandynamic", SPANDYNAMIC, 
-    "symboltables", SYMBOLTABLES,
-    "tempo", TEMPO,
-    "texid", TEXID,
-    "textstyle", TEXTSTYLE,
-    "transpose", TRANSPOSE,
-    "unitspace", UNITSPACE,
-    "width", WIDTH,
-    "grouping", GROUPING,
-    0,0
+    {"bar", BAR},
+    {"cadenza", CADENZA},
+    {"clear", CLEAR},
+    {"clef", CLEF},
+    {"cm", CM_T},
+    {"duration", DURATIONCOMMAND},
+    {"absdynamic", ABSDYNAMIC},
+    {"group", GROUP},
+    {"geometric", GEOMETRIC},
+    {"in", IN_T},
+    {"inputregister", INPUT_REGS},
+    {"lyric", LYRIC},
+    {"key", KEY},
+    {"melodic" , MELODIC},
+    {"melodic_request", MELODIC_REQUEST},
+    {"meter", METER},
+    {"midi", MIDI},
+    {"mm", MM_T},
+    {"multivoice", MULTIVOICE},
+    {"note", NOTE},
+    {"notenames", NOTENAMES},
+    {"octave", OCTAVECOMMAND},
+    {"output", OUTPUT},
+    {"partial", PARTIAL},
+    {"paper", PAPER},
+    {"plet", PLET},
+    {"pt", PT_T},
+    {"score", SCORE},
+    {"script", SCRIPT},
+    {"skip", SKIP},
+    {"staff", STAFF},
+    {"start", START_T},
+    {"stem", STEM},
+    {"table", TABLE},
+    {"spandynamic", SPANDYNAMIC}, 
+    {"symboltables", SYMBOLTABLES},
+    {"tempo", TEMPO},
+    {"texid", TEXID},
+    {"textstyle", TEXTSTYLE},
+    {"transpose", TRANSPOSE},
+    {"unitspace", UNITSPACE},
+    {"width", WIDTH},
+    {"grouping", GROUPING},
+    {0,0}
 };
 
 My_lily_lexer::My_lily_lexer()
@@ -71,7 +73,7 @@ My_lily_lexer::My_lily_lexer()
     identifier_assoc_p_ = new Assoc<String, Identifier*>;
     errorlevel_i_ = 0;
     post_quotes_b_ = false;
-    
+    note_tab_p_ = new Notename_table;
 }
 
 int
@@ -83,7 +85,7 @@ My_lily_lexer::lookup_keyword(String s)
 Identifier*
 My_lily_lexer::lookup_identifier(String s)
 {
-    if (!identifier_assoc_p_->elt_query(s))
+    if (!identifier_assoc_p_->elt_b(s))
        return 0;
     
     return (*identifier_assoc_p_)[s];
@@ -93,8 +95,8 @@ My_lily_lexer::lookup_identifier(String s)
 void
 My_lily_lexer::add_identifier(Identifier*i)
 {
-    delete lookup_identifier(i->name);
-    (*identifier_assoc_p_)[i->name] = i;
+    delete lookup_identifier(i->name_str_);
+    (*identifier_assoc_p_)[i->name_str_] = i;
 }
 
 My_lily_lexer::~My_lily_lexer()
@@ -104,12 +106,9 @@ My_lily_lexer::~My_lily_lexer()
     for (Assoc_iter<String,Identifier*>
             ai(*identifier_assoc_p_); ai.ok(); ai++) {
        mtor << "deleting: " << ai.key()<<'\n';
-       Identifier *i_p = ai.val();
-       if (!i_p->accessed_b_ && !i_p->init_b_)
-           i_p->warning("Variable not used");
-       
        delete ai.val();
     }
+    delete note_tab_p_;
     delete identifier_assoc_p_;
 }
 void
@@ -129,12 +128,28 @@ My_lily_lexer::LexerError(char const *s)
        *mlog << "error at EOF" << s << '\n';
     } else {
        errorlevel_i_ |= 1;
-       error(String(s));
-       // FIXME.
-/*Input spot(source_l_g = here_spot();
+       Input spot(source_file_l(),here_ch_C());
 
        spot.error( s );
-       */
     }
 }
 
+Melodic_req*
+My_lily_lexer::lookup_melodic_req_l(String s)
+{
+    return note_tab_p_->get_l(s);
+}
+
+void
+My_lily_lexer::add_notename(String s, Melodic_req *p)
+{
+    note_tab_p_->add(s,p);
+}
+
+void
+My_lily_lexer::clear_notenames()
+{
+    delete note_tab_p_;
+    note_tab_p_ = new Notename_table;
+}
index 0463a9d07739e7d393a7a43f945bc805b25d5a32..b46d6dd1a0e943d405c09d3e83199b1bb15b3814 100644 (file)
 #include "voice-element.hh"
 #include "musical-request.hh"
 #include "command-request.hh"
+#include "parser.hh"
+
+void
+My_lily_parser::clear_notenames()
+{
+    lexer_p_->clear_notenames();
+}
 
 void
 My_lily_parser::set_debug()
@@ -81,8 +88,7 @@ My_lily_parser::here_ch_C()const
 void
 My_lily_parser::parser_error(String s)
 {
-    lexer_p_->LexerError(s);
-
+    here_input().error(s);
     if ( fatal_error_i_ )
        exit( fatal_error_i_ );
     error_level_i_ = 1;
@@ -162,9 +168,6 @@ My_lily_parser::get_parens_request(char c)
 {
     Request* req_p=0;
     switch (c) {
-    case '|':
-       req_p = new Barcheck_req;
-       break;
 
     case '[':
     case ']':
@@ -177,7 +180,12 @@ My_lily_parser::get_parens_request(char c)
     }
     break;
 
-
+    case '>':
+    case '!':
+    case '<':
+       req_p = new Span_dynamic_req;
+       break;
+    
     case ')':
     case '(':
        req_p = new Slur_req;
@@ -188,10 +196,13 @@ My_lily_parser::get_parens_request(char c)
     }
     
     switch (c) {
+    case '<':
+    case '>':
     case '(':
     case '[':
        req_p->span()->spantype = Span_req::START;
        break;
+    case '!':
     case ')':
     case ']':
        req_p->span()->spantype = Span_req::STOP;
@@ -201,6 +212,11 @@ My_lily_parser::get_parens_request(char c)
        break;
     }
 
+   if (req_p->musical()->span_dynamic()) {
+       Span_dynamic_req* s_l= (req_p->musical()->span_dynamic()) ;
+       s_l->dynamic_dir_i_ = (c == '<') ? 1:-1;
+    }
+
     req_p->set_spot( here_input());
     return req_p;
 }
@@ -242,3 +258,9 @@ My_lily_parser::here_input()const
     Source_file * f_l= lexer_p_->source_file_l();
     return Input(f_l, here_ch_C());
 }
+
+void
+My_lily_parser::add_notename(String s, Melodic_req * m_p)
+{
+    lexer_p_->add_notename(s, m_p);
+}
index 0d43d5323499bae079c814ec1b74584d91340c28..0dc31417e42ddc50beec2181f778b07311a055fb 100644 (file)
@@ -28,15 +28,6 @@ get_plet_request( char c, int dur_i, int type_i )
     return plet_req_p;
 }
 
-
-void
-add_requests(Voice_element *v, Array<Request*> &req)
-{
-    for (int i = 0; i < req.size(); i++) {
-       v->add(req[i]);
-    }
-    req.set_size(0);
-}
 String *
 get_scriptdef(char c)
 {
@@ -89,8 +80,8 @@ get_grouping_req(Array<int> i_arr)
 {
     Measure_grouping_req * mr_p = new Measure_grouping_req;
     for (int i=0; i <i_arr.size(); ) {
-       mr_p->beat_i_arr_.push(i_arr[i++]);
        mr_p->elt_length_arr_.push(Moment(1, i_arr[i++]));
+       mr_p->beat_i_arr_.push(i_arr[i++]);
     }
     return mr_p;
 }
diff --git a/lily/notename-table.cc b/lily/notename-table.cc
new file mode 100644 (file)
index 0000000..b875392
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+  notename-table.cc -- implement Notename_table
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "notename-table.hh"
+#include "pointer.tcc"
+#include "musical-request.hh"
+
+template class P<Melodic_req>;
+
+void
+Notename_table::add(String s, Melodic_req *m_p)
+{
+    elem(s).set_p(m_p);
+}
+
+Melodic_req*
+Notename_table::get_l(String s)
+{
+    if (! elt_b(s))
+       return 0;
+    return elem(s);
+}
+    
index 69ef223a4e499eac6a1a4d62f75818a3434ec057..fd81c4f08fae871a71742061a3c32a992feabce4 100644 (file)
@@ -95,6 +95,7 @@ yylex(YYSTYPE *s,  void * v_l)
 
 %token BAR
 %token CADENZA
+%token CLEAR
 %token CLEF
 %token CM_T
 %token DURATIONCOMMAND
@@ -114,6 +115,7 @@ yylex(YYSTYPE *s,  void * v_l)
 %token MM_T
 %token MULTIVOICE
 %token NOTE
+%token NOTENAMES
 %token OCTAVECOMMAND
 %token OUTPUT
 %token PAPER
@@ -137,8 +139,12 @@ yylex(YYSTYPE *s,  void * v_l)
 %token UNITSPACE
 %token WIDTH
 
+/* escaped */
+%token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR
+
 %token <i>     DOTS
 %token <i>     INT
+%token <melreq>        NOTENAME_ID
 %token <id>    REGS_IDENTIFIER
 %token <id>    IDENTIFIER
 %token <id>    MELODIC_REQUEST_IDENTIFIER 
@@ -179,7 +185,7 @@ yylex(YYSTYPE *s,  void * v_l)
 %type <paper>  paper_block paper_body
 %type <real>   dim real
 %type <real>   unit
-%type <request>        post_request pre_request command_req 
+%type <request>        post_request pre_request command_req verbose_command_req abbrev_command_req
 %type <request>        pure_post_request pure_post_request_choice
 %type <request>        script_req textscript_req dynamic_req 
 %type <score>  score_block score_body
@@ -205,9 +211,23 @@ mudela:    /* empty */
        }
        | mudela add_declaration { }
        | mudela error
+       | mudela add_notenames { }
        ;
 
-
+add_notenames:
+       NOTENAMES '{' notenames_body '}'
+       ;
+notenames_body:
+       /**/    {
+       }
+       | notenames_body CLEAR  {
+               THIS->clear_notenames();
+       }
+       | notenames_body STRING '=' melodic_request {
+               THIS->add_notename(*$2, $4);
+               delete $2;
+       }
+       ;
 /*
        DECLARATIONS
 */
@@ -225,7 +245,7 @@ declarable_identifier:
        }
        | old_identifier { 
                THIS->remember_spot();
-               $$ = new String($1->name); 
+               $$ = new String($1->name_str_); 
                THIS->here_input().warning("redeclaration of `" + *$$ + "'");
        }
        ;
@@ -424,7 +444,10 @@ staff_block:
 
 
 staff_init:
-       REGS_IDENTIFIER {
+        STAFF_IDENTIFIER {
+               $$ = $1->staff(true);
+       }
+       | REGS_IDENTIFIER {
                $$ = new Input_staff;
                $$->ireg_p_ = $1->iregs(true);
        }
@@ -502,7 +525,7 @@ music_voice_body:
        | music_voice_body full_element {
                $$->add_elt($2);
        }
-       | music_voice_body voice_command {
+       | music_voice_body voice_command ';' {
        }
        | music_voice_body music_chord  {
                $$->add($2);
@@ -565,7 +588,7 @@ command_elt:
                $$-> set_spot( THIS->here_input());
        }
 /* cont: */
-       command_req     {
+       command_req {
                $2-> set_spot( THIS->here_input());
                $$->add($2);
 
@@ -573,52 +596,60 @@ command_elt:
        ;
 
 command_req:
+       abbrev_command_req      
+       | verbose_command_req ';'       { $$ = $1; }
+       ;
+
+abbrev_command_req:
         '|'                            { 
                $$ = new Barcheck_req;
        }
-       | BAR STRING                    {
+       ;
+
+verbose_command_req:
+       BAR STRING                      {
                $$ = new Bar_req(*$2);
                delete $2;
        }
-       | METER '{' int '/' int '}'     {
+       | METER int '/' int     {
                Meter_change_req *m = new Meter_change_req;
-               m->set($3,$5);
+               m->set($2,$4);
                // sorry hw, i need meter at output of track,
                // but don-t know where to get it... statics should go.
                // HW : default: 4/4, meterchange reqs may change it.
                
-               Midi_def::num_i_s = $3;
-               Midi_def::den_i_s = $5;
+               Midi_def::num_i_s = $2;
+               Midi_def::den_i_s = $4;
                $$ = m;
        }
-       | SKIP '{' duration_length '}' {
+       | SKIP duration_length {
                Skip_req * skip_p = new Skip_req;
-               skip_p->duration_ = *$3;
-               delete $3;
+               skip_p->duration_ = *$2;
+               delete $2;
                $$ = skip_p;
        }
-       | CADENZA '{' int '}'   {
-               $$ = new Cadenza_req($3);
+       | CADENZA int   {
+               $$ = new Cadenza_req($2);
        }
-       | PARTIAL '{' duration_length '}'       {
-               $$ = new Partial_measure_req(*$3);
-               delete $3;
+       | PARTIAL duration_length       {
+               $$ = new Partial_measure_req(*$2);
+               delete $2;
        }
-       | STEM '{' int '}'              {
-               $$ = get_stemdir_req($3);
+       | STEM int      {
+               $$ = get_stemdir_req($2);
        }
        | CLEF STRING {
                $$ = new Clef_change_req(*$2);
                delete $2;
        }
-       | KEY '{' pitch_list '}'        {       
+       | KEY pitch_list        {       
                Key_change_req *key_p= new Key_change_req;
-               key_p->melodic_p_arr_ = *$3;
+               key_p->melodic_p_arr_ = *$2;
                $$ = key_p;
-               delete $3;
+               delete $2;
        }
-       | GROUPING '{' intastint_list '}' {
-               $$ = get_grouping_req(*$3); delete $3;
+       | GROUPING intastint_list {
+               $$ = get_grouping_req(*$2); delete $2;
        }
        | GROUP STRING          {
                $$ = new Group_change_req;
@@ -669,8 +700,8 @@ pure_post_request_choice:
        URG!!
 */
 steno_melodic_req:
-       MELODIC_REQUEST_IDENTIFIER      {
-               $$ = $1->request(false)->clone()->melodic();
+       NOTENAME_ID     {
+               $$ = $1->clone()->melodic();
                $$->octave_i_ += THIS->default_octave_i_;
        }
        | steno_melodic_req POST_QUOTES         {  
@@ -730,10 +761,19 @@ close_request_parens:
        | ']'   { 
                $$ = ']';
        }
+       | E_SMALLER {
+               $$ = '<';
+       }
+       | E_BIGGER {
+               $$ = '>';
+       }
        ;
   
 open_request_parens:
-       ')'     { 
+       E_EXCLAMATION   {
+               $$ = '!';
+       }
+       | ')'   { 
                $$=')';
        }
        | '['   {
@@ -741,6 +781,8 @@ open_request_parens:
        }
        ;
 
+
+
 script_definition:
        SCRIPT '{' script_body '}'      { $$ = $3; }
        ;
@@ -813,21 +855,30 @@ pre_request:
        ;
 
 voice_command:
-       PLET    '{' INT '/' INT '}'             {
-               THIS->default_duration_.set_plet($3,$5);
+       PLET     INT '/' INT {
+               THIS->default_duration_.set_plet($2,$4);
        }
-       | DURATIONCOMMAND '{' STRING '}'        {
-               THIS->set_duration_mode(*$3);
-               delete $3;
+       | DURATIONCOMMAND STRING {
+               THIS->set_duration_mode(*$2);
+               delete $2;
        }
-       | DURATIONCOMMAND '{' notemode_duration '}'     {
-               THIS->default_duration_ = *$3;
-               delete $3;
+       | DURATIONCOMMAND notemode_duration {
+               THIS->default_duration_ = *$2;
+               delete $2;
        }
-       | OCTAVECOMMAND { THIS->default_octave_i_ = 2; }
+       | OCTAVECOMMAND { 
+               /*
+                       This is weird, but default_octave_i_
+                       is used in steno_note_req too
+
+                       c' -> default_octave_i_ == 1
+               */
+               /* why can't we have \oct{0} iso \oct{c'}*/
+               THIS->default_octave_i_ = 1; }
 /* cont */
-       '{' steno_melodic_req '}'       {
-               THIS->default_octave_i_ = $4->octave_i_;
+       steno_melodic_req {
+               THIS->default_octave_i_ = $3->octave_i_;
+               delete $3;
        }
        | TEXTSTYLE STRING      {
                THIS->textstyle_str_ = *$2;
@@ -861,7 +912,10 @@ notemode_duration:
 explicit_duration:
        int             {
                $$ = new Duration;
-               $$->type_i_ = $1;
+               if ( !Duration::duration_type_b($1) )
+                       THIS->parser_error("Not a duration");
+               else 
+                       $$->type_i_ = $1;
        }
        | explicit_duration DOTS        {
                $$->dots_i_ = $2;
@@ -901,8 +955,8 @@ lyrics_elt:
 pitch_list:                    {
                $$ = new Array<Melodic_req*>;
        }
-       | pitch_list MELODIC_REQUEST_IDENTIFIER {
-               $$->push($2->request(false)->clone()->melodic());
+       | pitch_list NOTENAME_ID        {
+               $$->push($2->clone()->melodic());
        }
        ;
 
index 7221750c02eaa3d81e85a974c540047ac8975468..6d6aed474320491515c0db2e13e5628b894b31ed 100644 (file)
@@ -29,6 +29,7 @@ Score_walker::Score_walker(Score *s)
        s->find_col(s->last(), false)->set_breakable();
     }
     reinit();
+    breaks_i_=0;
 }
 
 
@@ -102,13 +103,16 @@ Score_walker::process()
            walker_p_arr_[i]->process();
        }
     }
-    if (when().denominator() == 1) {
-       *mlog << "." <<flush;
+    if (break_allowed_b()){
+       breaks_i_ ++;
+       if (! (breaks_i_ % 8)) 
+           *mlog << "[" <<breaks_i_<<"]"<<flush;
     }
 }
 
 Score_walker::~Score_walker()
 {
+    *mlog << "[" <<breaks_i_<<"]"<<flush;
     for (int i=0; i < walker_p_arr_.size(); i++) 
        delete walker_p_arr_[i];
     assert( !score_l_->find_col(score_l_->last(), true)->used_b());
index 80aa4507719754bb67a977aea59e3f5cf4d73387..773f0ac1e0bf363036793fc340766fd781339468 100644 (file)
@@ -40,7 +40,7 @@ Stem_beam_register::try_request(Request*req_l)
     }
     
     if ( req_l->stem() ) {
-       if (current_grouping && !current_grouping->child_fit_query(
+       if (current_grouping && !current_grouping->child_fit_b(
            get_staff_info().time_C_->whole_in_measure_))
            return false;
 
index d49a1d34b80cf745f07d8a1bbb225f7751da2095..9dc82c0631c32160a43d9c73ccb0e0b5257db186 100644 (file)
@@ -1,3 +1,11 @@
+/*
+  symtable.cc -- implement Symbol_table
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #include "misc.hh"
 #include "dimen.hh"
 #include "debug.hh"
@@ -28,7 +36,7 @@ Symtables::~Symtables()
 Symbol 
 Symtable::lookup(String s) const
 {
-    if (elt_query(s))
+    if (elt_b(s))
        return (*this)[s];
     else {
        error( "Symtable `" + id_str+ "\': unknown symbol `" +s+"'\n");
index 08c8b526960dbc03f1be58e4a0ad1b39ee4afa06..3e6b98f9f12d917d2dec6a1de41fe52be160a743 100644 (file)
@@ -21,13 +21,6 @@ ostream &warnout (cerr);
 ostream *mlog(&cerr);
 
 
-void
-error(String s)
-{
-    cerr <<  "error: " << s << "\n";
-       
-    exit(1);
-}
 
 void
 error_t(String const & s, Moment const & r)
@@ -43,16 +36,3 @@ error_t(String const & s, Time_description const &t_tdes)
     String e=s+ " (at t=" + String(t_tdes.bars_i_) + ": " + String(t_tdes.whole_in_measure_) + ")\n";
     error(e);
 }
-
-void
-warning(String m)
-{
-    cerr << "warning" <<m <<endl;
-
-}
-
-void
-message(String m)
-{
-    cerr << m<<endl;
-}
index 0d51e646b0ab78d1792aa5f49afe3204bed4f2d3..596ed97f15c31034063564d8b524d1476b8b9989 100644 (file)
@@ -20,7 +20,7 @@ NAME = make
 
 # list of distribution files:
 #
-EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in Toplevel.make.in
+EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in Toplevel.make.in lilypond.lsm.in
 #
 
 # generic variables:
diff --git a/make/lilypond.lsm.in b/make/lilypond.lsm.in
new file mode 100644 (file)
index 0000000..2eee038
--- /dev/null
@@ -0,0 +1,18 @@
+Begin3
+Title: LilyPond
+Version: @TOPLEVEL_VERSION@
+Entered-date: @DATE@
+Description: LilyPond is a program which converts a music-script (mudela) into
+TeX output, or MIDI to produce multi-staff scores. Features include multiple
+meters, clefs, keys, lyrics, versatile input-language, cadenzas
+beams, slurs, triplets.
+Keywords: music typesetting midi notation
+Author: hanwen@stack.nl (Han-Wen Nienhuys)
+Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
+Primary-site: pcnov095.win.tue.nl /pub/lilypond/  
+       300k lilypond-@TOPLEVEL_VERSION@.tar.gz
+Alternate-site: 
+Original-site: 
+Platform: unix/win32, GNU C++
+Copying-policy: GPL
+End
index a6a7c591024bd09112e9a0ef44a795748c840674..9d9bf8ecc092dcde2eb53eff2754534a0fb5736a 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "proto.hh"
 #include "plist.hh"
-#include "debug.hh"
+#include "warn.hh"
 #ifdef mtor
 #undef mtor
 #endif
index f1b61cab5bdc3b36fa2bc6cfc0857a51fee5dc4c..8552c422679ad7cebe531d508aa49e1cab401856 100644 (file)
@@ -25,7 +25,7 @@ Lily_stream::~Lily_stream()
 {
     delete os_p_;
     if ( indent_i_ )
-       warning( "lily indent level: " + String( indent_i_ ), 0 );
+       warning( "lily indent level: " + String( indent_i_ ));
 }
 
 Lily_stream&
@@ -131,7 +131,7 @@ Lily_stream::open()
 {
     os_p_ = new ofstream( filename_str_ );
     if ( !*os_p_ )
-       error ( "can't open `" + filename_str_ + "\'", 0 );
+       error ( "can't open `" + filename_str_ + "\'");
 }
 
 void
index b8795395afaef95173aed5cc12cc521da2170781..b3f057799145f9926b891a5353b1b613bea7d2fb 100644 (file)
@@ -11,9 +11,6 @@ Sources* source_l_g = &source;
 
 Verbose level_ver = NORMAL_ver;
 
-//ugh
-char const* defined_ch_C = 0;
-
 // ugh, another global
 String
 find_file( String str )
@@ -21,42 +18,6 @@ find_file( String str )
     return str;
 }
 
-// ugh, copied from warn.cc, cannot use
-void
-message( String message_str, char const* context_ch_C )
-{
-    String str = "mi2mu: ";
-    Source_file* sourcefile_l = source_l_g->sourcefile_l( context_ch_C );
-    if ( sourcefile_l ) {
-       str += sourcefile_l->file_line_no_str(context_ch_C) + String(": ");
-    }
-    str += message_str;
-    if ( sourcefile_l ) {
-       str += ":\n";
-       str += sourcefile_l->error_str( context_ch_C );
-    }
-//    if ( busy_parsing() )
-    cerr << endl; // until we have fine output manager...
-    cerr << str << endl;
-}
-
-void
-warning( String message_str, char const* context_ch_C )
-{
-    message( "warning: " + message_str, context_ch_C );
-}
-
-void
-error( String message_str, char const* context_ch_C )
-{
-    message( message_str, context_ch_C );
-    // since when exits error again?
-    // i-d say: error: errorlevel |= 1; -> no output upon error
-    //          warning: recovery -> output (possibly wrong)
-    if ( midi_lexer_l_g )
-        midi_lexer_l_g->errorlevel_i_ |= 1;
-}
-
 void
 usage()
 {
index c909e07c7b1bf9de10ad9dff3080bcbb973cc242..d0715208efeb69aec9e6fe120961464fa101ac15 100644 (file)
@@ -174,7 +174,7 @@ Midi_time::Midi_time( int num_i, int den_i, int clocks_4_i, int count_32_i )
 {
        sync_f_ = 1.0;
        if ( count_32_i != 8 )
-               warning( String( "#32 in quarter: " ) + String( count_32_i ), 0 );
+               warning( String( "#32 in quarter: " ) + String( count_32_i ));
        num_i_ = num_i;
        den_i_ = den_i;
        clocks_1_i_ = clocks_4_i * 4; 
index f61d2b4656dc9a1a464cf8cb98daacab61f416bb..691955d5748bf6213743aea68368ae66d896f966 100644 (file)
@@ -373,8 +373,9 @@ SSME                [\0x7f][\x03]
 }
 <meta_event>{U8} {
        warning( String( "meta_event: unimplemented event: " )
-               + String_convert::bin2hex_str( String( *YYText() ) ),
-               this->here_ch_C() );
+               + String_convert::bin2hex_str( String( *YYText() ) )
+//,            this->here_ch_C() 
+       );
        yy_pop_state();
        yy_pop_state();
        yy_push_state( u8 ); 
index 8893005c76758d5878d00c0d00791959fb765737..7109ebfbe402086e61ab43ad2db61874de55d20b 100644 (file)
@@ -29,9 +29,12 @@ My_midi_lexer::~My_midi_lexer()
 void
 My_midi_lexer::error( char const* sz_l )
 {
-    if ( !source_file_l_ ) {
+    if (1|| !source_file_l_ ) {
        cerr << "error at EOF" << sz_l << '\n';
     } else {
+       
+       // FIXME
+       #if 0
        char const* ch_C = here_ch_C();
        if ( ch_C ) {
            ch_C--;
@@ -40,7 +43,8 @@ My_midi_lexer::error( char const* sz_l )
            ch_C++;
        }
        errorlevel_i_ |= 1;
-       ::error( sz_l, ch_C );
+       error( sz_l);
+       #endif
     }
 }
 
index 1530e36ac81d06fb1f7d52107ac2aef5c04c4b12..a8a2fb1e3b4c4cec9f36740724783b5c92173e8e 100644 (file)
@@ -142,7 +142,7 @@ My_midi_parser::set_division_4( int division_4_i )
        division_1_i_ = division_4_i * 4;
        Duration::division_1_i_s = division_1_i_;
        if ( division_4_i < 0 )
-               warning( "seconds iso metrical time" , 0 );
+               warning( "seconds iso metrical time" );
 }
 
 void