1 % solfa.mf - implements solfa shaped notes
3 % (c) 2001--2005 Glen Prideaux <glenprideaux@iname.com>
5 % We can use the regular distorted-elliptical head in the feta font
6 % for the sol head, but we can't use the triangle or diamond heads for
7 % the do or me because they're too narrow and their lines too thin.
9 fet_begingroup("solfa");
11 noteheight#:=staff_space# + overdone_heads * stafflinethickness#;
12 define_pixels(noteheight);
17 save noteshape, noteishape, dx, dy, ai_a, bi_b;
18 path noteshape, noteishape;
19 noteshape = noteishape = triangle;
21 (ai_a,bi_b)=(i_o,i_o);
22 draw_solfa_note_shape;
26 fet_beginchar("Whole dohead", "s0do")
27 pickup pencircle scaled blot_diameter;
35 fet_beginchar("Half dohead", "s1do")
43 fet_beginchar("Quart dohead", "s2do")
49 draw_solfa_quarter_note_shape;
52 save reshape; path reshape;
53 reshape = (-1,1)--(-1,0.2){down} ... (0,-1) ... {up}(1,0.2)--(1,1)--cycle;
55 fet_beginchar("Whole rehead", "s0re")
56 save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
57 path noteshape, noteishape;
64 draw_solfa_note_shape;
67 fet_beginchar("Half rehead", "s1re")
68 save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
69 path noteshape, noteishape;
76 draw_solfa_note_shape;
79 fet_beginchar("Quart rehead", "s2re")
85 draw_solfa_quarter_note_shape;
91 % fa - scalene triangle:
92 % for stem up: (0,h/2) -- (w,h/2) -- (w,-h/2) -- cycle;
93 % for stem down: (w,-h/2) -- (0,1h/2) -- (0,h/2) -- cycle;
94 % (one is a 180 degree rotation of the other)
95 % stem attachment: (doesn't much matter)
97 save fashape; path fashape;
98 fashape = (-1,1)--(1,1)--(1,-1)--cycle;
100 fet_beginchar("Whole fahead", "s0fa")
101 save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
102 path noteshape, noteishape;
104 noteishape = fashape;
109 draw_solfa_note_shape;
112 fet_beginchar("Half stemup fahead", "u1fa")
113 save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
114 path noteshape, noteishape;
116 noteishape = fashape;
121 draw_solfa_note_shape;
124 fet_beginchar("Quart stemup fahead", "u2fa")
130 draw_solfa_quarter_note_shape;
133 fet_beginchar("Half stemdn fahead", "d1fa")
134 save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
135 path noteshape, noteishape;
136 noteshape = fashape rotated 180;
137 noteishape = fashape rotated 180;
142 draw_solfa_note_shape;
145 fet_beginchar("Quart stemdn fahead", "d2fa")
150 noteshape = fashape rotated 180;
151 draw_solfa_quarter_note_shape;
155 % sol - oval ... the standard "round" note
158 % la - rectangle: (0,h/2)--(w,h.2)--(w,-h/2)--(0,-h/2)--cycle;
159 % stem attachment: (doesn't much matter)
160 save lashape; path lashape;
161 lashape = (-1,-1)--(-1,1)--(1,1)--(1,-1)--cycle;
163 fet_beginchar("Whole lahead", "s0la")
164 save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
165 path noteshape, noteishape;
167 noteishape = lashape;
172 draw_solfa_note_shape;
175 fet_beginchar("Half lahead", "s1la")
176 save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
177 path noteshape, noteishape;
179 noteishape = lashape;
184 draw_solfa_note_shape;
187 fet_beginchar("Quart lahead", "s2la")
193 draw_solfa_quarter_note_shape;
198 % ti - an "icecream cone" with about 2/3 of
199 % the height in the cone and only 1/3 in the curved top:
200 % (0,h/6)--(w/2,-h/2)--(w,h/6)..(w/2,h/2)..cycle;
201 % stem attachment: h/6
202 save tishape; path tishape;
203 tishape = (0,-1)--(-1,0.3)..(0,1)..(1,0.3)--cycle;
205 fet_beginchar("Whole tihead", "s0ti")
206 save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
207 path noteshape, noteishape;
209 noteishape = tishape;
214 draw_solfa_note_shape;
217 fet_beginchar("Half tihead", "s1ti")
218 save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
219 path noteshape, noteishape;
221 noteishape = tishape;
226 draw_solfa_note_shape;
229 fet_beginchar("Quart tihead", "s2ti")
235 draw_solfa_quarter_note_shape;