]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.31
authorfred <fred>
Wed, 27 Mar 2002 02:05:20 +0000 (02:05 +0000)
committerfred <fred>
Wed, 27 Mar 2002 02:05:20 +0000 (02:05 +0000)
config.hh.in
configure.in
mf/feta-bolletjes.mf
mf/feta-eindelijk.mf
mf/feta-klef.mf
mf/feta-macros.mf
mf/feta-params.mf
mf/feta-puntje.mf
mf/feta-schrift.mf
mf/feta-toevallig.mf
python/midi.c

index 972377ac504e1a05ffb15c853d68f3e4e3c1e395..fd68a01406c611406c519b9967b4e2840a6b14e1 100644 (file)
@@ -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
 
index 687edd4e4a5877fa25c54fcd9ffb6d8c2265de4e..e7a5ea11b137fa0e6fceafc7313b23ab89a835f3 100644 (file)
@@ -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
index 9e24390594de359ced0b7de39eb504240c1fd3fc..d59e748b5f617de8db80216c3a5c1ed06f1fc1a8 100644 (file)
@@ -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;
 
 
index 55b73ee4a257085d83f177f1ff82415fb72e7cc8..f81107f1c82efb6a90d8d39b094e2a728766f229 100644 (file)
@@ -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;
 
 
index cf05a663a5c393aa38ef8d382a765e056ce0f247..39e8f6ee5da62f0f56286d4647e65b7d3a58149e 100644 (file)
@@ -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;
 
 
index 6fa8d3a3e6b13341627dd77fe47895e257853a70..26320c6a6bb22ff15bc8034b74fde2308abce665 100644 (file)
@@ -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;
index b9c9d9924b3b191b39f0d5be0f2a450d5849c9f8..2f793da49457e4186afb55dfa62df20ab8df1426 100644 (file)
@@ -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
index ad04883de9c9adc23e8da86fcdb151534f920287..fbd7c6a9db5e893266d7f84fc2e32dd6abc0265f 100644 (file)
@@ -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");
index b9bc92b634623dbb2d427cae11edf83e5d4a80b4..bb9df753077014dc879bd894a3e3968775b40896 100644 (file)
@@ -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;
 
index a71a57aaabcdb053e41e2546cc28b6b3c5eb7860..ed316e66f07fe1a564e0e7858482136e60aa8ebf 100644 (file)
@@ -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;
index a5fab33c309aeaa9c816657d09c439851d6f8415..00262016512a90933939e2344572c6a61a5a4f06 100644 (file)
@@ -23,6 +23,8 @@ midi.parse (s)
 /* urg */
 #if HAVE_PYTHON2_PYTHON_H
 #include <python2/Python.h>
+#elif HAVE_PYTHON2_2_PYTHON_H
+#include <python2.2/Python.h>
 #elif HAVE_PYTHON2_1_PYTHON_H
 #include <python2.1/Python.h>
 #elif HAVE_PYTHON2_0_PYTHON_H