]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.0.53 release/0.0.53
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 21 Apr 1997 07:28:06 +0000 (09:28 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 21 Apr 1997 07:28:06 +0000 (09:28 +0200)
86 files changed:
.dstreamrc
.version
Documentation/AUTHORS.pod [new file with mode: 0644]
Documentation/INSTALL.pod
Documentation/convert-mudela.pod [new file with mode: 0644]
Documentation/index.pod
Documentation/lilypond.pod
Documentation/mudela.pod
INSTALL.text
NEWS
TODO
bin/Makefile
bin/convert-mudela
bin/release
flower/.version
flower/NEWS
flower/include/cursor.hh
flower/include/cursor.icc
flower/include/fproto.hh
flower/include/iterate.hh
flower/include/pcursor.hh
flower/include/pqueue.hh
flower/include/priorities.hh [new file with mode: 0644]
flower/include/varray.hh
flower/test/Makefile
flower/test/flower-test.hh [new file with mode: 0644]
flower/test/main.cc [new file with mode: 0644]
flower/test/pqtest.cc [new file with mode: 0644]
flower/test/stringtest.cc
init/dutch.ini
init/symbol.ini
input/error.ly
input/kortjakje.ly
input/martien.ly
input/scsii-menuetto.ly
input/standchen.ly
input/wohltemperirt.ly
lily/.version
lily/Stable.make
lily/calcideal.cc
lily/complex-walker.cc
lily/include/key.hh
lily/include/lily-proto.hh
lily/include/midi-output.hh
lily/include/midi-walker.hh
lily/include/musical-request.hh
lily/include/my-lily-parser.hh
lily/include/pulk-voice.hh [new file with mode: 0644]
lily/include/pulk-voices.hh [new file with mode: 0644]
lily/include/request-column.hh [new file with mode: 0644]
lily/include/score.hh
lily/include/staff-column.hh
lily/include/staff.hh
lily/include/voice-element.hh
lily/include/voice.hh
lily/input-music.cc
lily/input-score.cc
lily/key-item.cc
lily/key-reg.cc
lily/key.cc
lily/lexer.l
lily/linespace.cc
lily/local-key-reg.cc
lily/midi-output.cc
lily/midi-walker.cc
lily/my-lily-lexer.cc
lily/my-lily-parser.cc
lily/parser.y
lily/pulk-voice.cc [new file with mode: 0644]
lily/pulk-voices.cc [new file with mode: 0644]
lily/request-column.cc [new file with mode: 0644]
lily/score-walker.cc
lily/score.cc
lily/staff-column.cc
lily/staff-info.cc
lily/staff.cc
lily/template7.cc [new file with mode: 0644]
lily/template8.cc [new file with mode: 0644]
lily/voice-element.cc
lily/voice.cc
make/Makefile
make/Variables.make
make/lilypond.lsm [new file with mode: 0644]
make/lilypond.lsm.in
make/lilypond.spec
tex/dimen.tex

index 4e1e791e3e57c96438b73b5b5609c1819026c800..c992908ec43a1c50b96cd66fd5c80ee8de7330da 100644 (file)
@@ -2,7 +2,7 @@
 Dstream                        1
 
 File_path              1
-My_lily_lexer          0
+My_lily_lexer          1
 PCol                   1
 Score_column           1
 Ineq_constrained_qp    1
@@ -14,7 +14,7 @@ Idealspacing          1
 
 # yydebug
 InitParser             1
-Parser                 0
+Parser                 1
 InitDeclarations       1
 Declarations           1
 # FlexLexer debug
index 1457d1972e812d7d3bb929cb227c14f1f64f0534..09683a7054e49fd381abc29eb49728936bdd1f92 100644 (file)
--- a/.version
+++ b/.version
@@ -1,6 +1,6 @@
 TOPLEVEL_MAJOR_VERSION = 0
 TOPLEVEL_MINOR_VERSION = 0
-TOPLEVEL_PATCH_LEVEL = 52
+TOPLEVEL_PATCH_LEVEL = 53
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
diff --git a/Documentation/AUTHORS.pod b/Documentation/AUTHORS.pod
new file mode 100644 (file)
index 0000000..c11a911
--- /dev/null
@@ -0,0 +1,31 @@
+=head1 NAME
+
+AUTHORS - who did what on LilyPond?
+
+=head1 DESCRIPTION
+
+This file lists authors of LilyPond, and what they wrote.  
+
+=over 4
+
+=item *
+
+Han-Wen Nienhuys <hanwen@stack.nl>
+
+Main author, all files files except mentioned below
+
+=item *
+
+Jan Nieuwenhuizen <jan@digicash.com>
+
+lily/midi-*, mi2mu/*, flower/string.cc, make/*.make, Documentation/mudela.pod
+lib/*source-file*, lib/duration.cc, lib/source, flower/*list*
+
+and corresponding header files.
+
+=item *
+
+Mats Bengtsson <matsb@s3.kth.se>, parts of clef-reg.cc, clef-item.cc
+testing, general comments.
+
+=back
index 26343b17e07be42dee90d2f9f486ac2ea4b1e7bc..d5920a70ab02a09e353c4934a4c01944234e2de1 100644 (file)
@@ -126,6 +126,15 @@ everything will be compiled, but nothing will be installed.  The
 resulting binaries can be found in the subdirectory
 F<bin/>.
 
+=head1 INSTALLING
+
+If you have done a successful C<make>, then a simple
+
+       make install
+
+should do the trick. Install the musixtex fonts in a directory which
+TeX and MF knows. Do not forget to rehash TeX (if applicable)
+
 =head1 RUNNING
 
 GNU LilyPond does use a lot of resources. For operation you need the following:
@@ -134,16 +143,19 @@ GNU LilyPond does use a lot of resources. For operation you need the following:
 =over 5
 
 =item *
+
 A fast computer (a full page of music typically takes 1 minute
 on my 486/66, using the B<--enable-checking> compile. It's lot slower
 than most MusiXTeX preprocessors)
 
 =item *
+
 TeX
 
 =item *
-The MusixTeX fonts. (I use those found in MusixTeX
-T.59)
+
+The MusixTeX fonts. (I use those found in MusixTeX T.59). Beware, the
+clef symbol has changed position in recent versions of MusixTeX)
 
 =back
 
diff --git a/Documentation/convert-mudela.pod b/Documentation/convert-mudela.pod
new file mode 100644 (file)
index 0000000..34e5bc8
--- /dev/null
@@ -0,0 +1,42 @@
+=head1 NAME
+
+convert-mudela  - convert mudela to newer versions
+
+=head1 SYNOPSIS
+
+       convert-mudela [options] [files]
+
+=head1 DESCRIPTION
+
+convert-mudela sequentially applies different mudela-conversions to
+upgrade a Mudela input file from FROM_PATCHLEVEL to TO_PATCHLEVEL.
+If no files are given, the standard input and output are used
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--output>
+
+The output file to write
+
+=item B<--edit> 
+
+Do an inline edit of the input file. override B<--output>
+
+=item B<--show-rules>
+
+shows all known conversions.
+
+=item B<--from>=FROM_PATCHLEVEL
+
+Set the level to convert from. If this is not set, convert-mudela will
+guess this, on the basis of C<\version> strings in the file
+
+=item B<--to>=TO_PATCHLEVEL
+
+Set the goal version of the conversion. It defaults to the latest
+available version.  
+
+=back
+
index b67f1543ff85deeefd2c030fb1f3082e7df92b46..7a09c8d1d2d70fd478078eeccc8686dd95a2a4ae 100644 (file)
@@ -34,6 +34,14 @@ Design criteria
 </a
 >
 
+=item *
+<a href=AUTHORS.html
+>
+AUTHORS
+</a
+>
+
+
 =item *
 <a href=lilypond.html
 >
@@ -55,6 +63,14 @@ Mudela, the input format
 </a
 >
 
+=item *
+<a href=convert-mudela.html
+>
+The mudela convertor: convert-mudela
+</a
+>
+
+
 =item *
 <a href=faq.html
 >
index 555c0eeb0e53725b2bd5efb1731555a92863b1ae..329fe3b5b4d83bd6d1c79f655f9f1e4794eec3df 100644 (file)
@@ -123,7 +123,10 @@ the GNU General Public License, which is in the file F<COPYING>
 
 =head1 AUTHORS
 
-=over 5
+Please consult the documentation file AUTHORS for more detailed
+information, and small contributions. 
+
+=over 4
 
 =item *
 
@@ -138,10 +141,6 @@ Jan Nieuwenhuizen <jan@digicash.com>,  http://www.digicash.com/~jan.
 Context errors, Lyrics, mi2mu, MIDI stuff, make structure, bits of
 FlowerLib, general comments, Mudela design.
 
-=item *
-
-Mats Bengtsson <matsb@s3.kth.se>, bugfixes, testing, general comments.
-
 =back
 
 Your name could be here! If you want to help, then take a look at the
index f66180e238d3730e4c3f6688b34217947c8f7984..7fb25b38a415070ef4b12f71d3d35747d3973f71 100644 (file)
@@ -30,7 +30,7 @@ file, as this document does not cover every aspect of mudela yet.
 The de-facto extension of Mudela is F<.ly>. Files may be included by
 entering C<include> at the start of a line:
 
-       include "a_file.ly"
+       \include "a_file.ly"
 
 =head2 Comments
 
index 78b8576cfaa85ceb3daee8694738b978742e919e..46c552aeb59bfbc25fb0f05d065a2496d5f4317f 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
 
 
 
-17/Apr/97                LilyPond 0.0.52                        1
+21/Apr/97                LilyPond 0.0.53                        1
 
 
 
@@ -127,7 +127,7 @@ INSTALL(1)            LilyPond documentation           INSTALL(1)
 
 
 
-17/Apr/97                LilyPond 0.0.52                        2
+21/Apr/97                LilyPond 0.0.53                        2
 
 
 
@@ -139,18 +139,29 @@ INSTALL(1)            LilyPond documentation           INSTALL(1)
        installed.  The resulting binaries can be found in the
        subdirectory _\bb_\bi_\bn_\b/.
 
+I\bI\bI\bIN\bN\bN\bNS\bS\bS\bST\bT\bT\bTA\bA\bA\bAL\bL\bL\bLL\bL\bL\bLI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
+       If you have done a successful make, then a simple
+
+               make install
+
+       should do the trick. Install the musixtex fonts in a
+       directory which TeX and MF knows. Do not forget to rehash
+       TeX (if applicable)
+
 R\bR\bR\bRU\bU\bU\bUN\bN\bN\bNN\bN\bN\bNI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
        GNU LilyPond does use a lot of resources. For operation
        you need the following:
 
-       +\bA fast computer (a full page of music typically takes 1
-            minute on my 486/66, using the -\b-\b-\b--\b-\b-\b-e\be\be\ben\bn\bn\bna\ba\ba\bab\bb\bb\bbl\bl\bl\ble\be\be\be-\b-\b-\b-c\bc\bc\bch\bh\bh\bhe\be\be\bec\bc\bc\bck\bk\bk\bki\bi\bi\bin\bn\bn\bng\bg\bg\bg
+       +\b   A fast computer (a full page of music typically takes
+            minute on my 486/66, using the -\b-\b-\b--\b-\b-\b-e\be\be\ben\bn\bn\bna\ba\ba\bab\bb\bb\bbl\bl\bl\ble\be\be\be-\b-\b-\b-c\bc\bc\bch\bh\bh\bhe\be\be\bec\bc\bc\bck\bk\bk\bki\bi\bi\bin\bn\bn\bng\bg\bg\bg
             compile. It's lot slower than most MusiXTeX
             preprocessors)
 
-       +\bo TeX
+       +\b   TeX
 
-       +\bo The MusixTeX fonts. (I use those found in MusixTeX T.59)
+       +\bo    The MusixTeX fonts. (I use those found in MusixTeX
+            T.59). Beware, the clef symbol has changed position
+            in recent versions of MusixTeX)
 
        Please refer to the man page for more information.
 
@@ -176,6 +187,21 @@ P\bP\bP\bPL\bL\bL\bLA\bA\bA\bAT\bT\bT\bTF\bF\bF\bFO\bO\bO\bOR\bR\bR\bRM\bM\bM\bMS\bS\bS\bS
        GNU LilyPond (pl 0.0.39) is known to compile on the
        following platforms:
 
+
+
+
+
+
+
+21/Apr/97                LilyPond 0.0.53                        3
+
+
+
+
+
+INSTALL(1)            LilyPond documentation           INSTALL(1)
+
+
                * linux 2.0.x, g++ 2.7.2[.1]
                * aix 4.1, g++ 2.7.2
                * windows-nt 4.0, cygnus gnu-win32 beta17.1 (~=g++ 2.7.2)
@@ -193,6 +219,46 @@ A\bA\bA\bAU\bU\bU\bUT\bT\bT\bTH\bH\bH\bHO\bO\bO\bOR\bR\bR\bRS\bS\bS\bS
 
 
 
-17/Apr/97                LilyPond 0.0.52                        3
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+21/Apr/97                LilyPond 0.0.53                        4
 
 
diff --git a/NEWS b/NEWS
index 9e64e93bb6745c9c1907c76d7fd59b1f6b5bf07b..c59f0320f34324886267e274520496eea410bf89 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,16 @@
+pl 53
+       - spurious accidental bug.
+       - simultaneity check.
+       - added AUTHORS.pod
+       - convert-mudela auto from guess
+       - include -> \include
+       - change order of opening parse/init file 
+       - Pulk_voice, Pulk_voices
+       - Request_column
+       - revised request-from-voice extraction. Now much faster
+
 ******
+april 17
 pl 52
        - Buildroot RPM
        - tex-prefix and tex-dir sep'd (here you are jan)
diff --git a/TODO b/TODO
index 805651b3557d00b593f321b5efec7d88ba4aa1cc..cf48d74f4c8c6f0d7c27a5f6c2fcc887a9aaab68 100644 (file)
--- a/TODO
+++ b/TODO
@@ -10,8 +10,9 @@ IMPORTANT
 
        * slur direction
 
-       * problems with empty staff.->revise staff-column/score-walker.
+       * use own fonts/update musixtex fonts
 
+       * check return status in make_website
 
 This is an assorted collection of stuff that will be done, might be
 done, or is an idea that I want to think about
@@ -55,8 +56,6 @@ INPUTLANGUAGE
 
        * figured bass?
 
-       * transposition
-
        * rest name configurable
 
        * Raw request syntax
@@ -70,6 +69,8 @@ SMALLISH PROJECTS
        * bugreport to doc++ devel: struct not in class hier; public
        virtual baseclasses
 
+       * cleanup lily-proto.hh and proto.hh
+
        * half-sharps, half-flats
        
        * key undo
@@ -149,6 +150,8 @@ DOC
 
 FUTURE
 
+       * tie a ~ b, move slur reg into voice-group.
+
        * Reg_configure_request
 
        * bring Collision::do_pre_processing to haircutter
index bf5b107ce9efabd13b5b3eb7a21024c5e3639efe..05214b0b58f80967618673c290ed94630dbbbb87 100644 (file)
@@ -11,3 +11,10 @@ SCRIPTS = clearlily cpgento genheader make_patch \
 EXTRA_DISTFILES = $(SCRIPTS)
 #
 
+
+localinstall: all
+       $(INSTALL) -d $(bindir)
+       $(INSTALL) -m 755 convert-mudela $(bindir)
+
+localuninstall:
+       rm -f $(bindir)/convert-mudela
index ff7b4c28642f73fea18831601c4e80caf8d90daa..2ead27d9b928f0691af79111aabea8d8161c8e3d 100755 (executable)
@@ -1,42 +1,5 @@
 #!/usr/bin/perl -w
 
-=head1 NAME
-
-convert-mudela  - convert mudela to newer versions
-
-=head1 SYNOPSIS
-
-       convert-mudela --from=FROM_PATCHLEVEL --to=TO_PATCHLEVEL
-
-=head1 DESCRIPTION
-
-convert-mudela sequentially applies different mudela-conversions to
-upgrade a Mudela input file from FROM_PATCHLEVEL to TO_PATCHLEVEL
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<--output>
-
-The output file to write
-
-=item B<--edit> 
-
-Do an inline edit of the input file. override B<--output>
-
-=item B<--show-rules>
-
-shows all known conversions.
-
-=item B<--from>=FROM_PATCHLEVEL
-
-=item B<--to>=TO_PATCHLEVEL
-
-=back
-
-=cut
-
 
 use Getopt::Long;
 sub 
@@ -46,27 +9,48 @@ sub
     s/\version \"0.0.$from_version\"/\version \"0.0.$to_version\"/g;
 }
 
+################################################################
+
 sub
     conv_pl0_0_50_pl0_0_52
 {
  
 }
+sub conv_pl52_pl53
+{
+
+    s/include \"/$1\\include \"/g;
+}
+
+
+###############################################################
+
+
+
+
 
 sub
     usage
 {
-    print STDERR "Usage: convert-mudela --from=XX --to=XX\n";
+    print STDERR "Usage: convert-mudela\n";
     print STDERR "other options: --edit --output=FILE --show-rules\n";
     exit 2;
 }
     
-my %minor_conversions = ("50" => \&no_conv,
-                        "52" => \&conv_pl0_0_50_pl0_0_52);
+my %minor_conversions = (50 => \&no_conv,
+                        52 => \&conv_pl0_0_50_pl0_0_52,
+                        53 => \&conv_pl52_pl53
+                        );
+sub versions 
+{
+    return  (sort keys %minor_conversions);
+}
+    
 
 sub
     show_rules
 {
-    print "Rules: ", join(", ", keys %minor_conversions), "\n";
+    print "Rules: ", join(", ", sort keys %minor_conversions), "\n";
     
 }
 
@@ -79,8 +63,8 @@ sub
     my @mudela_levels;
     
     die "This is too old  to convert " if $from < 50;
-    
-    foreach $a (sort keys %minor_conversions) {
+    my @v = versions;
+    foreach $a (@v) {
        if ($a > $from && $a <= $to ){ 
            push @applicable_conversion, $minor_conversions{$a};
            push @mudela_levels, $a;
@@ -99,10 +83,27 @@ sub
        print OUTLY;
     }
 }
-    
+sub set_auto_from
+{
+    my ($fn)=@_;
+    my ($ver);
+    open INLY, $fn || die "Can't open";
 
-sub 
-    set_files 
+    while (<INLY>) {
+       s/^.*\\version \"([^\"]*)\".*$//;
+       if (defined ($1)) {
+           print STDERR "Guessing version: ", $1, ".. ";
+           $ver = $1;
+           last;
+       }
+    }
+    die "can't determine mudela version." unless (defined($ver));
+    $ver =~ s/0\.0\.// ;
+    close INLY;
+    return $ver;
+}   
+
+sub  set_files 
 {
     $infile = "-";
     $outfile = "-";
@@ -111,12 +112,15 @@ sub
     if ($ARGV [0])  {
        $infile = $ARGV[0];
     } 
+    if (( ! -f $infile) && (! $infile =~ /\\.ly$/s ) ){
+       $infile .= ".ly";
+       print STDERR "trying $infile";
 
+    }
     if ($opt_edit && $infile ne "-") {
        $opt_edit = 1;
-       rename $infile, "$infile~";
-       $outfile = $infile;
-       $infile = "$infile~";
+       $outfile = "$infile.NEW";
+       $infile = "$infile";
     }
 }
 
@@ -128,10 +132,16 @@ if ($opt_show_rules) {
     exit 0;
 }
 
-usage if (!defined($opt_from) || !defined($opt_to));
 local ( $infile,$outfile);
 set_files;
 
+
+($opt_from = set_auto_from $infile) unless defined($opt_from);
+
+my @v = versions;
+($opt_to =  pop @v) unless (defined($opt_to));
+
+
 die "can't open \`$infile\'" unless open INLY,$infile ;
 die "can't open \`$outfile\'" unless open OUTLY, ">$outfile";
 
@@ -139,3 +149,8 @@ do_conversion $opt_from, $opt_to;
 close INLY;
 close OUTLY;
 
+if ($opt_edit) {
+    rename $infile, "$infile~";
+    rename $outfile, "$infile";
+}
+
index 69fa7d4fece362b20eb730347de7abe1897164c1..7fb658c7cb852474f3bf003dc5893efbaa7e493f 100755 (executable)
@@ -33,7 +33,7 @@ heredir=`pwd`
     mv {lilypond-,patch-}*.gz ../
 cd ..
 tar cf updeet {lily,patch-}*.gz
-
+tar tfv updeet
 mv patch-*gz patches/
 mv lilypond*tar.gz releases/
 
index 8b50ae31c53a140c199e703ea6800849cadcf3e3..2e73ca7ca93e125f37d45929b0b62a468723848b 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 1
 MINOR_VERSION = 1
-PATCH_LEVEL = 12
+PATCH_LEVEL = 13
 # use to send patches, always empty for released version:
 MY_PATCH_LEVEL = # include separator: "-1" or ".a"
 #
index d0c64e59dd39936655b1197b78fd9f4949542baa..934256a78b8c10be1bd6f2ba861c6d70f091f931 100644 (file)
@@ -1,4 +1,8 @@
-pl 1.1.11.jcn1
+pl 1.1.13
+       - better test-bed
+       - Heap PQueue implementation
+
+pl 1.1.12
        - No path search for "" and "-"
 
 pl 1.1.11
index 168ee50393daacc0a9b93390054904bfe0278232..c1fb23c1839686786babe0efa84b7ddd9c096405 100644 (file)
@@ -21,7 +21,10 @@ class Cursor
     /** create cursor, set at top. The const part isn't true, actually, #list#
       surely isn't const, but I get tired of the warning messages.  */
     Cursor( const List<T>& list, Link<T>* pointer = 0 );
-    
+    /**
+      Create an invalid cursor (pointing to nothing, associated with   no list.)
+     */
+    Cursor();
     Cursor( const Cursor<T>& cursor );
 
     T& thing();
@@ -47,13 +50,13 @@ class Cursor
     Cursor<T> operator --( int ); 
 
     /// point to link?
-    bool ok();                  
+    bool ok()const;
 
     /// ++ items left?
-    bool forward();            
+    bool forward()const;               
 
     /// -- items left?
-    bool backward();
+    bool backward()const;
 
     /**  put (copy) after me in List. 
       analogously to editor. ok() interpreted as at end
index e103c88e43a8fa5e5386b1c837b6ff4cc46bb3c9..3390d69026499526aa1ceaed1abb1cbc0dc62563 100644 (file)
@@ -1,8 +1,28 @@
- // cursor.icc -*-c++-*-
-#ifndef CURSOR_INL
-#define CURSOR_INL
+/*
+  cursor.icc -- implement Cursor
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef CURSOR_ICC
+#define CURSOR_ICC
+
+
+
 #include <assert.h>
 
+// untested
+template<class T>
+inline
+Cursor<T>::Cursor( )
+ :   list_(*(List<T> *)0)      // ugh
+{
+    pointer_ = 0;
+}
+
 
 template<class T>
 inline
@@ -70,21 +90,21 @@ Cursor<T>::pointer()
 
 template<class T>
 inline bool
-Cursor<T>::backward()
+Cursor<T>::backward()const
 {
     return ( pointer_ != 0 );
 }
 
 template<class T>
 inline bool
-Cursor<T>::forward()
+Cursor<T>::forward()const
 {
     return ( pointer_ != 0 );
 }
 
 template<class T>
 inline bool
-Cursor<T>::ok()
+Cursor<T>::ok()const
 {
     return ( pointer_ != 0 );
 }
@@ -110,4 +130,5 @@ Cursor<T>::operator --( int )
     return r;
 }
 
-#endif
+
+#endif // CURSOR_ICC
index 030157cbe458fe9f1fbdb6d336e953181ac4312e..5f3bdfcff42a9eec36fbbbb616ada6e4e730e8b8 100644 (file)
@@ -28,7 +28,7 @@ template<class T> struct PCursor;
 template<class T> struct Link;
 template<class T> struct Handle;
 template<class T> struct Interval_t;
-template<class T,class Q> struct PQueue;
+template<class T> struct PQueue;
 
 #include "real.hh"
 
index 1e924f0790d6ac8bdc55a64ff693f9272fcfeb72..9aee1ec550641c7ca1ed0b7f08e0398bf28e5c58 100644 (file)
@@ -15,6 +15,8 @@
 #define iterator(set)          typeof((set).top())
 #define iterator_bot(set)              typeof((set).bottom())
 
+#define iter(init, var)                typeof(init) var(init)
+
 // should use top()
 #define iter_top(set,var)      iterator(set) var(set)
 #define iter_bot(set,var)      iterator(set) var(set.bottom())
index 37512d553b6cb520f93fd7faf03a3cdd6ff93964..459977a47111595f04c0d06635fe75421fea1ca0 100644 (file)
@@ -44,7 +44,7 @@ public:
     PCursor<T> operator -(int no) const { return Cursor<void*>::operator-(no);}
     int operator -(PCursor<T> op) const { return Cursor<void*>::operator-(op);}
     PCursor<T> operator +( int no) const {return Cursor<void*>::operator+(no);}    PCursor(const PointerList<T> & l) : Cursor<void*> (l) {}
-
+    PCursor() : Cursor<void*> () {}
     PCursor( const Cursor<void*>& cursor ) : Cursor<void*>(cursor) { }
     void* vptr() const { return *((Cursor<void*> &) *this); }
 
index c8dfe1bea6754f8786e8460e9b91231c02733b01..dac5be52f3d787b6dd7223e4edada61ebbc8ee68 100644 (file)
@@ -1,7 +1,7 @@
 /*
-  pqueue.hh -- declare 
+  pqueue.hh -- declare PQueue_ent and PQueue
 
-  source file of the LilyPond music typesetter
+  source file of the Flower Library
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
@@ -9,64 +9,99 @@
 
 #ifndef PQUEUE_HH
 #define PQUEUE_HH
-
 #include "varray.hh"
 
+
+template<class K, class T>
+struct PQueue_ent
+{
+    T val;
+    K key;
+};
+
+template<class K, class T>
+int compare (PQueue_ent<K,T> const &e1 , PQueue_ent<K,T> const &e2) {
+    return compare(e1.key , e2.key);
+}
+
 /**
-  Stupid Prioq. Should use Lists and STL.
-  Smallest is put at the front.
+  Priority queue using a (variable size) in-situ heap.
 
-Actually, this sux. Should use a template struct PQuee_ent<V,I>
+  Hungarian postfix pq
+  
  */
+template<class T>
+class PQueue {
+    Array<T> heap_arr_;
+    T &elt(int i) {
+       return heap_arr_[i-1];
+    }
+    T const&elt(int i) const {
+       return heap_arr_[i-1];
+    }
+public:
+    /** acces an heap element.  Careful with this, as changing the
+      priority might fuck up the invariants
 
-template<class V, class I>
-struct PQueue
-{
-    Array<V> value_arr_;
-    Array<I> indices_arr_;
-    void OK() const 
+      @param 1 <= i < size() */
+    T& operator[](int i) { return heap_arr_[i]; }
+    T operator[](int i) const { return heap_arr_[i]; }
+    void OK() const
     {
-       
-       assert(value_arr_.size() == indices_arr_.size());
+#ifndef NDEBUG
+       for (int i =2; i <= size(); i++)
+           assert(compare (elt(i/2), elt(i)) <= 0);
+#endif
     }
-    
-    void enter(V v, I idx) {
-       int j=0;
-       for (; j < value_arr_.size(); j++)
-           if (indices_arr_[j] > idx) 
+    T front () const { return elt(1); }
+    int size() const { return heap_arr_.size(); }
+    void insert(T v) {
+       heap_arr_.push(v);
+       int i = heap_arr_.size();
+       int j = i / 2 ;
+       while (j) {
+           if (compare(elt(j), v) > 0) {
+               elt(i) = elt(j);        
+               i = j;
+               j = i/2;
+           } else {
                break;
-
-       insert(j,v,idx);
-       
+           }
+       }
+       elt(i) = v;
+       OK();
     }
-    int size() { return value_arr_.size(); }
-    V front_val() { return value_arr_[0]; }
-    I front_idx() { return indices_arr_[0]; }
-    void del(int i) 
-    {
-       value_arr_.del(i);
-       indices_arr_.del(i);
+    T max() const {
+       int first_leaf_i = size();
+       T max_t;
+       return max_t;
     }
-    int size() const
-    {
+    void delmin( ) {
+       assert(size());
+       T last = heap_arr_.top();
+       
+       int mini=2;
+       int lasti=1;
+
+       while ( mini < size() ) {
+           if (compare(elt(mini + 1), elt(mini)) <0)
+               mini++;
+           if (compare(last,elt(mini) ) < 0)
+               break;
+           elt(lasti) = elt(mini);
+           lasti = mini;
+           mini *= 2;
+       }
+       elt(lasti) = last;
+       heap_arr_.pop();
        OK();
-       return value_arr_.size();
     }
-    
-
-    void insert(int j, V v, I idx)
-    {
-       value_arr_.insert(v, j);
-       indices_arr_.insert(idx, j);
+    T get() { 
+       T t = front();
+       delmin();
+       return t;
     }
-    
+};
 
 
-    V get() {
-       V retval = front_val();
-       del(0);
-       return retval;
-    }
-    
-};
 #endif // PQUEUE_HH
diff --git a/flower/include/priorities.hh b/flower/include/priorities.hh
new file mode 100644 (file)
index 0000000..8b12766
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+  priorities.hh -- declare Priorities
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef PRIORITIES_HH
+#define PRIORITIES_HH
+
+#include "varray.hh"
+
+/**
+  A sorted (uni)set. Should connect with PQueue
+ */
+template<class K>
+struct Priorities :    Array<K>
+{
+    void insert(K k) 
+    {
+       int i=0;
+       for (; i < size(); i++) {
+           if(elem(i) == k)
+               return;
+           if (elem(i) > k )
+               break;
+       }
+       Array<K>::insert(k, i);
+    }
+};
+#endif // PRIORITIES_HH
+
+       
index b7400bb501b00b9467c85d5af5e435bef65c8527..b9b1a24b6b6f69e41c2973a34ea5a6c9c135bb8c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  (c) Han-Wen Nienhuys 1995,96
+  (c) Han-Wen Nienhuys 1995,96,97
 
   Distributed under GNU GPL  
 */
@@ -21,11 +21,13 @@ inline void arrcpy(T*dest, T*src, int count) {
   
   
   This template implements a scaleable vector. With (or without) range
-  checking. It may be flaky for objects with complicated con- and
-  destructors. The type T should have a default constructor. It is
+  checking. The type T should have a default constructor. It is
   best suited for simple types, such as int, double or String, it
   provides a paranoidly safe replacement for the new T[int] construct.
 
+  You should \bf{never} store pointers to objects in an Array (since
+  the array may be relocated without the pointer knowing it).
+  
   It uses stack terminology, (push, pop, top), and  can be used as a stack.
 
   
@@ -99,9 +101,18 @@ public:
 
     /// tighten array size_.
     void precompute () { remax(size_); }
+    
 
-    /// this makes Array behave like an array
-    T &operator[] (const int i) const {
+    /// access element
+    T &operator[] (int i)  {
+       return elem(i);
+    }
+    /// access element
+    T const & operator[] (int i) const {
+       return elem(i);
+    }
+    /// access element
+    T &elem( int i) const {
        assert(i >=0&&i<size_);
        return ((T*)thearray)[i];       
     }
index 1d909660e28f5ba17052ca83a2354e3eb310cb70..bf271c4d26575274e27a318c01cc7738dcf4ba1a 100644 (file)
@@ -15,7 +15,7 @@ depth = ../..
 
 # identify module:
 #
-NAME =stringtest
+NAME =flower-test
 # include ./$(depth)/$(NAME)/.version
 MODULE_NAME = flower
 include ./$(depth)/flower/.version
@@ -49,6 +49,7 @@ EXECSTRINGTEST=$(EXECUTABLE)
 # don't do the exec, as this might fail if flowerlib isn't installed yet.
 default:  $(BUILDSTRINGTEST) 
 
+
 do-stringtest:
        $(EXECSTRINGTEST) > $(outdir)/result
        cmp $(outdir)/result result
diff --git a/flower/test/flower-test.hh b/flower/test/flower-test.hh
new file mode 100644 (file)
index 0000000..b03a48f
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+  flower-test.hh -- declare 
+
+  source file of the Flower Library
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef FLOWER_TEST_HH
+#define FLOWER_TEST_HH
+#include <iostream.h>
+
+#define ADD_TEST(f) \
+struct f ## Init {\
+    f ## Init () { reg_test(f); }\
+} f ## init\
+
+typedef void (*fptr)(void);
+
+void reg_test (fptr f);
+
+#endif // FLOWER_TEST_HH
diff --git a/flower/test/main.cc b/flower/test/main.cc
new file mode 100644 (file)
index 0000000..85c4cbc
--- /dev/null
@@ -0,0 +1,20 @@
+#include "flower-test.hh"
+#include "varray.hh"
+
+Array< fptr > *test_arr_p;
+
+void reg_test (fptr f)
+{
+    if (!test_arr_p)
+       test_arr_p = new Array<fptr>;
+    test_arr_p->push(f);
+}
+
+int
+main()
+{
+    if (test_arr_p) {
+       for (int i=0; i < test_arr_p->size(); i++)
+           (*test_arr_p)[i] ();
+    }
+}
diff --git a/flower/test/pqtest.cc b/flower/test/pqtest.cc
new file mode 100644 (file)
index 0000000..0e086ab
--- /dev/null
@@ -0,0 +1,26 @@
+#include "flower-test.hh"
+#include "pqueue.hh"
+#include <stdlib.h>
+
+int compare(int i, int j)
+{
+    return i-j;
+}
+
+void
+pqtest()
+{
+    PQueue<int> pq;
+
+    for (int i=0; i < 10; i++) {
+       int r = rand()/10000;
+       pq.insert(r);
+       cout << "adding: " << r<< endl;
+    }
+    while (pq.size()) {
+       cout << "getting : "<< flush;
+       cout << pq.get() << "\n";
+    }
+}
+
+ADD_TEST(pqtest);
index cc652a5405579b063b1f5c971411ad489cb72058..163b3bbb9c8632167f7098a288ab52324a32c955 100644 (file)
@@ -2,10 +2,10 @@
   stupid test program to verify stringlib
   stringtest.cc
   */
-#include <iostream.h>
 #include "string.hh"
 #include "varray.hh"
 #include "string-convert.hh"
+#include "flower-test.hh"
 
 void
 ctors()
@@ -89,8 +89,8 @@ test_empty_b( String str )
     return false;
 }
 
-int 
-main()
+void
+stringtest()
 {
     ctors();
     cmp();
@@ -109,11 +109,12 @@ main()
     cout << "up: " << str.upper_str() << " down: " << str.lower_str()<<endl;
     
     if ( test_empty_b( str ) )
-       return 1;
-    
+       cout << "failed";
+
     String fn = "";
     if ( !test_empty_b( fn ) )
-       return 1;
+       cout << "failed";
+
     
     fn = "";
     fn += "";
@@ -123,7 +124,8 @@ main()
     cout << String_convert::bin2hex_str( String( (char)0xff ) ) << endl;
     cout << "-1:" << String_convert::i2hex_str( -1, 2, '0' );
     cout << endl;
-    return 0;
+
 }
 
 
+ADD_TEST(stringtest);
index 7d814d91c039466e6be31075c6f74758b0dbc8a3..79087224c5f3f3f62a03f42250f463f4b008ac2c 100644 (file)
@@ -19,7 +19,9 @@
        d       = \melodic_request { -1 1 0 }
        dis     = \melodic_request { -1 1 1 }
        disis   = \melodic_request { -1 1 2 }
+       eeses   = \melodic_request { -1 2 -2 }
        eses    = \melodic_request { -1 2 -2 }
+       ees     = \melodic_request { -1 2 -1 }
        es      = \melodic_request { -1 2 -1 }
        e       = \melodic_request { -1 2 0 }
        eis     = \melodic_request { -1 2 1 }
@@ -34,6 +36,7 @@
        g       = \melodic_request { -1 4 0 }
        gis     = \melodic_request { -1 4 1 }
        gisis   = \melodic_request { -1 4 2 }
+       aeses   = \melodic_request { -1 5 -2 }
        ases    = \melodic_request { -1 5 -2 }
        aes     = \melodic_request { -1 5 -1 }
        as      = \melodic_request { -1 5 -1 }
index 872133bd0368e6bff7eb11ad2f2b7367d4b11405..359bcd985560d12da8351d418257aad2bbc04d11 100644 (file)
@@ -1,9 +1,10 @@
-\version "0.0.52";
+\version "0.0.53";
 
-include "register.ini"
-include "dynamic.ini"
-include "dutch.ini" % do not include init/ path
-include "script.ini"
-include "table_sixteen.ini"
+\include "register.ini"
+\include "dynamic.ini"
+\include "dutch.ini" % do not include init/ path
+\include "script.ini"
+\include "table_sixteen.ini"
 
 
+\init_end ;
index 3c7967eef53b5da771da20db807efcf874574001..f5690f0c8ac3fb37bad56f2f54404c75c0761ad6 100644 (file)
@@ -1,4 +1,7 @@
-include "this-is-hopefully-a-nonexisting-file"
+\version "0.0.53";
+
+\include "this-is-hopefully-a-nonexisting-file"
+
 
 
 mwa = \melodic{
@@ -33,7 +36,7 @@ bla = \lyric{
 %IOT trap/Abort
 % als geen music in staff
 
-include "this-is-hopefully-a-nonexisting-file"
+\include "this-is-hopefully-a-nonexisting-file"
 \score{
        \staff{ bla }
        \staff{ mwa }
index 6386743fb38b5f34ee63dc31296c7b2230887cd4..167236c1e9c5c1dae076ca04e4619f3620f7e13c 100644 (file)
@@ -8,7 +8,7 @@
 % copyright: None
 %
 % declare melody (which will be in *one* staff ) for the lead voice
-\version "0.0.52";
+\version "0.0.53";
 
 melodie = \melodic {
                                % switch Lilypond in note-mode
index b1920e411cdcf2a037bd8a1fe720b19df52411af..8f117dc2d3a2aa340358763889e833da298d59ce 100644 (file)
@@ -26,10 +26,10 @@ globalmusic= \melodic{
 %              \key fis
 }
 
-include "mlalt.ly"
-include "mlvio1.ly"
-include "mlvio2.ly"
-include "mlcello.ly"
+\include "mlalt.ly"
+\include "mlvio1.ly"
+\include "mlvio2.ly"
+\include "mlcello.ly"
 
 \score{
        \staff{ melodicregs globalmusic alto }
index 353c436c1ffcb9221515e937b9fb42c0eaa10382..b42f912ff96f7f82c15264aa311d2a89a2b585fd 100644 (file)
@@ -11,7 +11,7 @@
 % The purpose of this file is to demonstrate features of LilyPond.
 % (there is an accompanying LaTeX file, scsii-menuetto.tex)
 %
-\version "0.0.52";
+\version "0.0.53";
 %% Stuff from MPP version
 % \lefttitle{Menuetto}
 % \tempo{Moderato}
index 3ef0773f38b154948aa4f26e62221615af739007..49b0cf60599fc8c395873227e2fd1672b0f7ede1 100644 (file)
@@ -9,6 +9,7 @@
 % The purpose of this file is to demonstrate features of LilyPond.
 % (there is an accompanying LaTeX file, standchen.tex)
 %
+\version "0.0.53";
 
 melodie = \melodic{  
        \meter  3/4 ;
@@ -450,8 +451,7 @@ tekstII = \lyric{
 
 \score{
        \staff{ lyricregs tekstI }
-% sorry. Have to fix
-%      \staff{ lyricregs tekstII }
+       \staff{ lyricregs tekstII }
 
        \staff{ melodicregs melodie }
        \staff{ melodicregs begeleiding }
index 3676e36eaf8796054f273cf9ef22418817fa6841..7b464e4ee5ff399779f62a98ea0d22d23213f5b2 100644 (file)
@@ -2,7 +2,7 @@
 %
 %      Public Domain -- typed by by HWN
 %
-\version "0.0.52";
+\version "0.0.53";
 
 global = \melodic{
        \meter 4/4 ;
index 029d65e164c7cbfbc26c8ffacae30928dc4c04d3..b311b7eb036b454fc14e87518cdc8280e9547a53 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 0
-PATCH_LEVEL = 52
+PATCH_LEVEL = 53
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index 376452d8e12927d3364fb6774e095ea35f6e0d71..276b320e1444a4cd3ff38694e35b3dad381b986a 100644 (file)
@@ -7,5 +7,5 @@ stablecc=command-request.cc musical-request.cc bar.cc boxes.cc break.cc  \
        paper-def.cc parser.cc lexer.cc p-staff.cc qlp.cc qlpsolve.cc\
        template1.cc template2.cc template3.cc template4.cc\
        template5.cc template6.cc version.cc tex-stream.cc  tex.cc\
-       voice.cc wordwrap.cc spanner.cc \
+       voice.cc spanner.cc \
        voice-element.cc identifier.cc note.cc\
index 474015e3ccb16ed025fc0623ee6e059d7c725dc2..0e3733ccb03df9c32a577eb1375774bbda7c6863 100644 (file)
@@ -18,8 +18,11 @@ Score::calc_idealspacing()
     iter_top(cols_,i);
 
     for (; i.ok(); i++) {
-       assert(i->used_b());
+       if (!i->used_b())
+           continue;
+       
        PCursor<Score_column*> j(i+1);
+
        if (i->musical_b()) {
            assert(j.ok());
            for (int n=0; n < i->durations.size(); n++) {
@@ -28,14 +31,19 @@ Score::calc_idealspacing()
                Real strength =  i->durations[0]/i->durations[n];
                assert(strength <= 1.0);
                
-               while (j->when() < d + i->when())
+               while (j.ok()) {
+                   if (j->used_b() && j->when() >= d + i->when() )
+                       break;
                    j++;
+               }
                Moment delta_desired = j->when() - (d+i->when());
                dist += paper_p_->duration_to_dist(delta_desired);
                
                pscore_p_->connect(i->pcol_l_, j->pcol_l_, dist, strength);
            }
        } else if (j.ok()) {
+           while  (!j->used_b())
+               j++;
            
            /* attach i to the next column in use. This exists, since
              the last col is breakable, and therefore in use
index ba7be37cd1e2558f616e90803f4aeea1279b4183..134a4705a7bacb49fd2d95445e3271ee53c1bd08 100644 (file)
@@ -5,6 +5,7 @@
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
+
 #include "staff-column.hh"
 #include "voice.hh"
 #include "p-score.hh"
@@ -37,9 +38,7 @@ Complex_walker::try_request(Request*req)
 {
     bool b =walk_regs_p_->try_request(req);
     if (!b)
-       
        req->warning("junking request: "  + String(req->name()));
-    
 }
 
 void
index 38885f4a18969250da1822c2920f4b8fa82a64df..d3d34a01ae7fdad3a08411bb270ae65cbc718353 100644 (file)
@@ -31,7 +31,6 @@ 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();
index 3864ace14675f07db7c3bed0f3bb5a1259286b23..7db99e41cae9a43bf926a0983528f4241490b596 100644 (file)
@@ -1,6 +1,5 @@
-
 /*
-  lily-proto.hh -- declare 
+  lily-proto.hh -- declare class names.
 
   source file of the LilyPond music typesetter
 
@@ -10,6 +9,7 @@
 
 #ifndef LILY_PROTO_HH
 #define LILY_PROTO_HH
+#include "proto.hh"
 
 struct    My_lily_lexer;
 struct My_lily_parser;
@@ -39,8 +39,11 @@ struct Command_req;
 struct Collision_register;
 struct Collision;
 struct Note_req;
+struct Pulk_voices;
+struct Pulk_voice;
 struct Plet_req;
 struct Partial_measure_req;
+struct Request_column;
 struct Rest_req;
 struct Rhythmic_grouping_req;
 struct Rhythmic_req;
index d5e9481f2500d52c92dddc298a86cebc0faab359..11e5cb5f7d54973a073bd404f06dd8d985852fc3 100644 (file)
@@ -9,7 +9,7 @@
 
 #ifndef MIDIOUTPUT_HH
 #define MIDIOUTPUT_HH
-#include "p-score.hh"
+#include "lily-proto.hh"
 
 struct Midi_output {
     Midi_output(Score* score_l, Midi_def* );
index fcfcb0c6e029a0f963da08bb2eb14e24292b8ecd..30ad18fe901c8cfcfa55ca06c520cbdf1015d706 100644 (file)
 #include "staff-walker.hh"
 #include "pcursor.hh"
 #include "pqueue.hh"
+struct Note_event : PQueue_ent<Moment,Melodic_req*>
+{
+    bool ignore_b_;
+    Note_event() { 
+       ignore_b_ = false;
+    }
+};
 
+int compare(Note_event const&, Note_event const&);
 
 /**
   a simple walker which collects midi stuff, and then outputs.
 
   Should derive from Staff_walker
   */
-class Midi_walker : public PCursor<Staff_column*> {
+class Midi_walker : public PCursor<Staff_column*> 
+{
     Midi_track *track_l_;
     
-    PQueue<Melodic_req*, Moment> stop_notes;
+    PQueue< Note_event > stop_notes;
+
     Moment last_moment_;
 
     /* *************** */
index 50ec8e8c9c07eb2959b6656c0bdece1003764d46..029579056d74e0481ea1bd3cf570f7d39f304cd6 100644 (file)
@@ -37,6 +37,7 @@ public:
     virtual Moment duration() const;
     REQUESTMETHODS(Skip_req, skip);
 };
+
 /** a request with a duration.
   This request is used only a base class.
  */
@@ -74,6 +75,7 @@ public:
     int dir_i_;
     /// the characteristics of the text
     Text_def *tdef_p_;
+
     /* *************** */
     Text_req(int d, Text_def*);
     ~Text_req();
@@ -222,6 +224,7 @@ public:
  */
 class Subtle_req  : public virtual Musical_req  {
 public:
+    /// the time relative to Voice_element start.
     Moment subtime_;
     REQUESTMETHODS(Subtle_req, subtle);
 };
index cd27e9b574f2c14ac19389742cae3f9653015c6c..9b208a2aac469b14b8afd46d9a0ef87726c7f2dc 100644 (file)
@@ -23,7 +23,7 @@
 class My_lily_parser {
     char const* here_ch_C()const;
     Array<Input> define_spot_array_;
-  
+    String init_str_;
 
     void add_requests( Voice_element*v);
 
@@ -37,7 +37,7 @@ public:
     int default_octave_i_;
     Duration default_duration_;
     String textstyle_str_;
-    
+    bool first_b_;
     bool last_duration_mode ;
     Array<Request*> pre_reqs, post_reqs;
     int fatal_error_i_;
@@ -64,6 +64,7 @@ public:
     void print_declarations();
     bool ignore_version_b_;
 public:
+    void do_init_file();
     void parse_file ( String init_str, String file_str);
     My_lily_parser(Sources * sources_l);
     ~My_lily_parser();
diff --git a/lily/include/pulk-voice.hh b/lily/include/pulk-voice.hh
new file mode 100644 (file)
index 0000000..3b90063
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+  pulk-voice.hh -- declare Pulk_voice
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef PULK_VOICE_HH
+#define PULK_VOICE_HH
+
+#include "proto.hh"
+#include "lily-proto.hh"
+#include "moment.hh"
+#include "priorities.hh"
+#include "pcursor.hh"
+
+/**
+  Align requests with starting time.
+ */
+class Pulk_voice
+{
+    PCursor<Voice_element*> cur_;
+    Moment elt_mom_;
+    Priorities<Moment> subtle_moment_priorities_;
+    int subtle_idx_;
+    void set_subtle();
+    void next();
+public:
+    int staff_idx_;
+
+    Moment when()const;
+    bool ok()const { return cur_.ok() ; }
+
+    Pulk_voice(Voice*, int staff_idx);
+    Array<Request*> get_req_l_arr();
+};
+
+#endif // PULK_VOICE_HH
diff --git a/lily/include/pulk-voices.hh b/lily/include/pulk-voices.hh
new file mode 100644 (file)
index 0000000..29fc48b
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+  pulk-voices.hh -- declare Pulk_voices
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef PULK_VOICES_HH
+#define PULK_VOICES_HH
+#include "pqueue.hh"
+#include "plist.hh"
+#include "moment.hh"
+#include "proto.hh"
+#include "lily-proto.hh"
+#include "voice.hh"
+
+
+
+struct Voice_l { 
+    Voice *l_;
+    int  staff_idx_;
+    Voice_l(Voice*v, int i){ l_ = v;
+      staff_idx_ = i;
+    }
+    Voice_l() { l_ = 0; staff_idx_ =0; }
+};
+int compare(Voice_l const &p1, Voice_l const &p2);
+
+class Pulk_voices
+{
+PQueue< Voice_l > voice_pq_;
+    IPointerList< Pulk_voice * > pulk_p_list_;
+    PointerList<Staff *> staff_l_list_;
+    Moment next_mom_;
+
+public:
+    Moment last_;
+    bool ok() const;
+    Moment next_mom() { return next_mom_; }
+    Pulk_voices(PointerList<Staff*> const&);
+    void get_aligned_request(Request_column *col_l );
+};
+
+
+#endif // PULK_VOICES_HH
diff --git a/lily/include/request-column.hh b/lily/include/request-column.hh
new file mode 100644 (file)
index 0000000..32a6f63
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  request-column.hh -- declare Request_column
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef REQUEST_COLUMN_HH
+#define REQUEST_COLUMN_HH
+#include "plist.hh"
+#include "lily-proto.hh"
+#include "moment.hh"
+#include "varray.hh"
+/**
+  Like staff_column, but Score wide. One per when().
+ */
+class Request_column 
+{
+    IPointerList<Staff_column*> staff_cols_;
+    Array<Staff_column*> staff_col_l_arr_;
+    
+public:
+    Score_column *musical_column_l_, *command_column_l_;
+    Request_column(PointerList<Staff*> const& );
+    bool used_b()const;
+    Moment when();
+    void add_reqs(int staff_idx, Array<Request*> const&);
+    void set_score_cols(Score_column*, Score_column*);
+};
+
+#endif // REQUEST_COLUMN_HH
index 32b57bf01f7f06c097ae09a22d133bb34ba001da..e83540533b60aff0e26e0ecd7274209e616bc836 100644 (file)
@@ -17,6 +17,7 @@
 #include "assoc.hh"
 #include "string.hh"
 #include "input.hh"
+#include "lily-proto.hh"
 
 /// the total music def of one movement
 struct Score {
@@ -26,6 +27,8 @@ struct Score {
     IPointerList<Staff*> staffs_;
     
     /// "runtime" fields for setting up spacing    
+    IPointerList<Request_column*> rcols_;
+    
     IPointerList<Score_column*> cols_;
     PScore *pscore_p_;
 
index 2aa4b8166b91494fde4de8cbfa204514212f9785..b0624664be8f6a28904b62ed6e5d33efd72b83a8 100644 (file)
@@ -6,7 +6,8 @@
 
 #ifndef STAFFCOLUMN_HH
 #define STAFFCOLUMN_HH
-#include "proto.hh"
+
+#include "lily-proto.hh"
 #include "varray.hh"
 #include "moment.hh"
 
@@ -20,18 +21,18 @@ public:
     Array<Request*> musicalreq_l_arr_;
     Array<Request*> commandreq_l_arr_;
     Staff * staff_l_;
-
+    Request_column * req_col_l_;
     /// fields to collect timing data vertically.
     Array<Timing_req*> timing_req_l_arr_;
-    Score_column *musical_column_l_, *command_column_l_;
 
     /* *************** */
-    
-    Staff_column();
 
+    Staff_column();
+    Score_column* command_column_l();
+    Score_column* musical_column_l();
     Moment when() const;
-    void set_cols(Score_column *c1, Score_column *c2);
-    void add(Voice_element*ve, PQueue<Subtle_req *, Moment> &subtle_req_pq );
+    void set_req_col(Request_column *c1);
+    void add_reqs (Array<Request*> req_l_arr);
     void OK() const;
     ~Staff_column();
     void typeset_breakable_items(Array<Item *> &pre_p_arr,
index 2ceeb237fde21eb0d8feea46bf0fac605547adec..e0613136f25bdd952b05e8b28d599d627603ae09 100644 (file)
 class Staff {
     Staff(const Staff&src);
     
-    /// synchronous horizontal stuff
-    IPointerList<Voice*> voice_list_;
-    Staff_column *get_col(Moment, PCursor<Staff_column*> * last= 0);
-    
 public:
     Input_register * ireg_p_;
     
+    PointerList<Voice*> voice_list_;
     /// runtime field
-    IPointerList<Staff_column*> cols_;
+    PointerList<Staff_column*> cols_;
 
     Score *score_l_;
     PScore *pscore_l_;
@@ -35,20 +32,15 @@ public:
 
     void add(const PointerList<Voice*> &s);
 
-    void add_voice(Voice *v);
+    void add_voice(Voice *v_p);
     Paper_def*paper()const;
 
-    void setup_staffcols();
-
     void OK() const;
     void print() const;
 
     /// when does the last *musical* element finish?
     Moment last() const;
 
-//    /// extract midi info
-//    Midi_track* midi_track_p();
-
     /// remove unused cols
     void clean_cols() ;
     Staff();
@@ -56,6 +48,7 @@ public:
     virtual void set_output(PScore * destination)=0;
     virtual Staff_walker *get_walker_p()=0;    
     virtual ~Staff() { }
+    void add_col(Staff_column*);
 protected:
 
 };
index 29a41d4658c592f48ba020407dd3d659acc767ea..b1087e41b748559b07ee5848a63672b932115654 100644 (file)
@@ -24,7 +24,7 @@ public:
       Voice_element */
     Moment duration_;
     Voice const *voice_C_;
-    IPointerList<Request*> reqs;
+    IPointerList<Request*> req_p_list_;
 
     /* *************** */
     void transpose(Melodic_req const &)const;
index f5a950a2c9f024fb2127c0b105a7c953a9446613..5ddcc91933c426d4a0645edea7eb17a96c11d8f0 100644 (file)
@@ -18,8 +18,8 @@ struct Voice {
     /** the elements, earliest first.
       Please use the member #add()# to add a new element
       */
-    IPointerList<Voice_element *> elts;
-    Moment start;
+    IPointerList<Voice_element *> elts_;
+    Moment start_;
 
     /* *************** */
     Voice();
index 9ba683817993cd3718065435b003d4013b03b243..840b180c34f22330b6d894efbb7ee3e5a078f763 100644 (file)
@@ -8,7 +8,7 @@
 void
 Input_music::check_plet(Voice_element* velt_l)
 {
-    for (iter_top(velt_l->reqs,i); i.ok(); i++)
+    for (iter_top(velt_l->req_p_list_,i); i.ok(); i++)
        if ( i->plet() ) {
            Moment start_moment = 0;
            if ( !find_plet_start_b( i->plet()->type_c_, start_moment ) ) {
@@ -42,7 +42,7 @@ Simple_music::length()const
 void
 Simple_music::translate_time(Moment t)
 {
-    voice_.start += t;
+    voice_.start_ += t;
 }
 
 Voice_list
@@ -50,12 +50,14 @@ Simple_music::convert()const
 {
     Voice_list l;
     Voice * v_p = new Voice(voice_);
-    PCursor<Voice_element*> i= v_p->elts.bottom();
-       // need-to-have, otherwise memory will be filled up with regs. 
+    PCursor<Voice_element*> i= v_p->elts_.bottom();
+    
     if (!i.ok() || i->duration_) {
        v_p->add ( new Voice_element);
-       i=v_p->elts.bottom();
+       i=v_p->elts_.bottom();
     }
+    
+    // need-to-have, otherwise memory will be filled up with regs. 
     i->add(new Terminate_voice_req); 
     l.bottom().add(v_p);
     return l;
@@ -271,6 +273,6 @@ void
 Voice_list::translate_time(Moment x)
 {
     for (iter_top(*this,i); i.ok(); i++)
-       i->start += x;    
+       i->start_ += x;    
 }
 
index a2dacc048e6fd2da205fccc384801d70eb45ff4d..7c0c92abd9ef5605acd1092ee5b87176bd1f1b7f 100644 (file)
@@ -13,7 +13,7 @@
 #include "score.hh"
 #include "paper-def.hh"
 #include "midi-def.hh"
-#include "staff.hh"
+
 
 
 void
index 1054fc2c739064c2ffd809b2db961dac698e6119..5de86a91a02445ae4496cf75efb459d0cf6b6f57 100644 (file)
@@ -24,7 +24,7 @@ Key_item::read(Key_register const & key_reg_r)
     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_.oct(0).acc(note);
+       int acc = ((Key &) key_reg_r.key_).oct(0).acc(note);
 
        add(note, acc);
     }
index dbff99f0a11334750e4678d340241491bb8edf85..82b196e2c7077d51b988775ed67d8fc0c5dc52d1 100644 (file)
@@ -16,6 +16,7 @@
 #include "musical-request.hh"
 #include "local-key-item.hh"
 #include "bar.hh"
+#include "time-description.hh"
 
 Key_register::Key_register()
 {
@@ -65,8 +66,8 @@ Key_register::process_requests()
 void
 Key_register::pre_move_processing()
 { 
-
-    if (! default_key_b_ && ! change_key_b_ ) {
+    Time_description const * time_C_ = get_staff_info().time_C_;
+    if ( time_C_->whole_in_measure_&& default_key_b_ && ! change_key_b_ ) {
        delete kit_p_ ;
        kit_p_ =0;
     }
@@ -90,7 +91,7 @@ Key_register::read_req(Key_change_req * r)
     accidental_idx_arr_.set_size(0);
     for (int i = 0; i < r->melodic_p_arr_.size(); i ++) {
        Melodic_req *  m_l =r->melodic_p_arr_[i];
-       int n_i=m_l->notename_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_)
index 0f02ef845d0d3b4a9d854233ae2ec726531f1bb9..5abfc513939fa47832f02bf916f978772b3f466d 100644 (file)
@@ -22,17 +22,12 @@ Key::oct(int i)
     return octaves[i+ZEROOCTAVE];    
 }
 
-Octave_key
-Key::oct(int i)const
-{
-    return octaves[i+ZEROOCTAVE];    
-}
 
 void
 Octave_key::set(int i, int a)
 {
     assert(a > -3 && a < 3);
-    accidental_i_arr_[i]=a;    
+    accidental_i_arr_[i]=a;
 }
 
 void
index 81dc336101ac2617f1568007023f3d2751a46a84..3a5631770ca3c8a3bfa3ce2a114b78d8aa0e19bd 100644 (file)
@@ -68,7 +68,7 @@ COMMENT               %.*\n
 
 
 <notes,INITIAL,lyrics>
-include           {
+\\include           {
        yy_push_state(incl);
 }
 <incl>{WHITE}*      { /* eat the whitespace */ }
@@ -283,10 +283,12 @@ My_lily_lexer::scan_escaped_word(String str)
                yylval.id = id;
                return id->token_code_i_;
        }
+       mtor << "(string)";
        String *sp = new String( str);
        yylval.string=sp;
        return STRING;
 }
+
 int
 My_lily_lexer::scan_bare_word(String str)
 {
index 3d8637b6dc485d444b137bd6c825a1e8dd5026f8..4f3f69a62ecc1dc77366bf0df1068efdd256045c 100644 (file)
@@ -190,12 +190,14 @@ Spacing_problem::solve() const
     return posns;
 }
 
-/*
+/**
     add one column to the problem.
 */    
 void
 Spacing_problem::add_column(PCol const *col, bool fixed, Real fixpos)
 {
+    if (!col->used_b() )
+       return;
     Colinfo c(col,(fixed)? &fixpos :  0);
     cols.push(c);
 }
index 6af18c1c8b4c5e5f347aa08bd1a5fbe73da254d9..84ec5baf690b34cf0684692b35cb0f18446a728d 100644 (file)
@@ -27,6 +27,7 @@ Local_key_register::pre_move_processing()
        key_item_p_ = 0;
     }
 }
+
 void
 Local_key_register::acknowledge_element(Staff_elem_info info)
 {    
@@ -48,12 +49,16 @@ Local_key_register::acknowledge_element(Staff_elem_info info)
            local_key_.oct(note_l_->octave_i_)
                .set(note_l_->notename_i_, note_l_->accidental_i_);
        }
-    } else if (info.elem_l_->name()==Key_item::static_name()) { 
+    } else if (info.req_l_->command()  && info.req_l_->command()->keychange()) { 
        Key_register * key_reg_l =
            (Key_register*)info.origin_reg_l_arr_[0];
        key_C_ = &key_reg_l->key_;
        local_key_ = *key_C_;
-    }  
+    } else if (info.elem_l_->name() == Key_item::static_name()) {
+       Key_register * key_reg_l =
+           (Key_register*)info.origin_reg_l_arr_[0];
+       key_C_ = &key_reg_l->key_;
+    }
 }
 
 void
@@ -61,11 +66,12 @@ Local_key_register::process_requests()
 {
     Time_description const * time_C_ = get_staff_info().time_C_;
     if (! time_C_->whole_in_measure_){
-       if (key_C_)  
+       if (key_C_)
            local_key_= *key_C_;
        else if( time_C_->when_ >Moment(0))
            warning ("Help me! can't figure  current key");
     }
 }
+
 IMPLEMENT_STATIC_NAME(Local_key_register);
 ADD_THIS_REGISTER(Local_key_register);
index c239e82af5a1e2ed87f2cfc329c0a45bf1d7ef01..7703f65a6c5c2cf0d6a9d0d918a9f56394ac3be4 100644 (file)
@@ -6,7 +6,6 @@
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>, Jan Nieuwenhuizen <jan@digicash.com> 
 */
 
-// "" huh?
 #include "time.h"
 #include "main.hh"
 #include "source.hh"
@@ -25,7 +24,7 @@
 #include "midi-item.hh"
 #include "staff-column.hh"
 #include "musical-request.hh"
-
+#include "p-score.hh"
 
 Midi_output::Midi_output(Score* score_l, Midi_def* midi_l )
 {
@@ -101,6 +100,7 @@ Midi_output::header()
 
     // ugh, to please lily when reparsing mi2mu output.
     // lily currently barfs when no meter present.
+    /* are you sure? init is to 4/4 HWN */
     Midi_time midi_time( 4, 4, 18 );
     midi_track.add( Moment( 0.0 ), &midi_time );
 
index a024458349b22e55828f3e42c6e9dd41c5876d58..3f24638236cb262999c9db8b93ea5838190c1090 100644 (file)
@@ -29,9 +29,13 @@ Midi_walker::Midi_walker(Staff *st_l, Midi_track* track_l)
 void
 Midi_walker::do_stop_notes(Moment max_moment)
 {
-    while (stop_notes.size() && stop_notes.front_idx() <= max_moment) {
-       Moment stop_moment = stop_notes.front_idx();
-       Melodic_req * req_l = stop_notes.get();
+    while (stop_notes.size() && stop_notes.front().key <= max_moment) {
+       Note_event  ent=stop_notes.get();
+       if (ent.ignore_b_) 
+           continue;
+       
+       Moment stop_moment = ent.key;
+       Melodic_req * req_l = ent.val;
        
        Midi_note note(req_l, track_l_->number_i_, false);
        output_event(note, stop_moment);
@@ -43,21 +47,23 @@ Midi_walker::do_stop_notes(Moment max_moment)
 void 
 Midi_walker::do_start_note(Note_req*note_l)
 {
-    Moment stop=note_l->duration() + ptr()->when();
-    for(int i=0; i < stop_notes.size(); i++)
-       if (stop_notes.value_arr_[i]->melodic()->pitch() ==
+    Moment stop = note_l->duration() + ptr()->when();
+    for(int i=0; i < stop_notes.size(); i++) {
+       if (stop_notes[i].val->melodic()->pitch() ==
            note_l->pitch()) {
-            if ( stop_notes.indices_arr_[i] < stop){
-                
-                stop_notes.del(i);
-                return ;  // removing this gives a feature ( ${c2 c4}$ output correctly)
-            }
-            else
-                return; // skip the stop note 
-            break;// do the stop note               
+           if ( stop_notes[i].key < stop){
+               stop_notes[i].ignore_b_=true;
+           }
+           else
+               return; // skip the stop note 
        }
+    }
+    Note_event e;
+    e.val = note_l;
+    e.key = stop;
+    
+    stop_notes.insert(e);
     
-    stop_notes.enter(note_l,  stop);
     Midi_note note(note_l, track_l_->number_i_, true);
     output_event(note, ptr()->when());
 }
@@ -94,7 +100,6 @@ Midi_walker::process_requests()
     }
 
     for ( int i = 0; i < ptr()->musicalreq_l_arr_.size(); i++ )  {
-
        Rhythmic_req *n = ptr()->musicalreq_l_arr_[i]->rhythmic();
        if ( !n)
            continue;
@@ -102,7 +107,6 @@ Midi_walker::process_requests()
        if (!note_l)
            continue;
        do_start_note(note_l);
-       
     }
 }
 
@@ -110,3 +114,10 @@ Midi_walker::~Midi_walker()
 {
     do_stop_notes( last_moment_ + Moment(10,1)); // ugh
 }
+
+
+int
+compare(Note_event const&e1, Note_event const&e2)
+{
+    return sign(e1.key - e2.key);
+}
index f1f7cb0cfd41d2ffe86ef86731ff41556b96d7d3..8e14e791d25c70780cc38537b7caea5ee496965f 100644 (file)
@@ -32,6 +32,7 @@ static Keyword_ent the_key_tab[]={
     {"geometric", GEOMETRIC},
     {"hshift", HSHIFT},
     {"in", IN_T},
+    {"init_end", INIT_END},
     {"inputregister", INPUT_REGS},
     {"lyric", LYRIC},
     {"key", KEY},
index ce375484ed5bea779538e8157eaba2f27e52a8e2..73761360f9cd025f2ed8a70e3a621f13df2530a5 100644 (file)
@@ -49,24 +49,24 @@ My_lily_parser::print_declarations()
 #endif   
 }
 
+void
+My_lily_parser::do_init_file()
+{
+    init_parse_b_ = true;
+    set_debug();
+    lexer_p_->new_input(init_str_, source_l_);
+}
+
 void
 My_lily_parser::parse_file(String init, String s)
 {
     *mlog << "Parsing ... ";
     lexer_p_ = new My_lily_lexer;
-
-    set_debug();
-    init_parse_b_ = true;
-
-    lexer_p_->new_input(init, source_l_);
-    do_yyparse();
-    print_declarations();
-   
-    init_parse_b_ = false;
-    set_debug();
+    init_str_ = init;
+    
     lexer_p_->new_input(s, source_l_);
     do_yyparse();
-
+    print_declarations();
 
     if(!define_spot_array_.empty())
        warning("Braces don't match.");
@@ -227,6 +227,7 @@ My_lily_parser::get_parens_request(char c)
 
 My_lily_parser::My_lily_parser(Sources * source_l)
 {
+    first_b_ = true;
     source_l_ = source_l;
     lexer_p_ = 0;
     default_duration_.type_i_ = 4;
index 3d6f86b57c0f719676b0770da237cb57ec2f0ecd..fdde1c198ee3c0ecfd612ee8cf78f7c0ba9e00fe 100644 (file)
@@ -1,7 +1,7 @@
 %{ // -*-Fundamental-*-
 #include <iostream.h>
 
-#define MUDELA_VERSION "0.0.52"
+#define MUDELA_VERSION "0.0.53"
 
 #include "script-def.hh"
 #include "symtable.hh"
@@ -83,6 +83,12 @@ yylex(YYSTYPE *s,  void * v_l)
 {
        My_lily_parser   *pars_l = (My_lily_parser*) v_l;
        My_lily_lexer * lex_l = pars_l->lexer_p_;
+       
+       if (pars_l->first_b_) {
+               pars_l->first_b_ = false;
+               pars_l->do_init_file();
+       }
+
        lex_l->lexval_l = (void*) s;
        return lex_l->yylex();
 }
@@ -108,6 +114,7 @@ yylex(YYSTYPE *s,  void * v_l)
 %token INPUT_REGS
 %token HSHIFT
 %token IN_T
+%token INIT_END
 %token LYRIC
 %token KEY
 %token MELODIC
@@ -216,8 +223,15 @@ mudela:    /* empty */
        | mudela error
        | mudela check_version { } 
        | mudela add_notenames { }
+       | mudela init_end       {}
        ;
 
+init_end: INIT_END ';'         {
+           THIS->print_declarations();
+           THIS->init_parse_b_ = false;
+           THIS->set_debug();
+       }
+       ;
 check_version:
        VERSION STRING ';'              {
                if (*$2 != MUDELA_VERSION) {
diff --git a/lily/pulk-voice.cc b/lily/pulk-voice.cc
new file mode 100644 (file)
index 0000000..31e931a
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+  pulk-voices.cc -- implement Pulk_voice
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+#include "pulk-voice.hh"
+#include "voice.hh"
+#include "musical-request.hh"
+#include "voice-element.hh"
+
+Pulk_voice::Pulk_voice(Voice*voice_l, int idx)
+    :    cur_(voice_l->elts_)
+{
+    elt_mom_ = voice_l->start_;
+    staff_idx_= idx;
+    set_subtle();
+}
+
+Array<Request*>
+Pulk_voice::get_req_l_arr() return req_l_arr;
+{
+    Moment w = when();
+    do {
+       Moment sub = subtle_moment_priorities_[subtle_idx_];
+       for (PCursor<Request*> i(cur_->req_p_list_); i.ok(); i++) {
+           Musical_req* m_l = i->musical();
+           if (!sub) {
+               if (!(m_l && m_l->subtle() && m_l->subtle()->subtime_ )) 
+                   req_l_arr.push(i);
+           } else {
+               if (m_l && m_l->subtle() && m_l->subtle()->subtime_ == sub)
+                   req_l_arr.push(i);
+           }
+       }
+       next();
+    } while ( ok() && when () == w);
+}
+
+void
+Pulk_voice::set_subtle()
+{
+    subtle_idx_ =0;
+
+    subtle_moment_priorities_.set_size(0);
+    if (!cur_.ok())
+       return;
+    for (PCursor<Request*> i(cur_->req_p_list_); i.ok(); i++) {
+       Musical_req* m_l = i->musical();
+       if (m_l&&m_l->subtle()){
+           Moment sub = m_l->subtle()->subtime_;
+           subtle_moment_priorities_.insert(sub);
+       } else {
+           subtle_moment_priorities_.insert(0);
+       }
+    }
+}
+
+void
+Pulk_voice::next()
+{
+    assert(ok());
+    subtle_idx_++;
+    if (subtle_idx_ == subtle_moment_priorities_.size()) {
+       elt_mom_ += cur_->duration_;
+       cur_ ++;
+       set_subtle();
+    }
+}
+
+Moment
+Pulk_voice::when()const
+{
+    return elt_mom_ + subtle_moment_priorities_[subtle_idx_];
+}
diff --git a/lily/pulk-voices.cc b/lily/pulk-voices.cc
new file mode 100644 (file)
index 0000000..63462ca
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+  pulk-voices.cc -- implement Pulk_voices
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "pulk-voice.hh"
+#include "pulk-voices.hh"
+#include "staff.hh"
+#include "voice.hh"
+#include "request-column.hh"
+#include "debug.hh"
+
+Pulk_voices::Pulk_voices(PointerList<Staff*> const& l)
+    : staff_l_list_(l)
+{
+    int staff_i = 0;
+    last_= 0;
+    Moment min_staff_last_mom=1e8; // UGH
+    for (iter_top(l, i); i.ok(); i++,  staff_i++) {
+       Moment staff_last=0;
+       for (iter_top(i->voice_list_,j); j.ok(); j++) {
+           if (j->elts_.size()) {
+               staff_last = staff_last >? j->last();
+               voice_pq_.insert(Voice_l(j, staff_i));
+           }
+       }
+       min_staff_last_mom = min_staff_last_mom <? staff_last;
+       last_ = last_ >? staff_last;
+    }
+    next_mom_ = voice_pq_.front().l_->start_;
+
+
+    if (last_ != min_staff_last_mom)
+       warning("Not all staffs end simultaneously");
+}
+
+void
+Pulk_voices::get_aligned_request(Request_column* col_l)
+{
+    while (voice_pq_.size() && voice_pq_.front().l_->start_ == next_mom_) {
+       Voice_l v = voice_pq_.get();
+       pulk_p_list_.bottom().add( new Pulk_voice ( v.l_, v.staff_idx_ ));
+    }
+
+    /* hairy. #i# is a cursor which points to Pulk_voice (which a
+       cursor, essentially) */
+    
+    Moment new_next_mom = last_;
+    iter(pulk_p_list_.top() , i);
+    while  ( i.ok() ) {
+       mtor << "considering staff"<< i->staff_idx_ << "at " << i->when() << "\n";
+       assert (i->when() >= next_mom_);
+       if (i->when() == next_mom_) {
+           col_l->add_reqs(i->staff_idx_, i->get_req_l_arr() );
+
+           if (!i->ok()) {
+               i.del();
+               continue;
+           }
+       }
+       new_next_mom = new_next_mom <? i->when();
+       i++; 
+    }
+    
+    if (voice_pq_.size() )
+       new_next_mom = new_next_mom <? voice_pq_.front().l_->start_;
+    next_mom_ = new_next_mom;
+}
+
+
+bool
+Pulk_voices::ok() const
+{
+    return pulk_p_list_.size() || voice_pq_.size();
+}
+
+int compare(Voice_l const& v1, Voice_l const& v2)
+{
+    return sign(v1.l_->start_ - v2.l_->start_);
+}
+           
diff --git a/lily/request-column.cc b/lily/request-column.cc
new file mode 100644 (file)
index 0000000..4fd9d53
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+  request-column.cc -- implement Request_column
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+#include "score-column.hh"
+#include "request-column.hh"
+#include "staff-column.hh"
+#include "staff.hh"
+
+Moment
+Request_column::when()
+{
+    
+    return(command_column_l_)? command_column_l_->when(): musical_column_l_->when();
+}
+
+void
+Request_column::add_reqs(int idx , Array<Request*> const & req_l_arr)
+{
+    staff_col_l_arr_[idx]->add_reqs(req_l_arr);
+}
+
+Request_column::Request_column(PointerList<Staff*> const& list )
+{
+    musical_column_l_ = command_column_l_ =0;
+    iter(list.top(), j);
+    for (int i=0; i < list.size(); i++,j++) {
+       Staff_column * col_p = new Staff_column;
+       col_p->set_req_col(this);
+       staff_col_l_arr_.push(col_p);
+       staff_cols_.bottom().add(col_p);
+       j->add_col(col_p);
+    }
+}
+void
+Request_column::set_score_cols(Score_column* c1, Score_column *c2)
+{
+    command_column_l_ = c1;
+    musical_column_l_ = c2;
+}
+bool
+Request_column::used_b() const
+{
+    bool b = false;
+    if (command_column_l_)
+       b |= command_column_l_->used_b();
+    if (musical_column_l_)
+       b |= command_column_l_->used_b();
+    return b;
+}
index 6d6aed474320491515c0db2e13e5628b894b31ed..0354cdceaa4b1148ac11156cafc3a930449318bb 100644 (file)
@@ -24,10 +24,6 @@ Score_walker::Score_walker(Score *s)
        walker_p_arr_.push(w_p);
     }
 
-    if(ok()) {
-       s->find_col(0, false)->set_breakable();
-       s->find_col(s->last(), false)->set_breakable();
-    }
     reinit();
     breaks_i_=0;
 }
@@ -115,7 +111,6 @@ 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 88f7dee6df606dd0a60e2929f5a10cfc1477292e..30514a7c5f1c51033b0b2d6e4f736ff3a4db0a0c 100644 (file)
@@ -18,6 +18,8 @@
 #include "score-walker.hh"
 #include "midi-output.hh"
 #include "midi-def.hh"
+#include "pulk-voices.hh"
+#include "request-column.hh"
 
 extern String default_out_fn;
 
@@ -25,13 +27,33 @@ void
 Score::setup_music()
 {
     *mlog << "\nSetting up music ..." << flush;
-    if (last() == Moment(0)) {
+    
+    Pulk_voices pulk(staffs_); 
+
+    Moment l_mom = pulk.last_;
+    if (l_mom == Moment(0)) {
        errorlevel_i_ |= 1;
        input_.error("Need to have music in a score.");
     }
-
-    for (iter_top(staffs_,i); i.ok(); i++) {
-       i->setup_staffcols();
+    
+    while (pulk.ok()) {
+       Moment w= pulk.next_mom();
+       Request_column* rcol_p = new Request_column( staffs_ );
+
+       Score_column* c1 = new Score_column(w);
+       Score_column* c2 = new Score_column(w);
+       if (w == Moment(0) || w == l_mom) {
+           c1->set_breakable();
+       }
+               
+       c1->musical_b_ = false;
+       c2->musical_b_ = true;
+       
+       cols_.bottom().add(c1);
+       cols_.bottom().add(c2);
+       rcol_p->set_score_cols(c1, c2);
+       rcols_.bottom().add(rcol_p);
+       pulk.get_aligned_request( rcol_p );
     }
 }
 
@@ -60,9 +82,6 @@ Score::paper()
        return;
     
     pscore_p_ = new PScore(paper_p_);
-
-    find_col(0, false)->set_breakable(); // ugh
-    find_col(last(), false)->set_breakable();
     do_cols();
     
     for (iter_top(staffs_,i); i.ok(); i++) 
@@ -90,9 +109,18 @@ Score::paper()
 void
 Score::clean_cols()
 {
+#if 1
     for (iter_top(staffs_,i); i.ok(); i++)
        i->clean_cols();
 
+    for (iter_top(rcols_,i); i.ok(); i++) {
+       if (!i->command_column_l_->used_b()) {
+           i->command_column_l_ = 0;
+       }
+       if (!i->musical_column_l_->used_b())
+           i->musical_column_l_ = 0;
+    }
+    
     for (iter_top(cols_,c); c.ok(); ) {
        if (!c->pcol_l_->used_b()) {
            delete c.remove_p();
@@ -101,44 +129,7 @@ Score::clean_cols()
            c++;
        }
     }
-}
-
-/** Create columns at time #w#.  This sux.  We should have
-  Score_column create the appropriate PCol.  Unfortunately, PCols
-  don't know about their position.
-
-  @return cursor pointing to the nonmusical (first) column */
-PCursor<Score_column*>
-Score::create_cols(Moment w, PCursor<Score_column*> &i)
-{
-    Score_column* c1 = new Score_column(w);
-    Score_column* c2 = new Score_column(w);
-    
-    c1->musical_b_ = false;
-    c2->musical_b_ = true;
-
-    if (i.ok()) {
-       i --;
-    }
-    if ( !i.ok() ) {
-       i = cols_.top();
-    }
-    for (; i.ok(); i++) {
-       if (i->when() > w)
-           break;
-    }
-
-    if (!i.ok()) {
-       cols_.bottom().add(c1);
-       cols_.bottom().add(c2);
-       i = cols_.bottom();
-       i --;
-    } else {
-       i.insert(c1);
-       i.insert(c2);
-       i -= 2;
-    }
-    return i;
+#endif
 }
 
 PCursor<Score_column*>
@@ -152,9 +143,7 @@ Score::find_col(Moment w, bool mus)
        if (i->when() > w)
            break;
     }
-    i = create_cols(w,i);
-    if (mus)
-       i++;
+    assert(false);
     return i;
 }
 
index 96c837fb573a512c2704dec3e5400edf98144aae..31454230ce67a99510e18daaf6c03e09ca1e472a 100644 (file)
 #include "p-score.hh"
 #include "item.hh"
 #include "p-col.hh"
-#include "voice-element.hh"
-#include "pqueue.hh"
+#include "request-column.hh"
 
 void
 Staff_column::OK() const
 {
 #ifndef NDEBUG
-    assert (command_column_l_->when() == musical_column_l_->when());
+    
 #endif
 }
 
 Moment
 Staff_column::when() const
 {
-    return (command_column_l_)?
-       command_column_l_->when():
-       musical_column_l_->when();
+    return req_col_l_->when();
 }
 
 void
-Staff_column::add(Voice_element*ve,
-                 PQueue<Subtle_req *, Moment> &subtle_req_pq )
+Staff_column::add_reqs(Array<Request*> req_l_arr)
 {
-    for (iter_top(ve->reqs,j); j.ok(); j++) {
+    for (int i=0; i < req_l_arr.size(); i++) {
+       Request * j = req_l_arr[i];
        if (j->command()) {
            Command_req * c_l = j->command();
            if (c_l->timing()) {
@@ -51,20 +48,15 @@ Staff_column::add(Voice_element*ve,
                creationreq_l_arr_.push(c_l);
            else if (!c_l->barcheck() &&  !c_l->partial() &&
                !c_l->measuregrouping())
-               setup_one_request(j);   // no need to bother children
+               setup_one_request(j);   
        } else {
            if (j->rhythmic()) {
-               musical_column_l_->add_duration(j->rhythmic()->duration());
+               req_col_l_->musical_column_l_->add_duration(j->rhythmic()->duration());
            }
            if (j->musical()) {
                Musical_req*m = j->musical();
                if(m->skip())
                    continue;
-               Subtle_req * s = m->subtle() ;
-               if (s&& s->subtime_) {
-                   subtle_req_pq.enter(s, s->subtime_ + when());
-                   continue ; 
-               }
            }
            setup_one_request(j);
        }
@@ -73,8 +65,6 @@ Staff_column::add(Voice_element*ve,
 
 Staff_column::Staff_column()
 {
-    musical_column_l_ = 0;
-    command_column_l_ = 0;
     staff_l_ = 0;
 }
 
@@ -86,10 +76,9 @@ Staff_column::~Staff_column()
 }
 
 void
-Staff_column::set_cols(Score_column*c1, Score_column*c2)
+Staff_column::set_req_col(Request_column *col_l)
 {
-    command_column_l_ = c1;
-    musical_column_l_ = c2;
+    req_col_l_ = col_l;
 }
 
 void
@@ -105,8 +94,8 @@ void
 Staff_column::typeset_musical_item(Item*i)
 {
     assert(i);
-    Score_column * scorecolumn_l = musical_column_l_;
-    musical_column_l_->pcol_l_->pscore_l_->typeset_item(i, scorecolumn_l->pcol_l_,
+    Score_column * scorecolumn_l = req_col_l_->musical_column_l_;
+    scorecolumn_l->pcol_l_->pscore_l_->typeset_item(i, scorecolumn_l->pcol_l_,
                                                        staff_l_->pstaff_l_);
 }
 
@@ -147,8 +136,9 @@ Staff_column::typeset_breakable_items(Array<Item *> &pre_p_arr,
                                      Array<Item *> &nobreak_p_arr,
                                      Array<Item *> &post_p_arr)
 {
-    PCol * c= command_column_l_->pcol_l_;
-    PScore *ps_l=command_column_l_->pcol_l_->pscore_l_;
+    Score_column * scol_l= req_col_l_->command_column_l_;
+    PCol * c= scol_l->pcol_l_;
+    PScore *ps_l=scol_l->pcol_l_->pscore_l_;
     
     if (!c->breakable_b()) {     
        for  (int i =0; i < pre_p_arr.size(); i++)
@@ -180,3 +170,15 @@ Staff_column::typeset_breakable_items(Array<Item *> &pre_p_arr,
     post_p_arr.set_size(0);
     nobreak_p_arr.set_size(0);
 }
+
+Score_column*
+Staff_column::command_column_l()
+{
+    return req_col_l_->command_column_l_;
+}
+
+Score_column*
+Staff_column::musical_column_l()
+{
+    return req_col_l_->musical_column_l_;
+}
index b2b1e7250443255da7e706835f1f195722b85bb7..e86900bb07ca566ddd7569e0e78fdf16133b925e 100644 (file)
@@ -41,13 +41,13 @@ Staff_info::column_l()
 Score_column*
 Staff_info::musical_l()
 {
-    return column_l() -> musical_column_l_;
+    return column_l() -> musical_column_l();
 }
 
 Score_column*
 Staff_info::command_l()
 {
-    return column_l() -> command_column_l_;
+    return column_l() -> command_column_l();
 }
 PCol*
 Staff_info::command_pcol_l()
index d9623fe4363380b443e5fc7933eed5a47fabb795..a533c32f1afc0da0a3f5b7a9155432be7a8dda63 100644 (file)
@@ -16,7 +16,6 @@
 #include "debug.hh"
 #include "musical-request.hh"
 #include "command-request.hh" // todo
-#include "pqueue.hh"
 
 
 void
@@ -35,6 +34,7 @@ Staff::paper() const
 void
 Staff::clean_cols()
 {
+#if 0 // TODO
     iter_top(cols_,i);
     for(; i.ok(); ){
        if (!i->musical_column_l_->used_b())
@@ -47,83 +47,9 @@ Staff::clean_cols()
        else
            i++;
     }
+#endif
 }
 
-Staff_column *
-Staff::get_col(Moment w, PCursor<Staff_column*> *last)
-{    
-    iter_top(cols_,i);
-    if (last && last->ok() && (*last)->when() <= w)
-       i = *last;
-    
-    for (; i.ok(); i++) {
-       if (i->when() == w) {
-           if (last)
-               *last = i;
-           return i;
-       } else if (i->when() > w)
-           break;
-    }
-
-
-    PCursor<Score_column*> scorecolumns(score_l_->find_col(w, false));
-    Staff_column* staffcolumn_p = new Staff_column;
-    staffcolumn_p->staff_l_ = this;
-    Score_column* comcol_l  = scorecolumns++;
-    staffcolumn_p->set_cols(comcol_l, scorecolumns);
-    
-    if (!i.ok()) {
-       cols_.bottom().add(    staffcolumn_p);
-       i = cols_.bottom();
-    } else {
-       i.insert(staffcolumn_p);
-       i--;
-    }
-    if (last)
-       *last = i;
-    return i;
-}
-
-/** put all stuff grouped vertically in the Staff_cols.  Do the
-  preprarations for walking the cols. not virtual */
-void
-Staff::setup_staffcols()
-{
-    PQueue<Subtle_req *, Moment> subtle_req_pq;
-       PCursor<Staff_column*> last(cols_);
-    
-    for (iter_top(voice_list_,i); i.ok(); i++) {
-       Moment now = i->start;
-       iter_top(i->elts,j);
-       while( j.ok()) {
-           
-           Moment next = now;
-           if (subtle_req_pq.size())
-               next = next <? subtle_req_pq.front_idx();
-
-           Staff_column *s_l= get_col(next, &last);
-
-           while (subtle_req_pq.size()
-                  && subtle_req_pq.front_idx() == s_l->when()) {
-               s_l->setup_one_request(subtle_req_pq.get()); // ugh!
-           }
-           if(next == now) {
-               s_l->add(j, subtle_req_pq); 
-               now += j->duration_;
-               j++;
-           }
-       }
-       
-    }
-   last = cols_.top(); 
-    while (subtle_req_pq.size()) {
-       Moment front =subtle_req_pq.front_idx();
-       Staff_column *s_l = get_col(front, &last);
-       while(subtle_req_pq.size() && subtle_req_pq.front_idx() == front)
-           s_l->setup_one_request(subtle_req_pq.get()); // ugh!
-    }
-       
-}
 
 void
 Staff::OK() const
@@ -172,3 +98,10 @@ Staff::Staff()
     pscore_l_ =0;
     pstaff_l_ =0;
 }
+
+void
+Staff::add_col(Staff_column*c_l)
+{
+    cols_.bottom().add(c_l);
+    c_l->staff_l_ = this;
+}
diff --git a/lily/template7.cc b/lily/template7.cc
new file mode 100644 (file)
index 0000000..793280a
--- /dev/null
@@ -0,0 +1,14 @@
+#/*
+  template7.cc -- instantiate Request_column
+
+  source file of the LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+#include "staff-column.hh"
+#include "request-column.hh"
+#include "plist.tcc"
+#include "pcursor.tcc"
+
+IPL_instantiate(Request_column);
diff --git a/lily/template8.cc b/lily/template8.cc
new file mode 100644 (file)
index 0000000..09da3b6
--- /dev/null
@@ -0,0 +1,6 @@
+#include "pulk-voice.hh"
+
+#include "plist.tcc"
+#include "pcursor.tcc"
+
+IPL_instantiate(Pulk_voice);
index b499e3d727b0f3bec7c9ed69321909c96c8d10ad..03811ff063d72db1bfa7674203ee3f823d54c94e 100644 (file)
@@ -18,7 +18,7 @@
 void
 Voice_element::transpose(Melodic_req const&d)const
 {
-    for (iter_top(reqs,i); i.ok(); i++) {
+    for (iter_top(req_p_list_,i); i.ok(); i++) {
        i->transpose(d);
       }
 }
@@ -28,7 +28,7 @@ Voice_element::print() const
 {
 #ifndef NPRINT
     mtor << "voice_element { dur :"<< duration_ <<"\n";
-    for (iter_top(reqs,rc); rc.ok(); rc++) {
+    for (iter_top(req_p_list_,rc); rc.ok(); rc++) {
        rc->print();
     }
     mtor << "}\n";
@@ -44,7 +44,7 @@ Voice_element::add(Request*r)
     }
     
     r->elt_l_ = this;
-    reqs.bottom().add(r);
+    req_p_list_.bottom().add(r);
 }
 
 
@@ -59,7 +59,7 @@ Voice_element::Voice_element(Voice_element const&src)
 {
   
     voice_C_=0;
-    for (iter_top(src.reqs, i); i.ok(); i++)
+    for (iter_top(src.req_p_list_, i); i.ok(); i++)
        add(i->clone());
 
 }
@@ -68,7 +68,7 @@ Voice_element::find_plet_start_b(char c, Moment& moment_r)// b unused?
 {
     assert( c == ']' );
     moment_r += duration_;
-    for ( PCursor<Request*> i( reqs.top() ); i.ok(); i++ ) {
+    for ( PCursor<Request*> i( req_p_list_.top() ); i.ok(); i++ ) {
        if (i->beam() && i->beam()->spantype == Span_req::START )
            return true;
     }
@@ -78,7 +78,7 @@ Voice_element::find_plet_start_b(char c, Moment& moment_r)// b unused?
 void
 Voice_element::set_default_group(String s)
 {
-    for (iter_top(reqs, i); i.ok(); i++)
+    for (iter_top(req_p_list_, i); i.ok(); i++)
        if (i->command() &&i->command()->groupchange())
            return ;
     Group_change_req *greq = new Group_change_req;
@@ -93,7 +93,7 @@ Voice_element::set_plet_backwards(Moment& now_moment_r,
     now_moment_r += duration_;
     if ( now_moment_r > until_moment )
        return;
-    for ( PCursor<Request*> i( reqs.top() ); i.ok(); i++ ) {
+    for ( PCursor<Request*> i( req_p_list_.top() ); i.ok(); i++ ) {
        if (i->beam() && i->beam()->spantype == Span_req::START )
            i->beam()->nplet = den_i;
        if (i->rhythmic()) {
index a5e10f7fd985847ca067cff56322ac6d6f94be6b..9b10dfcd2533b2c5dbfe723df4e666e75b5bb387 100644 (file)
 void
 Voice::transpose(Melodic_req const & d)const
 {
-     for (iter_bot(elts, i); i.ok(); i--)
+     for (iter_bot(elts_, i); i.ok(); i--)
        i->transpose(d); 
 }
 
 void
 Voice::set_default_group(String s)
 {
-    elts.top()->set_default_group(s);
+    elts_.top()->set_default_group(s);
 }
 
 bool
 Voice::find_plet_start_b(char c, Moment& moment_r)
 {
-    for (iter_bot(elts, i); i.ok(); i--)
+    for (iter_bot(elts_, i); i.ok(); i--)
        if ( i->find_plet_start_b(c, moment_r) )
            return true;
     return false;
@@ -42,7 +42,7 @@ void
 Voice::set_plet_backwards(Moment& now_moment_r, Moment until_moment,
                          int num_i, int den_i)
 {
-    for (iter_bot(elts, i); i.ok(); i--) 
+    for (iter_bot(elts_, i); i.ok(); i--) 
        if ( now_moment_r <= until_moment ) 
            i->set_plet_backwards(now_moment_r, until_moment, num_i, den_i);
        else
@@ -51,43 +51,46 @@ Voice::set_plet_backwards(Moment& now_moment_r, Moment until_moment,
 
 Voice::Voice(Voice const&src)
 {
-    for (iter_top(src.elts, i); i.ok(); i++)
+    for (iter_top(src.elts_, i); i.ok(); i++)
        add(new Voice_element(**i));
 
-    start = src.start;
+    start_ = src.start_;
 }
 
 Voice::Voice()
 {
-    start = 0;
+    start_ = 0;
 }
 
 void
 Voice::add(Voice_element*v)
 {
     v->voice_C_ = this;
-    elts.bottom().add(v);
+    elts_.bottom().add(v);
 }
 
 void
 Voice::print() const
 {
 #ifndef NPRINT
-    mtor << "Voice { start: "<< start<<eol;
-    for (iter_top(elts,i); i.ok(); i++)
+    mtor << "Voice { start_: "<< start_<<eol;
+    for (iter_top(elts_,i); i.ok(); i++)
        i->print();
     mtor << "}\n";
 #endif
 }
 
+/**
+   @return The moment at which last element stops.
+ */
 Moment
 Voice::last() const
 {
     Moment l =0;
-    if (elts.size())
-       l = start;
+    if (elts_.size())
+       l = start_;
     
-    for (iter_top(elts,i); i.ok(); i++)
+    for (iter_top(elts_,i); i.ok(); i++)
        l  += i->duration_;
     return l;
 }
index c0b3f8f25d2e5fa942b70831170d93d0b81a51e5..d02cd493bbd141d5e2eff686b2e00e3ada2457a6 100644 (file)
@@ -19,8 +19,11 @@ NAME = make
 
 
 # list of distribution files:
-#
-EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in Toplevel.make.in lilypond.lsm.in $(outdir)/lilypond.spec
+
+# two outdir files are distributed, since they make sense to have without running 
+# configure and make.
+EXTRA_DISTFILES = Configure_variables.make.in lilypond.spec.in Toplevel.make.in \
+       lilypond.lsm.in $(outdir)/lilypond.spec $(outdir)/lilypond.lsm
 #
 
 # generic variables:
@@ -37,6 +40,13 @@ include ./$(depth)/make/Rules.make
 
 spec: $(outdir)/lilypond.spec
 
-rpm-docs=$(addprefix Documentation/out/, $(notdir $(shell ls $(depth)/Documentation/$(outdir)/*.text)))
+rpmdocs=$(addprefix Documentation/out/, $(notdir $(shell ls $(depth)/Documentation/$(outdir)/*.text)))
+sed-version= sed 's!@TOPLEVEL_VERSION@!${TOPLEVEL_VERSION}!g'
+sed-date=sed 's!@DATE@!${date}!g'
+sed-docs=sed 's!@TEXT_DOCS@!${rpmdocs}!g'
+
 $(outdir)/lilypond.spec: lilypond.spec.in $(depth)/.version
-       cat $< | sed 's/@TOPLEVEL_VERSION@/${TOPLEVEL_VERSION}/g'|sed 's#@TEXT_DOCS@#$(rpm-docs)#g' > $@
+       cat $< | $(sed-version) | $(sed-docs) > $@
+
+$(outdir)/lilypond.lsm: lilypond.lsm.in $(depth)/.version
+       cat $< | $(sed-version) | $(sed-date) > $@
index 07e9b196d08197b3396ed05b26f8ca5fd1340bd1..87656c81b159a8e218f50f0697ef3b6b3be2b465 100644 (file)
@@ -96,6 +96,7 @@ DUMMYDEPS=\
 ERROR_LOG = 2> /dev/null
 SILENT_LOG = >& /dev/null
 allexe = $(lily_bindir)/lilypond $(lily_bindir)/mi2mu
+date = $(shell date +%x)
 allhh := $(shell $(FIND) -name "*.hh" $(ERROR_LOG))
 allcc := $(shell $(FIND) -name "*.cc" $(ERROR_LOG))
 allobs := $(shell $(FIND) $(outdir) -name "*.o" $(ERROR_LOG))
diff --git a/make/lilypond.lsm b/make/lilypond.lsm
new file mode 100644 (file)
index 0000000..5e09dc7
--- /dev/null
@@ -0,0 +1,21 @@
+[This lsm-entry is not in the LSM yet.]
+
+Begin3
+Title: LilyPond
+Version: 0.0.53
+Entered-date: 04/21/97
+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)
+       jan@digicash.com (Jan Nieuwenhuizen)
+Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
+Primary-site: pcnov095.win.tue.nl /pub/lilypond/  
+       300k lilypond-0.0.53.tar.gz
+Alternate-site: 
+Original-site: 
+Platform: unix/win32, GNU C++
+Copying-policy: GPL
+End
index 2eee0386f5e99c3439e7ba28f6d60304927a760c..47222cc1261b71ecf34e398d29dc2998d470c805 100644 (file)
@@ -1,3 +1,5 @@
+[This lsm-entry is not in the LSM yet.]
+
 Begin3
 Title: LilyPond
 Version: @TOPLEVEL_VERSION@
@@ -8,6 +10,7 @@ meters, clefs, keys, lyrics, versatile input-language, cadenzas
 beams, slurs, triplets.
 Keywords: music typesetting midi notation
 Author: hanwen@stack.nl (Han-Wen Nienhuys)
+       jan@digicash.com (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: pcnov095.win.tue.nl /pub/lilypond/  
        300k lilypond-@TOPLEVEL_VERSION@.tar.gz
index 392842679907516a625d1c93f67671cbecc9a16b..bd7f88d2f714f186aeed8081cc9ccca7017a6218 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 0.0.52
+Version: 0.0.53
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.52.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.0.53.tar.gz
 Summary: A preprocessor to make TeX typeset music.
 URL: http://www.stack.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>
@@ -25,7 +25,7 @@ make all
 strip bin/lilypond bin/mi2mu
 make prefix="$RPM_BUILD_ROOT/usr" install
 %files
-%doc Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/error.text Documentation/out/examples.text Documentation/out/faq.text Documentation/out/index.text Documentation/out/language.text Documentation/out/lilygut.text Documentation/out/lilypond.text Documentation/out/mudela.text Documentation/lelie_logo.gif
+%doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/error.text Documentation/out/examples.text Documentation/out/faq.text Documentation/out/index.text Documentation/out/language.text Documentation/out/lilygut.text Documentation/out/lilypond.text Documentation/out/mudela.text Documentation/lelie_logo.gif
 /usr/bin/lilypond
 /usr/bin/mi2mu
 /usr/man/man1/lilypond.1
index e53263181d0802276d372c8fb7ed561d868e1fba..f4aa216f1278ee51db852555fad0e258fb67c110 100644 (file)
@@ -1,4 +1,4 @@
-\font\musicfont=musixsps
+\font\musicfont=musix20
 \font\slurfont=xslu16
 \def\thefont{\musicfont}
 
@@ -46,4 +46,4 @@
 
         \charn
 
-\bye
\ No newline at end of file
+\bye