From 52bce4bf75b352664b7d070e908ad844b61c1d44 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 20:02:46 +0000 Subject: [PATCH] lilypond-0.1.20 --- bin/genheader.in | 60 ------------ mf/bolletjes.mf | 174 ---------------------------------- mf/eindelijk.mf | 215 ------------------------------------------- mf/generic-macros.mf | 129 -------------------------- mf/generic-params.mf | 25 ----- mf/generic-tja.mf | 18 ---- mf/klef.mf | 45 --------- mf/puntje.mf | 13 --- mf/schrift.mf | 157 ------------------------------- mf/toevallig.mf | 193 -------------------------------------- 10 files changed, 1029 deletions(-) delete mode 100644 bin/genheader.in delete mode 100644 mf/bolletjes.mf delete mode 100644 mf/eindelijk.mf delete mode 100644 mf/generic-macros.mf delete mode 100644 mf/generic-params.mf delete mode 100644 mf/generic-tja.mf delete mode 100644 mf/klef.mf delete mode 100644 mf/puntje.mf delete mode 100644 mf/schrift.mf delete mode 100644 mf/toevallig.mf diff --git a/bin/genheader.in b/bin/genheader.in deleted file mode 100644 index 8643a3794f..0000000000 --- a/bin/genheader.in +++ /dev/null @@ -1,60 +0,0 @@ -#!@PERL@ -w - -# generate the standard header of a LilyPond source file. -my $fn; - -sub - do_init -{ - $MAILADDRESS=$ENV{MAILADDRESS}; - @pw=(getpwuid($<)); - $username=$pw[6]; - - die "arg needed\n" if (!($#ARGV+1)); - $fn = $ARGV[0]; - - $hh_b = ($fn =~ /hh$/ ); - $inc_b= ($hh_b || $fn =~ /[ti]cc$/); -} - -sub - do_head -{ - - my $what="implement "; - $what = "declare " if ($hh_b); - my ($PROJECT, $cwd); - $PROJECT = "the GNU LilyPond music typesetter"; - chop($cwd = `pwd`); - - $PROJECT= "the Flower Library" if ($cwd =~ /flower/); - - my $headstr ="/* - $fn -- $what - - source file of $PROJECT - - (c) 1997 $username <$MAILADDRESS> -*/\n"; - print $headstr; -} -sub do_inc -{ - my $headstr=""; - my $startdef= $fn; - $startdef =~ s/[\.-]/_/g; - $startdef =~ tr/a-z/A-Z/; - my $terminatestr="\n"; - - if ($inc_b) { - $headstr = "\n\n#ifndef $startdef\n#define $startdef\n"; - $terminatestr .= "#endif // $startdef\n" - } - - print $headstr, $terminatestr; -} -do_init; -do_head; -do_inc; - - diff --git a/mf/bolletjes.mf b/mf/bolletjes.mf deleted file mode 100644 index c41f5d0d52..0000000000 --- a/mf/bolletjes.mf +++ /dev/null @@ -1,174 +0,0 @@ -% bolletjes.mf -% part of LilyPond's pretty-but-neat music font - -% most beautiful noteheads are pronounced, not circular, -% and not even symmetric. -% These examples are inspired by [Wanske] [see literature list] - -%noteheight#:=interline#; - -% even more pronounced (almost overdone), just like the original -noteheight#:=interline#+1.5stafflinethickness#; - - -% setup user vars -def setup_notehead_vars = - save a_b,err_y_a,tilt,superness; - save ai_a,ai_bi,err_y_ai,err_x_bi,inner_tilt,inner_superness; - save b_h,a_w; - enddef; - -% setup addititional vars and calc them -def notehead_calc = - save a,beta,ai,bi, ht, wd; - ht# =noteheight#; - 2beta#=ht#*b_h; - a# = beta#*a_b; - wd# = 2a# / a_w; - ai# = a# * ai_a; - bi# = ai#/ai_bi; - define_pixels(a,beta); - define_pixels(ai,bi); - set_char_box(0, wd#, .5 ht#, .5 ht#); - enddef; - - -% draw the outer and inner ellipse. -def notehead_draw = - path black,white; - black=distorted_ellipse(a,beta,a*err_y_a,0,superness); - white=distorted_ellipse(ai,bi,ai*err_y_ai,bi*err_x_bi,inner_superness); -if test>1: %fixme - save x; - x1=-x3=a; x2=x4=0; y1=y3=0; y2=-y4=b; - penlabels(1,2,3,4); - test_grid; -else: - black:=black rotated tilt; - black:=black shifted (w/2,0); - white:=white rotated inner_tilt; - white:=white shifted (w/2,0); -fi - fill black; - unfill white; - - - enddef; - - -fet_begingroup("balls"); - -% whole note -% Wanske, p.38 -fet_beginchar("Whole notehead", "0", "wholeball") - setup_notehead_vars; - - a_b:=1.80; - err_y_a:=0; % no slant - tilt:=0; - superness:=0.707; - ai_a:=0.508; - % ai_bi:=1.23; - ai_bi:=1.30; % jcn - % err_y_ai:=0.0938; - % err_x_bi:=0; - err_y_ai:=0; - err_x_bi:=0.115; - % inner_tilt:=135; - inner_tilt:=125; % jcn - % inner_superness:=0.69; - inner_superness:=0.68; % jcn - b_h:=1; %no rotate-> no height correction - a_w:=1; % no rotate-> no width correction - - notehead_calc; - notehead_draw; -fet_endchar; - - -% half note -% Wanske, p.39 -fet_beginchar("Half notehead", "1", - "halfball") - setup_notehead_vars; - % a_b:=1.49; % after text - a_b:=1.50; % after drawing - err_y_a:=0.157; - tilt:=34; - % superness:=0.66; - superness:=0.67; % jcn - % ai_a:=0.863; - ai_a:=0.850; % jcn - % ai_bi:=3.14; - ai_bi:=3.30; % jcn - err_y_ai:=0; - err_x_bi:=-0.12; - inner_tilt:=tilt; - inner_superness:=0.80; - b_h:=0.935; - a_w:=1.12; - - notehead_calc; - notehead_draw; -fet_endchar; - - -% quarter note -% Wanske p.38 -fet_beginchar("Quart notehead", "2", "quartball") - setup_notehead_vars; - % a_b:=1.57; % after text - a_b:=1.54; % after drawing - err_y_a:=0.044; - tilt:=32; - superness:=0.707; - ai_a:=0; - ai_bi:=1; - err_y_ai:=0; - err_x_bi:=0; - inner_tilt:=0; - inner_superness:=0.707; - b_h:=0.85; - a_w:=1.09; - - notehead_calc; - notehead_draw; -fet_endchar; - - - -% from MO*gen.mf; (pass the barfbag?) -def add_mirror (expr pone, ptwo) = - addto currentpicture also currentpicture - reflectedabout (round(pone), round(ptwo)) -enddef; - -def fill_square (expr xwidth, ywidth, zshift) = - fill unitsquare xscaled xwidth yscaled ywidth shifted zshift -enddef; - -% ugh -nhh#:=interline#; -nhw#:=6/5interline#; -define_pixels(nhh,nhw); - -fet_beginchar("Brevis notehead","-1","breveball"); - set_char_box(0, 2interline#,.5 interline#, .5interline#); - fill_square (5/4nhw, .25nhh, (0,.25nhh)); - add_mirror (origin, right); - x1=x2=0; x3=x4=5/4nhw; y1=-y2=y3=-y4=.7nhh; - pickup pencircle scaled stafflinethickness; - draw z1--z2; draw z3--z4; - push_picture(currentpicture); -fet_endchar; - -fet_beginchar("Longa notehead","-2","longaball"); - set_char_box(0, 2 interline#,.5interline#, .5interline# ); - currentpicture := pop_picture; - pickup pencircle scaled stafflinethickness; - draw (5/4nhw,-.7nhh)--(5/4nhw,-1.7nhh); -fet_endchar; - -% fet_endgroup("noteheads"); -fet_endgroup("balls"); - diff --git a/mf/eindelijk.mf b/mf/eindelijk.mf deleted file mode 100644 index 362ed9ab12..0000000000 --- a/mf/eindelijk.mf +++ /dev/null @@ -1,215 +0,0 @@ -% eindelijk.mf -% LilyPond's own rest(s) - -% todo breve/longa rests - - -fet_begingroup("rests"); - -begingroup - -med#:=1/33designsize; -thick#:=1/16designsize; -define_blacker_pixels(med,thick); -pen med_pen; -med_pen:= pencircle scaled med; - -rthin:=1/8interline; -% rthick:=2rthin; -rthick:=2thick+rthin; - -def shift_pic (expr pone, ptwo) = - currentpicture:=currentpicture shifted (round(pone),round(ptwo)) -enddef; - -% stuff for 8th,16th etc rests -% -save stem, ball_crook_stem, ball_crook_balldiam, flare; - -define_pixels(stem,flare); -% stem#:=1/8interline#; -stem# = 1/5interline#; -ball_crook_stem = stem; -ball_crook_balldiam =flare; -flare# = 2/3interline#; - -save block_rest_y, block_rest_x; - -block_rest_y# = 1/2 interline#; -block_rest_x# = 3 block_rest_y#; - -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; - draw_rounded_path(p, blot_diameter); -enddef; - -fet_beginchar( "whole rest", "0", "wholerest"); -set_char_box(0, block_rest_x#, -block_rest_y#, 2 block_rest_y# ); - block_rest; - currentpicture := currentpicture shifted (0,block_rest_y); -fet_endchar; - -fet_beginchar("half rest", "1", "halfrest"); - set_char_box(0, block_rest_x#, 0, block_rest_y#); - block_rest; -fet_endchar; - - -% -% should use ledgerline thickness? -% -fet_beginchar( "whole rest (outside staff)", "0o", "outsidewholerest"); - set_char_box(block_rest_y#, block_rest_x# + block_rest_y#, -block_rest_y#, 2 block_rest_y# ); - block_rest; - currentpicture := currentpicture shifted (0,block_rest_y); - pickup pencircle scaled stafflinethickness; - draw (-block_rest_y, interline) .. (block_rest_x + block_rest_y, interline); -fet_endchar; - -fet_beginchar("half rest (outside staff)", "1o", "outsidehalfrest"); - set_char_box(block_rest_y#, block_rest_x#+ block_rest_y#, 0, block_rest_y#); - block_rest; - pickup pencircle scaled stafflinethickness; - draw (-block_rest_y,0) .. (block_rest_x + block_rest_y,0); -fet_endchar; - -def rest_crook(expr a, w) = - balled_crook(a, w, ball_crook_balldiam, ball_crook_stem) -enddef; - -fet_beginchar("Quarter rest","2","quartrest"); - alpha:=-50; - penpos1(rthin,alpha+90); - penpos2(5/4rthick,alpha); - penpos4(5/4rthick,alpha); - penpos3(3/4rthick,alpha); - penpos6(rthin,alpha-20); -% penpos6(rthick,alpha-20); -% penpos7(4/3thick,alpha); - penpos7(5/8rthick,alpha); - penpos8(rthin,-10); - y1l=7/2interline; x1l=1/3interline; - z2r=z1+(interline*right) rotated alpha; - z3=1/2[z2,z4]; - x4=3/8interline; y4=2interline; - z6=z4l+(5/4interline*right) rotated alpha; -% x7l=x4l; y7r=y6l; - x7l=x4l; y7l=y4r; - x8=2/5interline; y8= 3/4 interline; - z5=z6r shifted (sqrt(2)*rthin/4,sqrt(2)*rthin/4); - - pickup penrazor scaled rthin rotated 45; - draw z1--z2r; - draw z4l--z5; - penstroke z2e..z3e..z4e; - penstroke z6e..tension1.4..z7e..tension1.4..z8e; - penlabels(1,2,3,4,5,6,7,8); - set_char_box(0, interline#, -3/4 interline#, 7/2 interline#); - fet_endchar; - -fet_beginchar("8th rest","3","eighthrest"); - set_char_box(0, 4/3interline#,-interline#, 8/3interline#+2stafflinethickness#); - save x,y, ht; - ht = h + d; - x1=w-stem/6; y1=ht-flare/4; - rest_crook (z1,w-stem/6); - z2-z1=whatever*dir70; - y2=stem/2; - brush (z1,stem/3,z2,stem); - % ugh - currentpicture:=currentpicture shifted (0,interline); -% currentpicture:=currentpicture shifted (0,interline+2stafflinethickness); - fet_endchar; - -fet_beginchar("16th rest","4","sixteenthrest"); - set_char_box(0,4/3interline#,0, 5/3interline#+interline#+2stafflinethickness#); - save x,y; - x1=w-stem/6; y1=h-flare/4; - z2-z1=whatever*dir74; - y2=stem/2; - brush (z1,stem/2,z2,stem); - rest_crook (z1,7/8w); - z3-z1=whatever*dir74; - y3=y1-interline; - rest_crook (z3,7/8w); -% currentpicture:=currentpicture shifted (0,2stafflinethickness); - fet_endchar; - -fet_beginchar("32th rest","5","thirtysecondrest"); - set_char_box(0,4/3interline#,0, 5/3interline#+2interline#+2stafflinethickness#); - save x,y; - x1=w-stem/6; y1=h-flare/4; - z2-z1=whatever*dir76; - y2=stem/2; - brush (z1,stem/2,z2,stem); - rest_crook (z1,7/8w); - z3-z1=whatever*dir76; - y3=y1-interline; - rest_crook (z3,7/8w); - z4-z1=whatever*dir76; - y4=y1-2interline; - rest_crook (z4,7/8w); -% currentpicture:=currentpicture shifted (0,2stafflinethickness); - fet_endchar; - -fet_beginchar("64th rest","6","sixtyfourthrest"); - set_char_box(0,4/3interline#,0, 5/3interline#+3interline#+2stafflinethickness#); - save x,y; - x1=w-stem/6; y1=h-flare/4; - z2-z1=whatever*dir78; - y2=stem/2; - brush (z1,stem/2,z2,stem); - rest_crook (z1,7/8w); - z3-z1=whatever*dir78; - y3=y1-interline; - rest_crook (z3,7/8w); - z4-z1=whatever*dir78; - y4=y1-2interline; - rest_crook (z4,7/8w); - z5-z1=whatever*dir78; - y5=y1-3interline; - rest_crook (z5,7/8w); -% currentpicture:=currentpicture shifted (0,2stafflinethickness); - fet_endchar; - -fet_beginchar("128th rest","7","hundredtwentyeighthrest"); - set_char_box(0, 4/3interline#, 0, 5/3interline#+4interline#+2stafflinethickness#); - save x,y; - x1=w-stem/6; y1=h-flare/4; - z2-z1=whatever*dir80; - y2=stem/2; - brush (z1,stem/2,z2,stem); - rest_crook (z1,7/8w); - z3-z1=whatever*dir80; - y3=y1-interline; - rest_crook (z3,7/8w); - z4-z1=whatever*dir80; - y4=y1-2interline; - rest_crook (z4,7/8w); - z5-z1=whatever*dir80; - y5=y1-3interline; - rest_crook (z5,7/8w); - z6-z1=whatever*dir80; - y6=y1-4interline; - rest_crook (z6,7/8w); -% currentpicture:=currentpicture shifted (0,2stafflinethickness); - fet_endchar; - -endgroup; -fet_endgroup("rests"); - diff --git a/mf/generic-macros.mf b/mf/generic-macros.mf deleted file mode 100644 index b6b26ed9f7..0000000000 --- a/mf/generic-macros.mf +++ /dev/null @@ -1,129 +0,0 @@ - -% -% debugging -% -def test_grid = -if test>1: - proofrulethickness 1pt#; - makegrid(0pt,0pt for i:=-5pt step 1pt until 5pt: ,i endfor) - (0pt,0pt for i:=-5pt step 1pt until 5pt: ,i endfor); - proofrulethickness .1pt#; - makegrid(0pt,0pt for i:=-4.8pt step .2pt until 4.8pt: ,i endfor) - (0pt,0pt for i:=-4.8pt step .2pt until 4.8pt: ,i endfor); -fi - enddef; -% -% Transforms -% - -def scaledabout(expr point, scale) = - shifted -point scaled scale shifted point -enddef; - -% -% Urgh! Want to do parametric types -% - -def del_picture_stack= - save save_picture_stack, picture_stack_idx; -enddef; - -% better versions of Taupin/Egler savepic cmds -% -% -def make_picture_stack = - % override previous stack. - del_picture_stack; - picture save_picture_stack[]; - numeric picture_stack_idx; - picture_stack_idx := 0; - def push_picture(expr p) = - save_picture_stack[picture_stack_idx] := p ; - picture_stack_idx := picture_stack_idx + 1; - enddef; - def pop_picture = save_picture_stack[decr picture_stack_idx] enddef; - def top_picture = save_picture_stack[picture_stack_idx] enddef; -enddef; - - -% save/restore pens -% why can't I delete individual pens? -def make_pen_stack = - del_pen_stack; - pen save_pen_stack[]; - numeric pen_stack_idx; - pen_stack_idx := 0; - def push_pen(expr p) = - save_pen_stack[pen_stack_idx] := p ; - pen_stack_idx := pen_stack_idx +1; - enddef; - def pop_pen = save_pen_stack[decr pen_stack_idx] enddef; - def top_pen = save_pen_stack[pen_stack_idx] enddef; -enddef; -def del_pen_stack= - save save_pen_stack, pen_stack_idx; -enddef; - -% -% drawing -% - -% a: x diameter -% b: y diameter -% err_x: drift of y axis at top -% err_y: drift of x axis at right -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; - -def brush(expr a,w,b,v) = - begingroup; - save x,y; - z1=a; z2=b; - penpos3(w,angle(z2-z1)+90); - penpos4(w,angle(z2-z1)); - penpos5(v,angle(z1-z2)+90); - penpos6(v,angle(z1-z2)); - z3 = z4 = z1; - z5 = z6 = z2; - - fill z3r{z3r-z5l}..z4l..{z5r-z3l}z3l..z5r{z5r-z3l}..z6l..{z3r-z5l}z5l..cycle; - penlabels(3,4,5,6); - endgroup; -enddef; - -def draw_rounded_path(expr p, thick) = - push_pen(currentpen); - fill p; - pickup pencircle scaled thick; - draw p; - currentpen := pop_pen; -enddef; - -% -% -% -def balled_crook(expr a, w, balldiam, stem) = -begingroup; - save x,y; - penpos1(balldiam/2,-90); - penpos2(balldiam/2,0); - penpos3(balldiam/2,90); - penpos4(balldiam/2,180); - x4r=xpart a-w; y3r=ypart a+balldiam/4; - x1l=x2l=x3l=x4l; - y1l=y2l=y3l=y4l; - penpos5(stem,250); - x5=x4r+9/8balldiam; y5r=y1r; - penpos6(stem,260); - x6l=xpart a; y6l=ypart a; - penstroke z1e..z2e..z3e..z4e..z1e..z5e{right}..z6e; - penlabels(1,2,3,4,5,6); -endgroup; -enddef; - -def y_mirror_char = - currentpicture := currentpicture yscaled -1; - set_char_box(charbp, charwd, charht, chardp); -enddef; - diff --git a/mf/generic-params.mf b/mf/generic-params.mf deleted file mode 100644 index 690e415f2e..0000000000 --- a/mf/generic-params.mf +++ /dev/null @@ -1,25 +0,0 @@ - -interline#:=staffsize#/(stafflines-1); - -% -% [D.K.Roush & J.S.Gourlay] say this should be 0.072 -% We know better -% generally, the "blackness" of most chars depends on this. -% -stafflinethickness#:=0.1 interline#; - -define_pixels(interline); -define_pixels(stafflinethickness); - -% -% Because of the engraving/stamping process, no traditional -% characters have sharp edges and corners -% The following variable controls the amount of "roundness" -% -numeric blot_diameter; - -% -% this is not a meta variable: it is related to absolute sizes. -% -blot_diameter# = .4pt#; -define_pixels(blot_diameter); diff --git a/mf/generic-tja.mf b/mf/generic-tja.mf deleted file mode 100644 index 2d890ee79b..0000000000 --- a/mf/generic-tja.mf +++ /dev/null @@ -1,18 +0,0 @@ - -input generic-macros; - -make_pen_stack; -make_picture_stack; -input generic-params; - - -test:=0; -if test = 0: - input eindelijk; - input toevallig; - input puntje; - input bolletjes; - input schrift; -else: -% input klef; -fi diff --git a/mf/klef.mf b/mf/klef.mf deleted file mode 100644 index 129c792e61..0000000000 --- a/mf/klef.mf +++ /dev/null @@ -1,45 +0,0 @@ - -% implement clefs -fet_begingroup("foobars") - - -fet_beginchar(incr code, "F clef", "bassclef", "bassclef"); - -fet_endchar; -fet_beginchar(incr code, "G clef", "evolinclef", "evolinclef"); - save tilt; - tilt = 15; - - inner_fatness = 5 stafflinethickness; - upstroke_fatness = 7 stafflinethickness; - top_curl_fatness = 4 stafflinethickness; - inner_thinness = 2 stafflinethickness; - downstroke_thinness = 1.5 stafflinethickness; - - z1 = 6/10 interline * dir(-135); - z3 = (0, interline - inner_fatness/2); - x5 = x1; - y5 = -interline; - z7 = (-1.25 interline, -.5 interline); - z9 = whatever * dir (90 + tilt); - y9 = 2.1 interline; - y12 + top_curl_fatness = 4 interline; - x12 = 0; - z13 = z9; - z15 = 1.5 interline * dir (tilt -90); - - - penpos1(blot_diameter, 45); - penpos3(inner_fatness, -90); - penpos5(inner_thinness, 90); - penpos7(inner_thinness, 45); - penpos9(upstroke_fatness, tilt -90); - penpos12(top_curl_fatness, 90); - penpos13(downstroke_thinness, tilt-90); - penpos15(downstroke_thinness, tilt-90); - set_char_box(0,0,0,0); - -% penstroke z1e{dir 135} .. z3e .. {left}z5e .. z7e .. tension 1.2 .. z9e;% & z9e.. z12e .. z13e .. z15e; -% penlabels(1,3,5,7, 9,12,13,15); -fet_endchar; -fet_endgroup("foobars"); diff --git a/mf/puntje.mf b/mf/puntje.mf deleted file mode 100644 index 7675befaee..0000000000 --- a/mf/puntje.mf +++ /dev/null @@ -1,13 +0,0 @@ -fet_begingroup("dots"); - -fet_beginchar("duration dot","dot", "dot") - save dot_diam; - 2 dot_diam# = interline# - stafflinethickness#; - define_pixels(dot_diam) - pickup pencircle scaled dot_diam; - draw (dot_diam/2,0); - set_char_box(0, dot_diam#, dot_diam#/2, dot_diam#/2); -fet_endchar; - - -fet_endgroup("dots"); diff --git a/mf/schrift.mf b/mf/schrift.mf deleted file mode 100644 index 2f55c401ae..0000000000 --- a/mf/schrift.mf +++ /dev/null @@ -1,157 +0,0 @@ -fet_begingroup("foobars") - - -def draw_fermata = - save radius, crook_thinness, crook_fatness, dot_diam; - - radius# = 1.5 interline#; - crook_thinness# = stafflinethickness#; - crook_fatness# = 4 stafflinethickness#; - - radius# + crook_fatness#/2 = h#; - radius# + crook_thinness#/2 = w#; - set_char_box(w#, w#, 0, h#); - - define_pixels(radius, crook_thinness, crook_fatness); - dot_diam = 4/3 crook_fatness; - - - penpos1(crook_thinness, 0); - penpos2(crook_fatness, -90); - penpos3(crook_thinness, -180); - z1 = (-radius,0); - z2 = (0, radius); - z3 = (radius,0); - - fill z1l{down} .. {up}z1r .. z2r .. z3r{down} .. {up}z3l - .. z2l .. cycle; - - pickup pencircle scaled dot_diam; - x4 =0; - bot y4 = - crook_thinness/2; - draw z4; -enddef; - -fet_beginchar("fermata up", "ufermata", "ufermata") - draw_fermata; - penlabels(1,2,3); - fet_endchar; - -fet_beginchar("fermata down", "dfermata", "dfermata") - draw_fermata; - currentpicture:=currentpicture yscaled -1 ; - set_char_box(w#, w#, h#, 0); - - fet_endchar; - - -% FIXME: rounded endings -% -fet_beginchar("> accent", "accent", "accent") - set_char_box(.9 interline#, .9 interline#, .5 interline#, .5 interline#); - save thickness, diminish; - - thickness = 2 stafflinethickness; - - % prevent blobs at crossing lines - diminish = .75; - - y1 + thickness/2 = h; - x1 = -b; - x2 = w; - y2 = .25 thickness* diminish; - - z4 = (w,0); - x3 =0; - z3 = whatever [z1, z4]; - - penpos2(thickness*(2 - diminish)/2 , 90); - penpos1(thickness, 90); - penpos3(thickness, 90); - - penstroke z1e .. z3e .. z2e; - penstroke (z1e .. z3e .. z2e) yscaled -1; - - penlabels(1,2,3); - fet_endchar; - -fet_beginchar("staccato dot", "staccato", "staccato") - save radius; - radius# = 1.25 stafflinethickness#; - define_pixels(radius); - pickup pencircle scaled 2 radius; - draw (0,0); - set_char_box(radius#, radius#, radius#, radius#); -fet_endchar; - -def draw_staccatissimo = - save radius, height; - height# = .8 interline#; - radius# = 2 stafflinethickness#; - define_pixels(radius, height); - - brush((0,0), blot_diameter, (0, height),2 radius); - set_char_box(radius#,radius#, blot_diameter#/2, height# + radius#); -enddef; - -fet_beginchar("staccatissimo/martellato up", "ustaccatissimo", "ustaccatissimo") - draw_staccatissimo; -fet_endchar; - -% -% FIXEM: scale labels too. -% -fet_beginchar("staccatissimo/martellato down", "dstaccatissimo", "dstaccatissimo") - draw_staccatissimo; - y_mirror_char; -fet_endchar; - -fet_beginchar("portato/single tenuto", "tenuto", "tenuto") - save thick; - thick# = 1.2 stafflinethickness#; - define_pixels(thick); - - set_char_box(.9 interline#, .9 interline#, thick#/2,thick#/2); - pickup pencircle scaled thick; - lft x1 = -b; - rt x2 = w; - y1 = y2 = 0; - draw z1 .. z2; -fet_endchar; - - -def draw_marcato = - save fatness, thinness; - set_char_box(interline#/2, interline#/2, 0, 1.1 interline#); - - fatness = 3 stafflinethickness; - thinness = .8 stafflinethickness; - x2 - x1 + blot_diameter = fatness; - x2 + thinness/2 = w; - - y1 = y2; - y1 = thinness/2; - z2 - z3 = whatever * (charwd, -charht); - z1 - z4 = whatever * (charwd, -charht); - z3 - z4 = whatever * (charwd, charht); - y3 + thinness/2 = h; - draw_rounded_path(z1 -- z2 -- z3 -- z4 -- cycle, thinness); - - pickup pencircle scaled thinness; - z3 - z5 = whatever* (z3 - z4); - bot y5 = 0; - draw z3 .. z5; - - labels(1,2,3,4,5); -enddef; - -fet_beginchar("marcato up", "umarcato", "umarcato") - draw_marcato; -fet_endchar; -fet_beginchar("marcato down", "dmarcato", "dmarcato") - draw_marcato; - y_mirror_char; -fet_endchar; - - -fet_endgroup("foobars"); diff --git a/mf/toevallig.mf b/mf/toevallig.mf deleted file mode 100644 index 69cb6e1e07..0000000000 --- a/mf/toevallig.mf +++ /dev/null @@ -1,193 +0,0 @@ -% -% 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; - - z2 - z1 = (beamwidth - roundness, beamheight/2); - 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)); - - draw_rounded_path( - z1{dir 45} .. {right}z2 -- z3 -- z4{down} .. {dir 225}z5 .. cycle, - 1/20 interline); - - - addto currentpicture also currentpicture rotated 90; - addto currentpicture also currentpicture yscaled (-d/h); - - currentpicture := currentpicture shifted (w/2,0); - fet_endchar; - - -fet_endgroup("accidentals"); - -- 2.39.5