]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.144.jcn2
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 29 Mar 2001 12:14:23 +0000 (14:14 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 29 Mar 2001 12:14:23 +0000 (14:14 +0200)
1.3.144.jcn2
============

* Fixed ascii art output.  Started some doco on different output formats.

* Fixed scheme font lookup to handle new font lists with wildcards.

* Bugfix: all-font-metrics.cc: don't assume that from each afm there's a tfm;
only try to find/make tfm when producing tex output.

26 files changed:
CHANGES
Documentation/user/refman.itely
VERSION
input/ascii-art/as-email.ly [new file with mode: 0644]
input/ascii-art/asciiscript5.ly [new file with mode: 0644]
input/ascii-art/asciiscript9.ly [new file with mode: 0644]
input/ascii-art/asciscript5.ly
input/ascii-art/r-as.ly
input/ascii-art/standchen-as5.ly
input/ascii-art/standchen-as9.ly
input/ascii-art/twinkle-as5.ly
input/test/bagpipe.ly
lily/all-font-metrics.cc
lily/system-start-delimiter.cc
ly/declarations-as.ly
ly/init-as.ly
ly/paper-as5.ly
ly/paper-as9.ly
ly/params-as.ly
make/lilypond.spec.in
mf/as-number1.af
mf/as-number4.af
scm/ascii-script.scm
scm/font.scm
scm/lily.scm
scripts/as2text.scm

diff --git a/CHANGES b/CHANGES
index a260ae354d48b91c57390e4c730e7097711d1ce9..219088d16d4feef224055784a86e12a3caf01829 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,13 @@
+1.3.144.jcn2
+============
+
+* Fixed ascii art output.  Started some doco on different output formats.
+
+* Fixed scheme font lookup to handle new font lists with wildcards.
+
+* Bugfix: all-font-metrics.cc: don't assume that from each afm there's a tfm;
+only try to find/make tfm when producing tex output.
+
 1.3.144.jcn1
 ============
 
index 8c7d4211d78dc16b0cb397d2b76285fffd45f201..68c9169da7d1717166b565951d1d2a2094cc2895 100644 (file)
@@ -2594,7 +2594,7 @@ grob property.
 * Tuning per grob ::            
 * What to tune?::               
 * Font selection::              
-* Text markup::                 
+* Text markup::
 * Embedded @TeX{}::             
 @end menu
 
@@ -2616,6 +2616,8 @@ the Stem object. One of the effects is that property specifying how it
 should be printed is erased, with the effect of rendering it invisible.
 The above assignment is available as a standard identifier, lest you
 find this useful:
+
+@c FIXME: doesn't work well for eg StaffSymbol
 @example
   \property Voice.Stem = \turnOff
 @end example
@@ -2948,7 +2950,8 @@ horizontal mode: set all text on one line (default)
 It is possible to use @TeX{} commands in the strings, but this should be
 avoided because this makes it impossible for LilyPond to compute the
 exact length of the string, which may lead to collisions.  Also, @TeX{}
-commands won't work with direct postscript output.
+commands won't work with direct PostScript output (see @ref{PostScript
+output}).
 
 @cindex metronome mark
 
@@ -2977,6 +2980,63 @@ marking:
 }
 @end lilypond
 
+@node Invisible grobs
+@subsection Invisible grobs
+@cindex invisible grobs
+
+A grob can be made invisible in a number of ways:
+
+@ignore
+FIXME
+
+Move \turnOff feature here and explain why it doesn't work for eg
+StaffSymbol
+
+Show molecule-callback override
+   StaffSymbol \override #'molecule-callback = #(lambda (x) '())
+
+Show visibility-lambda and explain why it doesn't work for eg
+StaffSymbol
+
+@end ignore
+
+
+Some grobs require a special treatment.
+
+Make staff invisible:
+@lilypond[singleline,verbatim}
+\score {
+  \notes { c4 c4 c8 c8 }
+  \paper {
+    \translator {
+      \StaffContext
+      \remove Staff_symbol_engraver;
+      \consists Pitch_squash_engraver;
+      \remove Clef_engraver;
+    }
+  }
+}
+@end lilypond
+
+Make bar lines invisible:
+@lilypond[singleline,verbatim}
+\score {
+  \notes \relative c'' {
+    a b c d
+    d c b a
+  }
+  \paper {
+    \translator {
+      \StaffContext
+      whichBar = #""
+      \remove "Time_signature_engraver";
+    }
+  }
+}
+
+
+@end lilypond
+
 @node Embedded @TeX{}
 @subsection Embeded @TeX{}
 @cindex embedded tex
@@ -2985,7 +3045,8 @@ marking:
 You can use @TeX{} commands in text scripts, but this should be avoided
 because this makes it impossible for LilyPond to compute the exact
 length of the string, which may lead to collisions.  Also, @TeX{}
-commands won't work with direct PostScript output.
+commands won't work with direct PostScript output (see @ref{PostScript
+output}).
 
 @lilypond[fragment,relative,verbatim]
   a''^"3 $\\times$ \\`a deux"
@@ -3231,7 +3292,143 @@ direct control of LilyPond.  However, you can insert a commands into the
 details, see the example file @file{input/test/between-systems.ly}
 
 
+@c . {Output formats}
+@node Output formats
+@section Output formats
+
+LilyPond can output processed music in different output formats.  
+
+@node @TeX{} output
+@section @TeX{} output
+@cindex @TeX{} output
+
+LilyPond will use @TeX{} by default.  Even if you want to produce
+PostScript output for viewing or printing, you should normally have
+LilyPond produce @TeX{} first.  The .tex output must be processed by
+@TeX{} (@strong{not} La@TeX{}) to generate a .dvi.  Then, @file{Dvips}
+is used to generate PostScript.  Alternatively, @file{ly2dvi} can be
+used to generate the .dvi for you.
+
+
+@node PostScript output
+@section PostScript output
+@cindex PostScript output
+@cindex direct PostScript output
+
+LilyPond can produce PostScript directly, without going through @TeX{}.
+Direct PostScript output has some problems, though.
+
+@example
+$ lilypond -fps foo.ly
+GNU LilyPond 1.3.144
+Now processing: `foo.ly'
+Parsing...
+Interpreting music...[3]
+Preprocessing elements... 
+Calculating column positions... 
+paper output to foo.ps...
+$ cat /usr/share/lilypond/pfa/feta20.pfa foo.ps | lpr
+@end example
+
+
+@refbugs
+
+Text font selection is broken.
+
+The .ps file does not contain the .pfa font files.  To print a .ps
+created through direct postscript output, you should prepend the
+necessary .pfa files to LilyPond's .ps output, or upload them to the
+printer before printing.
+
+Titling is not generated.  FIXME: adding titling should not be too
+difficult.
+
+
+@node Scheme output
+@section Scheme output
+@cindex Scheme output
+
+[TODO]
+
+@example
+$ lilypond -fscm foo.ly
+GNU LilyPond 1.3.144
+Now processing: `foo.ly'
+Parsing...
+Interpreting music...[3]
+Preprocessing elements... 
+Calculating column positions... 
+paper output to foo.scm...
+
+$ head -4 foo.scm 
+;;; Usage: guile -s x.scm > x.tex
+ (primitive-load-path 'standalone.scm)
+; (scm-tex-output)
+ (scm-ps-output)
+
+$ guile -s foo.scm > foo.tex
+@end example
+
+
+@node AsciiScript output
+@section AsciiScript output
+@cindex AsciiScript output
+@cindex ascii script
+@cindex ascii art
+
+LilyPond can output Ascii Art.  This is a two step process, LilyPond
+produces an ascii description file, dubbed AsciiScript (extension
+@file{.as}).  AsciiScript has a small and simple command set that
+includes font selection, character and string printing and line drawing
+commands.  The program @file{as2text} is used to translate an .as file
+to text.
+
+To produce ascii art, you must include an ascii art paper definition
+file in your .ly, one of:
+@example
+\include "paper-as5.ly"
+\include "paper-as9.ly"
+@end example
+
+Here's an example use for Ascii Art output (the example file
+@file{as-email.ly} is included in the LilyPond distribution), the staff
+symbol has been made invisible:
+
+@example
+To: bug-gnu-music@@gnu.org
+Subject: LilyPond-1.3.144 beaming broken in 5/8 time
+Gcc: nnml:sent
+--------
+Hi List,
+
+Subject says it all.
+
+$ lilypond -fas as-email.ly
+GNU LilyPond 1.3.144
+Now processing: `as-email.ly'
+Parsing...
+Interpreting music...[3]
+Preprocessing elements... 
+Calculating column positions... [2]
+paper output to as-email.as...
+
+$ as2text as-email.as 2>/dev/null
+          |\
+          |/     |##|##|      |  |  |  |  |
+         /|      |  |  | |    |\ |\ |\ |\ |\ |
+        / |_  3  |  |  | | 5  | )| )| )| )| )|
+       | /| \ 8 *  *  *  | 8 *  *  *  *  *   |
+        \_|_/            |                   |
+        *_|
+
+                                               lily
+@end example
+
+
+@refbugs
 
+The ascii art fonts are far from complete and not very well designed.
+Lots of resizable symbols such as slurs, ties, tuplets are missing.
 
 
 @c . {Sound}
diff --git a/VERSION b/VERSION
index 7b963f17e6effb4c81b3c44649992dc6fdf35d19..fe1e5261742c0547a5a818f1f4a1efcdc1e4d2b0 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=144
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/input/ascii-art/as-email.ly b/input/ascii-art/as-email.ly
new file mode 100644 (file)
index 0000000..3c22b30
--- /dev/null
@@ -0,0 +1,22 @@
+
+% ascii art
+
+\include "paper-as5.ly"
+
+\score {
+  \notes\relative c'' {
+    \time 3/8;
+    a8 a a 
+    \time 5/8;
+    a a a a a
+    %a16 a  a a a a a a a a 
+  }
+  \paper {
+    linewidth = -1.;
+    \translator {
+      \StaffContext
+      StaffSymbol \override #'molecule-callback = #(lambda (x) '())
+    }
+  }
+}
+
diff --git a/input/ascii-art/asciiscript5.ly b/input/ascii-art/asciiscript5.ly
new file mode 100644 (file)
index 0000000..617bcdd
--- /dev/null
@@ -0,0 +1,24 @@
+% ascii art output
+%
+% Process as:
+%
+%     lilypond -fas foo.ly
+%     as2text foo.as
+
+\include "paper-as5.ly"
+
+\score {
+  \notes\relative c'' {
+    \time 4/4;
+    g1 a b c 
+    g2 a b c
+    g4 a b c
+  }
+  \paper {
+    \translator {
+      \StaffContext
+      BarLine \override #'bar-size = #5
+    }
+  }
+}
+
diff --git a/input/ascii-art/asciiscript9.ly b/input/ascii-art/asciiscript9.ly
new file mode 100644 (file)
index 0000000..5bab55b
--- /dev/null
@@ -0,0 +1,18 @@
+% ascii art output
+%
+% Process as:
+%
+%     lilypond -fas foo.ly
+%     as2text foo.as
+
+\include "paper-as9.ly"
+
+\score {
+  \notes\relative c'' {
+    \time 4/4;
+    g1 a b c 
+    g2 a b c
+    g4 a b c
+  }
+}
+
index 726b0cacdeb334171ea6af2e7d9e13d01f907e2a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,19 +0,0 @@
-
-% ascii art
-
-\include "paper-as5.ly"
-
-\score {
-       \notes\relative c''{
-               \time 4/4;
-               g1 a b c 
-               g2 a b c
-               g4 a b c
-       }
-       \paper {
-               \paperAs_five
-               \translator { \StaffContext barSize = #5 }
-       }
-
-}
-
index 09ab543a35966dcebc349515d021c150b736af43..dcb15e326fcddcfde3f0536e92528b54f418440d 100644 (file)
@@ -1,19 +1,27 @@
+% ascii art output
+%
+% Process as:
+%
+%     lilypond -fas foo.ly
+%     as2text foo.as
+
+\include "paper-as5.ly"
 
 \score{
-       <
-                 \context Staff \notes\relative c'{ 
-                         c d e f
-                         \repeat "volta" 2 { g a b c }
-                         \alternative { { c b a g } { f e d c } }
-                 }
-                 \context Lyrics \lyrics {
-                         De eer- ste < { maat } { moet } >
-                         \repeat fold 2 { }
-                         \alternative {
-                                 { en dan twee keer } 
-                                 { een koe- plet _ } 
-                         }
-                         en dan nog dit er ach- ter aan
-                 }
-       >
+  <
+      \context Staff \notes\relative c'{ 
+        c d e f
+        \repeat "volta" 2 { g a b c }
+        \alternative { { c b a g } { f e d c } }
+      }
+      \context Lyrics \lyrics {
+        De eer- ste < { maat } { moet } >
+        \repeat fold 2 { }
+        \alternative {
+          { en dan twee keer } 
+          { een koe- plet _ } 
+        }
+        en dan nog dit er ach- ter aan
+      }
+  >
 }
index 876c449dc53be8888998320be643e507c96fe516..053b96280bf61fdb7450918aa4b475e918d6a6d8 100644 (file)
@@ -1,40 +1,41 @@
-
-% asci art output
-
+% ascii art output
+%
+% Process as:
+%
+%     lilypond -fas foo.ly
+%     as2text foo.as
 
 
 \include "paper-as5.ly"
 
 \score {
-       \context StaffGroup <
-               \context Staff=upper \notes\relative c{
-                       \key f \major;
-                       \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 \major;
-                       \time 3/4;
-                       \clef "bass";
-                       <c,2 c'> r4 
-                       <as2 as'> r4
-               }
-       >
-       \paper {
-%              \paperAs_nine
-               indent=4.0\char;
-               linewidth=78.0\char;
-               \translator { \StaffContext barSize = #4.5 }
-               %\translator { \VoiceContext beamHeight = #0 }
-               \translator { 
-                       \VoiceContext 
-                       beamHeight = ##f 
-                       autoBeamSettings \override (begin * * * *) = #(make-moment 0 1)
-                       textNonEmpty = ##f
-               }
-       }
-
+  \context StaffGroup <
+    \context Staff=upper \notes\relative c{
+      \key f \major;
+      \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 \major;
+      \time 3/4;
+      \clef "bass";
+      <c,2 c'> r4 
+      <as2 as'> r4
+    }
+  >
+  \paper {
+    indent=4.0\char;
+    linewidth=78.0\char;
+    \translator { \StaffContext Bar \override #'bar-size = #5 }
+    \translator { 
+      \VoiceContext 
+      % horizontal beams
+      Beam \override #'height = #0
+      autoBeamSettings \override #'(begin * * * *) = #(make-moment 0 1)
+      textNonEmpty = ##f
+    }
+  }
 }
 
index 00a7b257bb56e233046176aec77e88933523a596..153899c449db080926f0dc2593081df5b2a95bf8 100644 (file)
@@ -1,38 +1,41 @@
+% ascii art output
+%
+% Process as:
+%
+%     lilypond -fas foo.ly
+%     as2text foo.as
 
-% asci-art output, TODO: include how-to-use-this 
+% FIXME: broken system-start-delimiter.cc:staff_brace lookup
 
 \include "paper-as9.ly"
 
 \score {
-       \context GrandStaff <
-               \context Staff=upper \notes\relative c{
-                       \key f \major;
-                       \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 \major;
-                       \time 3/4;
-                       \clef "bass";
-                       <c,2 c'> r4 
-                       <as2 as'> r4
-               }
-       >
-       \paper {
-%              \paperAs_nine
-               indent=4.0\char;
-               linewidth=78.0\char;
-               %\translator { \StaffContext barSize = #9 }
-               %\translator { \VoiceContext beamHeight = #0 }
-               \translator { 
-                       \VoiceContext 
-                       beamHeight = ##f 
-                       autoBeamSettings \override #(begin * * * *) = #(make-moment 0 1)
-                       textNonEmpty = ##f
-               }
-       }
-
+  \context GrandStaff <
+    \context Staff=upper \notes\relative c{
+      \key f \major;
+      \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 \major;
+      \time 3/4;
+      \clef "bass";
+      <c,2 c'> r4 
+      <as2 as'> r4
+    }
+  >
+  \paper {
+    indent=4.0\char;
+    linewidth=78.0\char;
+    \translator { 
+      \VoiceContext 
+      % horizontal beams
+      Beam \override #'height = #0
+      autoBeamSettings \override #'(begin * * * *) = #(make-moment 0 1)
+      textNonEmpty = ##f
+    }
+  }
 }
 
index f99d5a502e3243e4af4cdcbd2bcd595e77b13c67..5e42a80a079a10faa626ad8c8b570715a755daae 100644 (file)
@@ -1,5 +1,11 @@
 % ascii art output
+%
+% Process as:
+%
+%     lilypond -fas foo.ly
+%     as2text foo.as
+
+
 \header{
 filename =     "twinkle.ly";
 title =                "Twinkle Twinkle Little Star";
index df732da9bf6aeda1ad98f8fb1287a4954c92fc24..6bea16c5cef211fcbf9c1bde69d34f995b338a20 100644 (file)
@@ -14,7 +14,7 @@
 
        NoteHead \override #'font-relative-size = #-2
        NoteHead \override #'font-relative-size = #-2   
-        Stem \override #'flag-style = ##f
+        Stem \override #'flag-style = #""
     % The following determines the length of stems without beams
     % default is between 2.8 and 4.0 depending on the number of flags
          Stem \override #'length = #6  
@@ -24,8 +24,9 @@
  
   }
   \translator { \StaffContext
-       TimeSignature \override #'style = #"C4/4"
-       TimeSignature \override #'visibility-function = #begin-of-line-visible
+       TimeSignature \override #'style = #'C4/4
+%      TimeSignature \override #'visibility-function = #begin-of-line-visible
+       TimeSignature \override #'visibility-lambda = #begin-of-line-visible
   }    
 }
 
index a19fb2aa8bdea19958ab41501814198ac4a05042..ce1c5edb3aef2889017a376de08ce0b5c406dd07 100644 (file)
@@ -77,20 +77,27 @@ All_font_metrics::find_afm (String name)
 
       Adobe_font_metric *afm
        = dynamic_cast<Adobe_font_metric*> (unsmob_metrics (val));
-      Tex_font_metric * tfm = find_tfm (name);
 
-      if (tfm->info_.checksum != afm->checksum_)
+      if (output_format_global == "tex")
        {
-         String s = _f ("checksum mismatch for font file: `%s'",
-                        path.ch_C ());
-         s += " " + _f ("does not match: `%s'", tfm->path_.ch_C ()); // FIXME
-         s += "\n";
-         s += " TFM: " + to_str ((int) tfm->info_.checksum);
-         s += " AFM: " + to_str ((int) afm->checksum_);
-         s += "\n";
-         s += _ (" Rebuild all .afm files, and remove all .pk and .tfm files.  Rerun with -V to show font paths.");
-
-         error (s);
+         Tex_font_metric * tfm = find_tfm (name);
+         
+         /* FIXME: better warning message
+            (maybe check upon startup for feta16.afm, feta16.tfm?)
+         */
+         if (tfm && tfm->info_.checksum != afm->checksum_)
+           {
+             String s = _f ("checksum mismatch for font file: `%s'",
+                            path.ch_C ());
+             s += " " + _f ("does not match: `%s'", tfm->path_.ch_C ()); // FIXME
+             s += "\n";
+             s += " TFM: " + to_str ((int) tfm->info_.checksum);
+             s += " AFM: " + to_str ((int) afm->checksum_);
+             s += "\n";
+             s += _ (" Rebuild all .afm files, and remove all .pk and .tfm files.  Rerun with -V to show font paths.");
+             
+             error (s);
+           }
        }
     }
   
index 5d4cb3d67a9aeac9c9803d150fecaf928e975db3..811a4171e35f7635e8a20743e55f4deef5aadb21 100644 (file)
@@ -141,8 +141,17 @@ System_start_delimiter::brew_molecule (SCM smob)
 Molecule
 System_start_delimiter::staff_brace (Grob*me,Real y)  
 {
+
+  /*
+    FIXME: should look at afm/tfm file for dimensions.
+    
+    (This breaks ascii-art output: it hasn't got 255 symbols)
+   */
+
+  // ugrhn
   int lo = 0;
   int hi = 255;
+  
   Font_metric *fm = Font_interface::get_default_font (me);
   Box b;
 
index 8c20b69d2a451159b728d1247d4f2a9b26e5b158..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,44 +0,0 @@
-breve = \duration #(make-duration -1 0)
-longa = \duration #(make-duration -2 0 )
-maxima = \duration #(make-duration -3 0)
-
-\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; 
-\include "scale-definitions.ly"
-
-melisma = \property Staff.melismaBusy = ##t
-melismaEnd = \property Staff.melismaBusy = ##f
-papersize = "a4"
-
-\include "engraver.ly"
-\include "generic-paper.ly"
-\include "paper-as9.ly"
-
-% ugh
-\include "midi.ly"
-
-\include "dynamic-scripts.ly"
-\include "spanners.ly"
-
-\include "property.ly"
-
-
-unusedEntry = \notes { c4 }            % reset default duration
-
-% music = "\melodic\relative c"
-
index f8fd77706cb683cfd9713db4723abdd28ec291be..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,38 +0,0 @@
-% Toplevel AsciiScript initialisation file. 
-
-\version "1.3.120";
-
-\include "declarations-as.ly"
-
-% burp.  need to override lily.scm
-#(define cmr-alist
-  '(("bold" . "as-dummy") 
-    ("brace" . "as-braces")
-    ("dynamic" . "as-dummy") 
-    ("default" . "as-dummy") 
-    ("feta" . "feta") 
-    ("feta-1" . "feta") 
-    ("feta-2" . "feta") 
-    ("finger" . "as-number") 
-    ("typewriter" . "as-dummy") 
-    ("italic" . "as-dummy") 
-    ("roman" . "as-dummy") 
-    ("script" . "as-dummy") 
-    ("large" . "as-dummy") 
-    ("Large" . "as-dummy") 
-    ("mark" . "as-number") 
-    ("number" . "as-number") 
-    ("timesig" . "as-number")
-    ("volta" . "as-number"))
-)
-
-\paper {
-    \paperAsNine
-    \translator { \StaffContext barSize = \staffheight; }
-
-    % no beam-slope
-    %\translator { \VoiceContext beamHeight = #0; }
-}  
-
-\maininput
-
index 3ce1bf58afa5bfb01bd2230d60712346f6862007..78959978dbd6912621c5a64649bd0bc34068dcbd 100644 (file)
@@ -4,20 +4,13 @@
 
 paperAsFive = \paper {
        staffheight = 5.\char;
-       %% aiai only have these:
-%{     
-       mf/as5.af
-       mf/as9.af
-       mf/as-braces5.af
-       mf/as-braces9.af
-       mf/as-dummy1.af
-       mf/as-dummy.af
-       mf/as-number1.af
-       mf/as-number4.af
-%}
+
+       \stylesheet #(as-make-style-sheet 'as5)
        
-       \stylesheet #(make-style-sheet 'paper16)
+       \translator { \StaffContext barSize = \staffheight; }
 
+       % no beam-slope
+       %\translator { \VoiceContext beamHeight = #0; }
        \include "params-as.ly";
 }
 
index 828bb961d3d9e9fe166419974e69cf1cc8b29369..49e80c4b28084c950258dcf8933f69bdd658a299 100644 (file)
@@ -4,21 +4,13 @@
 
 paperAsNine = \paper {
        staffheight = 9.\char;
-       %% aiai only have these:
-%{     
-       mf/as5.af
-       mf/as9.af
-       mf/as-braces5.af
-       mf/as-braces9.af
-       mf/as-dummy1.af
-       mf/as-dummy.af
-       mf/as-number1.af
-       mf/as-number4.af
-%}
-       \stylesheet #(make-style-sheet 'paper16)
-       
+
+       %\translator { \StaffContext barSize = \staffheight; }
+
+       \stylesheet #(as-make-style-sheet 'as9)
 
        \include "params-as.ly";
+       
 }
 
 \paper { \paperAsNine }
index 78deb13655e85df4f7fa1becb6994d9d7588d958..2d2a6fb83c847f9fbf96ef7fff4db569718ff8f5 100644 (file)
@@ -1,29 +1,15 @@
 % params-as.ly
 % generic paper parameters
 
-%%paperfile = \papersize + ".ly";
-%%% paperfile = "a4.ly";
-%%\include \paperfile;
-%hsize = 60.0\char;
-%vsize = 60.0\char;  %?
+outputscale = \staffheight / 4.0;
 
-%%\include "paper.ly";
-linewidth = 60.0\char;
-textheight = 60.0\char;
+linewidth = 60.0 \char;
+textheight = 60.0 \char;
 indent = 8.0\char;
 
 staffspace = (\staffheight - 1.0 ) / 4.0;
 stafflinethickness = \staffspace / 2.0;
 
-% paperfile = "a4.ly";
-%\include \paperfile;
-%\include "paper.ly";
-
-%staffspace = \staffheight / 4.0;
-%stafflinethickness = \staffspace / 10.0;
-
-outputscale = \staffheight / 4.0;
-
 \translator { \NoteNamesContext }
 \translator { \ScoreContext }
 \translator { \ChoirStaffContext }
index 7e653fef0392b5cd67abea1e1c91d4571f5eddee..b2822c61e6b148038a5d6c41caaf421030ecf0f9 100644 (file)
@@ -50,7 +50,7 @@ make all
 # even if documentation fails to build
 
 make -C Documentation  || true
-make htmldoc || true
+make web || true
 
 %install
 
@@ -80,10 +80,8 @@ cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT%{_prefix}/../etc/profile.d/li
 #%install documentation
 #line 63: second %install
 # again, make sure that main package installs even if doco fails
-mkdir -p htmldocs/out
-tar -C htmldocs -xzf out/htmldoc.tar.gz || true
-mkdir -p out/examples/
-tar -cf - input/  | tar -C out/examples/ -xf- || true
+mkdir -p web/out
+tar -C web -xzf out/web.tar.gz || true
 
 %ifos cygwin
 # urg, this symlink doesn't come through on cygwin
@@ -154,6 +152,4 @@ fi
 # this gets too messy...
 # %doc input/*.ly
 # verbatim include of input: list the directory without issuing a %dir 
-%doc htmldocs/
-%doc out/examples/
-%doc mutopia/
+%doc web/
index dbcf6cc2a6cf191bf2fdfbc69a8e8b95d55d1741..78fb1dce5c8d4c1cc7bfbeecb785f0a7efa4dc34 100644 (file)
 4
 \f C 53; WX 1; N Numeral-5; B 0 0 1000 1000;
 5
-\f C 53; WX 1; N Numeral-6; B 0 0 1000 1000;
+\f C 54; WX 1; N Numeral-6; B 0 0 1000 1000;
 6
-\f C 53; WX 1; N Numeral-7; B 0 0 1000 1000;
+\f C 55; WX 1; N Numeral-7; B 0 0 1000 1000;
 7
-\f C 53; WX 1; N Numeral-8; B 0 0 1000 1000;
+\f C 56; WX 1; N Numeral-8; B 0 0 1000 1000;
 8
-\f C 53; WX 1; N Numeral-9; B 0 0 1000 1000;
+\f C 57; WX 1; N Numeral-9; B 0 0 1000 1000;
 9
        EndCharMetrics
        EndFontMetrics %d
index 8e58b1b5b19979fce4f710158a484e30aca45f3d..82d9ea9feb7dcfd1cf219334fa6cc0eb30a431f3 100644 (file)
@@ -58,22 +58,22 @@ ___|_
 (___
     \
 .___/
-\f C 53; WX 1; N Numeral-6; B 0 1000 5000 5000;
+\f C 54; WX 1; N Numeral-6; B 0 1000 5000 5000;
   ___
  /__
 /   \
 \___/
-\f C 53; WX 1; N Numeral-7; B 0 1000 5000 5000;
+\f C 55; WX 1; N Numeral-7; B 0 1000 5000 5000;
 ____
    /
  -/-
  /
-\f C 53; WX 1; N Numeral-8; B 0 1000 5000 5000;
+\f C 56; WX 1; N Numeral-8; B 0 1000 5000 5000;
   __
  (__)
 /    \
 \____/
-\f C 53; WX 1; N Numeral-9; B 0 1000 5000 5000;
+\f C 57; WX 1; N Numeral-9; B 0 1000 5000 5000;
  ___
 /   \
 \___/
index c2f45d67d57a2d5853896d9df475da75ca138a09..ddbeacd7c1001a7142467759a7d227cc29e78628 100644 (file)
@@ -1,6 +1,77 @@
 (debug-enable 'backtrace)
 
-;;;; AsciiScript as
+; (define cmr-alist
+;   '(("bold" . "as-dummy") 
+;     ("brace" . "as-braces")
+;     ("dynamic" . "as-dummy") 
+;     ("default" . "as-dummy") 
+;     ("feta" . "feta") 
+;     ("feta-1" . "feta") 
+;     ("feta-2" . "feta") 
+;     ("finger" . "as-number") 
+;     ("typewriter" . "as-dummy") 
+;     ("italic" . "as-dummy") 
+;     ("roman" . "as-dummy") 
+;     ("script" . "as-dummy") 
+;     ("large" . "as-dummy") 
+;     ("Large" . "as-dummy") 
+;     ("mark" . "as-number") 
+;     ("number" . "as-number") 
+;     ("timesig" . "as-number")
+;     ("volta" . "as-number"))
+; )
+
+
+(define as-font-alist-alist
+  '(
+    (as5 .
+        (
+         (feta16 . as5)
+         (feta20 . as5)
+         (feta-nummer6 . as-number1)
+         (feta-nummer8 . as-number1)
+         (feta-braces16 . as-braces9)
+         (cmr7 . as-dummy)
+         (cmr8 . as-dummy)
+         (cmr10 . as-dummy)
+         ))
+    (as9 .
+        (
+         (feta16 . as9)
+         (feta20 . as9)
+         (feta-nummer4 . as-number1)
+         (feta-nummer8 . as-number4)
+         (feta-braces16 . as-braces9)
+         (cmr7 . as-dummy)
+         (cmr8 . as-dummy)
+         (cmr10 . as-dummy)
+         (cmr12 . as-dummy)
+        ))
+  ))
+
+(define (as-properties-to-font-name size fonts properties-alist-list)
+  (let* ((feta-name (properties-to-font-name fonts properties-alist-list))
+        (as-font-alist (cdr (assoc size as-font-alist-alist)))
+        (font (assoc (string->symbol feta-name) as-font-alist)))
+    (if font (symbol->string (cdr font))
+       (let ((e (current-error-port)))
+         (newline e)
+         (display "can't find font: " e)
+         (write feta-name e)
+         ;;(symbol->string size)
+         "as-dummy"
+         ))))
+
+;; FIXME: making a full style-sheet is a pain, so we parasite on
+;; paper16 and translate the result.
+;;
+(define (as-make-style-sheet size)
+  (let ((sheet (make-style-sheet 'paper16)))
+    (assoc-set! sheet 'properties-to-font
+               (lambda (x y) (as-properties-to-font-name size x y)))
+    sheet))
+
+;;;; AsciiScript as  -- ascii art output
 (define (as-scm action-name)
 
   (define (beam width slope thick)
                      (func "rmove-to" (- dx 1) (if (< 0 dir) -1 0))
                      (func "put" (if (< 0 dir) "\\\\" "/"))))))
 
-  (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
+
+  (define (bracket arch_angle arch_width arch_height height arch_thick thick)
+    ;; width now fixed?
+    (let ((width 1))
          (string-append
           (func "rmove-to" (+ width 1) (- (/ height -2) 1))
           (func "put" "\\\\")
           (func "v-line" (+ height 1))
           (func "rmove-to" 0 (+ height 1))
           (func "put" "/")
-          ))
+          )))
 
   (define (char i)
     (func "char" i))
                    (func "h-line" dx))))))
 
   (define (font-load-command name-mag command)
+   ;; (display "name-mag: ")
+   ;; (write name-mag)
+   ;; (display "command: ")
+   ;; (write command)
     (func "load-font" (car name-mag) (cdr name-mag)))
 
   (define (header creator generate) 
          (string-append "(define " key " " (arg->string val) ")\n"))
 
   (define (lily-def key val)
-         (if 
-          (or (equal? key "lilypondpaperlinewidth")
-              (equal? key "lilypondpaperstaffheight"))
-          (string-append "(define " key " " (arg->string val) ")\n")
-          ""))
+    (if
+     ;; let's not have all bloody definitions
+     (or (equal? key "lilypondpaperlinewidth")
+        (equal? key "lilypondpaperstaffheight")
+        (equal? key "lilypondpaperoutputscale"))
+     (string-append "(define " key " " (arg->string val) ")\n")
+     ""))
 
   (define (no-origin) "")
   
index 874e8fcc43cb4548d20e79deea2ad81daf2e0f73..ecef13045457a4565bd03330f06661c7e11bb6bd 100644 (file)
@@ -55,6 +55,7 @@
 ;; (also tried to vary the order of this list, with little effect)
 (define paper20-style-sheet-alist
   '(
+    ;; why are font-names strings, not symbols?
     ((3 medium upright number feta-nummer 13) . "feta-nummer13")
     ((2 medium upright number feta-nummer 13) . "feta-nummer13")
     ((1 medium upright number feta-nummer 11) . "feta-nummer11")
       )
   ))
 
+(define (wild-eq? x y)
+  (or (eq? x y)
+      (eq? x '*)
+      (eq? y '*)))
+       
 (define (font-qualifies? qualifiers font-desc)
   "does FONT-DESC satisfy QUALIFIERS?"
   (if (null? qualifiers) #t
-      (if (eq? (font-field (caar qualifiers) font-desc) (cdar qualifiers))
+      (if (wild-eq? (font-field (caar qualifiers) font-desc) (cdar qualifiers))
          (font-qualifies? (cdr qualifiers) font-desc)
-         #f
-         )
-       )
-  )
+         #f)))
 
 (define (find-first-font qualifiers fonts)
   (if (null? fonts)
@@ -304,29 +307,27 @@ and warn if the selected font is not unique.
 (define (chain-assoc x alist-list)
   (if (null? alist-list)
       #f
-      (let* (
-            (handle (assoc x (car alist-list)))
-            )
+      (let* ((handle (assoc x (car alist-list))))
        (if (pair? handle)
            handle
-           (chain-assoc x (cdr alist-list))
-           )
-       )
-      )
-  )
+           (chain-assoc x (cdr alist-list))))))
 
 ;; TODO
 ;; the C++ version  in font-interface.cc is usually used.
+;;
+;; FIXME: this has silently been broken by the introduction
+;;        of wildcards in the font list.    
 (define (properties-to-font-name fonts properties-alist-list)
   (let*  (
          ;; change order to change priorities of qualifiers.
-         (q-order    '(font-name font-family font-series font-shape font-design-size font-relative-size))
-         (rawqualifiers (map (lambda (x) (chain-assoc x  properties-alist-list))
+         (q-order '(font-name font-family font-series font-shape
+                              font-design-size font-relative-size))
+         (rawqualifiers (map (lambda (x)
+                               (chain-assoc x properties-alist-list))
                              q-order))
          (qualifiers (filter-list pair? rawqualifiers))
-         (selected     (find-first-font qualifiers fonts))
-         (err (current-error-port))      
-         )
+         (selected (find-first-font qualifiers fonts))
+         (err (current-error-port)))
 
     (if (equal? selected "")
        (begin
index 1e6fab4f69b6eba5cd49b2331cfd3e5606cfe43a..a84fbdf0410cc4a9865a0fa7b343462dce031e54 100644 (file)
@@ -53,7 +53,7 @@
 
 ;;; Un-assorted stuff
 
-;; URG guile-1.3/1.4 compatibility
+;; URG guile-1.4/1.4.x compatibility
 (define (ly-eval x) (eval2 x #f))
 
 (define (sign x)
       (if (< x 0) -1 1)))
 
 
-;;(define major-scale
-;;  '(
-;;    (0 . 0)
-;;    (1 . 0)
-;;    (2 . 0)
-;;    (3 . 0)
-;;    (4 . 0)
-;;    (5 . 0)
-;;    (6 . 0)
-;;   ))
-
-
 (map (lambda (x) (eval-string (ly-gulp-file x)))
      '("output-lib.scm"
        "tex.scm"
index b3d127a8ce66dbc4a6a07a9ae246a98dd82edbf9..d9a41a08343299f7e2d562e963c3948a18b6010f 100644 (file)
@@ -123,6 +123,8 @@ Options:
 
 (define first-line #t)
 
+(define scaling 1)
+
 ;; cursor
 (define cur-x 0)
 (define cur-y 0)
@@ -189,32 +191,38 @@ Options:
   (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-raw x y c)
+  (if (array-in-bounds? canvas y x)
+      (array-set! canvas (merge-chars (array-ref canvas y x) c) y x)
+      (display (string-append "ouch: " (number->string x)  ","
+                             (number->string y) "\n")
+              (current-error-port))))
+
+(define (plot x neg-y c)
+  (let ((y (- (* -1 neg-y) 1)))
+    (plot-raw (inexact->exact x) (inexact->exact y) c)))
 
 (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))))))
-
+       (glyph (cadr c))
+       (scur-x (* scaling cur-x))
+       (scur-y (* scaling cur-y)))
+    ;; 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 (+ scur-x dx) (+ (- scur-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)))))
+    (plot (+ x i) y (substring s i (+ i 1)))))
 
 (define (show-char char)
   (display char))
@@ -274,7 +282,7 @@ Options:
                   (assoc (+ n 0.5) font))
              (get-char font (+ n 0.5))
              (get-char font n))))
-        (if c
+        (if (pair? c)
             (plot-char c))))
 
 (define (end-output) 
@@ -286,16 +294,24 @@ Options:
   (close cur-output-file)
   (set! cur-output-file '()))
 
+;; use plot-string
 (define (h-line len)
-  (let ((step (sign len)))
-       (do ((i 0 (+ i step)))
-          ((= i len))
-          (plot (+ cur-x i) cur-y line-char))))
+  (let ((scur-x (* scaling cur-x))
+       (scur-y (* scaling cur-y))
+       (slen (* scaling len)))
+    (let ((step (sign len)))
+         (do ((i 0 (+ i step)))
+             ((= i slen))
+           (plot (+ scur-x i) scur-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))))
+  (let ((scur-x (* scaling cur-x))
+       (scur-y (* scaling cur-y))
+       (slen (* scaling len)))
+    (let ((step (sign len)))
+      (do ((i 0 (+ i step)))
+         ((= i len))
+       (plot scur-x (+ scur-y i) line-char)))))
 
 (define (header x y)
   ;(display (string-append x y "\n") (current-error-port))
@@ -303,6 +319,7 @@ Options:
 
 (define (header-end) "")
 
+;; FIXME: scale
 (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)
@@ -378,11 +395,19 @@ Options:
       (begin
        (set! fonts (cons (cons "default" (generate-default-font)) fonts))
        (display "\n" (current-error-port))
-       (if (and (defined? 'lilypondpaperlinewidth)
-               (> (string->number lilypondpaperlinewidth) 0))
-          (set! canvas-width 
-                (inexact->exact (string->number lilypondpaperlinewidth))))))
-  (set! canvas-height height)
+       (if (defined? 'lilypondpaperoutputscale)
+          (set! scaling (inexact->exact (string->number lilypondpaperoutputscale))))
+       (if (defined? 'lilypondpaperlinewidth)
+          (let ((width (inexact->exact
+                        (string->number lilypondpaperlinewidth))))
+            (if (> width 0)
+                (set! canvas-width width)
+                ;; need long line...
+                ;;(set! canvas-width 200)
+                (set! canvas-width 80)
+                )))
+       ))
+  (set! canvas-height (inexact->exact (* scaling height)))
   (set! canvas (make-array " " canvas-height canvas-width)))
 
 (define (stop-line)
@@ -410,6 +435,6 @@ Options:
           ((= i n)) 
            (let* ((n (char->integer (string-ref s i)))
                   (c (get-char font n)))
-                 (plot-char c)
+             (if (pair? c) (plot-char c))
                  (rmove-to (char-width c) 0)))))