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.15linethickness;
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.03linethickness;
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;
135 width = .8(4 staff_space);
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&");";
159 %%% strange turning path.
160 fet_beginchar("accOldEE", "accOldEE", "accOldEE")
161 set_char_box(staff_space#, staff_space#, 0, 2staff_space#);
165 lr = .4 staff_space - linethickness;
171 penpos2 ( .05 staff_space + .5 linethickness,0);
176 pickup pencircle scaled blot_diameter;
177 for pp := 0 step 45 until 360:
178 filldraw fullcircle scaled lr shifted (ir*(dir pp));
179 filldraw (z1r--z1l--z2l--z2r--cycle) rotated pp;
183 draw fullcircle scaled 2r;
186 filldraw fullcircle scaled lr;
188 currentpicture := currentpicture shifted (0, r);
195 fet_endgroup("accordion")