********
nov 11
+pl 30.jcn1
+ - bf: mi2mu: notes of zero duration as comments
+ - feta: ugh c clef
+
pl 30
- feta: G clef.
- scripts now do relative coords (fixes lyrics + barnumber bug)
* bf: abbrevs over whole note
- * mi2mu: fix a1*0/4 output
-
STUFF
* give Items/Spanners access to unbroken originals
TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 1
TOPLEVEL_PATCH_LEVEL = 31
-TOPLEVEL_MY_PATCH_LEVEL =
+TOPLEVEL_MY_PATCH_LEVEL = jcn1
# use the above to send patches, always empty for released version:
# please don't move these comments up; the patch should fail if
define_pixels(block_rest_y, block_rest_x);
-def block_rest=
- pickup pencircle scaled blot_diameter;
-
- bot y1 = 0;
- top y2 = block_rest_y;
- y3 = y2;
- y4 = y1;
-
- rt x1 = block_rest_x;
- x2 = x1;
- lft x3 = 0;
- x4 = x3;
- save p;
- path p;
- p:=z1 -- z2 -- z3 -- z4 -- cycle;
-
- filldraw p;
-enddef;
+def block_rest =
+ draw_block ((0,0), (block_rest_x, block_rest_y));
+ enddef;
fet_beginchar( "whole rest", "0", "wholerest");
set_char_box(0, block_rest_x#,
%
% source file of the Feta (Font-En-Tja) music font
%
-% (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-%
+% (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>,
+% Jan Nieuwenhuizen <jan@digicash.com>
fet_begingroup("klef");
-
def draw_staff(expr first, last)=
pickup pencircle scaled stafflinethickness;
for i:= first step 1 until last:
draw (- interline, i* interline) .. (4 interline, i* interline);
endfor
+ enddef;
+
+def draw_c_clef (expr reduction) =
+ save hair, norm, reduced_il;
+ reduced_il#=interline#*reduction;
+ norm#:=2/3reduced_il#;
+ hair#:=1/6norm#;
+ define_pixels (hair,norm,reduced_il);
+ set_char_box (0, 11/4interline#, 2 reduced_il#, 2 reduced_il#);
+ % huh, what's y-zero?
+ draw_block ((0,-d), (1/2reduced_il,h));
+ draw_block ((1/2reduced_il+stafflinethickness,-d),
+ (1/2reduced_il+2stafflinethickness,h));
+
+ save xoff;
+ xoff=1/2reduced_il+2hair;
+ penpos1(hair,-90);
+ z1l=(xoff+norm+hair/2,h);
+ penpos2(norm-hair,180);
+ z2l=(w,h/2);
+ penpos3(hair,90);
+ z3=(((w-xoff)/2)+xoff,2hair);
+ penpos4(hair,90);
+ z4=(xoff+hair+1/2norm+hair,y3);
+
+ penpos6(hair,-90);
+ z6r=(xoff+norm+hair,-d);
+
+ save t; t=0.833;
+ save p; path p;
+ p = z4r{right}..z3r{right}..tension t..z2r{up}
+ ..z1r{left}..z1l{right}..z2l{down}
+ ..z3l{left}..z4l{left};
+ pickup pencircle scaled 1pt#;
+ % boehoe, howto?
+% draw p..(p yscaled -1)..cycle;
+ fill p..cycle;
+ fill (p yscaled -1)..cycle;
+ penlabels (1,2,3,4);
+
+ % ugh, should be bulb, not flare
+ draw_flare(z1l,180,90,hair,norm);
+ draw_flare(z6r,180,-90,hair,norm+hair);
+ enddef;
+
+fet_beginchar ("C clef", "ugh_alto", "ugh_altoclef")
+ if test = 1:
+ draw_staff (-1,3);
+ fi;
+ draw_c_clef (1.0);
+fet_endchar;
- enddef;
-
-
+fet_beginchar ("C clef", "ugh_alto_change", "ugh_caltoclef")
+ draw_c_clef (.8);
+fet_endchar;
%
% Inspired by Baerenreiter and Breitkopf
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_brush(expr a,w,b,v) =
save x,y;
z1=a; z2=b;
fill z3r{z3r-z5l}..z4l..{z5r-z3l}z3l..z5r{z5r-z3l}..z6l..{z3r-z5l}z5l..cycle;
enddef;
+def draw_flare(expr pos,alpha,beta,line,flare) =
+ begingroup;
+ clearxy;
+ penpos1(line,180+beta+alpha);
+ z1r=pos;
+ penpos2(flare,180+beta+alpha);
+ z2=z3;
+ penpos3(flare,0+alpha);
+ z3l=z1r+(1/2+0.43)*flare*dir(alpha+beta);
+ z4=z2r-1/6flare*dir(alpha);
+ penlabels(1,2,3,4);
+ pickup pencircle;
+ save t; t=0.833;
+ fill z1r{dir(alpha)}..z3r{dir(180+alpha-beta)}..z2l{dir(alpha+180)}
+ ..z3l{dir(180+alpha+beta)}..tension t
+ ..z4{dir(180+alpha+beta)}..z1l{dir(alpha+180)}..cycle;
+ endgroup;
+ enddef;
+
def brush(expr a,w,b,v) =
begingroup;
draw_brush(a,w,b,v);
endgroup;
enddef;
-def draw_flare(expr pos,alpha,beta,line,flare) =
- begingroup;
- clearxy;
- penpos1(line,180+beta+alpha);
- z1r=pos;
- penpos2(flare,180+beta+alpha);
- z2=z3;
- penpos3(flare,0+alpha);
- z3l=z1r+(1/2+0.43)*flare*dir(alpha+beta);
- z4=z2r-1/6flare*dir(alpha);
- penlabels(1,2,3,4);
- pickup pencircle;
- save t; t=0.833;
- fill z1r{dir(alpha)}..z3r{dir(180+alpha-beta)}..z2l{dir(alpha+180)}
- ..z3l{dir(180+alpha+beta)}..tension t..z4{dir(180+alpha+beta)}..z1l{dir(alpha+180)}..cycle;
- endgroup;
- enddef;
-
def draw_six =
set_char_box(0, 2thick#+2thin#, 0, height#);
message "w:"&decimal w;
input autometric;
fet_beginfont("feta", 20);
-test := 0;
+test := 1;
input feta-generic;
MAJOR_VERSION = 0
MINOR_VERSION = 0
-PATCH_LEVEL = 21
+PATCH_LEVEL = 22
# use to send patches, always empty for released version:
MY_PATCH_LEVEL =
#
Moment
Mudela_note::duration_mom ()
{
-// ugh
-// return Duration_convert::dur2_mom (duration ());
assert (end_column_l_);
return end_column_l_->at_mom () - at_mom ();
}
if (dur.plet_b ())
str += String (" \\plet 1/1;");
+ /*
+ note of zero duration is nonsense,
+ but let's output anyway for convenient debugging
+ */
+ if (!duration_mom ())
+ return String ("\n% ") + str + "\n";
+
return str + " ";
}