]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.46
authorfred <fred>
Wed, 27 Mar 2002 02:07:19 +0000 (02:07 +0000)
committerfred <fred>
Wed, 27 Mar 2002 02:07:19 +0000 (02:07 +0000)
buildscripts/clean-fonts.sh
lily/include/lookup.hh
lily/include/porrectus.hh
lily/lookup.cc
lily/porrectus.cc
mf/feta-eindelijk.mf
mf/parmesan-clefs.mf
mf/parmesan-rests.mf
scm/clef.scm

index 395a35cff7d619d46e43e54fe912d2c7d0bb448d..0dc0ff2684a2abe11b24dfdee3c46c9d8e2ad715 100644 (file)
@@ -18,6 +18,8 @@ dirs=".
 /var/spool/texmf
 /var/tmp/texfonts
 /var/texfonts
+/var/cache/fonts
+/usr/share/texmf/fonts
 "
 
 for i in $dirs; do
index 17b8a5e654c47be1975f1026185e305ecc1dcc34..447d0e4eca136637bee867dc583aedbdf8ba01de 100644 (file)
@@ -22,6 +22,8 @@ struct Lookup
   static Molecule accordion (SCM arg, Real interline_f, Font_metric*fm);
   static Molecule frame (Box b, Real thick);
   static Molecule slur (Bezier controls, Real cthick, Real thick) ;
+  static Molecule bezier_sandwich (Bezier, Bezier);
+  static Molecule horizontal_slope (Real, Real, Real);
   static Molecule beam (Real, Real, Real) ;
   static Molecule dashed_slur (Bezier, Real thick, Real dash) ;
   static Molecule blank (Box b) ;
index 9fa037ab9c344950e7f894d67b9450caf27edf36..c2abfbfaaf8a5f4647255680e02d0b9147f518d4 100644 (file)
@@ -30,8 +30,6 @@ private:
   static Molecule brew_mensural_molecule (Item *, Real,
                                          bool, Real, Real,
                                          bool, Direction);
-  static Molecule brew_bezier_sandwich (Bezier, Bezier);
-  static Molecule brew_horizontal_slope (Real, Real, Real);
   static Molecule create_ledger_line (Interval, Grob *);
   static Molecule create_streepjes (Grob *, int, int, Interval);
 };
index 2d832c965b9cdf6694fdb905e4ee07e7d30250b8..8e5c17eb89eb67e1f62bc2268a67cbe919c6b264 100644 (file)
@@ -160,6 +160,90 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
   return Molecule (b, at);
 }
 
+/*
+ * Bezier Sandwich:
+ *
+ *                               .|
+ *                        .       |
+ *              top .             |
+ *              . curve           |
+ *          .                     |
+ *       .                        |
+ *     .                          |
+ *    |                           |
+ *    |                          .|
+ *    |                     .
+ *    |         bottom .
+ *    |            . curve
+ *    |         .
+ *    |      .
+ *    |   .
+ *    | .
+ *    |.
+ *    |
+ *
+ */
+Molecule
+Lookup::bezier_sandwich (Bezier top_curve, Bezier bottom_curve)
+{
+  /*
+    Need the weird order b.o. the way PS want its arguments  
+   */
+  SCM list = SCM_EOL;
+  list = gh_cons (ly_offset2scm (bottom_curve.control_[3]), list);
+  list = gh_cons (ly_offset2scm (bottom_curve.control_[0]), list);
+  list = gh_cons (ly_offset2scm (bottom_curve.control_[1]), list);
+  list = gh_cons (ly_offset2scm (bottom_curve.control_[2]), list);
+  list = gh_cons (ly_offset2scm (top_curve.control_[0]), list);
+  list = gh_cons (ly_offset2scm (top_curve.control_[3]), list);
+  list = gh_cons (ly_offset2scm (top_curve.control_[2]), list);
+  list = gh_cons (ly_offset2scm (top_curve.control_[1]), list);
+
+  SCM horizontal_bend = scm_list_n (ly_symbol2scm ("bezier-sandwich"),
+                                   ly_quote_scm (list),
+                                   gh_double2scm (0.0),
+                                   SCM_UNDEFINED);
+
+  Interval x_extent = top_curve.extent (X_AXIS);
+  x_extent.unite (bottom_curve.extent (X_AXIS));
+  Interval y_extent = top_curve.extent (Y_AXIS);
+  y_extent.unite (bottom_curve.extent (Y_AXIS));
+  Box b (x_extent, y_extent);
+
+  return Molecule (b, horizontal_bend);
+}
+
+/*
+ * Horizontal Slope:
+ *
+ *            /|   ^
+ *           / |   |
+ *          /  |   | height
+ *         /   |   |
+ *        /    |   v
+ *       |    /
+ *       |   /
+ * (0,0) x  /slope=dy/dx
+ *       | /
+ *       |/
+ *
+ *       <----->
+ *        width
+ */
+Molecule
+Lookup::horizontal_slope (Real width, Real slope, Real height)
+{
+  SCM width_scm = gh_double2scm (width);
+  SCM slope_scm = gh_double2scm (slope);
+  SCM height_scm = gh_double2scm (height);
+  SCM horizontal_slope = scm_list_n (ly_symbol2scm ("beam"),
+                                    width_scm, slope_scm,
+                                    height_scm, SCM_UNDEFINED);
+  Box b (Interval (0, width),
+        Interval (-height/2, height/2 + width*slope));
+  return Molecule (b, horizontal_slope);
+}
+
 /*
   TODO: junk me.
  */
index 2bdbcd53d407efd6612cac2f1f9b73ba3be739c8..d52d871d68953b95eea455515eab9031c89361cb 100644 (file)
@@ -362,7 +362,7 @@ Porrectus::brew_vaticana_molecule (Item *me,
   if (solid)
     {
       Molecule solid_head =
-       brew_bezier_sandwich (top_curve, bottom_curve);
+       Lookup::bezier_sandwich (top_curve, bottom_curve);
       molecule.add_molecule (solid_head);
     }
   else // outline
@@ -370,13 +370,13 @@ Porrectus::brew_vaticana_molecule (Item *me,
       Bezier inner_top_curve = top_curve;
       inner_top_curve.translate (Offset (0.0, -thickness));
       Molecule top_edge =
-       brew_bezier_sandwich (top_curve, inner_top_curve);
+       Lookup::bezier_sandwich (top_curve, inner_top_curve);
       molecule.add_molecule(top_edge);
 
       Bezier inner_bottom_curve = bottom_curve;
       inner_bottom_curve.translate (Offset (0.0, +thickness));
       Molecule bottom_edge =
-       brew_bezier_sandwich (bottom_curve, inner_bottom_curve);
+       Lookup::bezier_sandwich (bottom_curve, inner_bottom_curve);
       molecule.add_molecule(bottom_edge);
 
       // TODO: Use horizontal slope with proper slope value rather
@@ -452,117 +452,31 @@ Porrectus::brew_mensural_molecule (Item *me,
   if (solid)
     {
       Molecule solid_head =
-       brew_horizontal_slope (width, corrected_slope, height);
+       Lookup::horizontal_slope (width, corrected_slope, height);
       molecule.add_molecule (solid_head);
     }
   else // outline
     {
       Molecule left_edge =
-         brew_horizontal_slope (thickness, corrected_slope, height);
+       Lookup::horizontal_slope (thickness, corrected_slope, height);
       molecule.add_molecule(left_edge);
 
       Molecule right_edge =
-         brew_horizontal_slope (thickness, corrected_slope, height);
+       Lookup::horizontal_slope (thickness, corrected_slope, height);
       right_edge.translate_axis (width-thickness, X_AXIS);
       right_edge.translate_axis (corrected_slope * (width-thickness), Y_AXIS);
       molecule.add_molecule(right_edge);
 
       Molecule bottom_edge =
-         brew_horizontal_slope (width, corrected_slope, thickness);
+       Lookup::horizontal_slope (width, corrected_slope, thickness);
       bottom_edge.translate_axis (-0.5*height, Y_AXIS);
       molecule.add_molecule (bottom_edge);
 
       Molecule top_edge =
-         brew_horizontal_slope (width, corrected_slope, thickness);
+       Lookup::horizontal_slope (width, corrected_slope, thickness);
       top_edge.translate_axis (+0.5*height, Y_AXIS);
       molecule.add_molecule (top_edge);
     }
   molecule.translate_axis (ypos_correction, Y_AXIS);
   return molecule;
 }
-
-/*
- * Bezier Sandwich:
- *
- *                               .|
- *                        .       |
- *              top .             |
- *              . curve           |
- *          .                     |
- *       .                        |
- *     .                          |
- *    |                           |
- *    |                          .|
- *    |                     .
- *    |         bottom .
- *    |            . curve
- *    |         .
- *    |      .
- *    |   .
- *    | .
- *    |.
- *    |
- *
- */
-// TODO: Move this to class Lookup?
-Molecule
-Porrectus::brew_bezier_sandwich (Bezier top_curve, Bezier bottom_curve)
-{
-  /*
-    Need the weird order b.o. the way PS want its arguments  
-   */
-  SCM list = SCM_EOL;
-  list = gh_cons (ly_offset2scm (bottom_curve.control_[3]), list);
-  list = gh_cons (ly_offset2scm (bottom_curve.control_[0]), list);
-  list = gh_cons (ly_offset2scm (bottom_curve.control_[1]), list);
-  list = gh_cons (ly_offset2scm (bottom_curve.control_[2]), list);
-  list = gh_cons (ly_offset2scm (top_curve.control_[0]), list);
-  list = gh_cons (ly_offset2scm (top_curve.control_[3]), list);
-  list = gh_cons (ly_offset2scm (top_curve.control_[2]), list);
-  list = gh_cons (ly_offset2scm (top_curve.control_[1]), list);
-
-  SCM horizontal_bend = scm_list_n (ly_symbol2scm ("bezier-sandwich"),
-                                   ly_quote_scm (list),
-                                   gh_double2scm (0.0),
-                                   SCM_UNDEFINED);
-
-  Interval x_extent = top_curve.extent (X_AXIS);
-  x_extent.unite (bottom_curve.extent (X_AXIS));
-  Interval y_extent = top_curve.extent (Y_AXIS);
-  y_extent.unite (bottom_curve.extent (Y_AXIS));
-  Box b (x_extent, y_extent);
-
-  return Molecule (b, horizontal_bend);
-}
-
-/*
- * Horizontal Slope:
- *
- *            /|   ^
- *           / |   |
- *          /  |   | height
- *         /   |   |
- *        /    |   v
- *       |    /
- *       |   /
- * (0,0) x  /slope=dy/dx
- *       | /
- *       |/
- *
- *       <----->
- *        width
- */
-// TODO: Move this to class Lookup?
-Molecule
-Porrectus::brew_horizontal_slope (Real width, Real slope, Real height)
-{
-  SCM width_scm = gh_double2scm (width);
-  SCM slope_scm = gh_double2scm (slope);
-  SCM height_scm = gh_double2scm (height);
-  SCM horizontal_slope = scm_list_n (ly_symbol2scm ("beam"),
-                                    width_scm, slope_scm,
-                                    height_scm, SCM_UNDEFINED);
-  Box b (Interval (0, width),
-        Interval (-height/2, height/2 + width*slope));
-  return Molecule (b, horizontal_slope);
-}
index 648d26dd9465d2c79d6ba57ec750224e8a841d7d..5192fe3a7f4d9efa261b46bf4401c89e41a871cb 100644 (file)
@@ -442,6 +442,13 @@ def neomens_half_block_rest =
        draw_block ((0,0), (neomens_block_rest_x, neomens_half_block_rest_y));
        enddef;
 
+fet_beginchar("Neo-mensural maxima rest", "-3neo_mensural", "neomensmaximarest");
+       set_char_box(0, neomens_block_rest_x#,
+                   neomens_block_rest_y#, 2 neomens_block_rest_y#);
+       draw_block ((0,-neomens_block_rest_y),
+                  (neomens_block_rest_x, 2 neomens_block_rest_y));
+fet_endchar;
+
 fet_beginchar("Neo-mensural longa rest", "-2neo_mensural", "neomenslongarest");
        set_char_box(0, neomens_block_rest_x#,
                    neomens_block_rest_y#, neomens_block_rest_y#);
index a3bc41f4497cc538d1f3f4e33156afc36377a3e9..de7bb2af77b4f09b338f8c23b33c39852ee9031c 100644 (file)
@@ -326,19 +326,21 @@ fet_beginchar("neo-mensural c clef", "neo_mensural_c_change", "cneomenscclef")
 fet_endchar;
 
 
-def draw_petrucci_c_clef(expr exact_center, reduction) = 
+def draw_petrucci_c_clef(expr exact_center, flare_align, reduction) = 
        % inspired by Josquin Desprez, "Stabat Mater", Libro tertio,
        % 1519, printed by Petrucci, in: MGG, volume 7, Table 11.
        draw_brevis(exact_center, reduction, true, true);
 
-       save reduced_il, reduced_slt;
+       save half_reduced_il, reduced_il, reduced_slt;
        save stem_width, interline;
 
+       half_reduced_il# = staff_space# * sqrt(reduction);
        reduced_il# = staff_space# * reduction;
        reduced_slt# = stafflinethickness# * reduction;
        stem_width# = 1.4 reduced_slt#;
        interline# = staff_space#;
 
+       define_pixels(half_reduced_il);
        define_pixels(reduced_il);
        define_pixels(reduced_slt);
        define_pixels(stem_width);
@@ -347,41 +349,88 @@ def draw_petrucci_c_clef(expr exact_center, reduction) =
        addto currentpicture also currentpicture
                yscaled -1 shifted (0, 2*(ypart exact_center) - interline);
 
-       pickup pencircle xscaled stem_width yscaled blot_diameter;
-       z6 = exact_center + (stem_width/2, 0);
-       z7 = z6 + (0, -2.2reduced_il);
-       draw z6 .. z7;
-
        addto currentpicture also currentpicture 
-               xscaled -1 shifted (2x4l,0);
-
-       z8 = exact_center + (stem_width/2, 0);
-       z9 = z8 + (0, -3.2reduced_il);
-       draw z8 .. z9;
+               xscaled -1 shifted (reduction*2x4l,0);
 
        addto currentpicture also currentpicture
                yscaled -1 shifted (0, 4*(ypart exact_center));
 
+       pickup pencircle xscaled stem_width yscaled blot_diameter;
+
+       xpart z6 = xpart z7 = xpart exact_center + stem_width/2;
+       ypart z6 = ypart exact_center +
+                  min(3.2, 3.2 + 0.2 + flare_align)*half_reduced_il;
+       ypart z7 = ypart exact_center -
+                  min(3.2, 3.2 + 0.2 - flare_align)*half_reduced_il;
+       draw z6 .. z7;
+
+       xpart z8 = xpart z9 = reduction*2x4l - xpart exact_center - stem_width/2;
+       ypart z8 = min(ypart z6 - 0.2*half_reduced_il,
+                      xpart exact_center + 2.2half_reduced_il);
+       ypart z9 = max(ypart z7 + 0.2*half_reduced_il,
+                      xpart exact_center - 2.2half_reduced_il);
+       draw z8 .. z9;
+
        set_char_box(0, 2head_width#,
                     noteheight#*4*reduction, noteheight#*4*reduction);
 enddef;
 
 
-fet_beginchar("petrucci c clef", "petrucci_c", "petruccicclef")
+fet_beginchar("petrucci c1 clef", "petrucci_c1", "petruccic1clef")
+       if test = 1:
+               draw_staff(-1,3, 0.0);
+       fi;
+       draw_petrucci_c_clef((0,0), +2, 1.0);
+fet_endchar;
+fet_beginchar("petrucci c1 clef", "petrucci_c1_change", "cpetruccic1clef")
+       draw_petrucci_c_clef((1.3 staff_space#,0), +2, .8);
+fet_endchar;
+
+fet_beginchar("petrucci c2 clef", "petrucci_c2", "petruccic2clef")
+       if test = 1:
+               draw_staff(-1,3, 0.0);
+       fi;
+       draw_petrucci_c_clef((0,0), +1, 1.0);
+fet_endchar;
+fet_beginchar("petrucci c2 clef", "petrucci_c2_change", "cpetruccic2clef")
+       draw_petrucci_c_clef((1.3 staff_space#,0), +1, .8);
+fet_endchar;
+
+fet_beginchar("petrucci c3 clef", "petrucci_c3", "petruccic3clef")
+       if test = 1:
+               draw_staff(-1,3, 0.0);
+       fi;
+       draw_petrucci_c_clef((0,0), 0, 1.0);
+fet_endchar;
+fet_beginchar("petrucci c3 clef", "petrucci_c3_change", "cpetruccic3clef")
+       draw_petrucci_c_clef((1.3 staff_space#,0), 0, .8);
+fet_endchar;
+
+fet_beginchar("petrucci c4 clef", "petrucci_c4", "petruccic4clef")
+       if test = 1:
+               draw_staff(-1,3, 0.0);
+       fi;
+       draw_petrucci_c_clef((0,0), -1, 1.0);
+fet_endchar;
+fet_beginchar("petrucci c4 clef", "petrucci_c4_change", "cpetruccic4clef")
+       draw_petrucci_c_clef((1.3 staff_space#,0), -1, .8);
+fet_endchar;
+
+fet_beginchar("petrucci c5 clef", "petrucci_c5", "petruccic5clef")
        if test = 1:
                draw_staff(-1,3, 0.0);
        fi;
-       draw_petrucci_c_clef((0,0), 1.0);
+       draw_petrucci_c_clef((0,0), -2, 1.0);
 fet_endchar;
-fet_beginchar("petrucci c clef", "petrucci_c_change", "cpetruccicclef")
-       draw_petrucci_c_clef((1.3 staff_space#,0), .8);
+fet_beginchar("petrucci c5 clef", "petrucci_c5_change", "cpetruc5iceclef")
+       draw_petrucci_c_clef((1.3 staff_space#,0), -2, .8);
 fet_endchar;
 
 
 def draw_mensural_c_clef(expr exact_center, reduction) =
        % inspired by Ockeghem, "Missa Prolationum", in: MGG, volume
        % 9, table 94.
-       draw_petrucci_c_clef(exact_center, reduction);
+       draw_petrucci_c_clef(exact_center, 0, reduction);
 
        addto currentpicture also currentpicture
                shifted (0, -interline);
index 55a526dea90f38f8a021977b0390f78c0867bae8..db96bc7fcbfd8184358fb3b5d7fcb4422c994993 100644 (file)
@@ -18,7 +18,7 @@ fet_begingroup("rests")
 %
 %
 
-pen_width# = 2/5 staff_space#;
+pen_width# = 0.3 staff_space#;
 pen_height# = 0;
 pen_rotation = 30;
 slight_pen_rotation = 15;
@@ -29,8 +29,18 @@ mens_half_block_rest_y# = 5/8 staff_space#;
 define_pixels(mens_block_rest_y, mens_half_block_rest_y,
              pen_width, pen_height);
 
+fet_beginchar("Mensural maxima rest", "-3mensural", "mensmaximarest");
+       set_char_box(0.7pen_width#, 0.7pen_width#,
+                    mens_block_rest_y#, 2mens_block_rest_y#);
+       pickup pencircle
+               xscaled pen_width
+               yscaled pen_height
+               rotated slight_pen_rotation;
+       draw (0, -mens_block_rest_y) -- (0, 2 mens_block_rest_y);
+fet_endchar;
+
 fet_beginchar("Mensural longa rest", "-2mensural", "menslongarest");
-       set_char_box(pen_width#/2, pen_width#/2,
+       set_char_box(0.7pen_width#, 0.7pen_width#,
                     mens_block_rest_y#, mens_block_rest_y#);
        pickup pencircle
                xscaled pen_width
@@ -40,7 +50,7 @@ fet_beginchar("Mensural longa rest", "-2mensural", "menslongarest");
 fet_endchar;
 
 fet_beginchar("Mensural breve rest", "-1mensural", "mensbreverest");
-       set_char_box(pen_width#/2, pen_width#/2,
+       set_char_box(0.7pen_width#, 0.7pen_width#,
                     0, mens_block_rest_y#);
        pickup pencircle
                xscaled pen_width
@@ -50,7 +60,7 @@ fet_beginchar("Mensural breve rest", "-1mensural", "mensbreverest");
 fet_endchar;
 
 fet_beginchar("Mensural whole rest", "0mensural", "menssemibrevisrest");
-       set_char_box(pen_width#/2, pen_width#/2,
+       set_char_box(0.7pen_width#, 0.7pen_width#,
                     mens_half_block_rest_y#, 0);
        pickup pencircle
                xscaled pen_width
@@ -60,7 +70,7 @@ fet_beginchar("Mensural whole rest", "0mensural", "menssemibrevisrest");
 fet_endchar;
 
 fet_beginchar("Mensural half rest", "1mensural", "mensminimahalfrest");
-       set_char_box(pen_width#/2, pen_width#/2,
+       set_char_box(0.7pen_width#, 0.7pen_width#,
                     0, mens_half_block_rest_y#);
        pickup pencircle
                xscaled pen_width
index f4e77dde0744d2ee9cdba3a4a0159aa3c618b155..50d853c0df2315e68d5d083093ad7af9502aa577 100644 (file)
          ("neo_mensural_c2" . ("clefs-neo_mensural_c" -2 0))
          ("neo_mensural_c3" . ("clefs-neo_mensural_c" 0 0))
          ("neo_mensural_c4" . ("clefs-neo_mensural_c" 2 0))
-         ("petrucci_c1" . ("clefs-petrucci_c" -4 0))
-         ("petrucci_c2" . ("clefs-petrucci_c" -2 0))
-         ("petrucci_c3" . ("clefs-petrucci_c" 0 0))
-         ("petrucci_c4" . ("clefs-petrucci_c" 2 0))
-         ("petrucci_c5" . ("clefs-petrucci_c" 4 0))
+         ("petrucci_c1" . ("clefs-petrucci_c1" -4 0))
+         ("petrucci_c2" . ("clefs-petrucci_c2" -2 0))
+         ("petrucci_c3" . ("clefs-petrucci_c3" 0 0))
+         ("petrucci_c4" . ("clefs-petrucci_c4" 2 0))
+         ("petrucci_c5" . ("clefs-petrucci_c5" 4 0))
          ("petrucci_f" . ("clefs-petrucci_f" 2 0))
          ("petrucci_g" . ("clefs-petrucci_g" -2 0))
        )
     ("clefs-mensural_f" . 4)
     ("clefs-mensural_g" . -4)
     ("clefs-neo_mensural_c" . 0)
-    ("clefs-petrucci_c" . 0)
+    ("clefs-petrucci_c1" . 0)
+    ("clefs-petrucci_c2" . 0)
+    ("clefs-petrucci_c3" . 0)
+    ("clefs-petrucci_c4" . 0)
+    ("clefs-petrucci_c5" . 0)
     ("clefs-petrucci_f" . 4)
     ("clefs-petrucci_g" . -4)
   )