]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.25 release/1.3.25
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 21 Feb 2000 11:49:56 +0000 (12:49 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 21 Feb 2000 11:49:56 +0000 (12:49 +0100)
===========

* as2text: catch missing font/character errors, added default font, set text.

1.3.24.j

60 files changed:
CHANGES
Documentation/topdocs/index.tely
TODO
VERSION
buildscripts/set-lily.sh
input/test/GNUmakefile
input/test/as.fly [new file with mode: 0644]
input/test/as1.fly [new file with mode: 0644]
input/test/as2.ly [new file with mode: 0644]
input/test/standchen-as5.ly [new file with mode: 0644]
input/test/standchen-as9.ly [new file with mode: 0644]
input/test/test-as5.ly [new file with mode: 0644]
input/test/test.musa [deleted file]
lily/afm-reader.cc [deleted file]
lily/atom.cc
lily/group-interface.cc
lily/include/bezier-bow.hh
lily/include/group-interface.hh
lily/include/lookup.hh
lily/include/note-head.hh
lily/include/tie-column.hh [new file with mode: 0644]
lily/lookup.cc
lily/note-head.cc
lily/paper-outputter.cc
lily/score-element.cc
lily/tie-column.cc [new file with mode: 0644]
lily/tie.cc
lily/volta-spanner.cc
ly/GNUmakefile
ly/declarations-as.ly [new file with mode: 0644]
ly/declarations-musa.ly [deleted file]
ly/engraver.ly
ly/init-as.fly [new file with mode: 0644]
ly/init-as.ly [new file with mode: 0644]
ly/init.musa [deleted file]
ly/paper-as5.ly [new file with mode: 0644]
ly/paper-as9.ly [new file with mode: 0644]
ly/paper-musa9.ly [deleted file]
ly/params-as.ly [new file with mode: 0644]
ly/params-musa.ly [deleted file]
ly/params.ly
make/out/lilypond.lsm
make/out/lilypond.spec
mf/GNUmakefile
mf/feta-generic.mf
mf/musa-nummer1.af [deleted file]
mf/musa-nummer1.afm [deleted file]
mf/musa9.af [deleted file]
mf/musa9.afm [deleted file]
mutopia/J.S.Bach/wtk1-fugue2.ly
scm/lily.scm
scripts/GNUmakefile
scripts/as2text.scm [new file with mode: 0644]
scripts/ly2dvi.py
scripts/musa.py [deleted file]
stepmake/stepmake/asciifont-rules.make [new file with mode: 0644]
stepmake/stepmake/asciifont-targets.make [new file with mode: 0644]
stepmake/stepmake/asciifont-vars.make [new file with mode: 0644]
stepmake/stepmake/metafont-rules.make
tex/titledefs.tex

diff --git a/CHANGES b/CHANGES
index 576dab824baaa828389e73f81b1e47d3054cd1ca..c7be422f5f807863116818ecb5e960c8313fcfde 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,10 +1,52 @@
-1.3.24.jcn1
+1.3.24.jcn4
 ===========
 
-* First attempt at real silly ascii output
+* as2text: catch missing font/character errors, added default font, set text.
 
-1.3.23.uu1
-==========
+1.3.24.jcn3
+===========
+
+* New ascii fonts: as5 as-numeral4 as-braces9
+
+* Fixes to as2text.scm
+
+* Added lots of ascii glyphs
+
+1.3.24.jcn2
+===========
+
+* Ascii output, minimal support:
+  - AsciiScript Fonts: mf/*.af
+  - Init files: ly/*-as.*ly 
+  - AsciiScript translation to text: scripts/as2text.scm
+  - input/test/as.fly input/test/as1.fly
+  - Output support: lily/lily.scm
+  - Try:
+      lilypond -f as -i init-as.fly input/test/as.fly
+      as2text as.as
+
+1.3.24.hwn1
+===========
+
+* The horizontal part of ties will avoid collision with staff lines.
+
+* Plugged memory leak: don't protect Atom function.
+
+* Lookup cleanups. Made lots of functions static. Moved some code out
+of Lookup.
+
+
+
+1.3.24.hwn1
+===========
+
+* Bugfix: ly2dvi.py exits succesfully when encountering --help and
+does not delete any of the file_ly*.tex.
+
+* Added header and footer support in ly2dvi.py
+
+1.3.24
+======
 
 * Added a ROADMAP file explaining the source directory layout.
 
index d6332d445ac74d2fc7c2d3e66e99439fe14215ff..ce44ea54dda14827a977758832756ac69e14e7c6 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo @c -*-texinfo-*-
 @setfilename index.info
-@settitle index
+@settitle LilyPond homepage
 
 @node Top, , , (dir)
 @top
@@ -48,46 +48,6 @@ If want more information, you can browse the
 @uref{Documentation/out-www/index.html, documentation}.
 
 
-@unnumberedsec Mailing list
-
-If you have questions do write to the mailing lists
- (but don't forget to read the @uref{Documentation/out-www/faq.html,
-Frequently Asked Questions} first:
-
-
-@table @samp
-@item info-gnu-music@@gnu.org
-        is a moderated list for information on the GNU Music project, to
-    subscribe: send mail with subject "subscribe" to
-    info-gnu-music-request@@gnu.org.  
-
-    As this list is moderated, normal people should ask to
-    @email{drl@@gnu.org, David R. Linn} or
-    @email{hanwen@@cs.uu.nl, Han-Wen} to forward announces instead of
-    sending it to info-gnu-music@@gnu.org
-
-   This list is archived at 
-    @uref{http://www.mail-archive.com/info-gnu-music@@gnu.org}
-
-@item help-gnu-music@@gnu.org
-    For help with LilyPond music project. To subscribe: send
-    mail with subject "subscribe" to
-    @email{help-gnu-music-request@@gnu.org} The archive is at 
-  @uref{http://www.mail-archive.com/help-gnu-music@@gnu.org}.
-
-@item bug-gnu-music@@gnu.org
-    If you have bugreports, you should send them to this list.  If you
-want to know about bugs, subscribe: send mail with subject "subscribe" to
-    @email{bug-gnu-music-request@@gnu.org}. The archive is at
-@uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org}
-@item gnu-music-discuss@@gnu.org,
-    For discussions concerning LilyPond, to subscribe: send
-    mail with subject "subscribe" to
-    @email{gnu-music-discuss-request@@gnu.org}
-        The archive is at
-    @uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org}
-@end table
-
 @unnumberedsec News
 
 For the latest and greatest features, check out the
@@ -111,9 +71,6 @@ putting @uref{http://www4.smart.net/~jcovey/scores/,guitar music} on the
 net. The @uref{http://sca.uwaterloo.ca/Mutopia/,Mutopia project} is a
 large archive of public domain sheet music under construction.
 
-
-
-
 @unnumberedsec Download
 
 If you want to compile LilyPond from sources,  download them here:
@@ -140,6 +97,48 @@ binary RPMs:  @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/RPMS/}
 @item Windows NT: @uref{http://home.austin.rr.com/jbr/jeff/lilypond/}
 @end itemize
 
+@unnumberedsec Mailing list
+
+If you have questions do write to the mailing lists!
+ (but don't forget to read the @uref{Documentation/out-www/faq.html,
+Frequently Asked Questions} first)
+
+
+@table @samp
+@item info-gnu-music@@gnu.org
+        is a moderated list for information on the GNU Music project, to
+    subscribe: send mail with subject "subscribe" to
+    info-gnu-music-request@@gnu.org.  
+
+    As this list is moderated, normal people should ask to
+    @email{drl@@gnu.org, David R. Linn} or
+    @email{hanwen@@cs.uu.nl, Han-Wen} to forward announces instead of
+    sending it to info-gnu-music@@gnu.org
+
+   This list is archived at 
+    @uref{http://www.mail-archive.com/info-gnu-music@@gnu.org}
+
+@item help-gnu-music@@gnu.org
+    For help with LilyPond music project. To subscribe: send
+    mail with subject "subscribe" to
+    @email{help-gnu-music-request@@gnu.org} The archive is at 
+  @uref{http://www.mail-archive.com/help-gnu-music@@gnu.org}.
+
+@item bug-gnu-music@@gnu.org
+    If you have bugreports, you should send them to this list.  If you
+want to know about bugs, subscribe: send mail with subject "subscribe" to
+    @email{bug-gnu-music-request@@gnu.org}. The archive is at
+@uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org}
+@item gnu-music-discuss@@gnu.org,
+    For discussions concerning LilyPond, to subscribe: send
+    mail with subject "subscribe" to
+    @email{gnu-music-discuss-request@@gnu.org}
+        The archive is at
+    @uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org}
+@end table
+
+
+
 @unnumberedsubsec Webmaster's Disclaimer
 
 These pages were entirely created from a @strong{development snapshots}
diff --git a/TODO b/TODO
index 9d00e7270c374ce69dbb89cfc7330678f8b3bc2c..382e3098b91d28be00d657d94c53ce06d247e65e 100644 (file)
--- a/TODO
+++ b/TODO
@@ -11,21 +11,18 @@ Grep -i for TODO, FIXME and ugh/ugr/urg.
 .* TODO
 . * use hash tabs iso. alist_ for elt property?
 . * fix tremolos.
-. * ROADMAP file.
 . * change ) c4  to c4-)
 . * internationalize GUILE msgs.
 . * unbroken marks.
 . * write smobifying howto.
-. * \property autoBeamOverRest (boolean). Don't stop for rests when autobeaming.
-?
 . * put property test files in refman.
-. * fix slurdotted!
 . * alignment within @itemize
 . * interstaff stems
 . * junk dstream output.
 . * Change website to be index to documentation.
 . * \grace { c d } c1 in midi
 . * \prop slurdir in grace notes
+. * Make fingering and playing instructions Music_wrappers?
 . * \eltproperty "=Context" "Elt_name" "prop-name" #value
 . * script columns
 . * Must stop before this music ends:
@@ -126,7 +123,6 @@ of the grace notes and extend to the note after the grace notes.
 . * 4. Lyrics and grace sections don't go too well together.
  The words are aligned with the main note, not the start of the
  grace note.  This is usually wrong, but is sometimes right.
-. * tie-direction
 . * rhythmic staff & accidentals.
 . * use melismaBusy in Lyric context to typeset melismata correctly.  
 . * ly2dvi/lilypond logfile.
diff --git a/VERSION b/VERSION
index 26c821eeadac1728b3ce32d9b57918fce008de24..c5062d4c65efb3bf60efb22f180253ad14294246 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,8 +1,8 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=24
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=25
+MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 199d1a5c5b2e837b79465173b055e3f502ba95b0..7383d6308778ddd39ab2e15d64d10166bdf6023b 100755 (executable)
@@ -57,6 +57,7 @@ showln -sf $LILYPOND_SOURCEDIR/midi2ly/out/midi2ly $prefix/bin/midi2ly
 showln -sf $LILYPOND_SOURCEDIR/scripts/out/ly2dvi $prefix/bin/ly2dvi
 showln -sf $LILYPOND_SOURCEDIR/scripts/out/mudela-book $prefix/bin/mudela-book
 showln -sf $LILYPOND_SOURCEDIR/buildscripts/out/genheader $prefix/bin/genheader
+showln -sf $LILYPOND_SOURCEDIR/scripts/out/as2text $prefix/bin/as2text
 
 
 
index 3df0854682a8b9ec019884b514cfda4bab57ebfb..00cddc0806aa24194d8ef3e74561607407e45715 100644 (file)
@@ -4,7 +4,5 @@ depth = ../..
 examples=font20  sleur
 LOCALSTEPMAKE_TEMPLATES=mutopia
 
-EXTRA_DIST_FILES = $(wildcard *.musa)
-
 include $(depth)/make/stepmake.make 
 
diff --git a/input/test/as.fly b/input/test/as.fly
new file mode 100644 (file)
index 0000000..2203005
--- /dev/null
@@ -0,0 +1,2 @@
+\time 4/4;
+g''1 a2 b4. c8
diff --git a/input/test/as1.fly b/input/test/as1.fly
new file mode 100644 (file)
index 0000000..bd2a54a
--- /dev/null
@@ -0,0 +1,3 @@
+\time 4/4;
+g''1 a2 b4. c8
+\repeat "volta" 2 { a4 b c d } \alternative { { c c c c } { d2 d4 [d8 d] } }
diff --git a/input/test/as2.ly b/input/test/as2.ly
new file mode 100644 (file)
index 0000000..1356548
--- /dev/null
@@ -0,0 +1,20 @@
+
+\include "paper-as9.ly"
+
+\score {
+       \notes\relative c'{
+               \time 4/4;
+               c8 e g b
+               d d d d
+               \bar "|.";
+       }
+       \paper {
+               \paper_as_nine
+               linewidth=65.0\char;
+               \translator { \StaffContext barSize = #9 }
+               %\translator { \VoiceContext beamHeight = #0 }
+               \translator { \VoiceContext beamHeight = ##f }
+       }
+
+}
+
diff --git a/input/test/standchen-as5.ly b/input/test/standchen-as5.ly
new file mode 100644 (file)
index 0000000..df07668
--- /dev/null
@@ -0,0 +1,36 @@
+
+\include "paper-as5.ly"
+
+\score {
+       \context StaffGroup <
+               \context Staff=upper \notes\relative c{
+                       \key F;
+                       \time 3/4;
+                       r8^"Moderato" %\pp 
+                       <g'-. c-.> <c-. es-.> <g-. c-.> <c-. es-.> <g-. c-.> |
+                       r8 <as-. c-.> <c-. es-.>
+               }
+               \context Staff=lower \notes\relative c{
+                       \key F;
+                       \time 3/4;
+                       \clef "bass";
+                       <c,2 c'> r4 
+                       <as2 as'> r4
+               }
+       >
+       \paper {
+%              \paper_as_nine
+               indent=4.0\char;
+               linewidth=78.0\char;
+               \translator { \StaffContext barSize = #4.5 }
+               %\translator { \VoiceContext beamHeight = #0 }
+               \translator { 
+                       \VoiceContext 
+                       beamHeight = ##f 
+                       beamAutoBegin= #(make-moment 0 1)
+                       textEmptyDimension = ##t
+               }
+       }
+
+}
+
diff --git a/input/test/standchen-as9.ly b/input/test/standchen-as9.ly
new file mode 100644 (file)
index 0000000..9ac7aaa
--- /dev/null
@@ -0,0 +1,36 @@
+
+\include "paper-as9.ly"
+
+\score {
+       \context GrandStaff <
+               \context Staff=upper \notes\relative c{
+                       \key F;
+                       \time 3/4;
+                       r8^"Moderato" %\pp 
+                       <g'-. c-.> <c-. es-.> <g-. c-.> <c-. es-.> <g-. c-.> |
+                       r8 <as-. c-.> <c-. es-.>
+               }
+               \context Staff=lower \notes\relative c{
+                       \key F;
+                       \time 3/4;
+                       \clef "bass";
+                       <c,2 c'> r4 
+                       <as2 as'> r4
+               }
+       >
+       \paper {
+%              \paper_as_nine
+               indent=4.0\char;
+               linewidth=78.0\char;
+               %\translator { \StaffContext barSize = #9 }
+               %\translator { \VoiceContext beamHeight = #0 }
+               \translator { 
+                       \VoiceContext 
+                       beamHeight = ##f 
+                       beamAutoBegin= #(make-moment 0 1)
+                       textEmptyDimension = ##t
+               }
+       }
+
+}
+
diff --git a/input/test/test-as5.ly b/input/test/test-as5.ly
new file mode 100644 (file)
index 0000000..ee77e76
--- /dev/null
@@ -0,0 +1,14 @@
+\include "paper-as5.ly"
+
+\score {
+       \notes\relative c''{
+               \time 4/4;
+               g1 g2 g4. g8 |
+       }
+       \paper {
+               \paper_as_five
+               \translator { \StaffContext barSize = #5 }
+       }
+
+}
+
diff --git a/input/test/test.musa b/input/test/test.musa
deleted file mode 100644 (file)
index 2203005..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-\time 4/4;
-g''1 a2 b4. c8
diff --git a/lily/afm-reader.cc b/lily/afm-reader.cc
deleted file mode 100644 (file)
index 8b13789..0000000
+++ /dev/null
@@ -1 +0,0 @@
-
index fc8524dd4404f030822aa1e457cf47e0b9b5b26e..cc2bde40be01f211d289b59360968f200294e2f9 100644 (file)
@@ -22,8 +22,8 @@
 
 Atom::Atom(SCM s)
 {
-  SCM onstack = s;             // protection.
-  func_ = onstack; //scm_protect_object (s);
+  SCM onstack = s;             // protection. just to be sure.
+  func_ = s;
   self_scm_ = SCM_EOL;
   smobify_self ();
 }
index b8388670effb2a9f8f7d57eb36d63175ccdd64ed..3b6b53e664496f267d213aaec9efb90ae9c583fa 100644 (file)
@@ -54,3 +54,10 @@ Group_interface::set_interface ()
       elt_l_->set_elt_property (name_, SCM_EOL);
     }
 }
+
+Group_interface
+group (Score_element*s)
+{
+  Group_interface gi (s);
+  return gi;
+}
index 903088deced18597bc78fe0dafa7a4ec2b3481d1..93a453359c2ca856eb345f04d2a87ad922627f1a 100644 (file)
@@ -41,8 +41,6 @@ public:
 
   Real vertical_offset_needed () const;
   
-
-  SCM ugly_scm () const;
   Bezier_bow (Array<Offset> points, Direction dir);
   void calculate ();
   Bezier get_curve () const;
index fc832a5426096ea626327977638eeb79eccf4db2..fc4a713f217bcbda50e4fae9e7ee30c6b95cd2be 100644 (file)
@@ -28,6 +28,8 @@ public:
   void add_element (Score_element*);
 };
 
+Group_interface group (Score_element*);
+
 /*
   template<class T>
   Link_array<T> Group_interface__extract_elements (T *, String name);
index d86f04e62a353da967b97d914b35385f5f265940..2a227470fed0d3ed23510f278459e844e8983b8f 100644 (file)
 class Lookup
 {
 public:
+  String font_name_;
+  Adobe_font_metric * afm_l_;
+
+
   Lookup ();
   Lookup (Lookup const&);
 
   Molecule simple_bar (String s, Real w, Paper_def*) const;
   Molecule afm_find (String, bool warn=true) const;
   Molecule bar (String, Real height, Paper_def*) const;
-  Molecule beam (Real, Real, Real) const;
-  Molecule dashed_slur (Bezier, Real thick, Real dash) const;
-  Molecule ledger_line (Interval) const;
-  Molecule fill (Box b) const;
-  Molecule filledbox (Box b) const;  
   Molecule accordion (SCM arg, Real interline_f) const;
-  Molecule slur (Bezier controls, Real cthick, Real thick) const;
-  Molecule text (String style, String text, Paper_def*) const;
-  Molecule staff_brace (Real dy, int) const;
-  Molecule staff_bracket (Real height, Paper_def* paper_l) const;
-  Molecule volta (Real h, Real w,  Real thick,  bool vert_start, bool vert_end) const;
-  Molecule special_time_signature (String, int,int, Paper_def*) const;
-  Molecule time_signature (int n,int d, Paper_def*) const;
 
-  String font_name_;
-  Adobe_font_metric * afm_l_;
+  static Molecule frame (Box b, Real thick);
+  static Molecule slur (Bezier controls, Real cthick, Real thick) ;
+  static Molecule beam (Real, Real, Real) ;
+  static Molecule dashed_slur (Bezier, Real thick, Real dash) ;
+  static Molecule fill (Box b) ;
+  static Molecule filledbox (Box b) ;  
+  static Molecule text (String style, String text, Paper_def*) ;
+  static Molecule staff_brace (Real dy, int) ;
+  static Molecule staff_bracket (Real height, Paper_def* paper_l) ;
 };
 
 #endif // LOOKUP_HH
index 17f2a977f28f3c28d08ed41f38937e017d49b748..25fdda52b49739298e18a3cbd2cd43cb6dcfd1b8 100644 (file)
@@ -19,6 +19,8 @@ class Note_head : public Rhythmic_head
 {
 public:
   static int compare (Note_head * const &a, Note_head *const &b) ;
+
+  Molecule ledger_line (Interval) const;
 protected:
   
   virtual void do_pre_processing();
diff --git a/lily/include/tie-column.hh b/lily/include/tie-column.hh
new file mode 100644 (file)
index 0000000..11d17ed
--- /dev/null
@@ -0,0 +1,29 @@
+
+/*   
+  tie-column.hh -- declare Tie_column
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef TIE_COLUMN_HH
+#define TIE_COLUMN_HH
+
+#include "spanner.hh"
+
+class Tie_column : public Spanner
+{
+public:
+  VIRTUAL_COPY_CONS (Score_element);
+  void add_tie (Score_element*);
+  Tie_column ();
+protected:
+  virtual void do_post_processing ();
+  void set_directions ();
+  
+};
+
+#endif /* TIE_COLUMN_HH */
+
index 9e8586ee2b2eafd0e7e3e80938233699fb9609dd..f074bab26a7c55b2b858ea5079339f83016898f9 100644 (file)
@@ -42,38 +42,6 @@ Lookup::Lookup (Lookup const& s)
 }
 
 
-/*
-  build a ledger line for small pieces.
- */
-Molecule
-Lookup::ledger_line (Interval xwid) const
-{
-  Drul_array<Molecule> endings;
-  endings[LEFT] = afm_find ("noteheads-ledgerending");
-  Molecule * e = &endings[LEFT];
-  endings[RIGHT] = *e;
-  
-  Real thick = e->dim_[Y_AXIS].length();
-  Real len = e->dim_[X_AXIS].length () - thick;
-
-  Molecule total;
-  Direction d = LEFT;
-  do {
-    endings[d].translate_axis (xwid[d] - endings[d].dim_[X_AXIS][d], X_AXIS);
-    total.add_molecule (endings[d]);    
-  } while ((flip(&d)) != LEFT);
-
-  Real xpos = xwid [LEFT] + len;
-
-  while (xpos + len + thick /2 <= xwid[RIGHT])
-    {
-      e->translate_axis (len, X_AXIS);
-      total.add_molecule (*e);
-      xpos += len;
-    }
-
-  return total;
-}
 
 
 Molecule
@@ -202,7 +170,7 @@ Lookup::bar (String str, Real h, Paper_def *paper_l) const
 }
 
 Molecule 
-Lookup::beam (Real slope, Real width, Real thick) const
+Lookup::beam (Real slope, Real width, Real thick) 
 {
   Real height = slope * width; 
   Real min_y = (0 <? height) - thick/2;
@@ -227,11 +195,8 @@ Lookup::beam (Real slope, Real width, Real thick) const
 
 
 
-/*
-  FIXME.
- */
 Molecule
-Lookup::dashed_slur (Bezier b, Real thick, Real dash) const
+Lookup::dashed_slur (Bezier b, Real thick, Real dash)
 {
   SCM l = SCM_EOL;
   for (int i= 4; i -- ;)
@@ -253,7 +218,7 @@ Lookup::dashed_slur (Bezier b, Real thick, Real dash) const
 
 
 Molecule
-Lookup::fill (Box b) const
+Lookup::fill (Box b) 
 {
   Molecule m;
   m.dim_ = b;
@@ -262,7 +227,7 @@ Lookup::fill (Box b) const
 
 
 Molecule
-Lookup::filledbox (Box b ) const
+Lookup::filledbox (Box b ) 
 {
   Molecule m;
   
@@ -278,6 +243,33 @@ Lookup::filledbox (Box b ) const
   return m;
 }
 
+Molecule
+Lookup::frame (Box b, Real thick)
+{
+  Molecule m;
+  Direction d = LEFT;
+  Axis a = X_AXIS;
+  while (a < NO_AXES)
+    {
+      do
+       {
+         Axis o = Axis ((a+1)%NO_AXES);
+
+         Box edges;
+         edges[a] = b[a][d] + 0.5 * thick * Interval (-1, 1);
+         edges[o][DOWN] = b[o][DOWN] - thick/2;
+         edges[o][UP] = b[o][UP] + thick/2;      
+         
+         
+         m.add_molecule (filledbox (edges));
+       }
+      while (flip (&d) != LEFT);
+    }
+  return m;
+  
+}
+
+
 /*
    TODO: THIS IS UGLY.  Since the user has direct access to TeX
    strings, we try some halfbaked attempt to detect TeX trickery.
@@ -327,7 +319,7 @@ sanitise_PS_string (String t)
 
 */
 Molecule
-Lookup::text (String style, String text, Paper_def *paper_l) const
+Lookup::text (String style, String text, Paper_def *paper_l) 
 {
   Molecule m;
   if (style.empty_b ())
@@ -384,18 +376,22 @@ Lookup::text (String style, String text, Paper_def *paper_l) const
 
 
 Molecule
-Lookup::staff_brace (Real y, int staff_size) const
+Lookup::staff_brace (Real y, int staff_size) 
 {
   Molecule m;
 
+  // URG
   Real step  = 1.0;
   int minht  = 2 * staff_size;
   int maxht = 7 *  minht;
   int idx = int (((maxht - step) <? y - minht) / step);
   idx = idx >? 0;
 
-
-  String nm = String ("feta-braces" + to_str (staff_size));
+  SCM l = ly_eval_str ("(style-to-cmr \"brace\")");
+  String nm = "feta-braces";
+  if (l != SCM_BOOL_F)
+    nm = ly_scm2string (gh_cdr (l));
+  nm += to_str (staff_size);
   SCM e =gh_list (ly_symbol2scm ("char"), gh_int2scm (idx), SCM_UNDEFINED);
   Atom *at = new Atom (e);
 
@@ -406,13 +402,13 @@ Lookup::staff_brace (Real y, int staff_size) const
   m.add_atom (at->self_scm_);
   return m;
 }
-
 
 /*
   Make a smooth curve along the points 
  */
 Molecule
-Lookup::slur (Bezier curve, Real curvethick, Real linethick) const
+Lookup::slur (Bezier curve, Real curvethick, Real linethick) 
 {
   Real alpha = (curve.control_[3] - curve.control_[0]).arg ();
   Bezier back = curve;
@@ -451,7 +447,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick) const
 }
 
 Molecule
-Lookup::staff_bracket (Real height, Paper_def* paper_l) const
+Lookup::staff_bracket (Real height, Paper_def* paper_l)
 {
   Molecule m;
   Atom *at = new Atom  ( gh_list (ly_symbol2scm ("bracket"),
@@ -472,25 +468,6 @@ Lookup::staff_bracket (Real height, Paper_def* paper_l) const
   return m;
 }
 
-Molecule
-Lookup::volta (Real h, Real w, Real thick, bool vert_start, bool vert_end) const
-{
-  Molecule m; 
-
-  Atom *at = new Atom(gh_list (ly_symbol2scm ("volta"),
-                    gh_double2scm (h),
-                    gh_double2scm (w),
-                    gh_double2scm (thick),
-                    gh_int2scm (vert_start),
-                    gh_int2scm (vert_end),
-                    SCM_UNDEFINED));
-
-  m.dim_[Y_AXIS] = Interval (- h/2, h/2);
-  m.dim_[X_AXIS] = Interval (0, w);
-
-  m.add_atom (at->self_scm_);
-  return m;
-}
 
 Molecule
 Lookup::accordion (SCM s, Real staff_space) const
index f1b3bf192d658b1ef9971ce0447dcbab8947ed38..d7da247660a90f0b37a419021e636ae9bbe7b97f 100644 (file)
 
 
 
+/*
+  build a ledger line for small pieces.
+ */
+Molecule
+Note_head::ledger_line (Interval xwid) const
+{
+  Drul_array<Molecule> endings;
+  endings[LEFT] = lookup_l()->afm_find ("noteheads-ledgerending");
+  Molecule * e = &endings[LEFT];
+  endings[RIGHT] = *e;
+  
+  Real thick = e->dim_[Y_AXIS].length();
+  Real len = e->dim_[X_AXIS].length () - thick;
+
+  Molecule total;
+  Direction d = LEFT;
+  do {
+    endings[d].translate_axis (xwid[d] - endings[d].dim_[X_AXIS][d], X_AXIS);
+    total.add_molecule (endings[d]);    
+  } while ((flip(&d)) != LEFT);
+
+  Real xpos = xwid [LEFT] + len;
+
+  while (xpos + len + thick /2 <= xwid[RIGHT])
+    {
+      e->translate_axis (len, X_AXIS);
+      total.add_molecule (*e);
+      xpos += len;
+    }
+
+  return total;
+}
+
 
 void
 Note_head::do_pre_processing ()
@@ -76,9 +109,8 @@ Note_head::do_brew_molecule_p() const
       Interval hd = out->dim_[X_AXIS];
       Real hw = hd.length ()/4;
       
-      Molecule ledger
-       = lookup_l ()->ledger_line  (Interval (hd[LEFT] - hw,
-                                              hd[RIGHT] + hw));
+      Molecule ledger (ledger_line  (Interval (hd[LEFT] - hw,
+                                              hd[RIGHT] + hw)));
       
       int parity =  abs(int (p)) % 2;
       
index 7bc608f6657dd76e6a2a5610f0881b5c8d1707d6..9e9a57d9b1575775a22e49fa8b0211ef1dfe6d8d 100644 (file)
@@ -153,7 +153,7 @@ Paper_outputter::dump_onto (Paper_stream *ps)
       scm_display (gh_str02scm (
        ";;; Usage: guile -s x.scm > x.tex\n"
        "(primitive-load-path 'lily.scm)\n"
-       "(scm-musa-output)\n"
+       "(scm-as-output)\n"
        ";(scm-tex-output)\n"
        ";(scm-ps-output)\n"
        "(map (lambda (x) (display (eval x))) '(\n"
index 7bbf22594dcc22889d9bfe2a1cb727698277beab..768f07f7c71a84f3f30e742188f2de1ba0f39bc4 100644 (file)
@@ -80,7 +80,8 @@ Score_element::Score_element (Score_element const&s)
   /*
     should protect because smobify_self () might trigger GC.
    */
-  element_property_alist_ = scm_protect_object (ly_deep_copy (s.element_property_alist_));
+  SCM onstack = ly_deep_copy (s.element_property_alist_);
+  element_property_alist_ = onstack;
 
   output_p_ =0;
   status_i_ = s.status_i_;
@@ -639,7 +640,6 @@ Score_element::print_smob (SCM s, SCM port, scm_print_state *)
 void
 Score_element::do_smobify_self ()
 {
-  scm_unprotect_object (element_property_alist_); // ugh
 }
 
 SCM
diff --git a/lily/tie-column.cc b/lily/tie-column.cc
new file mode 100644 (file)
index 0000000..be2116e
--- /dev/null
@@ -0,0 +1,36 @@
+/*   
+  tie-column.cc --  implement Tie_column
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "tie-column.hh"
+#include "group-interface.hh"
+
+Tie_column::Tie_column ()
+{
+  set_elt_property ("ties", SCM_EOL);
+}
+
+void
+Tie_column::add_tie (Score_element *s)
+{
+  group (s).add_element (s);
+  s->add_dependency (this);
+}
+
+void
+Tie_column::set_directions ()
+{
+  Link_array<Score_element> s =
+    Group_interface__extract_elements (this, (Score_element*)0, "ties");
+}
+
+void
+Tie_column::do_post_processing ()
+{
+  set_directions ();
+}
index e9e1ab70606ea8bd8c31094a9d45c34fd6324f63..6eb820b71f5819f68526f0d82b001c259b00e5a8 100644 (file)
@@ -5,6 +5,7 @@
 
   (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
+#include <math.h>
 
 #include "lookup.hh"
 #include "paper-def.hh"
@@ -61,20 +62,6 @@ Tie::get_default_dir () const
     return DOWN;
   else
     return UP;
-
-#if 0 
-  Real p1 = Staff_symbol_referencer_interface (head (LEFT)).position_f () ;
-  Real p2 = Staff_symbol_referencer_interface (head (RIGHT)).position_f () ;  
-  
-  int m = int (p1  + p2);
-
-  /*
-    If dir is not determined: inverse of stem: down
-    (see stem::get_default_dir ())
-   */
-  Direction neutral_dir = (Direction)(int)paper_l ()->get_var ("stem_default_neutral_direction");
-  return (m == 0) ? other_dir (neutral_dir) : (m < 0) ? DOWN : UP;
-#endif
 }
 
 void
@@ -131,45 +118,6 @@ Tie::do_post_processing()
     OSU: not different for outer notes, so why all this code?
     ie,  can we drop this, or should it be made switchable.
    */
-#if 0
-  Direction d = LEFT;
-  do
-    {
-      Real head_width_f = head (d)
-       ? head (d)->extent (X_AXIS).length ()
-       : 0;
-      /*
-       side attached to outer (upper or lower) notehead of chord
-      */
-      if (head (d)
-         /*
-
-               a~a~a;
-
-           to second tie, middle notehead seems not extremal
-
-           Getting scared a bit by score-element's comment:
-           // is this a good idea?
-         */
-         // FIXME extremal deprecated
-         && (head (d)->get_elt_property ("extremal")
-             != SCM_UNDEFINED))
-       {
-       if (d == LEFT)
-           dx_f_drul_[d] += head_width_f;
-         dx_f_drul_[d] += -d * x_gap_f;
-       }
-      /*
-       side attached to inner notehead
-      */
-      else
-       {
-         dx_f_drul_[d] += -d * head_width_f;
-       }
-    } while (flip (&d) != LEFT);
-
-#else
-
   if (head (LEFT))
     dx_f_drul_[LEFT] = head (LEFT)->extent (X_AXIS).length ();
   else
@@ -177,8 +125,6 @@ Tie::do_post_processing()
   dx_f_drul_[LEFT] += x_gap_f;
   dx_f_drul_[RIGHT] -= x_gap_f;
 
-#endif
-
   /* 
    Slur and tie placement [OSU]  -- check this
 
@@ -196,8 +142,8 @@ Tie::do_post_processing()
 
 
   Real ypos = head (LEFT)
-    ? Staff_symbol_referencer_interface (head (LEFT)).position_f ()
-    : Staff_symbol_referencer_interface (head (RIGHT)).position_f () ;  
+    ? staff_symbol_referencer (head (LEFT)).position_f ()
+    : staff_symbol_referencer (head (RIGHT)).position_f () ;  
 
   Real y_f = half_staff_space * ypos; 
   int ypos_i = int (ypos);
@@ -258,101 +204,44 @@ Tie::do_brew_molecule_p () const
 Bezier
 Tie::get_curve () const
 {
-  Bezier_bow b (get_encompass_offset_arr (), directional_element (this).get ());
+  Direction d (directional_element (this).get ());
+  Bezier_bow b (get_encompass_offset_arr (), d);
 
   b.ratio_ = paper_l ()->get_var ("slur_ratio");
   b.height_limit_ = paper_l ()->get_var ("slur_height_limit");
   b.rc_factor_ = paper_l ()->get_var ("slur_rc_factor");
 
   b.calculate ();
-  return b.get_curve ();
-}
-
-#if 0
-
-/*
-  TODO: FIXME.
- */
-
-/*
-  Clipping
-
-  This function tries to address two issues:
-    * the tangents of the slur should always point inwards 
-      in the actual slur, i.e.  *after rotating back*.
-
-    * slurs shouldn't be too high 
-      let's try : h <= 1.2 b && h <= 3 staffheight?
-
-  We could calculate the tangent of the bezier curve from
-  both ends going inward, and clip the slur at the point
-  where the tangent (after rotation) points up (or inward
-  with a certain maximum angle).
-  
-  However, we assume that real clipping is not the best
-  answer.  We expect that moving the outer control point up 
-  if the slur becomes too high will result in a nicer slur 
-  after recalculation.
-
-  Knowing that the tangent is the line through the first
-  two control points, we'll clip (move the outer control
-  point upwards) too if the tangent points outwards.
- */
-
-bool
-Bezier_Tie::calc_clipping ()
-{
-  Real clip_height = paper_l_->get_var ("slur_clip_height");
-  Real clip_ratio = paper_l_->get_var ("slur_clip_ratio");
-  Real clip_angle = paper_l_->get_var ("slur_clip_angle");
-
-  Real b = curve_.control_[3][X_AXIS] - curve_.control_[0][X_AXIS];
-  Real clip_h = clip_ratio * b <? clip_height;
-  Real begin_h = curve_.control_[1][Y_AXIS] - curve_.control_[0][Y_AXIS];
-  Real end_h = curve_.control_[2][Y_AXIS] - curve_.control_[3][Y_AXIS];
-  Real begin_dy = 0 >? begin_h - clip_h;
-  Real end_dy = 0 >? end_h - clip_h;
-  
-  Real pi = M_PI;
-  Real begin_alpha = (curve_.control_[1] - curve_.control_[0]).arg () + dir_ * alpha_;
-  Real end_alpha = pi -  (curve_.control_[2] - curve_.control_[3]).arg () - dir_  * alpha_;
-
-  Real max_alpha = clip_angle / 90 * pi / 2;
-  if ((begin_dy < 0) && (end_dy < 0)
-    && (begin_alpha < max_alpha) && (end_alpha < max_alpha))
-    return false;
+  Bezier c (b.get_curve ());
 
-  transform_back ();
+  /* should do this for slurs as well. */
+  Array<Real> horizontal (c.solve_derivative (Offset (1,0)));
 
-  if ((begin_dy > 0) || (end_dy > 0))
+  if (horizontal.size ())
     {
-      Real dy = (begin_dy + end_dy) / 4;
-      dy *= cos (alpha_);
-      encompass_[0][Y_AXIS] += dir_ * dy;
-      encompass_.top ()[Y_AXIS] += dir_ * dy;
+      /*
+       ugh. Doesnt work for non-horizontal curves.
+       */
+      Real space = staff_symbol_referencer (this).staff_space ();
+      Real y = c.curve_point (horizontal[0])[Y_AXIS];
+
+      Real ry = rint (y/space) * space;
+      Real diff = ry - y;
+      Real newy = y;
+      if (fabs (diff) < paper_l ()->get_var ("tie_staffline_clearance"))
+       {
+         newy = ry - 0.5 * space * sign (diff) ;
+       }
+
+      Real y0 = c.control_ [0][Y_AXIS];
+      c.control_[2][Y_AXIS] = 
+      c.control_[1][Y_AXIS] =
+       (c.control_[1][Y_AXIS] - y0)  * (newy / y) + y0; 
     }
   else
-    {
-      //ugh
-      Real c = 0.4;
-      if (begin_alpha >= max_alpha)
-       begin_dy = 0 >? c * begin_alpha / max_alpha * begin_h;
-      if (end_alpha >= max_alpha)
-       end_dy = 0 >? c * end_alpha / max_alpha * end_h;
-
-      encompass_[0][Y_AXIS] += dir_ * begin_dy;
-      encompass_.top ()[Y_AXIS] += dir_ * end_dy;
-
-      Offset delta = encompass_.top () - encompass_[0];
-      alpha_ = delta.arg ();
-    }
-
-  to_canonic_form ();
-
-  return true;
+    programming_error ("Tie is nowhere horizontal");
+  return c;
 }
-#endif
-
 
 
 Array<Offset>
index 9ea8b7a2c7ed547c3b48c25960a6c8ee0caa0c20..6258b17008f142d414fc23ced7e59b64515953e4 100644 (file)
@@ -19,6 +19,8 @@
 #include "stem.hh"
 #include "dimension-cache.hh"
 #include "group-interface.hh"
+#include "atom.hh"
+
 
 Volta_spanner::Volta_spanner ()
 {
@@ -65,8 +67,20 @@ Volta_spanner::do_brew_molecule_p () const
   Real dx = half_staff_space;
   Real w = spanner_length() - dx - get_broken_left_end_align ();
   Real h = paper_l()->get_var ("volta_spanner_height");
-  Molecule volta (lookup_l ()->volta (h, w, t, no_vertical_start, no_vertical_end));
 
+  Molecule volta; 
+
+  Atom *at = new Atom(gh_list (ly_symbol2scm ("volta"),
+                    gh_double2scm (h),
+                    gh_double2scm (w),
+                    gh_double2scm (t),
+                    gh_int2scm (no_vertical_start),
+                    gh_int2scm (no_vertical_end),
+                    SCM_UNDEFINED));
+
+  volta.dim_[Y_AXIS] = Interval (- h/2, h/2);
+  volta.dim_[X_AXIS] = Interval (0, w);
+  volta.add_atom (at->self_scm_);
   
   Molecule num (lookup_l ()->text ("volta",
                                   ly_scm2string (get_elt_property("text")),
index a9e1606befdd2bde0630547d08b2cd580a37f221..dda5863d2675a2898f4131c153c222205338b531 100644 (file)
@@ -3,7 +3,7 @@
 depth = ..
 
 INI_FILES = $(FLY_FILES) $(SLY_FILES) $(LY_FILES)
-EXTRA_DIST_FILES = $(SCM_FILES) init.musa
+EXTRA_DIST_FILES = $(SCM_FILES)
 
 INSTALLATION_DIR=$(datadir)/ly/
 INSTALLATION_FILES=$(INI_FILES)
diff --git a/ly/declarations-as.ly b/ly/declarations-as.ly
new file mode 100644 (file)
index 0000000..ccf8db4
--- /dev/null
@@ -0,0 +1,68 @@
+  
+breve = \duration { -1 0 }
+longa = \duration { -2 0 }
+maxima = \duration { -3 0 }
+
+#(eval-string (ly-gulp-file "generic-property.scm"))
+
+\include "nederlands.ly"               % dutch
+\include "chord-modifiers.ly"
+\include "script.ly"
+
+
+% declarations for standard directions
+left = -1
+right = 1
+up = 1
+down = -1
+start = -1
+stop = 1
+smaller = -1
+bigger = 1
+
+center=0
+
+break =  \penalty  -1000000; 
+nobreak =  \penalty 1000000; 
+
+major = 0
+minor = 3
+
+ionian = 0
+locrian = 1
+aeolian = 3
+mixolydian = 5
+lydian = 7
+phrygian = 8
+dorian = 10
+
+melisma = \property Staff.melismaBusy = ##t
+melismaEnd = \property Staff.melismaBusy = ##f
+
+%papersize = "a4"
+%\include "generic-paper.ly"
+
+#(eval-string (ly-gulp-file "paper.scm"))
+
+\paper {
+       texsetting = "";
+       pssetting = "";
+       scmsetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse;\n";% UGH. 
+}
+
+\include "paper-as9.ly"
+
+% ugh
+\include "midi.ly"
+
+\include "textscripts.ly"
+\include "spanners.ly"
+
+\include "property.ly"
+
+
+
+unusedEntry = \notes { c4 }            % reset default duration
+
+% music = "\melodic\relative c"
+
diff --git a/ly/declarations-musa.ly b/ly/declarations-musa.ly
deleted file mode 100644 (file)
index 854e707..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-  
-breve = \duration { -1 0 }
-longa = \duration { -2 0 }
-maxima = \duration { -3 0 }
-
-#(eval-string (ly-gulp-file "generic-property.scm"))
-
-\include "nederlands.ly"               % dutch
-\include "chord-modifiers.ly"
-\include "script.ly"
-
-
-% declarations for standard directions
-left = -1
-right = 1
-up = 1
-down = -1
-start = -1
-stop = 1
-smaller = -1
-bigger = 1
-
-center=0
-
-break =  \penalty  -1000000; 
-nobreak =  \penalty 1000000; 
-
-major = 0
-minor = 3
-
-ionian = 0
-locrian = 1
-aeolian = 3
-mixolydian = 5
-lydian = 7
-phrygian = 8
-dorian = 10
-
-melisma = \property Staff.melismaBusy = ##t
-melismaEnd = \property Staff.melismaBusy = ##f
-
-%papersize = "a4"
-%\include "generic-paper.ly"
-
-#(eval-string (ly-gulp-file "paper.scm"))
-
-\paper {
-       texsetting = "";
-       pssetting = "";
-       scmsetting = "(lilyponddefs.ps) findlibfile {exch pop //systemdict /run get exec} { /undefinedfilename signalerror } ifelse;\n";% UGH. 
-}
-
-\include "paper-musa9.ly"
-
-% ugh
-\include "midi.ly"
-
-\include "textscripts.ly"
-\include "spanners.ly"
-
-\include "property.ly"
-
-
-
-unusedEntry = \notes { c4 }            % reset default duration
-
-% music = "\melodic\relative c"
-
index a65ad4bd38d05bdd1047e5e4df4ba03dec0173a7..759f8758db0926299b4f19870f39a99965cd39fa 100644 (file)
@@ -95,7 +95,7 @@ RhythmicStaffContext=\translator{
        
        Generic_property_list = #generic-staff-properties
        
-       barSize = \staffheight;
+       barSize = #'staff-height
        \consists "Pitch_squash_engraver";
        \consists "Separating_line_group_engraver";     
        \name RhythmicStaff;
@@ -114,7 +114,6 @@ VoiceContext = \translator {
        dynamicPadding = #5.0
        Generic_property_list = #generic-voice-properties
 
-
        \consists "Dynamic_engraver";   % must come before text_engraver.
        \name Voice ;
        \consists "Property_engraver";
diff --git a/ly/init-as.fly b/ly/init-as.fly
new file mode 100644 (file)
index 0000000..6081a73
--- /dev/null
@@ -0,0 +1,41 @@
+% Toplevel AsciiScript initialisation file. 
+
+\version "1.3.24";
+
+\include "declarations-as.ly"
+
+% burp.  need to override lily.scm
+#(define cmr-alist 
+  '(("bold" . "cmbx") 
+    ("brace" . "as-braces")
+    ("dynamic" . "cmr") 
+    ("feta" . "feta") 
+    ("feta-1" . "feta") 
+    ("feta-2" . "feta") 
+    ("finger" . "as-number") 
+    ("typewriter" . "cmtt") 
+    ("italic" . "cmti") 
+    ("roman" . "cmr") 
+    ("script" . "cmr") 
+    ("large" . "cmbx") 
+    ("Large" . "cmbx") 
+    ("mark" . "as-number") 
+    ("number" . "as-number") 
+    ("volta" . "as-number"))
+)
+
+\score { 
+  \context Voice \notes\relative c {
+    \maininput
+  }
+  \paper {
+    \paper_as_nine
+    %linewidth=-1.0;
+    %indent = 0.0;
+    \translator { \StaffContext barSize = #'staff-height }
+
+    % no beam-slope
+    %\translator { \VoiceContext beamHeight = #0; }
+  }  
+  %\midi{ }
+}
diff --git a/ly/init-as.ly b/ly/init-as.ly
new file mode 100644 (file)
index 0000000..372a0c1
--- /dev/null
@@ -0,0 +1,36 @@
+% Toplevel AsciiScript initialisation file. 
+
+\version "1.3.24";
+
+\include "declarations-as.ly"
+
+% burp.  need to override lily.scm
+#(define cmr-alist 
+  '(("bold" . "cmbx") 
+    ("brace" . "as-braces")
+    ("dynamic" . "cmr") 
+    ("feta" . "feta") 
+    ("feta-1" . "feta") 
+    ("feta-2" . "feta") 
+    ("finger" . "as-number") 
+    ("typewriter" . "cmtt") 
+    ("italic" . "cmti") 
+    ("roman" . "cmr") 
+    ("script" . "cmr") 
+    ("large" . "cmbx") 
+    ("Large" . "cmbx") 
+    ("mark" . "as-number") 
+    ("number" . "as-number") 
+    ("volta" . "as-number"))
+)
+
+\paper {
+    \paper_as_nine
+    \translator { \StaffContext barSize = #'staff-height }
+
+    % no beam-slope
+    %\translator { \VoiceContext beamHeight = #0; }
+}  
+
+\maininput
+
diff --git a/ly/init.musa b/ly/init.musa
deleted file mode 100644 (file)
index ba94810..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-% Toplevel MUSicAscii initialisation file. 
-
-\version "1.3.24";
-
-\include "declarations-musa.ly"
-
-% burp.  need to override lily.scm
-#(define cmr-alist 
-  '(("bold" . "cmbx") 
-    ("dynamic" . "feta-din") 
-    ("feta" . "feta") 
-    ("feta-1" . "feta") 
-    ("feta-2" . "feta") 
-    ("finger" . "musa-nummer") 
-    ("typewriter" . "cmtt") 
-    ("italic" . "cmti") 
-    ("roman" . "cmr") 
-    ("script" . "cmr") 
-    ("large" . "cmbx") 
-    ("Large" . "cmbx") 
-    ("mark" . "musa-nummer") 
-    ("number" . "musa-nummer") 
-    ("volta" . "musa-nummer"))
-)
-
-\score { 
-  \context Voice \notes\relative c {
-    \maininput
-  }
-  \paper {
-    \paper_musa_nine
-    %linewidth=-1.0;
-    %indent = 0.0;
-  }  
-  %\midi{ }
-}
diff --git a/ly/paper-as5.ly b/ly/paper-as5.ly
new file mode 100644 (file)
index 0000000..5c8c5d5
--- /dev/null
@@ -0,0 +1,41 @@
+% paper-as5.ly
+
+\version "1.3.24";
+
+paper_as_five = \paper {
+       staffheight = 5.\char;
+
+       font_large = 1.;
+       font_Large = 1.;        
+       font_normal = 1.;
+       font_script = 1.;
+
+       font_finger = 1.;
+       font_volta = 1.;
+       font_number = 1.;
+       font_mark = 1.;
+
+       % what about:
+       "font_number-1" = 1.;
+       %"font_number" = 10.;
+       "font_number+1" = 1.;
+       
+       % Ugh
+       magnification_dynamic = 2.;
+       
+       % ugh see table20 for sizes
+       quartwidth =  3.\char;
+       wholewidth = 3.\char;
+
+       -2 = \font "as5"
+       -1 = \font "as5"
+       0 = \font "as5"
+
+       "font_feta-2" = 9.;
+       "font_feta-1" = 9.;
+       "font_feta" = 9.;
+
+       \include "params-as.ly";
+}
+
+\paper { \paper_as_five }
diff --git a/ly/paper-as9.ly b/ly/paper-as9.ly
new file mode 100644 (file)
index 0000000..655a642
--- /dev/null
@@ -0,0 +1,41 @@
+% paper-as9.ly
+
+\version "1.3.24";
+
+paper_as_nine = \paper {
+       staffheight = 9.\char;
+
+       font_large = 4.;
+       font_Large = 4.;        
+       font_normal = 4.;
+       font_script = 1.;
+
+       font_finger = 1.;
+       font_volta = 1.;
+       font_number = 4.;
+       font_mark = 4.;
+
+       % what about:
+       "font_number-1" = 1.;
+       %"font_number" = 10.;
+       "font_number+1" = 4.;
+       
+       % Ugh
+       magnification_dynamic = 2.;
+       
+       % ugh see table20 for sizes
+       quartwidth =  3.\char;
+       wholewidth = 3.\char;
+
+       -2 = \font "as9"
+       -1 = \font "as9"
+       0 = \font "as9"
+
+       "font_feta-2" = 9.;
+       "font_feta-1" = 9.;
+       "font_feta" = 9.;
+
+       \include "params-as.ly";
+}
+
+\paper { \paper_as_nine }
diff --git a/ly/paper-musa9.ly b/ly/paper-musa9.ly
deleted file mode 100644 (file)
index d226c5b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-% paper-musa.ly
-
-\version "1.3.24";
-
-paper_musa_nine = \paper {
-       staffheight = 9.\char;
-
-       font_large = 12.;
-       font_Large = 12.;       
-       font_normal = 10.;
-       font_script = 8.;
-
-       font_finger = 1.;
-       font_volta = 1.;
-       font_number = 1.;
-       font_mark = 1.;
-
-       % what about:
-       "font_number-1" = 8.;
-       %"font_number" = 10.;
-       "font_number+1" = 12.;
-       
-       % Ugh
-       magnification_dynamic = 2.;
-       
-       % ugh see table20 for sizes
-       quartwidth =  3.\char;
-       wholewidth = 3.\char;
-
-       -2 = \font "musa9"
-       -1 = \font "musa9"
-       0 = \font "musa9"
-
-       "font_feta-2" = 9.;
-       "font_feta-1" = 9.;
-       "font_feta" = 9.;
-
-       \include "params-musa.ly";
-}
-
-\paper { \paper_musa_nine }
diff --git a/ly/params-as.ly b/ly/params-as.ly
new file mode 100644 (file)
index 0000000..94dbfc8
--- /dev/null
@@ -0,0 +1,238 @@
+% params-as.ly
+% generic paper parameters
+
+#'staff-height = \staffheight;
+
+%%paperfile = \papersize + ".ly";
+%%% paperfile = "a4.ly";
+%%\include \paperfile;
+%hsize = 60.0\char;
+%vsize = 60.0\char;  %?
+
+%%\include "paper.ly";
+linewidth = 60.0\char;
+textheight = 60.0\char;
+indent = 8.0\char;
+
+interline = (\staffheight - 1.0 ) / 4.0;
+stafflinethickness = \interline / 2.0;
+
+% urg, need grace_ versions of these too?
+beam_thickness = 0.52 * (\interline - \stafflinethickness);
+
+#'beam-thickness = \beam_thickness;  %% UGR
+
+
+interbeam = (2.0 * \interline + \stafflinethickness - \beam_thickness) / 2.0;
+interbeam4 = (3.0 * \interline - \beam_thickness) / 3.0;
+
+%{
+The space taken by a note is determined by the formula 
+
+arithmetic_multiplier * ( c + log2 (time) ))
+
+where code(time) is the amount of time a note occupies.  The value
+of code(c) is chosen such that the smallest space within a measure is
+arithmetic_basicspace.  The smallest space is the one following the
+shortest note in the measure.  Typically arithmetic_basicspace is set
+to the width of a quarter note head.
+%}
+arithmetic_basicspace = 2.;
+arithmetic_multiplier = 0.9 * \quartwidth ;
+
+
+#'Stem_tremolo::beam-width = 1.5 * \quartwidth ; 
+
+#'Clef_item::visibility-lambda = #postbreak-only-visibility
+#'Key_item::visibility-lambda = #postbreak-only-visibility
+#'Breathing_sign::visibility-lambda = #non-postbreak-visibility
+
+% catch suspect beam slopes, set slope to zero if
+% outer stem is lengthened more than
+beam_lengthened = 0.2 * \interline;
+% and slope is running away steeper than
+beam_steep_slope = 0.2 / 1.0;
+
+%{
+dit(code(slur_x_gap)) Horizontal space between note and slur.  Set to
+code(\interline / 5) by default.  
+
+%}
+% OSU: suggested gap = ss / 5;
+slur_x_gap = \interline / 5.0;
+slur_y_gap = 0.25 * \interline;
+slur_y_free = 0.75 * \interline;
+slur_x_minimum = 1.5 * \interline;
+
+%{
+Like beams, slurs often aren't as steep as the notes they encompass.
+This sets the amount of damping.
+%}
+% slope damping: keep dy/dx < slur_slope_damping
+slur_slope_damping = 0.3;
+slur_interstaff_slope_damping = 0.6;
+% height damping: keep h/dx < slur_height_damping
+slur_height_damping = 0.4;
+slur_interstaff_height_damping = 0.5;
+% snap to stem if slur ends closer to stem than
+slur_snap_to_stem = 1.75 * \interline;
+slur_interstaff_snap_to_stem = 2.5 * \interline;
+% maximum dy change allowed by snapping
+slur_snap_max_slope_change = 0.5;
+slur_interstaff_snap_max_slope_change = 0.5;
+
+
+
+tie_x_minimum = \interline + \slur_x_minimum;
+% OSU: tie gap == slur gap
+tie_x_gap = \slur_x_gap;
+tie_y_gap = 0.25 * \interline;
+% length of a tie that's a staffspace high
+tie_staffspace_length = 4.0 * \interline;
+
+% ugh: rename to bow (in bezier.cc and fonts.doc too...)
+
+% used to be 1.4 .
+slur_thickness = 1.2 * \stafflinethickness;
+tie_thickness = 1.2 * \stafflinethickness;
+
+%{
+ Specifies the maximum height of slurs.
+%}
+slur_height_limit = \staffheight;
+
+
+%{
+Specifes the ratio of slur hight to slur width
+to aim for.  Default value is 0.3. 
+%}
+
+% slur_ratio = 0.3;
+% try bit flatter slurs
+slur_ratio = 0.25;
+slur_clip_ratio = 1.2;
+slur_clip_height = 3.0 * \staffheight;
+slur_clip_angle = 100.0;
+slur_rc_factor = 2.4;
+
+% ugh
+notewidth = 3.0\char;
+
+gourlay_energybound = 100000.;
+%{
+Maximum number of measures per line to try when using Gourlay
+method. 
+%}
+gourlay_maxmeasures = 10.;
+
+bar_kern = 1.0\char;
+bar_thinkern = 1.0\char;
+barthick_thick = 2.0\char;
+barthick_score = 1.0\char;
+barthick_thin = 1.0\char;
+
+bracket_arch_thick = \interline / 3.0;
+bracket_width = 2.0 * \interline;
+bracket_thick = 2.0 * \stafflinethickness;
+bracket_arch_height = 1.5 * \interline;
+bracket_arch_width = \bracket_arch_height;
+bracket_arch_angle = 50.0;
+
+tuplet_spanner_gap = 2.0 * \interline;
+tuplet_thick = 1.0\char;
+volta_thick = 1.0\char;
+volta_spanner_height = 1.0\char;
+
+% relative thickness of thin lines  1.6 : 1 : 0.8
+stemthickness = 1.0\char;
+rulethickness = 1.0\char;
+
+
+extender_height = 0.8*\stafflinethickness;
+
+hyphen_thickness = 0.05*\font_normal;
+hyphen_height = 0.2*\font_normal;
+hyphen_minimum_length = 0.25*\font_normal;
+
+% Multi-measure rests
+multi_measure_rest_x_minimum = 2.5*\staffheight;
+multi_measure_rest_padding = 2.0 *\interline;
+multi_measure_rest_expand_limit = 10.0;
+
+% chop off this much when next to pp / ff sign.
+crescendo_shorten = 4.0 * \interline;
+crescendo_thickness   = \stafflinethickness;
+crescendo_height = 0.666 * \interline;
+
+% in internote.
+restcollision_minimum_dist = 3.0;
+restcollision_minimum_beamdist = 1.5;
+
+
+% unit for note collision resolving
+collision_note_width = \notewidth;     %ugh.
+
+% deprecated!
+postBreakPadding = 0.0;
+
+% optical correction amount.
+stemSpacingCorrection = 0.5*\interline;
+
+
+%{
+ relative strength of space following breakable columns (eg. prefatory matter)
+ %}
+breakable_column_space_strength = 2.0; 
+
+% space after inline clefs and such get this much stretched
+decrease_nonmus_spacing_factor = 1.0 ;
+
+%{
+ space before musical columns (eg. taken by accidentals) get this much
+ stretched when they follow a musical column, in absence of grace notes.
+
+ 0.0 means no extra space (accidentals are ignored)
+%}
+musical_to_musical_left_spacing_factor = 0.4;
+
+%{
+ stretch space this much if there are grace notes before the column
+%}
+before_grace_spacing_factor = 1.2;
+
+%{
+If columns do not have spacing information set, set it to this much
+%}
+loose_column_distance = 2.0 * \interline;
+
+%{
+Relative cost of compressing (vs. stretching).  Increasing this
+will cause scores to be set looser
+.
+%}
+
+compression_energy_factor = 0.6;
+
+% if stem is on middle line, choose this direction.
+stem_default_neutral_direction = 1.0;
+
+% in interline
+articulation_script_padding_default = 1.0;
+
+% Backward compatibility -- has no function; 
+Gourlay = 0.0;
+Wordwrap =0.0;
+
+\include "engraver.ly";
+
+
+#'margin-shape = #'()
+
+
+% 
+#'Local_key_item::left-padding = #'0.2
+#'Local_key_item::right-padding = #'0.4
+
+#'Staff_symbol::staff-space = \interline ;
+#'Staff_symbol::line-count = #5
+
diff --git a/ly/params-musa.ly b/ly/params-musa.ly
deleted file mode 100644 (file)
index bd2266d..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-% params-musa.ly
-% generic paper parameters
-
-%%paperfile = \papersize + ".ly";
-%%% paperfile = "a4.ly";
-%%\include \paperfile;
-%hsize = 60.0\char;
-%vsize = 60.0\char;  %?
-
-%%\include "paper.ly";
-linewidth = 60.0\char;
-textheight = 60.0\char;
-indent = 8.0\char;
-
-%interline = \staffheight / 4.0;
-interline = 2.0\char;
-
-%stafflinethickness = \interline / 10.0;
-stafflinethickness = 1.0\char;
-
-% urg, need grace_ versions of these too?
-beam_thickness = 0.52 * (\interline - \stafflinethickness);
-
-#'beam-thickness = \beam_thickness;  %% UGR
-
-
-interbeam = (2.0 * \interline + \stafflinethickness - \beam_thickness) / 2.0;
-interbeam4 = (3.0 * \interline - \beam_thickness) / 3.0;
-
-%{
-The space taken by a note is determined by the formula 
-
-arithmetic_multiplier * ( c + log2 (time) ))
-
-where code(time) is the amount of time a note occupies.  The value
-of code(c) is chosen such that the smallest space within a measure is
-arithmetic_basicspace.  The smallest space is the one following the
-shortest note in the measure.  Typically arithmetic_basicspace is set
-to the width of a quarter note head.
-%}
-arithmetic_basicspace = 2.;
-arithmetic_multiplier = 0.9 * \quartwidth ;
-
-
-#'Stem_tremolo::beam-width = 1.5 * \quartwidth ; 
-
-#'Clef_item::visibility-lambda = #postbreak-only-visibility
-#'Key_item::visibility-lambda = #postbreak-only-visibility
-#'Breathing_sign::visibility-lambda = #non-postbreak-visibility
-
-% catch suspect beam slopes, set slope to zero if
-% outer stem is lengthened more than
-beam_lengthened = 0.2 * \interline;
-% and slope is running away steeper than
-beam_steep_slope = 0.2 / 1.0;
-
-%{
-dit(code(slur_x_gap)) Horizontal space between note and slur.  Set to
-code(\interline / 5) by default.  
-
-%}
-% OSU: suggested gap = ss / 5;
-slur_x_gap = \interline / 5.0;
-slur_y_gap = 0.25 * \interline;
-slur_y_free = 0.75 * \interline;
-slur_x_minimum = 1.5 * \interline;
-
-%{
-Like beams, slurs often aren't as steep as the notes they encompass.
-This sets the amount of damping.
-%}
-% slope damping: keep dy/dx < slur_slope_damping
-slur_slope_damping = 0.3;
-slur_interstaff_slope_damping = 0.6;
-% height damping: keep h/dx < slur_height_damping
-slur_height_damping = 0.4;
-slur_interstaff_height_damping = 0.5;
-% snap to stem if slur ends closer to stem than
-slur_snap_to_stem = 1.75 * \interline;
-slur_interstaff_snap_to_stem = 2.5 * \interline;
-% maximum dy change allowed by snapping
-slur_snap_max_slope_change = 0.5;
-slur_interstaff_snap_max_slope_change = 0.5;
-
-
-
-tie_x_minimum = \interline + \slur_x_minimum;
-% OSU: tie gap == slur gap
-tie_x_gap = \slur_x_gap;
-tie_y_gap = 0.25 * \interline;
-% length of a tie that's a staffspace high
-tie_staffspace_length = 4.0 * \interline;
-
-% ugh: rename to bow (in bezier.cc and fonts.doc too...)
-
-% used to be 1.4 .
-slur_thickness = 1.2 * \stafflinethickness;
-tie_thickness = 1.2 * \stafflinethickness;
-
-%{
- Specifies the maximum height of slurs.
-%}
-slur_height_limit = \staffheight;
-
-
-%{
-Specifes the ratio of slur hight to slur width
-to aim for.  Default value is 0.3. 
-%}
-
-% slur_ratio = 0.3;
-% try bit flatter slurs
-slur_ratio = 0.25;
-slur_clip_ratio = 1.2;
-slur_clip_height = 3.0 * \staffheight;
-slur_clip_angle = 100.0;
-slur_rc_factor = 2.4;
-
-% ugh
-notewidth = 3.0\char;
-
-gourlay_energybound = 100000.;
-%{
-Maximum number of measures per line to try when using Gourlay
-method. 
-%}
-gourlay_maxmeasures = 10.;
-
-bar_kern = 1.0\char;
-bar_thinkern = 1.0\char;
-barthick_thick = 1.0\char;
-barthick_score = 1.0\char;
-barthick_thin = 1.0\char;
-
-bracket_arch_thick = \interline / 3.0;
-bracket_width = 2.0 * \interline;
-bracket_thick = 2.0 * \stafflinethickness;
-bracket_arch_height = 1.5 * \interline;
-bracket_arch_width = \bracket_arch_height;
-bracket_arch_angle = 50.0;
-
-tuplet_spanner_gap = 2.0 * \interline;
-tuplet_thick = 1.0*\stafflinethickness;
-volta_thick = 1.6*\stafflinethickness;
-volta_spanner_height = 2.0 *\interline;
-
-% relative thickness of thin lines  1.6 : 1 : 0.8
-stemthickness = 1.0\char;
-rulethickness = 1.0\char;
-
-
-extender_height = 0.8*\stafflinethickness;
-
-hyphen_thickness = 0.05*\font_normal;
-hyphen_height = 0.2*\font_normal;
-hyphen_minimum_length = 0.25*\font_normal;
-
-% Multi-measure rests
-multi_measure_rest_x_minimum = 2.5*\staffheight;
-multi_measure_rest_padding = 2.0 *\interline;
-multi_measure_rest_expand_limit = 10.0;
-
-% chop off this much when next to pp / ff sign.
-crescendo_shorten = 4.0 * \interline;
-crescendo_thickness   = \stafflinethickness;
-crescendo_height = 0.666 * \interline;
-
-% in internote.
-restcollision_minimum_dist = 3.0;
-restcollision_minimum_beamdist = 1.5;
-
-
-% unit for note collision resolving
-collision_note_width = \notewidth;     %ugh.
-
-% deprecated!
-postBreakPadding = 0.0;
-
-% optical correction amount.
-stemSpacingCorrection = 0.5*\interline;
-
-
-%{
- relative strength of space following breakable columns (eg. prefatory matter)
- %}
-breakable_column_space_strength = 2.0; 
-
-% space after inline clefs and such get this much stretched
-decrease_nonmus_spacing_factor = 1.0 ;
-
-%{
- space before musical columns (eg. taken by accidentals) get this much
- stretched when they follow a musical column, in absence of grace notes.
-
- 0.0 means no extra space (accidentals are ignored)
-%}
-musical_to_musical_left_spacing_factor = 0.4;
-
-%{
- stretch space this much if there are grace notes before the column
-%}
-before_grace_spacing_factor = 1.2;
-
-%{
-If columns do not have spacing information set, set it to this much
-%}
-loose_column_distance = 2.0 * \interline;
-
-%{
-Relative cost of compressing (vs. stretching).  Increasing this
-will cause scores to be set looser
-.
-%}
-
-compression_energy_factor = 0.6;
-
-% if stem is on middle line, choose this direction.
-stem_default_neutral_direction = 1.0;
-
-% in interline
-articulation_script_padding_default = 1.0;
-
-% Backward compatibility -- has no function; 
-Gourlay = 0.0;
-Wordwrap =0.0;
-
-\include "engraver.ly";
-
-
-#'margin-shape = #'()
-
-
-% 
-#'Local_key_item::left-padding = #'0.2
-#'Local_key_item::right-padding = #'0.4
-
-#'Staff_symbol::staff-space = \interline ;
-#'Staff_symbol::line-count = #5
-
index e38599966666d3293d9479620c4db051d122b25c..988e697e098c08c4fcfd7f59b949b65eb3a934e4 100644 (file)
@@ -1,6 +1,8 @@
 % params.ly
 % generic paper parameters
 
+#'staff-height = \staffheight;
+
 paperfile = \papersize + ".ly";
 % paperfile = "a4.ly";
 \include \paperfile;
@@ -74,6 +76,7 @@ slur_interstaff_snap_to_stem = 2.5 * \interline;
 % maximum dy change allowed by snapping
 slur_snap_max_slope_change = 0.5;
 slur_interstaff_snap_max_slope_change = 0.5;
+slur_thickness = 1.2 * \stafflinethickness;
 
 
 
@@ -87,8 +90,8 @@ tie_staffspace_length = 4.0 * \interline;
 % ugh: rename to bow (in bezier.cc and fonts.doc too...)
 
 % used to be 1.4 .
-slur_thickness = 1.2 * \stafflinethickness;
 tie_thickness = 1.2 * \stafflinethickness;
+tie_staffline_clearance = 2.0 *\tie_thickness;
 
 %{
  Specifies the maximum height of slurs.
@@ -100,7 +103,6 @@ slur_height_limit = \staffheight;
 Specifes the ratio of slur hight to slur width
 to aim for.  Default value is 0.3. 
 %}
-
 % slur_ratio = 0.3;
 % try bit flatter slurs
 slur_ratio = 0.25;
index bfe8f048aece7fed5ca82fbbff84c4ee28a740ae..0581974e2b6f6f47c2c16605018d3bf194175a53 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.24
-Entered-date: 13FEB00
+Version: 1.3.25
+Entered-date: 21FEB00
 Description: 
 Keywords: music notation typesetting midi fonts engraving
 Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
        janneke@gnu.org (Jan Nieuwenhuizen)
 Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
 Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
-       1000k lilypond-1.3.24.tar.gz 
+       1000k lilypond-1.3.25.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.24.tar.gz 
+       1000k lilypond-1.3.25.tar.gz 
 Copying-policy: GPL
 End
index a0800aac45711b28d5205d0dce9ef34edd2f9eb6..ac2d335a1c40e890c604751902f0170637d854e7 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.3.24
+Version: 1.3.25
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.24.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.25.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 # get Packager from (undocumented?) ~/.rpmmacros!
index 6bc5edb4589c6abc4f935cc178891be96da1ae7e..e1883dc80c47548cbec386deda44a87915f75970 100644 (file)
@@ -2,13 +2,11 @@
 
 depth = ..
 
-STEPMAKE_TEMPLATES=metafont metapost install install-out
+STEPMAKE_TEMPLATES=metafont metapost asciifont install install-out
 
 AF_FILES = $(wildcard *.af) 
-#AFM_FILES = $(wildcard *.afm) 
-AF_AFM_FILES = $(wildcard *.afm) 
 
-EXTRA_DIST_FILES += README feta.tex  $(AF_FILES) $(AF_AFM_FILES)
+EXTRA_DIST_FILES += README feta.tex
 
 FET_FILES = $(wildcard feta[0-9]*.mf)
 FONT_FILES = $(wildcard feta*[0-9].mf)
@@ -16,7 +14,7 @@ XPM_FONTS = feta20
 
 LOG_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.log))
 TEXTABLES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.tex))
-AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm)
+AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm) $(AF_FILES:.af=.afm))
 TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm))
 PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa)) 
 
@@ -24,7 +22,7 @@ ALL_GEN_FILES= $(TEXTABLES) $(LOG_FILES) $(AFM_FILES) $(TFM_FILES) $(PFA_FILES)
 
 #PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
 INSTALLATION_DIR=$(datadir)/mf/
-INSTALLATION_FILES=$(MF_FILES)
+INSTALLATION_FILES=$(MF_FILES) $(AF_FILES)
 
 INSTALLATION_OUT_SUFFIXES=1 2 3 4
 
index b1cdd49fbc1befe81933133826ee94c0bc84e406..c7fa397902d35d8277c1c9a1c4c0a993bf1fece3 100644 (file)
@@ -35,9 +35,9 @@ if test = 0:
        input feta-klef;
        input feta-timesig;
 else:
-%      input feta-bolletjes;   
+       input feta-bolletjes;   
 %      input feta-banier;
-       input feta-eindelijk;
+%      input feta-eindelijk;
 %      input feta-klef;
 %      input feta-toevallig;
 %      input feta-schrift;
diff --git a/mf/musa-nummer1.af b/mf/musa-nummer1.af
deleted file mode 100644 (file)
index 2873824..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# musa-nummer1.af --
-
-\f C 52; WX 1; N Numeral-4; B 0 1 0 1;
-4
diff --git a/mf/musa-nummer1.afm b/mf/musa-nummer1.afm
deleted file mode 100644 (file)
index 5037fc3..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-StartFontMetrics 2.0
-Comment musa-nummer1.afm
-FontName musa-nummer 1
-FontFamily musa-nummer
-StartCharMetrics 1
-Comment 52; WX 1; N Numeral-4; B 0 1000 0 1000;
-C 52; WX 1; N Numeral-4; B 0 100 0 100;
-EndCharMetrics
-EndFontMetrics %d
diff --git a/mf/musa9.af b/mf/musa9.af
deleted file mode 100644 (file)
index 178d640..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# musa9.af --
-
-\f C 23; WX 2; N dots-dot;  B 0 3 1 0;
-.
-\f C 33; WX 9; N noteheads-0;  B 0 3 1 0;
-(O)
-\f C 34; WX 6; N noteheads-1;  B 0 3 1 0;
-(O)
-\f C 35; WX 6; N noteheads-2;  B 0 3 1 0;
-(*)
-\f C 86; WX 7; N flags-d3; B  0 2 1 1;
-\
- \
-\f C 95 ; WX 1 ; N  clefs-G ;  B 5 0 -3 7;
-   /\       
-   | |
-   |/
-   |
-  /|
- / |
-|  | _
-| (@) )
- \ | /
-   |
-   |
- (_|
diff --git a/mf/musa9.afm b/mf/musa9.afm
deleted file mode 100644 (file)
index 3c0dcd2..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-
-StartFontMetrics 2.0
-Comment Musa9.afm
-FontName musa 9
-FontFamily musa
-StartCharMetrics 110
-C 0 ; WX 7 ; N  rests-0 ;  B 0 -3125 7500 0 ;
-C 1 ; WX 7 ; N  rests-1 ;  B 0 0 7500 3125 ;
-C 2 ; WX 7 ; N  rests-0o ;  B 0 -3125 7500 500 ;
-C 3 ; WX 7 ; N  rests-1o ;  B 0 -500 7500 3125 ;
-C 4 ; WX 3 ; N  rests--1 ;  B 0 0 3000 5000 ;
-C 5 ; WX 3 ; N  rests--2 ;  B 0 -5000 3000 5000 ;
-C 6 ; WX 40 ; N  rests--4 ;  B -20000 -5000 20000 5000 ;
-C 7 ; WX 5 ; N  rests-2 ;  B 0 -6250 5400 7812 ;
-C 8 ; WX 6 ; N  rests-3 ;  B 0 -5000 6666 4208 ;
-C 9 ; WX 7 ; N  rests-4 ;  B 0 -10000 7756 4208 ;
-C 10 ; WX 8 ; N  rests-5 ;  B 0 -10000 8752 9208 ;
-C 11 ; WX 9 ; N  rests-6 ;  B 0 -15000 9384 9208 ;
-C 12 ; WX 10 ; N  rests-7 ;  B 0 -15000 10447 14208 ;
-C 13 ; WX 4 ; N  rests-2mensural ;  B 0 0 4000 4000 ;
-C 14 ; WX 4 ; N  rests-3mensural ;  B 0 0 4000 4000 ;
-C 15 ; WX 4 ; N  rests-4mensural ;  B 0 0 4000 5000 ;
-C 16 ; WX 5 ; N  accidentals-1 ;  B 0 -7500 5500 7500 ;
-C 17 ; WX 3 ; N  accidentals-0 ;  B 0 -7500 3333 7500 ;
-C 18 ; WX 4 ; N  accidentals--1 ;  B -600 -2500 4000 10000 ;
-C 19 ; WX 7 ; N  accidentals--2 ;  B -600 -2500 7249 10000 ;
-C 20 ; WX 5 ; N  accidentals-2 ;  B 0 -2500 5000 2500 ;
-C 21 ; WX 3 ; N  accidentals-) ;  B 0 -5000 3000 5000 ;
-C 22 ; WX 3 ; N  accidentals-( ;  B -3000 -5000 0 5000 ;
-C 23 ; WX 2 ; N  dots-dot ;  B 0 -1125 2249 1125 ;
-C 24 ; WX 2 ; N  dots-repeatcolon ;  B 0 -2500 2249 2500 ;
-C 25 ; WX 13 ; N  noteheads--3mensural ;  B 0 -2750 13000 2750 ;
-C 26 ; WX 10 ; N  noteheads--2mensural ;  B 0 -2750 10000 2750 ;
-C 27 ; WX 10 ; N  noteheads--1mensural ;  B 0 -2750 10000 2750 ;
-C 28 ; WX 5 ; N  noteheads-0mensural ;  B 0 -2750 5000 2750 ;
-C 29 ; WX 5 ; N  noteheads-1mensural ;  B 0 -2750 5000 2750 ;
-C 30 ; WX 5 ; N  noteheads-2mensural ;  B 0 -2750 5000 2750 ;
-C 31 ; WX 5 ; N  noteheads-ledgerending ;  B -2500 -500 2500 500 ;
-C 32 ; WX 9 ; N  noteheads--1 ;  B 0 -2750 9900 2750 ;
-Comment 33 ; WX 9 ; N  noteheads-0 ;  B 0 -2750 9900 2750 ;
-C 33 ; WX 9 ; N  noteheads-0 ;  B 0 -1000 500 500 ;
-Comment 34 ; WX 6 ; N  noteheads-1 ;  B 0 -2750 6887 2750 ;
-C 34 ; WX 6 ; N  noteheads-1 ;  B 0 -1000 500 500 ;
-Comment 35 ; WX 6 ; N  noteheads-2 ;  B 0 -2750 6605 2750 ;
-C 35 ; WX 6 ; N  noteheads-2 ;  B 0 -1000 500 500 ;
-C 36 ; WX 9 ; N  noteheads-0diamond ;  B 0 -2750 9900 2750 ;
-C 37 ; WX 7 ; N  noteheads-1diamond ;  B 0 -2750 7081 2750 ;
-C 38 ; WX 6 ; N  noteheads-2diamond ;  B 0 -2750 6605 2750 ;
-C 39 ; WX 6 ; N  noteheads-2cross ;  B 0 -2750 6605 2750 ;
-C 40 ; WX 13 ; N  scripts-ufermata ;  B -6625 -375 6625 7250 ;
-C 41 ; WX 13 ; N  scripts-dfermata ;  B -6625 -7250 6625 375 ;
-C 42 ; WX 4 ; N  scripts-thumb ;  B -2000 -2500 2000 2500 ;
-C 43 ; WX 8 ; N  scripts-sforzato ;  B -4499 -2500 4499 2500 ;
-C 44 ; WX 1 ; N  scripts-staccato ;  B -750 -750 750 750 ;
-C 45 ; WX 2 ; N  scripts-ustaccatissimo ;  B -1000 -200 1000 5000 ;
-C 46 ; WX 2 ; N  scripts-dstaccatissimo ;  B -1000 -5000 1000 200 ;
-C 47 ; WX 6 ; N  scripts-tenuto ;  B -3000 -350 3000 350 ;
-C 48 ; WX 5 ; N  scripts-umarcato ;  B -2500 0 2500 5500 ;
-C 49 ; WX 5 ; N  scripts-dmarcato ;  B -2500 -5500 2500 0 ;
-C 50 ; WX 4 ; N  scripts-open ;  B -2000 -2500 2000 2500 ;
-C 51 ; WX 5 ; N  scripts-stopped ;  B -2750 -2750 2750 2750 ;
-C 52 ; WX 6 ; N  scripts-upbow ;  B -3250 0 3250 10400 ;
-C 53 ; WX 7 ; N  scripts-downbow ;  B -3750 0 3750 6666 ;
-C 54 ; WX 10 ; N  scripts-reverseturn ;  B -5468 -2647 5468 2647 ;
-C 55 ; WX 10 ; N  scripts-turn ;  B -5468 -2647 5468 2647 ;
-C 56 ; WX 10 ; N  scripts-trill ;  B -5000 0 5000 11250 ;
-C 57 ; WX 5 ; N  scripts-upedalheel ;  B -2500 -2500 2500 3333 ;
-C 58 ; WX 5 ; N  scripts-dpedalheel ;  B -2500 -3333 2500 2500 ;
-C 59 ; WX 5 ; N  scripts-upedaltoe ;  B -2500 0 2500 7500 ;
-C 60 ; WX 5 ; N  scripts-dpedaltoe ;  B -2500 -7500 2500 0 ;
-C 61 ; WX 5 ; N  scripts-flageolet ;  B -2666 -2666 2666 2666 ;
-C 62 ; WX 10 ; N  scripts-repeatsign ;  B -5000 -5000 5000 5000 ;
-C 63 ; WX 10 ; N  scripts-segno ;  B -5000 -7500 5000 7500 ;
-C 64 ; WX 10 ; N  scripts-coda ;  B -5083 -6750 5083 6750 ;
-C 65 ; WX 4 ; N  scripts-trilelement ;  B -3333 -2500 1306 2500 ;
-C 66 ; WX 11 ; N  scripts-prall ;  B -5653 -2500 5653 2500 ;
-C 67 ; WX 11 ; N  scripts-mordent ;  B -5653 -2500 5653 2500 ;
-C 68 ; WX 15 ; N  scripts-prallprall ;  B -7973 -2500 7973 2500 ;
-C 69 ; WX 15 ; N  scripts-prallmordent ;  B -7973 -2500 7973 2500 ;
-C 70 ; WX 15 ; N  scripts-upprall ;  B -7973 -2500 7973 2500 ;
-C 71 ; WX 15 ; N  scripts-downprall ;  B -7973 -2500 7973 2500 ;
-C 72 ; WX 15 ; N  scripts-accDiscant ;  B -7500 0 7500 15000 ;
-C 73 ; WX 5 ; N  scripts-accDot ;  B -2500 0 2500 0 ;
-C 74 ; WX 10 ; N  scripts-accFreebase ;  B -5000 0 5000 10000 ;
-C 75 ; WX 20 ; N  scripts-accStdbase ;  B -10000 0 10000 20000 ;
-C 76 ; WX 10 ; N  scripts-accBayanbase ;  B -5000 0 5000 15000 ;
-C 77 ; WX 15 ; N  scripts-accSB ;  B -7999 0 7999 11999 ;
-C 78 ; WX 15 ; N  scripts-accBB ;  B -7999 0 7999 11999 ;
-C 79 ; WX 10 ; N  scripts-accOldEE ;  B -5000 0 5000 10000 ;
-C 80 ; WX 10 ; N  scripts-accOldEES ;  B -5000 0 5000 10000 ;
-C 81 ; WX 6 ; N  flags-u3 ;  B -250 -15325 6169 250 ;
-C 82 ; WX 6 ; N  flags-u4 ;  B -250 -17825 6169 250 ;
-C 83 ; WX 6 ; N  flags-u5 ;  B -250 -21575 6169 250 ;
-C 84 ; WX 6 ; N  flags-u6 ;  B -250 -26575 6169 250 ;
-C 85 ; WX 9 ; N  flags-ugrace ;  B -3512 -10800 6169 -5000 ;
-C 86 ; WX 7 ; N  flags-d3 ;  B -250 -250 6827 14575 ;
-C 87 ; WX 7 ; N  flags-d4 ;  B -250 -250 6827 15325 ;
-C 88 ; WX 7 ; N  flags-d5 ;  B -250 -250 6827 19575 ;
-C 89 ; WX 7 ; N  flags-d6 ;  B -250 -250 6827 22075 ;
-C 90 ; WX 10 ; N  flags-dgrace ;  B -3907 4950 6827 10260 ;
-C 91 ; WX 13 ; N  clefs-C ;  B 0 -10000 13611 10000 ;
-C 92 ; WX 10 ; N  clefs-C_change ;  B 0 -8000 10888 8000 ;
-C 93 ; WX 10 ; N  clefs-F ;  B 2500 -12500 13000 5000 ;
-C 94 ; WX 8 ; N  clefs-F_change ;  B 1999 -10000 10400 4000 ;
-Comment  95 ; WX 13 ; N  clefs-G ;  B 642 -15000 13685 25000 ;
-Comment 95 ; WX 13 ; N  clefs-G ;  B 1000 -1000 1000 1000 ;
-C 95 ; WX 1 ; N  clefs-G ;  B 0 5 -5 10;
-C 96 ; WX 10 ; N  clefs-G_change ;  B 214 -12000 10648 20000 ;
-C 97 ; WX 17 ; N  timesig-C4/4 ;  B -9499 -5000 8499 5000 ;
-C 98 ; WX 17 ; N  timesig-C2/2 ;  B -9499 -6999 8499 6999 ;
-C 99 ; WX 17 ; N  timesig-old4/4 ;  B -8750 -3750 8750 3750 ;
-C 100 ; WX 17 ; N  timesig-old2/2 ;  B -8750 -5000 8750 5000 ;
-C 101 ; WX 17 ; N  timesig-old3/2 ;  B -8750 -3750 8750 3750 ;
-C 102 ; WX 17 ; N  timesig-old6/4 ;  B -8750 -3750 8750 3750 ;
-C 103 ; WX 17 ; N  timesig-old9/4 ;  B -8750 -3750 8750 3750 ;
-C 104 ; WX 17 ; N  timesig-old3/4 ;  B -8750 -5000 8750 5000 ;
-C 105 ; WX 17 ; N  timesig-old6/8 ;  B -8750 -5000 8750 5000 ;
-C 106 ; WX 17 ; N  timesig-old9/8 ;  B -8750 -5000 8750 5000 ;
-C 107 ; WX 17 ; N  timesig-old4/8 ;  B -8750 -3750 8750 3750 ;
-C 108 ; WX 17 ; N  timesig-old6/8alt ;  B -8750 -3750 8750 3750 ;
-C 109 ; WX 17 ; N  timesig-old2/4 ;  B -8750 -5000 8750 5000 ;
-EndCharMetrics
-EndFontMetrics %d
index 665d44f0a70f794390b8d787c4595f56e4194a0f..67f94fec7f1f79d734b801d7e570ad39d9942d88 100644 (file)
@@ -7,12 +7,14 @@
 
   % mutopia headers.
   mutopiatitle = "Das Wohltemperierte Clavier I, Fuga II (c-minor)";
-  mutopiacomposer = "J.S.Bach";
+  mutopiacomposer = "J. S. Bach (1685-1750)";
+  mutopiainstrument = "Piano";
   mutopiaopus = "BWV847";
   style = "baroque";
-  copyright =    "\\\\This music is part of the Mutopia project, http://sca.uwaterloo.ca/Mutopia/\\\\It has been typeset and placed in the public domain by Han-Wen Nienhuys.\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
+  copyright = "Public Domain";
+  tagline =    "\\\\This music is part of the Mutopia project, http://sca.uwaterloo.ca/Mutopia/\\\\It has been typeset and placed in the public domain by Han-Wen Nienhuys.\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
   maintainer = "hanwen@cs.uu.nl";
-  lastupdated = "1999/Oct/14";
+  lastupdated = "2000/Feb/14";
 }
 
 
index 0e0a0c3db81b0480be9b1be43bc69013e063fafd..c3a9ac8ea46b82c6e6060484dbc56d56836490a3 100644 (file)
 (use-modules (ice-9 regex))
 
 ;; do nothing in .scm output
-(define (comment s)
-  ""
-  )
-
-(define
-  (xnumbers->string l)
-  (string-append 
-   (map (lambda (n) (string-append (number->string n ) " ")) l)))
+(define (comment s) "")
 
 (define (mm-to-pt x)
   (* (/ 72.27 25.40) x)
          )
       )
 
+(define (glue-2-strings a b) 
+  (string-append a " " b))
 
-(define (glue-2-strings a b) (string-append a " " b))
-
-(define
-  (numbers->string l)
+(define (numbers->string l)
   (reduce glue-2-strings (map number->string l)))
 
 (define (chop-decimal x) (if (< (abs x) 0.001) 0.0 x))
 ;; roman-0, roman-1 roman+1 ?
 (define cmr-alist 
   '(("bold" . "cmbx") 
+    ("brace" . "feta-braces")
     ("dynamic" . "feta-din") 
     ("feta" . "feta") 
     ("feta-1" . "feta") 
        )
   )
 
-(define (musa-scm action-name)
+
+(define (arg->string arg)
+  (cond ((number? arg) (inexact->string arg 10))
+       ((string? arg) (string-append "\"" arg "\""))
+       ((symbol? arg) (string-append "\"" (symbol->string arg) "\""))))
+
+(define (func name . args)
+  (string-append 
+   "(" name 
+   (if (null? args) 
+       ""
+       (apply string-append 
+             (map (lambda (x) (string-append " " (arg->string x))) args)))
+   ")\n"))
+
+
+;;;; AsciiScript as
+(define (as-scm action-name)
+
+  (define (beam width slope thick)
+         (string-append
+          (func "set-line-char" "#")
+          (func "rline-to" width (* width slope))
+          ))
+
+  (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
+         (string-append
+          (func "rmove-to" (+ width 1) (- (/ height -2) 1))
+          (func "put" "\\\\")
+          (func "set-line-char" "|")
+          (func "rmove-to" 0 1)
+          (func "v-line" (+ height 1))
+          (func "rmove-to" 0 (+ height 1))
+          (func "put" "/")
+          ))
 
   (define (char i)
-    (string-append "char (" (inexact->string i 10) ")\n"))
+    (func "char" i))
 
   (define (end-output) 
-    "end_output ()\n")
+    (func "end-output"))
   
   (define (experimental-on)
          "")
          (let ((dx (+ width breapth))
                (dy (+ depth height)))
               (string-append 
-               "move_relative (" 
-               (inexact->string (* -1 breapth) 10)
-               ", "
-               (inexact->string (* -1 depth) 10)
-               ")\n"
+               (func "rmove-to" (* -1 breapth) (* -1 depth))
                (if (< dx dy)
-                   (string-append "vline (" (inexact->string dy 10) ")\n")
-                   (string-append "hline (" (inexact->string dx 10) ")\n")))))
+                   (string-append
+                    (func "set-line-char" 
+                          (if (<= dx 1) "|" "#"))
+                    (func "v-line" dy))
+                   (string-append
+                    (func "set-line-char" 
+                          (if (<= dy 1) "-" "="))
+                   (func "h-line" dx))))))
 
   (define (font-load-command name-mag command)
-    (string-append
-     "load_font (\"" 
-     (symbol->string (car name-mag)) "\", " 
-     (number->string (magstep (cdr name-mag)))
-     ")\n"))
+    (func "load-font" (car name-mag) (magstep (cdr name-mag))))
 
   (define (header creator generate) 
-    (string-append "header (\"" creator "\", \"" generate "\")\n"))
+    (func "header" creator generate))
 
   (define (header-end) 
-    "header_end ()\n")
+    (func "header-end"))
 
   (define (lily-def key val)
-         "")
+         (string-append "(define " key " " (arg->string val) ")\n"))
 
   (define (placebox x y s) 
-    (string-append 
-     "move_to (" (inexact->string x 10) ", " (inexact->string y 10) ")\n" s))
+    (string-append (func "move-to" x y) s))
 
   (define (select-font font-name-symbol)
     (let* ((c (assoc font-name-symbol font-name-alist)))
              "Programming error: No such font known " 
              (car font-name-symbol)))
            "")                         ; issue no command
-         (string-append "select_font (\"" (symbol->string (car font-name-symbol)) "\")\n"))))
+         (func "select-font" (car font-name-symbol)))))
 
   (define (start-line height)
-    (string-append "start_line (" (inexact->string height 10) ")\n"))
+         (func "start-line" height))
 
   (define (stop-line)
-    "stop_line ()\n")
+         (func "stop-line"))
 
   (define (text s)
-    (string-append "text (\"" s "\")\n"))
+         (func "text" s))
+
+;  (define (volta h w thick vert_start vert_end)
+;     (func "draw-volta" h w thick vert_start vert_end))
+
+  (define (volta h w thick vert-start vert-end)
+         (string-append
+          (if #t  ;(= 0 vert-start)
+              ""
+             (func "v-line" h))
+          ""
+          ;(func "rmove-to" 0 h)
+          ;(func "h-line" w)
+          (if #t ;(= 0 vert-end)
+              ""
+              (string-append
+               (func "rmove-to" w 0)
+               (func "v-line" (* -1 h))))))
 
   (cond ((eq? action-name 'all-definitions)
         `(begin
-           ;;(define beam ,beam)
-           ;;(define tuplet ,tuplet)
-           ;;(define bracket ,bracket)
+           (define beam ,beam)
+           (define bracket ,bracket)
            (define char ,char)
            ;;(define crescendo ,crescendo)
-           ;;(define volta ,volta)
            ;(define bezier-sandwich ,bezier-sandwich)
            ;;(define dashed-slur ,dashed-slur) 
            ;;(define decrescendo ,decrescendo) 
            (define stop-line ,stop-line)
            (define stop-last-line ,stop-line)
            (define text ,text)
+           ;;(define tuplet ,tuplet)
+           (define volta ,volta)
            ))
        ;;((eq? action-name 'tuplet) tuplet)
        ;;((eq? action-name 'beam) beam)
 (define (scm-ps-output)
   (eval (ps-scm 'all-definitions)))
 
-(define (scm-musa-output)
-  (display (gulp-file "musa.py"))
-  (eval (musa-scm 'all-definitions)))
-
+(define (scm-as-output)
+  (eval (as-scm 'all-definitions)))
                                
 ; Russ McManus, <mcmanus@IDT.NET>  
 ; 
       (set! ret-ls (cons (fn (car (car alist)) (cdr (car alist))) ret-ls)))))
 
 
-;; guile-1.3.4 has list->string
-(define (scmlist->string exp)
-  (list->string exp))
-
-;; obsolete, maybe handy for testing
-;; print a SCM expression.  Isn't this part of the std lib?
-(define (xxscmlist->string exp)
-  (cond
-   ((null? (car exp)) (begin (display ("urg:") (newline))))
-   ((pair? (cdr exp)) (string-append (scm->string (car exp)) " " (scmlist->string (cdr exp))))
-   ((eq? '() (cdr exp)) (string-append (scm->string (car exp)) ")"))
-   ;; howto check for quote?
-   (else (string-append (scm->string (car exp)) " . " (scm->string (cdr exp)) ")"))
-   ))
-
-(define (scm->string exp)
-  (cond
-   ((pair? exp) (string-append "(" (scmlist->string exp)))
-   ((number? exp) (number->string exp))
-   ((symbol? exp) (symbol->string exp))
-   ((string? exp) (string-append "\"" exp "\""))
-   ;; probably: #@quote
-   (else (begin (display "programming error: scm->string: ") (newline) "'"))
-   ))
 
 (define (index-cell cell dir)
   (if (equal? dir 1)
       (cdr cell)
-      (car cell))
-  )
-
+      (car cell)))
 
 ;
 ; How should a  bar line behave at a break? 
index 46767793e7cb04cf8e049b2581aafe7aff6307d4..809e99cace03d8b1583c9603956461cf83ef68e3 100644 (file)
@@ -1,7 +1,7 @@
 # bin/Makefile
 
 depth = ..
-SEXECUTABLES=convert-mudela mudela-book ly2dvi  abc2ly 
+SEXECUTABLES=convert-mudela mudela-book ly2dvi abc2ly as2text
 STEPMAKE_TEMPLATES=script help2man
 HELP2MAN_EXECS = $(SEXECUTABLES)
 
diff --git a/scripts/as2text.scm b/scripts/as2text.scm
new file mode 100644 (file)
index 0000000..6385c8d
--- /dev/null
@@ -0,0 +1,354 @@
+#!/usr/bin/guile \
+-e main -s
+!#
+;;;; as2text.scm -- Translate AsciiScript to Text
+;;;;
+;;;; source file of the GNU LilyPond music typesetter
+;;;; 
+;;;; (c) 2000 Jan Nieuwenhuizen <janneke@gnu.org>
+
+;;;; library funtions
+(use-modules
+   (ice-9 debug)
+  (ice-9 getopt-long)
+  (ice-9 string-fun)
+  (ice-9 regex))
+
+
+;;; Script stuff
+(define program-name "as2text")
+
+(define subst-version "@TOPLEVEL_VERSION@")
+
+(define program-version        
+  (if (eq? subst-version (string-append "@" "TOPLEVEL_VERSION" "@"))
+      "unknown"
+      subst-version))
+
+(define (show-version)
+  (display (string-append 
+           program-name " - LilyPond version " program-version "\n")
+          (current-error-port)))
+
+(define (show-help)
+  (display "Convert AsciiScript to text.
+
+Usage: as2text [OPTION]... AS-FILE
+
+Options:
+  -h,--help          this help
+  -o,--output=FILE   set output file
+  -v,--version       show version
+" (current-error-port)))
+
+(define (gulp-file name)
+  (let ((port (catch 'system-error (lambda () (open-file name "r"))
+                    (lambda args #f))))
+       (if port 
+          (let ((content (let loop ((text ""))
+                              (let ((line (read-line port)))
+                                   (if (or (eof-object? line)
+                                           (not line)) 
+                                       text
+                                       (loop (string-append text line "\n")))))))
+               (close port)
+               content)
+          (begin
+           (display 
+            (string-append "warning: no such file: " name "\n")
+            (current-error-port))
+           ""))))
+
+(define (with-exention name ext)
+  (if (equal? ext (substring name (max 0 (- (string-length name) 
+                                           (string-length ext)))))
+      name
+      (string-append name ext)))
+
+(define (do-file file-name output-name)
+  (let ((output-file (current-output-port))
+       (ascii-script (gulp-file (with-exention file-name ".as"))))
+       (eval-string ascii-script)))
+
+;;; Script entry point
+(define (main args)
+  (show-version)
+  (let ((options (getopt-long args
+                             `((output (single-char #\o)
+                                          (value #t))
+                               (help (single-char #\h))
+                               (version (single-char #\v))))))
+    (define (opt tag default)
+      (let ((pair (assq tag options)))
+        (if pair (cdr pair) default)))
+
+    (if (assq 'help options)
+       (begin (show-help) (exit 0)))
+           
+    (if (assq 'version options)
+       (exit 0))
+
+    (let ((output-name (opt 'output-name "-"))
+          (files (let ((foo (opt '() '())))
+                      (if (null? foo) 
+                          (list "-")
+                          foo))))
+        (do-file (car files) output-name))))
+
+;;;;
+;;;; Ascii Script plotting
+;;;;
+
+;;; Global variables
+
+;; Ascii-Art signature
+(define tag-line "lily")
+
+(define first-line #t)
+
+;; cursor
+(define cur-x 0)
+(define cur-y 0)
+
+;; canvas dimensions
+(define canvas-width 65)
+(define canvas-height 20)
+
+;; font database
+(define fonts '())
+
+;; current font
+(define cur-font "")
+
+;; 
+(define line-char "-")
+
+;; the plotting fields
+(define canvas 0)
+;; urg: 
+;; make-uniform array of characters,
+;; or 1-dim array of strings?
+;; (set! canvas (make-array " " canvas-height canvas-width)))
+
+;; urg, this kind of naming costs too much indenting
+(define (split c s r)
+  (separate-fields-discarding-char c s r))
+
+(define (strip s)
+  (sans-surrounding-whitespace s))
+
+
+;;; Helper functions
+
+(define (af-gulp-file name)
+  (set! %load-path 
+       (cons (string-append 
+              (getenv 'LILYPONDPREFIX) "/mf") %load-path))
+  (let ((path (%search-load-path name)))
+       (if path
+          (gulp-file path)
+          (gulp-file name))))
+
+(define (char-width c)
+  (let ((bbox (car c)))
+       (inexact->exact (* .001 (caddr bbox)))))
+
+;; urg: use smart table
+(define (xmerge-chars old new)
+  (cond ((equal? new " ") old)
+       ((and (equal? old "|") (equal? new "-")) "+")
+       ((and (equal? old "-") (equal? new "|")) "+")
+       (else new)))
+
+(define (merge-chars old new)
+  (cond ((equal? new " ") old)
+       (else new)))
+
+(define (plot x y c)
+  (let ((ny (- (* -1 y) 1)))
+       (if (array-in-bounds? canvas ny x)
+          (array-set! canvas (merge-chars (array-ref canvas ny x) c) ny x)
+          (display (string-append "ouch: " (number->string x)  ","
+                                  (number->string ny) "\n")))))
+
+(define (plot-char c)
+  (let ((bbox (car c))
+       (glyph (cadr c))) 
+       ;; BBox: (llx lly urx ury) * 1000
+       (let ((dx (inexact->exact (* .001 (car bbox))))
+            ;(dy (inexact->exact (* .001 (cadr bbox))))
+            (dy (inexact->exact (- (* .001 (cadddr bbox)) 1)))
+            (len (length glyph)))
+           ;;(display "Bbox: ") (display bbox) (newline)
+           ;;(display "dy: ") (display dy) (newline)
+           (do ((line glyph (cdr line))
+                (i 0 (+ i 1)))
+               ((= i len))
+               (plot-string (+ cur-x dx) (+ (- cur-y i) dy) (car line))))))
+
+(define (plot-string x y s)
+  (do ((i 0 (+ i 1)))
+      ((= i (string-length s)))
+      (plot (+ x i) y (substring s i (+ i 1)))))
+
+(define (show-char char)
+  (display char))
+
+(define (show-font name)
+       (let ((font (assoc name fonts)))
+            (map (lambda (x) (show-char x)) font)))
+
+(define (generate-default-font)
+  (let loop ((chars '()) (i 32))
+       (if (= 127 i) 
+          chars 
+          (loop 
+           (cons (list i '(0 0 1000 1000) 
+                       (list (make-string 1 (integer->char i)))) 
+                 chars) 
+           (+ i 1)))))
+
+(define (get-font name)
+  (let ((entry (assoc name fonts)))
+       (if entry
+          (cdr entry)
+          (begin
+           (display 
+            (string-append "warning: no such font: " name "\n")
+            (current-error-port))
+           (get-font "default")))))
+
+(define (get-char font n)
+  (let ((entry (assoc n font)))
+       (if entry
+          (cdr entry)
+          (begin
+           (display 
+            (string-append "warning: no such char: (" 
+                           cur-font
+                           ", "
+                           (number->string n ) ")\n")
+            (current-error-port))
+           '()))))
+
+
+;;; AsciiScript commands
+
+(define (char n)
+  (let* ((font (get-font cur-font))
+        (c (get-char font n)))
+       (if c
+           (plot-char c))))
+
+(define (end-output) 
+  (display (string-append 
+           (make-string (- canvas-width (string-length tag-line)) #\space)
+           tag-line "\n")))
+
+(define (sign x)
+  (if (= x 0)
+      1
+      (inexact->exact (/ x (abs x)))))
+
+(define (h-line len)
+  (let ((step (sign len)))
+       (do ((i 0 (+ i step)))
+          ((= i len))
+          (plot (+ cur-x i) cur-y line-char))))
+
+(define (v-line len)
+  (let ((step (sign len)))
+       (do ((i 0 (+ i step)))
+          ((= i len)) (plot cur-x (+ cur-y i) line-char))))
+
+(define (header x y)
+  (display (string-append x y "\n") (current-error-port)))
+
+(define (header-end) "")
+
+(define (rline-to dx dy)
+  (plot (inexact->exact cur-x) (inexact->exact cur-y) line-char)
+  (plot (inexact->exact (+ cur-x dx)) (inexact->exact (+ cur-y dy)) line-char)
+  (if (or (> (abs dx) 1) (> (abs dy) 1))
+      (let ((x cur-x)
+           (y cur-y)
+           (hx (/ dx 2))
+           (hy (/ dy 2))
+           )
+          (plot (inexact->exact (+ cur-x hx)) (inexact->exact (+ cur-y hy)) line-char)
+          (rline-to hx hy)
+          (move-to x y)
+          (rmove-to hx hy)
+          (rline-to hx hy)
+          )))
+
+(define (dissect-char text)
+  (let* ((char (split #\nl text list))
+        (id (car char))
+        (code (string->number 
+               (strip 
+                (substring id 
+                           (+ (string-index id #\C) 1)
+                           (string-index id #\;)))))
+        (bbox (map string->number 
+                   (split #\space (strip (substring
+                                          id 
+                                          (+ (string-rindex id #\B) 1)
+                                          (string-rindex id #\;)))
+                          list))))
+       (list (list code bbox (cdr char)))))
+
+(define (load-font name mag)
+  (let ((text (af-gulp-file (string-append name ".af"))))
+       (if (< 0 (string-length text))
+          (let* ((char-list (cdr (split #\np 
+                                        (regexp-substitute/global 
+                                         #f "\t[^\n]*\n" text 'pre "" 'post) 
+                                        list)))
+                 (font (apply append (map dissect-char char-list))))
+                (set! fonts (cons (cons name font) fonts))))))
+
+(define (move-to x y)
+  (set! cur-x x)
+  (set! cur-y y))
+
+(define (put c)
+  (plot cur-x cur-y c))
+
+(define (rmove-to dx dy)
+  (set! cur-x (+ cur-x dx))
+  (set! cur-y (+ cur-y dy)))
+
+(define (select-font name)
+  (set! cur-font name))
+
+(define (set-line-char c)
+  (set! line-char c))
+
+(define (start-line height)
+  (if first-line 
+      (begin
+       (set! first-line #f)
+       (set! fonts (cons (cons "default" (generate-default-font)) fonts))))
+  (if (defined? 'mudelapaperlinewidth)
+      (set! canvas-width 
+           (inexact->exact (string->number mudelapaperlinewidth))))
+  (set! canvas-height height)
+  (set! canvas (make-array " " canvas-height canvas-width)))
+
+(define (stop-line)
+  (display 
+   (apply string-append 
+         (map (lambda (x) (string-append (apply string-append x) "\n")) 
+              (array->list canvas)))))
+
+(define (text s)
+  (let ((n (string-length s))
+       (font (get-font cur-font)))
+       (do ((i 0 (+ i 1)))
+          ((= i n)) 
+           (let* ((n (char->integer (string-ref s i)))
+                  (c (get-char font n)))
+                 (plot-char c)
+                 (rmove-to (char-width c) 0)))))
+
index e8d5a36e699df6483dc08c57038f543459849dc1..e9a09c595915f956acc3bd0aa71d7963ba1cae73 100644 (file)
@@ -2,6 +2,12 @@
 
 
 # TODO: Rewrite this.  The control structure is too hairy.
+#
+
+# TODO:
+# Should use files in /tmp/ only.  This potentially messes with
+# usergenerated files in the CWD
+
 
 """
 =======================================================================
@@ -242,26 +248,31 @@ class TeXOutput:
         horizontalMarginArg =  ( (pagewidth - linewidth)/2 )   
         verticalMarginArg =  ( (pageheight - textheight)/2  )
 
-        top="""\
+        top= r"""
 %% Creator: %s
 %% Automatically generated from  %s, %s
 
-\\documentclass[%s]{article}
+\documentclass[%s]{article}
 
 %s 
-\\usepackage{geometry}
-\\usepackage[latin1]{inputenc} 
-%%\\usepackage[T1]{fontenc} 
+\usepackage{geometry}
+\usepackage[latin1]{inputenc} 
+%%\usepackage[T1]{fontenc} 
 %s 
-%%\\addtolength{\\oddsidemargin}{-1cm} 
-%%\\addtolength{\\topmargin}{-1cm} 
-%%\\setlength{\\textwidth}{%s} 
-%%\\setlength{\\textheight}{%s} 
-\\geometry{width=%spt, left=%spt, height=%spt, top=%spt, nohead} 
-\\input lilyponddefs 
-\\input titledefs 
-%s 
-\\begin{document}
+%%\addtolength{\oddsidemargin}{-1cm} 
+%%\addtolength{\topmargin}{-1cm} 
+%%\setlength{\textwidth}{%s} 
+%%\setlength{\textheight}{%s} 
+\geometry{width=%spt, left=%spt, height=%spt, top=%spt, nohead} 
+\input lilyponddefs 
+\input titledefs 
+%s
+\makeatletter
+\renewcommand{\@oddhead}{\hfil{\small\theheader\quad\textbf{\thepage}}}%%
+%% UGR.
+%%\renewcommand{\@evenhead}{eve!{\small\mudelainstrument{,}\quad\textbf{\thepage}}\hfil}%%
+\renewcommand{\@oddfoot}{{\thefooter}\hfil}%%
+\begin{document}
 """ % ( program_id(), Props.get('filename'), now, Props.get('papersize'),
         Props.get('language'), Props.get('pagenumber'), linewidth, textheight,
         linewidth, horizontalMarginArg, textheight, verticalMarginArg,
@@ -327,9 +338,12 @@ class TeXOutput:
         if Props.get('output') != '':
             outfile = os.path.join(Props.get('output'), outfile )
             
-        this.write("""\
-\\vfill\\hfill{\\mudelatagline}
-\\end{document}
+        this.write(r"""
+%% \vfill\hfill{\mudelatagline}
+\makeatletter
+\renewcommand{\@oddfoot}{\thefooter\hfill{\mudelatagline}}%
+\makeatother
+\end{document}
 """)
         this.__fd.close()
         if os.path.isfile(outfile):
@@ -1035,7 +1049,7 @@ def main():
            Props.setDependencies(1,'commandline')
         elif o == '--help' or o == '-h':
             help()
-           return 0
+           sys.exit (0)
         elif o == '--keeply2dvi' or o == '-k':
            Props.setKeeply2dvi(1,'commandline')
         elif o == '--language' or o == '-l':
diff --git a/scripts/musa.py b/scripts/musa.py
deleted file mode 100644 (file)
index 2b14ff4..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-#!/usr/bin/python
-#!@PYTHON@
-
-program_name = 'musa.py'
-version = '@TOPLEVEL_VERSION@'
-if version == '@' + 'TOPLEVEL_VERSION' + '@':
-       version = '(unknown version)'           # uGUHGUHGHGUGH
-
-import __main__
-import getopt
-import sys
-import re
-import string
-import os
-
-#names = ["One", "Two", "Three"]
-DIGITS='0123456789'
-
-def dump_score (outf):
-       outf.write (r"""\score{
-        \notes <
-""")
-
-def set_default_len_from_time_sig (s):
-       m =  re.search ('([0-9]+)/([0-9]+)', s)
-       if m:
-               n = string.atoi (m.group (1))
-               d = string.atoi (m.group (2))
-               if (n * 1.0 )/(d * 1.0) <  0.75:
-                       __main__.default_len =  16
-               else:
-                       __main__.default_len = 8
-
-def gulp_file (f):
-       try:
-               i = open (f)
-               i.seek (0, 2)
-               n = i.tell ()
-               i.seek (0,0)
-       except:
-               sys.stderr.write ("can't open file: %s\n" % f)
-               return ''
-       s = i.read (n)
-       if len (s) <= 0:
-               sys.stderr.write ("gulped emty file: %s\n" % f)
-       i.close ()
-       return s
-
-def identify():
-       sys.stderr.write ("%s from LilyPond %s\n" % (program_name, version))
-
-def help ():
-       print r"""
-Musa.
-
-Usage: musa [OPTION]...
-
-Options:
-  -h, --help          this help
-  -o, --output=FILE   set output filename to FILE
-  -v, --version       version information
-"""
-
-def print_version ():
-       print r"""musa (GNU lilypond) %s""" % version
-
-
-(options, files) = getopt.getopt (sys.argv[1:], 'vo:h', ['help','version', 'output='])
-out_filename = ''
-
-for opt in options:
-       o = opt[0]
-       a = opt[1]
-       if o== '--help' or o == '-h':
-               help ()
-               sys.exit (0)
-       if o == '--version' or o == '-v':
-               print_version ()
-               sys.exit(0)
-               
-       if o == '--output' or o == '-o':
-               out_filename = a
-       else:
-               print o
-               raise getopt.error
-
-identify ()
-
-#header['tagline'] = 'Lily was here %s -- automatically converted from ABC' % version
-
-#if not out_filename:
-       #out_filename = os.path.basename (os.path.splitext (f)[0]) + ".ly"
-#sys.stderr.write ('Ly output to: %s...' % out_filename)
-#outf = open (out_filename, 'w')
-#sys.stderr.write ('\n')
-
-outf = sys.stdout
-
-# display width
-width = 65
-
-# font database
-fonts = {}
-
-# cursor
-x = 0
-y = 0
-
-# current font
-font = ""
-
-def print_font (name):
-       global fonts
-       font = fonts[name]
-       for k in font.keys ():
-               c = font[k]
-               print ("Character: %s" % k)
-               for i in range (len (c)):
-                       print (c[i])
-
-def put_char (x, y, c):
-       global line, width
-       height = len (line[0])
-       y = -y
-       if x >= 0 and x < width - 2 and y >= 0 and y < height:
-               try:
-                       line[y] = line[y][:x] + c + line[y][x+1:]
-               except:
-                       print ("%d, %d: %c" % (x, y, c))
-       else:
-               print ("%d, %d: %c" % (x, y, c))
-
-def put_string (x, y, s):
-       global line, width
-       height = len (line[0])
-       y = -y
-       if x >= 0 and x < width and y >= 0 and y < height:
-               try:
-                       line[y] = line[y][:x] + s + line[y][x+len (s):]
-               except:
-                       print ("%d, %d: %s" % (x, y, s))
-       else:
-               print ("%d, %d: %s" % (x, y, s))
-
-def header (creator, generate):
-       print (creator, generate)
-
-def header_end ():
-       return
-
-def load_font (name, mag):
-       global fonts
-       font_str = gulp_file (name + ".af");
-       i = 0
-       font = {}
-       for c in string.split (font_str, '\f')[1:]:
-               id = 0
-               code = 0
-               char = []
-               for line in string.split (c, '\n')[:-1]:
-                       if not id:
-                               id = line
-                               #code = string.atoi (id[string.index (id, 
-                               #       'C')+2:string.index (id, ';')])
-                               code = id[string.index (id, 
-                                       'C')+2:string.index (id, ';')]
-                               code = string.strip (code)
-                               bbox = string.split (string.strip (id[string.rindex (id, 'B')+1: string.rindex (id, ';')]), ' ')
-                               char.append (bbox)
-                       else:
-                               char.append (line)
-               font[code] = char
-       fonts[name] = font
-       #print_font (name)
-
-def start_line (height):
-       global line
-       line = []
-       # urg
-       for i in range (height+2):
-               line.append (" " * width)
-
-def move_to (new_x, new_y):
-       global x, y
-       x = new_x
-       y = new_y
-
-def move_relative (dx, dy):
-       global x, y
-       x = x + dx
-       y = y + dy
-
-def hline (length):
-       global x, y
-       for i in range (length):
-               put_char (x+i, y, '-')
-       return
-
-def select_font (name):
-       global font
-       font = name
-
-def char (i):
-       global x, y, width, fonts, font
-       height = len (line[0])
-       #y = -y
-       #if x >= 0 and x < width and y >= 0 and y < height:
-       c = fonts[font][`i`]
-       bbox = c[0]
-       #print ("Bbox: %s " % `bbox`)
-       c = c[1:]
-       for i in range (len (c)):
-               put_string (x-string.atoi (bbox[1]), y-i+ string.atoi (bbox[3]), c[i])
-
-def text (s):
-       global x, y
-       put_string (x, y, s)
-
-def vline (length):
-       global x, y
-       for i in range (length):
-               put_char (x, y+i, '|')
-
-def stop_line ():
-       global line
-       for i in range (len (line)):
-               print (line[i])
-       print ("=== ===")
-
-def end_output ():
-       return
-
diff --git a/stepmake/stepmake/asciifont-rules.make b/stepmake/stepmake/asciifont-rules.make
new file mode 100644 (file)
index 0000000..4143f14
--- /dev/null
@@ -0,0 +1,3 @@
+$(outdir)/%.afm: %.af
+       grep '[[:cntrl:]]' $< | sed 's/^[[:cntrl:]] *//' > $@
+#      grep '[[:cntrl:]]' $< | sed 's/^. *//' > $@
diff --git a/stepmake/stepmake/asciifont-targets.make b/stepmake/stepmake/asciifont-targets.make
new file mode 100644 (file)
index 0000000..1bb8bf6
--- /dev/null
@@ -0,0 +1 @@
+# empty
diff --git a/stepmake/stepmake/asciifont-vars.make b/stepmake/stepmake/asciifont-vars.make
new file mode 100644 (file)
index 0000000..f414fcf
--- /dev/null
@@ -0,0 +1,2 @@
+AF_FILES := $(wildcard *.af)
+EXTRA_DIST_FILES += $(AF_FILES)
index a3aeb73bf6b1c7ff5fec98199ce86d459167413d..a582c885bc9ffd00ebbf55cd88f305caa3595606 100644 (file)
@@ -23,6 +23,6 @@ $(outdir)/%.$(XPM_RESOLUTION)gf: %.mf
 $(outdir)/%.$(XPM_RESOLUTION)pk: $(outdir)/%.$(XPM_RESOLUTION)gf
        gftopk $< $@
 
-%.afm:
-       $(SHELL) $(depth)/buildscripts/tfmtoafm.sh $(shell basename $@ .afm)
-       mv $@ $@.in
+#%.afm:
+#      $(SHELL) $(depth)/buildscripts/tfmtoafm.sh $(shell basename $@ .afm)
+#      mv $@ $@.in
index 547355d6da8e8c85dc3b862f7a3cbe62020c1547..70069f75c49f2594f7b0b9e58ac94b849cbc025e 100644 (file)
@@ -16,6 +16,9 @@
 \def\thepiece{}
 \def\themeter{}
 \def\thepoet{}
+\def\theheader{}
+\def\thefooter{}
+\def\theorchestralinstrument{}
 %
 % duh.  LaTeX has a \title too.
 \renewcommand*{\title}[1]{\def\thetitle{#1}}
@@ -30,6 +33,8 @@
 %
 \newcommand*{\mudelatitle}[1]{\def\thetitle{#1}}
 \newcommand*{\mudelasubtitle}[1]{\def\thesubtitle{#1}}
+\newcommand*{\mudelafooter}[1]{\def\thefooter{#1}}
+\newcommand*{\mudelahead}[1]{\def\theheader{#1}}
 \newcommand*{\mudelacomposer}[1]{\def\thecomposer{#1}}
 \newcommand*{\mudelaarranger}[1]{\def\thearranger{#1}}
 \newcommand*{\mudelainstrument}[1]{\def\theinstrument{#1}}