2 % LilyPond's own rest(s)
6 % nhw#:=6/5*interline#;
7 % define_pixels(interline,nhw);
10 thick#:=1/16designsize;
11 define_blacker_pixels(med,thick);
13 med_pen:= pencircle scaled med;
19 def shift_pic (expr pone, ptwo) =
20 currentpicture:=currentpicture shifted (round(pone),round(ptwo))
23 % ugh, dunno how to generate doubles "outside*" rests?
24 fet_begingroup("almostrests");
26 % stem#:=1/8interline#;
28 flare#:=2/3interline#;
29 define_pixels(stem,flare);
31 fet_beginchar(incr code,interline#,4interline#,0,0,"Quarter rest","4","quartrest");
33 penpos1(rthin,alpha+90);
34 penpos2(5/4rthick,alpha);
35 penpos4(5/4rthick,alpha);
36 penpos3(3/4rthick,alpha);
37 penpos6(rthin,alpha-20);
38 % penpos6(rthick,alpha-20);
39 % penpos7(4/3thick,alpha);
40 penpos7(5/8rthick,alpha);
42 y1l=7/2interline; x1l=1/3interline;
43 z2r=z1+(interline*right) rotated alpha;
45 x4=3/8interline; y4=2interline;
46 z6=z4l+(5/4interline*right) rotated alpha;
49 x8=2/5interline; y8= interline-1/4interline;
50 z5=z6r shifted (sqrt(2)*rthin/4,sqrt(2)*rthin/4);
52 pickup penrazor scaled rthin rotated 45;
55 penstroke z2e..z3e..z4e;
56 penstroke z6e..tension1.4..z7e..tension1.4..z8e;
57 penlabels(1,2,3,4,5,6,7,8);
67 x4r=xpart a-w; y3r=ypart a+flare/4;
71 x5=x4r+9/8flare; y5r=y1r;
73 x6l=xpart a; y6l=ypart a;
74 penstroke z1e..z2e..z3e..z4e..z1e..z5e{right}..z6e;
75 penlabels(1,2,3,4,5,6);
79 def brush(expr a,w,b,v) =
83 penpos3(w,angle(z2-z1)+90);
84 penpos4(w,angle(z2-z1));
85 penpos5(v,angle(z1-z2)+90);
86 penpos6(v,angle(z1-z2));
89 fill z3r{z1-z2}..z4l..{z2-z1}z3l..z5r{z2-z1}..z6l..{z1-z2}z5l..cycle;
90 penlabels(1,2,3,4,5,6);
94 fet_beginchar(incr code,4/3interline#,5/3interline#+2stafflinethickness#,0,0,"8th rest","-2","eighthrest");
96 x1=w-stem/6; y1=h-flare/4;
100 brush (z1,stem/3,z2,stem);
102 currentpicture:=currentpicture shifted (0,interline);
103 % currentpicture:=currentpicture shifted (0,interline+2stafflinethickness);
106 fet_beginchar(incr code,4/3interline#,5/3interline#+interline#+2stafflinethickness#,0,0,"16th rest","-2","sixteenthrest");
108 x1=w-stem/6; y1=h-flare/4;
109 z2-z1=whatever*dir74;
111 brush (z1,stem/2,z2,stem);
113 z3-z1=whatever*dir74;
116 % currentpicture:=currentpicture shifted (0,2stafflinethickness);
119 fet_beginchar(incr code,4/3interline#,5/3interline#+2interline#+2stafflinethickness#,0,0,"32th rest","-2","thirtysecondrest");
121 x1=w-stem/6; y1=h-flare/4;
122 z2-z1=whatever*dir76;
124 brush (z1,stem/2,z2,stem);
126 z3-z1=whatever*dir76;
129 z4-z1=whatever*dir76;
132 % currentpicture:=currentpicture shifted (0,2stafflinethickness);
135 fet_beginchar(incr code,4/3interline#,5/3interline#+3interline#+2stafflinethickness#,0,0,"64th rest","-2","sixtyfourthrest");
137 x1=w-stem/6; y1=h-flare/4;
138 z2-z1=whatever*dir78;
140 brush (z1,stem/2,z2,stem);
142 z3-z1=whatever*dir78;
145 z4-z1=whatever*dir78;
148 z5-z1=whatever*dir78;
151 % currentpicture:=currentpicture shifted (0,2stafflinethickness);
154 fet_beginchar(incr code,4/3interline#,5/3interline#+4interline#+2stafflinethickness#,0,0,"128th rest","-2","hundredtwentyeighthrest");
156 x1=w-stem/6; y1=h-flare/4;
157 z2-z1=whatever*dir80;
159 brush (z1,stem/2,z2,stem);
161 z3-z1=whatever*dir80;
164 z4-z1=whatever*dir80;
167 z5-z1=whatever*dir80;
170 z6-z1=whatever*dir80;
173 % currentpicture:=currentpicture shifted (0,2stafflinethickness);
176 fet_endgroup("rests");