3 fet_begingroup("accordion")
5 accreg_dot_size# := .5staff_space#;
6 accreg_linethickness# := 1.3stafflinethickness#;
8 % This dimention is the same on all registersymbols.
9 % The different symbols should calculate their other
10 % dimensions from this and accreg_dot_size
11 accreg_lh# := 1.0staff_space#;
13 define_pixels(accreg_dot_size, accreg_linethickness, accreg_lh);
15 accreg_pen := pencircle xscaled accreg_linethickness yscaled 0.7accreg_linethickness;
17 fet_beginchar("accDiscant", "accDiscant", "accDiscant")
21 % set_char_box(r#, r#, 2r#, 0);
22 set_char_box(r#, r#, 0r#, 2r#); %% arg3 = under linjen, arg4 = over
24 draw fullcircle scaled 2r;
26 draw (-sx*r, r/3)--(sx*r, r/3);
27 draw (-sx*r, -r/3)--(sx*r, -r/3);
28 currentpicture := currentpicture shifted (0, r);
31 fet_beginchar("accDot", "accDot", "accDot")
32 set_char_box(accreg_dot_size#, accreg_dot_size#, 0, 0);
33 pickup pencircle scaled accreg_dot_size;
37 fet_beginchar("accFreebase", "accFreebase", "accFreebase")
41 set_char_box(r#, r#, 0, 2r#);
43 draw fullcircle scaled 2r;
45 currentpicture := currentpicture shifted (0, r);
48 fet_beginchar("accStdbase", "accStdbase", "accStdbase")
53 set_char_box(r#, r#, 0, 2r#);
55 draw fullcircle scaled 2r;
57 draw (-sx*r, r/2)--(sx*r, r/2);
58 draw (-sx*r, -r/2)--(sx*r, -r/2);
59 currentpicture := currentpicture shifted (0, r);
62 %%% strange turning path.
63 fet_beginchar("accBayanbase", "accBayanbase", "accBayanbase")
66 % set_char_box(accreg_lh#, accreg_lh#, 3accreg_lh#, 0);
67 set_char_box(accreg_lh#, accreg_lh#, 0, 3accreg_lh#);
68 pickup pencircle scaled accreg_linethickness;
69 %draw (0, 0)--(2w, 0)--(2w, 3accreg_lh)--(0, 3accreg_lh)--(0, 0);
70 draw (0, 0)--(2w, 0)--(2w, 3accreg_lh)--(0, 3accreg_lh)--cycle;
71 draw (0, accreg_lh)--(2w, accreg_lh);
72 draw (0, 2accreg_lh)--(2w, 2accreg_lh);
73 currentpicture := currentpicture shifted (-w, 0);% -3lh);
76 def def_B(expr w, h) =
78 % pickup pencircle scaled 0.1pt;
79 pickup pencircle scaled 0.15stafflinethickness;
96 z15 = (.94w, h-.5mt*h);
97 z16 = z13 + (0, mt*h);
103 def def_S(expr w, h) =
105 %pickup pencircle scaled 0.02pt;
106 pickup pencircle scaled 0.03stafflinethickness;
110 penpos4(.5thick, 90);
118 z3 = (w-.5thick, .5mb*h);
120 z5 = (.5thick, h-.5mt*h);
126 bue=z2{left}..z1{up};
128 t:=xpart(bue intersectiontimes(z8l--z7l));
130 bueoverst=z6{right}..z7{down};
134 save hs, mb, mt, thin, thick, height, width, cOne, cTwo;
136 height = 2.4staff_space;
137 % URG. smaller sizes should be wider and fatter
138 %thin = 0.05staff_space;
139 %thick = 0.2staff_space;
140 save bx,hx; 4hx+bx=1.15; 10hx+bx=1;
141 fatten:=designsize*hx+bx*1.2;
142 thick:= 0.2staff_space*fatten;
143 % urg: mustn't ever go thinner than blot!
144 thin#:= blot_diameter#;
145 define_pixels (thin);
154 def print_penpos (suffix $)=
155 message "z"&str $ &"l = ("&decimal x.$.l&", "&decimal y.$.l&"); z"&str $ &"r = ("&decimal x.$.r&", "&decimal y.$.r&");";
158 %fet_beginchar("accTEST", "accTEST", "accTEST")
159 % set_char_box(.4staffsize#, .4staffsize#, 0, 2.4staff_space#);
161 % penlabels(10, 11, 12, 13, 14);
162 % penstroke z10e--z11e{right}..z12e..z13e{left}--z14e;
165 fet_beginchar("accSB", "accSB", "accSB")
166 set_char_box(.4staffsize#, .4staffsize#, 0, 2.4staff_space#);
168 def_B(.35width, .7height);
175 penlabels(10, 11, 12, 13, 14);
176 penstroke z10e--z11e{right}..z12e..z13e{left}--z14e;
178 penstroke z13e{right}..z15e{up}..z16e{left}--z17e;
179 penstroke z18e--z19e;
180 pickup pencircle scaled .5thick;
181 drawdot (.37width, .10thick);
182 currentpicture := currentpicture shifted(.40width, 0);
184 def_S(.35width, .7height);
185 penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9);
186 filldraw z1r--z8r--z8l--subpath(t, 1) of bue--cycle;
187 filldraw subpath(t, 1) of bueoverst--z7l--z9r--z9l--cycle;
188 penstroke z1e{down}..z2e{right}..z3e
190 ..z5e..z6e{right}...z7e{down};
191 pickup pencircle scaled .5thick;
192 drawdot (.37width, .10thick);
193 currentpicture := currentpicture shifted (-.40width, -.85height);
194 draw (-.5width, 0)--(.5width, 0)--(.5width, -height)
195 --(-.5width, -height)--(-.5width, 0);
196 currentpicture := currentpicture shifted (0, 2.4staff_space);
199 fet_beginchar("accBB", "accBB", "accBB")
200 set_char_box(.4staffsize#, .4staffsize#, 0, 2.4staff_space#);
202 def_B(.35width, .7height);
204 penstroke z10e--z11e{right}..z12e{up}..z13e{left}--z14e;
206 penstroke z13e{right}..z15e{up}..z16e{left}--z17e;
207 penstroke z18e--z19e;
208 penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9);
209 pickup pencircle scaled .5thick;
210 drawdot(.37width, .10thick);
211 currentpicture := currentpicture shifted (.40width, 0);
212 penstroke z10e--z11e{right}..z12e{up}..z13e{left}--z14e;
213 penstroke z13e{right}..z15e{up}..z16e{left}--z17e;
214 penstroke z18e--z19e;
215 drawdot(.37width, .10thick);
216 currentpicture := currentpicture shifted(-.40width, -.85height);
217 draw (-.5width, 0)--(.5width, 0)--(.5width, -height)
218 --(-.5width, -height)--(-.5width, 0);
219 penlabels(10, 11, 12, 13, 14, 15, 16, 17, 18, 19 );
220 currentpicture := currentpicture shifted (0, 2.4staff_space);
224 %%% strange turning path.
225 fet_beginchar("accOldEE", "accOldEE", "accOldEE")
226 set_char_box(staff_space#, staff_space#, 0, 2staff_space#);
233 draw fullcircle scaled 2r;
235 filldraw fullcircle scaled lr;
237 z2 = (0, 0) + ir*(dir 45);
240 for pp := 0 step 45 until 360:
241 filldraw fullcircle scaled lr shifted (ir*(dir pp));
243 for pp := 0 step 45 until 360:
244 filldraw ((0, 0)--(.2lr, ir)--(-.2lr, ir)--cycle) rotated pp;
246 currentpicture := currentpicture shifted (0, r);
249 fet_beginchar("accOldEES", "accOldEES", "accOldEES")
250 set_char_box(staff_space#, staff_space#, 0, 2staff_space#);
255 draw fullcircle scaled 2r;
256 currentpicture := currentpicture shifted (w/2, shy*h);
257 save thin, thick, sw, ch, cw, mb, mt;
260 % URG. smaller sizes should be wider and fatter
263 save bx,hx; 4hx+bx=1.15; 10hx+bx=1;
264 fatten:=designsize*hx+bx*1.2;
267 % urg: mustn't ever go thinner than blot!
268 %thin = 0.05staff_space;
270 thin#:= blot_diameter#;
271 define_pixels (thin);
278 z1 = (0, ch-.5thin); penpos1 (thin, -90);
279 z2 = (.7cw, y1); penpos2 (thin, -90);
280 z3 = (cw, (mb+.5mt)*ch); penpos3(thick, -180);
281 z4 = (.65cw, mb*ch); penpos4(thin, 90);
282 z5 = (sw+thick, mb*ch); penpos5(thin, 90);
283 z6 = (.9cw, .5mb*ch); penpos6(thick, 0);
284 z7 = (1.2cw, 0); penpos7(thin, 90);
285 z8 = (1.3cw, .2mb*ch); penpos8(thin, 180);
286 penlabels(1, 2, 3, 4, 5, 6, 7, 8);
289 pickup pencircle scaled 0.001pt;
290 filldraw (0, 0)--(0, thin)--(sw, thin)--(sw, ch-thin)
291 --(sw+thick, ch-thin)--(sw+thick, thin)
292 --(2sw+thick, thin)--(2sw+thick, 0)--cycle;
294 penstroke z1e--z2e{right}..z3e..z4e{left}--z5e;
296 penstroke z4e{right}..z6e{down}..z7e{right}..z8e{up};
297 currentpicture := currentpicture shifted (-w/2, -shy*h);
298 currentpicture := currentpicture shifted (0, r);
301 fet_endgroup("accordion")