]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.1.19 release/0.1.19
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 7 Oct 1997 06:41:20 +0000 (08:41 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 7 Oct 1997 06:41:20 +0000 (08:41 +0200)
39 files changed:
AUTHORS.text
Documentation/INSTALL.pod
INSTALL.text
NEWS
TODO
VERSION
bin/mf-deps.py
bin/mf-to-table.in [deleted file]
bin/mf-to-table.py [new file with mode: 0644]
configure
init/font-en-tja16.ly
init/font-en-tja20.ly
init/table16.ly
init/table20.ly
input/font.ly
lily/VERSION
lily/dots.cc
lily/keyword.cc
lily/local-key-item.cc
lily/lookup.cc
lily/rest.cc
make/lilypond.lsm
make/lilypond.spec
mf/Makefile
mf/TODO
mf/autometric.mf
mf/bolletjes.mf
mf/eindelijk.mf
mf/font-en-tja16.mf
mf/font-en-tja20.mf
mf/generic-macros.mf [new file with mode: 0644]
mf/generic-params.mf
mf/generic-tja.mf
mf/klef.mf [new file with mode: 0644]
mf/puntje.mf [new file with mode: 0644]
mf/schrift.mf [new file with mode: 0644]
mf/toevallig.mf
tex/font-en-tja16.tex
tex/font-en-tja20.tex

index 3cf19e8c5933b084274a8d1094051177c37038df..96d40df9e381dc20887f584fba5669b69f7c0c6a 100644 (file)
@@ -61,6 +61,6 @@ C\bC\bC\bCO\bO\bO\bON\bN\bN\bNT\bT\bT\bTR\bR\bR\bRI\bI\bI\bIB\bB\bB\bBU\bU\bU\bUT\bT\bT\bTO\bO\bO\bOR\bR\bR\bRS\bS
 
 
 
-23/Sep/97                LilyPond 0.1.18                        1
+23/Sep/97                LilyPond 0.1.19                        1
 
 
index d15fbc73324864e9aa0138f419bf88cc9c549fd1..8ba5d1cf9a2baf73de101c753ac133908460750c 100644 (file)
@@ -25,8 +25,8 @@ For compilation you need.
 
 =item *
 
-A Unix system with GNU tools. GNU LilyPond is known to run on these
-unices: Linux, AIX, Digital Unix and Solaris.
+A GNU system: GNU LilyPond is known to run on these GNU systems:
+Linux, AIX, Digital Unix and Solaris.
 
 If you have the Cygnus WINDOWS32 port of the GNU utils, it will even
 work in Windows NT/95, but we don't promise to support it.
index 7861a349c02c5b655c087689098bdfe68d3212b2..c660fb1603b7823fc4c4a634c1023e9602b4a3e3 100644 (file)
@@ -25,9 +25,8 @@ A\bA\bA\bAB\bB\bB\bBS\bS\bS\bST\bT\bT\bTR\bR\bR\bRA\bA\bA\bAC\bC\bC\bCT\bT\bT\bT
 P\bP\bP\bPR\bR\bR\bRE\bE\bE\bER\bR\bR\bRE\bE\bE\bEQ\bQ\bQ\bQU\bU\bU\bUI\bI\bI\bIS\bS\bS\bSI\bI\bI\bIT\bT\bT\bTE\bE\bE\bES\bS\bS\bS
        For compilation you need.
 
-       +\bo    A Unix system with GNU tools. GNU LilyPond is known
-            to run on these unices: Linux, AIX, Digital Unix and
-            Solaris.
+       +\bo    A GNU system: GNU LilyPond is known to run on these
+            GNU systems: Linux, AIX, Digital Unix and Solaris.
 
             If you have the Cygnus WINDOWS32 port of the GNU
             utils, it will even work in Windows NT/95, but we
@@ -57,11 +56,12 @@ R\bR\bR\bRU\bU\bU\bUN\bN\bN\bNN\bN\bN\bNI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
 
        ftp://ftp.shsu.edu/tex-archive/macros/musixtex/taupin
 
+       ftp://ftp.tex.ac.uk/tex-archive/macros/musixtex/taupin
 
 
 
 
-26/Sep/97                LilyPond 0.1.18                        1
+7/Oct/97                 LilyPond 0.1.19                        1
 
 
 
@@ -70,8 +70,6 @@ R\bR\bR\bRU\bU\bU\bUN\bN\bN\bNN\bN\bN\bNI\bI\bI\bIN\bN\bN\bNG\bG\bG\bG
 INSTALL(1)            LilyPond documentation           INSTALL(1)
 
 
-       ftp://ftp.tex.ac.uk/tex-archive/macros/musixtex/taupin
-
        ftp://ftp.dante.de/tex-archive/macros/musixtex/taupin
 
                 You only need the contents of the _\bm_\bf_\b/
@@ -124,10 +122,12 @@ 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
 
        The TeX include directory is detected dynamically, but it
        can be adjusted with -\b-\b-\b--\b-\b-\b-e\be\be\ben\bn\bn\bna\ba\ba\bab\bb\bb\bbl\bl\bl\ble\be\be\be-\b-\b-\b-t\bt\bt\bte\be\be\bex\bx\bx\bx-\b-\b-\b-p\bp\bp\bpr\br\br\bre\be\be\bef\bf\bf\bfi\bi\bi\bix\bx\bx\bx and -\b-\b-\b--\b-\b-\b-e\be\be\ben\bn\bn\bna\ba\ba\bab\bb\bb\bbl\bl\bl\ble\be\be\be-\b-\b-\b-t\bt\bt\bte\be\be\bex\bx\bx\bx-\b-\b-\b-
+       d\bd\bd\bdi\bi\bi\bir\br\br\br. The above assumes that you are root and have the GNU
+       development tools, and your make is GNU make.  If this is
 
 
 
-26/Sep/97                LilyPond 0.1.18                        2
+7/Oct/97                 LilyPond 0.1.19                        2
 
 
 
@@ -136,8 +136,6 @@ 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
 INSTALL(1)            LilyPond documentation           INSTALL(1)
 
 
-       d\bd\bd\bdi\bi\bi\bir\br\br\br. The above assumes that you are root and have the GNU
-       development tools, and your make is GNU make.  If this is
        not the case, you can adjust your environment variables to
        your taste:
 
@@ -190,10 +188,12 @@ INSTALL(1)            LilyPond documentation           INSTALL(1)
                 Set then directory TeX input is in (detected as a
                 subdir of tex-prefix)
 
+       --enable-mf-dir
+                Set the directory mf input is in (idem)
 
 
 
-26/Sep/97                LilyPond 0.1.18                        3
+7/Oct/97                 LilyPond 0.1.19                        3
 
 
 
@@ -202,8 +202,6 @@ INSTALL(1)            LilyPond documentation           INSTALL(1)
 INSTALL(1)            LilyPond documentation           INSTALL(1)
 
 
-       --enable-mf-dir
-                Set the directory mf input is in (idem)
                 [obsolete]
 
        --enable-out-dir
@@ -256,19 +254,19 @@ 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
 
                make install
 
+       should do the trick.
 
 
 
-26/Sep/97                LilyPond 0.1.18                        4
 
+7/Oct/97                 LilyPond 0.1.19                        4
 
 
 
 
-INSTALL(1)            LilyPond documentation           INSTALL(1)
 
+INSTALL(1)            LilyPond documentation           INSTALL(1)
 
-       should do the trick.
 
        Install the musixtex fonts in a directory which TeX and MF
        knows (if you are root, look for a directory which
@@ -322,10 +320,12 @@ R\bR\bR\bRE\bE\bE\bED\bD\bD\bDH\bH\bH\bHA\bA\bA\bAT\bT\bT\bT L\bL\bL\bLI\bI\bI\bIN\bN\bN\bNU\bU\bU\bUX\bX\bX\bX
        file is in _\bm_\ba_\bk_\be_\b/_\bo_\bu_\bt_\b/_\bl_\bi_\bl_\by_\bp_\bo_\bn_\bd_\b._\bs_\bp_\be_\bc. You should be able to
        create an rpm as a normal user. Be sure you have a
        ~/.rpmrc, and edit the RPM-dir in _\bV_\ba_\br_\bi_\ba_\bb_\bl_\be_\bs_\b._\bm_\ba_\bk_\be. (If you
+       create the RPM as a normal user the permissions will not
+       be set correctly, unfortunately)
 
 
 
-26/Sep/97                LilyPond 0.1.18                        5
+7/Oct/97                 LilyPond 0.1.19                        5
 
 
 
@@ -334,9 +334,6 @@ R\bR\bR\bRE\bE\bE\bED\bD\bD\bDH\bH\bH\bHA\bA\bA\bAT\bT\bT\bT L\bL\bL\bLI\bI\bI\bIN\bN\bN\bNU\bU\bU\bUX\bX\bX\bX
 INSTALL(1)            LilyPond documentation           INSTALL(1)
 
 
-       create the RPM as a normal user the permissions will not
-       be set correctly, unfortunately)
-
 D\bD\bD\bDE\bE\bE\bEB\bB\bB\bBI\bI\bI\bIA\bA\bA\bAN\bN\bN\bN G\bG\bG\bGN\bN\bN\bNU\bU\bU\bU/\b/\b/\b/L\bL\bL\bLI\bI\bI\bIN\bN\bN\bNU\bU\bU\bUX\bX\bX\bX
        A Debian package is in the works
 
@@ -391,6 +388,9 @@ A\bA\bA\bAU\bU\bU\bUT\bT\bT\bTH\bH\bH\bHO\bO\bO\bOR\bR\bR\bRS\bS\bS\bS
 
 
 
-26/Sep/97                LilyPond 0.1.18                        6
+
+
+
+7/Oct/97                 LilyPond 0.1.19                        6
 
 
diff --git a/NEWS b/NEWS
index 8bb1a62c195129307474e7a1d59afa7ef147d272..5ef9bb5ef5d5b8dd45894af26ad7db5d32099c06 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,12 +1,16 @@
+pl 19
+       - bf: keyword.cc rm'd struct defs
+       - dots: support for feta dots.
+       - lots of font (feta) tjanges
+       - mf-to-table rewrite in python
+
+*********
 pl 18.jcn1
        - check for python, mf-deps fix
 
 pl 18
        - bf: Box[X_AXIS] = b
-       - sharp sign, natural sign
-       - linethickness parametric
        - bin/mf-deps.py script
-       - split into size/generic mf-files
        - moved beams out of font-en-tja into vette-beams.  
        - Made corresponding .cc changes.
        
diff --git a/TODO b/TODO
index 9caea6749732d902c62e29220be4212a11593949..85db7d288ddc49876eb342cc43a28fdb5e1a4ba0 100644 (file)
--- a/TODO
+++ b/TODO
@@ -6,12 +6,14 @@ done, or is an idea that I want to think about
 Most of the items are marked in the code as well, with full explanation. 
 grep for TODO and ugh/ugr
 
-       * Make general "spanning"-elements and "placer"-elements
+       * adapt Script for new font conventions
 
-       - naming Mozarella, Madeira, Muella, Fontaigna?
+       * AFM for font input.
 
-       - bf: abbrevs over whole note
+       * Make general "spanning"-elements and "placer"-elements
 
+       - naming Mozarella, Madeira, Muella, Fontaigna, Feta?
+       - bf: abbrevs over whole note
        - scoping for properties
 
        {       c4
@@ -109,7 +111,6 @@ languages:
        - check write errors
        - check read errors
        
-
        * placement of bar-numbers
 
 ******************
@@ -187,9 +188,6 @@ languages:
        * Redo fonts
        - adapt for multiple font sizes.
 
-       * Font support:
-       - mixed fontsizes
-
        * lines:
        - Ledger lines, should be separate item: Ledger_lines, Ledger_lines
        - set different line sizes / thicknesses
diff --git a/VERSION b/VERSION
index 1e754bd1e5bb7b2969a648b4ae4e42db7473c7bb..75990d3940b20c578bfccd3c1b73daf00c1b7998 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 TOPLEVEL_MAJOR_VERSION = 0
 TOPLEVEL_MINOR_VERSION = 1
-TOPLEVEL_PATCH_LEVEL = 18
-TOPLEVEL_MY_PATCH_LEVEL = .jcn2
+TOPLEVEL_PATCH_LEVEL = 19
+TOPLEVEL_MY_PATCH_LEVEL = 
 
 # use the above to send patches, always empty for released version:
index 9035162e8d012ac67c43f9f16263be1cab99336a..700b9ccf35606baf1483a54cb5c3b63681045849 100644 (file)
@@ -4,7 +4,7 @@
 
  fixme: python path
  fixme: error reporting
- fixem: why doesn't python have closures..
+ fixem: python sucks slightly: why doesn't it have closures?
 
 """
 
@@ -13,7 +13,7 @@ from regsub import * ;
 import sys;
 import os;
 
-input_re = compile('^ *input *\([^;]+\);')
+input_re = compile('^[ \t]*input *\([^;]+\);')
 postfixes = ['log', 'dvi', '2602gf', 'tfm']
 
 
@@ -53,10 +53,11 @@ class Targetdeps:
        lines = file.readlines()
        file.close()
        for line in lines:
-           if input_re.match ( line) <> -1:
+           if input_re.search (line) <> -1:
                self.checkdep( input_re.group(1))
 
     def target_string(self):
+       # ugh.  Closures, anyone?
        targets =  map (lambda x,y = self.basename: 'out/' + y + '.' + x, postfixes)
        depstring = reduce(lambda x,y: x + ' ' + y, self.depfiles) 
        dependencies = map (lambda x, y=depstring: x + ': ' + y, targets)
@@ -65,7 +66,7 @@ class Targetdeps:
 
 
 
-for file in sys.argv[1:]:
+for file in sys.argv[1:]: # skip programname
     t = Targetdeps(file)
     print t.target_string()
 
diff --git a/bin/mf-to-table.in b/bin/mf-to-table.in
deleted file mode 100644 (file)
index c7e5a25..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-#!@PERL@ -w
-# -*-perl-*-
-
-=head1 TODO
-
-rename me!
-
-Ugh . Perl sux. Anybody for Python?
-    
-=cut    
-
-$mf_to_table_version = 0.2;
-
-use Getopt::Long;
-
-sub last_conversion
-{
-    my @v = &versions;
-    return pop @v;
-}
-sub identify
-{
-    
-    print STDERR "This is mf-to-table " . $mf_to_table_version . "\n";
-}
-  
-sub usage
-{
-    print STDERR "Usage: mf-to-table [options] LOG..\n"
-    . "Generate mozarella metrics table from preparated metafont log\n\n"
-    . "Options:\n"
-    . "  -h, --help             print this help\n"
-    . "  -l, --ly=FILE          name output table\n"
-    . "  -t, --tex=FILE         name output tex chardefs\n"
-}
-
-sub make_table
-{
-    my $line;
-    my $indent = 0;
-    my $lineno=0;
-    while ($line = <IN>) {
-       $lineno++;
-       if ($line =~ /^@@/) {
-           $line =~ s/^@@(.*)@@/$1/;
-           chop ($line);
-           my @fields = split (/:/,$line);
-           my $label = $fields [0];
-           my $name = $fields [1];
-           print OUTLY "\t" x $indent;
-           if ($label eq "font") {
-               print OUTLY "% $name=\\symboltables {\n";
-               print OUTTEX "% $name\n";
-               $indent++;
-           } elsif ($label eq "group") {
-               print OUTLY "\"$name\" = \\table {\n";
-               print OUTTEX "% $name\n";
-               $indent++;
-           } elsif ($label eq "puorg") {
-               print OUTLY "}\n";
-               print OUTTEX "\n";
-               $indent--;
-           } elsif ($label eq "tnof") {
-               print OUTLY "%  } % $name\n";
-               $indent--;
-           } elsif ($label eq "char") {
-               my $c = $fields [2];
-               my $w = $fields [3];
-               my $h = $fields [4];
-               my $d = $fields [5];
-               my $b = $fields [6];
-               my $id = $fields [7];
-               my $texstr = $fields [8];
-               print OUTLY sprintf( "\"%s\"\t\"\\%s\"\t%.2f\\pt\t%.2f\\pt\t%.2f\\pt\t%.2f\\pt\n", $id, $texstr, -$b, $w, $h, -$d );
-               # remove % from generic chars, and save start charcode
-               my $defstr = "\\fetdef";
-               if ($texstr =~ /{%/) {
-                       $texstr =~ s/{%.*//;
-                       $texstr .= "start";
-                       $defstr = "\\def"
-               }
-               print OUTTEX sprintf( "%s\\%s{%d}\n", $defstr, $texstr, $c);
-           } else {
-               print STDERR "mf-to-table: $lineno: unknown label: \`$label\'\n";
-           }
-       }
-    }
-}
-      
-sub  set_files 
-{
-    if ($ARGV [0])  {
-       $infile = $ARGV[0];
-    } 
-    if (!(-f $infile) && !($infile =~ /\.log$/s )) {
-       $infile .= ".log";
-    }
-
-    if (defined($opt_ly)) {
-       $lyfile = $opt_ly;
-    }
-    else {
-       $lyfile = $infile;
-       $lyfile =~ s/\.log$/.ly/;
-    }
-    if (defined($opt_tex)) {
-       $texfile = $opt_tex;
-    }
-    else {
-       $texfile = $infile;
-       $texfile =~ s/\.log$/.tex/;
-    }
-
-    print STDERR "Input ", (($infile eq "-") ?"STDIN" : $infile), " .. \n";
-}
-
-sub do_one_arg
-{
-    set_files;
-
-    die "can't open \`$infile\'" unless open IN,$infile ;
-
-    die "can't open \`$lyfile\'" unless open OUTLY, ">$lyfile";
-    print OUTLY "% generated at " . localtime() . " from $infile\n";
-    print OUTLY "% changes will be lost\n\n";
-
-    die "can't open \`$texfile\'" unless open OUTTEX, ">$texfile";
-    print OUTTEX "% generated at " . localtime() . " from $infile\n";
-    print OUTTEX "% changes will be lost\n\n";
-    
-    make_table;
-
-    close IN;
-    close OUTLY;
-    close OUTTEX;
-}
-
-## "main"
-
-identify;
-
-#GetOptions ("help", "output=s", "from=i", "to=i", "minor=i", "edit", "show-rules");
-GetOptions ("help", "ly=s", "tex=s");
-
-if ($opt_help) {
-    usage();
-    $opt_help = 0;     # to extinguish typo check.
-    exit 0;
-}
-
-local ($infile,$lyfile,$texfile);
-my $processed_one=0;
-
-while (defined($ARGV[0])) {
-    do_one_arg;
-    shift @ARGV;
-    $processed_one = 1;
-}
-do_one_arg unless ($processed_one);
-
diff --git a/bin/mf-to-table.py b/bin/mf-to-table.py
new file mode 100644 (file)
index 0000000..1ebf973
--- /dev/null
@@ -0,0 +1,225 @@
+#!@PYTHON@
+
+import getopt
+from string import *
+import regex
+import regsub
+import os
+import sys
+import time
+begin_autometric_re = regex.compile('@{')
+end_autometric_re = regex.compile('@}')
+autometric_re = regex.compile('@{\([^@]*\)@}')
+version = '0.3'
+
+class File:
+    """silly wrapper for Python file object."""
+    def __init__(self,nm, mode='r'):
+       if nm:
+           self.file_ = open(nm, mode);
+       elif mode == 'w':
+           self.file_ = sys.stdout
+       else:
+           self.file_ = sys.stdin
+           
+       self.eof_ = 0;
+    def readline(self):
+       l=  self.file_.readline();
+       if not l:
+           self.eof_ = 1;
+       return l;
+    def write(self, str):
+       self.file_.write(str)
+    def eof(self):
+       return self.eof_
+    def close(self):
+       self.file_.close()
+    def __del__(self):
+       self.close();
+
+class Feta_file(File):
+    """Read Feta metrics from a metafont log-file."""
+    def read_autometricline(self):
+       line = ''
+       while end_autometric_re.search(line) == -1 and not self.eof():
+           suf = File.readline(self)
+           if begin_autometric_re.search(line) == -1:
+               line = ''
+           line = line + regsub.sub('\n','', suf)
+
+       if self.eof():
+          return ''
+
+       return line;
+    def readline(self):
+       """return what is enclosed in one @{ @} pair"""
+       line = '';
+       while autometric_re.match(line) == -1 and not self.eof():
+           line = self.read_autometricline()
+       if self.eof():
+           return '';
+       return autometric_re.group(1);
+    def __init__(self, nm):
+       File.__init__(self, nm)
+    def do_file(infile_nm):
+       infile = readline();
+
+#
+# FIXME: should parse output for {} to do indenting.
+#
+class Indentable_file(File):
+    """Output file with support for indentation"""
+    def __init__(self,nm, mode):
+       File.__init__(self,nm,mode)
+       self.current_indent_ = 0
+       self.delta_indent_ = 4
+    def writeline (self, str):
+       File.write(self, str)
+    def writeeol(self):
+       File.write(self, '\n')
+       File.write(self, ' '* self.current_indent_)
+
+    def indent(self):
+       self.current_indent_ = self.delta_indent_ + self.current_indent_;
+    def dedent(self):
+       self.current_indent_ = self.current_indent_ - self.delta_indent_;
+       if self.current_indent_ < 0:
+           raise 'Nesting!'
+
+    def write(self, str):
+       lines = split(str, '\n')
+       for l in lines[:-1]:
+           self.writeline(l)
+           self.writeeol()
+        self.writeline (lines[-1])
+
+class Ly_file(Indentable_file):
+    """extra provisions for mozarella quirks"""
+    def print_lit(self, str):
+       self.write('\"' + str + '\" ')
+
+    def print_dimen(self, str):
+       self.write( '%.2f' % atof(str) + '\\pt ');
+    
+    def neg_print_dimen(self, str):
+       self.write( '%.2f' % -atof(str) + '\\pt ');
+    def def_symbol(self, lily_id, tex_id, dims):
+       self.print_lit(lily_id)
+       self.print_lit('\\' + tex_id)
+
+       self.neg_print_dimen(dims [0])
+       self.print_dimen(dims [1])
+       self.neg_print_dimen(dims [2])
+       self.print_dimen(dims [3])
+       self.write('\n')
+       
+       
+class Log_reader:
+    """Read logs, destill info, and put into output files"""
+    def output_label(self, line):
+       if not line:
+           return;
+       tags = split(line, ':')
+       label = tags[0]
+       name = tags[1]
+       ly = self.lyfile        
+       if tags[0] == 'font':
+           ly.indent()
+           ly.write("% name=\\symboltables {\n")
+           self.texfile.write("% name\n")
+       elif label == "group":
+           ly.indent()
+           ly.print_lit(name)
+           ly.write(' = \\table {\n')
+           self.texfile.write("% " + name + "\n")
+       elif label == "puorg":
+           ly.dedent()
+           ly.write("}\n")
+           self.texfile.write("\n")
+       elif label == "tnof":
+           ly.dedent()
+           ly.write("%  } % $name\n")
+       elif label == "char":
+           code = tags[2]
+           id = tags [7]
+           texstr = tags [8]
+           
+           ly.def_symbol(id, texstr, tags[3:7])
+           
+           self.texfile.write("\\fetdef\\" + texstr + '{' + code + '}\n')
+       else:
+           raise 'unknown label: ' + label
+
+
+    def do_file(self,filenm):
+       self.lyfile.write('\n% input from ' + filenm + '\n')
+       self.texfile.write('\n% input from ' + filenm + '\n')   
+       feta = Feta_file(filenm)
+       while not feta.eof():
+           line = feta.readline()
+           self.output_label(line)
+       feta.close()
+
+    def __init__(self, lyfile_nm, texfile_nm):     
+       self.lyfile = Ly_file(lyfile_nm, 'w')
+       self.texfile = Indentable_file(texfile_nm, 'w')
+
+       headerstr = '% generated automatically by ' + program_id()
+       headerstr = headerstr + '\n% on ' + today_str()
+       headerstr = headerstr + '\n% Do not edit\n'
+
+       self.lyfile.write(headerstr)
+       self.texfile.write(headerstr)
+
+    def close(self):
+       self.lyfile.close()
+       self.texfile.close()
+
+    def __del__(self):
+       self.close()
+
+def today_str():
+    return time.asctime(time.localtime(time.time()))
+       
+def program_id():
+    return 'mf-to-table.py version ' + version;
+
+def identify():
+    sys.stdout.write(program_id() + '\n')
+    
+def help():
+    sys.stdout.write("Usage: mf-to-table [options] LOGFILEs\n"
+                + "Generate mozarella metrics table from preparated feta log\n\n"
+                + "Options:\n"
+                + "  -h, --help             print this help\n"
+                + "  -l, --ly=FILE          name output table\n"
+                + "  -t, --tex=FILE         name output tex chardefs\n")
+
+
+def main():
+    identify()
+    (options, files) = getopt.getopt(
+       sys.argv[1:], 'hl:t:', ['ly=', 'tex=', 'debug', 'help'])
+
+    lyfile_nm = texfile_nm = '';
+    for opt in options:
+       o = opt[0]
+       a = opt[1]
+       if o == '--ly' or o == '-l':
+           lyfile_nm = a
+       elif o == '--tex' or o == '-t':
+           texfile_nm = a
+       elif o== '--help' or o == '-h':
+           help()
+       elif o == '--debug':
+           debug_b = 1
+       else:
+           raise getopt.error
+
+    log_reader = Log_reader(lyfile_nm, texfile_nm)
+    for filenm in files:
+       log_reader.do_file(filenm)
+    log_reader.close()
+
+
+main()
index f9b425a4f9cb9e003b9d3296b6898a9fb29bcd03..9e40e3a6da66a0d2a365777f15ec1203ceee2bb3 100755 (executable)
--- a/configure
+++ b/configure
@@ -1021,6 +1021,7 @@ test -n "$FIND" || FIND="error"
 
 
 
+
 
 
 for ac_prog in bison
@@ -1028,7 +1029,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1032: checking for $ac_word" >&5
+echo "configure:1033: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1062,7 +1063,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1066: checking for $ac_word" >&5
+echo "configure:1067: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1096,7 +1097,7 @@ do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1100: checking for $ac_word" >&5
+echo "configure:1101: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1128,7 +1129,7 @@ test -n "$MAKE" || MAKE="error"
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1132: checking for $ac_word" >&5
+echo "configure:1133: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1157,12 +1158,44 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
+# Extract the first word of "python", so it can be a program name with args.
+set dummy python; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1165: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$PYTHON" in
+  /*)
+  ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_PYTHON="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="error"
+  ;;
+esac
+fi
+PYTHON="$ac_cv_path_PYTHON"
+if test -n "$PYTHON"; then
+  echo "$ac_t""$PYTHON" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
 for ac_prog in pod2man
 do
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1166: checking for $ac_word" >&5
+echo "configure:1199: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_PODMAN'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1198,7 +1231,7 @@ if test "x$TEXPREFIX" = xauto ; then
     
 
     echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6
-echo "configure:1202: checking TeX/MF root dir directory" >&5    
+echo "configure:1235: checking TeX/MF root dir directory" >&5    
 
     find_root_prefix="$prefix"
     
@@ -1239,7 +1272,7 @@ if test "x$MFDIR" = xauto; then
     
     
     echo $ac_n "checking MF input directory""... $ac_c" 1>&6
-echo "configure:1243: checking MF input directory" >&5    
+echo "configure:1276: checking MF input directory" >&5    
     find_dirdir=`(cd $find_texprefix; 
       $FIND ./ -type d -a -name source -print |sort|head -1|sed 's#^\./##')`
     
@@ -1264,7 +1297,7 @@ if test "x$TEXDIR" = xauto ; then
     
     
     echo $ac_n "checking TeX input directory""... $ac_c" 1>&6
-echo "configure:1268: checking TeX input directory" >&5    
+echo "configure:1301: checking TeX input directory" >&5    
     find_dirdir=`(cd $find_texprefix; 
       $FIND ./ -type d -a -name tex -print |sort|head -1|sed 's#^\./##')`
     
@@ -1316,6 +1349,15 @@ fi
        fi
 
 
+       if test $PYTHON = "error" 
+       then
+               
+    echo "configure: warning: can't find python. You should install Python" 1>&2
+    warn_b=yes
+
+       fi
+
+
        if test $PODMAN = "error" 
        then
                
@@ -1367,7 +1409,7 @@ else
 fi
 
 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1371: checking how to run the C++ preprocessor" >&5
+echo "configure:1413: checking how to run the C++ preprocessor" >&5
 if test -z "$CXXCPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1380,12 +1422,12 @@ ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $L
 cross_compiling=$ac_cv_prog_cxx_cross
   CXXCPP="${CXX-g++} -E"
   cat > conftest.$ac_ext <<EOF
-#line 1384 "configure"
+#line 1426 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1405,17 +1447,17 @@ echo "$ac_t""$CXXCPP" 1>&6
 
 ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:1409: checking for FlexLexer.h" >&5
+echo "configure:1451: checking for FlexLexer.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1414 "configure"
+#line 1456 "configure"
 #include "confdefs.h"
 #include <FlexLexer.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1611,6 +1653,7 @@ s%@BISON@%$BISON%g
 s%@FLEX@%$FLEX%g
 s%@LN@%$LN%g
 s%@PERL@%$PERL%g
+s%@PYTHON@%$PYTHON%g
 s%@ZIP@%$ZIP%g
 s%@TEXPREFIX@%$TEXPREFIX%g
 s%@TEXDIR@%$TEXDIR%g
index 1c2d0e37505ab65433eaa10b18c1c2dcf83c66a4..a86335e4cd21210a79d58db22d1003f5671d40f0 100644 (file)
@@ -1,24 +1,46 @@
-% generated at Thu Oct  2 14:54:38 1997 from out/font-en-tja16.log
-% changes will be lost
+% generated automatically by  mf-to-table.py version 0.3
+% Do not edit
 
-% font-en-tja=\symboltables {
-       "balls" = \table {
-               "0"     "\wholeball"    -0.00\pt        8.28\pt 4.60\pt -0.00\pt
-               "1"     "\halfball"     -0.00\pt        5.76\pt 4.60\pt -0.00\pt
-               "2"     "\quartball"    -0.00\pt        5.52\pt 4.60\pt -0.00\pt
-               "-1"    "\breveball"    -0.00\pt        8.00\pt 4.00\pt -0.00\pt
-               "-2"    "\longaball"    -0.00\pt        8.00\pt 4.00\pt -0.00\pt
-               }
-       "almostrests" = \table {
-               "4"     "\quartrest"    -0.00\pt        4.00\pt 16.00\pt        -0.00\pt
-               "-2"    "\eighthrest"   -0.00\pt        5.33\pt 7.47\pt -0.00\pt
-               "-2"    "\sixteenthrest"        -0.00\pt        5.33\pt 11.47\pt        -0.00\pt
-               "-2"    "\thirtysecondrest"     -0.00\pt        5.33\pt 15.47\pt        -0.00\pt
-               "-2"    "\sixtyfourthrest"      -0.00\pt        5.33\pt 19.47\pt        -0.00\pt
-               "-2"    "\hundredtwentyeighthrest"      -0.00\pt        5.33\pt 23.47\pt        -0.00\pt
-               }
-       "foobars" = \table {
-               "1"     "\sharp"        -0.00\pt        4.40\pt 6.00\pt -6.00\pt
-               "0"     "\natural"      -0.00\pt        2.67\pt 6.00\pt -6.00\pt
-               }
-       %  } % font-en-tja
+% input from out/font-en-tja16.log
+% name=\symboltables {
+    "rests"  = \table {
+        "0" "\wholerest" -0.00\pt 6.00\pt 2.00\pt 4.00\pt 
+        "1" "\halfrest" -0.00\pt 6.00\pt -0.00\pt 2.00\pt 
+        "0o" "\outsidewholerest" -2.00\pt 8.00\pt 2.00\pt 4.00\pt 
+        "1o" "\outsidehalfrest" -2.00\pt 8.00\pt -0.00\pt 2.00\pt 
+        "2" "\quartrest" -0.00\pt 4.00\pt 3.00\pt 14.00\pt 
+        "3" "\eighthrest" -0.00\pt 5.33\pt 4.00\pt 11.47\pt 
+        "4" "\sixteenthrest" -0.00\pt 5.33\pt -0.00\pt 11.47\pt 
+        "5" "\thirtysecondrest" -0.00\pt 5.33\pt -0.00\pt 15.47\pt 
+        "6" "\sixtyfourthrest" -0.00\pt 5.33\pt -0.00\pt 19.47\pt 
+        "7" "\hundredtwentyeighthrest" -0.00\pt 5.33\pt -0.00\pt 23.47\pt 
+        }
+    "accidentals"  = \table {
+        "1" "\sharp" -0.00\pt 4.40\pt -6.00\pt 6.00\pt 
+        "0" "\natural" -0.00\pt 2.67\pt -6.00\pt 6.00\pt 
+        "-1" "\flat" -0.00\pt 3.00\pt -2.00\pt 8.00\pt 
+        "-2" "\flatflat" -0.00\pt 6.00\pt -2.00\pt 8.00\pt 
+        "2" "\sharpsharp" -0.00\pt 4.00\pt -2.00\pt 2.00\pt 
+        }
+    "dots"  = \table {
+        "dot" "\dot" -0.00\pt 1.80\pt -0.90\pt 0.90\pt 
+        }
+    "balls"  = \table {
+        "0" "\wholeball" -0.00\pt 8.28\pt -2.30\pt 2.30\pt 
+        "1" "\halfball" -0.00\pt 5.76\pt -2.30\pt 2.30\pt 
+        "2" "\quartball" -0.00\pt 5.52\pt -2.30\pt 2.30\pt 
+        "-1" "\breveball" -0.00\pt 8.00\pt -2.00\pt 2.00\pt 
+        "-2" "\longaball" -0.00\pt 8.00\pt -2.00\pt 2.00\pt 
+        }
+    "foobars"  = \table {
+        "ufermata" "\ufermata" -6.20\pt 6.20\pt -0.00\pt 6.80\pt 
+        "dfermata" "\dfermata" -6.20\pt 6.20\pt -6.80\pt 0.00\pt 
+        "accent" "\accent" -3.60\pt 3.60\pt -2.00\pt 2.00\pt 
+        "staccato" "\staccato" -0.50\pt 0.50\pt -0.50\pt 0.50\pt 
+        "ustaccatissimo" "\ustaccatissimo" -0.80\pt 0.80\pt -0.20\pt 4.00\pt 
+        "dstaccatissimo" "\dstaccatissimo" -0.80\pt 0.80\pt -4.00\pt 0.20\pt 
+        "tenuto" "\tenuto" -3.60\pt 3.60\pt -0.24\pt 0.24\pt 
+        "umarcato" "\umarcato" -2.00\pt 2.00\pt -0.00\pt 4.40\pt 
+        "dmarcato" "\dmarcato" -2.00\pt 2.00\pt -4.40\pt 0.00\pt 
+        }
+    %  } % $name
index c64c12f1280f14096f6fc0a81cfc2a57b4657d58..1261eaa3759b0354c5d2efcf72fc377a1bf0377d 100644 (file)
@@ -1,24 +1,46 @@
-% generated at Thu Oct  2 14:54:38 1997 from out/font-en-tja20.log
-% changes will be lost
+% generated automatically by  mf-to-table.py version 0.3
+% Do not edit
 
-% font-en-tja=\symboltables {
-       "balls" = \table {
-               "0"     "\wholeball"    -0.00\pt        10.35\pt        5.75\pt -0.00\pt
-               "1"     "\halfball"     -0.00\pt        7.20\pt 5.75\pt -0.00\pt
-               "2"     "\quartball"    -0.00\pt        6.91\pt 5.75\pt -0.00\pt
-               "-1"    "\breveball"    -0.00\pt        10.00\pt        5.00\pt -0.00\pt
-               "-2"    "\longaball"    -0.00\pt        10.00\pt        5.00\pt -0.00\pt
-               }
-       "almostrests" = \table {
-               "4"     "\quartrest"    -0.00\pt        5.00\pt 20.00\pt        -0.00\pt
-               "-2"    "\eighthrest"   -0.00\pt        6.67\pt 9.33\pt -0.00\pt
-               "-2"    "\sixteenthrest"        -0.00\pt        6.67\pt 14.33\pt        -0.00\pt
-               "-2"    "\thirtysecondrest"     -0.00\pt        6.67\pt 19.33\pt        -0.00\pt
-               "-2"    "\sixtyfourthrest"      -0.00\pt        6.67\pt 24.33\pt        -0.00\pt
-               "-2"    "\hundredtwentyeighthrest"      -0.00\pt        6.67\pt 29.33\pt        -0.00\pt
-               }
-       "foobars" = \table {
-               "1"     "\sharp"        -0.00\pt        5.50\pt 7.50\pt -7.50\pt
-               "0"     "\natural"      -0.00\pt        3.33\pt 7.50\pt -7.50\pt
-               }
-       %  } % font-en-tja
+% input from out/font-en-tja20.log
+% name=\symboltables {
+    "rests"  = \table {
+        "0" "\wholerest" -0.00\pt 7.50\pt 2.50\pt 5.00\pt 
+        "1" "\halfrest" -0.00\pt 7.50\pt -0.00\pt 2.50\pt 
+        "0o" "\outsidewholerest" -2.50\pt 10.00\pt 2.50\pt 5.00\pt 
+        "1o" "\outsidehalfrest" -2.50\pt 10.00\pt -0.00\pt 2.50\pt 
+        "2" "\quartrest" -0.00\pt 5.00\pt 3.75\pt 17.50\pt 
+        "3" "\eighthrest" -0.00\pt 6.67\pt 5.00\pt 14.33\pt 
+        "4" "\sixteenthrest" -0.00\pt 6.67\pt -0.00\pt 14.33\pt 
+        "5" "\thirtysecondrest" -0.00\pt 6.67\pt -0.00\pt 19.33\pt 
+        "6" "\sixtyfourthrest" -0.00\pt 6.67\pt -0.00\pt 24.33\pt 
+        "7" "\hundredtwentyeighthrest" -0.00\pt 6.67\pt -0.00\pt 29.33\pt 
+        }
+    "accidentals"  = \table {
+        "1" "\sharp" -0.00\pt 5.50\pt -7.50\pt 7.50\pt 
+        "0" "\natural" -0.00\pt 3.33\pt -7.50\pt 7.50\pt 
+        "-1" "\flat" -0.00\pt 3.75\pt -2.50\pt 10.00\pt 
+        "-2" "\flatflat" -0.00\pt 7.50\pt -2.50\pt 10.00\pt 
+        "2" "\sharpsharp" -0.00\pt 5.00\pt -2.50\pt 2.50\pt 
+        }
+    "dots"  = \table {
+        "dot" "\dot" -0.00\pt 2.25\pt -1.13\pt 1.13\pt 
+        }
+    "balls"  = \table {
+        "0" "\wholeball" -0.00\pt 10.35\pt -2.88\pt 2.88\pt 
+        "1" "\halfball" -0.00\pt 7.20\pt -2.88\pt 2.88\pt 
+        "2" "\quartball" -0.00\pt 6.91\pt -2.88\pt 2.88\pt 
+        "-1" "\breveball" -0.00\pt 10.00\pt -2.50\pt 2.50\pt 
+        "-2" "\longaball" -0.00\pt 10.00\pt -2.50\pt 2.50\pt 
+        }
+    "foobars"  = \table {
+        "ufermata" "\ufermata" -7.75\pt 7.75\pt -0.00\pt 8.50\pt 
+        "dfermata" "\dfermata" -7.75\pt 7.75\pt -8.50\pt 0.00\pt 
+        "accent" "\accent" -4.50\pt 4.50\pt -2.50\pt 2.50\pt 
+        "staccato" "\staccato" -0.63\pt 0.63\pt -0.63\pt 0.63\pt 
+        "ustaccatissimo" "\ustaccatissimo" -1.00\pt 1.00\pt -0.20\pt 5.00\pt 
+        "dstaccatissimo" "\dstaccatissimo" -1.00\pt 1.00\pt -5.00\pt 0.20\pt 
+        "tenuto" "\tenuto" -4.50\pt 4.50\pt -0.30\pt 0.30\pt 
+        "umarcato" "\umarcato" -2.50\pt 2.50\pt -0.00\pt 5.50\pt 
+        "dmarcato" "\dmarcato" -2.50\pt 2.50\pt -5.50\pt 0.00\pt 
+        }
+    %  } % $name
index 2be017c49f87d76c86d613118b3cd49470867e5f..4e77e6ac0bae2fc853f12160b414501a64db40e7 100644 (file)
@@ -11,18 +11,18 @@ table_sixteen=
    % index TeXstring,  xmin xmax ymin ymax
 
     "scripts" = \table {
-       "fermata" "\fermata"            0.0\pt 0.0\pt   0.0\pt 6.0\pt
-       "-fermata" "\ifermata"          0.0\pt 0.0\pt   -6.0\pt 0.0\pt
+       "fermata" "\ufermata"           0.0\pt 0.0\pt   0.0\pt 6.0\pt
+       "-fermata" "\dfermata"          0.0\pt 0.0\pt   -6.0\pt 0.0\pt
        "portato" "\portato"            0.0\pt 4.0\pt   0.0\pt  2.0\pt
        "-portato" "\iportato"          0.0\pt 4.0\pt   -2.0\pt 0.0\pt
-       "tenuto" "\tenuto"                      0.0\pt 4.0\pt   -1.0\pt 1.0\pt
-       "-tenuto" "\itenuto"            0.0\pt 4.0\pt   -1.0\pt 1.0\pt
-       "sforzato" "\sforzato"          -0.8\pt 4.0\pt  -1.92\pt 1.92\pt
-       "marcato" "\marcato"            0.0\pt 4.0\pt   0.0\pt  4.0\pt
-       "-marcato" "\imarcato"          0.0\pt 4.0\pt   -4.0\pt 0.0\pt
+       "tenuto" "\utenuto"                     0.0\pt 4.0\pt   -1.0\pt 1.0\pt
+       "-tenuto" "\dtenuto"            0.0\pt 4.0\pt   -1.0\pt 1.0\pt
+       "sforzato" "\accent"            -0.8\pt 4.0\pt  -1.92\pt 1.92\pt
+       "marcato" "\umarcato"           0.0\pt 4.0\pt   0.0\pt  4.0\pt
+       "-marcato" "\dmarcato"          0.0\pt 4.0\pt   -4.0\pt 0.0\pt
        "staccato" "\staccato"          0.0\pt  0.0\pt  -1.1\pt 1.1\pt
-       "staccatissimo" "\staccatissimo"        0.0\pt  0.0\pt  0.0\pt  1.0\pt
-       "-staccatissimo" "\istaccatissimo"      0.0\pt  0.0\pt  0.0\pt  1.0\pt
+       "staccatissimo" "\ustaccatissimo"       0.0\pt  0.0\pt  0.0\pt  1.0\pt
+       "-staccatissimo" "\dstaccatissimo"      0.0\pt  0.0\pt  0.0\pt  1.0\pt
        "upbow" "\upbow"                        -1.0\pt 6.0\pt  0.0\pt  5.0\pt
        "downbow" "\downbow"            0.0\pt  5.0\pt  0.0\pt 7.5\pt
        "back" "\backorfront"           0.0\pt  6.0\pt  0.0\pt  3.0\pt
index b39f16334abe4541f778ac5fefdffa5b964d2912..5c62d243112442c5e9c8c57ad4036e1381a41056 100644 (file)
@@ -12,18 +12,18 @@ table_twenty =
     % index TeXstring,         xmin xmax ymin ymax
 
     "scripts" = \table {
-       "fermata" "\fermata"            0.0\pt 0.0\pt   0.0\pt 6.0\pt
-       "-fermata" "\ifermata"          0.0\pt 0.0\pt   -6.0\pt 0.0\pt
+       "fermata" "\ufermata"           0.0\pt 0.0\pt   0.0\pt 6.0\pt
+       "-fermata" "\dfermata"          0.0\pt 0.0\pt   -6.0\pt 0.0\pt
        "portato" "\portato"            0.0\pt 4.0\pt   0.0\pt  2.0\pt
        "-portato" "\iportato"          0.0\pt 4.0\pt   -2.0\pt 0.0\pt
-       "tenuto" "\tenuto"                      0.0\pt 4.0\pt   -1.0\pt 1.0\pt
-       "-tenuto" "\itenuto"            0.0\pt 4.0\pt   -1.0\pt 1.0\pt
-       "sforzato" "\sforzato"          -0.8\pt 4.0\pt  -1.92\pt 1.92\pt
-       "marcato" "\marcato"            0.0\pt 4.0\pt   0.0\pt  4.0\pt
-       "-marcato" "\imarcato"          0.0\pt 4.0\pt   -4.0\pt 0.0\pt
+       "tenuto" "\utenuto"                     0.0\pt 4.0\pt   -1.0\pt 1.0\pt
+       "-tenuto" "\dtenuto"            0.0\pt 4.0\pt   -1.0\pt 1.0\pt
+       "sforzato" "\accent"            -0.8\pt 4.0\pt  -1.92\pt 1.92\pt
+       "marcato" "\umarcato"           0.0\pt 4.0\pt   0.0\pt  4.0\pt
+       "-marcato" "\dmarcato"          0.0\pt 4.0\pt   -4.0\pt 0.0\pt
        "staccato" "\staccato"          0.0\pt  0.0\pt  -1.1\pt 1.1\pt
-       "staccatissimo" "\staccatissimo"        0.0\pt  0.0\pt  0.0\pt  1.0\pt
-       "-staccatissimo" "\istaccatissimo"      0.0\pt  0.0\pt  0.0\pt  1.0\pt
+       "staccatissimo" "\ustaccatissimo"       0.0\pt  0.0\pt  0.0\pt  1.0\pt
+       "-staccatissimo" "\dstaccatissimo"      0.0\pt  0.0\pt  0.0\pt  1.0\pt
        "upbow" "\upbow"                        -1.0\pt 6.0\pt  0.0\pt  5.0\pt
        "downbow" "\downbow"            0.0\pt  5.0\pt  0.0\pt 7.5\pt
        "back" "\backorfront"           0.0\pt  6.0\pt  0.0\pt  3.0\pt
index 4f659db61e461b6cf7c65cd1d3a415b91dd689a8..b724a49ef7a316b176aaf9b22fc8c8b1664c3283 100644 (file)
@@ -11,25 +11,33 @@ TestedFeatures      font-en-tja
                \octave c';
                \meter 4/4;
                a\longa
-               a\breve
+               a\breve |
                c1 g c' a'
                c2 g c' a'
-               c4 g c' a'
-               a\ppp a\pp a\p a\mp a\mf a\f a\ff a\fff
-               a\fp a\sf a\sfz a % a\fz a\rf
+               c4 g c' a' |
+               a\ppp a\pp a\p a\mp |
+               a\mf a\f a\ff a\fff|
+               a\fp a\sf a\sfz a | % a\fz a\rf
                [c8 c] [a' a']
-%              [c a'] [a' c]
-               [c d e f] [a' g' f' e']
-               [cis' dis' c' d'] [cisis' disis' ceses' deses']
-                 r1 r2 r4 r8 r16 r32 r64 r128
-       }
+               [c a'] [a' c] |
+               [c d e f] [as' ges' f' e']
+               [cis' dis' c' des'] [cisis' disis' ceses' deses'] |
+                 r1 r2 r4 r8 r16 r32 r64 r128 r128 |
+                 c'1.^\fermata c'1._\fermata
+               \multi 2 < { \stemup r1} {\stemdown c''}>
+               \multi 2 < { \stemup c1 } {\stemdown r1}>               
+               \stemboth
+               
+               c4_. c4-> c4^^ c4_^ 
+               c4 _| c4^|
+               }
        \paper{ 
-           \paper_twenty
            gourlay_maxmeasures =5.;
-           \output "lelie20.tex";
        }
        \paper{ 
+           \paper_twenty
            gourlay_maxmeasures =5.;
+           \output "lelie20.tex";
        }
 % oeps
        \midi{ }
index 783f85e04920698da40ca9c3dce199a545f1fce1..dc8420e3e3b3e7a4a1421286c7bc576d5fb143ee 100644 (file)
@@ -1,6 +1,6 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 1
-PATCH_LEVEL = 18
+PATCH_LEVEL = 19
 # use to send patches, always empty for released version:
 # include separator: ".postfix", "-pl" makes rpm barf
 
index 946b74b19576e06a456235c28b6ec36965a0daab..44e06c0b23bc9336a0fd96eef051f910024738c2 100644 (file)
@@ -22,13 +22,29 @@ Dots::do_post_processing ()
 {
   if (!(position_i_ % 2))
     position_i_ ++;
+  if (!no_dots_i_)
+    {
+      transparent_b_ = true;
+      set_empty(true);
+    }
 }
 
 Molecule* 
 Dots::brew_molecule_p () const
 {
-  Atom d = paper ()->lookup_l ()->dots (no_dots_i_);
-  Molecule *out = new Molecule (Atom (d));
+  Molecule *out = new Molecule;
+  Atom fill = paper()->lookup_l ()->fill (Box(Interval(0,0),Interval(0,0)));
+  out->add(fill);
+
+  Atom d = paper ()->lookup_l ()->dots (0);
+
+  Real dw = d.dim_[X_AXIS].length();
+  d.translate(-dw,X_AXIS);
+  for (int i=no_dots_i_; i--; )
+    {
+      d.translate(2*dw,X_AXIS);
+      out->add (d);
+    }
   Real inter_f = paper ()->internote_f ();
   out->translate (inter_f * position_i_, Y_AXIS);
   return out;
index ebedc63b2ba61d1507910e79457d46b5f628b581..43c87d95b5573877bfa4d7bcb6793d9a79274302 100644 (file)
@@ -4,9 +4,10 @@
 
 #include <stdlib.h>
 
-#include "my-lily-lexer.hh"
+
 #include "keyword.hh"
 
+
 /* for qsort */
 int
       tabcmp (void const * p1, void const * p2)
@@ -32,10 +33,10 @@ Keyword_table::Keyword_table (Keyword_ent *tab)
 int
 Keyword_table::lookup (char const *s) const
 {
-  int     lo,
-          hi,
-          cmp,
-          result;
+  int lo;
+  int hi;
+  int cmp;
+  int result;
   lo = 0;
   hi = maxkey;
 
index 65c5ad7253c070cbdd0d3ad43f9ebb631681cf85..2d24d07959568fa89eb61694559f1a45e28dd3dc 100644 (file)
@@ -5,7 +5,7 @@
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
 */
-
+#include "dimen.hh"
 #include "local-key-item.hh"
 #include "molecule.hh"
 #include "scalar.hh"
@@ -58,40 +58,48 @@ Local_key_item::do_pre_processing()
 Molecule*
 Local_key_item::brew_molecule_p() const
 {
-  Molecule* output = new Molecule;
-  Molecule*octmol = 0;
+  Molecule*output = new Molecule;
+
+  Molecule *octave_mol_p = 0;
   int lastoct = -100;
   for  (int i = 0; i <  accs.size(); i++) 
     {
       // do one octave
       if (accs[i].octave_i_ != lastoct) 
        {
-         if (octmol)
+         if (octave_mol_p)
            {
              Real dy =lastoct*7*paper()->internote_f ();
-             octmol->translate (dy, Y_AXIS);
-             output->add (*octmol);
-             delete octmol;
+             octave_mol_p->translate (dy, Y_AXIS);
+             output->add (*octave_mol_p);
+             delete octave_mol_p;
            }
-         octmol= new Molecule;
+         octave_mol_p= new Molecule;
        }
       lastoct = accs[i].octave_i_;
       
       Real dy = (accs[i].name_i_ + c0_position) * paper()->internote_f ();
       Atom a (paper()->lookup_l ()->accidental (accs[i].accidental_i_));
+      a.dim_[X_AXIS] += 1 PT; // todo
       a.translate (dy, Y_AXIS);
       Molecule m(a);
-      octmol->add_at_edge (X_AXIS, RIGHT, m);
+      octave_mol_p->add_at_edge (X_AXIS, RIGHT, m);
     }
 
-  if (octmol)
+  if (octave_mol_p)
     {
       Real dy =lastoct*7*paper()->internote_f ();
-      octmol->translate (dy, Y_AXIS);
-      output->add (*octmol);
-      delete octmol;
+      octave_mol_p->translate (dy, Y_AXIS);
+      output->add (*octave_mol_p);
+      delete octave_mol_p;
+    }
+  
+ if (accs.size()) 
+    {
+      Box b(Interval (0, paper()->internote_f ()), Interval (0,0));
+      Molecule m (paper()->lookup_l ()->fill (b));
+      output->add_at_edge (X_AXIS, RIGHT, m);
     }
-
   Interval head_width=itemlist_width (support_items_);
   output->translate (-output->extent().x ().right + head_width.left , X_AXIS);
   
index f67efd08bb63b88a5adf9712b32b663ae715c49f..64153dc8e704a66ec040a171c165e97db0a1e3cb 100644 (file)
@@ -134,12 +134,7 @@ Lookup::clef (String s) const
 Atom
 Lookup::dots (int j) const
 {
-  if (j>3) 
-    {
-      j = 3;
-      warning ("max 3 dots");  // todo
-    }
-  return (*symtables_)("dots")->lookup (j);
+  return (*symtables_)("dots")->lookup ("dot");
 }
 
 Atom
index 0a7dc7419a8b8cfe7b847a910743b7eaf94f904f..e11eef1489d230da2d852e94d8aca89441b2b534 100644 (file)
@@ -18,7 +18,7 @@ void
 Rest::do_add_processing ()
 {
   if (balltype_i_ == 0)
-    position_i_ += 6;
+    position_i_ += 4;
   else if (balltype_i_ == 1)
     position_i_ += 4;
   Rhythmic_head::do_add_processing ();
index 857917a619e599579ddb108eedf88e972cfb2141..fbffa124b8c91e6e1c4e50514290f9014f659357 100644 (file)
@@ -1,7 +1,7 @@
 Begin3
 Title: LilyPond
-Version: 0.1.18
-Entered-date: 26SEP97
+Version: 0.1.19
+Entered-date: 07OCT97
 Description:   LilyPond is the GNU Project music typesetter. This
                program converts music definition files into
                visual or auditive output: it can typeset formatted
@@ -14,8 +14,8 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys)
        jan@digicash.com (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps
-       395k lilypond-0.1.18.tar.gz 
+       395k lilypond-0.1.19.tar.gz 
 Original-site: pcnov095.win.tue.nl /pub/lilypond/
-       395k lilypond-0.1.18.tar.gz 
+       395k lilypond-0.1.19.tar.gz 
 Copying-policy: GPL
 End
index 9797e390d49c8f6400db17d0e9666d384aad48d6..e5695f922ef5a388cb382de17244b30bb6bc0e1d 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 0.1.18
+Version: 0.1.19
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.18.tar.gz
+Source0: pcnov095.win.tue.nl:/pub/lilypond/lilypond-0.1.19.tar.gz
 Summary: A preprocessor to make TeX typeset music.
 URL: http://www.stack.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>
index 9168cce4ea3d5d20b1eb3c36b1652ea03653da7d..30a6654f79540bc2470b00748cea70c0142caa75 100644 (file)
@@ -41,7 +41,7 @@ $(outdir)/%.log: %.mf
        rm $(basename $< ).*gf
 
 $(lyout)/%.ly $(texout)/%.tex: $(outdir)/%.log
-       mf-to-table -l $(lyout)/$(<F:.log=.ly) -t $(texout)/$(<F:.log=.tex) $<
+       mf-to-table --ly $(lyout)/$(<F:.log=.ly) --tex $(texout)/$(<F:.log=.tex) $<
 
 localinstall:
        $(INSTALL) -d $(MFDIR)/lilypond
@@ -54,7 +54,7 @@ localuninstall:
 $(outdir)/mfdeps: $(FONT_FILES)
 # do something silly to avoid barfs if python not installed.
        echo > $@
-       mf-deps  $^ >> $@
+       $(depth)/bin/$(outdir)/mf-deps  $^ >> $@
 
 # dependencies:
 #
diff --git a/mf/TODO b/mf/TODO
index b69830eee9b30a08191f56cfdb778f80dd9f176b..111de76aaf3f22939215b036b097191af187a651 100644 (file)
--- a/mf/TODO
+++ b/mf/TODO
@@ -1,13 +1,21 @@
 
-       - move to OpusTeX fonts
-       - make own font-en-tja{10,11,13,16,20} files
-       - opustex/lilypond fonts from the same generic driver files
-       - LilyPond fonts should generate TFM spacing info
-       - include important spacing dims in TFM
+       - y-refpoint for rests should be the 4th staffline (gclef: b')
+       - more symbols
+         * flags
+         * clefs
+         * some scripts:
+           - {up, down}bow
+           - toe/heel
+           - piano pedals,
+           - braces.
+           - trills
+         * coda signs.
+         * 0 - 9
+
+       - move to OpusTeX fonts ?  (no!)
+       - include important spacing dims in TFM? 
        - lilyrules.mf for different rules (lines) ?
        - check out Adobe Sonata/Petrucci font layout.  They are the
 standard for Music fonts
-       - rewrite : make a metafont iso font
-       - perl script to generate dependencies for mf 
-l
+       - hack up GS to do round pixels iso. square pixels.
 
index e178978ddd1f754ff45c0a09bf87d313468ede20..6cffec3caacf9ec68e7c6585b0281bda427413b7 100644 (file)
 % to automate generation of lily tables and tex backend
 % parsed by the mf-to-table script
 
+
+
 % font or database?
 def fet_beginfont(expr name,size) =
        font_identifier:=name&decimal size;
        font_size size;
-       message "@@font:"&name&":"&decimal size&"@@";
+       message "@{font:"&name&":"&decimal size&"@}";
        message "";
        enddef;
 
 def fet_endfont(expr name) =
-       message "@@tnof:"&name&"@@";
+       message "@{tnof:"&name&"@}";
        message "";
        enddef;
 
 % group or table?
 def fet_begingroup(expr name) =
-       message "@@group:"&name&"@@";
+       message "@{group:"&name&"@}";
        message "";
        enddef;
 
 def fet_endgroup(expr name) =
-       message "@@puorg:"&name&"@@";
+       message "@{puorg:"&name&"@}";
        message "";
        enddef;
-       
+
+def autometric_output_char=
+       message "@{char:"&charnamestr&":"&decimal charcode&":"&decimal charbp&":"&decimal charwd&":"&decimal chardp&":"&decimal charht&":"&idstr&":"&texstr&"@}";
+enddef;
+
+
+%breapth, width, depth, height
+%     breapth  x-depth
+def set_char_box(expr b_sharp, w_sharp, d_sharp,h_sharp) = 
+       save scharbp, scharht, scharwd, schardp;
+
+       % some paranoia if someone calls set_char_box(charwd, charbp, .. )
+       scharbp := b_sharp;
+       scharht := h_sharp;
+       schardp := d_sharp;
+       scharwd := w_sharp;
+
+       charbp := scharbp;
+       charht := scharht;
+       chardp := schardp;
+       charwd := scharwd;
+
+       w := hround(w_sharp *hppp);
+       b := hround(b_sharp *hppp);
+       h := hround(h_sharp *vppp);
+       d := hround(d_sharp *vppp);
+enddef;
+
+def no_dimen_beginchar(expr c) =
+       begingroup
+       charcode := if known c: byte c else: 0; fi;
+       charic := 0;
+       clearxy;
+       clearit;
+       clearpen;
+       scantokens extra_beginchar;
+enddef;
+
 % starts just as plain mf's beginchar:
-%     charcode, width, height, depth
+%     charcode, 
 % and then adds:
 %     charname see below
-%     breapth  x-depth
 %     id       index in lily's table
 %     texstr   name of tex macro in lily's table and tex backend
-def fet_beginchar(expr code,w,h,d,b,name,id,texstr) =
-       message "@@char:"&name&":"&decimal code&":"&decimal w&":"&decimal h&":"&decimal d&":"&decimal b&":"&id&":"&texstr&"@@";
-       beginchar(code,w,h,d) name;
+
+% the dims are uninitialised; you should use set_char_box manually.
+def fet_beginchar(expr name, id_lit, texstr_lit) =
+       save texstr, idstr, charnamestr;
+       save charbp;
+       save w,b,h,d;
+       string texstr, idstr, charnamestr;
+       texstr := texstr_lit;
+       charnamestr := name;
+       idstr := id_lit;
+
+       no_dimen_beginchar(incr code) name;
        enddef;
 
+
+def makebox_with_breapth(text r) = 
+       for y = -d, 0, h: r((-b, y),(w,y)); endfor
+       for x = -b, 0, w: r((x, -d),(x, h)); endfor
+enddef;
+
+%
+% override plain endchar.  We want a different box. 
+%
+def breapth_endchar =
+       scantokens extra_endchar;
+       if proofing > 0: makebox_with_breapth(proofrule); fi
+       chardx := w + b;
+       shipit;
+       endgroup
+enddef;
+
+def fet_endchar=
+       autometric_output_char;
+       breapth_endchar;
+       enddef;
index 305660525b93fe5d2baca8b084d274d68fca03ba..c41f5d0d528e0783cd1d20e8d526b2979e2d2872 100644 (file)
@@ -1,83 +1,72 @@
 % bolletjes.mf
 % part of LilyPond's pretty-but-neat music font
-% third try at bolletjes
-% most beautiful bolletjes are pronounced, not circular, 
+
+% most beautiful noteheads are pronounced, not circular, 
 % and not even symmetric.
+% These examples are inspired by [Wanske] [see literature list]
 
 %noteheight#:=interline#;
+
 % even more pronounced (almost overdone), just like the original
 noteheight#:=interline#+1.5stafflinethickness#;
 
-def test_grid =
-if test>1:
-       proofrulethickness 1pt#;
-       makegrid(0pt,0pt for i:=-5pt step 1pt until 5pt: ,i endfor)
-               (0pt,0pt for i:=-5pt step 1pt until 5pt: ,i endfor);
-       proofrulethickness .1pt#;
-       makegrid(0pt,0pt for i:=-4.8pt step .2pt until 4.8pt: ,i endfor)
-               (0pt,0pt for i:=-4.8pt step .2pt until 4.8pt: ,i endfor);
-fi
-       enddef;
-
-% a: x diameter
-% b: y diameter
-% err_x: drift of y axis at top
-% err_y: drift of x axis at right
-def distorted_ellipse(expr a,b,err_y,err_x,super) =
-       superellipse((a,err_x),(-err_y,b),(-a,-err_x),(err_y,-b),super);
-       enddef;
 
-def begin_notehead =
-       begingroup;
-       save a_b,err_y_a,alpha,super;
-       save ai_a,ai_bi,err_y_ai,err_x_bi,alphai,superi;
+% setup user vars
+def setup_notehead_vars =
+       save a_b,err_y_a,tilt,superness;
+       save ai_a,ai_bi,err_y_ai,err_x_bi,inner_tilt,inner_superness;
        save b_h,a_w;
        enddef;
 
-def end_notehead(expr code,height,name,id,texstr) =
-       save a,b,h,w,ai,bi;
-       h#=height;
-       2b#=h#*b_h;
-       a#=b#*a_b;
-       w#=2a#/a_w;
-       ai#=a#*ai_a;
-       bi#=ai#/ai_bi;
-       define_pixels(a,b);
-       define_pixels(w,h);
+% setup addititional vars and calc them
+def notehead_calc =
+       save a,beta,ai,bi, ht, wd;
+       ht# =noteheight#;
+       2beta#=ht#*b_h;
+       a# = beta#*a_b;
+       wd# = 2a# / a_w;
+       ai# = a# * ai_a;
+       bi# = ai#/ai_bi;
+       define_pixels(a,beta);
        define_pixels(ai,bi);
-       fet_beginchar(code,w#,h#,0,0,name,id,texstr);
-               path black,white;
-               black=distorted_ellipse(a,b,a*err_y_a,0,super);
-               white=distorted_ellipse(ai,bi,ai*err_y_ai,bi*err_x_bi,superi);
-if test>0:
+       set_char_box(0, wd#, .5 ht#, .5 ht#);
+       enddef;
+
+
+% draw the outer and inner ellipse.
+def notehead_draw =
+       path black,white;
+       black=distorted_ellipse(a,beta,a*err_y_a,0,superness);
+       white=distorted_ellipse(ai,bi,ai*err_y_ai,bi*err_x_bi,inner_superness);
+if test>1: %fixme
                save x;
                x1=-x3=a; x2=x4=0; y1=y3=0; y2=-y4=b;
                penlabels(1,2,3,4);
                test_grid;
 else:
-               black:=black rotated alpha;
-%              black:=black shifted (w/2,h/2);
+               black:=black rotated tilt;
                black:=black shifted (w/2,0);
-               white:=white rotated alphai;
-%              white:=white shifted (w/2,h/2);
+               white:=white rotated inner_tilt;
                white:=white shifted (w/2,0);
 fi
                fill black;
                unfill white;
-               endchar;
-               endgroup;
-       enddef;
+
                
-% fet_begingroup("noteheads");
+       enddef;
+
+
 fet_begingroup("balls");
+
 % whole note
 % Wanske, p.38
-% begin_notehead(incr code,interline#,"Whole notehead");
-begin_notehead;
+fet_beginchar("Whole notehead", "0", "wholeball")
+       setup_notehead_vars;
+       
        a_b:=1.80;
        err_y_a:=0; % no slant
-       alpha:=0;
-       super:=0.707;
+       tilt:=0;
+       superness:=0.707;
        ai_a:=0.508;
        % ai_bi:=1.23;
        ai_bi:=1.30; % jcn
@@ -85,62 +74,70 @@ begin_notehead;
        % err_x_bi:=0;
        err_y_ai:=0;
        err_x_bi:=0.115;
-       % alphai:=135;
-       alphai:=125; % jcn
-       % superi:=0.69;
-       superi:=0.68; % jcn
+       % inner_tilt:=135;
+       inner_tilt:=125; % jcn
+       % inner_superness:=0.69;
+       inner_superness:=0.68; % jcn
        b_h:=1; %no rotate-> no height correction
        a_w:=1; % no rotate-> no width correction
-       end_notehead(incr code,noteheight#,"Whole notehead","0","wholeball");
+
+       notehead_calc;
+       notehead_draw;
+fet_endchar;
+
 
 % half note
 % Wanske, p.39
-begin_notehead;
-       % a_b:=1.49; % after text
+fet_beginchar("Half notehead", "1", 
+       "halfball")
+       setup_notehead_vars;
+               % a_b:=1.49; % after text
        a_b:=1.50; % after drawing
        err_y_a:=0.157;
-       alpha:=34;
-       % super:=0.66;
-       super:=0.67; % jcn
+       tilt:=34;
+       % superness:=0.66;
+       superness:=0.67; % jcn
        % ai_a:=0.863;
        ai_a:=0.850; % jcn
        % ai_bi:=3.14;
        ai_bi:=3.30; % jcn
        err_y_ai:=0;
        err_x_bi:=-0.12;
-       alphai:=alpha;
-       superi:=0.80;
+       inner_tilt:=tilt;
+       inner_superness:=0.80;
        b_h:=0.935;
        a_w:=1.12;
-       end_notehead(incr code,noteheight#,"Half notehead","1","halfball");
+
+       notehead_calc;
+       notehead_draw;
+fet_endchar;
+
 
 % quarter note
 % Wanske p.38
-begin_notehead;
+fet_beginchar("Quart notehead", "2", "quartball")
+       setup_notehead_vars;
        % a_b:=1.57; % after text
        a_b:=1.54; % after drawing
        err_y_a:=0.044;
-       alpha:=32;
-       super:=0.707;
+       tilt:=32;
+       superness:=0.707;
        ai_a:=0;
        ai_bi:=1;
        err_y_ai:=0;
        err_x_bi:=0;
-       alphai:=0;
-       superi:=0.707;
+       inner_tilt:=0;
+       inner_superness:=0.707;
        b_h:=0.85;
        a_w:=1.09;
-       end_notehead(incr code,noteheight#,"Quarter notehead","2","quartball");
 
-% from MO*gen.mf
-lthick:=.4pt;
-pen line_pen;
-line_pen:= pencircle scaled lthick;
+       notehead_calc;
+       notehead_draw;
+fet_endchar;
+
 
-picture save_pic;
-def callpic = currentpicture:= save_pic enddef;
-def savepic = save_pic:= currentpicture enddef;
 
+% from MO*gen.mf; (pass the barfbag?)
 def add_mirror (expr pone, ptwo) =
   addto currentpicture also currentpicture
         reflectedabout (round(pone), round(ptwo))
@@ -155,20 +152,22 @@ nhh#:=interline#;
 nhw#:=6/5interline#;
 define_pixels(nhh,nhw);
 
-fet_beginchar(incr code,2interline#,interline#,0,0,"Brevis notehead","-1","breveball");
+fet_beginchar("Brevis notehead","-1","breveball"); 
+       set_char_box(0, 2interline#,.5 interline#, .5interline#);
        fill_square (5/4nhw, .25nhh, (0,.25nhh));
        add_mirror (origin, right);
        x1=x2=0; x3=x4=5/4nhw; y1=-y2=y3=-y4=.7nhh;
-       pickup line_pen;
+       pickup pencircle scaled stafflinethickness;
        draw z1--z2; draw z3--z4;
-       savepic;
-       endchar;
+       push_picture(currentpicture);
+fet_endchar;
 
-fet_beginchar(incr code,2interline#,interline#,0,0,"Longa notehead","-2","longaball");
-       callpic;
-       pickup line_pen;
+fet_beginchar("Longa notehead","-2","longaball");
+       set_char_box(0, 2 interline#,.5interline#, .5interline# );
+       currentpicture := pop_picture;
+       pickup pencircle scaled stafflinethickness;
        draw (5/4nhw,-.7nhh)--(5/4nhw,-1.7nhh);
-       endchar;
+fet_endchar;
 
 % fet_endgroup("noteheads");
 fet_endgroup("balls");
index deabf71facd6b184d69cc7fb489ad1a4cb863ffd..362ed9ab12ffe52513a67014cfc9020378816422 100644 (file)
@@ -1,10 +1,12 @@
 % eindelijk.mf
 % LilyPond's own rest(s)
 
-% MO*TeX stuff
-% nhh#:=interline#;
-% nhw#:=6/5*interline#;
-% define_pixels(interline,nhw);
+% todo breve/longa rests
+
+
+fet_begingroup("rests");
+
+begingroup
 
 med#:=1/33designsize;
 thick#:=1/16designsize;
@@ -20,15 +22,77 @@ def shift_pic (expr pone, ptwo) =
   currentpicture:=currentpicture shifted (round(pone),round(ptwo))
 enddef;
 
-% ugh, dunno how to generate doubles "outside*" rests?
-fet_begingroup("almostrests");
+% stuff for     8th,16th etc rests
+%
+save stem, ball_crook_stem, ball_crook_balldiam, flare;
 
-% stem#:=1/8interline#;
-stem#:=1/5interline#;
-flare#:=2/3interline#;
 define_pixels(stem,flare);
+% stem#:=1/8interline#;
+stem# = 1/5interline#;
+ball_crook_stem = stem;
+ball_crook_balldiam =flare;
+flare# = 2/3interline#;
+
+save block_rest_y, block_rest_x;
+
+block_rest_y# = 1/2 interline#;
+block_rest_x# = 3 block_rest_y#;
+
+define_pixels(block_rest_y, block_rest_x);
+
+def block_rest=
+       pickup pencircle scaled blot_diameter;
+
+       bot y1 = 0;
+       top y2 = block_rest_y;
+       y3 = y2;
+       y4 = y1;
+
+       rt x1 = block_rest_x;
+       x2 = x1;
+       lft x3 = 0;
+       x4 = x3;
+       save p;
+       path p;
+       p:=z1 -- z2 -- z3 -- z4 -- cycle;
+       draw_rounded_path(p, blot_diameter);
+enddef;
 
-fet_beginchar(incr code,interline#,4interline#,0,0,"Quarter rest","4","quartrest");
+fet_beginchar( "whole rest", "0", "wholerest");
+set_char_box(0, block_rest_x#, -block_rest_y#, 2 block_rest_y# );
+       block_rest;
+       currentpicture := currentpicture shifted (0,block_rest_y);
+fet_endchar;
+
+fet_beginchar("half rest", "1", "halfrest");
+       set_char_box(0, block_rest_x#, 0, block_rest_y#);
+       block_rest;
+fet_endchar;
+
+
+%
+% should use ledgerline thickness?
+%
+fet_beginchar( "whole rest (outside staff)", "0o", "outsidewholerest");
+       set_char_box(block_rest_y#, block_rest_x# + block_rest_y#, -block_rest_y#, 2 block_rest_y# );
+       block_rest;
+       currentpicture := currentpicture shifted (0,block_rest_y);
+       pickup pencircle scaled stafflinethickness;
+       draw (-block_rest_y, interline) .. (block_rest_x + block_rest_y, interline);
+fet_endchar;
+
+fet_beginchar("half rest (outside staff)", "1o", "outsidehalfrest");
+       set_char_box(block_rest_y#, block_rest_x#+ block_rest_y#, 0, block_rest_y#);
+       block_rest;
+       pickup pencircle scaled stafflinethickness;
+       draw (-block_rest_y,0) .. (block_rest_x + block_rest_y,0);
+fet_endchar;
+
+def rest_crook(expr a, w) =
+       balled_crook(a, w, ball_crook_balldiam, ball_crook_stem)
+enddef;
+
+fet_beginchar("Quarter rest","2","quartrest");
        alpha:=-50;
        penpos1(rthin,alpha+90);
        penpos2(5/4rthick,alpha);
@@ -46,7 +110,7 @@ fet_beginchar(incr code,interline#,4interline#,0,0,"Quarter rest","4","quartrest
        z6=z4l+(5/4interline*right) rotated alpha;
 %      x7l=x4l; y7r=y6l;
        x7l=x4l; y7l=y4r;
-       x8=2/5interline; y8= interline-1/4interline;
+       x8=2/5interline; y8= 3/4 interline;
        z5=z6r shifted (sqrt(2)*rthin/4,sqrt(2)*rthin/4);
 
        pickup penrazor scaled rthin rotated 45;
@@ -55,123 +119,97 @@ fet_beginchar(incr code,interline#,4interline#,0,0,"Quarter rest","4","quartrest
        penstroke z2e..z3e..z4e;
        penstroke z6e..tension1.4..z7e..tension1.4..z8e;
        penlabels(1,2,3,4,5,6,7,8);
-       endchar;
-
-def crook(expr a,w) =
-       begingroup;
-       save x,y;
-       penpos1(flare/2,-90);
-       penpos2(flare/2,0);
-       penpos3(flare/2,90);
-       penpos4(flare/2,180);
-       x4r=xpart a-w; y3r=ypart a+flare/4;
-       x1l=x2l=x3l=x4l;
-       y1l=y2l=y3l=y4l;
-       penpos5(stem,250);
-       x5=x4r+9/8flare; y5r=y1r;
-       penpos6(stem,260);
-       x6l=xpart a; y6l=ypart a;
-       penstroke z1e..z2e..z3e..z4e..z1e..z5e{right}..z6e;
-       penlabels(1,2,3,4,5,6);
-       endgroup;
-       enddef;
-
-def brush(expr a,w,b,v) =
-       begingroup;
-       save x,y;
-       z1=a; z2=b;
-       penpos3(w,angle(z2-z1)+90);
-       penpos4(w,angle(z2-z1));
-       penpos5(v,angle(z1-z2)+90);
-       penpos6(v,angle(z1-z2));
-       x3=x4=x1; y3=y4=y1;
-       x5=x6=x2; y5=y6=y2;
-       fill z3r{z1-z2}..z4l..{z2-z1}z3l..z5r{z2-z1}..z6l..{z1-z2}z5l..cycle;
-       penlabels(1,2,3,4,5,6);
-       endgroup;
-       enddef;
-
-fet_beginchar(incr code,4/3interline#,5/3interline#+2stafflinethickness#,0,0,"8th rest","-2","eighthrest");
-       save x,y;
-       x1=w-stem/6; y1=h-flare/4;
-       crook (z1,w-stem/6);
+       set_char_box(0, interline#, -3/4 interline#, 7/2 interline#);
+       fet_endchar;
+
+fet_beginchar("8th rest","3","eighthrest");
+       set_char_box(0, 4/3interline#,-interline#, 8/3interline#+2stafflinethickness#);
+       save x,y, ht;
+       ht = h + d;
+       x1=w-stem/6; y1=ht-flare/4;
+       rest_crook (z1,w-stem/6);
        z2-z1=whatever*dir70;
        y2=stem/2;
        brush (z1,stem/3,z2,stem);
        % ugh
        currentpicture:=currentpicture shifted (0,interline);
 %      currentpicture:=currentpicture shifted (0,interline+2stafflinethickness);
-       endchar;
+       fet_endchar;
 
-fet_beginchar(incr code,4/3interline#,5/3interline#+interline#+2stafflinethickness#,0,0,"16th rest","-2","sixteenthrest");
+fet_beginchar("16th rest","4","sixteenthrest");
+       set_char_box(0,4/3interline#,0, 5/3interline#+interline#+2stafflinethickness#);
        save x,y;
        x1=w-stem/6; y1=h-flare/4;
        z2-z1=whatever*dir74;
        y2=stem/2;
        brush (z1,stem/2,z2,stem);
-       crook (z1,7/8w);
+       rest_crook (z1,7/8w);
        z3-z1=whatever*dir74;
        y3=y1-interline;
-       crook (z3,7/8w);
+       rest_crook (z3,7/8w);
 %      currentpicture:=currentpicture shifted (0,2stafflinethickness);
-       endchar;
+       fet_endchar;
 
-fet_beginchar(incr code,4/3interline#,5/3interline#+2interline#+2stafflinethickness#,0,0,"32th rest","-2","thirtysecondrest");
+fet_beginchar("32th rest","5","thirtysecondrest");
+       set_char_box(0,4/3interline#,0, 5/3interline#+2interline#+2stafflinethickness#);
        save x,y;
        x1=w-stem/6; y1=h-flare/4;
        z2-z1=whatever*dir76;
        y2=stem/2;
        brush (z1,stem/2,z2,stem);
-       crook (z1,7/8w);
+       rest_crook (z1,7/8w);
        z3-z1=whatever*dir76;
        y3=y1-interline;
-       crook (z3,7/8w);
+       rest_crook (z3,7/8w);
        z4-z1=whatever*dir76;
        y4=y1-2interline;
-       crook (z4,7/8w);
+       rest_crook (z4,7/8w);
 %      currentpicture:=currentpicture shifted (0,2stafflinethickness);
-       endchar;
+       fet_endchar;
 
-fet_beginchar(incr code,4/3interline#,5/3interline#+3interline#+2stafflinethickness#,0,0,"64th rest","-2","sixtyfourthrest");
+fet_beginchar("64th rest","6","sixtyfourthrest");
+       set_char_box(0,4/3interline#,0, 5/3interline#+3interline#+2stafflinethickness#);
        save x,y;
        x1=w-stem/6; y1=h-flare/4;
        z2-z1=whatever*dir78;
        y2=stem/2;
        brush (z1,stem/2,z2,stem);
-       crook (z1,7/8w);
+       rest_crook (z1,7/8w);
        z3-z1=whatever*dir78;
        y3=y1-interline;
-       crook (z3,7/8w);
+       rest_crook (z3,7/8w);
        z4-z1=whatever*dir78;
        y4=y1-2interline;
-       crook (z4,7/8w);
+       rest_crook (z4,7/8w);
        z5-z1=whatever*dir78;
        y5=y1-3interline;
-       crook (z5,7/8w);
+       rest_crook (z5,7/8w);
 %      currentpicture:=currentpicture shifted (0,2stafflinethickness);
-       endchar;
+       fet_endchar;
 
-fet_beginchar(incr code,4/3interline#,5/3interline#+4interline#+2stafflinethickness#,0,0,"128th rest","-2","hundredtwentyeighthrest");
+fet_beginchar("128th rest","7","hundredtwentyeighthrest"); 
+       set_char_box(0, 4/3interline#, 0, 5/3interline#+4interline#+2stafflinethickness#);
        save x,y;
        x1=w-stem/6; y1=h-flare/4;
        z2-z1=whatever*dir80;
        y2=stem/2;
        brush (z1,stem/2,z2,stem);
-       crook (z1,7/8w);
+       rest_crook (z1,7/8w);
        z3-z1=whatever*dir80;
        y3=y1-interline;
-       crook (z3,7/8w);
+       rest_crook (z3,7/8w);
        z4-z1=whatever*dir80;
        y4=y1-2interline;
-       crook (z4,7/8w);
+       rest_crook (z4,7/8w);
        z5-z1=whatever*dir80;
        y5=y1-3interline;
-       crook (z5,7/8w);
+       rest_crook (z5,7/8w);
        z6-z1=whatever*dir80;
        y6=y1-4interline;
-       crook (z6,7/8w);
+       rest_crook (z6,7/8w);
 %      currentpicture:=currentpicture shifted (0,2stafflinethickness);
-       endchar;
+       fet_endchar;
 
+endgroup;
 fet_endgroup("rests");
 
index c43c04c6ed4e4d934c6d15eab92445d6acd71290..62ad5259427d871c65847650886459a054c67758 100644 (file)
@@ -9,8 +9,6 @@ fet_beginfont("font-en-tja", 16);
 
 mode_setup;
 
-test:=0;
-
 staffsize#:=16pt#;
 stafflines:=5;
 code:=-1;
index ab7d914e35ee46e72cd14f76e403dd00be1472ba..abc685f41796c439ad0f7a7fab138c8e99443afc 100644 (file)
@@ -6,8 +6,6 @@ mode_setup;
 input autometric;
 fet_beginfont("font-en-tja", 20);
 
-test:=0;
-
 staffsize#:=20pt#;
 stafflines:=5;
 stafflinethickness#:=0.4pt#;
diff --git a/mf/generic-macros.mf b/mf/generic-macros.mf
new file mode 100644 (file)
index 0000000..b6b26ed
--- /dev/null
@@ -0,0 +1,129 @@
+
+%
+% debugging
+%
+def test_grid =
+if test>1:
+       proofrulethickness 1pt#;
+       makegrid(0pt,0pt for i:=-5pt step 1pt until 5pt: ,i endfor)
+               (0pt,0pt for i:=-5pt step 1pt until 5pt: ,i endfor);
+       proofrulethickness .1pt#;
+       makegrid(0pt,0pt for i:=-4.8pt step .2pt until 4.8pt: ,i endfor)
+               (0pt,0pt for i:=-4.8pt step .2pt until 4.8pt: ,i endfor);
+fi
+       enddef;
+%
+% Transforms
+%
+
+def scaledabout(expr point, scale) =
+       shifted -point scaled scale shifted point
+enddef;
+
+%
+% Urgh! Want to do parametric types
+%
+
+def del_picture_stack=
+       save save_picture_stack, picture_stack_idx;
+enddef;
+
+% better versions of Taupin/Egler savepic cmds
+%
+%
+def make_picture_stack = 
+       % override previous stack.
+       del_picture_stack;
+       picture save_picture_stack[];
+       numeric picture_stack_idx;
+       picture_stack_idx := 0;
+       def push_picture(expr p) = 
+               save_picture_stack[picture_stack_idx] := p ;
+               picture_stack_idx := picture_stack_idx + 1;
+       enddef;
+       def pop_picture =  save_picture_stack[decr picture_stack_idx] enddef;
+       def top_picture = save_picture_stack[picture_stack_idx] enddef;
+enddef;
+
+
+% save/restore pens
+% why can't I delete individual pens?
+def make_pen_stack =
+       del_pen_stack;
+       pen save_pen_stack[];
+       numeric pen_stack_idx;
+       pen_stack_idx := 0;
+       def push_pen(expr p) = 
+               save_pen_stack[pen_stack_idx] := p ;
+               pen_stack_idx := pen_stack_idx +1;
+       enddef;
+       def pop_pen =  save_pen_stack[decr pen_stack_idx] enddef;
+       def top_pen = save_pen_stack[pen_stack_idx] enddef;
+enddef;
+def del_pen_stack=
+       save save_pen_stack, pen_stack_idx;
+enddef;
+
+%
+% drawing
+%
+
+% a: x diameter
+% b: y diameter
+% err_x: drift of y axis at top
+% err_y: drift of x axis at right
+def distorted_ellipse(expr a,b,err_y,err_x,super) =
+       superellipse((a,err_x),(-err_y,b),(-a,-err_x),(err_y,-b),super);
+       enddef;
+
+def brush(expr a,w,b,v) =
+       begingroup;
+       save x,y;
+       z1=a; z2=b;
+       penpos3(w,angle(z2-z1)+90);
+       penpos4(w,angle(z2-z1));
+       penpos5(v,angle(z1-z2)+90);
+       penpos6(v,angle(z1-z2));
+       z3 = z4 = z1;
+       z5 = z6 = z2;
+
+       fill z3r{z3r-z5l}..z4l..{z5r-z3l}z3l..z5r{z5r-z3l}..z6l..{z3r-z5l}z5l..cycle;
+       penlabels(3,4,5,6);
+       endgroup;
+enddef;
+
+def draw_rounded_path(expr p, thick) =
+       push_pen(currentpen);
+       fill p;
+       pickup pencircle scaled thick;
+       draw p;
+       currentpen := pop_pen;
+enddef;
+
+%
+%
+%
+def balled_crook(expr a, w, balldiam, stem) =
+begingroup;
+       save x,y;
+       penpos1(balldiam/2,-90);
+       penpos2(balldiam/2,0);
+       penpos3(balldiam/2,90);
+       penpos4(balldiam/2,180);
+       x4r=xpart a-w; y3r=ypart a+balldiam/4;
+       x1l=x2l=x3l=x4l;
+       y1l=y2l=y3l=y4l;
+       penpos5(stem,250);
+       x5=x4r+9/8balldiam; y5r=y1r;
+       penpos6(stem,260);
+       x6l=xpart a; y6l=ypart a;
+       penstroke z1e..z2e..z3e..z4e..z1e..z5e{right}..z6e;
+       penlabels(1,2,3,4,5,6);
+endgroup;
+enddef;
+
+def y_mirror_char =
+       currentpicture := currentpicture yscaled -1;
+       set_char_box(charbp, charwd, charht, chardp);
+enddef;
+
index 1e8053dc146e594e69df290bae78d51de2693de8..690e415f2eb364e8a90fbb744d96f190d200e43c 100644 (file)
@@ -1,9 +1,25 @@
 
 interline#:=staffsize#/(stafflines-1);
-  
-        %  [D.K.Roush & J.S.Gourlay] say this should be 0.072
-        % We know better
+
+%
+%  [D.K.Roush & J.S.Gourlay] say this should be 0.072
+% We know better
+% generally, the "blackness" of most chars depends on this.
+%
 stafflinethickness#:=0.1 interline#;
 
 define_pixels(interline);
 define_pixels(stafflinethickness);
+
+% 
+% Because of the engraving/stamping process, no traditional
+% characters have sharp edges and corners
+% The following variable controls the amount of "roundness"
+%
+numeric blot_diameter;
+
+%
+% this is not a meta variable: it is related to absolute sizes.
+%
+blot_diameter# = .4pt#;
+define_pixels(blot_diameter);
index 9d0dc58794a5a5f252fdb9dcf7e393bfeca02662..2d890ee79b2e69e0c8f76de347b673e75e1114fe 100644 (file)
@@ -1,25 +1,18 @@
 
+input generic-macros;
 
-% better versions of Taupin/Egler savepic cmds
-%
-%
-picture save_picture_stack[];
-numeric stack_idx;
-stack_idx := 0;
-
-def push_picture(expr p) = save_picture_stack[incr stack_idx] := p enddef;
-def push_current = push_picture (currentpicture) enddef;
-def pop_picture =  save_picture_stack[ decr stack_idx] enddef;
-def top_picture = save_picture_stack[stack_idx] enddef;
-
-
-def scaledabout(expr point, scale) =
-       shifted -point scaled scale shifted point
-enddef;
-
-
+make_pen_stack;
+make_picture_stack;
 input generic-params;
-input bolletjes;
-input eindelijk;
-input toevallig;
 
+
+test:=0;
+if test = 0: 
+       input eindelijk;
+       input toevallig;
+       input puntje;
+       input bolletjes;
+       input schrift;
+else:
+%      input klef;
+fi
diff --git a/mf/klef.mf b/mf/klef.mf
new file mode 100644 (file)
index 0000000..129c792
--- /dev/null
@@ -0,0 +1,45 @@
+
+% implement clefs 
+fet_begingroup("foobars")
+
+
+fet_beginchar(incr code, "F clef", "bassclef", "bassclef");
+       
+fet_endchar;
+fet_beginchar(incr code, "G clef", "evolinclef", "evolinclef");
+       save tilt;
+       tilt = 15;
+
+       inner_fatness = 5 stafflinethickness;
+       upstroke_fatness = 7 stafflinethickness;
+       top_curl_fatness = 4 stafflinethickness;
+       inner_thinness = 2 stafflinethickness;  
+       downstroke_thinness = 1.5 stafflinethickness;
+
+       z1 = 6/10 interline * dir(-135);
+       z3 = (0, interline - inner_fatness/2);
+       x5 = x1;
+       y5 = -interline;
+       z7 = (-1.25 interline, -.5 interline);
+       z9 = whatever * dir (90 + tilt);
+       y9 = 2.1 interline;
+       y12 + top_curl_fatness = 4 interline;
+       x12 = 0;
+       z13 = z9;
+       z15 = 1.5 interline * dir (tilt -90);
+       
+
+       penpos1(blot_diameter, 45);
+       penpos3(inner_fatness, -90);
+       penpos5(inner_thinness, 90);
+       penpos7(inner_thinness, 45);
+       penpos9(upstroke_fatness, tilt -90);
+       penpos12(top_curl_fatness, 90);
+       penpos13(downstroke_thinness, tilt-90);
+       penpos15(downstroke_thinness, tilt-90);
+       set_char_box(0,0,0,0);
+
+%      penstroke z1e{dir 135} .. z3e ..  {left}z5e .. z7e ..  tension 1.2 .. z9e;% & z9e..  z12e .. z13e .. z15e;
+%      penlabels(1,3,5,7, 9,12,13,15);
+fet_endchar;
+fet_endgroup("foobars");
diff --git a/mf/puntje.mf b/mf/puntje.mf
new file mode 100644 (file)
index 0000000..7675bef
--- /dev/null
@@ -0,0 +1,13 @@
+fet_begingroup("dots");
+
+fet_beginchar("duration dot","dot", "dot")
+       save dot_diam;
+       2 dot_diam# = interline# - stafflinethickness#;
+       define_pixels(dot_diam)
+       pickup pencircle scaled dot_diam;
+       draw (dot_diam/2,0);
+       set_char_box(0, dot_diam#, dot_diam#/2, dot_diam#/2);
+fet_endchar;
+
+
+fet_endgroup("dots");
diff --git a/mf/schrift.mf b/mf/schrift.mf
new file mode 100644 (file)
index 0000000..2f55c40
--- /dev/null
@@ -0,0 +1,157 @@
+fet_begingroup("foobars")
+
+
+def draw_fermata =
+       save radius, crook_thinness, crook_fatness, dot_diam;
+       
+       radius# = 1.5 interline#;
+       crook_thinness# = stafflinethickness#;
+       crook_fatness# = 4 stafflinethickness#;
+
+       radius# + crook_fatness#/2 = h#;
+       radius# + crook_thinness#/2 = w#;
+       set_char_box(w#, w#, 0, h#);
+       
+       define_pixels(radius, crook_thinness, crook_fatness);
+       dot_diam = 4/3 crook_fatness;
+
+
+       penpos1(crook_thinness, 0);
+       penpos2(crook_fatness, -90);
+       penpos3(crook_thinness, -180);
+       z1 = (-radius,0);
+       z2 = (0, radius);
+       z3 = (radius,0);
+       
+       fill z1l{down} .. {up}z1r .. z2r .. z3r{down} .. {up}z3l
+               .. z2l .. cycle;
+
+       pickup pencircle scaled dot_diam;
+       x4 =0;
+       bot y4 = - crook_thinness/2;
+       draw z4;
+enddef;
+
+fet_beginchar("fermata up", "ufermata", "ufermata")
+       draw_fermata;   
+       penlabels(1,2,3);
+       fet_endchar;
+
+fet_beginchar("fermata down", "dfermata", "dfermata")
+       draw_fermata;
+       currentpicture:=currentpicture yscaled -1 ;
+       set_char_box(w#, w#, h#, 0);
+       
+       fet_endchar;
+
+
+% FIXME: rounded endings
+%
+fet_beginchar("> accent", "accent", "accent")
+       set_char_box(.9 interline#, .9 interline#, .5 interline#, .5 interline#);
+       save thickness, diminish;
+
+       thickness = 2 stafflinethickness;
+
+       % prevent blobs at crossing lines
+       diminish = .75;
+
+       y1 + thickness/2 = h;
+       x1 = -b;
+       x2 = w;
+       y2 = .25 thickness* diminish;
+
+       z4 = (w,0);
+       x3 =0;
+       z3 = whatever [z1, z4];
+
+       penpos2(thickness*(2 - diminish)/2 , 90);
+       penpos1(thickness, 90);
+       penpos3(thickness, 90);
+
+       penstroke z1e .. z3e .. z2e;
+       penstroke (z1e .. z3e .. z2e) yscaled -1;
+
+       penlabels(1,2,3);
+       fet_endchar;
+
+fet_beginchar("staccato dot", "staccato", "staccato")
+       save radius;
+       radius# = 1.25 stafflinethickness#;
+       define_pixels(radius);
+       pickup pencircle scaled 2 radius;
+       draw (0,0);
+       set_char_box(radius#, radius#, radius#, radius#);
+fet_endchar;
+
+def draw_staccatissimo =
+       save radius, height;
+       height# = .8 interline#;
+       radius# = 2 stafflinethickness#;
+       define_pixels(radius, height);
+
+       brush((0,0), blot_diameter, (0, height),2 radius);
+       set_char_box(radius#,radius#, blot_diameter#/2, height# + radius#);
+enddef;
+
+fet_beginchar("staccatissimo/martellato up", "ustaccatissimo", "ustaccatissimo")
+       draw_staccatissimo;
+fet_endchar;
+
+%
+% FIXEM: scale labels too.
+%
+fet_beginchar("staccatissimo/martellato down", "dstaccatissimo", "dstaccatissimo")
+       draw_staccatissimo;
+       y_mirror_char;
+fet_endchar;
+
+fet_beginchar("portato/single tenuto", "tenuto", "tenuto")
+       save thick;
+       thick# = 1.2 stafflinethickness#;
+       define_pixels(thick);
+
+       set_char_box(.9 interline#, .9 interline#, thick#/2,thick#/2);
+       pickup pencircle scaled thick;
+       lft x1 = -b;
+       rt x2 = w;
+       y1 = y2 = 0;
+       draw z1 .. z2;
+fet_endchar;
+
+
+def draw_marcato = 
+       save fatness, thinness;
+       set_char_box(interline#/2, interline#/2, 0, 1.1 interline#);
+
+       fatness = 3 stafflinethickness;
+       thinness = .8 stafflinethickness;
+       x2 - x1  + blot_diameter = fatness;
+       x2 + thinness/2 = w;
+       
+       y1 = y2;
+       y1 = thinness/2;
+       z2 - z3 = whatever * (charwd, -charht);
+       z1 - z4 = whatever * (charwd, -charht);
+       z3 - z4 = whatever * (charwd, charht);
+       y3 + thinness/2 = h;
+       draw_rounded_path(z1 -- z2 -- z3 -- z4 -- cycle, thinness);
+
+       pickup pencircle scaled thinness;
+       z3 - z5 = whatever* (z3 - z4);
+       bot y5 = 0;
+       draw z3 .. z5;
+
+       labels(1,2,3,4,5);
+enddef;
+
+fet_beginchar("marcato up", "umarcato", "umarcato")
+       draw_marcato;
+fet_endchar;
+fet_beginchar("marcato down", "dmarcato", "dmarcato")
+       draw_marcato;
+       y_mirror_char;
+fet_endchar;
+
+
+fet_endgroup("foobars");
index 0d618634555e8ff321d0220afeebb329938c002e..69cb6e1e074dfecf5477dbb0dec6396820b94cd2 100644 (file)
@@ -1,15 +1,20 @@
 %
-% Real accidentals
+% Accidentals from various sources, notably
+%
+%   Baerenreiter edition of Schuberts `Auf dem Strom' (sharp, natural, flat)
+%   F Hofmeister edition of Muellers `Etueden fuer Horn'  (double sharp)
+%
 
-%\tracingequations:= tracingonline := 1;
-%proofing := 2;
 
-fet_begingroup("foobars");
+%tracingall;
+%proofing := 2;
+%\tracingequations:= tracingonline := 1;
 
-begingroup;
+fet_begingroup("accidentals");
 
-fet_beginchar(incr code, 1.1 interline#, 1.5 interline#, 
-               1.5 interline#, 0, "Sharp" , "1", "sharp");
+fet_beginchar("Sharp" , "1", "sharp");
+       set_char_box(0, 1.1 interline#, 1.5 interline#, 
+               1.5 interline#);
 
        save interbeam, interstem, beamheight, beamwidth, 
                stemwidth;
@@ -19,21 +24,32 @@ fet_beginchar(incr code, 1.1 interline#, 1.5 interline#,
        beamheight := 4 stafflinethickness;
        beamwidth := w;
        stemwidth := 1.3 stafflinethickness;
+       roundness := blot_diameter;
+       pair center;
+       center := (.5 w, 0);
+       
+       roundness + 2 spanwidth = beamwidth;
+       roundness + 2 spanheight = beamheight;
 
        2 horizontal_protrusion  + interstem * beamwidth + stemwidth
                = beamwidth;
-
-       pickup pensquare xscaled horizontal_protrusion yscaled beamheight;
-       pair center;
-       center = (.5 w, 0);
        
-       z2 - z1 = (beamwidth - horizontal_protrusion, beamheight/2);
+       z2 - z1 = (beamwidth - roundness, beamheight/2);
        z1 + z2 = 2*center;
        beamslope = (y2-y1)/(x2-x1);
+
+       pair hspan, vspan;
+       hspan = (spanwidth, beamslope * spanwidth);
+       vspan = (0, spanheight);
+
+       
        path beam;
-       beam:=  z1 .. z2;
-       draw beam shifted (0, -interbeam/2);
-       draw beam shifted (0,interbeam/2);
+       beam := (hspan + vspan -- -hspan 
+               +  vspan -- -hspan -vspan -- hspan - vspan -- cycle )
+               shifted center;
+
+       draw_rounded_path((beam shifted (0,-interbeam/2)), roundness);
+       draw_rounded_path((beam shifted (0,interbeam/2)), roundness);
 
        pickup pencircle scaled stemwidth;
        x3 = x4 = xpart center;
@@ -46,11 +62,11 @@ fet_beginchar(incr code, 1.1 interline#, 1.5 interline#,
        xs := interstem* beamwidth / 2;
        draw stem shifted (- xs, - xs* beamslope);
        draw stem shifted (xs , xs *beamslope);
-       endchar;
-
-fet_beginchar(incr code, 8/12 interline#, 1.5 interline#, 1.5 interline#, 0,
-       "Natural", "0", "natural")
+       labels(1,2,3,4);
+       fet_endchar;
 
+fet_beginchar( "Natural", "0", "natural")
+       set_char_box(0, 8/12 interline#, 1.5 interline#, 1.5 interline#);
 
        save interbeam, interstem, beamheight, beamwidth, 
                stemwidth;
@@ -82,6 +98,96 @@ fet_beginchar(incr code, 8/12 interline#, 1.5 interline#, 1.5 interline#, 0,
        draw (xpart z2, -y3) .. z4;
 
        labels(1,2,3,4);
-       endchar;
-endgroup;
-fet_endgroup("foobars");
+       fet_endchar;
+
+%
+% Dedicated to my mom.    (3/10/97)
+%
+% Mamma, ik hou van je; kom je alsjeblieft terug? 
+%    -- HW
+%
+
+%
+% FIXME more metaness
+% FIXME distribution of the crooks' thickness
+%
+% FIXME probably doesn't look quite right. 
+
+def flat_meta_symbol(expr w, d, h, 
+        stemwidth, crook_fatness, crook_thinness,
+       bottom_stem_thick, top_stem_thick)=
+
+       z1 = (0, h);
+       z2 = (0, -d);
+       brush(z1, top_stem_thick , z2, bottom_stem_thick);
+       
+       z3 = (0, 7/16 interline);
+       z4 = z3 + whatever * (dir 30);
+       y4 = 1/2 interline ;
+       y5 = 4/16 interline;
+       x5 + crook_fatness/2 = w;
+       z6 = z2 + (0,-1) * (bottom_stem_thick - crook_thinness);
+
+       penpos3(crook_thinness, 90);
+       penpos4(crook_thinness, 90);
+       penpos5(crook_fatness, 0);
+       penpos6(crook_thinness, -90);
+       labels(1,2,3,4,5,6);
+       penstroke z3e{dir 32} .. z4e{dir 30} .. z5e{down} .. {dir 220}z6e;
+       enddef;
+       
+def flat_symbol (expr w, d, h)=
+       save stemwidth, bottom_stem_thick, top_stem_thick, 
+               crook_thinness, crook_fatness;
+       stemwidth = stafflinethickness;
+       crook_fatness = 1/4 interline;
+       crook_thinness =  stemwidth;
+       bottom_stem_thick =  5/4 stemwidth;
+       top_stem_thick = 2 stemwidth;
+       flat_meta_symbol(w,d,h, stemwidth, crook_fatness, crook_thinness, 
+               bottom_stem_thick, top_stem_thick);
+       enddef;
+
+%
+% unfortunately, 600dpi is not enough to show the brush of the stem.
+%
+fet_beginchar("Flat", "-1", "flat")
+       set_char_box(0, 9/12 interline#, .5 interline#, 2 interline#);
+       flat_symbol (w, d, h);
+       fet_endchar;
+
+fet_beginchar("Double flat", "-2", "flatflat")
+       set_char_box(0, 18/12 interline#, .5 interline#, 2 interline#);
+       flat_symbol(w/2, d, h);
+       addto currentpicture also currentpicture
+               shifted (w/2 - stafflinethickness/2,0);
+       fet_endchar;
+       
+
+fet_beginchar("Double sharp", "2", "sharpsharp")
+       set_char_box(0, interline#, .5 interline#, .5 interline#);
+       save klaverblad, klaversteel;
+
+       klaversteel = 1/12 interline;
+       klaverblad = 1/3 interline;
+
+       z1 = (klaversteel, 0);
+       z2 = (w/2 - klaverblad / 10, h - klaverblad);
+       z3 = (w/2, h);
+       z4 = z2 reflectedabout((0,0), (1,1));
+       z5 = z1 reflectedabout((0,0), (1,1));
+
+       draw_rounded_path(  
+               z1{dir 45} .. {right}z2 -- z3 -- z4{down} .. {dir 225}z5 .. cycle,
+       1/20 interline);
+
+
+       addto currentpicture also currentpicture rotated 90;
+       addto currentpicture also currentpicture yscaled (-d/h);
+
+       currentpicture := currentpicture  shifted (w/2,0);
+       fet_endchar;
+
+
+fet_endgroup("accidentals");
+
index db857326d4f94c18ec495081f71185a60e6d6ce8..f857d77a583dc8228624f37b840bbf139ecacaec 100644 (file)
@@ -1,23 +1,45 @@
-% generated at Thu Oct  2 14:54:38 1997 from out/font-en-tja16.log
-% changes will be lost
+% generated automatically by  mf-to-table.py version 0.3
+% Do not edit
 
-% font-en-tja
-% balls
-\fetdef\wholeball{0}
-\fetdef\halfball{1}
-\fetdef\quartball{2}
-\fetdef\breveball{3}
-\fetdef\longaball{4}
+% input from out/font-en-tja16.log
+% name
+% rests
+\fetdef\wholerest{0}
+\fetdef\halfrest{1}
+\fetdef\outsidewholerest{2}
+\fetdef\outsidehalfrest{3}
+\fetdef\quartrest{4}
+\fetdef\eighthrest{5}
+\fetdef\sixteenthrest{6}
+\fetdef\thirtysecondrest{7}
+\fetdef\sixtyfourthrest{8}
+\fetdef\hundredtwentyeighthrest{9}
+
+% accidentals
+\fetdef\sharp{10}
+\fetdef\natural{11}
+\fetdef\flat{12}
+\fetdef\flatflat{13}
+\fetdef\sharpsharp{14}
 
-% almostrests
-\fetdef\quartrest{5}
-\fetdef\eighthrest{6}
-\fetdef\sixteenthrest{7}
-\fetdef\thirtysecondrest{8}
-\fetdef\sixtyfourthrest{9}
-\fetdef\hundredtwentyeighthrest{10}
+% dots
+\fetdef\dot{15}
+
+% balls
+\fetdef\wholeball{16}
+\fetdef\halfball{17}
+\fetdef\quartball{18}
+\fetdef\breveball{19}
+\fetdef\longaball{20}
 
 % foobars
-\fetdef\sharp{11}
-\fetdef\natural{12}
+\fetdef\ufermata{21}
+\fetdef\dfermata{22}
+\fetdef\accent{23}
+\fetdef\staccato{24}
+\fetdef\ustaccatissimo{25}
+\fetdef\dstaccatissimo{26}
+\fetdef\tenuto{27}
+\fetdef\umarcato{28}
+\fetdef\dmarcato{29}
 
index 38ca093ac86b31698145289d05908cbc087e46d8..ac5e3e9cb5e869f057cd1b79dca722761c400bc8 100644 (file)
@@ -1,23 +1,45 @@
-% generated at Thu Oct  2 14:54:38 1997 from out/font-en-tja20.log
-% changes will be lost
+% generated automatically by  mf-to-table.py version 0.3
+% Do not edit
 
-% font-en-tja
-% balls
-\fetdef\wholeball{0}
-\fetdef\halfball{1}
-\fetdef\quartball{2}
-\fetdef\breveball{3}
-\fetdef\longaball{4}
+% input from out/font-en-tja20.log
+% name
+% rests
+\fetdef\wholerest{0}
+\fetdef\halfrest{1}
+\fetdef\outsidewholerest{2}
+\fetdef\outsidehalfrest{3}
+\fetdef\quartrest{4}
+\fetdef\eighthrest{5}
+\fetdef\sixteenthrest{6}
+\fetdef\thirtysecondrest{7}
+\fetdef\sixtyfourthrest{8}
+\fetdef\hundredtwentyeighthrest{9}
+
+% accidentals
+\fetdef\sharp{10}
+\fetdef\natural{11}
+\fetdef\flat{12}
+\fetdef\flatflat{13}
+\fetdef\sharpsharp{14}
 
-% almostrests
-\fetdef\quartrest{5}
-\fetdef\eighthrest{6}
-\fetdef\sixteenthrest{7}
-\fetdef\thirtysecondrest{8}
-\fetdef\sixtyfourthrest{9}
-\fetdef\hundredtwentyeighthrest{10}
+% dots
+\fetdef\dot{15}
+
+% balls
+\fetdef\wholeball{16}
+\fetdef\halfball{17}
+\fetdef\quartball{18}
+\fetdef\breveball{19}
+\fetdef\longaball{20}
 
 % foobars
-\fetdef\sharp{11}
-\fetdef\natural{12}
+\fetdef\ufermata{21}
+\fetdef\dfermata{22}
+\fetdef\accent{23}
+\fetdef\staccato{24}
+\fetdef\ustaccatissimo{25}
+\fetdef\dstaccatissimo{26}
+\fetdef\tenuto{27}
+\fetdef\umarcato{28}
+\fetdef\dmarcato{29}