]> git.donarmstrong.com Git - lilypond.git/commitdiff
release: 1.3.6 release/1.3.6
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 15 Nov 1999 10:05:04 +0000 (11:05 +0100)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 15 Nov 1999 10:05:04 +0000 (11:05 +0100)
94 files changed:
CHANGES
Documentation/misc/index.texi
Documentation/topdocs/AUTHORS.texi
Documentation/topdocs/README.texi
Documentation/user/refman.itely
README.txt
TODO
VERSION
buildscripts/set-lily.sh
input/bugs/abe.ly [new file with mode: 0644]
input/denneboom.ly
lily/all-font-metrics.cc
lily/atom.cc
lily/auto-beam-engraver.cc
lily/bar-number-engraver.cc
lily/bar-script-engraver.cc
lily/bar.cc
lily/base-span-bar-engraver.cc
lily/beam.cc
lily/break-align-item.cc
lily/chord.cc
lily/clef-engraver.cc
lily/clef-item.cc
lily/collision.cc
lily/dots.cc
lily/font-metric.cc [new file with mode: 0644]
lily/grace-align-item.cc
lily/include/all-font-metrics.hh [new file with mode: 0644]
lily/include/all-fonts.hh [deleted file]
lily/include/atom.hh
lily/include/dots.hh
lily/include/font-metric.hh
lily/include/lily-guile.hh
lily/include/lily-proto.hh
lily/include/local-key-item.hh
lily/include/lookup.hh
lily/include/ly-smobs.icc
lily/include/note-head.hh
lily/include/paper-def.hh
lily/include/paper-outputter.hh
lily/include/staff-symbol-referencer.hh
lily/include/tfm-reader.hh
lily/include/tfm.hh
lily/include/time-signature.hh
lily/include/timing-translator.hh
lily/key-engraver.cc
lily/key-item.cc
lily/key.cc
lily/lily-guile.cc
lily/local-key-item.cc
lily/lookup.cc
lily/main.cc
lily/mark-engraver.cc
lily/multi-measure-rest.cc
lily/my-lily-lexer.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/paper-def.cc
lily/paper-outputter.cc
lily/paper-score.cc
lily/parser.yy
lily/rest.cc
lily/scope.cc
lily/score-element.cc
lily/script-engraver.cc
lily/script.cc
lily/separating-line-group-engraver.cc
lily/staff-margin-engraver.cc
lily/staff-performer.cc
lily/staff-symbol-referencer.cc
lily/stem-info.cc
lily/stem-tremolo.cc
lily/tfm-reader.cc
lily/tfm.cc
lily/timing-translator.cc
lily/translator-group.cc
lily/translator.cc
ly/init.fly
ly/paper11.ly
ly/params.ly
make/out/lilypond.lsm
make/out/lilypond.spec
mutopia/J.S.Bach/Petites-Preludes/preludes-1.ly
mutopia/J.S.Bach/Petites-Preludes/preludes-2.ly
mutopia/J.S.Bach/Petites-Preludes/preludes-3.ly
mutopia/J.S.Bach/Petites-Preludes/preludes-4.ly
mutopia/J.S.Bach/Petites-Preludes/preludes-5.ly
mutopia/J.S.Bach/Petites-Preludes/preludes-6.ly
mutopia/J.S.Bach/Petites-Preludes/preludes-score.ly
mutopia/J.S.Bach/wtk1-fugue2.ly
scm/generic-property.scm
scm/lily.scm
scripts/convert-mudela.py
tex/lilyponddefs.tex

diff --git a/CHANGES b/CHANGES
index 5382314124e16ea79f527849069cd923a83177ef..97960cac4eece2849f72958f344e9ac65d097f92 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,20 @@
+pl 5.hwn2
+       - Bach preludes: mutopification
+       - dots are Directional_element too; use \property dotDirection
+       - moved some stuff out of Lookup
+       - bf: dots
+       - font selection mechanics changed.
+
+pl 5.uu1
+       - bf: smob allocation (thanks David!)
+
+pl 5.hwn1
+       - junked \shape. Now use #'margin-shape 
+       - timing: one_beat -> \property beatLength
+       - bf convert-mudela
+
+************
+
 pl 4.uu1
        - input/test/ \property fixes.
        - gcc 2.95 fix
index 8a84edbeb84806360316f081bfd29203371cd117..1f64da664e7de608d7f1094fc191a504310068d2 100644 (file)
@@ -18,6 +18,7 @@ changes)}
 changes)}
 @item @uref{ANNOUNCE-1.2.txt, Announcement of 1.2 (includes summary of changes)}
 
-@item @uref{AIMS.txt}
+@item @uref{AIMS.txt} Why LilyPond?
+@item @uref{interview.txt} Answers to the Brave GNU world standard questions
 @end itemize
 
index 3807c62d00bd4a0036d57434cabd1eb0e8b97f36..5a6d60917bf5e3173c64f46915812c86d7f9203d 100644 (file)
@@ -54,7 +54,7 @@ list is alphabetically ordered.
     testing
 @item @email{pinard@@iro.umontreal.ca, Franc@,ois Pinard}, 
     parts of Documentation/Vocab*, started internationalization stuff
-@item @email{portnoy@ai.mit.edu,Stephen Peters} pdfTeX support
+@item @email{portnoy@@ai.mit.edu,Stephen Peters}, pdfTeX support
 @item @email{glenprideaux@@iname.com, Glen Prideaux},
     minor bug fix to script used to generate doc++ documentation
 @item @email{Roy.Rankin@@alcatel.com.au, Roy R. Rankin},
index f31af066a1042910aa365f2a7b94ecd28e4fd903..eeb64dca85a1c8e303deffed4a7d9449a268f353 100644 (file)
@@ -38,9 +38,11 @@ The real documentation is the directory Documentation/
 
 If you want to read the documentation online, these are options:
 @itemize @bullet
-@item  use @file{.html}. Refer to INSTALL.txt for info on how to make the
-.html documentation.
-@item  use @file{.html}. Point your browser to
+
+@item  use HTML. Refer to INSTALL.txt for information
+on how to make the HTML documentation.
+
+@item  use HTML. Point your browser to
 @uref{http://www.cs.uu.nl/~hanwen/lilypond/index.html}.
 @item use @file{.dvi},  for the tutorial and reference manual. Do
 
@@ -48,7 +50,9 @@ If you want to read the documentation online, these are options:
   make -C Documentation/user/ dvi 
 @end example 
 
-  
+You need a working LilyPond binary to create the DVI sources  .
+
 @item  use ASCII. Do
 using @example 
        make -C doc
index a7d080094973ea72a53df69f72d14c96d0bd3d67..08b7db490fd6c6441289ad169a08990e020e410a 100644 (file)
@@ -219,7 +219,6 @@ alphabetic characters.  These are all the keywords.
   \score
   \script
   \sequential
-  \shape
   \simultaneous
   \skip
   \spanrequest
@@ -673,15 +672,11 @@ c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
     a1 a2 a4 a8 a16 a32 a64 a64 
   }
   \paper {
-    loose_column_distance = 2.5 * \interline;
-    linewidth = -1.0;
-    \translator {
-      \type "Score_engraver";
-      \name "Score";
-      \consists "Note_heads_engraver";
-      \consists "Stem_engraver";
-      \consists "Rhythmic_column_engraver";
-    }
+%{    \translator {
+      \StaffContext
+       \remove "Clef_engraver";
+       \remove "Staff_symbol_engraver";
+    } %}
   }
 }
 @end mudela
@@ -2372,7 +2367,10 @@ where each of the items is one of
   @item  A context definition.  See section XREF-contextdefs [FIXME] for
        more information on context definitions.
 
-  @item  A margin shape declaration.  The syntax is
+  @item
+       FIXME now in SCM
+
+       A margin shape declaration.  The syntax is
 
        @example
 
index 957e88819c50878247d6a003bfd76a14b1ef6ad0..17ffb51f4d2cb48ba7aa21be78675fa193f6d63c 100644 (file)
@@ -37,16 +37,18 @@ Documentation
    The real documentation is the directory Documentation/
 
    If you want to read the documentation online, these are options:
-   * use `.html'. Refer to INSTALL.txt for info on how to make the
-     .html documentation.
+   * use HTML. Refer to INSTALL.txt for information on how to make the
+     HTML documentation.
 
-   * use `.html'. Point your browser to
+   * use HTML. Point your browser to
      `http://www.cs.uu.nl/~hanwen/lilypond/index.html'.
 
    * use `.dvi',  for the tutorial and reference manual. Do
 
             make -C Documentation/user/ dvi
 
+     You need a working LilyPond binary to create the DVI sources  .
+
    * use ASCII. Do using
                make -C doc
 
diff --git a/TODO b/TODO
index 23f829958fb49ee33685902f2bec0fd671533733..1b7b2100722fd7f8c65f81253e7d753a90a92f19 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,8 +9,10 @@ Most of the items are marked in the code as well
 Grep -i for TODO, FIXME and ugh/ugr/urg.  
 
 .* TODO
-. * make this file understandable for 3rd parties.
-. * break align order from SCM list. 
+. * agressive type-checking for SCM stuff. 
+. * TODO^2:
+.   *make  a TODO.texi, like http://www.gnu.org/software/guile/ideas.html
+.  * make this file understandable for 3rd parties.
 . * \accepts -> \acceptedby 
 . * context in embedded SCM errors.
 . * eradicate all VIRTUAL_COPY_CONS () macros ; use indexed creation,
@@ -18,7 +20,6 @@ Grep -i for TODO, FIXME and ugh/ugr/urg.
 
        ctor_dict["Score_element"]->clone_func (orig);
        ctor_dict["Score_element"]->create_func ();
-
 . * acc at tied note after linebreak.
 . * fix font-naming and selecting
 . * fix naming: \interline Context.staffLineLeading, staff_line_leading (),
@@ -26,27 +27,22 @@ staff_position staff_space
 . * chord tonic: placement of accidental  C#, Cb (from scm and C++)
 . * note head on stem err msg in dutch.
 . * why need to run -C mf twice?
-. * setting indent to 0 with \shape fails
 . * here's no difference at all in output. When either is jacked up to 7.0,
 everything works and matches up; when either is set just a bit above the
 default 5.0 (5.4 is what I was hoping to use), stems miss note heads. So
 it's some sort of a numerical (truncation/roundoff) problem.
 John
+. * fix #'margin-shape;  setting indent to 0 with \shape fails
 . * Fixed size staff/system heights;
-. * ly2dvi : don't repeat opus if same.
-. * breaks before mmrests are favored.
-. * hara kiri _8 clef.
-. * junk -M ?
+. * 
+. * ly2dvi : don't repeat opus if same. 
+. * hara kiri _8 clef. 
+. * junk -M ? 
 . * mudela-book doco
 . * fix or replace feta-accordion.mf
 . * script engraver
 . * bracket pdf hack
-
 . * Mondrup:
-- I would like an option to define the number of systems on which the
-score must be distributed. As it is now it seems that I may only
-influence that indirectly through the gourlay_maxmeasures property.
-
 - if I change the property minVerticalAlign in a multi staff score with
 lyrics the change affects the lyrics too. I would like the change to
 _only_ affect staves.
@@ -67,15 +63,14 @@ ChoirStaff bar line types in the rest of the scores
 . * make all Feta (including dynamics) available to the user in
     textual scripts. Examples: "D.S. al \coda", "\mf espress.".
  
-. * Write script that uses --find-old-relative to do auto relativization.
+. * Write script that uses --find-old-relative to do auto relativization. 
 . * Junk shared cruft (duration, moment) in lib/
 
 
 .* Cleanups needed
-. * \$ and $ identifier syntax in examples.
+. * \$ and $ identifier syntax in examples. 
 . * Junk ghost positioning objects eg, Script leans on  Staffside
     leans on Staff.
-. * bracket ps code.
 . * Key_engraver, Local_key_item
 . * Think of comprehensive solution for "if (grace_b == self_grace_b_)"
 . * String[String.length] doesn't trap.
@@ -87,6 +82,12 @@ ChoirStaff bar line types in the rest of the scores
 . * junk Music_iterator::first_b_
 . * Bezier
 
+.* ACCIDENTALS
+. * half-sharps, half-flats
+. * adaptive accidental spacing.
+. * accidentals closer to note head
+
+
 .* Beams
 . * [c8. c16 c16 c16] in 6/8 timesig.
 . * Rewrite Stem, Beam (hairy)
@@ -123,13 +124,9 @@ singer knows where to break the words.
 
 In bar 27, there's a crescendo that's supposed to start at the start
 of the grace notes and extend to the note after the grace notes.
-. * 5. Sometimes lyrics extend past the right end of the staff. I guess that
-this is a similar problem (if not another symptom of the same problem) as
-one of the spacing bugs mentioned in the TODO.
-. * 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.
-. * decimal point in \paper {}
+. * 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
 . * repeats and partial measures.
 . * rhythmic staff & accidentals.
@@ -152,7 +149,6 @@ one of the spacing bugs mentioned in the TODO.
 
 . * Matanya's tips: 
 .  * don't  shorten stems/staffs closer to each other.
-.  * accidentals closer to note head
 .  * to space the staffs/staffgroups contained in the score.  
 .  * heavier beams?
 
@@ -245,8 +241,6 @@ to provide IO handling for TeX stream, mudela stream, data-file.
 . * split error/warning in error/warning/non_fatal_error
 . * add a Duration_convert member to Duration_iter to set parameters.
        Junk global duration settings. 
-. * en-,discouraged linebreaking: 
-.  * handle DISALLOW < penalty > FORCE
 .  * discourage breaking of slurs
 . * fix variable define/lookup parser global<->paper
 . * fix title/instrument placements; see input/test/title.ly
@@ -254,16 +248,12 @@ to provide IO handling for TeX stream, mudela stream, data-file.
 . *  I'd like to change the \repetitions command to Jan's suggested
   syntax: \repeat "repeatsymbol" 2 {...}, but I'm not sure that
   I understand the implementation of repeats well enough.
-. * add full cello suites to web site (kom op, Maarten!)
 . * add mudela-book-doc source to webstie.
-. * Rethink Time_description
-\cadenza , \meter,  should all be \properties
 . * fix singleStaffBracket
 . * rename
 .  * partial -> anacrouse
 . * move paper vars into engraver properties
 . * add new glyphs to font.ly
-. * check for groff / troff/ nroff et
 . * more intelligent file searching
 . * disable spaces in TeX stuff
 . * handle ^C for tmp/file creation.
@@ -274,7 +264,7 @@ to provide IO handling for TeX stream, mudela stream, data-file.
 touching it.
 . * put errorlevel in Input class
 . * junk nesting slurs
-. * distinguish between unset and empty properties. 
+
 
 .* FONT
 . * the bracket is ugly (wings are too parabolic, should be more circular)
@@ -331,14 +321,16 @@ touching it.
 
 . * patch: don't touch timestamp if all patches fail.
 . * MetaPost: should not generate setgray for unfill
-. * mfplain.ini not in tetex 0.9
+
 . * mf-to-table -> add space 'before ; in AFM output.  (-> check AFM
 spec. Is this a bug in afm2tfm?)
 . * check out GCC signatures?
 . * glibc 2.0:
          f = fopen ("/dev/null", "r")
          assert (feof (f))
-. * tetex: mfplain.mem
+. * tetex: mfplain.mem -> INSTALL
+. * mfplain.ini not in tetex 0.9 -> INSTALL
+
 
 .* PROJECTS
 . * Scripts:
@@ -350,7 +342,6 @@ spec. Is this a bug in afm2tfm?)
 .  * stack parameterised scripts for fingering and footing:
 
 . * convert-mudela:
-.  * automatically add  a \version if not present.
 .  * better parsing
 .  * make smarter
 .  * convert-mudela -e empty.ly
@@ -364,7 +355,6 @@ spec. Is this a bug in afm2tfm?)
 
 . * use properties for:
 .  * default tempo.
-.  * cadenza mode? 
 
 . * page handling:
 .  * PS output
@@ -390,6 +380,7 @@ spec. Is this a bug in afm2tfm?)
 
 . * \header
 .  * output header info to MIDI too.
+.  * dump \header into easily parsable format.
 
 . * a musical dictionary. See Documentation/vocabulary-*, other
 languages:
@@ -465,6 +456,7 @@ hesitate to ask.
 .  * speed up PS code.
 .  * PS lines to .eps files
 .  * write custom prolog
+.  * fix ps font switching
 
 . * more spanners (smallish)
 .  * Glissando
@@ -485,7 +477,6 @@ hesitate to ask.
 . * should adjust stemlength for flag number.
 
 . * breaking:
-.  * saving them
 .  * specify number of lines
 
 .* INPUTLANGUAGE
@@ -504,15 +495,10 @@ hesitate to ask.
 
 .* SMALLISH PROJECTS
 
-. * A range for context errors (eg. mark both { and }. )
-
 . * lyric in staff  (sharpsharp in staff, text below)
 
 . * write Dynamic_line (to group dynamics horizontally)
 
-. * half-sharps, half-flats
-
-. * adaptive accidental spacing.
 
 . * handle EOF graciously in error messages.
 
@@ -529,15 +515,13 @@ hesitate to ask.
           (where "to" is a tiny bow)
 
 . * auxilliary file for caching info.
+
 . * Text_crescendo
 
 .* IDEAS
 . * Output data structures of Mudela in XML/SGML.
 . * create libmudela, or liblily_frontend
 . * move MIDI stuff (including Quantization) to a ANSI C libmidi library.
-. * Spacing_request for manually adjusting spacing
-. * caching breakpoints
-. * used fixedpoint arithmetic for min. energy.
 
 * OUTLINE SETUP
 .* .EMACS
diff --git a/VERSION b/VERSION
index 1d120e2106d10c99b2d1492468c7ea2baa8ac822..499da9327ab76392a593b9d470c5826366b0e8ea 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=5
+PATCH_LEVEL=6
 MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
index 15e4633b7813f45c51cc64e84396bfb7091acfcf..199d1a5c5b2e837b79465173b055e3f502ba95b0 100755 (executable)
@@ -99,3 +99,5 @@ echo Starting configuration
 echo
 (set -x; TEX_TFMDIR=$TEX_TFMDIR ./configure --prefix=$prefix --enable-debugging --enable-printing --enable-checking --disable-optimise)
 
+echo "making tags in background"
+make TAGS >& log &
diff --git a/input/bugs/abe.ly b/input/bugs/abe.ly
new file mode 100644 (file)
index 0000000..a062298
--- /dev/null
@@ -0,0 +1,18 @@
+
+% Generated by mudela-book.py; options are 
+\include "paper16.ly"
+\paper  { linewidth = 390.000000 \pt; } 
+
+\score {
+  \notes \relative c'' {
+    a\longa a\breve  
+    a1 a2 a4 a8 a16 a32 a64 a64 
+  }
+  \paper {
+    \translator {
+      \StaffContext
+       \remove "Clef_engraver";
+       \remove "Staff_symbol_engraver";
+    }
+  }
+}
index 4c0060840479fcb1304a9085b83a68c245c04de6..11bca6d414707aa12b4deaab5aeb57e84ba59f16 100644 (file)
@@ -83,17 +83,22 @@ verse_two_staff = \context Lyrics = two
 denneboom_shape = \paper{ 
        \paper_twenty
        indent = 20. \mm;
-       \shape   70. \mm, 20. \mm,
-                65. \mm, 30. \mm,
-                57.5 \mm, 45. \mm,
-                50. \mm, 60. \mm,
-                42.5 \mm, 75. \mm,
-                35. \mm, 90. \mm,
-                27.5 \mm, 105. \mm,
-                20. \mm, 120. \mm,
-                10. \mm, 140. \mm,
-                65. \mm, 30. \mm
-                ;
+
+       % UGH -- THIS IS HAIRY 
+       #'margin-shape = #(map
+               (lambda (x) (cons-map mm-to-pt x)) 
+               '((70.0 .  20.)
+                (65.0 .  30.0)
+                (57.5  .  45.0)
+                (50.0 .  60.0) 
+                (42.5  .  75.)  
+                (35.0 .  90.)
+                (27.5  .  105.)
+                (20.0 .  120.0)
+                (10.0 .  140.0) 
+                (65.0 .  30.0))
+       )
+
        gourlay_maxmeasures = 30.;
        arithmetic_basicspace = 3.8;
        arithmetic_multiplier = 8.\pt;
index 0ecfbf4420de88d419e88b1e20a4ddc31f462970..eddad21ed05589c5e8efccf885787ca41a85ba6a 100644 (file)
@@ -1,10 +1,21 @@
+/*   
+  all-font-metrics.cc --  implement All_font_metrics
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
 
 #include "main.hh"
-#include "all-fonts.hh"
+#include "all-font-metrics.hh"
 #include "debug.hh"
 #include "warn.hh"
 #include "afm.hh"
 #include "tfm.hh"
+#include "dictionary-iter.hh"
+#include "lily-guile.hh"
+#include "tfm-reader.hh"
 
 const char * default_font_sz_ = "cmr10";
 
@@ -26,6 +37,9 @@ All_font_metrics::find_afm (String name)
       *mlog << "[" << path;
       Adobe_font_metric
        * afm_p = new Adobe_font_metric (read_afm_file (path));
+
+      afm_p->name_str_ = name;
+      
       *mlog << "]" << flush ;
 
       afm_p_dict_[name] = afm_p;
@@ -33,6 +47,22 @@ All_font_metrics::find_afm (String name)
   return afm_p_dict_[name];  
 }
 
+Scaled_font_metric * 
+All_font_metrics::find_scaled (String nm, int m)
+{
+  Scaled_font_metric * s=0;
+  String index =  nm + "@" + to_str (m);
+  if (!scaled_p_dict_.elem_b (index))
+    {
+      Font_metric *f = find_font (nm);
+      s = new Scaled_font_metric (f, m);
+      scaled_p_dict_[index] = s;
+      return s;  
+    }
+  else
+    return scaled_p_dict_[index];
+}
+
 Tex_font_metric *
 All_font_metrics::find_tfm (String name)
 {
@@ -42,10 +72,11 @@ All_font_metrics::find_tfm (String name)
       path = search_path_.find (path);
       if (path.empty_b ())
        return 0;
-      
+
       *mlog << "[" << path;
-      Tex_font_metric  * tfm_p = new Tex_font_metric;
-      tfm_p->read_file (path);
+      Tex_font_metric  * tfm_p = Tex_font_metric_reader::read_file (path);
+      tfm_p->name_str_ = name;
+
       *mlog << "]" << flush ;
 
       tfm_p_dict_[name] = tfm_p;
@@ -76,3 +107,18 @@ All_font_metrics::find_font (String name)
   error (_f ("(search path: `%s'", search_path_.str ()));
   error (_ ("Giving up"));
 }
+
+SCM
+All_font_metrics::font_descriptions () const
+{
+  SCM l = SCM_EOL;
+  for (Dictionary_iter<Adobe_font_metric*> ai(afm_p_dict_); ai.ok (); ai++)
+    l = gh_cons (ai.val ()->description (), l);
+  for (Dictionary_iter<Tex_font_metric*> ai(tfm_p_dict_); ai.ok (); ai++)
+    l = gh_cons(ai.val ()->description (), l);
+
+  for (Dictionary_iter<Scaled_font_metric*> ai(scaled_p_dict_); ai.ok (); ai++)
+    l = gh_cons (ai.val ()->description (),l);
+  
+  return l;
+}
index c222778aba3fd4734ed0b6827dc1218810afed64..e71f371a3ff75b926adf81c14533d76a4dc1900b 100644 (file)
 #include "lookup.hh"
 #include "main.hh"
 #include "global-ctor.hh"
+#include "font-metric.hh"
 
 Atom::Atom(SCM s)
 {
   func_ = s;
-  magn_ = gh_int2scm (0);
+}
+
+void
+Atom::fontify (Font_metric * met)
+{
+
+  SCM desc = ly_quote_scm (met->description ());
+  SCM font_switch = gh_list (ly_symbol2scm ("select-font"),
+                            desc,
+                            SCM_UNDEFINED);
+
+  SCM f =func_;
+  func_ = gh_list (ly_symbol2scm ("string-append"),
+                  font_switch , f,
+                  SCM_UNDEFINED);
+
 }
index 294a1d2858f2bc0e1c1cdb5d98e1cb4c5d411cbe..bbba952ad21ebed9ae66f8689aa6c4f030074946 100644 (file)
@@ -105,7 +105,11 @@ Auto_beam_engraver::consider_end_and_begin (Moment test_mom)
   /*
     first guess: end beam at end of beat
   */
-  Moment end_mom = timer_l_->one_beat_;
+  SCM one (get_property ("beatLength", 0));
+
+  Moment end_mom;
+  if (SMOB_IS_TYPE_B(Moment, one))
+    end_mom = *SMOB_TO_TYPE (Moment, one);
 
   /*
     second guess: property generic time exception
index c8a0aa01bb193d0cdd15682b5f7b8f35afdd2325..e28939ca6788ec3ea893de16f3a3f05117ee042a 100644 (file)
@@ -18,7 +18,7 @@ Bar_number_engraver::Bar_number_engraver()
   axis_ = Y_AXIS;
   type_ = "barNumber";
   visibility_lambda_
-    = ly_ch_C_eval_scm ("postbreak-only-visibility");
+    = ly_eval_str ("postbreak-only-visibility");
 }
 
 void
index c8becdc046d6dc40415561bd89a91525a5f8bb9b..627ca68fc687aab9ea0dd7f598ee35be7a25f4d5 100644 (file)
@@ -25,7 +25,7 @@ Bar_script_engraver::Bar_script_engraver ()
   text_p_ =0;
   hang_on_clef_b_ = false;
   visibility_lambda_ 
-    = ly_ch_C_eval_scm ("non-postbreak-visibility");
+    = ly_eval_str ("non-postbreak-visibility");
 }
 
 void
index f2d3d187ea617c22e4d017ac72ff2e997650221b..ad6fb103f466574ef81865e8e4f6a8fee34f4e47 100644 (file)
@@ -76,6 +76,8 @@ Bar::do_pre_processing ()
          break;
        }
     }
+
+
   if (remove_elt_property ("at-line-start") == SCM_BOOL_T      // UGR.
       && (break_status_dir () == RIGHT) && (type_str_ == ""))
     {
index 5b3ea4437e8addaee56bb73b948aeea38632be2f..13e43b22affe00d2c1e2952e81693206a0083e2a 100644 (file)
@@ -54,7 +54,7 @@ Base_span_bar_engraver::acknowledge_element (Score_element_info i)
          String visnam =  String(name()) + "-visibility";
          
          spanbar_p_->set_elt_property ("visibility-lambda",
-                                       ly_ch_C_eval_scm (visnam.ch_C()));
+                                       ly_eval_str (visnam.ch_C()));
 
          if (use_priority_b_)
            {
index 64ab8ea41fdaa019027096c78d827251ac5a8478..c489e8f6e74364d5a9d1bfec89c8936348381da4 100644 (file)
@@ -283,14 +283,14 @@ Beam::get_default_dir () const
 
   SCM a = get_elt_property ("beam-dir-algorithm");
   
-  if (a == gh_symbol2scm ("majority")) // should get default from paper.
+  if (a == ly_symbol2scm ("majority")) // should get default from paper.
     beam_dir = (count[UP] == count[DOWN]) ? neutral_dir 
       : (count[UP] > count[DOWN]) ? UP : DOWN;
-  else if (a == gh_symbol2scm ("mean"))
+  else if (a == ly_symbol2scm ("mean"))
     // mean center distance
     beam_dir = (total[UP] == total[DOWN]) ? neutral_dir
       : (total[UP] > total[DOWN]) ? UP : DOWN;
-  else if (a == gh_symbol2scm ("median"))
+  else if (a == ly_symbol2scm ("median"))
     {
       // median center distance
       if (count[DOWN] && count[UP])
@@ -350,7 +350,7 @@ Beam::check_stemlengths_f (bool set_b)
 {
   Real interbeam_f = paper_l ()->interbeam_f (multiple_i_);
 
-  Real beam_f = paper_l ()->get_var ("beam_thickness");;
+  Real beam_f = gh_scm2double (get_elt_property ("beam-thickness"));
   Real staffline_f = paper_l ()-> get_var ("stafflinethickness");
   Real epsilon_f = staffline_f / 8;
   Real dy_f = 0.0;
@@ -515,13 +515,13 @@ Beam::quantise_dy ()
 
   SCM q = get_elt_property ("slope-quantisation");
   
-  if (q == gh_symbol2scm ("none"))
+  if (q == ly_symbol2scm ("none"))
     return;
 
   Real interline_f = stems_[0]->staff_line_leading_f ();
   Real internote_f = interline_f / 2;
   Real staffline_f = paper_l ()->get_var ("stafflinethickness");
-  Real beam_f = paper_l ()->get_var ("beam_thickness");;
+  Real beam_f = gh_scm2double (get_elt_property ("beam-thickness"));;
 
   Real dx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f ();
 
@@ -574,7 +574,7 @@ Beam::quantise_left_y (bool extend_b)
   Real space = stems_[0]->staff_line_leading_f ();
   Real internote_f = space /2;
   Real staffline_f = paper_l ()->get_var ("stafflinethickness");
-  Real beam_f = paper_l ()->get_var ("beam_thickness");;
+  Real beam_f = gh_scm2double (get_elt_property ("beam-thickness"));;
 
   /*
     [TODO]
@@ -603,7 +603,7 @@ Beam::quantise_left_y (bool extend_b)
   Real beamdy_f = beamdx_f * slope_f_ * internote_f;
 
   Array<Real> allowed_position;
-  if (q == gh_symbol2scm ("normal"))
+  if (q == ly_symbol2scm ("normal"))
     {
       if ((multiple_i_ <= 2) || (abs (beamdy_f) >= staffline_f / 2))
        allowed_position.push (straddle);
@@ -611,7 +611,7 @@ Beam::quantise_left_y (bool extend_b)
        allowed_position.push (sit);
       allowed_position.push (hang);
     }
-  else if (q == gh_symbol2scm ("traditional"))
+  else if (q == ly_symbol2scm ("traditional"))
     {
       // TODO: check and fix TRADITIONAL
       if ((multiple_i_ <= 2) || (abs (beamdy_f) >= staffline_f / 2))
@@ -707,7 +707,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
   Real interbeam_f = paper_l ()->interbeam_f (multiple_i_);
 
   Real internote_f = here->staff_line_leading_f ()/2;
-  Real beam_f = paper_l ()->get_var ("beam_thickness");;
+  Real beam_f = gh_scm2double (get_elt_property ("beam-thickness"));;
 
   Real dy = interbeam_f;
   Real stemdx = staffline_f;
index dd6ab6490db031c79ab086750c3d29a7b58e585d..1d6c6cb89103860179deb40d423f29eb09afc148 100644 (file)
@@ -17,8 +17,6 @@
 /*
   Handle spacing for prefatory matter. 
 
-
-
   TODO: rewrite this.  It is kludgy
 */
 
@@ -68,7 +66,7 @@ Break_align_item::do_pre_processing()
        next_origin = ly_str02scm ("begin-of-note");
       
       SCM extra_space
-       = scm_eval (scm_listify (ly_symbol ("break-align-spacer"),
+       = scm_eval (scm_listify (ly_symbol2scm ("break-align-spacer"),
                                 current_origin, next_origin, SCM_UNDEFINED)); 
       SCM symbol = SCM_CAR (extra_space);
       Real spc = gh_scm2double (SCM_CADR(extra_space));
@@ -113,12 +111,12 @@ Break_align_item::do_pre_processing()
   
   Real stretch_distance =0.;
   
-  if (SCM_CAR (symbol_list) == gh_symbol2scm ("extra-space"))
+  if (SCM_CAR (symbol_list) == ly_symbol2scm ("extra-space"))
     {
       spring_len += dists.top ();
       stretch_distance = dists.top ();
     }
-  else if (SCM_CAR (symbol_list) == gh_symbol2scm ("minimum-space"))
+  else if (SCM_CAR (symbol_list) == ly_symbol2scm ("minimum-space"))
     {
       spring_len = spring_len >? dists.top ();
       stretch_distance = spring_len;
index f6e1341d9e22ca9afb6434d69646ddd777e21b88..30a5ae9300b08cd522abdee35a430d4f53ae9626 100644 (file)
@@ -485,7 +485,7 @@ Chord::ly_text2molecule (SCM scm) const
 Molecule
 Chord::pitch2molecule (Musical_pitch p) const
 {
-  SCM name = scm_eval (gh_list (gh_symbol2scm ("user-pitch-name"), ly_quote_scm (pitch2scm (p)), SCM_UNDEFINED));
+  SCM name = scm_eval (gh_list (ly_symbol2scm ("user-pitch-name"), ly_quote_scm (pitch2scm (p)), SCM_UNDEFINED));
 
   if (name != SCM_UNSPECIFIED)
     {
@@ -493,9 +493,14 @@ Chord::pitch2molecule (Musical_pitch p) const
     }
 
   Molecule mol = lookup_l ()->text ("", p.str ().left_str (1).upper_str (), paper_l ());
+
+  /*
+    We want the smaller size, even if we're big ourselves.
+   */
   if (p.accidental_i_)
     mol.add_at_edge (X_AXIS, RIGHT, 
-                    paper_l ()->lookup_l (-2)->accidental (p.accidental_i_, 0), 0);
+                    
+                    paper_l ()->lookup_l (-2)->afm_find (String ("accidentals-") + to_str (p.accidental_i_)), 0.0);
   return mol;
 }
 
@@ -533,7 +538,7 @@ Chord::user_chord_name (Array<Musical_pitch> pitch_arr, Chord_name* name_p) cons
   for (int i= chord_type.size (); i--; )
     chord = gh_cons (pitch2scm (chord_type[i]), chord);
 
-  SCM name = scm_eval (gh_list (gh_symbol2scm ("user-chord-name"), ly_quote_scm (chord), SCM_UNDEFINED));
+  SCM name = scm_eval (gh_list (ly_symbol2scm ("user-chord-name"), ly_quote_scm (chord), SCM_UNDEFINED));
   if (name != SCM_UNSPECIFIED)
     {
       name_p->modifier_mol = ly_text2molecule (gh_car (name));
index 3d33c6cc7e99aede4e8adaac77b830dc7330ce4d..452fda6c671702c8025f392587f8a35d0a373e8b 100644 (file)
@@ -116,7 +116,7 @@ Clef_engraver::acknowledge_element (Score_element_info info)
       create_clef();
       if(!default_clef)
        clef_p_->set_elt_property("visibility-lambda",
-                                 ly_ch_C_eval_scm ("all-visibility"));
+                                 ly_eval_str ("all-visibility"));
     }
 
   /* ugh; should make Clef_referenced baseclass */
index 6503c3a1d5eb7a744eedc35d020f1ac151a80738..32a7d932739da3f72ac4ae5478bd42f60fed661a 100644 (file)
@@ -81,7 +81,8 @@ Clef_item::do_add_processing ()
 Molecule*
 Clef_item::do_brew_molecule_p() const
 {
-  Molecule*output = new Molecule (lookup_l ()->clef (symbol_));
+  Molecule*output = new Molecule (lookup_l ()->afm_find (String ("clefs-" + symbol_)));
+
   return output;
 }
 
index 0c08134b88f274da0e5e926ac70ea9265d236817..48148c21ef7b4c9c3d2df5cfedda2ae384c0f888 100644 (file)
@@ -52,8 +52,6 @@ Collision::do_pre_processing()
 
   This should be done better, probably.
 
-  TODO: forced hshift
-  
   */
 Array< Shift_tup >
 Collision::automatic_shift ()
index d4c8e62eed53735aafb40035246bdd1619824909..8eda51a6d2fbea9720a1a57cda547e9c78e92430 100644 (file)
 Dots::Dots ()
 {
   dots_i_ =0;
-  resolve_dir_ =CENTER;
 }
 
 void
 Dots::do_post_processing ()
 {
-  if (!resolve_dir_)
-    resolve_dir_ = UP;
-  
-  if (!(position_i_ % 2))
-    position_i_ += resolve_dir_;
-
   if (!dots_i_)
     {
       set_elt_property ("transparent", SCM_BOOL_T);
       set_empty (true, X_AXIS, Y_AXIS);
     }
-}
+  else
+    {
+      if (!get_direction ())
+       set_direction (UP);
 
+      int p = int (position_f ());
+      if (!(p % 2))
+       set_position (p  + get_direction ());
+    }
+}
 Molecule* 
 Dots::do_brew_molecule_p () const
 {
@@ -41,7 +42,7 @@ Dots::do_brew_molecule_p () const
                                          Interval (0,0)));
   out->add_molecule (fill);
 
-  Molecule d = lookup_l ()->dots ();
+  Molecule d = lookup_l ()->afm_find (String ("dots-dot"));
 
   Real dw = d.dim_[X_AXIS].length ();
   d.translate_axis (-dw, X_AXIS);
@@ -50,7 +51,7 @@ Dots::do_brew_molecule_p () const
       d.translate_axis (2*dw,X_AXIS);
       out->add_molecule (d);
     }
-  out->translate_axis (staff_line_leading_f () * position_i_ /2., Y_AXIS);
+
   return out;
 }
 
diff --git a/lily/font-metric.cc b/lily/font-metric.cc
new file mode 100644 (file)
index 0000000..8c8a8e3
--- /dev/null
@@ -0,0 +1,100 @@
+/*   
+  font-metric.cc --  implement Font_metric
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include <math.h>
+#include <ctype.h>
+
+
+#include "font-metric.hh"
+
+Box
+Font_metric::text_dimension (String text) const
+{
+  Interval ydims;
+  Real w=0.0;
+  
+  for (int i = 0; i < text.length_i (); i++) 
+    {
+      
+      if (text[i]=='\\') 
+       {
+         for (i++; (i < text.length_i ()) && isalpha(text[i]); i++)
+           ;
+         // ugh.
+         i--; // Compensate for the increment in the outer loop!
+       }
+      else
+       {
+         Character_metric const *c = get_char ((unsigned char)text[i],false);
+
+         // Ugh, use the width of 'x' for unknown characters
+         if (c->dimensions()[X_AXIS].length () == 0) 
+           c = get_char ((unsigned char)'x',false);
+         
+         w += c->dimensions()[X_AXIS].length ();
+         ydims.unite (c->dimensions()[Y_AXIS]);
+       }
+    }
+  if (ydims.empty_b ())
+    ydims = Interval (0,0);
+
+  return Box(Interval (0, w), ydims);
+}
+
+
+Box
+Scaled_font_metric::text_dimension (String t) const
+{
+  Real realmag = pow (1.2, magstep_i_);
+  Box b (orig_l_->text_dimension (t));
+
+  return Box(b[X_AXIS]* realmag, b[Y_AXIS]*realmag);
+}
+
+
+Box
+Character_metric::dimensions () const
+{
+  return Box(Interval(0,0), Interval(0,0));
+}
+
+Font_metric::~Font_metric ()
+{
+}
+
+Character_metric::~Character_metric()
+{
+}
+
+Character_metric const *
+Font_metric::get_char (int, bool)const
+{
+  return 0;
+}
+
+Scaled_font_metric::Scaled_font_metric (Font_metric* m, int s)
+{
+  magstep_i_ = s;
+  orig_l_ = m;
+}
+
+SCM
+Font_metric::description () const
+{
+  return gh_cons (ly_symbol2scm (name_str_.ch_C()), gh_int2scm (0));
+}
+
+
+SCM
+Scaled_font_metric::description () const
+{
+  SCM od = orig_l_->description ();
+  gh_set_cdr_x (od, gh_int2scm (magstep_i_));
+  return od;
+}
index 49739fdad722191016b34c7f1aa8b245d894c86a..3ffb02c42df1a8f01180400222a9f2c3c36ada9c 100644 (file)
@@ -10,6 +10,7 @@
 #include "grace-align-item.hh"
 #include "lookup.hh"
 #include "paper-column.hh"
+#include "paper-def.hh"
 
 Grace_align_item::Grace_align_item ()
 {
@@ -20,7 +21,9 @@ Grace_align_item::Grace_align_item ()
 void
 Grace_align_item::do_pre_processing ()
 {
-  Real nhw = lookup_l ()->notehead (2, "").dim_[X_AXIS].length();
+  Real nhw = // lookup_l ()->notehead (2, "").dim_[X_AXIS].length();
+    paper_l ()->get_var ("quartwidth");
+  
   threshold_interval_[MIN] = nhw* 1.5;
   column_l ()->set_elt_property ("contains-grace", SCM_BOOL_T);
 
diff --git a/lily/include/all-font-metrics.hh b/lily/include/all-font-metrics.hh
new file mode 100644 (file)
index 0000000..432da7e
--- /dev/null
@@ -0,0 +1,44 @@
+/*   
+  all-fonts.hh -- declare All_font_metrics
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef ALL_FONTS_HH
+#define ALL_FONTS_HH
+
+#include "dictionary.hh"
+#include "file-path.hh"
+#include "lily-proto.hh"
+#include "font-metric.hh"
+#include "lily-guile.hh"
+
+/**
+   Interface to all .afm files living in the filesystem.
+ */
+class All_font_metrics
+{
+  Dictionary<Adobe_font_metric*> afm_p_dict_;
+  Dictionary<Tex_font_metric*> tfm_p_dict_;
+  Dictionary<Scaled_font_metric*> scaled_p_dict_;
+  File_path search_path_;
+public:
+  
+  Adobe_font_metric *find_afm (String name);
+  Tex_font_metric *find_tfm (String);
+  Font_metric *find_font (String name);  
+  Scaled_font_metric* find_scaled (String , int);
+  
+  All_font_metrics (String search_path);
+  
+  SCM font_descriptions () const;
+};
+
+
+
+
+#endif /* ALL_FONTS_HH */
+
diff --git a/lily/include/all-fonts.hh b/lily/include/all-fonts.hh
deleted file mode 100644 (file)
index 827fcb4..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*   
-  all-fonts.hh -- declare All_font_metrics
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
-
-#ifndef ALL_FONTS_HH
-#define ALL_FONTS_HH
-
-#include "dictionary.hh"
-#include "file-path.hh"
-#include "lily-proto.hh"
-#include "font-metric.hh"
-
-/**
-   Interface to all .afm files living in the filesystem.
- */
-class All_font_metrics
-{
-  Dictionary<Adobe_font_metric*> afm_p_dict_;
-  Dictionary<Tex_font_metric*> tfm_p_dict_;  
-  File_path search_path_;
-public:
-  
-  Adobe_font_metric *find_afm (String name);
-  Tex_font_metric *find_tfm (String);
-  Font_metric *find_font (String name);  
-  All_font_metrics (String search_path);
-};
-
-
-
-
-#endif /* ALL_FONTS_HH */
-
index 9f8c4ef0973530709709264d243397b8580f76f3..bd566cf91136ca1d839279928ea1f48dbd67313b 100644 (file)
 #include "lily-guile.hh"
 
 class Atom {
+  Offset off_;
+  friend class Molecule;
+  friend class Paper_outputter;
 public:
   Atom (SCM s);
-  Offset off_;
+
   /*
     SCM expression that (when evaluated) gives a TeX string
 representing a musical notation symbol.  */
   Protected_scm func_;
-  Protected_scm font_;
-
-  /*
-    TODO: move this into the font_ field.
-   */
-  Protected_scm magn_;
+  void fontify (Font_metric*);
 };
 
 
index 2806cb1cc4a749d4c918902b11b1e96929f63046..05aeec680d2073e2a3145c80574cd15d94d1b59f 100644 (file)
 
 #include "item.hh"
 #include "staff-symbol-referencer.hh"
+#include "directional-element.hh"
+
 /**
   The dots to go with a notehead/rest.  A separate class, since they
   are a party in collision resolution.
   */
-class Dots : public Item, public Staff_symbol_referencer
+class Dots : public Item, public Staff_symbol_referencer,
+  public Directional_element
 {
 protected:
   virtual Molecule * do_brew_molecule_p () const;
   virtual void do_post_processing ();
 public:
   int dots_i_;
-  Direction resolve_dir_;
   
   Dots ();
 };
index 13c6aca493ebc8377ca4afb6b0da6b551c637e3d..03152c7be85c7a596000636606ad63b5a5fe11a9 100644 (file)
 #define FONT_METRIC_HH
 
 #include "box.hh"
-/*
-  sigh.  
-
-  signature -> Internal compiler error
-*/
+#include "lily-guile.hh"
 
 struct Character_metric
 {
-  virtual Box dimensions () const=0;
-  virtual ~Character_metric () {}
+  virtual Box dimensions () const;
+  virtual ~Character_metric ();
 };
 
 struct Font_metric
 {
-  virtual Character_metric const *get_char (int ascii, bool warn) const=0;
-  virtual ~Font_metric () {}
+  String name_str_;
+  virtual SCM description () const;
+  virtual Character_metric const *get_char (int ascii, bool warn) const; 
+  virtual ~Font_metric ();
+  virtual Box text_dimension (String) const;
 };
 
 
+struct Scaled_font_metric : public Font_metric
+{
+  Font_metric *orig_l_;
+  int magstep_i_;
+  
+  Scaled_font_metric (Font_metric*, int);
+  virtual SCM description () const;
+  virtual Box text_dimension (String) const;
+};
 
 
 #endif /* FONT_METRIC_HH */
index dfdf39ffbf075f6236051a5fd6054c85fcb509f0..696e5a37391bf787f52865b3b2764b8a08a877d6 100644 (file)
 #include "direction.hh"
 
 SCM ly_str02scm (char const*c);
-SCM ly_ch_C_eval_scm (char const*c);
-SCM ly_symbol (String name);
-String symbol_to_string (SCM);
-SCM ly_set_scm (String name , SCM val);
+SCM ly_eval_str (char const*c);
+SCM ly_symbol2scm (char const *);
+String ly_symbol2string (SCM);
+SCM ly_set_x (String name , SCM val);
 
 SCM ly_append (SCM a, SCM b);
 SCM ly_eval (SCM a);
index 8db92ce5c2b49ce7b71567abc8cd79152e5a6bed..0970b575ddbfe86144a212e3dcc475bd53689a00 100644 (file)
@@ -91,6 +91,7 @@ struct Engraver_group_engraver;
 struct Extender;
 struct Extender_req;
 struct Folded_repeat_iterator;
+struct Font_metric;
 struct General_script_def;
 struct Global_translator;
 struct Grace_align_item;
index e4007af3162be6623a3dde0e7a48f237f8e5b331..b11793cd92ad496c51af84c9bef9d8b3c662eb5e 100644 (file)
@@ -30,17 +30,18 @@ struct Local_key_cautionary_tuple
 /**
   Accidentals which can be different for each octave.
 
-  TODO:
-  update item if Items are removed
-
-  TODO
   
-  figure out private/public
+  TODO
+
+  Make an item for each accidental separately, and make a
+  Accidental_column to group them.
   
  */
+
 class Local_key_item : public Note_head_side, public Staff_symbol_referencer {
   Array<Local_key_cautionary_tuple> accidental_arr_;
 
+  Molecule accidental (int,bool) const;
 public:
   int c0_position_i_;
   Local_key_item ();
index 7d2f0b5cb12260649773fcf65423a5485c03fa7b..f49115097c826d96bb340a99bd081f8f68a8c71f 100644 (file)
@@ -27,20 +27,15 @@ public:
   Lookup (Lookup const&);
 
   Molecule simple_bar (String s, Real w, Paper_def*) const;
-  Molecule accidental (int, bool cautionary) const;
   Molecule afm_find (String, bool warn=true) const;
-  Molecule notehead  (int, String) const;
   Molecule bar (String, Real height, Paper_def*) const;
   Molecule beam (Real, Real, Real) const;
-  Molecule clef (String) const;
   Molecule dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
-  Molecule dots () const;
   Molecule ledger_line (Interval) const;
   Molecule fill (Box b) const;
   Molecule filledbox (Box b) const;  
   Molecule hairpin (Real width, Real height, Real thick, bool decresc, bool continued) const;
   Molecule tuplet_bracket (Real dy, Real dx, Real gap, Real thick,Real height, Direction dir) const;
-  Molecule rest (int, bool outside, String) const;
   Molecule accordion (SCM arg, Real interline_f) const;
   Molecule slur (Array<Offset> controls, Real thick) const;
   Molecule text (String style, String text, Paper_def*) const;
index 2bb82ae41bf1a6da07a2637b3e515549c47302c1..3ee8d6db515e231b4d67a963257dbb18213909fe 100644 (file)
@@ -54,6 +54,7 @@ CL::smobify_self ()                                                   \
   SCM_SETCDR(s,me_p);                                                  \
   scm_protect_object (s);                                              \
                                                                        \
+/* no scm_done_malloc() !  */ \
   do_smobify_self();                                                   \
   return s;                                    \
 }                                              \
@@ -66,7 +67,7 @@ CL::free_smob (SCM ses)                               \
      return 0; \
   SCM_CAR(ses) = SCM_EOL;\
                                        \
-  return sizeof(CL);                           \
+  return 0;\
 }                                              \
 ADD_SCM_INIT_FUNC(CL, CL::init_smobs)\
 
index 9b2650f486f29e80d806aa64b296e5ecebf67ff7..3becb118748a67fbc305a187bc724a648a4a74fb 100644 (file)
@@ -22,6 +22,9 @@ public:
   void flip_around_stem (Direction);
   static int compare (Note_head * const &a, Note_head *const &b) ;
 protected:
+  Molecule make_molecule () const;
+
+  
   virtual Interval do_width () const;
   virtual void do_pre_processing();
   virtual Molecule* do_brew_molecule_p() const;
index 310cfd29d09513eecf93c8ae2686e98ae2d6701e..b3147fb9e6da7d9d4e8c1f6bf456983f9728ef82 100644 (file)
@@ -89,7 +89,7 @@ public:
   static void reset_default_count();
 
   void output_settings (Paper_outputter*) const;
-  Paper_outputter* paper_outputter_p (Paper_stream*, Scope*, String) const;
+
   Paper_stream* paper_stream_p () const;
   String base_output_str () const;
 
index f5c103d0a7da23a2cc5f51444bb54578690c2a63..5a17fb60f9ce37a9d08154dc12c9471a5c130c9d 100644 (file)
@@ -14,6 +14,7 @@
 #include "array.hh"
 #include "string.hh"
 #include "lily-guile.hh"
+#include "protected-scm.hh"
 
 #ifdef __powerpc__
 #include "protected-scm.hh"
 class Paper_outputter
 {
 public:
-  Paper_outputter (Paper_stream *);
-  ~Paper_outputter ();
+  Protected_scm molecules_;
+  SCM last_cons_;
+  Paper_outputter ();
+
+  void dump_onto (Paper_stream *);
+
 
   void output_int_def (String k, int v);
   void output_Real_def (String k, Real v);
@@ -39,12 +44,10 @@ public:
   void output_molecule (Molecule const *, Offset, char const *);
   void output_comment (String s);
   void output_scheme (SCM scm);
+
   void start_line (Real height);
   void stop_line ();
   void stop_last_line ();
-  void switch_to_font (String fontname);
-
-  Paper_stream* outstream_l_;
 };
 
 #endif // PAPER_OUTPUTTER_HH
index 5fc62e0ed02a2832e8e51c86498aaa9ac6918457..2dc8ae8c00d3ff5f1d3b75e4612888d29befe4aa 100644 (file)
  */
 class Staff_symbol_referencer : public virtual Score_element
 {
+  int position_i_;
 protected:
   Staff_symbol * staff_sym_l_;
-  int position_i_;
+
 public:
   Staff_symbol_referencer ();
   void set_position (int);
index b1c15a3b95666c517a835527cbd0f3c8828f8a01..7d802d09a80f2c24dc9020bcc9f7e28cbe0443c8 100644 (file)
 class Tex_font_metric_reader
 {
 public:
-  Tex_font_metric_reader (String name);
-  Tex_font_metric read_tfm ();
+  static Tex_font_metric * read_file (String name);
   
 private:
+  Tex_font_metric_reader (Tex_font_metric *, String name);
+
   Real get_U32_fix_f ();
   Real get_U32_fix_scaled_f ();
   String get_bcpl_str ();
@@ -33,7 +34,7 @@ private:
   Tex_font_char_metric read_char ();
   void read_lig_kern_program (Array<Tfm_ligature>* ligature_arr_p, Array <Tfm_kern>* kern_arr_p);
 
-  Tex_font_metric tfm_;
+  Tex_font_metric *tfm_l_;
   Binary_source_file input_;
 };
 
index b14eea6be702124873e3e9c3e6202bfec45f9e5e..47ebad8434a499a1a6959d1ad2633a5569b1a30c 100644 (file)
@@ -149,7 +149,7 @@ public:
   void clear (int n);
   Character_metric const *get_char (int, bool) const;
   Tex_font_char_metric const &find_ascii (int ascii, bool warn=true) const;
-  void read_file (String name);
+
   String str () const;
 
   Tfm_info info_;
index 39401cb2080de0b519a6d4a94d1cc518abe6c311..fbe2f826b06e77e110728fe5c081c9756bd22052 100644 (file)
@@ -19,9 +19,6 @@
   
  */
 class Time_signature: public Item {
-
-  
-
 protected:
   virtual Molecule*do_brew_molecule_p() const;
 public:
index afe7d20316cd3a0056ca2049fdafa272eb7f79f3..5c11973c2e8a8446725d8d5d4be4d26c7834f87d 100644 (file)
@@ -30,9 +30,6 @@ protected:
   virtual void do_post_move_processing();
 
 public:
-  /// how long is one beat?
-  Moment one_beat_;
-
   /// JUNKME
   int bars_i () const;
 
index f69786091b5e72c51119b8268495620f0970bc3a..d477f006209be7b918d5a54da88eff7dc7577f97 100644 (file)
@@ -93,7 +93,7 @@ Key_engraver::acknowledge_element (Score_element_info info)
       if (!def)
        {
          item_p_->set_elt_property ("visibility-lambda",
-                                   ly_ch_C_eval_scm ("all-visibility"));
+                                   ly_eval_str ("all-visibility"));
        }
     }
 
index f85303ff71956cca1a4caae7cf182ad6545d8481..7b7631fe9afeffd6ee9466beefe21e7941a10d1a 100644 (file)
@@ -113,7 +113,8 @@ Key_item::do_brew_molecule_p() const
              || (old_pitch_arr_[i] == pitch_arr_[j]
                  && old_acc_arr_[i] != acc_arr_[j]))
             {
-              Molecule m =lookup_l ()->accidental (0,false);
+              Molecule m =lookup_l ()->afm_find ("accidentals-0");
+
               m.translate_axis (calculate_position(old_pitch_arr_[i], old_acc_arr_[i]) * inter, Y_AXIS);
               output->add_at_edge (X_AXIS, RIGHT, m,0);        
             }
@@ -132,7 +133,7 @@ Key_item::do_brew_molecule_p() const
  
   for (int i =0; i < pitch_arr_.size(); i++) 
     {
-      Molecule m =lookup_l ()->accidental (acc_arr_[i],false);
+      Molecule m = lookup_l ()->afm_find ("accidentals-" + to_str (acc_arr_[i]));
       m.translate_axis (calculate_position(pitch_arr_[i], acc_arr_[i]) * inter, Y_AXIS);
       output->add_at_edge (X_AXIS, RIGHT, m, 0);
     }
index bc93f1704427912e9fe2c025e8cf10d167711977..1e2b30c27618bbd6ac53f1bc4063317bbb40d17e 100644 (file)
@@ -5,8 +5,6 @@
 
   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
-  TODO
-  transposition.
 */
 
 #include "key.hh"
index 2ecad9547a20e99047a504fd8c41d996f606d6b9..20f470b0bd274d327e7327f067516a6140150333 100644 (file)
@@ -27,7 +27,7 @@ ly_str02scm (char const*c)
 }
 
 SCM
-ly_ch_C_eval_scm (char const*c)
+ly_eval_str (char const*c)
 {
   // this all really sucks, guile should take char const* arguments!
   return gh_eval_str ((char*)c);
@@ -92,38 +92,34 @@ ly_parse_scm (char const* s, int* n)
 /*
   scm_m_quote doesn't use any env, but needs one for a good signature in GUILE.
 */
-
+// apparently env arg is ignored.
 SCM
 ly_quote_scm (SCM s)
 {
-  return scm_m_quote (scm_cons2 (SCM_EOL, s, SCM_EOL) ,SCM_EOL); // apparently env arg is ignored.
+  return scm_m_quote (scm_cons2 (SCM_EOL, s, SCM_EOL) ,SCM_EOL);
 }
 
-/*
-  See: libguile/symbols.c
 
-  SCM
-  scm_string_to_symbol(s)
-  
-*/
 SCM
-ly_symbol (String name)
+ly_symbol2scm(const char *s)
 {
-  return gh_symbol2scm ((char*)name.ch_C());
+  return gh_symbol2scm ((char *)s);
 }
 
 String
-symbol_to_string (SCM s)
+ly_symbol2string (SCM s)
 {
   return String((Byte*)SCM_CHARS (s), (int) SCM_LENGTH(s));
 }
 
+#if 0
 SCM
-ly_set_scm (String name, SCM val)
+ly_set_x (String name, SCM val)
 {
   return scm_sysintern ((char*)name.ch_C(), val);
   
 }
+#endif
 
 /**
    Read a file, and shove it down GUILE.  GUILE also has file read
@@ -146,7 +142,7 @@ read_lily_scm_file (String fn)
 
   Simple_file_storage f(s);
   
-  ly_ch_C_eval_scm ((char *) f.ch_C());
+  ly_eval_str ((char *) f.ch_C());
   *mlog << "]" << flush;  
 }
 
@@ -168,7 +164,9 @@ ly_gulp_file (SCM name)
 
 
   Simple_file_storage f(s);
-  return ly_str02scm (f.ch_C());
+  SCM result = ly_str02scm (f.ch_C());
+  *mlog << "]";
+  return result;
 }
 
 void
index 6e35416a1896982813cdf3a32df6bb802decd76c..479fc4ba1d821d55abf586a9d2012298e9a4e080 100644 (file)
@@ -33,6 +33,7 @@ Local_key_item::add_pitch (Musical_pitch p, bool cautionary)
 }
 
 
+
 void
 Local_key_item::do_pre_processing()
 {
@@ -40,6 +41,21 @@ Local_key_item::do_pre_processing()
   Note_head_side::do_pre_processing ();
 }
 
+Molecule
+Local_key_item::accidental (int j, bool cautionary) const
+{
+  Molecule m (lookup_l ()->afm_find (String ("accidentals-") + to_str (j)));
+  if (cautionary) 
+    {
+      Molecule open = lookup_l ()->afm_find (String ("accidentals-("));
+      Molecule close = lookup_l ()->afm_find (String ("accidentals-)"));
+      m.add_at_edge(X_AXIS, LEFT, Molecule(open), 0);
+      m.add_at_edge(X_AXIS, RIGHT, Molecule(close), 0);
+    }
+  
+  return m;
+}
+
 Molecule*
 Local_key_item::do_brew_molecule_p() const
 {
@@ -68,8 +84,8 @@ Local_key_item::do_brew_molecule_p() const
       Real dy =
        (c0_position_i_ + p.notename_i_)
        * note_distance;
-      Molecule m (lookup_l ()->accidental (p.accidental_i_, 
-                                          accidental_arr_[i].cautionary_b_));
+      
+      Molecule m (accidental (p.accidental_i_, accidental_arr_[i].cautionary_b_));
 
       m.translate_axis (dy, Y_AXIS);
       octave_mol_p->add_at_edge (X_AXIS, RIGHT, m, 0);
index 1b7c19e11640de37682c28053ac6199de3a33161..35bdc323a3883c39e9e3a3d7f8123725dbb4f4b5 100644 (file)
@@ -21,7 +21,7 @@
 #include "file-path.hh"
 #include "main.hh"
 #include "lily-guile.hh"
-#include "all-fonts.hh"
+#include "all-font-metrics.hh"
 #include "afm.hh"
 #include "scope.hh"
 #include "molecule.hh"
@@ -75,20 +75,6 @@ Lookup::ledger_line (Interval xwid) const
 }
 
 
-Molecule
-Lookup::accidental (int j, bool cautionary) const
-{
-  Molecule m(afm_find (String ("accidentals-") + to_str (j)));
-  if (cautionary) 
-    {
-      Molecule open = afm_find (String ("accidentals-("));
-      Molecule close = afm_find (String ("accidentals-)"));
-      m.add_at_edge(X_AXIS, LEFT, Molecule(open), 0);
-      m.add_at_edge(X_AXIS, RIGHT, Molecule(close), 0);
-    }
-  return m;
-}
-
 
 
 Molecule
@@ -116,32 +102,20 @@ Lookup::afm_find (String s, bool warn) const
       return m;
     }
   
-  Atom at (gh_list (gh_symbol2scm ("char"),
+  Atom at (gh_list (ly_symbol2scm ("char"),
                    gh_int2scm (cm.code ()),
                    SCM_UNDEFINED));
-  at.font_ = ly_symbol (font_name_.ch_C());
-  at.magn_ = gh_int2scm (0);
-  
+
+  at.fontify (afm_l_);
   m.dim_ = cm.dimensions();
   m.add_atom (&at);
   return m;
 }
 
-Molecule
-Lookup::notehead (int j, String type) const
-{
-  if (j > 2)
-    j = 2;
-  if (type == "harmonic" || type == "cross")
-    j = 2;
-
-  return afm_find (String ("noteheads-") + to_str (j) + type);
-}
-
 Molecule
 Lookup::simple_bar (String type, Real h, Paper_def* paper_l) const
 {
-  SCM thick = ly_symbol ("barthick_" + type);
+  SCM thick = ly_symbol2scm (("barthick_" + type).ch_C());
   Real w = 0.0;
   
   if (paper_l->scope_p_->elem_b (thick))
@@ -241,7 +215,7 @@ Lookup::beam (Real slope, Real width, Real thick) const
   
   Molecule m;
   Atom at
-    (gh_list (gh_symbol2scm ("beam"),
+    (gh_list (ly_symbol2scm ("beam"),
              gh_double2scm (width),
              gh_double2scm (slope),
              gh_double2scm (thick),
@@ -253,12 +227,6 @@ Lookup::beam (Real slope, Real width, Real thick) const
   return m;
 }
 
-Molecule
-Lookup::clef (String st) const
-{
-  return afm_find (String ("clefs-" + st));
-}
-
 SCM
 offset2scm (Offset o)
 {
@@ -288,7 +256,7 @@ Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
     }
 
   Atom at
-    (gh_list (gh_symbol2scm ("dashed-slur"),
+    (gh_list (ly_symbol2scm ("dashed-slur"),
              gh_double2scm (thick), 
              gh_double2scm (dash),
              ly_quote_scm (array_to_list (sc, 4)),
@@ -299,11 +267,6 @@ Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
   return m;
 }
 
-Molecule
-Lookup::dots () const
-{
-  return afm_find (String ("dots-dot"));
-}
 
 
 
@@ -315,11 +278,6 @@ Lookup::fill (Box b) const
   return m;
 }
 
-Molecule
-Lookup::rest (int j, bool o, String style) const
-{
-  return afm_find (String ("rests-") + to_str (j) + (o ? "o" : "") + style);
-}
 
 
 Molecule
@@ -346,7 +304,7 @@ Lookup::filledbox (Box b ) const
 {
   Molecule m;
   
-  Atom at  (gh_list (gh_symbol2scm ("filledbox"),
+  Atom at  (gh_list (ly_symbol2scm ("filledbox"),
                     gh_double2scm (-b[X_AXIS][LEFT]),
                     gh_double2scm (b[X_AXIS][RIGHT]),                 
                     gh_double2scm (-b[Y_AXIS][DOWN]),
@@ -358,16 +316,52 @@ Lookup::filledbox (Box b ) const
   return m;
 }
 
+/*
+   TODO: THIS IS UGLY.  Since the user has direct access to TeX
+   strings, we try some halfbaked attempt to detect TeX trickery.
+ */
+String
+sanitise_TeX_string (String text)
+{
+  int brace_count =0;
+  for (int i= 0; i < text.length_i (); i++)
+    {
+      if (text[i] == '\\')
+       continue;
+      
+      if (text[i] == '{')
+       brace_count ++;
+      else if (text[i] == '}')
+       brace_count --;
+    }
+  
+  if(brace_count)
+    {
+      warning (_f ("Non-matching braces in text `%s', adding braces", text.ch_C()));
 
+      if (brace_count < 0)
+       {
+         text = to_str ('{', -brace_count) + text;
+       }
+      else 
+       {
+         text = text + to_str ('}', brace_count);
+       }
+    }
+    
+  return text;
+}
 
 /**
-   Magnification steps.  These are powers of 1.2. The numbers are
- taken from Knuth's plain.tex: */
-
+   TODO!
+ */
+String
+sanitise_PS_string (String t)
+{
+  return t;
+}
 
 /**
-   TODO: THIS IS UGLY.  Since the user has direct access to TeX
-   strings, we try some halfbaked attempt to detect TeX trickery.
 
 */
 Molecule
@@ -385,86 +379,49 @@ Lookup::text (String style, String text, Paper_def *paper_l) const
     }
 
 
-  Real realmag = 1.0;
   if (paper_l->scope_p_->elem_b ("magnification_" + style))
     {
       font_mag = (int)paper_l->get_var ("magnification_" + style);
-      realmag = pow (1.2, font_mag);
     }
 
   /*
     UGH.
   */
-  SCM l = ly_ch_C_eval_scm (("(style-to-cmr \"" + style + "\")").ch_C());
+  SCM l = ly_eval_str (("(style-to-cmr \"" + style + "\")").ch_C());
   if (l != SCM_BOOL_F)
     {
       style = ly_scm2string (gh_cdr(l)) +to_str  ((int)font_h);
     }
 
-  Real w = 0;
-  Interval ydims (0,0);
-
-  Font_metric* afm_l = all_fonts_global_p->find_font (style);
-  DEBUG_OUT << "\nChars: ";
-
-
-  int brace_count =0;
-  for (int i = 0; i < text.length_i (); i++) 
-    {
-      
-      if (text[i]=='\\') 
-       {
-         for (i++; (i < text.length_i ()) && isalpha(text[i]); i++)
-           ;
-         i--; // Compensate for the increment in the outer loop!
-       }
-      else
-       {
-         if (text[i] == '{')
-           brace_count ++;
-         else if (text[i] == '}')
-           brace_count --;
-          Character_metric *c = (Character_metric*)afm_l->
-           get_char ((unsigned char)text[i],false);
-
-         // Ugh, use the width of 'x' for unknown characters
-         if (c->dimensions()[X_AXIS].length () == 0) 
-           c = (Character_metric*)afm_l->get_char ((unsigned char)'x',false);
-         w += c->dimensions()[X_AXIS].length ();
-         ydims.unite (c->dimensions()[Y_AXIS]);
-       }
-    }
-
-  if(brace_count)
-    {
-      warning (_f ("Non-matching braces in text `%s', adding braces", text.ch_C()));
-
-      if (brace_count < 0)
-       {
-         text = to_str ('{', -brace_count) + text;
-       }
-      else 
-       {
-         text = text + to_str ('}', brace_count);
-       }
-    }
+  
 
-  ydims *= realmag;
-  m.dim_.x () = Interval (0, w*realmag);
-  m.dim_.y () = ydims;
+  Font_metric* metric_l = 0;
 
+  if (font_mag)
+    metric_l = all_fonts_global_p->find_scaled (style, font_mag);
+  else
+    metric_l = all_fonts_global_p->find_font (style);
   
-  Atom at  (gh_list (gh_symbol2scm ("text"),
+  
+  if (output_global_ch == "tex")
+    text = sanitise_TeX_string  (text);
+  else if (output_global_ch == "ps")
+    text = sanitise_PS_string (text);
+    
+  m.dim_ = metric_l->text_dimension (text);
+  
+  Atom at  (gh_list (ly_symbol2scm ("text"),
                     ly_str02scm (text.ch_C()),
                     SCM_UNDEFINED));
-  at.font_ = ly_symbol (style);
-  at.magn_ = gh_int2scm (font_mag);
+  at.fontify (metric_l);
   
   m.add_atom (&at);
   return m;
 }
   
 
+
+
 Molecule
 Lookup::time_signature (int num, int den, Paper_def *paper_l) const
 {
@@ -509,11 +466,13 @@ Lookup::staff_brace (Real y, int staff_size) const
   int maxht = 7 *  minht;
   int idx = int (((maxht - step) <? y - minht) / step);
   idx = idx >? 0;
-  
-  SCM f =  ly_symbol (String ("feta-braces" + to_str (staff_size)));
-  SCM e =gh_list (gh_symbol2scm ("char"), gh_int2scm (idx), SCM_UNDEFINED);
+
+
+  String nm = String ("feta-braces" + to_str (staff_size));
+  SCM e =gh_list (ly_symbol2scm ("char"), gh_int2scm (idx), SCM_UNDEFINED);
   Atom at  (e);
-  at.font_ = f;
+
+  at.fontify (all_fonts_global_p->find_font (nm));
   
   m.dim_[Y_AXIS] = Interval (-y/2,y/2);
   m.dim_[X_AXIS] = Interval (0,0);
@@ -526,8 +485,8 @@ Lookup::hairpin (Real width, Real height, Real thick, bool decresc, bool continu
 {
   Molecule m;   
 
-  String hairpin = String (decresc ? "de" : "") + "crescendo";
-  Atom at  (gh_list (ly_symbol (hairpin),
+  const char* hairpin = decresc ? "decrescendo" :  "crescendo";
+  Atom at  (gh_list (ly_symbol2scm (hairpin),
                     gh_double2scm (thick),
                     gh_double2scm (width),
                     gh_double2scm (height),
@@ -546,7 +505,7 @@ Lookup::tuplet_bracket (Real dy , Real dx, Real thick, Real gap,
 {
   Molecule m;
 
-  Atom at  (gh_list(gh_symbol2scm ("tuplet"),
+  Atom at  (gh_list(ly_symbol2scm ("tuplet"),
                    gh_double2scm (height),
                    gh_double2scm (gap),
                    gh_double2scm (dx),
@@ -575,7 +534,7 @@ Lookup::slur (Array<Offset> controls, Real linethick) const
     scontrols[i] = offset2scm (controls[indices[i]]);
 
 
-  Atom at  (gh_list (ly_symbol ("bezier-sandwich"),
+  Atom at  (gh_list (ly_symbol2scm ("bezier-sandwich"),
                     ly_quote_scm (array_to_list (scontrols, 8)),
                     gh_double2scm (linethick),
                     SCM_UNDEFINED));
@@ -590,7 +549,7 @@ Molecule
 Lookup::staff_bracket (Real height, Paper_def* paper_l) const
 {
   Molecule m;
-  Atom at  ( gh_list (gh_symbol2scm ("bracket"),
+  Atom at  ( gh_list (ly_symbol2scm ("bracket"),
                      gh_double2scm (paper_l->get_var("bracket_arch_angle")),
                      gh_double2scm (paper_l->get_var("bracket_arch_width")),
                      gh_double2scm (paper_l->get_var("bracket_arch_height")),
@@ -613,7 +572,7 @@ Lookup::volta (Real h, Real w, Real thick, bool vert_start, bool vert_end) const
 {
   Molecule m; 
 
-  Atom at  (gh_list (gh_symbol2scm ("volta"),
+  Atom at  (gh_list (ly_symbol2scm ("volta"),
                     gh_double2scm (h),
                     gh_double2scm (w),
                     gh_double2scm (thick),
index c4062cb1a40df72c39e7146b9d65bea1971a6b5f..246e763587dedb250b34d6b4a411b51395ecce3d 100644 (file)
@@ -13,7 +13,7 @@
 #include "lily-guile.hh"
 #include "lily-version.hh"
 
-#include "all-fonts.hh"
+#include "all-font-metrics.hh"
 #include "proto.hh"
 #include "dimensions.hh"
 #include "getopt-long.hh"
index 17da3985e1425673e0e393c7207f73b83224067b..e00947c9ab4100c53ba4b94ab68b26c3d8bd71b4 100644 (file)
@@ -18,7 +18,7 @@ Mark_engraver::Mark_engraver ()
   mark_req_l_ = 0;
   axis_ = Y_AXIS;
   type_ = "mark";
-  visibility_lambda_ = ly_ch_C_eval_scm ("mark-visibility");
+  visibility_lambda_ = ly_eval_str ("mark-visibility");
 }
 
 void
index 95f7040bc78f5238f3ecca2ebf095a99640877ce..8dbfec3c8329999f7620f1c443c583c040d1ac49 100644 (file)
@@ -82,13 +82,15 @@ Multi_measure_rest::do_brew_molecule_p () const
     }
   else if (measures_i_ == 1 || measures_i_ == 2 || measures_i_ == 4) 
     {
-      s = lookup_l ()->rest (- intlog2(measures_i_), 0, "");
+      s = lookup_l ()->afm_find ("rests-" + to_str (- intlog2(measures_i_)));
       s.translate_axis (-s.extent ()[X_AXIS].length () / 2, X_AXIS);
     }
   else 
     {
-      s = lookup_l ()->rest (-4, 0, "");
+      String idx =  ("rests-") + to_str (-4);
+      s = lookup_l ()->afm_find (idx);
     }
+  
   mol_p->add_molecule (s);
   Real interline_f = staff_line_leading_f ();
   if (measures_i_ == 1 && rest_symbol)
index 0ec89648886b12d6f20354c48d0b1aa366a78790..b271010fd79048586146ec49f68f5ce46e73246c 100644 (file)
@@ -67,7 +67,6 @@ static Keyword_ent the_key_tab[]={
   {"addlyrics", ADDLYRICS},
   {"score", SCORE},
   {"script", SCRIPT},
-  {"shape", SHAPE},
   {"skip", SKIP},
   {"textscript", TEXTSCRIPT},
   {"tempo", TEMPO},
@@ -97,7 +96,7 @@ My_lily_lexer::lookup_keyword (String s)
 Identifier*
 My_lily_lexer::lookup_identifier (String s)
 {
-  SCM sym = ly_symbol (s.ch_C());
+  SCM sym = ly_symbol2scm (s.ch_C());
   
   for (int i = scope_l_arr_.size (); i--; )
     if (scope_l_arr_[i]->elem_b (sym))
index a8ee5f3f9a66a35102bd17e11616f7bdba8c75fc..f8e9195607db8d576ef0cfd11cf07ab1e48c61a9 100644 (file)
@@ -29,11 +29,23 @@ void
 Note_head::do_pre_processing ()
 {
   Rhythmic_head::do_pre_processing ();
+
   // 8 ball looks the same as 4 ball:
-  if (balltype_i_ > 2)
+  String type; 
+  SCM style  = get_elt_property ("style");
+  if (style != SCM_UNDEFINED)
+    {
+      type = ly_scm2string (style);
+    }
+  
+  
+  if (balltype_i_ > 2 || type == "harmonic" || type == "cross")
     balltype_i_ = 2;
+
   if (dots_l_)                 // move into Rhythmic_head?
     dots_l_->set_position(int (position_f ()));
+
 }
 
 
@@ -50,9 +62,21 @@ Note_head::compare (Note_head *const  &a, Note_head * const &b)
 Interval
 Note_head::do_width () const
 {
-  Molecule a =  lookup_l ()->notehead (balltype_i_, ""); // UGH
-  Interval i = a.dim_[X_AXIS];
-  return i;
+  return make_molecule ().dim_[X_AXIS];
+}
+
+Molecule
+Note_head::make_molecule () const
+{
+  String type; 
+  SCM style  = get_elt_property ("style");
+  if (style != SCM_UNDEFINED)
+    {
+      type = ly_scm2string (style);
+    }
+  
+  return lookup_l()->afm_find (String ("noteheads-")
+                              + to_str (balltype_i_) + type);
 }
 
 Molecule*
@@ -63,17 +87,9 @@ Note_head::do_brew_molecule_p() const
 
   int streepjes_i = abs (position_f ()) < sz 
     ? 0
-    : (abs(position_f ()) - sz) /2;
-
+    : (abs((int)position_f ()) - sz) /2;
 
-  String type; 
-  SCM style  = get_elt_property ("style");
-  if (style != SCM_UNDEFINED)
-    {
-      type = ly_scm2string (style);
-    }
-  
-  Molecule*  out = new Molecule (lookup_l()->notehead (balltype_i_, type));
+  Molecule*  out =  new Molecule (make_molecule ());
 
   Box b = out->dim_;
 
index 3ce360fed0d0417a1baf9f56827c1e2c91f1b6c1..c3640041517798a49a612fb5f937a4ca74072641 100644 (file)
@@ -69,13 +69,6 @@ Note_heads_engraver::do_process_requests()
          Dots * d = new Dots;
          note_p->dots_l_ = d;
          d->dots_i_ = note_req_l->duration_.dots_i_;
-
-         SCM dir = get_property ("verticalDirection",0);
-         if (isdir_b (dir))
-           {
-             d->resolve_dir_ = to_dir (dir);
-           }
-         
          announce_element (Score_element_info (d,0));
          dot_p_arr_.push (d);
        }
index 39b8fcf16545e94a60a64da78a206be0b4ae52c3..eb209453def09d5b610567b7ace6f1c8b21e13a5 100644 (file)
@@ -7,6 +7,7 @@
 */
 
 #include <math.h>
+#include "all-font-metrics.hh"
 #include "string.hh"
 #include "misc.hh"
 #include "paper-def.hh"
@@ -58,14 +59,14 @@ Paper_def::Paper_def (Paper_def const&s)
 Real
 Paper_def::get_var (String s) const
 {
-  return get_realvar (ly_symbol (s));
+  return get_realvar (ly_symbol2scm (s.ch_C()));
 }
 
 Real
 Paper_def::get_realvar (SCM s) const
 {
   if (!scope_p_->elem_b (s))
-    error (_f ("unknown paper variable: `%s'", symbol_to_string (s)));
+    error (_f ("unknown paper variable: `%s'", ly_symbol2string (s)));
   Real * p = scope_p_->elem (s)->access_content_Real (false);
   if (!p)
     {
@@ -76,23 +77,37 @@ Paper_def::get_realvar (SCM s) const
   return *p;
 }
 
+
 Interval
 Paper_def::line_dimensions_int (int n) const
 {
-  if (!shape_int_a_.size ())
+  SCM s = default_properties_ [ly_symbol2scm ("margin-shape")];
+  if (!gh_pair_p (s))
     {
       Real lw =  get_var ("linewidth");
       Real ind = n? 0.0:get_var ("indent");
 
       return Interval (ind, lw);
     }
-  
-  if (n >= shape_int_a_.size ())
-    n = shape_int_a_.size () -1;
 
-  return shape_int_a_[n];
-}
+  SCM last = SCM_EOL;
+  while (gh_pair_p (s) && n --)
+    {
+      last = s;
+      s = gh_cdr (s);
+    }
 
+  if (s == SCM_EOL)
+    {
+      s = last;
+    }
+
+  SCM pair = gh_car (s);
+  
+  return Interval (gh_scm2double (gh_car (pair)),
+                  gh_scm2double (gh_cdr (pair)));
+}
 
 Real
 Paper_def::length_mom_to_dist (Moment d,Real k) const
@@ -181,33 +196,6 @@ Paper_def::reset_default_count()
   default_count_i_ = 0;
 }
 
-Paper_outputter*
-Paper_def::paper_outputter_p (Paper_stream* os_p, Scope* header_l, String origin_str) const
-{
-  Paper_outputter* p = new Paper_outputter (os_p);
-
-  // for now; breaks -fscm output
-  p->output_comment (_ ("Outputting Score, defined at: "));
-  p->output_comment (origin_str);
-
-  p->output_version();
-  if (header_global_p)
-    p->output_scope (header_global_p, "mudela");
-  if (header_l)
-    p->output_scope (header_l, "mudela");
-  if (scope_p_)
-    p->output_scope (scope_p_, "mudelapaper");
-  
-
-  //  *p->outstream_l_  << *scope_p_->elem (String (output_global_ch) + "setting")->access_content_String (false);
-
-  SCM scm = gh_list (ly_symbol ("experimental-on"), SCM_UNDEFINED);
-  p->output_scheme (scm);
-  scm = gh_list (ly_symbol ("header-end"), SCM_UNDEFINED);
-  p->output_scheme (scm);
-
-  return p;
-}
 
 Paper_stream*
 Paper_def::paper_stream_p () const
index 14316cad02ffe988354719563f33fca8b51db90d..293475c0d6851b0f0b74ed80840ff33a21a2d80a 100644 (file)
 #include "lily-version.hh"
 #include "atom.hh"
 
-Paper_outputter::Paper_outputter (Paper_stream *s)
+Paper_outputter::Paper_outputter ()
 {
-  outstream_l_ = s;
-  output_header ();
-
-  if (output_global_ch == String ("scm"))
-    *outstream_l_->os << ""
-      "(primitive-load-path 'lily.scm)\n"
-      "(eval (tex-scm 'all-definitions))\n"
-      ";(eval (ps-scm 'all-definitions))\n"
-      "(display (map (lambda (x) (string-append (eval x) \"\\n\")) '(\n"
-    ;
+  molecules_ = gh_cons (SCM_EOL, SCM_EOL);
+  last_cons_ = molecules_;
 }
 
-Paper_outputter::~Paper_outputter ()
-{
-  SCM scm = gh_list (ly_symbol ("end-output"), SCM_UNDEFINED);
-  output_scheme (scm);
-
-  if (String (output_global_ch) == "scm")
-    {
-      *outstream_l_->os << ")))";
-    }
-}
 
 void
 Paper_outputter::output_header ()
 {
   if (safe_global_b)
     {
-      ly_set_scm ("security-paranoia", SCM_BOOL_T);
-      //      ly_ch_C_eval_scm ("(set! security-paranoia #t)");
+      //      ly_set_x ("security-paranoia", SCM_BOOL_T);
+      gh_define ("security-paranoia", SCM_BOOL_T);      
     }
   String s = String ("(eval (") + output_global_ch + "-scm 'all-definitions))";
-  ly_ch_C_eval_scm (s.ch_C ());
+  ly_eval_str (s.ch_C ());
   
   String creator;
   if (no_timestamps_global_b)
@@ -83,42 +65,23 @@ Paper_outputter::output_header ()
     gh_list (ly_str02scm (creator.ch_l ()),
             ly_str02scm (generate.ch_l ()), SCM_UNDEFINED);
 
-#ifndef NPRINT
-  DEBUG_OUT << "output_header\n";
-  if (flower_dstream && !flower_dstream->silent_b ("Guile"))
-    {
-      gh_display (args_scm); gh_newline ();
-    }
-#endif
 
-  SCM scm = gh_cons (gh_symbol2scm ("header"), args_scm);
+  SCM scm = gh_cons (ly_symbol2scm ("header"), args_scm);
   output_scheme (scm);
 }
 
 void
 Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm)
 {
-  if (flower_dstream)
-    *outstream_l_ << String ("\n%start: ") << nm << "\n";
-
-
   if (flower_dstream)
     {
       output_comment (nm);
     }
       
-#ifdef ATOM_SMOB
-  for (SCM ptr = m->atom_list_; ptr != SCM_EOL; ptr = SCM_CDR(ptr))
-    {
-      Atom *i = Atom::atom_l (SCM_CAR(ptr));
-#else
   for (Cons<Atom> *ptr = m->atom_list_; ptr; ptr = ptr->next_)
     {
       Atom * i = ptr->car_;
-#endif
-#if 0
-    }
-#endif      
+
       Offset a_off = i->off_;
       a_off += o;
 
@@ -137,21 +100,13 @@ Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm)
            }
        }
        
-      if (i->font_)
-       {
-         output_scheme (gh_list (ly_symbol ("select-font"),
-                                 ly_str02scm (symbol_to_string (i->font_).ch_C()),
-                                 SCM (i->magn_),
-                                 SCM_UNDEFINED));
-       }
-
       SCM box_scm
-       = gh_list (gh_symbol2scm ("placebox"),
+       = gh_list (ly_symbol2scm ("placebox"),
                   gh_double2scm (a_off.x ()),
                   gh_double2scm (a_off.y ()),
                   SCM(i->func_),
                   SCM_UNDEFINED);
-      
+
       output_scheme (box_scm);
     }
 }
@@ -159,32 +114,58 @@ Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm)
 void
 Paper_outputter::output_comment (String str)
 {
-  if (String (output_global_ch) == "scm")
-    {
-      *outstream_l_ << "; " << str << "\n";
-    }
-  else
-    {
-      *outstream_l_ << "% " << str << "\n";
-    }
+  output_scheme (gh_list (ly_symbol2scm ("comment"),
+                         ly_str02scm ((char*)str.ch_C()),
+                         SCM_UNDEFINED)
+                );
 }
 
 
 void
 Paper_outputter::output_scheme (SCM scm)
 {
-  if (String (output_global_ch) == "scm")
+  SCM c = gh_cons (scm,gh_cdr (last_cons_));
+  gh_set_cdr_x(last_cons_, c);
+  last_cons_ = c;
+}
+
+
+void
+Paper_outputter::dump_onto (Paper_stream *os)
+{
+  
+  if (output_global_ch == String ("scm"))
+    *os << ""
+      "(primitive-load-path 'lily.scm)\n"
+      "(eval (tex-scm 'all-definitions))\n"
+      ";(eval (ps-scm 'all-definitions))\n"
+      "(display (map (lambda (x) (string-append (eval x) \"\\n\")) '(\n"
+    ;
+
+  for (SCM s = gh_cdr (molecules_); gh_pair_p (s); s = gh_cdr (s))
     {
-      SCM result =  scm_eval (scm_listify (ly_symbol ("scm->string"), ly_quote_scm (scm), SCM_UNDEFINED));
-    *outstream_l_->os << ly_scm2string (result)        << endl;
+      if (String (output_global_ch) == "scm")
+       {
+         SCM result =  scm_eval (scm_listify (ly_symbol2scm ("scm->string"),
+                                              ly_quote_scm (gh_car (s)), SCM_UNDEFINED));
+         
+         *os << ly_scm2string (result);
+       }
+      else
+       {
+         SCM result = scm_eval (gh_car (s));
+         char *c=gh_scm2newstr (result, NULL);
+         
+         *os << c;
+         free (c);
+       }
+
     }
-  else
-    {
-      SCM result = scm_eval (scm);
-      char *c=gh_scm2newstr (result, NULL);
 
-      *outstream_l_ << c;
-      free (c);
+
+  if (String (output_global_ch) == "scm")
+    {
+      *os << ")))";
     }
 }
 
@@ -235,7 +216,7 @@ Paper_outputter::start_line (Real height)
       programming_error ("Improbable system height");
       height = 50 CM;
     }
-  SCM scm = gh_list (ly_symbol ("start-line"),
+  SCM scm = gh_list (ly_symbol2scm ("start-line"),
                     gh_double2scm (height),
                     SCM_UNDEFINED);
   output_scheme (scm);
@@ -244,7 +225,7 @@ Paper_outputter::start_line (Real height)
 void
 Paper_outputter::output_font_def (int i, String str)
 {
-  SCM scm = gh_list (ly_symbol ("font-def"),
+  SCM scm = gh_list (ly_symbol2scm ("font-def"),
                     gh_int2scm (i),
                     ly_str02scm (str.ch_l ()),
                     SCM_UNDEFINED);
@@ -256,7 +237,7 @@ void
 Paper_outputter::output_Real_def (String k, Real v)
 {
   
-  SCM scm = gh_list (ly_symbol ("lily-def"),
+  SCM scm = gh_list (ly_symbol2scm ("lily-def"),
                     ly_str02scm (k.ch_l ()),
                     ly_str02scm (to_str(v).ch_l ()),
                     SCM_UNDEFINED);
@@ -269,7 +250,7 @@ void
 Paper_outputter::output_String_def (String k, String v)
 {
   
-  SCM scm = gh_list (ly_symbol ("lily-def"),
+  SCM scm = gh_list (ly_symbol2scm ("lily-def"),
                     ly_str02scm (k.ch_l ()),
                     ly_str02scm (v.ch_l ()),
                     SCM_UNDEFINED);
@@ -281,7 +262,7 @@ Paper_outputter::output_String_def (String k, String v)
 void
 Paper_outputter::output_int_def (String k, int v)
 {
-  SCM scm = gh_list (ly_symbol ("lily-def"),
+  SCM scm = gh_list (ly_symbol2scm ("lily-def"),
                     ly_str02scm (k.ch_l ()),
                     ly_str02scm (to_str (v).ch_l ()),
                     SCM_UNDEFINED);
@@ -295,14 +276,17 @@ Paper_outputter::output_int_def (String k, int v)
 void
 Paper_outputter::stop_line ()
 {
-  SCM scm = gh_list (ly_symbol ("stop-line"), SCM_UNDEFINED);
+  SCM scm = gh_list (ly_symbol2scm ("stop-line"), SCM_UNDEFINED);
   output_scheme (scm);
 }
 
 void
 Paper_outputter::stop_last_line ()
 {
-  SCM scm = gh_list (ly_symbol ("stop-last-line"), SCM_UNDEFINED);
+  SCM scm = gh_list (ly_symbol2scm ("stop-last-line"), SCM_UNDEFINED);
+  output_scheme (scm);
+  scm = gh_list (ly_symbol2scm ("end-output"), SCM_UNDEFINED);
   output_scheme (scm);
 }
 
+
index 12eacc30711decddc2025d5c4aec57dbe471910e..e51b01cef39b821803337c41b1a4760dd6d81650 100644 (file)
@@ -21,6 +21,7 @@
 #include "paper-outputter.hh"
 #include "file-results.hh"
 #include "misc.hh"
+#include "all-font-metrics.hh"
 
 Paper_score::Paper_score ()
 {
@@ -109,10 +110,6 @@ Paper_score::calc_breaking ()
 void
 Paper_score::process ()
 {
-  Dictionary<int> type_stats;
-  type_stats["Item"] =0;
-  type_stats["Spanner"] =0;
-  type_stats["Total"]=0;
 
   print ();
   *mlog << _ ("Preprocessing elements...") << " " << flush;
@@ -125,9 +122,38 @@ Paper_score::process ()
   Array<Column_x_positions> breaking = calc_breaking ();
 
 
-  Paper_stream* paper_stream_p = paper_l_->paper_stream_p ();
-  outputter_l_ = paper_l_->paper_outputter_p (paper_stream_p, header_l_, origin_str_);
+  outputter_l_ = new Paper_outputter ;
+  outputter_l_->output_header ();
 
+  outputter_l_->output_version();
+  
+  if (header_global_p)
+    outputter_l_->output_scope (header_global_p, "mudela");
+  if (header_l_)
+    outputter_l_->output_scope (header_l_, "mudela");
+
+  outputter_l_->output_comment (_ ("Outputting Score, defined at: "));
+  outputter_l_->output_comment (origin_str_);
+
+  if (paper_l_->scope_p_)
+    outputter_l_->output_scope (paper_l_->scope_p_, "mudelapaper");
+  
+  SCM scm = gh_list (ly_symbol2scm ("experimental-on"), SCM_UNDEFINED);
+  outputter_l_->output_scheme (scm);
+  scm = gh_list (ly_symbol2scm ("header-end"), SCM_UNDEFINED);
+  outputter_l_->output_scheme (scm);
+
+
+  /*
+    This is tricky: we have to put the font definitions before the
+    actual output, but we don't know all fonts in advanced: generating
+    the output might trigger loading of a new font.  So we store the
+    place to insert the font definitions, generate the output and then
+    insert the definitions
+    
+   */
+  SCM before_output = outputter_l_->last_cons_;
+  
   Link_array<Line_of_score> lines;
   for (int i=0; i < breaking.size (); i++)
     {
@@ -149,28 +175,25 @@ Paper_score::process ()
 
       line_l->post_processing ();
       *mlog << i << flush;
-      line_l->output_all (i + 1 == lines.size());
+      line_l->output_all (i + 1 == lines.size ());
       *mlog << ']' << flush;
-     }
+    }
+
+  SCM font_names = ly_quote_scm (all_fonts_global_p->font_descriptions ());
+  gh_set_cdr_x (before_output,
+               gh_cons  (gh_list (ly_symbol2scm ("define-fonts"),
+                                  font_names,
+                                  SCM_UNDEFINED),
+                         gh_cdr (before_output)));
   
+  Paper_stream* psp = paper_l_->paper_stream_p ();
+  outputter_l_->dump_onto (psp);
   // huh?
   delete outputter_l_;
-  delete paper_stream_p;
+  
   outputter_l_ = 0;
-
-
-  /*
-    todo: sort output
-   */
-  if (experimental_features_global_b)
-    {
-      for (Dictionary_iter<int> i(type_stats); i.ok(); i++)
-       {
-         *mlog << i.key () << ": " << i.val () << " objects\n";
-       }
-    }
-  *mlog << '\n' << flush;
-      
+  delete psp;
+  
 }
 
 Link_array<Item>
index a76260f9ddb51a7ca60d7e1a0e50bb4c5b6b2089..ea6499510e3999919ad00bb22f26d9f700b11a23 100644 (file)
@@ -75,7 +75,6 @@ print_mudela_versions (ostream &os)
 
 
 %union {
-    Array<Real>* realarr;
     Array<Musical_pitch> *pitch_arr;
     Link_array<Request> *reqvec;
     Array<int> *intvec;
@@ -174,7 +173,6 @@ yylex (YYSTYPE *s,  void * v_l)
 %token SCM_T
 %token SCORE
 %token SCRIPT
-%token SHAPE
 %token SKIP
 %token SPANREQUEST
 %token TEMPO
@@ -254,7 +252,6 @@ yylex (YYSTYPE *s,  void * v_l)
 %type <request> hyphen_req
 %type <scm>    string
 %type <score>  score_block score_body
-%type <realarr>        real_array
 
 %type <scm>    script_abbreviation
 %type <trans>  translator_spec_block translator_spec_body
@@ -567,21 +564,6 @@ paper_def_body:
        | paper_def_body translator_spec_block {
                $$->assign_translator ($2);
        }
-       | paper_def_body SHAPE real_array  semicolon {
-               /*
-                       URG URG.
-               */
-               if ($3->size () % 2)
-                       warning (_ ("Need even number of args for shape array"));
-
-               for (int i=0; i < $3->size ();  i+=2)
-               {
-                       Real l = $3->elem (i);
-                       $$->shape_int_a_.push (Interval (l,
-                                                        l + $3->elem (i+1)));
-               }
-               delete $3;
-       }
        | paper_def_body error {
 
        }
@@ -632,20 +614,6 @@ real:
        }
        ;
                
-
-real_array:
-       real {
-               $$ = new Array<Real>;
-               $$->push ($1);
-       }
-       |  /* empty */ {
-               $$ = new Array<Real>;
-       }
-       | real_array ',' real {
-               $$->push($3);
-       }
-       ;
-
 /*
        MIDI
 */
index a7974c5ead393a78206aa057c0b456130525cfd5..fbfbdb5ff1fe3b6a3c46c88fe4463479866d3f7e 100644 (file)
@@ -18,7 +18,7 @@ void
 Rest::do_add_processing ()
 {
   if (balltype_i_ == 0)
-    position_i_ += 2;          // guh.
+    set_position (position_f () + 2);
 
   Rhythmic_head::do_add_processing ();
 }
@@ -56,11 +56,10 @@ Rest::do_brew_molecule_p () const
     {
       style = ly_scm2string (style_sym);
     }
-  
-  Molecule s(lookup_l ()->rest (balltype_i_, ledger_b, style));
-  Molecule * m = new Molecule ( Molecule (s));
 
-  return m;
+  String idx =  ("rests-") + to_str (balltype_i_) + (ledger_b ? "o" : "") + style;
+
+  return new Molecule(lookup_l ()->afm_find (idx));
 }
 
 
index be98f18612c6064a533093459c4bf9fa43c8c0df..5262ea179d8072ff2425693853714ac0ea43c25b 100644 (file)
@@ -58,14 +58,14 @@ Scope::Scope ()
 bool
 Scope::elem_b (String s) const
 {
-  return elem_b (ly_symbol (s.ch_C()));
+  return elem_b (ly_symbol2scm (s.ch_C()));
 }
 
 
 Identifier *&
 Scope::elem (String s) 
 {
-  return elem (ly_symbol (s.ch_C()));
+  return elem (ly_symbol2scm (s.ch_C()));
 }
 
 
@@ -78,7 +78,7 @@ String
 Scope_iter::key () const
 {
   SCM s= Hash_table_iter<Protected_scm,Identifier*>::key ();
-  return symbol_to_string (s);
+  return ly_symbol2string (s);
 }
 
 bool
index fd619447f010d3142ae056156d50a2faa5f153b0..9c4e59c1a58fb5cbbd56694f3a5bca4db746cc84 100644 (file)
@@ -91,7 +91,7 @@ Score_element::dependency_size () const
 SCM
 Score_element::get_elt_property (String nm) const
 {
-  SCM sym =  ly_symbol (nm);
+  SCM sym =  ly_symbol2scm (nm.ch_C());
   SCM s = scm_assq(sym, element_property_alist_);
 
   if (s != SCM_BOOL_F)
@@ -99,7 +99,7 @@ Score_element::get_elt_property (String nm) const
   
   if (pscore_l_)
     {
-      SCM sym2 = ly_symbol (name () + ("::" + nm));
+      SCM sym2 = ly_symbol2scm ((name () + ("::" + nm)).ch_C());
       SCM val;
       
       // should probably check for Type::sym as well.
@@ -117,7 +117,7 @@ SCM
 Score_element::remove_elt_property (String key)
 {
   SCM s = get_elt_property (key); 
-  SCM sym = ly_symbol (key);   
+  SCM sym = ly_symbol2scm (key.ch_C());
   element_property_alist_ =  scm_assq_remove_x (element_property_alist_, sym);
   return s;
 }
@@ -128,7 +128,7 @@ Score_element::remove_elt_property (String key)
 void
 Score_element::set_elt_property (String k, SCM v)
 {
-  SCM s = ly_symbol (k);
+  SCM s = ly_symbol2scm (k.ch_C( ));
   element_property_alist_ = scm_assoc_set_x (element_property_alist_, s, v);
 }
 
index 5ca373ff10ce084b4c9ea90d29076c1c96f7abff..34163ddc53cfbf00a2a1eabd0efbf724e0415756 100644 (file)
@@ -41,7 +41,7 @@ Script_engraver::do_process_requests()
     {
       Articulation_req* l=script_req_l_arr_[i];
 
-      SCM list = ly_ch_C_eval_scm (("(articulation-to-scriptdef \"" + l->articulation_str_ + "\")").ch_C());
+      SCM list = ly_eval_str (("(articulation-to-scriptdef \"" + l->articulation_str_ + "\")").ch_C());
       
       if (list == SCM_BOOL_F)
        {
index ebceea43abc3d8cd95eaaa0e8b1ff7e011b79159..e5c43f2051d35715af7793c741b789ccec32666c 100644 (file)
@@ -40,12 +40,12 @@ Script::get_molecule(Direction d) const
   assert (s != SCM_UNDEFINED);
 
   SCM key = SCM_CAR (s);
-  if (key == ly_symbol ("feta"))
+  if (key == ly_symbol2scm ("feta"))
     {
       return lookup_l ()->afm_find ("scripts-" +
                                    ly_scm2string (index_cell (gh_cdr (s), d)));
     }
-  else if (key == ly_symbol ("accordion"))
+  else if (key == ly_symbol2scm ("accordion"))
     {
       return lookup_l ()->accordion (s, paper_l()->get_var("interline"));
     }
index 797ecfd76f9f3be93e70732bf769804c7123ad0c..b48a0e7689bc840032fa64887522e4d7fbf9dee4 100644 (file)
@@ -38,7 +38,7 @@ Separating_line_group_engraver::do_removal_processing ()
     }
   else
     {
-      sep_span_p_->padding_f_ = paper_l ()->get_realvar (ly_symbol ("postBreakPadding"));
+      sep_span_p_->padding_f_ = paper_l ()->get_realvar (ly_symbol2scm ("postBreakPadding"));
     }
 
   sep_span_p_->set_bounds (RIGHT, get_staff_info ().command_pcol_l ());
index 44dfb2df2419f3741e83fd10e98fbae38ffc2e09..0d6e1e7984cbca46c4fbadb5bc6c3c1c38838228 100644 (file)
@@ -18,7 +18,7 @@ Staff_margin_engraver::Staff_margin_engraver ()
 {
   axis_ = X_AXIS;
   type_ = "margin";
-  visibility_lambda_ = ly_ch_C_eval_scm ("postbreak-only-visibility");
+  visibility_lambda_ = ly_eval_str ("postbreak-only-visibility");
 }
 
 
index 1ec7d19054eaad6f070e6514164f9ba9f0c04cc9..f00bb39f52b58dea23dbc5b0c0a1f07d934e189d 100644 (file)
@@ -96,10 +96,10 @@ String
 Staff_performer::new_instrument_str () 
 { 
   // mustn't ask Score for instrument: it will return piano!
-  SCM minstr = get_property (gh_symbol2scm ("midiInstrument"), 0);
+  SCM minstr = get_property (ly_symbol2scm ("midiInstrument"), 0);
 
   if (!gh_string_p(minstr))
-    minstr = get_property (gh_symbol2scm ("instrument"), 0);
+    minstr = get_property (ly_symbol2scm ("instrument"), 0);
 
   if (ly_scm2string (minstr) == instrument_str_)
     return "";
index 2c6a3a17bc5c1451621e4b683d8f1e227f681f27..4a0a5b7558866846c8ceebd4b84005c5ed6f38be 100644 (file)
@@ -50,7 +50,12 @@ Staff_symbol_referencer::staff_symbol_l () const
 Real
 Staff_symbol_referencer::staff_line_leading_f () const
 {
-  return (staff_sym_l_) ? staff_sym_l_->staff_line_leading_f_ : paper_l ()->get_var ("interline");
+  if (staff_sym_l_)
+    return  staff_sym_l_->staff_line_leading_f_;
+  else if (pscore_l_ && paper_l ())
+    paper_l ()->get_var ("interline");
+  return 0.0;
 }
 
 Real
@@ -80,9 +85,11 @@ Staff_symbol_referencer::do_pre_processing ()
 void
 Staff_symbol_referencer::set_position (int p)
 {
-  /*
-    UGH. Use position_f() as well. 
-   */
-  position_i_ =   p;
+  Real halfspace =  staff_line_leading_f ()* 0.5;
   
+  translate_axis (- halfspace * position_f (), Y_AXIS);
+  if (staff_sym_l_)
+    translate_axis (halfspace * p, Y_AXIS);
+  else
+    position_i_ =   p;
 }
index 4cab4ff111824442fdaa60583402e1121be7e1c9..d7e80d24250029c46f3df123d5ffc548325fb49e 100644 (file)
@@ -25,11 +25,18 @@ Stem_info::Stem_info ()
 
 /*
   FIXME: y dims should not be in internote.
- */
+
+
+  GURG UGRGINRG INA UG R
+
+  JUNKME -> This should be in Beam
+*/
 Stem_info::Stem_info (Stem*s, int mult)
 {
   mult_i_ =mult;
   stem_l_ = s;
+  Beam* beam_l = stem_l_->beam_l_;
+  
   x_ = stem_l_->hpos_f ();
   set_direction (stem_l_->get_direction ());
   SCM bd = stem_l_->remove_elt_property ("beam-dir");
@@ -39,7 +46,7 @@ Stem_info::Stem_info (Stem*s, int mult)
   Paper_def* paper_l = stem_l_->paper_l ();
   Real internote_f = stem_l_->staff_line_leading_f ()/2;
   Real interbeam_f = paper_l->interbeam_f (mult_i_);
-  Real beam_f = paper_l->get_var ("beam_thickness");;
+  Real beam_f = gh_scm2double (beam_l->get_elt_property ("beam-thickness"));
          
 
   // strangely enough, dim(chord_start_f) == pt (and not internote!)
@@ -114,9 +121,6 @@ Stem_info::Stem_info (Stem*s, int mult)
   idealy_f_ = maxy_f_ <? idealy_f_;
   idealy_f_ = miny_f_ >? idealy_f_;
 
-  // interstaff beam
-  Beam* beam_l = stem_l_->beam_l_;
-  
   interstaff_f_ = calc_interstaff_dist (stem_l_, beam_l) / internote_f;
   idealy_f_ += interstaff_f_* beam_dir_;
   miny_f_   += interstaff_f_ * beam_dir_;
index 5ada498afdccf158f749831a380d9fced3337ba7..bbc4b0b50ad8b887d9fb4ec7411aa4b7ef24ea08 100644 (file)
@@ -50,11 +50,11 @@ Stem_tremolo::do_brew_molecule_p () const
     }
   
   Real interbeam_f = paper_l ()->interbeam_f (mult);
-  Real w = 1.5 * lookup_l ()->notehead (2, "").dim_[X_AXIS].length ();
+  Real w  = gh_scm2double (get_elt_property ("beam-width"));
   Real space = stem_l_->staff_line_leading_f ();
   Real internote_f = space/2;
   
-  Real beam_f = paper_l ()->get_var ("beam_thickness");
+  Real beam_f = gh_scm2double (get_elt_property ("beam-thickness"));
 
   int beams_i = 0;
   Real slope_f = internote_f / 4 / internote_f;        // HUH?
index 284d97cda86e9620b6166c0923e2da16ceeb709a..31fea32ab275276ee93c52511bbc324390ca2c4b 100644 (file)
 static const Real fix_to_real (Fix f);
 
 
-Tex_font_metric_reader::Tex_font_metric_reader (String name)
+Tex_font_metric_reader::Tex_font_metric_reader (Tex_font_metric* fp, String name)
   : input_ (name)
 {
-  tfm_.clear (TFM_SIZE);
-}
-
-Tex_font_metric
-Tex_font_metric_reader::read_tfm ()
-{
+  tfm_l_=fp;
+  tfm_l_->clear (TFM_SIZE);
   read_header ();
   read_params ();
   read_char_metrics ();
-  return tfm_;
+
+}
+
+Tex_font_metric * 
+Tex_font_metric_reader::read_file (String name)
+{
+  Tex_font_metric * tfmp = new Tex_font_metric;
+  Tex_font_metric_reader tfm_reader (tfmp, name);
+
+  return tfmp;
 }
 
 
+
+
 static const Real
 fix_to_real (Fix f)
 {
@@ -55,7 +62,7 @@ Tex_font_metric_reader::get_U32_fix_f ()
 Real
 Tex_font_metric_reader::get_U32_fix_scaled_f ()
 {
-  return get_U32_fix_f () * tfm_.info_.design_size;
+  return get_U32_fix_f () * tfm_l_->info_.design_size;
 }
 
 String
@@ -76,8 +83,8 @@ Tex_font_metric_reader::read_header ()
   (void) file_length;
   U16 header_length = input_.get_U16 ();
 
-  tfm_.info_.first_charcode = input_.get_U16 ();
-  tfm_.info_.last_charcode = input_.get_U16 ();
+  tfm_l_->info_.first_charcode = input_.get_U16 ();
+  tfm_l_->info_.last_charcode = input_.get_U16 ();
   U16 width_word_count = input_.get_U16 ();
   U16 height_word_count = input_.get_U16 ();
   U16 depth_word_count = input_.get_U16 ();
@@ -88,38 +95,38 @@ Tex_font_metric_reader::read_header ()
   U16 extensible_word_count = input_.get_U16 ();
   (void)extensible_word_count;
   
-  tfm_.header_.param_word_count = input_.get_U16 ();
-  tfm_.info_.parameter_count = tfm_.header_.param_word_count;
-
-  tfm_.header_.char_info_pos = (6 + header_length) * 4;
-  tfm_.header_.width_pos = tfm_.header_.char_info_pos
-                         + (tfm_.info_.last_charcode
-                            - tfm_.info_.first_charcode + 1) * 4;
-  tfm_.header_.height_pos = tfm_.header_.width_pos + width_word_count * 4;
-  tfm_.header_.depth_pos = tfm_.header_.height_pos + height_word_count * 4;
-  tfm_.header_.italic_correction_pos = tfm_.header_.depth_pos
+  tfm_l_->header_.param_word_count = input_.get_U16 ();
+  tfm_l_->info_.parameter_count = tfm_l_->header_.param_word_count;
+
+  tfm_l_->header_.char_info_pos = (6 + header_length) * 4;
+  tfm_l_->header_.width_pos = tfm_l_->header_.char_info_pos
+                         + (tfm_l_->info_.last_charcode
+                            - tfm_l_->info_.first_charcode + 1) * 4;
+  tfm_l_->header_.height_pos = tfm_l_->header_.width_pos + width_word_count * 4;
+  tfm_l_->header_.depth_pos = tfm_l_->header_.height_pos + height_word_count * 4;
+  tfm_l_->header_.italic_correction_pos = tfm_l_->header_.depth_pos
                                      + depth_word_count * 4;
-  tfm_.header_.lig_kern_pos = tfm_.header_.italic_correction_pos
+  tfm_l_->header_.lig_kern_pos = tfm_l_->header_.italic_correction_pos
     + italic_correction_word_count * 4;
-  tfm_.header_.kern_pos = tfm_.header_.lig_kern_pos + lig_kern_word_count * 4;
+  tfm_l_->header_.kern_pos = tfm_l_->header_.lig_kern_pos + lig_kern_word_count * 4;
   /* We don't care about the extensible table.  */
 
   if (header_length < 2)
     error (_f ("TFM header of `%s' has only %u word(s)",
               input_.name_str ().ch_C (), header_length));
 
-  tfm_.info_.checksum = input_.get_U32 ();
-  tfm_.info_.design_size = get_U32_fix_f ();
+  tfm_l_->info_.checksum = input_.get_U32 ();
+  tfm_l_->info_.design_size = get_U32_fix_f ();
 
   /* Although the coding scheme might be interesting to the caller, the
      font family and face byte probably aren't.  So we don't read them.  */
-  tfm_.info_.coding_scheme = header_length > 2
+  tfm_l_->info_.coding_scheme = header_length > 2
     ? get_bcpl_str () : "unspecified";
 
   DEBUG_OUT << format_str ("TFM checksum = %u, design_size = %fpt, coding scheme = `%s'.\n",
-                     tfm_.info_.checksum,
-                     tfm_.info_.design_size,
-                     tfm_.info_.coding_scheme.ch_C ());
+                     tfm_l_->info_.checksum,
+                     tfm_l_->info_.design_size,
+                     tfm_l_->info_.coding_scheme.ch_C ());
 }
 
 /* Although TFM files are only usable by TeX if they have at least seven
@@ -132,34 +139,34 @@ void
 Tex_font_metric_reader::read_params ()
 {
   /* If we have no font parameters at all, we're done.  */
-  if (tfm_.header_.param_word_count == 0)
+  if (tfm_l_->header_.param_word_count == 0)
     return;
 
   //brrr
   /* Move to the beginning of the parameter table in the file.  */
-  input_.seek_ch_C (-4 * tfm_.header_.param_word_count);
+  input_.seek_ch_C (-4 * tfm_l_->header_.param_word_count);
 
   /* It's unlikely but possible that this TFM file has more fontdimens
      than we can deal with.  */
-  if (tfm_.header_.param_word_count > TFM_MAX_FONTDIMENS)
+  if (tfm_l_->header_.param_word_count > TFM_MAX_FONTDIMENS)
     {
       warning (_f ("%s: TFM file has %u parameters, which is more than the %u I can handle",
                   input_.name_str ().ch_C (),
-                  tfm_.header_.param_word_count,
+                  tfm_l_->header_.param_word_count,
                   TFM_MAX_FONTDIMENS));
-      tfm_.header_.param_word_count = TFM_MAX_FONTDIMENS;
+      tfm_l_->header_.param_word_count = TFM_MAX_FONTDIMENS;
     }
 
   /* The first parameter is different than all the rest, because it
      isn't scaled by the design size.  */
-  tfm_.info_.parameters[(TFM_SLANT_PARAMETER) - 1] = get_U32_fix_f ();
+  tfm_l_->info_.parameters[(TFM_SLANT_PARAMETER) - 1] = get_U32_fix_f ();
 
-  for (Char_code i = 2; i <= tfm_.header_.param_word_count; i++)
-    tfm_.info_.parameters[i - 1] = get_U32_fix_scaled_f ();
+  for (Char_code i = 2; i <= tfm_l_->header_.param_word_count; i++)
+    tfm_l_->info_.parameters[i - 1] = get_U32_fix_scaled_f ();
 
 #ifdef PRINT
-  for (Char_code i = 1; i <= tfm_.header_.param_word_count; i++)
-    DEBUG_OUT << format_str ("TFM parameter %d: %.3f", i, tfm_.info_.parameters[i - 1]);
+  for (Char_code i = 1; i <= tfm_l_->header_.param_word_count; i++)
+    DEBUG_OUT << format_str ("TFM parameter %d: %.3f", i, tfm_l_->info_.parameters[i - 1]);
 #endif
 }
 
@@ -169,12 +176,12 @@ Tex_font_metric_reader::read_params ()
 void
 Tex_font_metric_reader::read_char_metrics ()
 {
-  for (int i = tfm_.info_.first_charcode; i <= tfm_.info_.last_charcode; i++)
+  for (int i = tfm_l_->info_.first_charcode; i <= tfm_l_->info_.last_charcode; i++)
     {
       Tex_font_char_metric tfm_char = read_char_metric (i);
       if (tfm_char.exists_b_)
-       tfm_.ascii_to_metric_idx_[tfm_char.code_] = tfm_.char_metrics_.size ();
-      tfm_.char_metrics_.push (tfm_char);
+       tfm_l_->ascii_to_metric_idx_[tfm_char.code_] = tfm_l_->char_metrics_.size ();
+      tfm_l_->char_metrics_.push (tfm_char);
     }
 }
 
@@ -189,12 +196,12 @@ Tex_font_metric_reader::read_char_metric (Char_code code)
 
   /* If the character is outside the declared bounds in the file, don't
      try to read it. */
-  if (code < tfm_.info_.first_charcode || code > tfm_.info_.last_charcode)
+  if (code < tfm_l_->info_.first_charcode || code > tfm_l_->info_.last_charcode)
     return tfm_char;
   
   //brr
   /* Move to the appropriate place in the `char_info' array.  */
-  input_.seek_ch_C (tfm_.header_.char_info_pos + (code - tfm_.info_.first_charcode) * 4);
+  input_.seek_ch_C (tfm_l_->header_.char_info_pos + (code - tfm_l_->info_.first_charcode) * 4);
 
   /* Read the character.  */
   tfm_char = read_char ();
@@ -232,10 +239,10 @@ Tex_font_metric_reader::read_char ()
 #define GET_CHAR_DIMEN(d) \
    if (d##_index != 0) \
      { \
-       input_.seek_ch_C (tfm_.header_.##d##_pos + d##_index*4); \
+       input_.seek_ch_C (tfm_l_->header_.##d##_pos + d##_index*4); \
        tfm_char.d##_fix_ = input_.get_U32 (); \
        tfm_char.d##_ = fix_to_real (tfm_char.d##_fix_) \
-                      * tfm_.info_.design_size; \
+                      * tfm_l_->info_.design_size; \
      }
 
   GET_CHAR_DIMEN (width);
@@ -258,7 +265,7 @@ Tex_font_metric_reader::read_char ()
 
   if (tag == 1)
     {
-      input_.seek_ch_C (tfm_.header_.lig_kern_pos + remainder * 4);
+      input_.seek_ch_C (tfm_l_->header_.lig_kern_pos + remainder * 4);
       read_lig_kern_program (&tfm_char.ligature_arr_, &tfm_char.kern_arr_);
     }
 
@@ -296,7 +303,7 @@ Tex_font_metric_reader::read_lig_kern_program (Array <Tfm_ligature>* ligature_ar
          kern_element.character = next_char;
 
          char const* old_pos = input_.pos_ch_C ();
-         input_.seek_ch_C (tfm_.header_.kern_pos + remainder * 4);
+         input_.seek_ch_C (tfm_l_->header_.kern_pos + remainder * 4);
          kern_element.kern = get_U32_fix_scaled_f ();
          input_.set_pos (old_pos);
 
index 96175d18b7830f7877a5f90629e93bf26583b300..a46d2a8dab612c2da75b984bd49d454c5c910cd0 100644 (file)
@@ -62,7 +62,6 @@ Tex_font_metric::find_ascii (int ascii, bool warn) const
 
     {
       warning (_f ("Can't find ascii character: `%d'", ascii));
-
     }
   return dummy_static_char_metric;  
 }
@@ -91,10 +90,4 @@ Tex_font_metric::clear (int n)
     ascii_to_metric_idx_.push (-1);
 }
 
-void
-Tex_font_metric::read_file (String name)
-{
-  Tex_font_metric_reader tfm_reader (name);
-  *this = tfm_reader.read_tfm ();
-}
 
index 4e4ef89a6b9375ad4048ee50a4b90521f3599e5f..d1e68dcb336bffee8e69d811cdd94eca5691bd56 100644 (file)
@@ -72,12 +72,9 @@ Timing_translator::do_process_requests()
              daddy_trans_l_->set_property("measurePosition",
                                           (new Moment)->smobify_self ());
 
-
            }
        }
     }
-
-
 }
 
 
@@ -100,9 +97,7 @@ Timing_translator::do_pre_move_processing()
 
   // urg: multi bar rests: should always process whole of first bar?
   SCM tim = get_property ("timing", 0);
-  bool timb = gh_boolean_p (tim) && gh_scm2bool ( tim);
-
-
+  bool timb = gh_boolean_p (tim) && gh_scm2bool (tim);
   if (timb && allbars)
     {
       Moment barleft = (measure_length () - measure_position ());
@@ -124,9 +119,10 @@ Timing_translator::do_creation_processing()
   daddy_trans_l_->set_property ("currentBarNumber" , gh_int2scm (1));
   daddy_trans_l_->set_property("measurePosition",
                               (new Moment)->smobify_self());
+  daddy_trans_l_->set_property ("oneBeat",
+                               (new Moment (1,4))->smobify_self ());
   daddy_trans_l_->set_property("measureLength",
                               (new Moment (1))->smobify_self());
-  
 }
 
 Moment
@@ -143,23 +139,28 @@ Timing_translator::measure_length () const
 void
 Timing_translator::get_time_signature (int *n, int *d) const
 {
-  *n = measure_length () / one_beat_;
-  *d = one_beat_.den_i ();
+  Moment one_beat (1,4);
+  SCM one = get_property ("beatLength",0);
+  if (SMOB_IS_TYPE_B (Moment, one))
+    one_beat = *SMOB_TO_TYPE (Moment, one);
+  *n = measure_length () / one_beat;
+  *d = one_beat.den_i ();
 }
 
 
 void
 Timing_translator::set_time_signature (int l, int o)
 {
-  one_beat_ = Moment (1)/Moment (o);
-  Moment len = Moment (l) * one_beat_;
+  Moment one_beat = Moment (1)/Moment (o);
+  Moment len = Moment (l) * one_beat;
   daddy_trans_l_->set_property ("measureLength",
                                (new Moment (len))->smobify_self ());
+  daddy_trans_l_->set_property ("beatength",
+                               (new Moment (one_beat))->smobify_self ());
 }
 
 Timing_translator::Timing_translator()
 {
-  one_beat_ = Moment( 1,4);
 }
 
 
@@ -238,8 +239,6 @@ Timing_translator::do_post_move_processing()
   tr->set_property ("currentBarNumber", gh_int2scm (b));
 }
 
-
-
 int 
 Timing_translator::bars_i () const
 {
index f74aef58d486713d37c55ac67c68f85598575aa2..e20daeb0aa3ca328ae8897a86bb9ee0ae8fa75f3 100644 (file)
@@ -469,5 +469,5 @@ Translator_group::get_property (SCM sym, Translator_group **where_l) const
 void
 Translator_group::set_property (String id, SCM val)
 {
-  properties_dict_[ly_symbol (id)] = val;
+  properties_dict_[ly_symbol2scm (id.ch_C())] = val;
 }
index c70b629ce8465a32c0b434cf900256ad2f55b792..515a85af9bbba3ea26dabcee6468d4fd5d9474f6 100644 (file)
@@ -166,7 +166,7 @@ Translator::output_def_l () const
 SCM
 Translator::get_property (String id, Translator_group **where_l) const
 {
-  return daddy_trans_l_->get_property (ly_symbol (id), where_l);
+  return daddy_trans_l_->get_property (ly_symbol2scm (id.ch_C()), where_l);
 }
 
 SCM
index ab3e85547dfc1b2741d79e0c57f6c685b55392c5..8786d94ed8502d405d96f6c9db06e788d327ff62 100644 (file)
@@ -1,6 +1,6 @@
 % Toplevel initialisation file. 
        
-\version "1.1.52";
+\version "1.3.5";
 
 
 \include "declarations.ly"
index 25222f488d0047d34a24b163ce37a55e8476f743..71b75cdf2fce6e810c10238146251a4f2b9f51c4 100644 (file)
@@ -18,6 +18,8 @@ paper_eleven = \paper {
        font_number = 4.;
        font_dynamic = 10.;
        font_mark = 6.;
+
+       % UGH!
        magnification_dynamic = -4.0;
 
        -1=\font "feta11"
index 8e6f1832a70e8a710911b937fcd5ef627584068a..581520e325229b2976cf0a9d8ea3780a0e2b3675 100644 (file)
@@ -13,6 +13,10 @@ stafflinethickness = \interline / 10.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;
 
@@ -94,6 +98,8 @@ grace_forced_stem_shorten3 = \grace_forced_stem_shorten2;
 
 #'slope-quantisation = #'normal
 #'beam-dir-algorithm = #'majority      %urg.
+#'Stem_tremolo::beam-width = 1.5 * \quartwidth ; 
+
 
 
 #'Clef_item::visibility-lambda = #postbreak-only-visibility
@@ -298,4 +304,5 @@ Wordwrap =0.0;
 \include "engraver.ly";
 
 
+#'margin-shape = #'()
 
index 1846b1db54c4e9717ad72f9994dfb6baa6fc5349..6dcf43f81e7b576fa45234367f6561badf35113f 100644 (file)
@@ -1,15 +1,15 @@
 Begin3
 Title: LilyPond
-Version: 1.3.5
-Entered-date: 10NOV99
+Version: 1.3.6
+Entered-date: 15NOV99
 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.5.tar.gz 
+       1000k lilypond-1.3.6.tar.gz 
 Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
-       1000k lilypond-1.3.5.tar.gz 
+       1000k lilypond-1.3.6.tar.gz 
 Copying-policy: GPL
 End
index b89cd7912fc42a27f44d5284a5000a91cdec3bdf..dbed56825b9bc653de0c00657c20992942d15170 100644 (file)
@@ -1,9 +1,9 @@
 Name: lilypond
-Version: 1.3.5
+Version: 1.3.6
 Release: 1
 Copyright: GPL
 Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.5.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.6.tar.gz
 Summary: A program for printing sheet music.
 URL: http://www.cs.uu.nl/~hanwen/lilypond
 Packager: Han-Wen Nienhuys <hanwen@cs.uu.nl>
index e816b5171616f581a562deec6ead008ef15c73fa..60dec520c829426722dbf763f30652b85fc900a0 100644 (file)
@@ -1,15 +1,48 @@
+%{
+
+ Six Petits Preludes,
+ Collection Johann Peter Kellner
+ ca 1703 - 1707
+
+ Kellner was a student of Bach's that copied some 90 works of his master.
+%}
 \header{
-filename =      "preludes-1.ly";
-%
-% page 1
-%
-% Clavierb"uchlein f"ur W. Fr. Bach
-% Clav. W. Fr. Bach: 2-Praeambulum I
-% ca 1720
-composer =      "Johann Sebastian Bach (1685-1750)";
-enteredby =     "jcn";
-copyright =     "public domain";
+  copyright =   "public domain";
+  source = "Ed. Henry Lemoine Urtext";
+  title =       "Pr\\\"aludum";
+
+  opus = "BWV 924";
+  composer =    "Johann Sebastian Bach (1685-1750)";
+  enteredby =   "jcn,hwn";
+
+  % mutopia headers.
+  mutopiatitle = "Prelude";
+  mutopiacomposer = "J.S.Bach";
+  mutopiaopus = "BWV924";
+  mutopiainstrument = "Piano";
+  style = "baroque";
+  copyright = "Public Domain";
+  maintainer = "Jan Nieuwenhuizen";
+  maintainer_email = "janneke@gnu.org";
+  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 " + \maintainer + ".\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
+  maintainer = "janneke@gnu.org";
+  lastupdated = "1999/Nov/14";
 }
+%{
+
+TODO: this file needs additional layouting: the trills look
+differently in Lemoine, and the sharps should be below the trill.
+
+Additionally, the performance of trills should be explained.
+
+Lemoine puts fermatas on ending bar lines everywhere.
+
+1.2.x versions of lily contain a version with dynamics and fingerings.
+
+%}
+
+
 
 \version "1.3.4";
 
@@ -17,26 +50,24 @@ copyright =  "public domain";
 upper = \context Staff=upper \notes\relative c {
        \context Voice=i
        \property Voice . textStyle = "italic"
-% rediculous dim...
-%      r16\p_"legato"\< g''-1( c-3 )e-5 r g,-1( c )e 
-       r16\p\< g''-1( c-3 )e-5 r g,-1( c )e 
-       r g,( c )d r b-1( d-2 \!)g-5 |
-       r16\mf a,( d-2 ) g-5 r a,(\< d )f-4 
-       r a,( d )e-3 r c-1( e-2 \!)a-5 |
-       r16\f b, e a-5 r b, e-3 g-5 
-       r c,-1 e-3 f-4 r g, d'-3 f-5 |
-% all text is fat currently...
-%      r g,-"poco a poco dim." d'-4 e r g, c-2 e 
-       r g, d'-4 e r g, c-2 e 
-       r a,-1 c-3 d-4 r e, b'-3 d-5 |
-       r e, b' c-4 r e, a-2 c 
-       r f,-1 a-3 bes-4 r c, g'-3 bes-5 |
-       r c, g' a-4 r c, f-2 a 
-       r d, f-2 b-5 r e, g-2 c-5 |
-       r\p d, g c-5 r d, g b-4 
-       r c, g'-3 b-5 r c, fis-2 a-4 |
-       r b, d a'-5 r b, d g-4 
-       r a, c g'-5 r a, c f!-4 |
+
+       r16 g'' c e r g, c e 
+       r g, c d r b d g |
+       r16 a, d  g r a, d f 
+       r a, d e r c e a |
+       r16 b, e a r b, e g 
+       r c, e f r g, d' f |
+
+       r g, d' e r g, c e 
+       r a, c d r e, b' d |
+       r e, b' c r e, a c 
+       r f, a bes r c, g' bes |
+       r c, g' a r c, f a 
+       r d, f b r e, g c |
+       r d, g c r d, g b 
+       r c, g' b r c, fis a |
+       r b, d a' r b, d g 
+       r a, c g' r a, c f! |
        % ugh arpeggio
        <
                { \stemup f4 r }
@@ -44,43 +75,41 @@ upper = \context Staff=upper \notes\relative c {
        >
        \stemboth 
        \translator Staff=lower\stemup
-       r16 g,,-5( b-4 d  
-       [ f-1 \translator Staff=upper\stemdown g16-1 b d ] | 
-       \stemup )b
+       r16 g,, b d  
+       [ f \translator Staff=upper\stemdown g16 b d ] | 
+       \stemup b
        \translator Staff=lower\stemdown
-       [ g-5( b-4 d-2 ] f-1
+       [ g b d ] f
        \translator Staff=upper\stemup
-       [ g16-1 b-2 d ] )b
+       [ g16 b d ] b
        \translator Staff=lower\stemup
        \clef "violin"; 
-       [ g-4 b-2 d-1 ]
+       [ g b d ]
        \stemup
        % urg, below translator change affects previous beam too!?
        % howto separate translator command from previous beam end?
-       \translator Staff=upper f-2 g-3 b-5 f-2 |
+       \translator Staff=upper f g b f |
        \stemboth
-       e-1\f c'-5( g-3 f-2  e-1 c'-5 g-3 e-2 
-       )d c'-5( f,-3 e-2  d-1 b'-5 f-3 d-2 |
-       )c b'-5( e,-3 d-2  c-1 a'-5 e-3 c-2 
-       )b-1 a'-5( d,-3 c-2  b-1 g'-5 d-3 b-2 |
-%       )a g'-5 c,-4 b  a-"poco a poco dim." fis'-5 c-2 a-1 
-       )a g'-5 c,-4 b  a fis'-5 c-2 a-1 
-       b-2 f' d-4 c  b f' d-4 b-2 |
-       g e' c-3 b  a e'-5 c-3 a-1 
-       fis-2 d' b-3 a  g-1 d'-5 b-4 g-2 |
-       e c'-5 a-4 g-3  fis-2 c'-5 a-4 fis-2 
-       d c'-5 b-4 a  b-4 g-2 d'-5 f,-1 |
-       g-4 e-2 f-1 d'-5  c-4 b a g 
-       f'-5 d-3 es-4 c-2  fis,-1 es'-4 d-3 c-2 |
-%       b-1 d-5 b-3 g-1  as-4-"cresc. e rall." f-2 g-3 d-1 
-       b-1 d-5 b-3 g-1  as-4 f-2 g-3 d-1 
-       es-2 fis-3 a-4 c-5 
+       e c' g f  e c' g e 
+       d c' f, e  d b' f d |
+       c b' e, d  c a' e c 
+       b a' d, c  b g' d b |
+       a g' c, b  a fis' c a 
+       b f' d c  b f' d b |
+       g e' c b  a e' c a 
+       fis d' b a  g d' b g |
+       e c' a g  fis c' a fis 
+       d c' b a  b g d' f, |
+       g e f d'  c b a g 
+       f' d es c  fis, es' d c |
+       b d b g  as f g d 
+       es fis a c 
        < 
                { \stemup r c8 b16 }
-               \context Voice=ii { \stemdown  d,8 f-2 }
+               \context Voice=ii { \stemdown  d,8 f }
        >
        \stemboth |
-       <c1\mf g e>
+       <c1 g e>
        \bar "|.";
 }
 
@@ -88,13 +117,13 @@ upper = \context Staff=upper \notes\relative c {
 lower = \context Staff=lower \notes\relative c{
        \context Voice=i
        \property Voice . textStyle = "roman"
-       c4-5 e-3 g-\mordent^"(\\textsharp)" g,4 |
-       d'4-\mordent-5 f-3 a-\mordent^"(\\textsharp)" a,4 |
-       e'-5 e'-\mordent-1 a,-4 b-\upprall |
-       c4 e,-4 fis gis-\downprall |
-       a4 c,-4 d e-\upprall |
-       f4-1 e d-3-\prall c |
-       g'-\mordent^"(\\textsharp)" g, g'-\mordent g, |
+       c4 e g^"\\textsharp"-\mordent g,4 |
+       d'4-\mordent f a-\mordent^"\\textsharp" a,4 |
+       e' e'-\mordent a, b-\upprall |
+       c4 e, fis gis-\downprall |
+       a4 c, d e-\upprall |
+       f4 e d-\prall c |
+       g'-\mordent^"\\textsharp" g, g'-\mordent g, |
        g'-\mordent g, g'-\mordent g, |
        g' r s s | s s s s \clef "bass"; |
        <
@@ -122,10 +151,7 @@ global = \notes{
                        \lower
                >
        >
-       \paper{
-               % no slur damping
-               slur_slope_damping = 10.0;
-       }
+       \paper { linewidth = 18.0 \cm;  }
        \midi{ \tempo 4 = 80; }
        \header {
                opus = "BWV 924";
index 2c08fa9e0de53c462f687bd7cda5eefe38d33268..b10faa565dcaa997c107cd58a5752ecd2b14baf4 100644 (file)
 \header{
   copyright =   "public domain";
   source = "Ed. Henry Lemoine Urtext";
-
-
+  title =       "Pr\\\"aludum";
   composer =    "Johann Sebastian Bach (1685-1750)";
   enteredby =   "jcn,hwn";
-  copyright =   "public domain";
 
+  
+  opus= "393";
   % mutopia headers.
   mutopiatitle = "Prelude";
   mutopiacomposer = "J.S.Bach";
+  mutopiaopus = "BWV939";
   mutopiainstrument = "Piano";
   style = "baroque";
   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 Jan Nieuwenhuizen.\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
+
+  maintainer = "Jan Nieuwenhuizen";
+  maintainer_email = "janneke@gnu.org";
+  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 " + \maintainer + ".\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
   maintainer = "janneke@gnu.org";
-  lastupdated = "1999/Nov/8";
+  lastupdated = "1999/Nov/14";
 }
 
+
+
 %{
 Old versions of LilyPond include this prelude with dynamics and fingerings.
-
 %}
 
 
@@ -41,11 +46,11 @@ Old versions of LilyPond include this prelude with dynamics and fingerings.
 upper = \context Staff \notes\relative c{
        \context Voice=i
        \property Voice . textStyle = "italic"
-       r8 c'( e g  e c bes' g |
-       )a c,( f a  f c c' a |
-       )b g( b d  b g f' d |
+       r8 c' e g  e c bes' g |
+       a c, f a  f c c' a |
+       b g b d  b g f' d |
        <
-               {\stemup )e2 r4 e }
+               {\stemup e2 r4 e }
                \context Voice = ii {\stemdown <c2 g > r4 <c g > }
        >
        \stemboth |
@@ -59,9 +64,9 @@ upper = \context Staff \notes\relative c{
                 \context Voice = ii { \stemdown <b 8 g > }
        >
        \stemboth 
-       g, 8( b d 
+       g, 8 b d 
        <
-               { \stemup )b 4 e }
+               { \stemup b 4 e }
                \context Voice = ii { \stemdown g, 4 b }
        >
        \stemboth |
@@ -70,18 +75,18 @@ upper = \context Staff \notes\relative c{
                \context Voice=ii { \stemdown c2 r4 e, 4 ~ e 8 }
        >
        \stemboth 
-       d,( fis a  fis d c' a |
-       )b g( b d  b g f'! d |
-       )e g,( c e  c g g' e |
-       )fis a,( c fis  c a a' fis |
+       d, fis a  fis d c' a |
+       b g b d  b g f'! d |
+       e g, c e  c g g' e |
+       fis a, c fis  c a a' fis |
        <
-               { \stemup )g2 }
+               { \stemup g2 }
                \context Voice = ii { \stemdown <d2 b > }
        >
        \stemboth 
-       r4 b4( |
+       r4 b4 |
        c,8 e g c  g e bes' g |
-       )a16-> g f e  d c b ! a 
+       a16 g f e  d c b ! a 
        b g a b  c d e f |
        g4
        <
@@ -90,8 +95,8 @@ upper = \context Staff \notes\relative c{
        >
        \stemboth 
        <
-               { \stemup c1^5 }
-               \context Voice=ii { \stemdown e, 1_1}
+               { \stemup c1 }
+               \context Voice=ii { \stemdown e, 1}
        >
        \stemboth 
        \bar "|.";
@@ -104,20 +109,20 @@ lower = \context Staff \notes\relative c{
                \context Voice=ii { \stemdown c,1 ~ | c ~ | c }
        >
        \stemboth |
-       r8 c( e g  e c c' e, |
-       )fis d( fis a  fis d d' fis, |
-       )g2 r4 g( |
-       )a8 a,( c e  c a g' e |
-       )fis2 r4 d |
+       r8 c e g  e c c' e, |
+       fis d fis a  fis d d' fis, |
+       g2 r4 g |
+       a8 a, c e  c a g' e |
+       fis2 r4 d |
        g-\mordent-"(\\textsharp)" g, 4 g'-\mordent g, |
        % mordents in brackets...
        g'-\mordent g, g'-\mordent g, |
        g'-\mordent g, g'-\mordent g, |
-       g'8 g,( b d  b g f'! d |
-       )e c e g  e c c' e, |
-       \property Voice . textStyle = "finger"
-       f1^"3\\_1" ~ |
-       f8 d e c g'4 g,^"5\\_2" |
+       g'8 g, b d  b g f'! d |
+       e c e g  e c c' e, |
+
+       f1 |
+       f8 d e c g'4 g, |
        <c1 c,1>
        \bar "|.";
 }
@@ -139,7 +144,8 @@ global = \notes{
                >
        >
        \paper{
-       }
+         linewidth = 18.0 \cm;  
+        }
        \midi{ \tempo 4 = 100; }
        \header {
                opus = "BWV 939";
index 894117f60c5dc7ae726d273e4c987d02e06e6d31..a733c64230814684e4386400146bbee9a83b273c 100644 (file)
@@ -6,7 +6,9 @@
 
 
 
- Kellner was a student of Bach's.  
+
+ Kellner was a student of Bach's that copied some 90 works of his master.
+
  
 %}
 \header{
   mutopiainstrument = "Piano";
   style = "baroque";
   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 Jan Nieuwenhuizen.\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
+
+  maintainer = "Jan Nieuwenhuizen";
+  maintainer_email = "janneke@gnu.org";
+  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 " + \maintainer + ".\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
   maintainer = "janneke@gnu.org";
-  lastupdated = "1999/Oct/16";
-  
+  lastupdated = "1999/Nov/14";
 }
+
 %{
 
 TODO: this file needs additional layouting: the upper voice should
 switch staffs to avoid leger lines.
 
+Not all editions agree on the last note: ed. Lemoine has a quarter
+note, some have dotted half notes.
+
+
 %}
 \version "1.3.4";
 
@@ -85,9 +94,11 @@ upper =  \notes \transpose c'' {
        r16 [fis, c es] [c fis, c fis,] r fis, r fis, |
        r16 [fis, c es] [c fis, c fis,] r fis, r fis, |
        r16 [g, b, d] [b, g, b, d] [es c a, fis] |
+
+       
        \context Staff <
-               \context Voice=i {\stemup g2.-\fermata\mf}
-               \context Voice=ii {\stemdown <b,2. d>}
+               \context Voice=i {\stemup g4-\fermata}
+               \context Voice=ii {\stemdown <b,4 d>}
        >
        \stemboth
        \bar "|.";
@@ -102,12 +113,12 @@ lower =  \notes{
        c4 r [as8 f] |
        c4 r [as8 f] |
 
-       c4-- r [es8 c] |
-       bes,!4-- r [es8 c] |
-       as,!4-- r [es8 c] |
+       c4 r [es8 c] |
+       bes,!4 r [es8 c] |
+       as,!4 r [es8 c] |
 
-       g,4-- r [es8 c] |
-       fis,4-- r [es8 c] |
+       g,4 r [es8 c] |
+       fis,4 r [es8 c] |
        fis,4 r [fis8 d] |
 
        g,4 r [d8 bes,] |
index d5eeedface0ccbdfbe64a44d9bd318f36f7edc3c..f99e470e2a30c54b31882c9c576fb918ebc64f0a 100644 (file)
@@ -1,73 +1,96 @@
+%{
+
+ Six Petits Preludes,
+ Collection Johann Peter Kellner
+ ca 1703 - 1707
+
+ Kellner was a student of Bach's that copied some 90 works of his master.
+%}
 \header{
-filename =     "preludes-4.ly";
-%
-% page 8
-%
-% Clavierb"uchlein f"ur W. Fr. Bach
-% Clav. W. Fr. Bach: 27-Praeludium ex d neutral
-% ca 1720
-composer =     "Johann Sebastian Bach (1685-1750)";
-enteredby =    "jcn";
-copyright =    "public domain";
+  copyright =   "public domain";
+  source = "Ed. Henry Lemoine Urtext";
+  title =       "Pr\\\"aludum";
+  opus = "BWV 925";
+  composer =    "Johann Sebastian Bach (1685-1750)";
+  enteredby =   "jcn,hwn";
+
+  % mutopia headers.
+  mutopiatitle = "Prelude";
+  mutopiacomposer = "J.S.Bach";
+  mutopiaopus = "BWV925";
+  mutopiainstrument = "Piano";
+  style = "baroque";
+  copyright = "Public Domain";
+  maintainer = "Jan Nieuwenhuizen";
+  maintainer_email = "janneke@gnu.org";
+  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 " + \maintainer + ".\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
+  maintainer = "janneke@gnu.org";
+  lastupdated = "1999/Nov/14";
 }
-\version "1.3.4";
+
+%{
+
+This stretches LilyPond capabilities a little.
+
+%}
 
 one = \context Staff \notes\relative c {
        \context Voice=i
        \property Voice . textStyle = "italic"
-%      r16\p_"legato" 
-       r16\p
+%      r16_"legato" 
+       r16
        \property Voice . textStyle = "finger"
-       d'-1( fis-3 d-1  a'-2 b-3 cis-4 a-3 
-       d-3 cis-2 d-1 e-2  d-1 fis-3 e-2 d-1 |
+       d'( fis d  a' b cis a 
+       d cis d e  d fis e d |
        \property Voice . textStyle = "finger"
        \stemup 
-       )cis4-2 fis-5 ~ fis8 fis-4 e4-3 ~ | 
-       e16\< \stemboth a,16( cis a  d-2 e fis d-1 
-       g-3 fis g a-4  g-3 b a \!g |
+       )cis4 fis ~ fis8 fis e4 ~ | 
+       e16 \stemboth a,16( cis a  d e fis d 
+       g fis g a  g b a g |
        \stemup
-%      )fis4-"2\\_3" e8-2 a-5 <fis4-4 d-2> <gis-5 e-3> |
-       )fis4 e8-2 a-5 <fis4-4 d-2> <gis-5 e-3> |
+
+       )fis4 e8 a <fis4 d> <gis e> |
        %5
-       <a4-5( e> <fis-4 d-2> < )g!16-5 d> fis-2 g-3 a-4 
+       <a4( e> <fis d> < )g!16 d> fis g a 
        \stemboth
-       g-3 b a g |
+       g b a g |
        \property Voice . textStyle = "italic"
-%      fis_"dim." e fis-3 g  fis-3 a-5 g fis 
-       fis e fis-3 g  fis-3 a-5 g fis 
+
+       fis e fis g  fis a g fis 
        \property Voice . textStyle = "finger"
 %      e4-"2\\_5" ~ e16 e,( fis g  |
        e4 ~ e16 e,( fis g  |
        \property Voice . textStyle = "italic"
-%      a-4_"dim." g-1 a b  a-2 c-4 b a 
-       a-4 g-1 a b  a-2 c-4 b a 
-       g-1 fis-2 g-3 a  g-3 b a g |
+
+       a g a b  a c b a 
+       g fis g a  g b a g |
        \stemup
-       )fis4\p 
+       )fis4 
        \skip 4*7; |
        %10
        \property Voice . textStyle = "finger"
-%      d'4.\mf cis8-"4\\_5" ~ cis b4-5 a8-"4\\_5" ~ |
-       d'4.\mf cis8 ~ cis b4-5 a8 ~ |
+%      d'4. cis8-"4\\_5" ~ cis b4 a8-"4\\_5" ~ |
+       d'4. cis8 ~ cis b4 a8 ~ |
        \property Voice . textStyle = "italic"
-%      a g4-5 fis8-4 ~ fis16 fis-4-"dim." e-3 d-2 
-       a g4-5 fis8-4 ~ fis16 fis-4 e-3 d-2 
+
+       a g4 fis8 ~ fis16 fis e d 
        \property Voice . textStyle = "finger"
 %      e4-"3\\_5" ~ |
        e4 ~ |
-       e16 e-5 d cis d4-5 ~ d16 d-5 cis b cis4-5 |
+       e16 e d cis d4 ~ d16 d cis b cis4 |
        \stemboth
-       fis,16-1\p a-2 d-5\< c-4  b-1 d-2 g-5 fis-4 
-       d-1 b'-5 a g  fis-2 e-1 d-4 \!c!-3 |
-       b-2 d-1 g a  fis8-\prall e16-4 d-3 
+       fis,16 a d c  b d g fis 
+       d b' a g  fis e d c! |
+       b d g a  fis8-\prall e16 d 
        d8. e16~  e d8 cis16 |
        %15
        \stemup
-       r16 d-1\< fis d  g a b g-1  c-3 b c d  c e d-4 \!c |
-       b4-5 a ~ a8 g-5 ~  g16 fis8-4 e16-3 |
-       fis8-4 e-5~  e d-5~ d4 cis-4 |
-%      d2\p-"rall." ~ d16 a-2( b-3 cis-4 )d4-5 |
-       d2\p ~ d16 a-2( b-3 cis-4 )d4-5 |
+       r16 d fis d  g a b g  c b c d  c e d c |
+       b4 a ~ a8 g ~  g16 fis8 e16 |
+       fis8 e~  e d~ d4 cis |
+
+       d2 ~ d16 a( b cis )d4 |
        \bar "|.";
 }
 
@@ -75,92 +98,92 @@ two = \context Staff \notes\relative c{
        \context Voice=ii
        \stemup
        \property Voice . textStyle = "finger"
-       fis4-1( e8-2 a4 a4 gis8-2 | 
+       fis4( e8 a4 a4 gis8 | 
        ) a8
        \translator Staff=upper \stemdown
-%      a'4 a8 b4.-"2\\_1" cis8 ~ | 
+
        a'4 a8 b4. cis8 ~ | 
        cis8
        \translator Staff=lower \stemup
        a,8 ~ a d ~ d d4-> cis8 | 
        d8
        \translator Staff=upper \stemdown
-       d'4-> cis8-1 ~ cis b4-1 b8 |
+       d'4-> cis8 ~ cis b4 b8 |
        %5
        r8 a4 a8
        \translator Staff=lower \stemup
-       g8-1( fis-2 )e4-1 ~ | 
-       e4 d ~ d16 d-1 cis-2 b-1 cis4-2 ~ |
-       cis8 a-3 d4.-1 d4^> cis8-2 |
+       g8( fis )e4 ~ | 
+       e4 d ~ d16 d cis b cis4 ~ |
+       cis8 a d4. d4^> cis8 |
        \translator Staff=upper \stemdown
-       d4 \stemboth r16 b-1\< d-2 b~ <g'4-5 e-3 b> 
-       r16 cis,-1 e-2 \!cis~ |
-       <a'4-5 fis-3 cis> r16 d,-1 fis-2 d~ <b'4-5 g-3 d>
-       r16 fis-1 a fis~ |
+       d4 \stemboth r16 b d b~ <g'4 e b> 
+       r16 cis, e cis~ |
+       <a'4 fis cis> r16 d, fis d~ <b'4 g d>
+       r16 fis a fis~ |
        %10
        \stemdown
        fis4 e d cis |
        b a b4. b8 |
        a4
        \translator Staff=lower \stemup
-       r16 b-3 fis-1 a-2 g4-1 r16 a-3 e-1 g-2 |
+       r16 b fis a g4 r16 a e g |
        \skip 1*1; 
        s16
        \translator Staff=upper \stemdown
-       d'8.-1 ~ d8 c d4 a8 g |
+       d'8. ~ d8 c d4 a8 g |
        %15
-       fis8 \translator Staff=lower \stemup c'-1 b4-1 \stemdown <a
+       fis8 \translator Staff=lower \stemup c' b4 \stemdown <a
        \translator Staff=upper \stemdown
-       a'4.-2>
+       a'4.>
        \stemdown
        a'8~ |
-       a g-3~  g16 e fis8~  fis16 d8.~  d8. cis!16 |
+       a g~  g16 e fis8~  fis16 d8.~  d8. cis!16 |
        \translator Staff=lower \stemup
        \context Staff <
-               \context Voice=i { \stemup  d8-2 a~ a4 }
-               \context Voice=ii { \stemdown  a8-1 g  fis16-2 e-1 fis-2 d-1 }
+               \context Voice=i { \stemup  d8 a~ a4 }
+               \context Voice=ii { \stemdown  a8 g  fis16 e fis d }
        >
        \stemup 
-       g-1 fis-2 g-1 a-2  g-1 b-3 a-2 g-1 ~ |
-       g g-1 fis-2 e-1 fis4-2 ~ fis2
+       g fis g a  g b a g ~ |
+       g g fis e fis4 ~ fis2
        \bar "|.";
 }
 
 three = \notes\relative c{
        \context Voice=iii
        \stemdown 
-       d4-3 cis-4 b e-3 |
-       a16 a,-5\mf( cis-3 a-5  d-2 e-1 fis-2 d-4 
-       g-1 fis-3 g a  g b a g |
-       )fis4 fis e a-4 |
-       d16 \stemboth d,-5\f( fis-3 d-5  a'-2 b-1 cis-2 a-4 
-       d-1 cis-3 d e  d-4 fis-2 e-1 ) d |
+       d4 cis b e |
+       a16 a,( cis a  d e fis d 
+       g fis g a  g b a g |
+       )fis4 fis e a |
+       d16 \stemboth d,( fis d  a' b cis a 
+       d cis d e  d fis e ) d |
        %5
-       cis-3 b-4 cis-3 d-2  c-4 e-2 d-3 c-4 
-       \stemdown b4-5 cis8-4 b-3( |
-       a-4 )fis-5 b-2 a-3  gis-4 e-5 a-3 g-4 |
-       fis4. d8-5 e4-5 a4-3 |
+       cis b cis d  c e d c 
+       \stemdown b4 cis8 b( |
+       a )fis b a  gis e a g |
+       fis4. d8 e4 a4 |
        \stemboth
-       r16 d,-4( fis-2 d-4  )g8-.-1 g,-.-5 
-       r16 e'-4( g-2 e-4  )a8-. a,-.-5 |
-       r16 fis'-4( a fis  )b8-. b,-. r16 g'-4( b g  )d'8-. d,-. |
+       r16 d,( fis d  )g8-. g,-. 
+       r16 e'( g e  )a8-. a,-. |
+       r16 fis'( a fis  )b8-. b,-. r16 g'( b g  )d'8-. d,-. |
        %10
-       r16 d,16-5( fis-3 d  a'-2 b-1 cis-2 a-4  d b-5 d-3 b 
-       fis'-2 g a-2 fis-4 |
-       )fis16 g,( b g  d'-2 e fis-2 d-4  )g8-. g,-. r16 cis-4( e cis |
-       )fis8-. fis,-. \stemdown r16 b-4( d b  )e8-. e,-. 
-       r16 a-4 cis a |
+       r16 d,16( fis d  a' b cis a  d b d b 
+       fis' g a fis |
+       )fis16 g,( b g  d' e fis d  )g8-. g,-. r16 cis( e cis |
+       )fis8-. fis,-. \stemdown r16 b( d b  )e8-. e,-. 
+       r16 a cis a |
        \stemboth
-       d-1 e-3 fis-2 d-4  g-1 fis-2 e-3 d-1  cis!-3 a-5 b cis 
-       d-2 e fis-2 d-4 |
-       g8 e-3 \stemdown a a,  b8.-4 g16-5 a4-4 |
+       d e fis d  g fis e d  cis! a b cis 
+       d e fis d |
+       g8 e \stemdown a a,  b8. g16 a4 |
        %15
-       d8-5 a'-2~  a g-3~  g g-3 fis4-4 |
+       d8 a'~  a g~  g g fis4 |
        \stemup
-       r16 g-2 b-1 g-3  d'8.-1 c16-1  b8.-2 bes16-3  a8-1 g |
+       r16 g b g  d'8. c16  b8. bes16  a8 g |
        \stemdown
-       r16 a,-2 cis!-1 a'-2  d,-1 e fis d  e8-1 d-2  e-1 a,-2 |
-       d a-2~  a16 a-2 b cis-2 d2 |
+       r16 a, cis! a'  d, e fis d  e8 d  e a, |
+       d a~  a16 a b cis d2 |
 }
 
 four = \context Staff \notes\relative c{
@@ -175,7 +198,7 @@ four = \context Staff \notes\relative c{
        \skip 1*2; |
        s4
        \translator Staff=lower \stemup
-       a4 ~ a16 d,-2 g8-1  fis e-1 |
+       a4 ~ a16 d, g8  fis e |
        %15
        \stemdown
        d1 ~ | 
@@ -205,6 +228,7 @@ global = \notes{
                >
        >
        \paper{
+               linewidth = 18.0 \cm;  
        }
        \midi{ \tempo 4 = 70; }
        \header{
index 0ccb570c2e51b7e6e40127654973bf4bc607aa2b..fe9c171ea7199b53d0d855f360a7f8ac9538f400 100644 (file)
+%{
+
+ Six Petits Preludes,
+ Collection Johann Peter Kellner
+ ca 1703 - 1707
+
+ Kellner was a student of Bach's that copied some 90 works of his master.
+%}
+
 \header{
-filename =     "preludes-5.ly";
-%
-% page 2
-%
-% Clavierb"uchlein f"ur W. Fr. Bach
-% Clav. W. Fr. Bach: 4-Praeludium 2
-% ca 1720
-composer =     "Johann Sebastian Bach (1685-1750)";
-enteredby =    "jcn";
-copyright =    "public domain";
+  copyright =   "public domain";
+  source = "Ed. Henry Lemoine Urtext";
+  title =       "Pr\\\"aludum";
+  opus = "BWV 926";
+  composer =    "Johann Sebastian Bach (1685-1750)";
+  enteredby =   "jcn,hwn";
+
+  % mutopia headers.
+  mutopiatitle = "Prelude";
+  mutopiacomposer = "J.S.Bach";
+  mutopiaopus = "BWV926";
+  mutopiainstrument = "Piano";
+  style = "baroque";
+  copyright = "Public Domain";
+  maintainer = "Jan Nieuwenhuizen";
+  maintainer_email = "janneke@gnu.org";
+  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 " + \maintainer + ".\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
+  maintainer = "janneke@gnu.org";
+  lastupdated = "1999/Nov/14";
+  
 }
-\version "1.3.4";
 
+\version "1.3.4";
 
-upper = \context Staff \notes\relative c{
+upper = \context Staff \notes\relative c
+       \context Voice=i {
        \property Voice . textStyle = "italic"
-       \context Voice=i
-%      d'8-1\p a'-5-"legato" f-3 d-1 a'-5 f-3 |
-       d'8-1\p a'-5 f-3 d-1 a'-5 f-3 |
-       d-1 a'-5 f-3 d-1 a'-5 f-3 |
-       d-1\< bes'-4 g-2 d-1 bes'-4 \!g-2 |
-       d-1 bes'-4 g-2 d-1 bes'-5 g-3 |
+
+
+       [d'8 a' f d a' f] |
+       d a' f d a' f |
+       d bes' g d bes' g |
+       d bes' g d bes' g |
        %5
-       cis,-1\mf g'-4 e-2 cis-1 g'-4 e-2 |
-       cis-1 bes'-5 g-4 e-2 a-5 g-4 |
-       f-3\< d-1 f-2 a-4 f-1 a-2 |
-       d-5 a-1 d-2 f-4 d-1 \!f-2 |
-       b\> f-3 e d c-3 b |
+       cis, g' e cis g' e |
+       cis bes' g e a g |
+       f d f a f a |
+       d a d f d f |
+       b ( f e d c b |
        %10
-       a gis-3 fis e d'-5 \!b-2 |
+       a gis fis )e d' b |
        < 
                {
                        \stemup 
                        \property Voice . textStyle = "roman"
-                       c4-\mordent^"(\\textsharp)"\p r r |
+                       c4-\mordent^"(\\textsharp)" r r |
                        c4-\mordent^"(\\textsharp)" r r
                        \property Voice . textStyle = "italic"
                }
                \context Voice=ii { \stemdown a4 r r | a4 r r }
        > |
        \stemboth 
-       a'8\mf( es-3\> d c bes!-3 a |
-       g fis-3 e!-2 d-1 c'-4 \!a |
+       a'8( es d c bes a |
+       g fis e! )d c' a |
        %15
-       )bes8-\mordent\p( d8-5 bes-3 g-1 )g'4 |
-       r8 d-5( c bes a-\prall g |
-       )a-2 c-4( a f ) f'4 |
-       r8 c-5 bes a g-\prall f |
-       g-2 bes-4 a g f-1 e-2 |
+       bes8-\mordent d8 bes g g'4 |
+       r8 d c bes a-\prall g |
+       a c a f  f'4 |
+       r8 c bes a g-\prall f |
+       g bes a g f e |
        %20
-       f-3 d-1 f-2 a-3 d-5 g,-2 |
+       f d f a d g, |
        < 
                { 
                        \stemup 
                        % ... textnatural
-%                      cis8-\prall e8-5-"poco cresc." cis-3 a e' cis 
-                       cis8-\prall e8-5 cis-3 a e' cis 
+%                      cis8-\prall e8-"poco cresc." cis a e' cis 
+                       cis8-\prall e8 cis a e' cis 
                }
                \context Voice=ii { \stemdown a4 }
        >
        \stemboth 
-       a8 e'-5 cis a bes!-3 a |
-       g e'-5 cis-3 g e'-5 cis-3 |
-       g-1 e'-5 cis g a-3 g |
-%      f-"dim." d'-5 bes f d' bes |
-       f d'-5 bes f d' bes |
+       a8 e' cis a bes! a |
+       g e' cis g e' cis |
+       g e' cis g a g |
+
+       f d' bes f d' bes |
        %25
-       f d'-5 bes f d' bes |
-%      fis-2-"dim." c'-5 a-3 fis-2 c'-5 a-3 |
-       fis-2 c'-5 a-3 fis-2 c'-5 a-3 |
-       fis-2 c'-5 a-3 fis-2 c'-5 a-3 |
-       bes-4 g-1 fis-2 g-3 d-1 g-2 |
-       bes-4 g-2 d-1 bes'-5 g-3 d-1 |
+       f d' bes f d' bes |
+
+       fis c' a fis c' a |
+       fis c' a fis c' a |
+       bes g fis g d g |
+       bes g d bes' g d |
        %30
-       e-2\p g-4 fis-3 g-1 bes-4 g-2 |
-       es-1 bes'-4 g-2 es bes' g |
-       cis,-1 bes'-4 g-2 cis, bes' g |
-       cis,-1 bes'-4 g-2 cis,-1 a'-5 g-4 |
-       f-3 a f d a'-5 f |
+       e g fis g bes g |
+       es bes' g es bes' g |
+       cis, bes' g cis, bes' g |
+       cis, bes' g cis, a' g |
+       f a f d a' f |
        %35
-       d-1 a'-5 f-3 d-1 cis-2 d-1 |
-       e-3\< g-5 e-3 bes-1 g'-5 e-3 |
-       bes-1 g'-5 e-3 \!cis-2 a-1 g'-5 |
-       f16-4\mf d-2 c-1 bes-3 \stemup a-2 s16 s8 s4 |
+       d a' f d cis d |
+       e g e bes g' e |
+       bes g' e cis a g' |
+       f16 d c bes \stemup a s16 s8 s4 |
 % ugh
 %      s1 |
        s4 s4 s4 |
        %40
-       s4 s16 [d16-1-"m.d." f-2 a-4] \stemdown [d,-2-"m.g." f a] \stemup d-1 |
+       s4 s16 [d16 f a] \stemdown [d, f a] \stemup d |
        \stemboth
-       f a-4 f d  f-4 d b d-5  gis,-2 b a gis |
-       <g'!4.-5\f e a,> a8-5 
-       <
-               {
-                       \stemup 
-                       f4-4\> ~ | [\!f8 e] [e32-4 f e8.] ~ [e8 d-3]
+       f a f d  f d b d  gis, b a gis |
+
+       % arpeggio
+       <g'!4. e a,> a8 
+       < f4  d a > ~ 
+       [f8 e]
+       < { \stemup 
+               e4.^\prall d8
                }
-               \context Voice=ii { \stemdown <d4 a> r4 cis-2 }
-       > |
+               \context Voice=ii { \stemdown cis2 }
+       > 
        \stemboth 
-       d8-4 c!-3 a-1 d-4 bes-2 g-1 |
+       d8 c! a d bes g |
        %45
-       c-5 a-3 fis-2 bes-4 g e  |
-%      a-5 fis-"dim. e rall." d g-5 e cis-2 |
-       a-5 fis d g-5 e cis-2 |
-       <
-               { \stemup <fis2-.-5\p a,> }
-               \context Voice=ii { \stemdown  [d32( cis d8.] ~ ) d2 }
-       > |
-       \bar "|.";
+       c a fis bes g e  |
+
+       a fis d g e cis |
+
+       %  the mordent is on the D !
+       <fis2. d-\mordent a> 
 }
 
 
 lower = \context Staff \notes\relative c{
        \context Voice=i
-%      d32( cis )d8. r4 r |
+
        d4-\mordent r r |
        d,4 r r |
        d'-\mordent r r |
        d,4 r r |
        d'-\mordent r r |
-%      d r r |
+
        d,4 r r |
-       d'8-2 a-5 d-2 f-1 d-4 f-2 |
-       a-1 f-4 a-2 d-1 a-2 d-1 |
-       gis,4-3 r r |
-       e-4( )gis-2 e |
-       a8-4 e'-1 c-2 a-4 e'-1 c-2  |
-       g!-5 es'-1 c-1 g-5 es'-1 c-1  |
-       fis,4-5 r r 
-       d-4( ) fis d-5 |
+       d'8 a d f d f |
+       a f a d a d |
+       gis,4 r r |
+       e gis e |
+       a8 e' c a e' c  |
+       g! es' c g es' c  |
+       fis,4 r r 
+       d  fis d |
        \property Voice . textStyle = "roman"
        g4-\mordent^"(\\textsharp)" r r8 f!8 |
        \property Voice . textStyle = "italic"
        e4-\prall r r |
        f4-\mordent r r8 e |
-       d4 r8 f-1 e d |
-       e-2 d-3 cis-4 e-1 d-2 cis-3 |
-       d4-2( )c! bes-4 |
-       a( )a' a, |
-       a( )a' a, |
-       a( )a' a, |
-       a( )a' a, |
+       d4 r8 f e d |
+       e d cis e d cis |
+       d4 c! bes |
+       a a' a, |
+       a a' a, |
+       a a' a, |
+       a a' a, |
        bes r r |
-       bes-5( )bes' bes, |
+       bes bes' bes, |
        a r r |
-       a-2( )d-1 d, |
+       a d d, |
        g r r |
-       g( )g' g, |
+       g g' g, |
        g r r |
-       g( )g' g, |
+       g g' g, |
        a r r |
-       a( )a' a, |
+       a a' a, |
        a r r |
-       a( )a' a, |
+       a a' a, |
        cis, r r |
-       cis( )cis' cis, |
-       d-4 s16
+       cis cis' cis, |
+       d s16
        \stemdown
-       [g'16-1-"m.g." f e] f-2 a d,-3 f | 
-       a, \stemup [d-5-"m.d." c bes] 
-       a \stemdown [ g-2 f-"m.g." e] d f-4 a-2 d-1 |
+       [g'16 f e] f a d, f | 
+       a, \stemup [d c bes] 
+       a \stemdown [ g f e] d f a d |
        \stemup
-%      f-2\ped a 
-       [f-2-"Ped." a]
+
+       [f a]
        \stemdown
-%      d-4-"m.g." f-"cresc." a s s8 s4\dep |
-%      d,-4-"m.g." f-"cresc." a s s8 s4-"*" |
-       [d,-4-"m.g." f] a s s8 s4-"*" |
+       [d, f] a s s8 s4-"*" |
        \stemboth
 % ugh whole rest has duration of one bar
-%      r1 |
-       r4 r r |
-       cis,8-3( e cis a  d16-1 c bes a |
-       )g8 g' a-2( g-3 a-1 a, |
-       )d4-3 d'-1 d, |
+       R2. |
+%      r4 r r |
+       cis,8 e cis a  d16 c bes a |
+       g8 g' a g a a, |
+       d4 d' d, |
        d r r |
-       d,( )d' d, |
+       d, d' d, |
        d2. |
-       \bar "|.";
 }
 
 global = \notes{
@@ -191,7 +209,7 @@ global = \notes{
        \context PianoStaff <
                \context Staff = upper <
                        \global
-                       \upper
+                       { \upper \bar "|." }
                >
                \context Staff = lower <
                        \global
@@ -200,6 +218,8 @@ global = \notes{
                >
        >
        \paper{
+               linewidth = 18.0 \cm;  
+
        }
        \midi{ \tempo 4 = 90; }
        \header{
index d51b769e9da8098fd37db2fc6609fb59a8faa815..643c959711e6f7100962e84ce107f4cf638d8eef 100644 (file)
+%{
+
+ Six Petits Preludes,
+ Collection Johann Peter Kellner
+ ca 1703 - 1707
+
+ Kellner was a student of Bach's that copied some 90 works of his master.
+%}
+
 \header{
-filename =     "preludes-6.ly";
-%
-% page 11
-%
-% Six Petits Preludes
-% Collection Johann Peter Kellner
-% ca 1703 - 1707
-composer =     "Johann Sebastian Bach (1685-1750)";
-enteredby =    "jcn";
-copyright =    "public domain";
+  copyright =   "public domain";
+  source = "Ed. Henry Lemoine Urtext";
+  title =       "Pr\\\"aludum";
+  opus = "BWV 940";
+  composer =    "Johann Sebastian Bach (1685-1750)";
+  enteredby =   "jcn,hwn";
+
+  % mutopia headers.
+  mutopiatitle = "Prelude";
+  mutopiacomposer = "J.S.Bach";
+  mutopiaopus = "BWV940";
+  mutopiainstrument = "Piano";
+  style = "baroque";
+  copyright = "Public Domain";
+  maintainer = "Jan Nieuwenhuizen";
+  maintainer_email = "janneke@gnu.org";
+  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 " + \maintainer + ".\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
+  maintainer = "janneke@gnu.org";
+  lastupdated = "1999/Nov/14";
+  
 }
+
 \version "1.3.4";
 
 
+
 one = \context Staff \notes\relative c{
        \context Voice=i
        \skip 1; |
        \stemup
-       r4 d''2-5( cis4-4 |
+       r4 d''2 cis4 |
        \stemboth
-       )d16-5\mf a'-4( g f  e f-4 cis-2 d-1 
-       e8.-\mordent f16  d8.-\prall-1 cis16-3 |
+       d16 a' g f  e f cis d 
+       e8.-\mordent f16  d8.-\prall cis16 |
        \stemup
-       )cis4\> ~ cis16 a \!d8 ~ d4 a( |
+       cis4 ~ cis16 a d8 ~ d4 a |
        %5
-       )b2-4 ~ b4 a-5 ~ |
-       a16 a-5 \stemup g! f g4-4\< ~ g f-3 ~ |
-       \!f16 a g f  e16 g8.-5 ~  g16 g-5 f-4 e-3  d-1 f8.-4 ~ |
-       f16 f-3 e d b'4 a-5 g-5 |
-%      fis4-4 g r8\<-"rall." g16-1( bes-2 \!e4-5 |
-       fis4-4 g r8\< g16-1( bes-2 \!e4-5 |
+       b2 ~ b4 a ~ |
+       a16 a \stemup g! f g4 ~ g f ~ |
+       f16 a g f  e16 g8. ~  g16 g f e  d f8. ~ |
+       f16 f e d b'4 a g |
+
+       fis4 g r8 g16 bes e4 |
        %10
-       )d1-5
+       d1
        \bar "|.";
 }
 
 two = \context Staff \notes\relative c{
        \context Voice=ii
-       r16\p d''-5( c-4 bes-3  a-2 bes-3 f-1 g-2 
-       a8.-\mordent bes16-1  g8.-\prall f16-1 |
+       r16 d'' c bes  a bes f g 
+       a8.-\mordent bes16  g8.-\prall f16 |
        \stemdown
-       )f2 e2 |
+       f2 e2 |
        \translator Staff=lower \stemup
-       r4 a,-1 bes-2 b-1 |
+       r4 a, bes b |
        \translator Staff=upper \stemdown
-       r16 b'-3 a-1 g-2  f8. f16-2 e2 ~ |
+       r16 b' a g  f8. f16 e2 ~ |
        %5
-       e2 ~ e4 ~ e16 e-2 f! d-1 |
+       e2 ~ e4 ~ e16 e f! d |
        s4 e32 d e8.~ e4 d4 ~ |
-       d4. cis16-2 d-1 cis4 d-1 ~ |
-       d8 r r16 e-2 f d r16 e-2 f d r d-1 e-3 cis |
-       r16 e-3 d-1 c!-2  bes! d8. s4 r16\> bes'-2 a-2 \!g-1 |
+       d4. cis16 d cis4 d ~ |
+       d8 r r16 e f d r16 e f d r d e cis |
+       r16 e d c!  bes! d8. s4 r16 bes' a g |
        %10
-       fis1-2
+       fis1
 }
 
 three = \context Staff \notes\relative c{
        \context Voice=iii
        \stemup
-       f2-1( e-2 |
+       f2 e |
        \stemboth
-       )d16 d'( c bes  a-4 bes-2 f-5 g-4 
-       a8.-\mordent bes16-2 
-       g8.-\prall-4 f16-5 |
-       )f2-5 g4-4 gis |
-       a2-2 ~ a16 a-1( g f  e-4 f-2 c-5 d |
+       d16 d' c bes  a bes f g 
+       a8.-\mordent bes16 
+       g8.-\prall f16 |
+       f2 g4 gis |
+       a2 ~ a16 a g f  e f c d |
        %5
-       e8.-\mordent f16  d8.-\prall-4 c16-5 \stemboth )c4.-5 d8-4 |
+       e8.-\mordent f16  d8.-\prall c16 \stemboth c4. d8 |
        \stemdown
-       e4 ~ e16 f-2( e-3 d-4  cis a b cis-3  d-4 e-3 f-2 d-4 |
+       e4 ~ e16 f e d  cis a b cis  d e f d |
        \property Voice . textStyle = "finger"
-       )bes!2-"5\\_4" a ~ |
+       bes!2 a ~ |
        a a |
-       d, cis'-5 |
+       d, cis' |
        %10
-       a'1-2
+       a'1
        \bar "|.";
 }
 
 four = \context Staff \notes\relative c{
        \context Voice=iv
        \stemdown 
-       d2-3 cis-4 |
+       d2 cis |
        \skip 1*2; |
        \skip 4*3;
        \translator Staff=upper \stemup \property Voice.horizontalNoteShift = 1 
-       c''4-5 |
+       c''4 |
        %5
-       a gis-2 ~ gis16 gis-3 fis e 
+       a gis ~ gis16 gis fis e 
        \skip 4*1;
        \translator Staff=lower \stemdown \property Voice.horizontalNoteShift = 0 
        \stemup
-       b2-1 a-1 |
+       b2 a |
        g a4. gis16 a |
-       gis2 < g8 cis,> <f-3 d-1> e4-2 |
-       d4. fis16-3 g-2 r16 bes8.-1 ~ bes4 |
+       gis2 < g8 cis,> <f d> e4 |
+       d4. fis16 g r16 bes8. ~ bes4 |
        %10
        \stemdown
-       d,1-5
+       d,1
 }
 
 global = \notes{
@@ -121,10 +143,11 @@ global = \notes{
                >
        >
        \paper{
+               linewidth = 18.0 \cm;  
+
        }
        \midi{ \tempo 4 = 40; }
        \header{
-               piece = "6";
                opus = "BWV 940";
        }
 }
index 845f08466adf024ad542b855bcba94a0ee0652bb..112b0b81a3a9aba8eef262b81918681f666006bb 100644 (file)
@@ -15,7 +15,7 @@ copyright =    "public domain";
   mutopiainstrument = "Piano";
   style = "baroque";
   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 Jan Nieuwenhuizen.\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
+  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 " + \maintainer + ".\\\\Unrestricted modification and redistribution is permitted and encouraged - copy this music and share it!";
   maintainer = "janneke@gnu.org";
   lastupdated = "1999/Oct/16";
   
index cae280c7b1f642e5b1f999ec6621c2c1226b27fa..9cd22ceb7de4c40a9f030cc7887576872ca0bcb6 100644 (file)
@@ -13,8 +13,7 @@
   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!";
   maintainer = "hanwen@cs.uu.nl";
   lastupdated = "1999/Oct/14";
-  
-  }
+}
 
 
 % It would be nice to squeeze this onto two pages, but I am not sure
index e12646599d288ce48584e537a2ed4d3e12765b2e..ef36f07c679aa5c22a463a0614659057331c76ac 100644 (file)
         ))
   )
 
+(define generic-dot-properties
+  (cons "Dots" (list
+               (list 'dotDirection dir? 'direction)
+               (list 'verticalDirection dir? 'direction)
+               )
+       ))
+  
 (define generic-text-properties
   (cons "Text_item" (list
                     (list 'textStyle string? 'style)
@@ -84,6 +91,7 @@
 (define generic-voice-properties
   (list
    generic-stem-properties
+   generic-tie-properties
    generic-rest-properties
    generic-slur-properties
    generic-beam-properties
   )
 
 (define generic-thread-properties
-  (list generic-All-properties))
+  (list generic-All-properties
+       generic-dot-properties
+
+       )
+
+  )
    
index a2bbdd35bcde4901ba097a7012fcc10857aee4a3..7024dfe651fd58e520b8bfce47c4df81827bbc12 100644 (file)
 
 ; :use-module (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 (mm-to-pt x)
+  (* (/ 72.27 25.40) x)
+  )
+
+(define (cons-map f x)
+  (cons (f (car x)) (f (cdr x))))
+
 (define (reduce operator list)
       (if (null? (cdr list)) (car list)
          (operator (car list) (reduce operator (cdr list)))
     ("volta" . "feta-nummer"))
 )
 
+(define (string-encode-integer i)
+  (cond
+   ((= i  0) "o")
+   ((< i 0)   (string-append "n" (string-encode-integer (- i))))
+   (else (string-append
+         (make-string 1 (integer->char (+ 65 (modulo i 26))))
+         (string-encode-integer (quotient i 26))
+        )
+   )
+  )
+  )
+
+(define (magstep i)
+  (cdr (assoc i '((-4 . 482)
+                 (-3 . 579)
+                 (-2 . 694)
+                 (-1 . 833)
+                 (0 . 1000)
+                 (1 . 1200) 
+                 (2 . 1440)
+                 (3 . 1728)
+                 (4 . 2074))
+             )
+       )
+  )
+            
 (define script-alist '())
 (define (articulation-to-scriptdef a)
   (assoc a script-alist)
   (assoc s cmr-alist )
   )
 
+(define (define-font name-mag)
+  (cons name-mag
+       (string-append  "\\magfont"
+                       (string-encode-integer (hash (car name-mag) 1000000))
+                       "m"
+                       (string-encode-integer (cdr name-mag)))
 
-(define (tex-scm action-name)
+       )
+  )
+
+(define font-name-alist  '())
+(define (define-fonts names)
+  (set! font-name-alist (map define-font names))
+  (apply string-append (map (lambda (x)
+                       (string-append "\\font" (cdr x) "="
+                                      (symbol->string (caar x))
+                                      " scaled "
+                                      (number->string (magstep (cdar x)))
+                                      "\n"))
+                     font-name-alist
+                     )
+        )
+  )
+  
 
+
+(define (tex-scm action-name)
   (define (unknown) 
     "%\n\\unknown%\n")
 
-  (define font-alist '())
-  (define font-count 0)
-  (define current-font "")
-  (define (clear-fontcache)
-    (begin
-      (set! font-alist '())
-      (set! font-count 0)
-      (set! current-font "")))
-  
-  (define (cached-fontname i)
-    (string-append
-     "\\lilyfont"
-     (make-string 1 (integer->char (+ 65 i)))))
 
-  (define (select-font font-name magnification)
-      (if (not (equal? font-name current-font))
-         (let* ((font-cmd (assoc font-name font-alist)))
-           (set! current-font font-name)
-           (if (eq? font-cmd #f)
-               (begin
-                 (set! font-cmd (cached-fontname font-count))
-                 (set! font-alist (acons font-name font-cmd font-alist))
-                 (set! font-count (+ 1 font-count))
-                 (if (equal? font-name "")
-                     (error "Empty fontname -- SELECT-FONT"))
-                 (if (> magnification 0)
-                     (string-append "\\font" font-cmd "=" font-name 
-                                    " scaled \\magstep " 
-                                    (number->string magnification) font-cmd)
-                     (string-append "\\font" font-cmd "=" font-name font-cmd)))
-               
-               (cdr font-cmd)))
-         ""                            ;no switch needed
-         ))
+  (define (select-font font-name-symbol)
+    (let*
+       (
+        (c (assoc font-name-symbol font-name-alist))
+        )
+
+      (if (eq? c #f)
+         (begin
+           (ly-warn (string-append
+                     "Programming error: No such font known " (car font-name-symbol)))
+           "")                         ; issue no command
+         (cdr c))
+      
+      
+      ))
   
   (define (beam width slope thick)
     (embedded-ps ((ps-scm 'beam) width slope thick)))
   (define (embedded-ps s)
     (string-append "\\embeddedps{" s "}"))
 
+  (define (comment s)
+    (string-append "% " s))
+  
   (define (end-output) 
     "\n\\EndLilyPondOutput")
   
 
   (define (start-line ht)
     (begin
-      (clear-fontcache)
       (string-append"\\vbox to " (number->dim ht) "{\\hbox{%\n"))
     )
   (define (stop-line) 
   (define font-alist '())
   (define font-count 0)
   (define current-font "")
-  (define (clear-fontcache)
-    (begin
-      (set! font-alist '())
-      (set! font-count 0)
-      (set! current-font "")))
+
   
   (define (cached-fontname i)
     (string-append
     
   (define (mag-to-size m)
     (number->string (case m 
-                     ('0 12)
-                     ('1 12)
-                     ('2 14) ; really: 14.400
-                     ('3 17) ; really: 17.280
-                     ('4 21) ; really: 20.736
-                     ('5 24) ; really: 24.888
-                     ('6 30) ; really: 29.856
+                     (0 12)
+                     (1 12)
+                     (2 14) ; really: 14.400
+                     (3 17) ; really: 17.280
+                     (4 21) ; really: 20.736
+                     (5 24) ; really: 24.888
+                     (6 30) ; really: 29.856
                      )))
   
   (define (select-font font-name magnification)
     (string-append
      (numbers->string (list width slope thick)) " draw_beam" ))
 
+  (define (comment s)
+    (string-append "% " s))
+
   (define (bracket arch_angle arch_width arch_height width height arch_thick thick)
     (string-append
      (numbers->string (list arch_angle arch_width arch_height width height arch_thick thick)) " draw_bracket" ))
 
   (define (start-line height)
     (begin
-      (clear-fontcache)
       "\nstart_line {\n"))
   
   (define (stem breapth width depth height) 
index 7daa574c6261c3430b250a3c23c4ed137deb9e06..827d52a5829dc65b17a74b917ac0c4278646ba27 100644 (file)
@@ -370,7 +370,7 @@ if 1:
 
 if 1:
        def conv(str):
-               str =  re.sub ('dynamicDir', 'dynamicDirection', str)
+               str =  re.sub ('dynamicDir\\b', 'dynamicDirection', str)
                        
                return str
 
index d983e9283071c6e52a468247d68d416f61e59c79..b25930520d8b5bb54d4f55278ea8c7b5bf32a24f 100644 (file)
 \def\leftalign#1{\hbox to 0pt{#1\hss}}
 
 \input feta20.tex
-\font\textmusic=cmmi10
-\def\textsharp{\raise.4ex\hbox{\textmusic\char"5D}}
-\def\textnatural{\raise.4ex\hbox{\textmusic\char"5C}}
-\def\textflat{\raise.2ex\hbox{\textmusic\char"5B}}
-
-
-
-
 
 % stacked horizontal lines
 \def\interscoreline{\vskip 16pt}