fet_begingroup("flags")
save outer_path;
path outer_path;
+
% Flags pointing down overlap with the notehead (in x-direction), so
% the down-flag can be bigger
-upflag_width# = .750 black_notehead_width# + stemthickness#/2;
+upflag_width# = .650 black_notehead_width# + stemthickness#/2;
downflag_width# = .833 black_notehead_width# + stemthickness#/2;
-right_upflag_space# = .2 upflag_width#;
-right_downflag_space# = .2 downflag_width#;
+right_upflag_space# = .0 upflag_width#;
+right_downflag_space# = .0 downflag_width#;
%
% Flags pointing down cannot overlap with the notehead in y-direction,
% so they have less slant.
-%
% Because of optical illusion, the utmost flag (bottom for
% down-pointing, top for up-pointing) should be smaller than the other
-% flags. Adobe Sonata doesn't do this correctly. (Instead they have an
-% extension flag. Yuck)
+% flags. Adobe Sonata doesn't do this correctly. (Instead they have
+% an extension flag, which looks less elegant)
%
save hip_thickness, foot_thickness;
hip_thickness# = 1.3 stemthickness#;
-foot_thickness# = hip_thickness#;
+foot_thickness# = 1.0 hip_thickness#;
%
% Inspired by Adobe Sonata and [Wanske]
def draw_flag(expr center, flare,
dims, hip_depth, foot_wid, hip_thickness, foot_thickness)=
clearxy;
-
+ save c ;
+ c = 0.7;
penpos1(flare, 90);
penpos2(whatever, 0);
x2r - x2l = hip_thickness;
- penpos3(foot_thickness, 0) ;
+ penpos3(foot_thickness, 0.0) ;
z1r = center;
z2r = center + (xpart dims, -ypart(dims) * hip_depth);
z3r = center + (xpart(dims) * foot_wid, -ypart dims);
- outer_path := z3r{curl 0} .. z2r{up} .. {up}z1r;
+ outer_path := z3r{curl c} .. z2r{up} .. {up}z1r;
penlabels(1, 2, 3);
fill z1l{curl 0}
..tension 1.1 .. z2l{down} ..
- {curl 0} simple_serif(z3l, z3r, 80) &
+ {curl c} simple_serif(z3l, z3r, 80) &
outer_path & z1r -- cycle;
enddef;
%
-% TODO: calc intersectpoint
+% TODO: calc intersectpoint (see TeX book, p. 137)
% TODO: calc incision_depth
%
+
def add_flag(expr yoff, flare, hip_wid_multiplier,
hip_dep_multiplier,
intersectpoint, hip_thickness, foot_thickness) =
foot_depth# = 3 staff_space#;
set_char_box(stemthickness# /2, hip_width#
- + stemthickness#/2 + right_upflag_space#,
+ + stemthickness#/2 + right_upflag_space#,
foot_depth# + foot_thickness#/2, stemthickness#/2)
define_pixels(flare, hip_width, hip_thickness,
hip_depth_ratio, foot_width_ratio, hip_thickness, foot_thickness);
pickup pencircle scaled stemthickness;
- draw (0, 0) .. (0,-2 staff_space);
+ draw (0, 0) .. (0,-1 staff_space);
fet_endchar;
fet_beginchar("16th Flag (up)", "u4", "sixteenthflag")
draw (0, 0) .. (0,-2 staff_space);
fet_endchar;
+fet_beginchar("8th (down)", "d3", "deighthflag")
+ save flare,
+ hip_depth_ratio, hip_width,
+ foot_depth, foot_width_ratio;
+ save flagspace, total_depth, flag_count;
+
+ flag_count = 1;
+ flare# = .99 staff_space#;
+ flagspace# = .9 staff_space#;
+ hip_depth_ratio = .72 ;
+ hip_width# = downflag_width# - hip_thickness#/2;
+ total_depth# = 2.85 staff_space#;
+ (flag_count-1) * flagspace# + foot_depth# = total_depth#;
+
+ foot_width_ratio = .8;
+
+ set_char_box(stemthickness# /2, hip_width#
+ + stemthickness#/2 + right_downflag_space#,
+ total_depth# + foot_thickness#/2, stemthickness#/2)
+
+ define_pixels(flare, hip_width, hip_thickness,
+ flagspace,
+ foot_depth, foot_thickness);
+
+ draw_flag((stemthickness/2,- (flag_count-1) *flagspace), flare,
+ (hip_width, foot_depth),
+ hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+
+ pickup pencircle scaled stemthickness;
+ draw (0, 0) .. (0,-2 staff_space);
+ y_mirror_char;
+fet_endchar;
+
+%%%%%%%%
+%
+%
+%
+% Single Stroke for Short Appogiatura
+%
+%
+%
+
fet_beginchar("grace dash (up)", "ugrace", "gracedash")
save flare,
hip_depth_ratio, hip_width,
(w, h);
fet_endchar;
-fet_beginchar("8th (down)", "d3", "deighthflag")
- save flare,
- hip_depth_ratio, hip_width,
- foot_depth, foot_width_ratio;
+fet_beginchar("grace dash (down)", "dgrace", "dgracedash")
+ save flare, hip_depth_ratio, hip_width, foot_depth;
save flagspace, total_depth, flag_count;
flag_count = 1;
foot_width_ratio = .8;
- set_char_box(stemthickness# /2, hip_width#
- + stemthickness#/2 + right_downflag_space#,
- total_depth# + foot_thickness#/2, stemthickness#/2)
-
define_pixels(flare, hip_width, hip_thickness,
- flagspace,
- foot_depth, foot_thickness);
-
- draw_flag((stemthickness/2,- (flag_count-1) *flagspace), flare,
- (hip_width, foot_depth),
- hip_depth_ratio,foot_width_ratio, hip_thickness, foot_thickness);
+ flagspace, foot_depth);
+ set_char_box(hip_width# * hip_depth_ratio,
+ hip_width# + stemthickness#/2 + right_downflag_space#,
+ foot_depth# * hip_depth_ratio, -flare#)
- pickup pencircle scaled stemthickness;
- draw (0, 0) .. (0,-2 staff_space);
+ pickup pencircle scaled 1.5 stemthickness;
+ draw (-b, -d) .. (w,h);
y_mirror_char;
fet_endchar;
y_mirror_char;
fet_endchar;
+% ustem?
+%
+%
+% Stem characters so we can compose metronome markings with Feta
+% entirely.
+%
-fet_beginchar("grace dash (down)", "dgrace", "dgracedash")
- save flare, hip_depth_ratio, hip_width, foot_depth;
- save flagspace, total_depth, flag_count;
-
- flag_count = 1;
- flare# = .99 staff_space#;
- flagspace# = .9 staff_space#;
- hip_depth_ratio = .72 ;
- hip_width# = downflag_width# - hip_thickness#/2;
- total_depth# = 2.85 staff_space#;
- (flag_count-1) * flagspace# + foot_depth# = total_depth#;
-
- foot_width_ratio = .8;
-
- define_pixels(flare, hip_width, hip_thickness,
- flagspace, foot_depth);
-
- set_char_box(hip_width# * hip_depth_ratio,
- hip_width# + stemthickness#/2 + right_downflag_space#,
- foot_depth# * hip_depth_ratio, -flare#)
+fet_beginchar("stem (up)", "stem", "stem")
+ set_char_box(stemthickness#/2, stemthickness#/2, 0, 3.5staff_space#);
+ pickup pencircle scaled stemthickness;
+ draw (0, 0.2staff_space) .. (0, 3.5staff_space);
+fet_endchar;
- pickup pencircle scaled 1.5 stemthickness;
- draw (-b, -d) .. (w,h);
- y_mirror_char;
+% do we want this?
+fet_beginchar("stem (down)", "dstem", "dstem")
+ set_char_box(stemthickness#/2, stemthickness#/2, 3.5staff_space#, 0);
+ pickup pencircle scaled stemthickness;
+ draw (0, -0.2staff_space) .. (0, -3.5staff_space);
fet_endchar;
+
fet_endgroup("flags");