% % Accidentals from various sources, notably % % Baerenreiter edition of Schuberts `Auf dem Strom' (sharp, natural, flat) % F Hofmeister edition of Muellers `Etueden fuer Horn' (double sharp) % %tracingall; %proofing := 2; %\tracingequations:= tracingonline := 1; fet_begingroup("accidentals"); fet_beginchar("Sharp" , "1", "sharp"); set_char_box(0, 1.1 interline#, 1.5 interline#, 1.5 interline#); save interbeam, interstem, beamheight, beamwidth, stemwidth; interbeam := 1.1 interline; interstem := 7/16 ; beamheight := 4 stafflinethickness; beamwidth := w; stemwidth := 1.3 stafflinethickness; roundness := blot_diameter; pair center; center := (.5 w, 0); roundness + 2 spanwidth = beamwidth; roundness + 2 spanheight = beamheight; 2 horizontal_protrusion + interstem * beamwidth + stemwidth = beamwidth; % wanske: whole beamheight; or ca 18 degrees % z2 - z1 = (beamwidth - roundness, beamheight/2); z2 - z1 = (beamwidth - roundness, beamheight); z1 + z2 = 2*center; beamslope = (y2-y1)/(x2-x1); pair hspan, vspan; hspan = (spanwidth, beamslope * spanwidth); vspan = (0, spanheight); path beam; beam := (hspan + vspan -- -hspan + vspan -- -hspan -vspan -- hspan - vspan -- cycle ) shifted center; draw_rounded_path((beam shifted (0,-interbeam/2)), roundness); draw_rounded_path((beam shifted (0,interbeam/2)), roundness); pickup pencircle scaled stemwidth; x3 = x4 = xpart center; bot y3 = -1.5 interline + ypart center; top y4 = 1.5 interline + 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); labels(1,2,3,4); fet_endchar; fet_beginchar( "Natural", "0", "natural") set_char_box(0, 8/12 interline#, 1.5 interline#, 1.5 interline#); save interbeam, interstem, beamheight, beamwidth, stemwidth; beamheight = 4.5 stafflinethickness; interstem + stemwidth = w; stemwidth = 1.3 stafflinethickness; z2 -z1 = (interstem, slope * interstem); xpart .5 [z2,z1] = xcenter ; xcenter = w/2; pickup penrazor scaled beamheight rotated 90; top y2 = interline - 3/2 stafflinethickness ; slope = stafflinethickness / interstem; draw z1 .. z2; draw (xpart z1, -y2) .. (xpart z2, -y1); beamtop = top y2; pickup pencircle scaled stemwidth; xpart z3 = xpart z1; xpart z4 = xpart z2; top y3 = 1.5 interline; top y4 = beamtop; draw (xpart z1, -y4) .. z3; draw (xpart z2, -y3) .. z4; labels(1,2,3,4); fet_endchar; % % Dedicated to my mom. (3/10/97) % % Mamma, ik hou van je; kom je alsjeblieft terug? % -- HW % % % FIXME more metaness % FIXME distribution of the crooks' thickness % % FIXME probably doesn't look quite right. % def flat_meta_symbol(expr w, d, h, stemwidth, crook_fatness, crook_thinness, bottom_stem_thick, top_stem_thick)= z1 = (0, h); z2 = (0, -d); brush(z1, top_stem_thick , z2, bottom_stem_thick); z3 = (0, 7/16 interline); z4 = z3 + whatever * (dir 30); y4 = 1/2 interline ; y5 = 4/16 interline; x5 + crook_fatness/2 = w; z6 = z2 + (0,-1) * (bottom_stem_thick - crook_thinness); penpos3(crook_thinness, 90); penpos4(crook_thinness, 90); penpos5(crook_fatness, 0); penpos6(crook_thinness, -90); labels(1,2,3,4,5,6); penstroke z3e{dir 32} .. z4e{dir 30} .. z5e{down} .. {dir 220}z6e; enddef; def flat_symbol (expr w, d, h)= save stemwidth, bottom_stem_thick, top_stem_thick, crook_thinness, crook_fatness; stemwidth = stafflinethickness; crook_fatness = 1/4 interline; crook_thinness = stemwidth; bottom_stem_thick = 5/4 stemwidth; top_stem_thick = 2 stemwidth; flat_meta_symbol(w,d,h, stemwidth, crook_fatness, crook_thinness, bottom_stem_thick, top_stem_thick); enddef; % % unfortunately, 600dpi is not enough to show the brush of the stem. % fet_beginchar("Flat", "-1", "flat") set_char_box(0, 9/12 interline#, .5 interline#, 2 interline#); flat_symbol (w, d, h); fet_endchar; fet_beginchar("Double flat", "-2", "flatflat") set_char_box(0, 18/12 interline#, .5 interline#, 2 interline#); flat_symbol(w/2, d, h); addto currentpicture also currentpicture shifted (w/2 - stafflinethickness/2,0); fet_endchar; fet_beginchar("Double sharp", "2", "sharpsharp") set_char_box(0, interline#, .5 interline#, .5 interline#); save klaverblad, klaversteel; klaversteel = 1/12 interline; klaverblad = 1/3 interline; z1 = (klaversteel, 0); z2 = (w/2 - klaverblad / 10, h - klaverblad); z3 = (w/2, h); z4 = z2 reflectedabout((0,0), (1,1)); z5 = z1 reflectedabout((0,0), (1,1)); % labels(1,2,3,4,5); draw_rounded_path( z1{dir 45} .. {right}z2 -- z3 -- z4{down} .. {dir 225}z5 .. cycle, 1/20 interline); addto currentpicture also currentpicture yscaled (-d/h); addto currentpicture also currentpicture xscaled (-1); % ugh currentpicture := currentpicture shifted (w/2,0); fet_endchar; fet_endgroup("accidentals");