1 % -%-Fundamental-%- -*-Metafont-*-
2 % parmesan-timesig.mf -- implement ancient time signatures
4 % source file of LilyPond's pretty-but-neat music font
6 % (c) 1998--2007 Mats Bengtsson <matsb@s3.kth.se>,
7 % Christian Mondrup <scancm@biobase.dk>
8 % (c) 2002--2007 Juergen Reuter <reuter@ipd.uka.de>
11 fet_begingroup ("timesig");
14 path threequartercircle;
16 threequartercircle := halfcircle & quartercircle rotated 180;
18 save mensural_Cdiameter, mensural_Cthickness, mensural_Chairpin;
20 mensural_Cdiameter# := 3/2 staff_space#;
21 mensural_Cthickness# := 2 linethickness#;
22 mensural_Chairpin# := 0.5 linethickness#;
24 define_pixels (mensural_Cdiameter, mensural_Cthickness, mensural_Chairpin);
36 def draw_nail (expr bottom_left, top_right) =
39 round = floor min (blot_diameter,
40 xpart (top_right-bottom_left),
41 ypart (top_right-bottom_left));
43 pickup pencircle scaled round;
45 z2 + (round / 2, round / 2) = top_right +
46 (mensural_Cthickness / 2, 0);
47 z4 - (round / 2,round / 2) = bottom_left;
50 x2 = x1 + mensural_Cthickness / 2;
54 y5 = y6 = y2 - 2 mensural_Cthickness;
68 % labels (1, 2, 3, 4, 5, 6);
72 def mensural_timesig (expr verbose_name, internal_name,
73 full_circle, reverse_circle, slashed, dotted) =
74 fet_beginchar (verbose_name, internal_name);
78 mensural_Cdiameter# + mensural_Cthickness#,
79 .75 (mensural_Cdiameter# + mensural_Cthickness#),
80 .75 (mensural_Cdiameter# + mensural_Cthickness#));
82 if (full_circle or dotted):
83 draw_nail ((-mensural_Cthickness / 2, -d),
84 (mensural_Cthickness / 2, h));
85 elseif reverse_circle:
86 draw_nail ((0, -d), (mensural_Cthickness, h));
88 draw_nail ((-mensural_Cthickness, -d), (0, h));
93 mensural_Cdiameter# + mensural_Cthickness#,
94 .5 (mensural_Cdiameter# + mensural_Cthickness#),
95 .5 (mensural_Cdiameter# + mensural_Cthickness#));
101 ellipse := fullcircle xscaled mensural_Cthickness
102 yscaled mensural_Chairpin;
113 pat := fullcircle scaled mensural_Cdiameter;
115 fill get_subpoint (ellipse,
118 for i = 1 step 1 until length pat:
119 .. get_subpoint (ellipse,
124 unfill get_subpoint (ellipse,
127 for i = 1 step 1 until length pat:
128 .. get_subpoint (ellipse,
134 pat := threequartercircle rotated rot
135 scaled mensural_Cdiameter;
137 fill get_subpath (ellipse,
141 for i = 1 step 1 until (length pat - 1):
142 .. get_subpoint (ellipse,
146 .. get_subpath (ellipse,
147 direction infinity of pat,
148 -direction infinity of pat,
149 point infinity of pat)
150 for i = (length pat - 1) step -1 until 1:
151 .. get_subpoint (ellipse,
159 pickup pencircle scaled 4 linethickness;
163 currentpicture := currentpicture
164 shifted 0.5 (mensural_Cdiameter
165 + mensural_Cthickness, 0);
170 %% tempus imperfectum cum prolatione imperfecta
171 mensural_timesig ("Mensural 4/4 meter", "mensural44",
172 false, false, false, false);
175 %% tempus imperfectum cum prolatione imperfecta proportio dupla
176 mensural_timesig ("Mensural 2/2 meter", "mensural22",
177 false, false, true, false);
180 %% tempus perfectum cum prolatione imperfecta
181 mensural_timesig ("Mensural 3/2 meter", "mensural32",
182 true, false, false, false);
185 %% tempus imperfectum cum prolatione perfecta
186 mensural_timesig ("Mensural 6/4 meter", "mensural64",
187 false, false, false, true);
190 %% tempus perfectum cum prolatione perfecta
191 mensural_timesig ("Mensural 9/4 meter", "mensural94",
192 true, false, false, true);
195 %% tempus perfectum cum prolatione imperfecta proportio dupla
196 mensural_timesig ("Mensural 3/4 meter", "mensural34",
197 true, false, true, false);
200 %% tempus imperfectum cum prolatione perfecta proportio dupla
201 mensural_timesig ("Mensural 6/8 meter", "mensural68",
202 false, false, true, true);
205 %% tempus perfectum cum prolatione perfecta proportio dupla
206 mensural_timesig ("Mensural 9/8 meter", "mensural98",
207 true, false, true, true);
210 %% tempus imperfectum cum prolatione imperfecta diminutio simplex
211 mensural_timesig ("Mensural 4/8 meter", "mensural48",
212 false, true, false, false);
215 %% tempus imperfectum cum prolatione perfecta diminutio simplex
216 mensural_timesig ("Mensural 6/8 meter", "mensural68alt",
217 false, true, false, true);
220 %% tempus imperfectum cum prolatione imperfecta diminutio duplex
221 mensural_timesig ("Mensural 2/4 meter", "mensural24",
222 false, true, true, false);
229 % NEO-MENSURAL NOTATION
234 save neomensural_Cdiameter, neomensural_Cthickness;
236 neomensural_Cdiameter# := 3/2 staff_space#;
237 neomensural_Cthickness# := 2 linethickness#;
239 define_pixels (neomensural_Cdiameter, neomensural_Cthickness);
242 def neomensural_timesig (expr verbose_name, internal_name,
243 full_circle, reverse_circle, slashed, dotted) =
244 fet_beginchar (verbose_name, internal_name);
247 neomensural_Cdiameter# + neomensural_Cthickness#,
248 .5 (neomensural_Cdiameter# + neomensural_Cthickness#),
249 .5 (neomensural_Cdiameter# + neomensural_Cthickness#));
252 pickup penrazor scaled neomensural_Cthickness;
255 t := neomensural_Cthickness / 2;
257 if (full_circle or dotted):
260 elseif reverse_circle:
272 ellipse := fullcircle scaled neomensural_Cthickness;
283 pat := fullcircle scaled neomensural_Cdiameter;
285 fill get_subpoint (ellipse,
288 for i = 1 step 1 until length pat:
289 .. get_subpoint (ellipse,
294 unfill get_subpoint (ellipse,
297 for i = 1 step 1 until length pat:
298 .. get_subpoint (ellipse,
304 pat := threequartercircle rotated rot
305 scaled neomensural_Cdiameter;
307 fill get_subpath (ellipse,
311 for i = 1 step 1 until (length pat - 1):
312 .. get_subpoint (ellipse,
316 .. get_subpath (ellipse,
317 direction infinity of pat,
318 -direction infinity of pat,
319 point infinity of pat)
320 for i = (length pat - 1) step -1 until 1:
321 .. get_subpoint (ellipse,
329 pickup pencircle scaled 4 linethickness;
333 currentpicture := currentpicture
334 shifted 0.5 (neomensural_Cdiameter
335 + neomensural_Cthickness, 0);
340 %% tempus imperfectum cum prolatione imperfecta
341 neomensural_timesig ("Mensural 4/4 meter", "neomensural44",
342 false, false, false, false);
345 %% tempus imperfectum cum prolatione imperfecta proportio dupla
346 neomensural_timesig ("Mensural 2/2 meter", "neomensural22",
347 false, false, true, false);
350 %% tempus perfectum cum prolatione imperfecta
351 neomensural_timesig ("Mensural 3/2 meter", "neomensural32",
352 true, false, false, false);
355 %% tempus imperfectum cum prolatione perfecta
356 neomensural_timesig ("Mensural 6/4 meter", "neomensural64",
357 false, false, false, true);
360 %% tempus perfectum cum prolatione perfecta
361 neomensural_timesig ("Mensural 9/4 meter", "neomensural94",
362 true, false, false, true);
365 %% tempus perfectum cum prolatione imperfecta proportio dupla
366 neomensural_timesig ("Mensural 3/4 meter", "neomensural34",
367 true, false, true, false);
370 %% tempus imperfectum cum prolatione perfecta proportio dupla
371 neomensural_timesig ("Mensural 6/8 meter", "neomensural68",
372 false, false, true, true);
375 %% tempus perfectum cum prolatione perfecta proportio dupla
376 neomensural_timesig ("Mensural 9/8 meter", "neomensural98",
377 true, false, true, true);
380 %% tempus imperfectum cum prolatione imperfecta diminutio simplex
381 neomensural_timesig ("Mensural 4/8 meter", "neomensural48",
382 false, true, false, false);
385 %% tempus imperfectum cum prolatione perfecta diminutio simplex
386 neomensural_timesig ("Mensural 6/8 meter", "neomensural68alt",
387 false, true, false, true);
390 %% tempus imperfectum cum prolatione imperfecta diminutio duplex
391 neomensural_timesig ("Mensural 2/4 meter", "neomensural24",
392 false, true, true, false);
395 fet_endgroup ("timesig");