From: fred Date: Wed, 27 Mar 2002 02:07:19 +0000 (+0000) Subject: lilypond-1.5.46 X-Git-Tag: release/1.5.59~235 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ec670ce3b2f760b8c7c96152f2da83b38664aee2;p=lilypond.git lilypond-1.5.46 --- diff --git a/buildscripts/clean-fonts.sh b/buildscripts/clean-fonts.sh index 395a35cff7..0dc0ff2684 100644 --- a/buildscripts/clean-fonts.sh +++ b/buildscripts/clean-fonts.sh @@ -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 diff --git a/lily/include/lookup.hh b/lily/include/lookup.hh index 17b8a5e654..447d0e4eca 100644 --- a/lily/include/lookup.hh +++ b/lily/include/lookup.hh @@ -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) ; diff --git a/lily/include/porrectus.hh b/lily/include/porrectus.hh index 9fa037ab9c..c2abfbfaaf 100644 --- a/lily/include/porrectus.hh +++ b/lily/include/porrectus.hh @@ -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); }; diff --git a/lily/lookup.cc b/lily/lookup.cc index 2d832c965b..8e5c17eb89 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -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. */ diff --git a/lily/porrectus.cc b/lily/porrectus.cc index 2bdbcd53d4..d52d871d68 100644 --- a/lily/porrectus.cc +++ b/lily/porrectus.cc @@ -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); -} diff --git a/mf/feta-eindelijk.mf b/mf/feta-eindelijk.mf index 648d26dd94..5192fe3a7f 100644 --- a/mf/feta-eindelijk.mf +++ b/mf/feta-eindelijk.mf @@ -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#); diff --git a/mf/parmesan-clefs.mf b/mf/parmesan-clefs.mf index a3bc41f449..de7bb2af77 100644 --- a/mf/parmesan-clefs.mf +++ b/mf/parmesan-clefs.mf @@ -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); diff --git a/mf/parmesan-rests.mf b/mf/parmesan-rests.mf index 55a526dea9..db96bc7fcb 100644 --- a/mf/parmesan-rests.mf +++ b/mf/parmesan-rests.mf @@ -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 diff --git a/scm/clef.scm b/scm/clef.scm index f4e77dde07..50d853c0df 100644 --- a/scm/clef.scm +++ b/scm/clef.scm @@ -49,11 +49,11 @@ ("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)) ) @@ -78,7 +78,11 @@ ("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) )