From 61ee7945d9182a455f43fe565c23b858d81da134 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 02:05:20 +0000 Subject: [PATCH] lilypond-1.5.31 --- config.hh.in | 3 ++ configure.in | 2 +- mf/feta-bolletjes.mf | 18 ++--------- mf/feta-eindelijk.mf | 4 +-- mf/feta-klef.mf | 6 ++-- mf/feta-macros.mf | 51 +++++++++++++++++++----------- mf/feta-params.mf | 2 +- mf/feta-puntje.mf | 12 +++---- mf/feta-schrift.mf | 74 ++++++++++++-------------------------------- mf/feta-toevallig.mf | 11 +++---- python/midi.c | 2 ++ 11 files changed, 78 insertions(+), 107 deletions(-) diff --git a/config.hh.in b/config.hh.in index 972377ac50..fd68a01406 100644 --- a/config.hh.in +++ b/config.hh.in @@ -41,6 +41,9 @@ /* define if you have kpse_find_tfm */ #define HAVE_KPSE_FIND_TFM 0 +/* define if you have python2.2/Python.h header */ +#define HAVE_PYTHON2_2_PYTHON_H 0 + /* define if you have python2.1/Python.h header */ #define HAVE_PYTHON2_1_PYTHON_H 0 diff --git a/configure.in b/configure.in index 687edd4e4a..e7a5ea11b1 100644 --- a/configure.in +++ b/configure.in @@ -52,7 +52,7 @@ AC_STEPMAKE_MAKEINFO AC_PATH_PROG(PERL, perl, error) -AC_HAVE_HEADERS(python2.1/Python.h python2.0/Python.h python2/Python.h python/Python.h python1.5/Python.h Python.h) +AC_HAVE_HEADERS(python2.2/Python.h python2.1/Python.h python2.0/Python.h python2/Python.h python/Python.h python1.5/Python.h Python.h) AC_STEPMAKE_END diff --git a/mf/feta-bolletjes.mf b/mf/feta-bolletjes.mf index 9e24390594..d59e748b5f 100644 --- a/mf/feta-bolletjes.mf +++ b/mf/feta-bolletjes.mf @@ -121,8 +121,8 @@ fet_beginchar ("Brevis notehead", "-1", "brevishead"); y4 = y2; y3 = y1; - draw z1 -- z2; - draw z3 -- z4; + draw_gridline(z1,z2,stemthick); + draw_gridline(z3,z4,stemthick); fet_endchar; % whole note @@ -431,19 +431,7 @@ fet_endchar; fet_beginchar("Ledger ending", "ledgerending", "ledgerending") set_char_box (5/2 ledgerlinethickness#, 5/2 ledgerlinethickness#, ledgerlinethickness#/2,ledgerlinethickness#/2); - pickup pencircle scaled 1.3 blot_diameter; - - rt x2 = w; - lft x1 = -b; - x3 = x2; - bot y1 = -d; - y2 = y1; - - top y3 = h; - y4 = y3; - x4 = x1; - - filldraw z1 --- z2 --- z3 --- z4 --- cycle ; + draw_rounded_block((-b,-d),(w,h),1.3 blot_diameter); fet_endchar; diff --git a/mf/feta-eindelijk.mf b/mf/feta-eindelijk.mf index 55b73ee4a2..f81107f1c8 100644 --- a/mf/feta-eindelijk.mf +++ b/mf/feta-eindelijk.mf @@ -73,7 +73,7 @@ fet_beginchar( "whole rest (outside staff)", "0o", "outsidewholerest"); y5 = y6 = 0; lft x5 = - b - block_rest_y; rt x6 = w + block_rest_y; - draw z5 .. z6; + draw_gridline(z5,z6,ledgerlinethickness); fet_endchar; fet_beginchar("half rest (outside staff)", "1o", "outsidehalfrest"); @@ -84,7 +84,7 @@ fet_beginchar("half rest (outside staff)", "1o", "outsidehalfrest"); y5 = y6 = 0; lft x5 = - b - block_rest_y ; rt x6 = w + block_rest_y; - draw z5 .. z6; + draw_gridline (z5,z6,ledgerlinethickness); fet_endchar; diff --git a/mf/feta-klef.mf b/mf/feta-klef.mf index cf05a663a5..39e8f6ee5d 100644 --- a/mf/feta-klef.mf +++ b/mf/feta-klef.mf @@ -147,10 +147,10 @@ def draw_bass_clef(expr exact_center, reduction) = penlabels(1,2,3,4); save dot_diam; - 2 dot_diam = reduction* (staff_space - stafflinethickness); + 2 dot_diam = round reduction* (staff_space - stafflinethickness); pickup pencircle scaled dot_diam; - draw z5; - draw z5 yscaled -1; + drawdot z5; + drawdot z5 yscaled -1; enddef; diff --git a/mf/feta-macros.mf b/mf/feta-macros.mf index 6fa8d3a3e6..26320c6a6b 100644 --- a/mf/feta-macros.mf +++ b/mf/feta-macros.mf @@ -117,26 +117,41 @@ def distorted_ellipse(expr a,b,err_y,err_x,super) = superellipse((a,err_x),(-err_y,b),(-a,-err_x),(err_y,-b),super); enddef; -% stolen from feta-eindelijk, but still -% FIXME: too high -def draw_block (expr bottom_left, top_right) = - pickup pencircle scaled blot_diameter; - begingroup; - save x,y; - bot y1 = ypart bottom_left; - top y2 = ypart top_right; - y3 = y2; - y4 = y1; - rt x1 = xpart top_right; - x2 = x1; - lft x3 = xpart bottom_left; - x4 = x3; - - filldraw z1--z2--z3--z4--cycle; - endgroup; - enddef; +def draw_rounded_block (expr bottom_left, top_right, roundness) = + save round; + round = floor min(roundness,xpart (top_right-bottom_left), + ypart (top_right-bottom_left)); + + + pickup pencircle scaled round; + + begingroup; + save x,y; + z2+(round/2,round/2) = top_right; + z4-(round/2,round/2) = bottom_left; + y3 = y2; + y4 = y1; + x2 = x1; + x4 = x3; + fill bot z1 .. rt z1 --- rt z2 .. top z2 --- + top z3 .. lft z3 --- lft z4 .. bot z4 --- cycle; + endgroup; + enddef; + + + + def draw_block (expr bottom_left, top_right) = + draw_rounded_block (bottom_left, top_right, blot_diameter); + enddef; + + def draw_gridline (expr bottom_left,top_right,thickness) = + draw_rounded_block (bottom_left-(thickness/2,thickness/2), + top_right+(thickness/2,thickness/2), + thickness); + enddef; + def draw_brush(expr a,w,b,v) = save x,y; diff --git a/mf/feta-params.mf b/mf/feta-params.mf index b9c9d9924b..2f793da494 100644 --- a/mf/feta-params.mf +++ b/mf/feta-params.mf @@ -41,7 +41,7 @@ overdone_heads = 0.0; % FIXME: According to [Wanske], only outside corners should be round % I don't think we do this anywhere -- jcn numeric blot_diameter; -blot_diameter# = .4pt#; +blot_diameter# = .45pt#; if (blot_diameter# * hppp) < 1: blot_diameter# := 1/hppp; fi diff --git a/mf/feta-puntje.mf b/mf/feta-puntje.mf index ad04883de9..fbd7c6a9db 100644 --- a/mf/feta-puntje.mf +++ b/mf/feta-puntje.mf @@ -1,13 +1,13 @@ fet_begingroup("dots"); -save dot_diam; -2 dot_diam# = staff_space# - stafflinethickness#; -define_pixels(dot_diam); +save dot_radius; +4 dot_radius# = staff_space# - stafflinethickness#; +define_whole_blacker_pixels(dot_radius); fet_beginchar("duration dot","dot", "dot") - pickup pencircle scaled dot_diam; - drawdot (dot_diam/2,0); - set_char_box(0, dot_diam#, dot_diam#/2, dot_diam#/2); + pickup pencircle scaled dot_radius; + drawdot (dot_radius,0); + set_char_box(0, 2*dot_radius#, dot_radius#, dot_radius#); fet_endchar; fet_endgroup("dots"); diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index b9bc92b634..bb9df75307 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -12,7 +12,7 @@ fet_begingroup("scripts") def draw_fermata = - save alpha, radius, crook_thinness, crook_fatness, dot_diam; + save alpha, radius, crook_thinness, crook_fatness, dot_radius; % [Wanske] and some Baerenreiter editions % suggest ca 80 degrees iso half-circle @@ -27,7 +27,7 @@ def draw_fermata = set_char_box(w#, w#, crook_thinness#/2, h#); define_pixels(radius, crook_thinness, crook_fatness); - dot_diam = 4/3 crook_fatness; + dot_radius = round (4/6 crook_fatness); penpos1(crook_thinness, 0); @@ -41,10 +41,10 @@ def draw_fermata = addto currentpicture also currentpicture xscaled -1; - pickup pencircle scaled dot_diam; + pickup pencircle scaled 2dot_radius; x4 =0; bot y4 = - crook_thinness/2; - draw z4; + drawdot z4; enddef; fet_beginchar("fermata up", "ufermata", "ufermata") @@ -134,9 +134,9 @@ fet_endchar; fet_beginchar("staccato dot", "staccato", "staccato") save radius; radius# = 1.4 stafflinethickness#; - define_pixels(radius); + define_whole_pixels(radius); pickup pencircle scaled 2 radius; - draw (0,0); + drawdot (0,0); set_char_box(radius#, radius#, radius#, radius#); fet_endchar; @@ -144,7 +144,8 @@ def draw_staccatissimo = save radius, height; height# = .8 staff_space#; radius# = 2 stafflinethickness#; - define_pixels(radius, height); + define_whole_pixels(radius); + define_pixels(height); draw_brush((0,0), stafflinethickness, (0, height),2 radius); set_char_box(radius#,radius#, blot_diameter#/2, height# + radius#); @@ -166,14 +167,11 @@ fet_endchar; fet_beginchar("portato/single tenuto", "tenuto", "tenuto") save thick; thick# = 1.4 stafflinethickness#; - define_pixels(thick); + define_whole_pixels(thick); set_char_box(.6 staff_space#, .6 staff_space#, thick#/2,thick#/2); pickup pencircle scaled thick; - lft x1 = -b; - rt x2 = w; - y1 = y2 = 0; - draw z1 .. z2; + draw_rounded_block((-b,-thick/2),(w,thick/2),thick); fet_endchar; @@ -184,19 +182,14 @@ fet_endchar; def draw_portato = save thick, radius; thick# = 1.4 stafflinethickness#; - define_pixels(thick); radius# = 1.4 stafflinethickness#; - define_pixels(radius); + define_whole_pixels(thick,radius); set_char_box(.6 staff_space#, .6 staff_space#, thick#/2,.5 staff_space#+ radius#); - pickup pencircle scaled thick; - lft x1 = -b; - rt x2 = w; - y1 = y2 = 0; - draw z1 .. z2; + draw_rounded_block((-b,-thick/2),(w,thick/2),thick); pickup pencircle scaled 2 radius; - draw (0,h); + drawdot (0,h); enddef; @@ -280,14 +273,8 @@ fet_beginchar("plus (stopped)", "stopped", "plusstop") size# = 1.1 staff_space#; set_char_box(size#/2, size#/2, size#/2, size#/2); - pickup pencircle scaled thick; - - rt x1 = w; - y1 = 0; - z2 = -z1; - - draw z1 .. z2; - draw (z1 .. z2) rotated 90; + draw_rounded_block((-b,-thick/2),(w,thick/2),thick); + addto currentpicture also currentpicture rotated 90; fet_endchar; % @@ -316,37 +303,17 @@ fet_endchar; fet_beginchar("Downbow", "downbow", "downbow") save stemthick, beamheight; - save wd; + save wd,round; define_pixels(wd) wd# = 1.5 staff_space#; stemthick = 1.2 stafflinethickness; - set_char_box(wd#/2, wd#/2, 0, 4/3 staff_space#); beamheight = 4/10 h; - - pickup pencircle scaled blot_diameter; - top y2 - bot y1 = beamheight; - top y2 = h; - rt x1 = w; - x1 = x2; - y2 = y3; - y1 = y4; - x3 = 0; - x4 = x3; - save p; - path p; - filldraw z1 -- z2 -- z3 -- z4 --cycle; - - pickup pencircle scaled stemthick; - - bot y5 =0; - rt x5 = rt x6 = w; - y6 = h - beamheight; - draw z6 -- z5; - labels(1, 2,3,4,5,6); + draw_rounded_block((-b,h-beamheight),(w,h),blot_diameter); + draw_rounded_block((-b,-d),(-b+stemthick,h-stemthick),stemthick); addto currentpicture also currentpicture xscaled -1; fet_endchar; @@ -716,9 +683,8 @@ fet_beginchar("Coda", "coda", "coda") fill halfcoda; fill (halfcoda scaled -1); - pickup pencircle scaled thin; - draw (0,-h) -- (0,h); - draw (-w,0) -- (w,0); + draw_gridline((0,-h),(0,h),thin); + draw_gridline((-w,0),(w,0),thin); fet_endchar; diff --git a/mf/feta-toevallig.mf b/mf/feta-toevallig.mf index a71a57aaab..ed316e66f0 100644 --- a/mf/feta-toevallig.mf +++ b/mf/feta-toevallig.mf @@ -66,19 +66,16 @@ fet_beginchar("Sharp" , "1", "sharp"); pickup pencircle scaled roundness; filldraw (beam shifted (0,-interbeam/2)); - filldraw (beam shifted (0,interbeam/2)); pickup pencircle scaled stemwidth; x3 = x4 = xpart center; bot y3 = -1.5 staff_space + ypart center; top y4 = 1.5 staff_space + ypart center; - path stem; - stem := z3 .. z4; numeric xs; xs := interstem* beamwidth / 2; - draw stem shifted (- xs, - xs* beamslope); - draw stem shifted (xs , xs *beamslope); + draw_gridline (z3-(xs,xs* beamslope),z4-(xs,xs*beamslope),stemwidth); + addto currentpicture also currentpicture rotated 180 shifted (w,0); labels(1,2,3,4); fet_endchar; @@ -111,8 +108,8 @@ fet_beginchar( "Natural", "0", "natural") top y3 = 1.5 staff_space; top y4 = beamtop; - draw (xpart z1, -y4) .. z3; - draw (xpart z2, -y3) .. z4; + draw_gridline((xpart z1, -y4),z3,stemwidth); + draw_gridline((xpart z2, -y3),z4,stemwidth); labels(1,2,3,4); fet_endchar; diff --git a/python/midi.c b/python/midi.c index a5fab33c30..0026201651 100644 --- a/python/midi.c +++ b/python/midi.c @@ -23,6 +23,8 @@ midi.parse (s) /* urg */ #if HAVE_PYTHON2_PYTHON_H #include +#elif HAVE_PYTHON2_2_PYTHON_H +#include #elif HAVE_PYTHON2_1_PYTHON_H #include #elif HAVE_PYTHON2_0_PYTHON_H -- 2.39.5