]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 0.1.58 release/0.1.58
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 21 Apr 1998 00:00:37 +0000 (02:00 +0200)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 21 Apr 1998 00:00:37 +0000 (02:00 +0200)
67 files changed:
AUTHORS.txt
Documentation/INSTALL.pod
Documentation/Makefile
Documentation/PATCHES.pod
Documentation/Rules.make
Documentation/engraving.bib [new file with mode: 0644]
Documentation/fonts.tex
INSTALL.txt
Makefile [deleted file]
NEWS
PATCHES.txt
TODO
VERSION
bin/conflily.sh
configure
configure.in
flower/Makefile
flower/include/interval.hh
flower/include/real.hh
flower/offset.cc
init/Makefile
input/clefs.ly [new file with mode: 0644]
input/sleur.ly
lily/VERSION
lily/beam.cc
lily/bezier.cc
lily/bow.cc
lily/clef-grav.cc
lily/clef-item.cc
lily/direction.cc
lily/include/bezier.hh
lily/include/bow.hh
lily/include/lookup.hh
lily/include/slur.hh
lily/include/tie.hh
lily/lookup.cc
lily/plet-spanner.cc
lily/slur.cc
lily/staff-side.cc
lily/tex-slur.cc [deleted file]
lily/tie.cc
make/Configure_variables.make.in [deleted file]
make/Makefile
make/Targets.make
make/Template.make
make/Toplevel.make.in
make/Variables.make
make/header-directory.make [deleted file]
make/lelievijver.lsm [deleted file]
make/lilypond.lsm [deleted file]
make/lilypond.lsm.in
make/lilypond.spec [deleted file]
make/lilypond.spec.in
make/out/lelievijver.lsm [new file with mode: 0644]
make/out/lilypond.lsm [new file with mode: 0644]
make/out/lilypond.spec [new file with mode: 0644]
mf/feta-beams16.mf [deleted file]
mf/feta-beams20.mf [deleted file]
mf/feta-beams26.mf [deleted file]
mf/feta-sleur.mf
mf/feta-watzieik.mf [deleted file]
mutopia/Coriolan/out/dummy.dep [new file with mode: 0644]
test/Makefile [new file with mode: 0644]
test/bow.cc [new file with mode: 0644]
test/out/dummy.dep [new file with mode: 0644]
tex/fetdefs.tex
tex/lily-ps-defs.tex

index c4e28e7233c077de263c288412c83ae5b3e259fc..c3f40ad67ec3dd868a1160e5da799bb59661f401 100644 (file)
@@ -61,7 +61,7 @@ CONTRIBUTORS
 
 
 
-6/Apr/98                 LilyPond 0.1.57                        1
+6/Apr/98                 LilyPond 0.1.58                        1
 
 
 
@@ -127,6 +127,6 @@ AUTHORS(1)            LilyPond documentation           AUTHORS(1)
 
 
 
-6/Apr/98                 LilyPond 0.1.57                        2
+6/Apr/98                 LilyPond 0.1.58                        2
 
 
index 7f032b20eaf31110f62642ecd6ddff233178536b..b1fd8f6f7652a66e0959b807b9baf95844550e0b 100644 (file)
@@ -68,7 +68,7 @@ GNU make.
 
 =item *
 
-Flex (version 2.5.1 or newer). 
+Flex (version 2.5.4 or newer). 
 
 =item *
 
index f10afdbf80017c3d0eb6fde5fba780e783d0ebe7..47df8c5935f7f5461e0f3c65dbe769db516c06ef 100644 (file)
@@ -39,7 +39,7 @@ giffiles=$(XPMS:.xpm=.gif)
 gifs: $(addprefix $(outdir)/, $(giffiles))
 
 
-EXTRA_DISTFILES = $(XPMS)  $(DOCFILES)  vocabulary-data vocabulary-forms.el fonts.tex automake.urgh
+EXTRA_DISTFILES = $(XPMS)  $(DOCFILES)  vocabulary-data vocabulary-forms.el fonts.tex automake.urgh engraving.bib
 
 # don't do DVI files. They can only be made if lily is installed
 do-doc: $(TEXTFILES)
index 6e5e1a134c831258e827f3d211d50acdd4805eb9..7fbc7480c0c6b2c9d76cfaa9f0a5e0e472e276d5 100644 (file)
@@ -44,7 +44,6 @@ In F<NEWS>, enter a summary of changes:
 
 Then, from the top of Lily's source tree, type
 
-    make distclean  # if you don't use --srcdir configure
     make-patch
 
 which leaves your patch as F<./patch-0.1.48.jcn1>.
@@ -114,120 +113,3 @@ Then, make a patch as shown above.
 Han-Wen Nienhuys <hanwen@cs.ruu.nl>
 
 Just keep on sending those patches!
-=head1 NAME
-
-PATCHES - track and distribute your code changes
-
-=head1 DESCRIPTION
-
-This page documents how to distribute your changes to GNU LilyPond
-
-=head1 ABSTRACT
-
-Distributing a change normally goes like this:
-
-=over 5
-
-=item *
-
-make your fix/add your code 
-
-=item *
-
-generate a patch, 
-
-=item *
-
-e-mail your patch to one of the mailing lists
-gnu-music-discuss@gnu.org or bug-gnu-music@gnu.org
-(or if you're a bit shy, to the maintainer).
-
-=back
-
-=head1 GENERATING A PATCH
-
-In F<VERSION>, set TOPLEVEL_MY_PATCH_LEVEL:
-
-    VERSION:
-       ...
-       TOPLEVEL_MY_PATCH_LEVEL = jcn1
-
-In F<NEWS>, enter a summary of changes:
-
-    NEWS:
-       pl 0.1.48.jcn1
-               - added PATCHES.pod
-
-Then, type something like
-
-    make-dist
-    mv out/lilypond-0.1.48.jcn1.tar.gz ../releases
-    make-patch
-
-which leaves your patch as F<./patch-0.1.48.jcn1>.
-
-or even simpler:
-
-    release
-
-    tar-ball: ../patches/patch-0.1.48.jcn1.gz
-    patch: ../patches/patch-0.1.48.jcn1.gz
-    updeet: ../test/updeet
-
-=head1 PREREQUISITES
-
-For creating a patch you need
-
-=over 5
-
-=item *
-
-All items mentioned in F<INSTALL>.  You're not going to send a patch
-that you haven't even built, right?
-
-=item *
-
-GNU Diff
-
-=item *
-
-Python (version 1.4 or newer).  
-You can of course make a patch by hand, which would go something like:
-
-    make distclean
-    cd ..
-    diff -urN lilypond-0.1.48 lilypond-0.1.48.jcn1 > patch-0.1.48.jcn1
-
-but there are handy python scripts available.  If you're doing development,
-you'll need Python for other LilyPond scripts anyway.
-
-=item *
-
-The Lily directory structure, which looks like:
-
-    lilypond-0.1.48/
-    patches/
-    releases/
-    test/
-
-=back
-       
-=head1 SYNCHRONISE
-
-If you're not very quick with sending your patch, there's a good chance
-that an new release of LilyPond comes available.  In such a case (and
-sometimes for other unkown reasons :-), the maintainer will probably ask
-you to make a new patch against the latest release.
-Your best bet is to download the latest release, and apply your patch
-against this new source tree:
-
-    cd lilypond-0.1.49
-    zpatch -p0 -E < ../patches/patch-0.1.48.jcn1.gz
-
-Then, make a patch as shown above.
-
-=head1 MAINTAINER
-
-Han-Wen Nienhuys <hanwen@cs.ruu.nl>
-
-Just keep on sending those patches!
index fd0b391a2e4a5ce353a9887a79f76587d2b27aa7..b8e14d7d8c6924a9da8c2f6b1075dc1138312540 100644 (file)
@@ -39,7 +39,6 @@ do_pod2html=$(POD2HTML5003)
 
 $(outdir)/%.html: %.pod $(depth)/VERSION
        $(do_pod2html) 
-#
 
 $(outdir)/%.5: %.pod
        $(pod2groff)
diff --git a/Documentation/engraving.bib b/Documentation/engraving.bib
new file mode 100644 (file)
index 0000000..5b8a1ba
--- /dev/null
@@ -0,0 +1,56 @@
+@Book{wanske,
+  author =      {Helene Wanske},
+  ALTeditor =   {},
+  title =       {Musiknotation --- Von der Syntax des Notenstichs zum
+EDV-gesteuerten Notensatz},
+  publisher =   {Schott-Verlag, Mainz},
+  year =        {1988},
+  OPTkey =      {},
+  OPTvolume =   {},
+  OPTnumber =   {},
+  OPTseries =   {},
+  OPTaddress =          {},
+  OPTedition =          {},
+  OPTmonth =    {},
+  OPTnote =     {ISBN 3-7957-2886-x},
+  OPTannote =   {}
+}
+
+
+@Book{rastall,
+  author =      {Richard Rastall},
+  ALTeditor =   {},
+  title =       {The Notation of Western Music: an
+Introduction},
+  publisher =   {J. M. Dent \6& Sons London},
+  year =        {1983},
+  OPTkey =      {},
+  OPTvolume =   {},
+  OPTnumber =   {},
+  OPTseries =   {},
+  OPTaddress =          {},
+  OPTedition =          {},
+  OPTmonth =    {},
+  OPTnote =     {},
+  OPTannote =   {}
+}
+
+@Book{ross,
+author =        {Ted Ross},
+  title =       {Teach yourself the art of music engraving and processing},
+  publisher =   {Hansen House},
+  year =        {1987},
+  OPTkey =      {},
+  OPTvolume =   {},
+  OPTnumber =   {},
+  OPTseries =   {},
+  OPTaddress =          {},
+  OPTedition =          {},
+  OPTmonth =    {},
+  OPTnote =     {This is about engraving, i.e.  professional typesetting.  It contains
+directions on good typesetting, but the sections on reproduction
+technicalities, how to use pens and history are interesting.
+Especially the section on Music Typewriters is amusing HWN},
+  OPTannote =   {}
+}
+
index 81c87e3c094818c71f47500d421c3cf08dcccf4e..e9c18ab9c4a4f0c87121af4363fab0537239be75 100644 (file)
@@ -8,10 +8,10 @@
 
 \section{Introduction}
 
-Feta (not an abbreviation of Font-En-Tja) is a font of music symbols.
-All MetaFont                   %ugh
-sources are original.  The symbols are modelled after
-various editions of music, notably
+This document are some design notes of the Feta font.  Feta (not an
+abbreviation of Font-En-Tja) is a font of music symbols.  All MetaFont
+%ugh sources are original.  The symbols are modelled after various
+editions of music, notably
 \begin{itemize}
 \item B\"arenreiter
 \item Hofmeister
@@ -25,16 +25,30 @@ is a matter of taste, I'd say that B\"arenreiter has the finest
 typography of all.
 
 
-\section{Bezier curves for simple slurs}
+\section{Bezier curves for slurs}
 
 Objective:  slurs in music are curved objects designating that notes
 should fluently bound.  They are drawn as smooth curves, with their
 center thicker and the endings tapered.
 
+There are some variants: the simplest slur shape only has the width as
+parameter.  Then we give some suggestions for tuning the shapes.  The
+simple slur algorithm is used for drawing ties as well.
+
+
+
+\subsection{Simple slurs}
+
 Long slurs are flat, whereas short slurs look like small circle arcs.
 Details are given in Wanske\cite{ross} and Ross\cite{wanske}.  The
 shape of a slur can be given as a Bezier curve with four control
-points.  We will assume that the slur connects two notes of the same
+points:
+
+\begin{eqnarray*}
+  B(t) &=& (1-t)^3c_1 +3(1-t)^2tc_2 + 3(1-t)t^2c_3 + t^3c_4.
+\end{eqnarray*}
+
+We will assume that the slur connects two notes of the same
 pitch.  Different slurs can be created by rotating the derived shape.
 We will also assume that the slur has a vertical axis of symmetry
 through its center.  The left point will be the origin.     So we have
@@ -64,6 +78,14 @@ $$
 For satisfying results we choose $h_{\infty} = 2\cdot \texttt{interline}$
 and $r_0 = \frac 13$.
 
+\subsection{Height correction}
+
+Aside from being a smooth curve, slurs should avoid crossing
+enclosed notes and their stems.
+
+An easy way to achieve this is to extend the slur's height,
+so that the slur will curve just above any disturbing notes.
+
 The parameter $i$ determines the flatness of the curve.  Satisfying
 results have been obtained with $i = h$.
 
@@ -81,11 +103,71 @@ $$
 
 The default values for these corrections are $0$.  A $h_{corr}$ that is
 negative, makes the curve flatter in the center.  A $h_{corr}$ that is
-positive make the curve higher.
+positive make the curve higher. 
 
+At every encompassed note's x position the difference $\delta _y$ 
+between the slur's height and the note is calculated.  The greatest 
+$\delta _y$ is used to calculate $h_{corr}$ is by lineair extrapolation.
 
-\section{Sizes}
+However, this simple method produces satisfactory results only for 
+small and symmetric disturbances.
+
+
+\subsection{Tangent method correction}
+
+A somewhat more elaborate\footnote{While staying in the realm 
+of emperic computer science} way of having a slur avoid 
+disturbing notes is by first defining the slur's ideal shape 
+and then using the height correction.  The ideal shape of a 
+slur can be guessed by calculating the tangents of the disturbing 
+notes:
+% a picture wouldn't hurt...
+\begin{eqnarray*}
+  y_{disturb,l} &=& \rm{rc}_l x\\
+  y_{disturb,r} &=& \rm{rc}_r + c_{3,x},
+\end{eqnarray*}
+where
+\begin{eqnarray*}
+  \rm{rc}_l &=& \frac{y_{disturb,l} - y_{encompass,1}}
+    {x_{disturb,l} - x_{encompass,1}}\dot x\\
+  \rm{rc}_r &=& \frac{y_{encompass,n} - y_{disturb,r}}
+    {x_{encompass,n} - x_{disturb,r}} \dot x + c_{3,x}.
+\end{eqnarray*}
+
+We assume that having the control points $c_2$ and $c_3$ located 
+on tangent$_1$ and tangent$_2$ resp. 
+% t: tangent
+\begin{eqnarray*}
+  y_{tangent,l} &=& \alpha \rm{rc}_l x\\
+  y_{tangent,r} &=& \alpha \rm{rc}_r + c_{3,x}.
+\end{eqnarray*}
+
+Beautiful slurs have rather strong curvature at the extreme
+control points.  That's why we'll have $\alpha > 1$.
+Satisfactory resulsts have been obtained with
+$$
+  \alpha \approx 2.4.
+$$
+
+The positions of control points $c_2$ and $c_3$ are obtained
+by solving with the height-line
+\begin{eqnarray*}
+  y_h &=& \rm{rc}_h + c_h.
+\end{eqnarray*}
 
+The top-line runs through the points disturb$_{left}$ and
+disturb$_{right}$.  In the case that 
+$$
+z_{disturb,l} = z_{disturb,r},
+$$
+we'll have 
+$$
+  \angle(y_{tangent,l},y_h) = \angle(y_{tangent,r},y_h).
+$$
+
+
+
+\section{Sizes}
 
 Traditional engraving uses a set of 9 standardised sizes for Staffs
 (running from 0 to 8).  
index 05998b7b4ce5f8dd6428354f3564b7d70bb5df50..43bc7f81268dd5f7a1fe80b6798443ea0ac9421a 100644 (file)
@@ -50,7 +50,7 @@ RECOMMENDED
 
        o    GNU make.
 
-       o    Flex (version 2.5.1 or newer).
+       o    Flex (version 2.5.4 or newer).
 
        o    Bison (version 1.25 or newer).  =item *
 
@@ -61,7 +61,7 @@ RECOMMENDED
 
 
 
-20/Mar/98                LilyPond 0.1.57                        1
+21/Apr/98                LilyPond 0.1.58                        1
 
 
 
@@ -127,7 +127,7 @@ CONFIGURING and COMPILING
 
 
 
-20/Mar/98                LilyPond 0.1.57                        2
+21/Apr/98                LilyPond 0.1.58                        2
 
 
 
@@ -193,7 +193,7 @@ INSTALLING
 
 
 
-20/Mar/98                LilyPond 0.1.57                        3
+21/Apr/98                LilyPond 0.1.58                        3
 
 
 
@@ -259,7 +259,7 @@ WINDOWS NT/95
 
 
 
-20/Mar/98                LilyPond 0.1.57                        4
+21/Apr/98                LilyPond 0.1.58                        4
 
 
 
@@ -325,7 +325,7 @@ MUSIXTEX
 
 
 
-20/Mar/98                LilyPond 0.1.57                        5
+21/Apr/98                LilyPond 0.1.58                        5
 
 
 
@@ -391,6 +391,6 @@ AUTHORS
 
 
 
-20/Mar/98                LilyPond 0.1.57                        6
+21/Apr/98                LilyPond 0.1.58                        6
 
 
diff --git a/Makefile b/Makefile
deleted file mode 100755 (executable)
index c058487..0000000
--- a/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-# -*-Makefile-*-
-########################################################
-# project  LilyPond -- the musical typesetter
-# title           top level makefile for LilyPond  
-# file    Makefile 
-#
-# Copyright (c) 1997 by    
-#      Jan Nieuwenhuizen <jan@digicash.com>
-#      Han-Wen Nienhuys <hanwen@stack.nl>
-
-# subdir level:
-#
-depth = .
-#
-
-# identify module:
-#
-NAME = lilypond
-SUBDIRS = bin flower lib lily mf mi2mu debian\
-       Documentation init input tex make mutopia
-include VERSION
-#
-
-# descent order into subdirectories:
-#
-
-# list of distribution files:
-#
-SCRIPTS = configure configure.in aclocal.m4
-README_FILES = BUGS DEDICATION ANNOUNCE-0.1 ANNOUNCE \
- COPYING ONEWS NEWS README TODO \
- INSTALL.txt AUTHORS.txt PATCHES.txt
-EXTRA_DISTFILES = config.make.in config.hh.in .dstreamrc mudela-mode.el VERSION $(README_FILES) $(SCRIPTS) 
-
-# do not dist ./Makefile (is copied from make/Toplevel.make)
-DISTFILES:=$(EXTRA_DISTFILES)
-#
-
-
-# generic targets and rules:
-#
-include ./$(depth)/make/Version.make
-include ./$(depth)/make/Variables.make 
-include ./$(depth)/make/Targets.make
-include ./$(depth)/make/Rules.make
-
-localdist: configure
-
-local-distclean: 
-       rm -f config.hh config.make Makefile config.cache config.status config.log
-
-Makefile: make/Toplevel.make.in
-       chmod +w $@
-       echo '# WARNING WARNING WARNING WARNING' > $@
-       echo '# do not edit! this is generated from make/Toplevel.make.in' >> $@
-       cat $< >> $@
-       chmod -w $@
-
diff --git a/NEWS b/NEWS
index 5a442c374978fdb64e533791b78a7bff6b82c8f9..1c262faf47e1183988aef5a8b01566bd335a9a30 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,22 @@
-
+pl 58
+       - more *.make hacking
+       - bracket fix (AG)
+       - clef fix (PC)
+
+pl 57.jcn1
+       - reincluded test/bow.cc
+       - promoted Bezier bows to standard
+         * bf's: broken slurs
+         * some bf's: verneukeratificering van JCN code
+         * some bezier slur doco
+         * calculate Ties with Bezier bow
+         * junked tex-slur.cc
+         * junked ps-slur code
+         * junked height-only slur-correction
+         * lots of bezier/slur fixes
+         * bezier:blow_fit
+
+**************
 pl 57
        - verneukeratificering van JCN code.
        - lots of updates on our own makefile system.
@@ -14,6 +32,10 @@ pl 57
        - solaris/irix patches (AO)
 
 
+pl 56.jcn5
+       - bezier and slur: cleaning and fixes
+       - bf: removed silly experimental beam feature
+
 pl 56.jcn4
        - reintruduced slope in bug [c8 c16 c16] in favour of stemlen bug...
        - staff-side: accent half line higher
index b3775b62c82638c8cdb3a1c42125f6d9047fbc59..6996afe212810904b0a0743f9a38cb13b2e8c52a 100644 (file)
@@ -37,7 +37,6 @@ GENERATING A PATCH
 
        Then, from the top of Lily's source tree, type
 
-           make distclean  # if you don't use --srcdir configure
            make-patch
 
        which leaves your patch as ./patch-0.1.48.jcn1.
@@ -57,77 +56,12 @@ PREREQUISITES
        o    All items mentioned in INSTALL.  You're not going to
             send a patch that you haven't even built, right?
 
-
-
-
-
-2/Apr/98                 LilyPond 0.1.57                        1
-
-
-
-
-
-PATCHES(1)            LilyPond documentation           PATCHES(1)
-
-
        o    GNU Diff
 
-       o    Python (version 1.4 or newer).  You can of course
-            make a patch by hand, which would go something like:
-
-                make distclean
-                cd ..
-                diff -urN lilypond-0.1.48 lilypond-0.1.48.jcn1 > patch-0.1.48.jcn1
-
-            but there are handy python scripts available.  If
-            you're doing development, you'll need Python for
-            other LilyPond scripts anyway.
-
-       o    The Lily directory structure, which looks like:
-
-                lilypond-0.1.48/
-                patches/
-                releases/
-                test/
-
-
-       If you're not very quick with sending your patch, there's
-       a good chance that an new release of LilyPond comes
-       available.  In such a case (and sometimes for other unkown
-       reasons :-), the maintainer will probably ask you to make
-       a new patch against the latest release.  Your best bet is
-       to download the latest release, and apply your patch
-       against this new source tree:
-
-           cd lilypond-0.1.49
-           zpatch -p0 -E < ../patches/patch-0.1.48.jcn1.gz
-
-       Then, make a patch as shown above.
-
-MAINTAINER
-       Han-Wen Nienhuys <hanwen@cs.ruu.nl>
-
-       Just keep on sending those patches!  =head1 NAME
-
-       PATCHES - track and distribute your code changes
-
-DESCRIPTION
-       This page documents how to distribute your changes to GNU
-       LilyPond
-
-ABSTRACT
-       Distributing a change normally goes like this:
-
-       o    make your fix/add your code
-
-       o    generate a patch,
-
-       o    e-mail your patch to one of the mailing lists gnu-
-            music-discuss@gnu.org or bug-gnu-music@gnu.org (or if
 
 
 
-2/Apr/98                 LilyPond 0.1.57                        2
+20/Apr/98                LilyPond 0.1.58                        1
 
 
 
@@ -136,46 +70,6 @@ ABSTRACT
 PATCHES(1)            LilyPond documentation           PATCHES(1)
 
 
-            you're a bit shy, to the maintainer).
-
-GENERATING A PATCH
-       In VERSION, set TOPLEVEL_MY_PATCH_LEVEL:
-
-           VERSION:
-               ...
-               TOPLEVEL_MY_PATCH_LEVEL = jcn1
-
-       In NEWS, enter a summary of changes:
-
-           NEWS:
-               pl 0.1.48.jcn1
-                       - added PATCHES.pod
-
-       Then, type something like
-
-           make-dist
-           mv out/lilypond-0.1.48.jcn1.tar.gz ../releases
-           make-patch
-
-       which leaves your patch as ./patch-0.1.48.jcn1.
-
-       or even simpler:
-
-           release
-
-           tar-ball: ../patches/patch-0.1.48.jcn1.gz
-           patch: ../patches/patch-0.1.48.jcn1.gz
-           updeet: ../test/updeet
-
-
-PREREQUISITES
-       For creating a patch you need
-
-       o    All items mentioned in INSTALL.  You're not going to
-            send a patch that you haven't even built, right?
-
-       o    GNU Diff
-
        o    Python (version 1.4 or newer).  You can of course
             make a patch by hand, which would go something like:
 
@@ -189,19 +83,6 @@ PREREQUISITES
 
        o    The Lily directory structure, which looks like:
 
-
-
-
-
-2/Apr/98                 LilyPond 0.1.57                        3
-
-
-
-
-
-PATCHES(1)            LilyPond documentation           PATCHES(1)
-
-
                 lilypond-0.1.48/
                 patches/
                 releases/
@@ -246,19 +127,6 @@ MAINTAINER
 
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-2/Apr/98                 LilyPond 0.1.57                        4
+20/Apr/98                LilyPond 0.1.58                        2
 
 
diff --git a/TODO b/TODO
index 27e0071ae7d8698723016db9d89444017be798da..8a8bdbaa23ddab01a78450f45ac268361a7ec61b 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,11 +9,13 @@ grep for TODO and ugh/ugr
 0.2:
        * junk embedded mf
 
-       * shared lib
+
+
 
        * ly2dvi seams to eat accents as in \'el\'egant
 
        * libtoolize flowerlib
+       * shared lib
 
        * bf: abbrevbeam? 
 
@@ -24,6 +26,7 @@ grep for TODO and ugh/ugr
        * check for groff / troff/ nroff et
 
        * latex quirk?
+
        * use kpsepath to find all TeX dirs
        - configure.in 
        - clean-fonts.sh
@@ -67,6 +70,21 @@ grep for TODO and ugh/ugr
        * stem len adjustable
 
 STUFF
+      * clefs: The names I'd like are of the form
+
+            [FGC]n{[_^]8}   F, G or C clef, on nth line, subscripted
+                            or superscripted with an 8.
+        So:                 
+            G, G2, treble, (== current `violin') G clef on second line.
+            F, F4, bass    (== current `bass' )  F clef on fourth line
+            G_8, G2_8      G clef on 2nd line, with 8 subscript
+            G^8            G clef on 2nd line with 8 superscript
+            C1, soprano    (==current `soprano') C clef on first line.
+            C2,            (==current `mezzosoprano') C clef on second line
+            C3, alto       (==current `alto')      C clef on third line
+            C4, tenor      (==current `tenor')     C clef on fourth line
+            C5             (==current `baritone') C clef on fifth line)
+
 
 
        * give Items/Spanners access to unbroken originals      
@@ -103,6 +121,8 @@ STUFF
        * AFM for font input?
 
 3RD PARTY BUGS:
+       * tried egcs 1.0.2: failed on lily/stem.cc -> flower/include/interval.hh
+         should narrow down and send bug report
 
        * xdvi: PS in magnifying glass.
 
diff --git a/VERSION b/VERSION
index e27a742c2cc96b988512a310a820b27b3e641559..6b52b51a7f1a5128ba236d70862b143c9431ed77 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 MAJOR_VERSION=0
 MINOR_VERSION=1
-PATCH_LEVEL=57
+PATCH_LEVEL=58
 MY_PATCH_LEVEL=
 
 # use the above to send patches, always empty for released version:
index 2eab5a059eea65eccfad3c44bc7f178c2651ae0f..dff069ab340af13c7ee6fe47ac5c6ff59eca1c71 100755 (executable)
@@ -29,9 +29,7 @@ if [ "x$LILYINCLUDE" = "x" ]; then
        echo "export MFINPUTS=$MFINPUTS:$lelie/current/mf"
 fi
 
-mkdir -p ../build
-(cd ../build; 
-ln -sf $lelie/build/lily/lilypond bin/lilypond
-ln -sf $lelie/build/mi2mu/mi2mu bin/mi2mu
-../current/configure --prefix=/usr --enable-debugging --enable-printing --enable-checking)
+ln -sf $lelie/current/lily/out/lilypond bin/lilypond
+ln -sf $lelie/current/mi2mu/out/mi2mu bin/mi2mu
+configure --prefix=/usr --enable-debugging --enable-printing --enable-checking
 
index 1de68df503cf64138c4debe21bec796aace40d66..5a09581ddb4150a914d5d60d9d123e8f4e6b8fe8 100755 (executable)
--- a/configure
+++ b/configure
@@ -2238,4 +2238,5 @@ test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
 rm -f Makefile
 cp make/Toplevel.make.in ./Makefile
-chmod 555 Makefile
+chmod 444 Makefile
+
index 8a85e74b773456d6b0f68cd0172a0c7a195e11d5..13bf8fd95f400577ca38320837518054d8692c75 100644 (file)
@@ -266,4 +266,5 @@ AC_OUTPUT(config.make)
 
 rm -f Makefile
 cp make/Toplevel.make.in ./Makefile
-chmod 555 Makefile
+chmod 444 Makefile
+
index 914663ff377ac55b82d624b516989cc40f12eb25..c970266bd6440c2d1f9f3caf00e0a81cda864612 100644 (file)
@@ -17,22 +17,6 @@ depth = ..
 #
 NAME = flower
 MODULE_NAME = flower
-#
-# edit VERSION only
-include ./$(depth)/VERSION
-include ./$(depth)/flower/VERSION
-
-# generic variables:
-#
-include ./$(depth)/make/Variables.make
-include ./$(depth)/make/Files.make 
-
-#include $(flowerout)/Flower-flags.make
-
-
-#
-# descent order into subdirectories:
-#
 SUBDIRS = include 
 #
 
@@ -41,17 +25,14 @@ SUBDIRS = include
 SCRIPTS = 
 README_FILES = ONEWS NEWS README TODO
 EXTRA_DISTFILES= VERSION $(README_FILES) $(SCRIPTS)
-#Flower-flags.make.in
-# aclocal.m4 configure config.hh.in configure.in
-
-
 
+include ./$(depth)/VERSION
+include ./$(depth)/flower/VERSION
 
-# generic targets and rules:
-#
+include ./$(depth)/make/Variables.make
+include ./$(depth)/make/Files.make 
 include ./$(depth)/make/Targets.make
 include ./$(depth)/make/Rules.make
-#
 
 default: the-lib
 
index 7a868a31ab9b92b8eac30849c01eae4c092613ac..2d7488aeeffa8efcbe71b7fc0a92006888bc8f1f 100644 (file)
@@ -26,7 +26,14 @@ struct Interval_t {
   static T infinity() ;
   static String T_to_str (T arg);
     
-  T center() { return (left + right) / T(2);}
+  // ugh, egcs 1.02 ices on this
+//  T center() { return (left + right) / T(2);}
+  // and can't handle this either
+  // anyone want to make a bug report?
+  T center() {
+    T two (2);
+    return (left + right) / two;
+  }
   void translate (T t) {
     left += t;
     right += t;
index 5b5bc26f7a13460174a9eaf54e6142b69cf0a53d..3b030c4cba429b9dbf14b396cc9d27c880343614 100644 (file)
@@ -17,7 +17,6 @@
 typedef double Real;
 const Real infinity_f = HUGE_VAL;
 
-
 template<class T> inline T abs (T x)
 {
   return x > 0 ? x : -x;
index ba1fee0075bdc80fda3dad0ea32771d58bd5d0ac..232967e675d4ea913df6d5833f51f62e5b0057b0 100644 (file)
@@ -11,6 +11,7 @@
 #include "offset.hh"
 
 
+#ifndef STANDALONE
 String
 Offset::str () const
 {
@@ -18,14 +19,14 @@ Offset::str () const
   s = String("(") + coordinate_a_[X_AXIS] + ", " + coordinate_a_[Y_AXIS] + ")";
   return s;
 }
-
+#endif
 
 Offset
 complex_multiply (Offset z1, Offset z2)
 {
   Offset z;
   z[X_AXIS] = z1[X_AXIS] * z2[X_AXIS] - z1[Y_AXIS]*z2[Y_AXIS];
-  z[Y_AXIS] = z1[X_AXIS] * z2[Y_AXIS] - z1[Y_AXIS] * z2[X_AXIS];
+  z[Y_AXIS] = z1[X_AXIS] * z2[Y_AXIS] + z1[Y_AXIS] * z2[X_AXIS];
   return z;
 }
 
index 1422d5d2aad20a8aa1fd54bce2352f06c1f1ed00..1e846bdbbf4da6b926de9a859d9eb4feb6d64c01 100644 (file)
@@ -1,17 +1,11 @@
 # init/Makefile
 
-
-# subdir level:
-#
 depth = ..
-#
 
 # generic stuff/Makefile
 #
 include ./$(depth)/make/Include.make
 
-# list of distribution files:
-# 
 INIFILES = $(wildcard *.ly)
 DISTFILES = Makefile $(INIFILES)
 
@@ -20,11 +14,9 @@ DISTFILES = Makefile $(INIFILES)
 FONT_FILES = $(wildcard $(depth)/mf/*[0-9].mf)
 TABLES = $(patsubst $(depth)/mf/%.mf,%.ly,$(FONT_FILES))
 
-
 localclean:
        rm -f $(TABLES)
 
-
 INSTALLATION_DIR=$(datadir)/lilypond/
 INSTALLATION_FILES=$(INIFILES)
 
diff --git a/input/clefs.ly b/input/clefs.ly
new file mode 100644 (file)
index 0000000..7722d99
--- /dev/null
@@ -0,0 +1,17 @@
+\score {
+       \melodic{ \octave c'; 
+         \clef "violin"; c1^"{violin}" \bar "||";
+         \clef "french";c1^"{french}" \bar "||";
+         \clef "soprano";c1^"{soprano}" \bar "||";
+         \clef "mezzosoprano";c1^"{mezzosoprano}" \bar "||";
+         \clef "alto";c1^"{alto}" \bar "||";
+         \clef "tenor";c1^"{tenor}" \bar "||";
+         \clef "baritone";c1^"{baritone}" \bar "||";
+         \clef "varbaritone";c1^"{varbaritone}" \bar "||";
+         \clef "bass";c1^"{bass}" \bar "||";
+         \clef "subbass";c1^"{subbass}" \bar "|.";
+         }
+         \paper{
+         }
+}
+
index 4ef5e88d9107a501af2908cfec2a28c4c4e39b2b..4dc4e08f6d7b560401c72390a29c9da714b523ac 100644 (file)
@@ -21,80 +21,167 @@ dirs = \melodic {
 
 complex = \melodic{
        \octave c';
-       'c16( 'e( 'g( 'b( d( f( a( c')))))))c4 c4 |
+       'c16( 'e( 'g( 'b( d( f( a( c'())))))))c4 c4 |
        \octave c''';
-       'c16( a( f( d( 'b( 'g( 'e( 'c)))))))c4 c4 |
+       'c16( a( f( d( 'b( 'g( 'e( 'c())))))))c4 c4 |
 }
 
-beum = \melodic{
+over = \melodic{
        \octave c'; 
-       [c8 c] c4 c4 c4 |
-}
 
-extend = \melodic{
-       \octave c;
-       c8(( c c )c c c c )c |
-       \[4/5c8( c c' c )c\]1/1 c c c c |
-       \[4/5c8( c c c c'\]1/1 c c c )c |
-       \[4/5c8( c c c c''\]1/1 c c c )c' |
-       \[4/5c8( c c c c'\]1/1 c c c )'c |
-       \[4/5c8( c c' c c\]1/1 c c c )c |
-       \[4/5c8( c c c ''c\]1/1 c c c )c |
-       \[4/5c8( c ''c c c\]1/1 c c c )c |
+       e( g' g' )e
+       e( a' a' )e
+       e( b' b' )e
+       e( c'' c'' )e
+       \stemup
+       e( c' c' )e
+       e( d' d' )e
+       e( e' e' )e
+       e( c'' c'' )e
+       \stemboth
+       e( f' b' )e
+       e( b' f' )e
+       e( e'' g' )e
+       e( g' e'' )e
+       \stemup
+       e( d' b )e
+       e( b d' )e
+       e( f' c'' )e
+       e( c'' f )e
 }
 
-extendbug = \melodic{
+under = \melodic{
        \octave c'; 
-       c4( c' c' )c
-       \stemup c'4( \stemdown e e \stemboth )c'
-       [c'8( b g a] [c' d' e' c'] [c' d' e' )c']
-       c( c' c' )c
-       e( g' g' )e
+       \stemdown 
+       f'( \stemboth d d \stemdown )f'
+       f'( \stemboth c c \stemdown )f'
+       f'( \stemboth 'b 'b \stemdown )f'
+       f'( \stemboth 'a 'a \stemdown )f'
+       \stemdown
+       f'( a a )f'
+       f'( g g )f'
+       f'( f f )f'
+       f'( 'a 'a )f'
 
+       \stemdown 
+       f'( \stemboth d 'b \stemdown )f'
+       f'( \stemboth 'b d \stemdown )f'
+       f'( \stemboth 'd 'b \stemdown )f'
+       f'( \stemboth 'b 'd \stemdown )f'
+       \stemdown
+       f'( f a )f'
+       f'( a f )f'
+       f'( f 'e )f'
+       f'( 'e f )f'
+}
+
+eccentric = \melodic{
+       \octave c';
+       \stemup
+       \[4/7 f( a' f f f f )f \] |
+       \[4/7 f( f f f f a' )f \] |
+       \stemdown
+       \[4/7 e'( c e' e' e' e' )e' \] |
+       \[4/7 e'( e' e' e' e' c )e' \] |
 }
 
-blend = \melodic{
-       \octave c; 
-       \stemdown; 
-%%         \[4/5c8( c ''c c c\]1/1 c c c )c |
-       \[4/5c8( c ''f c c\]1/1 c c c )c |
-
-       \[4/5c8( c \stemup ''f \stemdown c c\]1/1 c c c )c |
-       \stemup; 
-       \octave c''; 
-       \[4/5c8( c f'' c c\]1/1 c c c )c |
-       \[4/5c8( c \stemdown f'' \stemup c c\]1/1 c c c )c |
-       \stemboth;
-       c4( 'c16 'e 'g 'b d f a )'c16 c4 |
-       c4( 'c16 'e 'g 'b d f f )'c16 c4 |
+tiltup = \melodic{
        \octave c'; 
-       \stemdown; 
-       c( c'' c'' )c
-       \stemboth;
-       e( g' g' )e
-       e( g' g' )e
-       e( g' g' )e
-       e( g' g' )e
+       e( c'' c'' )e'
+       \stemup
+       e( c'' c'' )e'
+       \stemboth
+       e( g' e'' )e'
+       \stemup
+       e( c'' f )e'
+       \stemdown 
+       f'( \stemboth 'a 'a \stemdown )f''
+       \stemdown
+       f'( 'a 'a )f''
+}
+
+tiltdown = \melodic{
+       \octave c'; 
+       e'( c'' c'' )e
+       \stemup
+       e'( c'' c'' )e
+       \stemboth
+       e'( g' e'' )e
+       \stemup
+       e'( c'' f )e
+       \stemdown 
+       f''( \stemboth 'a 'a \stemdown )f'
+       \stemdown
+       f''( 'a 'a )f'
+}
+
+broken = \melodic{
+      \octave c'';
+      c c c c()
+      c c c c(
+      c )c c c(
+      c c )c c(
+      )a' a' a' a'()
+      a' a' a' a'()
+      c( c c )c 
+      c( c c )'f 
+      'f( c c )c 
+      'f( c c )'f
+}
+
+blend =        \melodic{
+       \octave c';
+       e( c'' c'' )e
+       \stemup
+       e( c'' c'' )e
+       \stemdown
+       f'( \stemboth 'a 'a \stemdown )f'
+       f'( 'a 'a )f'
+
+       \stemboth
+       e( c'' c'' )e'
+       e'( c'' c'' )e
+       d( d d )d
+
+       \stemdown
+       e( c'' c'' )e'
+       e'( c'' c'' )e
+       d( d d )d
+}
+
+
+bug = \melodic{
+       \octave c';
+       a()g( f )e
+       b'()a'( g' )f'
+       g( f' e' )d'
+       f f( g )a
+       c' () b () c' c'
 }
 
 \score{
        \melodic{ 
-               \blend
+               % use blend for fast check
+               %\blend
+% {
                \shortlong
                \dirs
                \complex
-               \beum
-               \octave c'; 
-               \stemup; 
-               \extend
-               \octave c''; 
-               \stemdown; 
-               \extend
-               \stemboth;
-               \extendbug
+               \over
+               \under
+               \eccentric
+               \tiltup
+               \tiltdown
+               \bug
+% }
+               % use broken with small linewidth
+               %\broken
        }
        \paper{ 
-%              castingalgorithm = \Wordwrap;
+             indent = 0.0\pt;
+               %for broken!
+               %linewidth= 40.\mm;
+               %castingalgorithm = \Wordwrap;
        }
 }
 
index 0523ff52f52607e82bc1d3c6b71dd72db46ce154..bd760860982a6dfb3a97da63a735f3763c460cf5 100644 (file)
@@ -1,4 +1,4 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 1
-PATCH_LEVEL = 57
+PATCH_LEVEL = 58
 MY_PATCH_LEVEL =
index 6ad3fe78c0b2cc8548f79b3b604701f6e994c5af..c3991ea3cabdcc53041c0cd04b125eb4a6ce642e 100644 (file)
@@ -29,7 +29,7 @@
 #include "lookup.hh"
 #include "grouping.hh"
 #include "stem-info.hh"
-#include "main.hh"  // experimental features
+//#include "main.hh"  // experimental features
 
 
 IMPLEMENT_IS_TYPE_B1 (Beam, Spanner);
@@ -450,7 +450,8 @@ Beam::set_stemlens ()
          s->set_stemend (left_y_ + slope_f_ * x);
          Real y = s->stem_length_f ();
          // duh: 
-         int mult_i = stems_[i]->beams_left_i_ >? stems_[i]->beams_right_i_;
+//       int mult_i = stems_[i]->beams_left_i_ >? stems_[i]->beams_right_i_;
+         int mult_i = multiple_i_;
          if (mult_i > 1)
              // dim(y) = internote
              y -= (Real)(mult_i - 1) * interbeam_f / internote_f;
@@ -588,7 +589,5 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
     Does beam quanting think  of the asymetry of beams? 
     Refpoint is on bottom of symbol. (FIXTHAT) --hwn.
    */
-  if (experimental_features_global_b && dir_ < 0)
-    leftbeams.translate_axis (-beamheight_f, Y_AXIS);
   return leftbeams;
 }
index 27b8329fc2c8a98e635396780ed5793519f65e31..f261d37c28e87fa0d3f7680f539f7b685e8c8d76 100644 (file)
@@ -8,7 +8,6 @@
 
 #include <math.h>
 #include "bezier.hh"
-#include "direction.hh"
 
 #ifndef STANDALONE
 #include "direction.hh"
@@ -24,7 +23,6 @@
 void
 Curve::flipy ()
 {
-  // ugh, Offset should have mirror funcs
   for (int i = 0; i < size (); i++)
     (*this)[i].mirror (Y_AXIS);
 }
@@ -52,8 +50,7 @@ Curve::largest_disturbing ()
 void
 Curve::rotate (Real phi)
 {
-  Offset rot (complex_exp (Offset (0,phi)));
-
+  Offset rot (complex_exp (Offset (0, phi)));
   for (int i = 1; i < size (); i++)
     (*this)[i] = complex_multiply (rot, (*this)[i]);
 }
@@ -65,16 +62,16 @@ Curve::translate (Offset o)
     (*this)[i] += o;
 }
 
-Bezier::Bezier (int steps)
+Bezier::Bezier ()
 {
   control_.set_size (4);
-  curve_.set_size (steps);
 }
 
-//from GNU gs3.33: ega.c
 void
-Bezier::calc ()
+Bezier::calc (int steps)
 {       
+  steps = steps >? 10;
+  curve_.set_size (steps);
   Real dt = 1.0 / curve_.size ();
   Offset c = 3.0 * (control_[1] - control_[0]);
   Offset b = 3.0 * (control_[2] - control_[1]) - c;
@@ -97,50 +94,32 @@ Bezier::set (Array<Offset> points)
 Real
 Bezier::y (Real x)
 {
-  if (x <= curve_[0].x ())
-    return curve_[0].y ();
+//  if (x <= curve_[0].x ())
+//    return curve_[0].y ();
   for (int i = 1; i < curve_.size (); i++ )
     {
-      if (x < curve_[i].x ())
-       //           ^ ? see below   
+      if (x < curve_[i].x () || (i == curve_.size () - 1))
        {
-         Real lin = (x - curve_[i-1].x ()) / (curve_[i] - curve_[i-1]).x ();
-         //                     ^ ?
-         return (curve_[i-1] + lin * (curve_[i] - curve_[i-1])).y ();
+         Offset z1 = curve_[i-1];
+         Offset z2 = curve_[i];
+         Real multiplier = (x - z2.x ()) / (z1.x () - z2.x ());
+         Real y = z1.y () * multiplier + (1.0 - multiplier) z2.y();
+
+         return y;
         }
     }
-  return curve_[curve_.size ()-1].y ();
+  assert (false);
+  // silly c++
+  return 0;
 }
 
 
 Bezier_bow::Bezier_bow (Paper_def* paper_l)
-  : Bezier(10)
 {
   paper_l_ = paper_l;
   return_.set_size (4);
 }
 
-/* 
-  from feta-sleur.ly
-
-       slurheightlimit#:=staffsize#/2;
-       sluralpha:=slurheightlimit#*pi/2;
-       % slurratio:=1/3;
-       slurratio:=0.3333;
-       slurbeta:=3/4*pi*slurratio/sluralpha;
-
-        b#:=length(dx#,dy#);
-        % ugh: huh? 2/5
-        indent#:=2/5*sluralpha*atan(slurbeta*b#);
-        height:=(indent+h)*d;
-        z1=(0,0);
-        z2=(b,0);
-        z3=(indent,height);
-        z4=(b-indent,height);
-
-       boogje:=boogje rotated angle(dxs,dys);
-*/
-
 void
 Bezier_bow::blow_fit ()
 {
@@ -149,13 +128,14 @@ Bezier_bow::blow_fit ()
     return;
 
   // be careful not to take too big step
-  Real f = 0.75;
+  Real f = 0.3;
   Real h1 = dy1 * f;
   control_[1].y () += h1; 
   control_[2].y () += h1; 
   return_[1].y () += h1; 
   return_[2].y () += h1; 
 
+  calc_bezier ();
   Real dy2 = check_fit_f ();
   if (!dy2)
     return;
@@ -189,9 +169,23 @@ Bezier_bow::blow_fit ()
   Real h = -b / a;
 
   control_[1].y () += -h1 +h; 
-  control_[2].y () = -h1 +h; 
-  return_[1].y () = -h1 +h;
-  return_[2].y () = -h1 +h; 
+  control_[2].y () += -h1 +h; 
+  return_[1].y () += -h1 +h;
+  return_[2].y () += -h1 +h; 
+}
+
+void
+Bezier_bow::calc_bezier ()
+{
+  Real s = sqrt (control_[3].x () * control_[3].x () 
+    + control_[1].y () * control_[2].y ());
+#ifndef STANDALONE
+  Real internote = paper_l_->internote_f ();
+#else
+  Real internote = STAFFHEIGHT / 8;
+#endif
+  int steps = (int)rint (s / internote);
+  Bezier::calc (steps);
 }
 
 Real
@@ -199,8 +193,9 @@ Bezier_bow::calc_f (Real height)
 {
   transform ();
   calc_default (height);
-  Bezier::calc ();
-  
+
+  calc_bezier ();
+
   Real dy = check_fit_f ();
   calc_return (0, 0);
 
@@ -213,7 +208,7 @@ Bezier_bow::calc ()
 {
   transform ();
   calc_default (0);
-  Bezier::calc ();
+  calc_bezier ();
   
   if (check_fit_bo ())
     calc_return (0, 0);
@@ -232,28 +227,25 @@ Bezier_bow::calc_return (Real begin_alpha, Real end_alpha)
 #ifndef STANDALONE
   Real thick = 1.8 * paper_l_->rule_thickness ();
 #else
-  Real thick = 10.0 * 1.8 * 0.4 PT;
+  Real thick = 1.8 * 0.4 PT;
 #endif
+
   return_[0] = control_[3];
+  return_[3] = control_[0];
 
   return_[1] = control_[2] - thick * complex_exp (Offset (0, 90 + end_alpha));
-  return_[2] = control_[1] - thick * complex_exp (Offset (0, 90 - begin_alpha));  
-  
-  /*
-  return_[1].x () = control_[2].x () - thick * cos (90 + end_alpha);
-  return_[1].y () = control_[2].y () - thick * sin (90 + end_alpha);
-  return_[2].x () = control_[1].x () - thick * cos (90 - begin_alpha);
-  return_[2].y () = control_[1].y () - thick * sin (90 - begin_alpha);
-  */
-  return_[3] = control_[0];
+  return_[2] = control_[1] 
+    - thick * complex_exp (Offset (0, 90 - begin_alpha));  
 }
 
+/*
+ [TODO]
+ Document algorithm in:
+ See Documentation/fonts.tex
+ */
 void
 Bezier_bow::calc_controls ()
 {
-  // ugh: tooo steep
-//  Real default_rc = atan (control_[1].y () / control_[1].x ());
-  
   Offset ijk_p (control_[3].x () / 2, control_[1].y ());
   SLUR_DOUT << "ijk: " << ijk_p.x () << ", " << ijk_p.y () << endl;
 
@@ -269,17 +261,16 @@ Bezier_bow::calc_controls ()
       begin_rc = default_rc;
     }
 
-  // ugh
   Curve reversed;
   reversed.set_size (encompass_.size ());
   Real b = control_[3].x ();
   for (int i = 0; i < encompass_.size (); i++ )
     {
-      reversed[i] = Offset (b,0) - encompass_[encompass_.size () - i -1];
-      /*
+      //       b     1  0
+      // r  =     -        *  c 
+      //       0     0 -1   
       reversed[i].x () = b - encompass_[encompass_.size () - i - 1].x ();
       reversed[i].y () = encompass_[encompass_.size () - i - 1].y ();
-      */
     }
 
   int end_disturb = reversed.largest_disturbing ();
@@ -312,11 +303,16 @@ Bezier_bow::calc_controls ()
   Real end_alpha = atan (-end_rc);
   Real theta = (begin_alpha - end_alpha) / 2;
 
+#ifndef STANDALONE
+  Real internote = paper_l_->internote_f ();
+#else
+  Real internote = STAFFHEIGHT / 8;
+#endif
+  Real epsilon = internote / 5;
+
   // if we have two disturbing points, have height line through those...
-  /*
-    UGH UGH UGH! NEVER compare floats with == 
-   */
-  if (!((begin_p.x () == end_p.x ()) && (begin_p.y () == end_p.y ())))
+  if (!((abs (begin_p.x () - end_p.x ()) < epsilon)
+    && (abs (begin_p.y () - end_p.y ()) < epsilon)))
       theta = atan (end_p.y () - begin_p.y ()) / (end_p.x () - begin_p.x ());
 
   Real rc3 = tan (theta);
@@ -374,10 +370,6 @@ Bezier_bow::transform ()
   encompass_.translate (-origin_);
 
   Offset delta = encompass_[encompass_.size () - 1] - encompass_[0];
-  /*
-  Real dx = encompass_[encompass_.size () - 1].x () - encompass_[0].x (); 
-  Real dy = encompass_[encompass_.size () - 1].y () - encompass_[0].y ();
-  */
 
   alpha_ = delta.arg ();
   encompass_.rotate (-alpha_);
@@ -408,6 +400,9 @@ Bezier_bow::transform_controls_back ()
   encompass_.translate (origin_);
 }
 
+/*
+ See Documentation/fonts.tex
+ */
 void
 Bezier_bow::calc_default (Real h)
 {
@@ -415,33 +410,26 @@ Bezier_bow::calc_default (Real h)
 #ifndef STANDALONE
   Real staffsize_f = paper_l_->get_var ("barsize");
 #else
-  Real staffsize_f = 16 PT;
+  Real staffsize_f = STAFFHEIGHT;
 #endif
 
   Real height_limit = staffsize_f;
-  Real alpha = height_limit * pi / 2.0;
   Real ratio = 1.0/3.0;
-  Real beta = 3.0/4.0 * pi * ratio/alpha;
-
 
-  Offset delta (encompass_[encompass_.size () - 1].x () - encompass_[0].x (), 0);
-
-  Real d = 1;
+  Real alpha = height_limit * 2.0 / pi;
+  Real beta = pi * ratio / (2.0 * height_limit);
 
+  Offset delta (encompass_[encompass_.size () - 1].x () 
+    - encompass_[0].x (), 0);
   Real b = delta.length ();
-  Real indent = 2.0/5.0 * alpha * atan (beta * b);
-  // ugh, ugly height hack, see lily-ps-defs.tex
-  Real height = (indent + h) * d;
+  Real indent = alpha * atan (beta * b);
+  Real height = indent + h;
  
-//  Offset control[4] = {0, 0, indent, height, b - indent, height, b, 0 };
   Array<Offset> control;
   control.push (Offset (0, 0));
   control.push (Offset (indent, height));
   control.push (Offset (b - indent, height));
   control.push (Offset (b, 0));
   Bezier::set (control);
-//  Real phi = dx ? atan (dy/dx) : sign (dy) * pi / 2.0;
-//  control.rotate (phi);
 }
 
index 9433f69a18d57bcc55f793e0c02e2b286c958680..8be81c4f61a867bed6f72256e8ae345b6131993a 100644 (file)
@@ -4,58 +4,84 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+      Jan Nieuwenhuizen <jan@digicash.com>
 */
 
 #include "bow.hh"
 #include "paper-def.hh"
 #include "molecule.hh"
 #include "lookup.hh"
+#include "bezier.hh"
 
 IMPLEMENT_IS_TYPE_B1(Bow,Directional_spanner);
 
 Bow::Bow ()
 {
-  dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0;
+  dy_f_drul_[LEFT] = dy_f_drul_[RIGHT] = 0.0;
   dx_f_drul_[LEFT] = dx_f_drul_[RIGHT] = 0.0;
 }
 
+Molecule*
+Bow::brew_molecule_p () const
+{
+  Molecule* mol_p = new Molecule;
+  
+  Real dy_f = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
+  
+  Real dx_f = width ().length ();
+  dx_f += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
+  
+  Atom a = paper ()->lookup_l ()->slur (get_controls ());
+
+  a.translate (Offset (dx_f + dx_f_drul_[LEFT], dy_f + dy_f_drul_[LEFT]));
+  mol_p->add (a);
+  return mol_p;
+}
 
 Offset
 Bow::center () const
 {
-  Real dy =  dy_f_drul_[RIGHT]-dy_f_drul_[LEFT];
+  Real dy = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
 
-  Real w = width ().length ();
+  Real dx = width ().length ();
 
-  return Offset (w/2,dy );
+  return Offset (dx / 2, dy);
 }
 
-Molecule*
-Bow::brew_molecule_p () const
+Interval
+Bow::do_width () const    
 {
-  Molecule*output = new Molecule;
-  Real w = width ().length ();
-  
-  Real dy_f = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
-  
-  Real nw_f = paper ()->note_width ();
-  
-  w+= (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
-  Real round_w = w;            // slur lookup rounds the slurwidth .
-  
-  Atom a = paper ()->lookup_l ()->slur (dy_f, round_w, height_f (), dir_);
-
-  Real error = w-round_w;
-  a.translate (Offset ( (dx_f_drul_[LEFT] + 0.5*nw_f)
-                      + error/2,
-                      dy_f_drul_[LEFT]));
-  output->add (a);
-  return output;
+  Interval i = Spanner::do_width ();
+  Real dx = i.length();
+  return Interval (0, dx);
 }
 
-Real
-Bow::height_f () const
+Array<Offset>
+Bow::get_controls () const
 {
-  return 0;
+  Bezier_bow b (paper ());
+  b.set (get_encompass_offset_arr (), dir_);
+  b.calc ();
+  Array<Offset> controls;
+  controls.set_size (8);
+  for (int i = 0; i < 4; i++)
+    controls[i] = b.control_[i];
+  for (int i = 0; i < 4; i++)
+    controls[i + 4] = b.return_[i];
+  return controls;
+}
+
+Array<Offset>
+Bow::get_encompass_offset_arr () const
+{
+  Real dx = width (). length ();
+  dx += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
+  Real dy = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
+
+  Array<Offset> notes;
+  notes.push (Offset (0,0));
+  notes.push (Offset (dx, dy));
+
+  return notes;
 }
 
index 5f9a9376e743c1ceb92e2f2a4e35219b8362ce00..5812e7fc5d0ceff10cf56ee7e745aaad8bfa980d 100644 (file)
@@ -29,7 +29,7 @@ bool
 Clef_engraver::set_type (String s)
 {
   clef_type_str_ = s;
-  if (clef_type_str_ == "violin")
+  if (clef_type_str_ == "violin" || clef_type_str_ == "G" || clef_type_str_ == "G2")
     c0_position_i_= -6;
   else if (clef_type_str_ == "french")
     c0_position_i_= -8;
@@ -45,12 +45,25 @@ Clef_engraver::set_type (String s)
     c0_position_i_ = 4;
   else if (clef_type_str_ == "varbaritone")
     c0_position_i_ = 4;
-  else if (clef_type_str_ == "bass")
+  else if (clef_type_str_ == "bass" || clef_type_str_ == "F")
     c0_position_i_= 6;
   else if (clef_type_str_ == "subbass")
     c0_position_i_ = 8;
   else
+    switch(clef_type_str_[0])
+    {
+    case 'F': case 'f':
+           c0_position_i_ = 2 * (clef_type_str_[1] - '0') - 2;
+           break;
+    case  'G': case 'g':
+           c0_position_i_ = 2 * (clef_type_str_[1] - '0') - 10;
+           break;
+    case 'C': case 'c':
+           c0_position_i_ = 2 * (clef_type_str_[1] - '0') - 6;
+           break;
+    default:
     return false;
+    }              
   
   return true;
 }
index b3b468047f9761507ab4b28ab4a00cbff159881c..0c5c56eb2241bf654451f09132ac829c88f97261 100644 (file)
@@ -34,6 +34,12 @@ Clef_item::Clef_item()
   read ("violin");
 }
 
+/*
+ * Convert input clef string to 
+ * a clef symbol and a line position.
+ * This would be better done in the lexer (more efficient)
+ * or as a table-lookup.
+ */
 void
 Clef_item::read (String t)
 {
@@ -42,42 +48,58 @@ Clef_item::read (String t)
     {
       y_position_i_ = -2;
     }
-  else if (t == "french") 
+  else if (t == "bass") 
+    {
+      y_position_i_ = 2;
+    }
+  else if (t == "G" || t == "G2" || t == "treble")
+    {
+      symbol_ = "violin";
+      y_position_i_ == -2;
+    }
+  else if (t == "french" || t == "G1") 
     {
       symbol_="violin";
       y_position_i_ = -4;
     }
-  else if (t == "soprano") 
+  else if (t == "soprano" || t == "C1"
     {
       symbol_="alto";
       y_position_i_ = -4;
     }
-  else if (t == "mezzosoprano")
+  else if (t == "mezzosoprano" || t == "C2")
     {
       symbol_ = "alto";
       y_position_i_ = -2;
     }
   else if (t == "alto") 
     {
+      symbol_ = "alto";
       y_position_i_ = 0;
     }
-  else if (t == "tenor") 
+  else if (t == "C3")
     {
-      symbol_="alto";
+      symbol_ = "alto";
+      y_position_i_ = 0;
+  }
+  else if (t == "tenor" || t == "C4") 
+  {
+      symbol_ = "alto";
       y_position_i_ = 2;
     }
-  else if (t == "baritone")
+  else if (t == "baritone" || t == "C5")
     {
       symbol_ = "alto";
       y_position_i_ = 4;
     }
-  else if (t == "varbaritone")
+  else if (t == "varbaritone" || t == "F3")
     {
       symbol_ = "bass";
       y_position_i_ = 0;
     }
-  else if (t == "bass") 
+  else if (t == "F" || t == "F4")
     {
+      symbol_ = "bass";
       y_position_i_ = 2;
     }
   else if (t == "subbass")
@@ -85,6 +107,21 @@ Clef_item::read (String t)
       symbol_ = "bass";
       y_position_i_ = 4;
     }
+  else if (isdigit(t[1]))
+         switch (t[0])
+         { // we've already dealt with plain F, G  or C clef 
+                 // position 0 is line 3.        
+         case 'G':
+         case 'g':
+                 symbol_ = "violin";
+                 y_position_i_ =   2 * (t[1] - '0') - 6;
+                 break;
+         case 'F':
+         case 'f':
+                 symbol_ = "bass";
+                 y_position_i_ = 2 * (t[1] - '0') - 6;
+                 break;
+         }
 }
 
 void
index a0e0e14a5010f92b056fa645398eb925c6247846..802418fce5ef7371d596ffc953d63e3e606499a8 100644 (file)
 
 String direction_str (Direction d, Axis a)
 {
-  if (!d)
-    return "center";
+  String s("center");
   if (a == Y_AXIS)
     {
-       return d == UP ? "up" : "down";
+       s =( d == UP ? "up" : "down");
     }
   else if (a == X_AXIS)
     {
-      return d == LEFT ? "left" : "right" ;
+      s = (d == LEFT ? "left" : "right" );
     }
+  return s;
 }
index f5c871ed059b006f741b3763878d6a69024a8574..d69fc9819636bf8eb7e5582932e0d8ad29e0053b 100644 (file)
 class Bezier
 {
 public:
-  Bezier (int steps_i);
+  Bezier ();
 
   /**
   Calculate bezier curve into Offset (x,y) array.
   */
-  void calc ();
+  void calc (int steps);
 
   void set (Array<Offset> points);
 
@@ -50,8 +50,9 @@ public:
    Calculate bezier curve for bow from bow parameters.
    */
   void blow_fit ();
-  Real calc_f (Real height);
   void calc ();
+  Real calc_f (Real height);
+  void calc_bezier ();
   void calc_controls ();
   void calc_default (Real h);
   void calc_return (Real begin_alpha, Real end_alpha);
index 88f96bc4297a20ff10b45a026c164e5af2d936b8..ffa9db31a4cdd2336436ec7cc8935f627ad6b181 100644 (file)
@@ -9,23 +9,30 @@
 
 #ifndef BOW_HH
 #define BOW_HH
+
 #include "directional-spanner.hh"
+#include "curve.hh"
 
 /**
   Base class for anything that looks like a slur.
   Anybody with a better name?
   */
-class Bow : public Directional_spanner {
-protected:
-  Drul_array<Real> dy_f_drul_;
-  Drul_array<Real> dx_f_drul_;
+class Bow : public Directional_spanner
+{
+public:
+  Bow ();
+  Offset center () const;  
+
+  DECLARE_MY_RUNTIME_TYPEINFO;
 
+protected:
   virtual Molecule* brew_molecule_p () const;
-  virtual Real height_f () const;
+  virtual Interval do_width () const;    
+  Array<Offset> get_controls () const;
+  virtual Array<Offset> get_encompass_offset_arr () const;
 
-public:
-  Bow();
-  DECLARE_MY_RUNTIME_TYPEINFO;
-  Offset center() const;  
+  Drul_array<Real> dy_f_drul_;
+  Drul_array<Real> dx_f_drul_;
 };
+
 #endif // BOW_HH
index 523a00b8657ecae2b0dd7c4df340b4d28db419c3..fa4463146e0d5331bd77f298c2a2b4142f22ad91 100644 (file)
@@ -52,18 +52,12 @@ struct Lookup {
   Atom bar (String, Real height) const;
     
   Atom dots () const;
-  Atom slur (Real &dy, Real &dx, Real ht, Direction dir) const;
-  Atom control_slur (Array<Offset> controls, Real dx, Real dy) const;
+  Atom slur (Array<Offset> controls) const;
   Atom plet (Real &dy, Real &dx, Direction dir) const;
-  Atom tex_slur (int dy, Real &dx, Direction dir) const;
-  Atom ps_slur (Real dy, Real dx, Real ht, Real dir) const;
-  Atom half_slur (int dy, Real &dx, Direction dir, int xpart) const;
-  Atom half_slur_middlepart (Real &dx, Direction dir) const;
-  Atom big_slur (int dy, Real &dx, Direction dir) const;
   Atom text (String style, String text, int align = 1) const;
   Atom script (String idx) const;
   Atom hairpin (Real & width, bool decresc, bool continued) const;
   Atom dynamic (String) const;
 };
 
-#endif
+#endif // LOOKUPSYMS_HH
index e3df46d0ae876590e50cb41231c7200c2062b002..07ceb99374a39e6edc21118669d7b63533da9505 100644 (file)
 #include "lily-proto.hh"
 #include "parray.hh"
 #include "bow.hh"
-#include "curve.hh"
 
 /**
   A #Bow# which tries to drape itself around the stems too.
  */
-class Slur : public Bow {
+class Slur : public Bow
+{
 public:
   Link_array<Note_column> encompass_arr_;
   void add (Note_column*);
 
+  Slur ();
+
+  SCORE_ELEM_CLONE(Slur);
+  DECLARE_MY_RUNTIME_TYPEINFO;
+
 protected:
-  virtual Molecule* brew_molecule_p () const;
-  Array<Offset> get_notes () const;
-  Array<Offset> get_controls () const;
+  virtual Array<Offset> get_encompass_offset_arr () const;
 
-  virtual void set_default_dir();
-  virtual void do_post_processing();
+  virtual void set_default_dir ();
+  virtual void do_post_processing ();
   virtual void do_add_processing ();
   virtual void do_pre_processing ();
   virtual void do_substitute_dependency (Score_elem*, Score_elem*);
-  virtual Real height_f () const;
-
-  SCORE_ELEM_CLONE(Slur);
-  DECLARE_MY_RUNTIME_TYPEINFO;
 };
 
 #endif // SLUR_HH
index 30673fc9eede1ea7fc21b7b96f40af37faeb0788..a1100653ae6d15d88cadd25f74a5496cc2050d1e 100644 (file)
 /**
   Connect two noteheads.
   */
-class Tie : public Bow {
-    virtual void do_add_processing();
-    virtual void do_post_processing();
-    virtual void set_default_dir();
-    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
-    
+class Tie : public Bow
+{
 public:
-    bool same_pitch_b_;
-    Drul_array<Note_head *> head_l_drul_;
-
+    Tie ();
     void set_head (Direction, Note_head*head_l);
 
-    Tie();
     DECLARE_MY_RUNTIME_TYPEINFO;
     SCORE_ELEM_CLONE(Tie);
+
+    bool same_pitch_b_;
+    Drul_array<Note_head *> head_l_drul_;
+
+protected:
+    virtual void do_add_processing ();
+    virtual void do_post_processing ();
+    virtual void set_default_dir();
+    virtual void do_substitute_dependency (Score_elem*,Score_elem*);
+    Array<Offset> get_controls () const;
 };
 #endif // TIE_HH
index 1ee100caa92dd2ea6c9d2bbefed756c604f7e465..5b0054084d6c6d5a2965dccc77a701916b152ae3 100644 (file)
@@ -19,6 +19,7 @@
 #include "tex.hh"
 #include "scalar.hh"
 #include "paper-def.hh"
+#include "string-convert.hh"
 #include "main.hh"
 
 Lookup::Lookup()
@@ -145,6 +146,45 @@ Lookup::flag (int j, Direction d) const
   return (*symtables_p_)("flags")->lookup (c + String (j));
 }
 
+Atom
+Lookup::slur (Array<Offset> controls) const
+{
+  assert (postscript_global_b);
+  assert (controls.size () == 8);
+
+  String ps = "\\embeddedps{\n";
+  
+#if 1
+  for (int i = 1; i < 4; i++)
+    ps += String_convert::double_str (controls[i].x ()) + " "
+      + String_convert::double_str (controls[i].y ()) + " ";
+
+  Real dx = controls[3].x ();
+  Real dy = controls[3].y ();
+  for (int i = 5; i < 8; i++)
+    ps += String_convert::double_str (controls[i].x () - dx) + " "
+      + String_convert::double_str (controls[i].y () - dy) + " ";
+#else
+  // this would be nice
+  for (int i = 1; i < 4; i++)
+    ps += String_convert::double_str (controls[i].x ()) + " "
+      + String_convert::double_str (controls[i].y ()) + " ";
+
+  for (int i = 5; i < 8; i++)
+    ps += String_convert::double_str (controls[i].x ()) + " "
+      + String_convert::double_str (controls[i].y ()) + " ";
+#endif
+
+  ps += " draw_slur}";
+
+  Atom s;
+  s.tex_ = ps;
+  
+  s.dim_[X_AXIS] = Interval (0, dx);
+  s.dim_[Y_AXIS] = Interval (0 <? dy,  0 >? dy);
+  return s;
+}
+
 Atom
 Lookup::streepje (int type) const
 {
@@ -298,4 +338,3 @@ Lookup::vbracket (Real &y) const
   return bracket;
 }
 
-
index 6787088b0e2bf4d9c014508b8c92e7d91bea601e..bb9980c263cdbc6897a0cf423e428338ab1dd07a 100644 (file)
@@ -65,7 +65,7 @@ Plet_spanner::brew_molecule_p () const
   Real interline_f = paper ()->interline_f ();
   Real numy_f = (dir_ > 0 ? 0 : -interline_f) + dir_ * interline_f / 2;
   Atom num (tdef_p_->get_atom (paper (), CENTER));
-  num.translate (Offset (width ().length ()/ 2 + dx_f_drul_[LEFT], 
+  num.translate (Offset (width ().length () / 1.8 + dx_f_drul_[LEFT], 
     dy_f_drul_[LEFT] + dy_f / 2 + numy_f));
 
   if (visibility_i_ >= 1)
index fcc57eab1d7050b16affe003f82451fd585ff07a..3e8cbdfe26d5eb40667d4bd5a07fc1bb4297f792 100644 (file)
@@ -4,14 +4,16 @@
   source file of the GNU LilyPond music typesetter
 
   (c) 1996, 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+    Jan Nieuwenhuizen <jan@digicash.com>
 */
 
 /*
-  TODO:
-  
-  think about crossing stems.
-  Begin and end should be treated as a Script.
+  [TODO]
+    * begin and end should be treated as a Script.
+    * damping
+    * slur from notehead to stemend: c''()b''
  */
+
 #include "slur.hh"
 #include "scalar.hh"
 #include "lookup.hh"
 #include "debug.hh"
 #include "boxes.hh"
 #include "bezier.hh"
-#include "main.hh"
 
-IMPLEMENT_IS_TYPE_B1(Slur,Spanner);
+//IMPLEMENT_IS_TYPE_B1(Slur,Spanner);
+IMPLEMENT_IS_TYPE_B1(Slur,Bow);
+
+Slur::Slur ()
+{
+}
 
 void
 Slur::add (Note_column*n)
@@ -118,97 +124,38 @@ Slur::do_post_processing ()
        {
          dx_f_drul_[d] = -d 
            *(spanned_drul_[d]->width ().length () -0.5*nw_f);
+         Direction u = d;
+         flip(&u);
+         if ((extrema[u] == spanned_drul_[u]) && extrema[u]->stem_l_)
+           {
+             dy_f_drul_[d] = extrema[u]->stem_l_->height ()[dir_];
+             dy_f_drul_[u] = extrema[u]->stem_l_->height ()[dir_];
+           }
        }
       else if (extrema[d]->stem_l_ && !extrema[d]->stem_l_->transparent_b_) 
         {
          dy_f_drul_[d] = (int)rint (extrema[d]->stem_l_->height ()[dir_]);
-         /* normal slur from notehead centre to notehead centre, minus gap */
-         // ugh: diff between old and new slurs
-         if (!experimental_features_global_b)
-           dx_f_drul_[d] += -d * gap_f;
-         else
-           dx_f_drul_[d] += 0.5 * nw_f - d * gap_f;
+         dx_f_drul_[d] += 0.5 * nw_f - d * gap_f;
+         if (dir_ == extrema[d]->stem_l_->dir_)
+           {
+             if (dir_ == d)
+               dx_f_drul_[d] += 0.5 * (dir_ * d) * d * nw_f;
+             else
+               dx_f_drul_[d] += 0.25 * (dir_ * d) * d * nw_f;
+           }
        }
       else 
         {
-         dy_f_drul_[d] = (int)rint (extrema[d]->head_positions_interval ()[dir_])* inter_f;
+         dy_f_drul_[d] = (int)rint (extrema[d]->head_positions_interval ()
+           [dir_])* inter_f;
        }
       dy_f_drul_[d] += dir_ * interline_f;
     }
   while (flip(&d) != LEFT);
 }
 
-Real
-Slur::height_f () const
-{
-  Bezier_bow bow (paper ());
-  Array<Offset> notes = get_notes ();
-  bow.set (notes, dir_);
-
-  Real height = 0;
-  Real dy1 = bow.calc_f (height);
-  if (!dy1)
-    return height;
-
-  height = dy1;
-  bow.set (notes, dir_);
-  Real dy2 = bow.calc_f (height);
-  if (!dy2)
-    return height;
-
-  if (abs (dy2 - dy1) < paper ()->rule_thickness ())
-    return height;
-  
-  /*
-    Assume 
-      dy = B (h) 
-    with 
-      B (h) = a * h + b;
-
-    Then we get for height = h{dy=0}
-   */
-  Real a = (dy2 - dy1) / dy1;
-  Real b = dy1;
-  height = -b / a;
-    
-  if (check_debug && !monitor->silent_b ("Slur")) 
-    { 
-      cout << "************" << endl;
-      cout << "dy1: " << dy1 << endl;
-      cout << "dy2: " << dy2 << endl;
-      cout << "a: " << a << endl;
-      cout << "b: " << b << endl;
-      cout << "h: " << height << endl;
-    }
-
-  return height;
-}
-
-Molecule*
-Slur::brew_molecule_p () const
-{
-  if (!experimental_features_global_b)
-    return Bow::brew_molecule_p ();
-
-  Molecule* mol_p = new Molecule;
-  
-  Real dy_f = dy_f_drul_[RIGHT] - dy_f_drul_[LEFT];
-  
-  Real dx_f = width ().length ();
-  dx_f += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
-  
-  Atom a = paper ()->lookup_l ()->control_slur (get_controls (), dx_f, dy_f);
-
-  Real interline_f = paper ()->interline_f ();
-  Real gap_f = interline_f / 2; // 5;
-  Real nw_f = paper ()->note_width ();
-  a.translate (Offset (dx_f + 0.5 * nw_f + gap_f, dy_f + dy_f_drul_[LEFT]));
-  mol_p->add (a);
-  return mol_p;
-}
-
 Array<Offset>
-Slur::get_notes () const
+Slur::get_encompass_offset_arr () const
 {
   Real interline = paper ()->interline_f ();
   Real notewidth = paper ()->note_width ();
@@ -216,86 +163,76 @@ Slur::get_notes () const
 
   Stem* left_stem = encompass_arr_[0]->stem_l_;
   Real left_x = left_stem->hpos_f ();
-  // ugh, do bow corrections (see brew_mol)
-  left_x += dx_f_drul_[LEFT] + 0.5 * notewidth;
+  left_x += dx_f_drul_[LEFT];
 
-  // ugh, do bow corrections (see brew_mol)
   Real left_y = dy_f_drul_[LEFT];
-  // ugh, where does this asymmetry come from?
-  if (dir_ == DOWN)
-    left_y -= dir_ * internote;
-
-  /*
-    urg, corrections for broken slurs: extra begin or end position 
-   */
-  int first = 0;
-  int n = encompass_arr_.size ();
-  if (encompass_arr_[0] != spanned_drul_[LEFT])
-    {
-      n += 1;
-      first = 1;
-      left_x = spanned_drul_[LEFT]->width ().length ();
-      left_y = 0;
-    }
-  if (encompass_arr_.top () != spanned_drul_[RIGHT])
-      n += 1;
-
-  Array<Offset> notes;
-  notes.set_size (n);
 
   Real dx = width ().length ();
   dx += (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]);
   dx = dx <? 1000;
   dx = dx >? 2 * interline;
-    
+
   Real dy = (dy_f_drul_[RIGHT] - dy_f_drul_[LEFT]);
   if (abs (dy) > 1000)
     dy = sign (dy) * 1000;
 
-  notes[0].x () = 0;
-  notes[0].y () = 0;
-  notes[n - 1].x () = dx;
-  notes[n - 1].y () = dy;
-  for (int i = 1; i < n - 1; i++)
+  int first = 1;
+  int last = encompass_arr_.size () - 1;
+  if (encompass_arr_[0] != spanned_drul_[LEFT])
     {
-      Stem* stem = encompass_arr_[i - first]->stem_l_;
+      first = 0;
+      left_x = spanned_drul_[LEFT]->width ().length ();
+      left_x -= 2 * notewidth;
+//      left_y = 0;
+      Stem* stem = encompass_arr_[last]->stem_l_;
+      left_y = stem->dir_ == dir_ ? stem->stem_end_f ()
+       : stem->stem_begin_f () + 0.5 * dir_;
+      dy = 0;
+    }
+  if (encompass_arr_.top () != spanned_drul_[RIGHT])
+    {
+      last += 1;
+      dy = 0;
+    }
+
+  Array<Offset> notes;
+  notes.push (Offset (0,0));
+  for (int i = first; i < last; i++)
+    {
+      Stem* stem = encompass_arr_[i]->stem_l_;
       /* 
        set x to middle of notehead or on exact x position of stem,
        according to slur direction
           */
-      Real x = stem->hpos_f () - left_x + notewidth / 2;
+      Real x = stem->hpos_f ();
+
       if (stem->dir_ != dir_)
-       x += notewidth / 2;
+       x += 0.5 * notewidth;
       else if (stem->dir_ == UP)
-       x += notewidth;
+       x += 1.0 * notewidth;
+
+      x -= left_x;
+
       Real y = stem->dir_ == dir_ ? stem->stem_end_f ()
-       : stem->stem_begin_f () + 2.5 * dir_;
+       : stem->stem_begin_f () + 0.5 * dir_;
 
       /*
        leave a gap: slur mustn't touch head/stem
        */
       y += 2.5 * dir_;
+
+      // ugh: huh?
+      if (dir_ == DOWN)
+       y += 1.5 * dir_;
+
       y *= internote;
       y -= left_y;
 
-      notes[i].x () = x;
-      notes[i].y () = y;
+      notes.push (Offset (x, y));
     }
-  return notes;
-}
 
-Array<Offset>
-Slur::get_controls () const
-{
-  Bezier_bow b (paper ());
-  b.set (get_notes (), dir_);
-  b.calc ();
-  Array<Offset> controls;
-  controls.set_size (8);
-  for (int i = 0; i < 4; i++)
-    controls[i] = b.control_[i];
-  for (int i = 0; i < 4; i++)
-    controls[i + 4] = b.return_[i];
-  return controls;
+  notes.push (Offset (dx, dy));
+
+  return notes;
 }
 
index 99476a6206a1a326108dc71585c017a4b691ab7e..404283066c1378ece2d9cd41b932bf05c7ad5222 100644 (file)
@@ -69,12 +69,17 @@ Staff_side::get_position_f () const
   Interval v = support_height();
 
   // ugh, dim[y] = PT over here
-  y = v[dir_] + 2 * dir_ * inter_f;
+  y = v[dir_] + 1 * dir_ * inter_f;
 
   int y_i = (int)rint (y / inter_f);
   // ugh: 5 -> staff_lines
-  if ((abs (y_i) < 5) && !(abs (y_i) % 2))
-    y += (Real)dir_ * inter_f;
+  if (abs (y_i) < 5)
+    {
+      if (!(abs (y_i) % 2))
+       y += (Real)dir_ * inter_f;
+    }
+//  else
+//    y = v[dir_] + 1 * dir_ * inter_f;
 
   return y;
 }
diff --git a/lily/tex-slur.cc b/lily/tex-slur.cc
deleted file mode 100644 (file)
index ab86f27..0000000
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
-  tex-slur.cc -- implement Lookup::*slur
-
-  source file of the GNU LilyPond music typesetter
-
-  (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#include <math.h>
-#include "main.hh"
-#include "misc.hh"
-#include "lookup.hh"
-#include "molecule.hh"
-#include "dimen.hh"
-#include "debug.hh"
-#include "paper-def.hh"
-#include "string-convert.hh"
-#include "main.hh"
-
-static char
-direction_char (Direction y_sign)
-{
-  char c='#';
-  switch (y_sign)
-    {
-    case DOWN:
-      c = 'd';
-      break;
-    case CENTER:
-      c = 'h';
-      break;
-    case UP:
-      c = 'u';
-      break;
-    default:
-      assert (false);
-    }
-  return c;
-}
-
-Atom
-Lookup::half_slur_middlepart (Real &dx, Direction dir) const
-{
-  // todo
-  if (dx >= 400 PT)
-    {
-      WARN<<_("halfslur too large") <<print_dimen (dx)<< _("shrinking (ugh)\n");
-      dx = 400 PT;
-    }
-  int widx = int (floor (dx / 4.0));
-  dx = widx * 4.0;
-  if (widx) widx --;
-  else
-    {
-      WARN <<  _("slur too narrow\n");
-    }
-
-  Atom s;
-
-  s.dim_[Y_AXIS] = Interval (min (0, 0), max (0, 0)); // todo
-  s.dim_[X_AXIS] = Interval (-dx/2, dx/2);
-
-  String f =  String ("\\hslurchar");
-  f += direction_char (CENTER);
-
-  int idx = widx;
-  if (dir < 0)
-    idx += 128;
-
-  assert (idx < 256);
-
-  f +=String ("{") + String (idx) + "}";
-  s.tex_ = f;
-  s.translate_axis (dx/2, X_AXIS);
-
-  return s;
-}
-
-/*
-   The halfslurs have their center at the end pointing away from the notehead.
-   This lookup translates so that width() == [0, w]
- */
-
-Atom
-Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const
-{
-  Real orig_dx = dx;
-  if (!xpart)
-    return half_slur_middlepart (dx, dir);
-
-  int widx;
-
-  if (dx >= 96 PT)
-    {
-      WARN << _("Slur half too wide.") << print_dimen (orig_dx) << _(" shrinking (ugh)\n");
-      dx =  96 PT;
-    }
-
-  widx = int (rint (dx/12.0));
-  dx = widx*12.0;
-  if (widx)
-    widx --;
-  else
-    {
-      WARN <<  _("slur too narrow ") << print_dimen (orig_dx)<<"\n";
-    }
-
-  Atom s;
-  s.dim_[X_AXIS] = Interval (0, dx);
-  s.dim_[Y_AXIS] = Interval (min (0, dy), max (0, dy));
-
-
-  String f = String ("\\hslurchar");
-
-  f+= direction_char (dir);
-
-  int hidx = dy;
-  if (hidx <0)
-    hidx = -hidx;
-  hidx --;
-  int idx =-1;
-
-  idx = widx * 16 + hidx;
-  if (xpart < 0)
-    idx += 128;
-
-  assert (idx < 256);
-  f+=String ("{") + String (idx) + "}";
-
-  s.tex_ = f;
-
-  return s;
-}
-
-Atom
-Lookup::ps_slur (Real dy , Real dx, Real ht, Real dir) const
-{
-  String ps = "\\embeddedps{\n";
-  
-  ps += String_convert::double_str (dx) + " " 
-    + String_convert::double_str (dy) + " "
-    + String_convert::double_str (ht) + " "
-    + String_convert::double_str (dir) +
-    " draw_slur}";
-
-  /*
-   slurs are rarely wider than 100pt: 
-   precision of 3 yields maximum (slur spanning page)
-   error of: 1%% * 6*72pt === 0.4pt = 0.14 mm
-   */
-  String dx_str = String_convert::precision_str (dx, 4);
-  String dy_str = String_convert::precision_str (dy, 3);
-  String ht_str = String_convert::precision_str (ht, 3);
-  String dir_str = String_convert::int_str ((int)dir);
-  String name = "feta-sleur-" + dx_str + "-" + dy_str + "-" + ht_str + "-" + dir_str;
-  int i = name.index_i ('.');
-  while (i != -1)
-    {
-      *(name.ch_l () + i) = 'x';
-      i = name.index_i ('.');
-    }
-
-  String mf = "\\embeddedmf{" + name + "}{\n";
-  mf += "mode_setup;\n";
-  mf += "staffsize\\#:=" 
-    + String_convert::int_str ((int)paper_l_->get_var ("barsize"), "%d")
-    + "pt\\#;\n";
-  mf += "interline#:=staffsize#/4;\n";
-  mf += "stafflinethickness#:=0.1interline#;\n";
-  mf += "input feta-sleur;\n";
-  mf += "slurchar(" + dx_str + "," + dy_str + "," + ht_str + "," + dir_str + ");\n";
-  mf += "end.\n";
-  mf += "}\n";
-
-  Atom s;
-  s.tex_ = ps;
-  if (embedded_mf_global_b)
-    s.tex_ += mf;
-  return s;
-}
-
-Atom
-Lookup::tex_slur (int dy , Real &dx, Direction dir) const
-{
-  assert (abs ((int)dir) <= 1);
-  Atom s;
-  Direction y_sign = (Direction) sign (dy);
-
-  bool large = abs (dy) > 8;
-
-  if (y_sign)
-    {
-      large |= dx>= 4*16 PT;
-    }
-  else
-    large |= dx>= 4*54 PT;
-
-  if (large)
-    {
-      s = big_slur (dy, dx, dir);
-      return s;
-    }
-  Real orig_dx = dx;
-  int widx = int (floor (dx/4.0)); // slurs better too small..
-  dx = 4.0 * widx;
-  if (widx)
-    widx --;
-  else
-    {
-      WARN <<  _("slur too narrow: ") << print_dimen (orig_dx) << "\n";
-    }
-
-  int hidx = dy;
-  if (hidx <0)
-    hidx = -hidx;
-  hidx --;
-  if (hidx > 8)
-    {
-      WARN<<_("slur to steep: ") << dy << _(" shrinking (ugh)\n");
-    }
-
-  String f = String ("\\slurchar") + String (direction_char (y_sign));
-
-  int idx=-1;
-  if (y_sign)
-    {
-      idx = hidx * 16 + widx;
-      if (dir < 0)
-       idx += 128;
-    }
-  else
-    {
-      if (dx >= 4*54 PT)
-       {
-         WARN << _("slur too wide: ") << print_dimen (dx) <<
-           _(" shrinking (ugh)\n");
-         dx = 4*54 PT;
-       }
-      idx = widx;
-      if (dir < 0)
-       idx += 54;
-    }
-
-  assert (idx < 256);
-  f+=String ("{") + String (idx) + "}";
-  s.tex_ = f;
-  s.translate_axis (dx/2, X_AXIS);
-  return s;
-}
-
-Atom
-Lookup::big_slur (int dy , Real &dx, Direction dir) const
-{
-  if (dx < 24 PT)
-    {
-      warning (_("big_slur too small ") + print_dimen (dx) + _(" (stretching)"));
-      dx = 24 PT;
-    }
-
-  Real slur_extra =abs (dy)  /2.0 + 2;
-  int l_dy = int (Real (dy)/2 + slur_extra*dir);
-  int r_dy =  dy - l_dy;
-
-  Real internote_f = paper_l_->internote_f();
-  Real left_wid = dx/4.0;
-  Real right_wid = left_wid;
-
-  Atom l = half_slur (l_dy, left_wid, dir, -1);
-
-
-  Atom r = half_slur (r_dy, right_wid, dir, 1);
-  Real mid_wid = dx - left_wid - right_wid;
-
-  Molecule mol;
-  mol.add (l);
-  Atom a (half_slur (0, mid_wid, dir, 0));
-  mol.add_at_edge (X_AXIS, RIGHT, a);
-  mol.add_at_edge (X_AXIS, RIGHT, r);
-
-  mol.translate_axis (l_dy * internote_f, Y_AXIS);
-  Atom s;
-  s.tex_ = mol.TeX_string();
-  s.dim_ = mol.extent();
-  return s;
-}
-
-
-Atom
-Lookup::slur  (Real &dy_f , Real &dx, Real ht, Direction dir) const
-{
-  if  (dx < 0)
-    {
-      warning (_("Negative slur/tie length: ") + print_dimen (dx));
-      dx = 4.0 PT;
-    }
-  Atom s;
-  
-  if (postscript_global_b)
-    s = ps_slur (dy_f, dx, ht, dir);
-  else
-    {
-      Real nh =  paper_l_->internote_f ();
-      int dy_i = (int) rint(dy_f / nh);
-
-      s = tex_slur (dy_i, dx, dir);
-      dy_f = dy_i *  nh;
-    }
-  
-  s.dim_[X_AXIS] = Interval (0, dx);
-  s.dim_[Y_AXIS] = Interval (0 <? dy_f,  0 >? dy_f);
-  return s;
-}
-
-Atom
-Lookup::control_slur (Array<Offset> controls, Real dx, Real dy) const
-{
-  assert (postscript_global_b);
-  assert (controls.size () == 8);
-
-  String ps = "\\embeddedps{\n";
-  
-  for (int i = 1; i < 4; i++)
-    ps += String_convert::double_str (controls[i].x ()) + " "
-      + String_convert::double_str (controls[i].y ()) + " ";
-
-  for (int i = 5; i < 8; i++)
-//    ps += String_convert::double_str (controls[i].x () + controls[0].x () - controls[3].x ()) + " "
-//      + String_convert::double_str (controls[i].y () - controls[0].y () + controls[3].y ()) + " ";
-    ps += String_convert::double_str (controls[i].x () - dx) + " "
-      + String_convert::double_str (controls[i].y () - dy) + " ";
-
-  ps += " draw_control_slur}";
-
-  Atom s;
-  s.tex_ = ps;
-  
-  s.dim_[X_AXIS] = Interval (0, dx);
-  s.dim_[Y_AXIS] = Interval (0 <? dy,  0 >? dy);
-  return s;
-}
-
index de7b328b11c695583703b317ae3427b795120efe..799bebaaabb96e7f4197690f03112889c7d4f161 100644 (file)
@@ -12,6 +12,7 @@
 #include "p-col.hh"
 #include "debug.hh"
 
+IMPLEMENT_IS_TYPE_B1(Tie,Bow);
 
 void
 Tie::set_head (Direction d, Note_head * head_l)
@@ -93,7 +94,9 @@ Tie::do_post_processing()
       if (head_l_drul_[d] && head_l_drul_[d]->extremal_i_)
        {
          /* normal tie between noteheads, with gap of space */
-         dx_f_drul_[d] += -d * (0.5 * nw_f + gap_f);
+         if (d == LEFT)
+           dx_f_drul_[d] +=  nw_f;
+         dx_f_drul_[d] += -d * gap_f;
          /* attach to outer 3/4 end of head */
          dy_f_drul_[d] += dir_ * 0.25 * interline_f;
        }
@@ -121,4 +124,3 @@ Tie::do_substitute_dependency (Score_elem*o, Score_elem*n)
     head_l_drul_[RIGHT] = new_l;
 }
 
-IMPLEMENT_IS_TYPE_B1(Tie,Bow);
diff --git a/make/Configure_variables.make.in b/make/Configure_variables.make.in
deleted file mode 100644 (file)
index b6b2fa7..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-# -*-Makefile-*-
-
-# @configure_input@
-
-INSTALL = @INSTALL@
-USER_CXXFLAGS = @CXXFLAGS@ @CPPFLAGS@
-USER_LDFLAGS =
-
-CXX = @CXX@
-POD2HTML= @POD2HTML@
-POD2MAN = @POD2MAN@
-ICFLAGS = @ICFLAGS@
-ILDFLAGS = @ILDFLAGS@
-libdir = @libdir@
-prefix = @prefix@
-TEXPREFIX = @TEXPREFIX@
-TEXDIR = @TEXDIR@
-TAR= @TAR@
-MFDIR = @MFDIR@
-mandir  =  @mandir@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-includedir = @includedir@
-datadir = @datadir@
-EXTRA_LIBES = @EXTRA_LIBES@
-RANLIB = @RANLIB@
-DEFS = @DEFS@
-#SET_MAKE = @SET_MAKE@
-DEFINES = @DEFINES@
-FIND = @FIND@
-COMPILEINFO = @COMPILEINFO@
-BISON = @BISON@
-FLEX = @FLEX@
-LN = @LN@
-ZIP = @ZIP@
-PERL = @PERL@
-PYTHON = @PYTHON@
-OUTDIR_NAME = @OUTDIR_NAME@
-
-
index 98f9b9d90f415f7be77caa69e648e7c6b2e20554..52b9e556375b2a98f31249a7fee41e4b50799a12 100644 (file)
@@ -18,25 +18,23 @@ depth = ..
 NAME = make
 SUBDIRS = 
 
-# list of distribution files:
-
 # two outdir files are distributed, since they make sense to have without running 
 # configure and make.
 IN_FILES = $(wildcard *.in)
-EXTRA_DISTFILES = $(IN_FILES) $(outdir)/lilypond.spec $(outdir)/lilypond.lsm $(outdir)/lelievijver.lsm
+EXTRA_DISTFILES = $(IN_FILES)
+OUT_DISTFILES=$(outdir)/lilypond.spec $(outdir)/lilypond.lsm $(outdir)/lelievijver.lsm
 #
 
 # generic variables:
 #
 include ./$(depth)/make/Variables.make
 include ./$(depth)/make/Files.make 
-#
-
-# generic targets and rules:
-#
 include ./$(depth)/make/Targets.make
 include ./$(depth)/make/Rules.make
-#
+
+
+local-maintainerclean:
+       rm lilypond.spec $(wildcard *.lsm)
 
 spec: $(outdir)/lilypond.spec
 
@@ -59,3 +57,4 @@ $(outdir)/lilypond.spec: lilypond.spec.in $(depth)/VERSION
 $(outdir)/%.lsm: %.lsm.in $(depth)/VERSION
        cat $< | $(sed-version) | $(sed-date) > $@
 
+
index c65d9f86199dd498dfefb5d5a3fb9e038196c6be..0d4c0b505d9c302bcdeef47681eeb02632f7cf60 100644 (file)
 # target all:
 #
 all:    default
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i all; done
-endif
-
-#
-
-# platform specific variables,
-#
-#include ./$(depth)/make/out/Site.make
-#
-
-# where to do this ?
-.PRECIOUS:  $(makeout)/Site.make
-
+       $(LOOP)
 # dependency list of executable:
 #
 
@@ -58,25 +45,27 @@ lib: $(LIBRARY)
 
 
 make-all-outdirs: make-outdir
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i make-all-outdirs; done
+       $(LOOP)
 
 make-outdir:
        -mkdir $(OUTDIR_NAME)
 
 # be careful about deletion.
 clean: localclean
-       rm -f $(outdir)/*
+       -rm -f $(outdir)/*
        touch $(outdir)/dummy.dep
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
-endif
+       $(LOOP)
+
+distclean: clean 
+       $(LOOP)
+       $(MAKE) local-distclean
+
+maintainerclean: 
+       $(LOOP)
+       $(MAKE) local-maintainerclean
+       $(MAKE) local-distclean
 
-distclean: subdir-distclean local-distclean
 
-subdir-distclean:
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean; done
-endif
 
 # configure:
 #
@@ -154,12 +143,11 @@ doosdist:
        rm -rf $(distdir)/
 
 
-localdist: $(DISTFILES)
-       if [ -d out ]; then \
-               mkdir $(distdir)/$(localdir)/out; \
-               touch $(distdir)/$(localdir)/out/dummy.dep; \
-       fi
+localdist: $(DISTFILES) $(OUT_DISTFILES)
+       touch $(outdir)/dummy.dep; \
+       mkdir $(distdir)/$(localdir)/out; \
        $(LN) $(DISTFILES) $(distdir)/$(localdir)
+       $(LN) $(outdir)/dummy.dep $(OUT_DISTFILES) $(distdir)/$(localdir)/out
 ifdef SUBDIRS
        set -e; for i in $(SUBDIRS); do mkdir $(distdir)/$(localdir)/$$i; \
                $(MAKE) localdir=$(localdir)/$$i -C $$i localdist; done
@@ -171,9 +159,7 @@ ifdef all-tag-sources
        -etags -CT $(all-tag-sources) $(ERROR_LOG)
        -ctags -CT $(all-tag-sources) $(ERROR_LOG)
 endif
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i TAGS ; done
-endif
+       $(LOOP)
 
 
 # version stuff:
@@ -192,20 +178,18 @@ localclean:
 
 local-distclean:
 
+local-maintainerclean:
+
 install-strip:
        $(MAKE) INSTALL="$(INSTALL) -s" install
 
 install: localinstall
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install; done
-endif
+       $(LOOP)
 
 localinstall:
 
 uninstall: localuninstall
-ifdef SUBDIRS
-       set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i uninstall; done
-endif
+       $(LOOP)
 
 localuninstall:
 
index 501aeab9df6b54b5ac2e797f2bab1db8dfe8500f..9da75f907132543ad2633843226580f7abeaf6a0 100644 (file)
@@ -51,17 +51,16 @@ LOADLIBES +=
 
 # main target of this module:
 #
-# MAINTARGET = $(EXECUTABLE)
-# MAINTARGET = $(LIBRARY)
-MAINTARGET = 
-
-default: $(MAINTARGET)
+default: $(EXECUTABLE)
+# default: $(LIBRARY)
+include ./$(depth)/make/Files.make 
+include ./$(depth)/make/Targets.make
+include ./$(depth)/make/Rules.make
 #
 
-# generic targets and rules:
-#
 include ./$(depth)/make/Targets.make
 include ./$(depth)/make/Rules.make
-#
 
+EXECUTABLES=
+# include $(depth)/make/Executable.make
 
index c058487bcb587b3e4db7cf040ac0b2448172ce91..f376ebc3138cc80cc08ce6d357d6405dd78a2e41 100644 (file)
@@ -17,7 +17,7 @@ depth = .
 #
 NAME = lilypond
 SUBDIRS = bin flower lib lily mf mi2mu debian\
-       Documentation init input tex make mutopia
+       Documentation init input tex make mutopia test
 include VERSION
 #
 
@@ -32,9 +32,6 @@ README_FILES = BUGS DEDICATION ANNOUNCE-0.1 ANNOUNCE \
  INSTALL.txt AUTHORS.txt PATCHES.txt
 EXTRA_DISTFILES = config.make.in config.hh.in .dstreamrc mudela-mode.el VERSION $(README_FILES) $(SCRIPTS) 
 
-# do not dist ./Makefile (is copied from make/Toplevel.make)
-DISTFILES:=$(EXTRA_DISTFILES)
-#
 
 
 # generic targets and rules:
@@ -44,11 +41,22 @@ include ./$(depth)/make/Variables.make
 include ./$(depth)/make/Targets.make
 include ./$(depth)/make/Rules.make
 
+#
+# override Variables.make:
+# do not dist ./Makefile (is copied from make/Toplevel.make)
+# 
+DISTFILES := $(EXTRA_DISTFILES)
+
+
+
 localdist: configure
 
 local-distclean: 
        rm -f config.hh config.make Makefile config.cache config.status config.log
 
+local-maintainerclean:
+       rm -f configure
+
 Makefile: make/Toplevel.make.in
        chmod +w $@
        echo '# WARNING WARNING WARNING WARNING' > $@
index b6c04face1e8fdf4c229ba7c6d9644e2b11152aa..2918aa5a33d60e5706800f7be26b77e69fd6fcbf 100644 (file)
@@ -226,4 +226,8 @@ endif
 # substitute $(STRIP) in Site.make if you want stripping
 DO_STRIP=true
 
-
+ifdef SUBDIRS
+LOOP=set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
+else
+LOOP=
+endif
diff --git a/make/header-directory.make b/make/header-directory.make
deleted file mode 100644 (file)
index 9017ad8..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# identify module:
-#
-include ./$(depth)/make/Include.make
-
diff --git a/make/lelievijver.lsm b/make/lelievijver.lsm
deleted file mode 100644 (file)
index 067c661..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-Begin3
-Titel: LilyPond
-Versie: 0.1.57
-Inschrijf datum: 19APR98
-Beschrijving: LilyPond is de muziek typesetter van het GNU Project.  
-               Het programma genereert muziek in zichtbare of 
-               hoorbare vorm uit uit een muzikale definitie file: 
-               voor bladmuziek wordt typeset informatie naar een 
-               TeX file geschreven, voor een (mechanische) uitvoering 
-               wordt een MIDI file geschreven.  Enkele kunstjes zijn 
-               verscheidene notenbalken, maatsoorten, sleutels, 
-               toonsoorten, teksten, krachtige invoer taal, cadensen, 
-               balken, boogjes, triolen.
-Trefwoorden: muziek typezetten midi notatie
-Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
-       jan@digicash.com (Jan Nieuwenhuizen)
-Onderhouden door: hanwen@stack.nl (Han-Wen Nienhuys)
-Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
-       395k lilypond-0.1.57.tar.gz 
-Oorspronkelijke plek: pcnov095.win.tue.nl /pub/lilypond/
-       395k lilypond-0.1.57.tar.gz 
-Copi"eer politie: GPL
-End
diff --git a/make/lilypond.lsm b/make/lilypond.lsm
deleted file mode 100644 (file)
index 43f26e1..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-Begin3
-Title: LilyPond
-Version: 0.1.57
-Entered-date: 19APR98
-Description: LilyPond is the GNU Project music typesetter.  The program
-               generates visual or auditive output from a music 
-               definition file: it can typeset formatted sheet music 
-               to a TeX file and play (mechanical) performances to a 
-               MIDI file.  Features include multiple staffs, meters, 
-               clefs, keys, lyrics, versatile input-language, 
-               cadenzas, beams, slurs, triplets.
-               It includes a nice font of musical symbols.
-Keywords: music notation typesetting midi fonts
-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/sound/convert
-       470k lilypond-0.1.57.tar.gz 
-Original-site: pcnov095.win.tue.nl /pub/lilypond/development/
-       470k lilypond-0.1.57.tar.gz 
-Copying-policy: GPL
-End
index 603ef5272d0f1f6f30ead68277dba4970897e64f..995cbd5d6547405c51080e854fb67a03bc749660 100644 (file)
@@ -10,13 +10,13 @@ Description: LilyPond is the GNU Project music typesetter.  The program
                clefs, keys, lyrics, versatile input-language, 
                cadenzas, beams, slurs, triplets.
                It includes a nice font of musical symbols.
-Keywords: music notation typesetting midi fonts
-Author: hanwen@stack.nl (Han-Wen Nienhuys)
+Keywords: music notation typesetting midi fonts engraving
+Author: hanwen@cs.ruu.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/sound/convert
-       470k lilypond-@TOPLEVEL_VERSION@.tar.gz 
+       570k lilypond-@TOPLEVEL_VERSION@.tar.gz 
 Original-site: pcnov095.win.tue.nl /pub/lilypond/development/
-       470k lilypond-@TOPLEVEL_VERSION@.tar.gz 
+       570k lilypond-@TOPLEVEL_VERSION@.tar.gz 
 Copying-policy: GPL
 End
diff --git a/make/lilypond.spec b/make/lilypond.spec
deleted file mode 100644 (file)
index 17a85ac..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-Name: lilypond
-Version: 0.1.57
-Release: 1
-Copyright: GPL
-Group: Applications/Publishing
-Source0: alpha.gnu.org:/gnu/lilypond/development/lilypond-0.1.57.tar.gz
-Summary: A program for typesetting music.
-URL: http://www.stack.nl/~hanwen/lilypond
-Packager: Han-Wen Nienhuys <hanwen@stack.nl>
-Icon: lelie_icon.gif
-Buildroot: /tmp/lilypond-install
-
-%description 
-LilyPond is the GNU Project music typesetter.  The program
-generates visual or auditive output from a music 
-definition file: it can typeset formatted sheet music 
-to a TeX file and play (mechanical) performances to a 
-MIDI file.  Features include multiple staffs, meters, 
-clefs, keys, lyrics, versatile input-language, 
-cadenzas, beams, slurs, triplets.
-It includes a nice font of musical symbols.
-
-%prep
-%setup
-%build
-./configure --disable-checking --disable-debugging --enable-printing --prefix=/usr --enable-optimise --enable-shared
-make all
-%install
-rm -rf $RPM_BUILD_ROOT
-strip lily/out/lilypond mi2mu/out/mi2mu
-make -C Documentation gifs
-make prefix="$RPM_BUILD_ROOT/usr" install
-%files
-%doc Documentation/out/AUTHORS.txt Documentation/out/CodingStyle.txt Documentation/out/INSTALL.txt Documentation/out/MANIFESTO.txt Documentation/out/PATCHES.txt Documentation/out/convert-mudela.txt Documentation/out/faq.txt Documentation/out/gnu-music.txt Documentation/out/index.txt Documentation/out/internals.txt Documentation/out/language.txt Documentation/out/lilypond.txt Documentation/out/links.txt Documentation/out/literature.txt Documentation/out/ly2dvi.txt Documentation/out/mi2mu.txt Documentation/out/mudela-book.txt Documentation/out/mutopia.txt Documentation/out/other-packages.txt BUGS TODO NEWS DEDICATION ANNOUNCE README
-%doc input/abbrev.ly input/beam-bug.ly input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/denneboom.ly input/dummy.tex input/font-body.ly input/font.ly input/font11.ly input/font13.ly input/font16.ly input/font20.ly input/font26.ly input/gourlay.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/praeludium-fuga-E.ly input/rhythm.ly input/scales.ly input/scripts.ly input/sleur.ly input/slur-bug.ly input/slurs.ly input/spacing.ly input/stem.ly input/test-lyrics.ly input/tril.ly input/twinkle-pop.ly input/twinkle.ly Documentation/mudela-man.doc Documentation/mudela.doc 
-%doc Documentation/out/lelie_logo.gif
-/usr/bin/convert-mudela
-/usr/bin/mudela-book
-/usr/bin/lilypond
-/usr/lib/libflower.so
-/usr/bin/mi2mu
-/usr/man/man1/mi2mu.1
-/usr/man/man1/lilypond.1
-/usr/man/man1/mudela-book.1
-/usr/man/man1/convert-mudela.1
-/usr/lib/texmf/texmf/tex/lilypond/
-/usr/lib/texmf/texmf/fonts/source/public/lilypond
-/usr/share/lilypond/
-%post
-
-texhash                # takes some time...
-rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm'`
-
index 1597e7794cbf75669e4d2c8c65b397416f756715..96adf5b0bdafb1ed1a9fc3c66a986bb6f9fb20af 100644 (file)
@@ -5,7 +5,7 @@ Copyright: GPL
 Group: Applications/Publishing
 Source0: alpha.gnu.org:/gnu/lilypond/development/lilypond-@TOPLEVEL_VERSION@.tar.gz
 Summary: A program for typesetting music.
-URL: http://www.stack.nl/~hanwen/lilypond
+URL: http://www.cs.ruu.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@stack.nl>
 Icon: lelie_icon.gif
 Buildroot: /tmp/lilypond-install
diff --git a/make/out/lelievijver.lsm b/make/out/lelievijver.lsm
new file mode 100644 (file)
index 0000000..ac0f588
--- /dev/null
@@ -0,0 +1,23 @@
+Begin3
+Titel: LilyPond
+Versie: 0.1.58
+Inschrijf datum: 21APR98
+Beschrijving: LilyPond is de muziek typesetter van het GNU Project.  
+               Het programma genereert muziek in zichtbare of 
+               hoorbare vorm uit uit een muzikale definitie file: 
+               voor bladmuziek wordt typeset informatie naar een 
+               TeX file geschreven, voor een (mechanische) uitvoering 
+               wordt een MIDI file geschreven.  Enkele kunstjes zijn 
+               verscheidene notenbalken, maatsoorten, sleutels, 
+               toonsoorten, teksten, krachtige invoer taal, cadensen, 
+               balken, boogjes, triolen.
+Trefwoorden: muziek typezetten midi notatie
+Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
+       jan@digicash.com (Jan Nieuwenhuizen)
+Onderhouden door: hanwen@stack.nl (Han-Wen Nienhuys)
+Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
+       395k lilypond-0.1.58.tar.gz 
+Oorspronkelijke plek: pcnov095.win.tue.nl /pub/lilypond/
+       395k lilypond-0.1.58.tar.gz 
+Copi"eer politie: GPL
+End
diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm
new file mode 100644 (file)
index 0000000..2de07e4
--- /dev/null
@@ -0,0 +1,22 @@
+Begin3
+Title: LilyPond
+Version: 0.1.58
+Entered-date: 21APR98
+Description: LilyPond is the GNU Project music typesetter.  The program
+               generates visual or auditive output from a music 
+               definition file: it can typeset formatted sheet music 
+               to a TeX file and play (mechanical) performances to a 
+               MIDI file.  Features include multiple staffs, meters, 
+               clefs, keys, lyrics, versatile input-language, 
+               cadenzas, beams, slurs, triplets.
+               It includes a nice font of musical symbols.
+Keywords: music notation typesetting midi fonts engraving
+Author: hanwen@cs.ruu.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/sound/convert
+       570k lilypond-0.1.58.tar.gz 
+Original-site: pcnov095.win.tue.nl /pub/lilypond/development/
+       570k lilypond-0.1.58.tar.gz 
+Copying-policy: GPL
+End
diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec
new file mode 100644 (file)
index 0000000..aec37ef
--- /dev/null
@@ -0,0 +1,53 @@
+Name: lilypond
+Version: 0.1.58
+Release: 1
+Copyright: GPL
+Group: Applications/Publishing
+Source0: alpha.gnu.org:/gnu/lilypond/development/lilypond-0.1.58.tar.gz
+Summary: A program for typesetting music.
+URL: http://www.cs.ruu.nl/~hanwen/lilypond
+Packager: Han-Wen Nienhuys <hanwen@stack.nl>
+Icon: lelie_icon.gif
+Buildroot: /tmp/lilypond-install
+
+%description 
+LilyPond is the GNU Project music typesetter.  The program
+generates visual or auditive output from a music 
+definition file: it can typeset formatted sheet music 
+to a TeX file and play (mechanical) performances to a 
+MIDI file.  Features include multiple staffs, meters, 
+clefs, keys, lyrics, versatile input-language, 
+cadenzas, beams, slurs, triplets.
+It includes a nice font of musical symbols.
+
+%prep
+%setup
+%build
+./configure --disable-checking --disable-debugging --enable-printing --prefix=/usr --enable-optimise --enable-shared
+make all
+%install
+rm -rf $RPM_BUILD_ROOT
+strip lily/out/lilypond mi2mu/out/mi2mu
+make -C Documentation gifs
+make prefix="$RPM_BUILD_ROOT/usr" install
+%files
+%doc Documentation/out/AUTHORS.txt Documentation/out/CodingStyle.txt Documentation/out/INSTALL.txt Documentation/out/MANIFESTO.txt Documentation/out/PATCHES.txt Documentation/out/convert-mudela.txt Documentation/out/faq.txt Documentation/out/gnu-music.txt Documentation/out/index.txt Documentation/out/internals.txt Documentation/out/language.txt Documentation/out/lilypond.txt Documentation/out/links.txt Documentation/out/literature.txt Documentation/out/ly2dvi.txt Documentation/out/mi2mu.txt Documentation/out/mudela-book.txt Documentation/out/mutopia.txt Documentation/out/other-packages.txt BUGS TODO NEWS DEDICATION ANNOUNCE README
+%doc input/abbrev.ly input/beam-bug.ly input/beams.ly input/cadenza.ly input/clefs.ly input/collisions.ly input/coriolan-alto.ly input/denneboom.ly input/dummy.tex input/font-body.ly input/font.ly input/font11.ly input/font13.ly input/font16.ly input/font20.ly input/font26.ly input/gourlay.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/praeludium-fuga-E.ly input/rhythm.ly input/scales.ly input/scripts.ly input/sleur.ly input/slur-bug.ly input/slurs.ly input/spacing.ly input/stem.ly input/test-lyrics.ly input/tril.ly input/twinkle-pop.ly input/twinkle.ly Documentation/mudela-man.doc Documentation/mudela.doc 
+%doc Documentation/out/lelie_logo.gif
+/usr/bin/convert-mudela
+/usr/bin/mudela-book
+/usr/bin/lilypond
+/usr/lib/libflower.so
+/usr/bin/mi2mu
+/usr/man/man1/mi2mu.1
+/usr/man/man1/lilypond.1
+/usr/man/man1/mudela-book.1
+/usr/man/man1/convert-mudela.1
+/usr/lib/texmf/texmf/tex/lilypond/
+/usr/lib/texmf/texmf/fonts/source/public/lilypond
+/usr/share/lilypond/
+%post
+
+texhash                # takes some time...
+rm `find /var/lib/texmf -name 'feta*pk' -or -name 'feta*tfm'`
+
diff --git a/mf/feta-beams16.mf b/mf/feta-beams16.mf
deleted file mode 100644 (file)
index 27968ef..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-% vette-beams16.mf
-% part of LilyPond's pretty-but-neat music font
-
-font_identifier:="vette-beams16";
-font_size 16;
-mode_setup;
-
-staffsize#:=16pt#;
-input feta-watzieik;
-end.
-
diff --git a/mf/feta-beams20.mf b/mf/feta-beams20.mf
deleted file mode 100644 (file)
index 0340e3e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-% (this was vette-beams16.mf)
-% part of LilyPond's pretty-but-neat music font
-
-%
-%
-
-font_identifier:="feta-beams20";
-font_size 20;
-mode_setup;
-
-staffsize#:=20pt#;
-
-input feta-watzieik;
-end.
diff --git a/mf/feta-beams26.mf b/mf/feta-beams26.mf
deleted file mode 100644 (file)
index 4cb1def..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-% (this was vette-beams16.mf)
-% part of LilyPond's pretty-but-neat music font
-
-%
-%
-
-font_identifier:="feta-beams26";
-font_size 26;
-mode_setup;
-
-staffsize#:=26pt#;
-
-input feta-watzieik;
-end.
index a1385857af9f8388f1d977a5a1cd640329b40dbe..24637e273dd1b632c11c88286dfe0b4ccf9ff167 100644 (file)
@@ -6,6 +6,7 @@
 % (c) 1997 Jan Nieuwenhuizen <jan@digicash.com>
 % & Han-Wen Nienhuys <hanwen@stack.nl>
 % 
+% see Documentation/fonts.tex
 
 % mode_setup;
 
@@ -19,34 +20,17 @@ def atan(expr x) =
        (angle(1,x)*pi/180)
        enddef;
 
-%breapth, width, depth, height
-
-% urgh
-% having mf would be nice if only from a "use the source" point of view.
-%
-% getslurcontrol:
-%        slurhtlimit 90 div /slur_alpha exch def
-%        slurratio 60 div slur_alpha div  /slur_beta  exch def
-%        slur_beta mul 1 atan slur_alpha mul
-%
-% draw_slur:
-%        slur_b getslurcontrol 
-%        slur_dir mul /slur_ht exch def
-%        slur_b getslurcontrol /slur_indent exch def       
-%
 
 sleur_pen#:=stafflinethickness#;
 slurheightlimit#:=staffsize#/2;
-% staffrulethickness 1.5 mul  /slur_thick exch def
-slurthick#:=3/2stafflinethickness#;
+slurthick#:=1.8stafflinethickness#;
 
 define_pixels(staffsize,interline,stafflinethickness);
 define_pixels(sleur_pen,slurheightlimit,slurthick);
 
-sluralpha:=slurheightlimit#*pi/2;
-% slurratio:=1/3;
-slurratio:=0.3333;
-slurbeta:=3/4*pi*slurratio/sluralpha;
+sluralpha:=2slurheightlimit#/pi;
+slurratio:=1/3;
+slurbeta:=pi*slurratio/2slurheightlimit#;
 
 def draw_slur(expr dxs,dys,hs,d) =
        save x, y;
@@ -56,8 +40,7 @@ def draw_slur(expr dxs,dys,hs,d) =
        h#:=hs*1pt#;
        define_pixels(dx,dy);
        b#:=length(dx#,dy#);
-       % ugh: huh? 2/5
-       indent#:=2/5*sluralpha*atan(slurbeta*b#);
+       indent#:=sluralpha*atan(slurbeta*b#);
        define_pixels(b,h,indent);
        height:=(indent+h)*d;
        z1=(0,0);
diff --git a/mf/feta-watzieik.mf b/mf/feta-watzieik.mf
deleted file mode 100644 (file)
index a3676cc..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-% wat-zie-ik.mf
-% part of LilyPond's pretty-but-neat music font
-% beams: plat en steil
-
-input feta-params;
-
-beamheight#:=0.48interline#;
-
-define_pixels(beamheight);
-
-pen beam_pen;
-beam_pen:=penrazor scaled beamheight rotated 90;
-
-max_slope:=0.6;
-slopes:=20;
-elem_tan:=max_slope/slopes;
-lengths:=6;
-elem_factor := 2;
-elem_initial_len:=2;
-
-for i := -slopes upto slopes:
-       width:= elem_initial_len;
-       for j:=1 upto lengths:
-               beginchar(128 + i * lengths + j -1 ,width,0,0);
-                       pickup beam_pen;
-                       draw origin--(lft w,w*i*elem_tan);
-                       endchar;
-               width:=elem_factor *width;
-               endfor;
-       endfor;
diff --git a/mutopia/Coriolan/out/dummy.dep b/mutopia/Coriolan/out/dummy.dep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Makefile b/test/Makefile
new file mode 100644 (file)
index 0000000..4f89904
--- /dev/null
@@ -0,0 +1,50 @@
+# project  LilyPond -- the musical typesetter
+# title           makefile for test
+# file    test/Makefile 
+#
+# Copyright (c) 1997 by
+#      Jan Nieuwenhuizen <jan@digicash.com>
+#      Han-Wen Nienhuys <hanwen@stack.nl>
+#
+
+# subdir level:
+#
+depth = ..
+#
+
+# generic variables:
+#
+include ./$(depth)/make/Variables.make 
+#
+
+# identify module:
+#
+NAME = test
+MODULE_NAME = test
+
+# descent order into subdirectories:
+#
+SUBDIRS =
+#
+
+include ./$(depth)/make/Files.make
+
+# list of custom libraries:
+#
+CUSTOMLIBES = \
+
+LOADLIBES +=
+#
+
+# main target of this module:
+#
+default: $(EXECUTABLE)
+include ./$(depth)/make/Files.make 
+include ./$(depth)/make/Targets.make
+include ./$(depth)/make/Rules.make
+#
+
+EXECUTABLES=bow
+include $(depth)/make/Executable.make
+
+
diff --git a/test/bow.cc b/test/bow.cc
new file mode 100644 (file)
index 0000000..bb85ea3
--- /dev/null
@@ -0,0 +1,212 @@
+// vim:sw=2 makeprg=g++\ -g\ bow.cc\ -o\ bow
+#include <iostream.h>
+#define PT
+// #define STAFFHEIGHT 16.0
+#define STAFFHEIGHT 20.0
+
+#define UP 1
+#define DOWN (-1)
+
+// mmm
+#define STANDALONE
+
+#include <math.h>
+
+typedef void *Paper_def;
+
+#include "bezier.hh"
+#include "bezier.cc"
+#include "offset.cc"
+
+struct Point
+{
+  Real x, y;
+};
+
+void
+out (Bezier_bow& b)
+{
+  cout << "save dx,dy,x,y;\n";
+  for (int i = 0; i < 4; i++)
+      cout << "z" << i + 1 << " = (" << b.control_[i].x ()
+       << ", " << b.control_[i].y () << ");\n";
+  for (int i = 1; i < 3; i++)
+      cout << "z" << i + 4 << " = (" << b.return_[i].x ()
+       << ", " << b.return_[i].y () << ");\n";
+#if 0
+  cout << "pickup pencircle scaled 0.5pt#;\n";
+  cout << "draw z2--z3; draw (50,0)-- 0.5[z2,z3];\n";
+#endif
+  cout << "pickup pencircle scaled 4pt#;\n";
+  for (int i = 0; i < 4; i++)
+    cout << "drawdot z" << i + 1 << ";\n";
+  cout << "path boogje;\n";
+#if 0
+  cout << "pickup pencircle scaled 0.4pt#;\n";
+  cout << "boogje=z1..controls z2 and z3..z4..controls z5 and z6..cycle;\n";
+  cout << "filldraw boogje;\n";
+#else
+  cout << "pickup pencircle scaled 1.6pt#;\n";
+  cout << "boogje=z1..controls z2 and z3..z4;\n";
+  cout << "draw boogje;\n";
+  cout << "pickup pencircle scaled 0.4pt#;\n";
+  cout << "boogje:=z4..controls z5 and z6..z1;\n";
+  cout << "draw boogje;\n";
+#endif
+  cout << "showit; shipit;clearit;\n";
+}
+
+void
+bow (Point* points, int n, int d)
+{
+  Array<Offset> notes;
+  for (int i = 0; i < n; i++)
+    notes.push (Offset (points[i].x, points[i].y));
+//  cout << "pickup pencircle scaled 8pt#;\n";
+  cout << "pickup pencircle scaled 2pt#;\n";
+  for (int i = 0; i < n; i++)
+    cout << "drawdot (" << notes[i].x () << ", " << notes[i].y () << ");\n";
+  Bezier_bow b (0);
+  b.set (notes, d);
+  b.calc ();
+  out (b);
+  return;
+}
+
+int
+main ()
+{
+  //cout.unsetf(ios::scientific);
+  cout.setf(ios::fixed);
+#if 0
+  bow ((Point[6]){ 0,0, 20,0, 40,0, 60,0, 80,0, 100,1 }, 6, 1);
+  bow ((Point[6]){ 0,0, 20,0, 40,30, 60,30, 80,0, 100,1 }, 6, 1);
+  bow ((Point[6]){ 0,0, 20,0, 40,0, 60,0, 80,10, 100,1 }, 6, 1);
+  bow ((Point[6]){ 0,0, 20,0, 40,0, 60,0, 80,40, 100,1 }, 6, 1);
+  bow ((Point[6]){ 0,0, 20,0, 40,0, 60,40, 80,0, 100,1 }, 6, 1);
+  bow ((Point[6]){ 0,10, 20,20, 40,0, 60,40, 80,20, 100,50 }, 6, 1);
+  bow ((Point[6]){ 0,10, 20,20, 40,0, 60,40, 80,20, 100,50 }, 6, -1);
+  bow ((Point[6]){ 0,10, 20,20, 40,0, 60,40, 80,20, 100,100 }, 6, -1);
+  bow ((Point[9]){ 0,0, 20,0, 40,-80, 60,0, 80,0, 100,0, 120,0, 140,0, 160,-1 }, 9, -1);
+  bow ((Point[9]){ 0,0, 40,0, 80,180, 120,0, 160,0, 200,0, 240,0, 280,0, 320,1 }, 9, 1);
+  bow ((Point[9]){ 
+  {0, 0}, 
+  {19.10645980317711, 1}, 
+  {29.402919606354207, 28}, 
+  {55.389379409531308, 1}, 
+  {73.530839212708514, 1}, 
+  {91.672299015885727, 1}, 
+  {111.35901367452229, 1}, 
+  {131.04572833315891, 1}, 
+  {145.76744299179552, 0}
+  }, 
+  9, 1);
+  bow ((Point[6]){ 0,0, 20,0, 40,0, 60,0, 80,0, 100,40 }, 6, 1);
+  bow ((Point[2]){ 0,0, 20,0 }, 2, 1);
+  bow ((Point[2]){ 0,0, 20,-10 }, 2, 1);
+#endif
+  bow ((Point[6]){ 0,0, 20,0, 40,0, 60,0, 80,0, 100,100 }, 6, 1);
+  cout << "\\end\n";
+  return 0;
+}
+
+// vim:sw=2 makeprg=g++\ -g\ bow.cc\ -o\ bow
+#include <iostream.h>
+#define PT
+
+// mmm
+#define STANDALONE
+
+#include <math.h>
+
+typedef void *Paper_def;
+
+#include "bezier.hh"
+#include "bezier.cc"
+#include "mat.hh"
+
+struct Point
+{
+  Real x, y;
+};
+
+void
+out (Bezier_bow& b)
+{
+  cout << "save dx,dy,x,y;\n";
+  for (int i = 0; i < 4; i++)
+      cout << "z" << i + 1 << " = (" << b.control_[i].x ()
+       << ", " << b.control_[i].y () << ");\n";
+  for (int i = 1; i < 3; i++)
+      cout << "z" << i + 4 << " = (" << b.return_[i].x ()
+       << ", " << b.return_[i].y () << ");\n";
+//  cout << "pickup pencircle scaled 0.5pt#;\n";
+//  cout << "draw z2--z3; draw (50,0)-- 0.5[z2,z3];\n";
+  cout << "pickup pencircle scaled 4pt#;\n";
+  for (int i = 0; i < 4; i++)
+    cout << "drawdot z" << i + 1 << ";\n";
+//  cout << "pickup pencircle scaled 0.4pt#;\n";
+  cout << "pickup pencircle scaled 1.6pt#;\n";
+  cout << "path boogje;\n";
+//  cout << "boogje=z1..controls z2 and z3..z4..controls z5 and z6..cycle;\n";
+  cout << "boogje=z1..controls z2 and z3..z4;\n";
+  cout << "dx=x4-x1;\n";
+  cout << "dy=y4-y1;\n";
+  cout << "draw boogje;\n";
+  cout << "pickup pencircle scaled 0.4pt#;\n";
+  cout << "boogje:=z4..controls z5 and z6..z1;\n";
+  cout << "draw boogje;\n";
+//  cout << "filldraw boogje;\n";
+  cout << "showit; shipit;clearit;\n";
+}
+
+void
+bow (Point* points, int n, int d)
+{
+  Array<Offset> notes;
+  for (int i = 0; i < n; i++)
+    notes.push (Offset (points[i].x, points[i].y));
+  cout << "pickup pencircle scaled 8pt#;\n";
+  for (int i = 0; i < n; i++)
+    cout << "drawdot (" << notes[i].x () << ", " << notes[i].y () << ");\n";
+  Bezier_bow b (0);
+  b.set (notes, d);
+  b.calc ();
+  out (b);
+  return;
+}
+
+int
+main ()
+{
+  //cout.unsetf(ios::scientific);
+  cout.setf(ios::fixed);
+#if 1
+  bow ((Point[6]){ 0,0, 20,0, 40,0, 60,0, 80,0, 100,1 }, 6, 1);
+  bow ((Point[6]){ 0,0, 20,0, 40,30, 60,30, 80,0, 100,1 }, 6, 1);
+  bow ((Point[6]){ 0,0, 20,0, 40,0, 60,0, 80,10, 100,1 }, 6, 1);
+  bow ((Point[6]){ 0,0, 20,0, 40,0, 60,0, 80,40, 100,1 }, 6, 1);
+  bow ((Point[6]){ 0,0, 20,0, 40,0, 60,40, 80,0, 100,1 }, 6, 1);
+  bow ((Point[6]){ 0,10, 20,20, 40,0, 60,40, 80,20, 100,50 }, 6, 1);
+  bow ((Point[6]){ 0,10, 20,20, 40,0, 60,40, 80,20, 100,50 }, 6, -1);
+  bow ((Point[6]){ 0,10, 20,20, 40,0, 60,40, 80,20, 100,100 }, 6, -1);
+  bow ((Point[9]){ 0,0, 20,0, 40,-80, 60,0, 80,0, 100,0, 120,0, 140,0, 160,-1 }, 9, -1);
+  bow ((Point[9]){ 0,0, 40,0, 80,180, 120,0, 160,0, 200,0, 240,0, 280,0, 320,1 }, 9, 1);
+  bow ((Point[9]){ 
+  {0, 0}, 
+  {19.10645980317711, 1}, 
+  {29.402919606354207, 28}, 
+  {55.389379409531308, 1}, 
+  {73.530839212708514, 1}, 
+  {91.672299015885727, 1}, 
+  {111.35901367452229, 1}, 
+  {131.04572833315891, 1}, 
+  {145.76744299179552, 0}
+  }, 
+  9, 1);
+#endif
+  bow ((Point[6]){ 0,0, 20,0, 40,0, 60,0, 80,0, 100,40 }, 6, 1);
+  cout << "\\end\n";
+  return 0;
+}
+
diff --git a/test/out/dummy.dep b/test/out/dummy.dep
new file mode 100644 (file)
index 0000000..e69de29
index 1616ccc9f3cc55346087ab70d01596c5cda1c1b5..b7ba27d28119305e1ac1d8201932fe0746a12fb7 100644 (file)
   \fi}
 
 \def\pianobrace#1{{\bracefont\char #1}}
-\def\staffbracket#1{{\bracketfont\char #1}}
+\def\staffbracket#1{{\centeralign{\bracketfont\char #1}}}
 
 \def\embeddedtex#1{}
 \def\embeddedps#1{}
index 2610706399a01815ef0b028cf06d015a9342266c..9ff22292d5a55c4b4e6e8a05168916dff2201ed3 100644 (file)
@@ -118,60 +118,21 @@ def
         }
         bind def
  staffheight 2 div /slurhtlimit exch def
- /slurratio 0.3333 def
- %
- %  (b*ratio)/(1 + b / htlimit)
- /getslurcontrol 
- { 
-        slurhtlimit 90 div /slur_alpha exch def
-        slurratio 60 div slur_alpha div  /slur_beta  exch def
-        slur_beta mul 1 atan slur_alpha mul
- } bind def
- staffrulethickness 1.5 mul  /slur_thick exch def
- /draw_slur
- {
-        staffrulethickness setlinewidth
-        0 0 moveto
-        /slur_dir exch def
-        /slur_height exch def
-        /slur_dy exch def
-        /slur_dx exch def
-        slur_dy slur_dx lily_distance /slur_b  exch def
-        slur_b getslurcontrol slur_height add
-        slur_dir mul /slur_ht exch def
-        slur_b getslurcontrol /slur_indent exch def       
-%
-        slur_dy slur_dx atan rotate
-        slur_indent slur_ht
-        slur_b slur_indent sub slur_ht
-        slur_b 0
-        rcurveto        
- %
-        slur_indent neg slur_ht slur_dir slur_thick mul  sub
-        slur_indent slur_b sub slur_ht slur_dir slur_thick mul  sub
-        slur_b neg  0
-        rcurveto
- %
-        gsave
-                fill
-        grestore
-        stroke
- } bind def
- /draw_control_slur
- {
-        staffrulethickness setlinewidth
-        0 0 moveto
-        rcurveto        
-        rcurveto
-        gsave
+/draw_slur
+{
+       staffrulethickness setlinewidth
+       0 0 moveto
+       rcurveto
+       rcurveto
+       gsave
        fill
-        grestore
-        stroke
- } bind def
+       grestore
+       stroke
      } bind def
 }}
 
-
 \def\turnOnExperimentalFeatures{%
 % draw a slur in embedded postscript
 \special{ps:
 }}
+