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--2006 Mats Bengtsson <matsb@s3.kth.se>,
7 % Christian Mondrup <scancm@biobase.dk>
8 % (c) 2002--2006 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;
56 pickup pencircle scaled round;
70 % labels (1, 2, 3, 4, 5, 6);
74 def mensural_timesig (expr verbose_name, internal_name,
75 full_circle, reverse_circle, slashed, dotted) =
76 fet_beginchar (verbose_name, internal_name);
80 mensural_Cdiameter# + mensural_Cthickness#,
81 .75 (mensural_Cdiameter# + mensural_Cthickness#),
82 .75 (mensural_Cdiameter# + mensural_Cthickness#));
84 if (full_circle or dotted):
85 draw_nail ((-mensural_Cthickness / 2, -d),
86 (mensural_Cthickness / 2, h));
87 elseif reverse_circle:
88 draw_nail ((0, -d), (mensural_Cthickness, h));
90 draw_nail ((-mensural_Cthickness, -d), (0, h));
95 mensural_Cdiameter# + mensural_Cthickness#,
96 .5 (mensural_Cdiameter# + mensural_Cthickness#),
97 .5 (mensural_Cdiameter# + mensural_Cthickness#));
103 ellipse := fullcircle xscaled mensural_Cthickness
104 yscaled mensural_Chairpin;
115 pat := fullcircle scaled mensural_Cdiameter;
117 fill get_subpoint (ellipse,
120 for i = 1 step 1 until length pat:
121 .. get_subpoint (ellipse,
126 unfill get_subpoint (ellipse,
129 for i = 1 step 1 until length pat:
130 .. get_subpoint (ellipse,
136 pat := threequartercircle rotated rot
137 scaled mensural_Cdiameter;
139 fill get_subpath (ellipse,
143 for i = 1 step 1 until (length pat - 1):
144 .. get_subpoint (ellipse,
148 .. get_subpath (ellipse,
149 direction infinity of pat,
150 -direction infinity of pat,
151 point infinity of pat)
152 for i = (length pat - 1) step -1 until 1:
153 .. get_subpoint (ellipse,
161 pickup pencircle scaled 4 linethickness;
165 currentpicture := currentpicture
166 shifted 0.5 (mensural_Cdiameter
167 + mensural_Cthickness, 0);
172 %% tempus imperfectum cum prolatione imperfecta
173 mensural_timesig ("Mensural 4/4 meter", "mensural44",
174 false, false, false, false);
177 %% tempus imperfectum cum prolatione imperfecta proportio dupla
178 mensural_timesig ("Mensural 2/2 meter", "mensural22",
179 false, false, true, false);
182 %% tempus perfectum cum prolatione imperfecta
183 mensural_timesig ("Mensural 3/2 meter", "mensural32",
184 true, false, false, false);
187 %% tempus imperfectum cum prolatione perfecta
188 mensural_timesig ("Mensural 6/4 meter", "mensural64",
189 false, false, false, true);
192 %% tempus perfectum cum prolatione perfecta
193 mensural_timesig ("Mensural 9/4 meter", "mensural94",
194 true, false, false, true);
197 %% tempus perfectum cum prolatione imperfecta proportio dupla
198 mensural_timesig ("Mensural 3/4 meter", "mensural34",
199 true, false, true, false);
202 %% tempus imperfectum cum prolatione perfecta proportio dupla
203 mensural_timesig ("Mensural 6/8 meter", "mensural68",
204 false, false, true, true);
207 %% tempus perfectum cum prolatione perfecta proportio dupla
208 mensural_timesig ("Mensural 9/8 meter", "mensural98",
209 true, false, true, true);
212 %% tempus imperfectum cum prolatione imperfecta diminutio simplex
213 mensural_timesig ("Mensural 4/8 meter", "mensural48",
214 false, true, false, false);
217 %% tempus imperfectum cum prolatione perfecta diminutio simplex
218 mensural_timesig ("Mensural 6/8 meter", "mensural68alt",
219 false, true, false, true);
222 %% tempus imperfectum cum prolatione imperfecta diminutio duplex
223 mensural_timesig ("Mensural 2/4 meter", "mensural24",
224 false, true, true, false);
231 % NEO-MENSURAL NOTATION
236 save neomensural_Cdiameter, neomensural_Cthickness;
238 neomensural_Cdiameter# := 3/2 staff_space#;
239 neomensural_Cthickness# := 2 linethickness#;
241 define_pixels (neomensural_Cdiameter, neomensural_Cthickness);
244 def neomensural_timesig (expr verbose_name, internal_name,
245 full_circle, reverse_circle, slashed, dotted) =
246 fet_beginchar (verbose_name, internal_name);
249 neomensural_Cdiameter# + neomensural_Cthickness#,
250 .5 (neomensural_Cdiameter# + neomensural_Cthickness#),
251 .5 (neomensural_Cdiameter# + neomensural_Cthickness#));
254 if (full_circle or dotted):
255 draw_block ((-neomensural_Cthickness / 2,
256 -d + neomensural_Cthickness / 2),
257 (neomensural_Cthickness / 2,
258 h - neomensural_Cthickness / 2));
259 elseif reverse_circle:
261 -d + neomensural_Cthickness / 2),
262 (neomensural_Cthickness,
263 h - neomensural_Cthickness / 2));
265 draw_block ((-neomensural_Cthickness,
266 -d + neomensural_Cthickness / 2),
268 h - neomensural_Cthickness / 2));
275 ellipse := fullcircle scaled neomensural_Cthickness;
286 pat := fullcircle scaled neomensural_Cdiameter;
288 fill get_subpoint (ellipse,
291 for i = 1 step 1 until length pat:
292 .. get_subpoint (ellipse,
297 unfill get_subpoint (ellipse,
300 for i = 1 step 1 until length pat:
301 .. get_subpoint (ellipse,
307 pat := threequartercircle rotated rot
308 scaled neomensural_Cdiameter;
310 fill get_subpath (ellipse,
314 for i = 1 step 1 until (length pat - 1):
315 .. get_subpoint (ellipse,
319 .. get_subpath (ellipse,
320 direction infinity of pat,
321 -direction infinity of pat,
322 point infinity of pat)
323 for i = (length pat - 1) step -1 until 1:
324 .. get_subpoint (ellipse,
332 pickup pencircle scaled 4 linethickness;
336 currentpicture := currentpicture
337 shifted 0.5 (neomensural_Cdiameter
338 + neomensural_Cthickness, 0);
343 %% tempus imperfectum cum prolatione imperfecta
344 neomensural_timesig ("Mensural 4/4 meter", "neomensural44",
345 false, false, false, false);
348 %% tempus imperfectum cum prolatione imperfecta proportio dupla
349 neomensural_timesig ("Mensural 2/2 meter", "neomensural22",
350 false, false, true, false);
353 %% tempus perfectum cum prolatione imperfecta
354 neomensural_timesig ("Mensural 3/2 meter", "neomensural32",
355 true, false, false, false);
358 %% tempus imperfectum cum prolatione perfecta
359 neomensural_timesig ("Mensural 6/4 meter", "neomensural64",
360 false, false, false, true);
363 %% tempus perfectum cum prolatione perfecta
364 neomensural_timesig ("Mensural 9/4 meter", "neomensural94",
365 true, false, false, true);
368 %% tempus perfectum cum prolatione imperfecta proportio dupla
369 neomensural_timesig ("Mensural 3/4 meter", "neomensural34",
370 true, false, true, false);
373 %% tempus imperfectum cum prolatione perfecta proportio dupla
374 neomensural_timesig ("Mensural 6/8 meter", "neomensural68",
375 false, false, true, true);
378 %% tempus perfectum cum prolatione perfecta proportio dupla
379 neomensural_timesig ("Mensural 9/8 meter", "neomensural98",
380 true, false, true, true);
383 %% tempus imperfectum cum prolatione imperfecta diminutio simplex
384 neomensural_timesig ("Mensural 4/8 meter", "neomensural48",
385 false, true, false, false);
388 %% tempus imperfectum cum prolatione perfecta diminutio simplex
389 neomensural_timesig ("Mensural 6/8 meter", "neomensural68alt",
390 false, true, false, true);
393 %% tempus imperfectum cum prolatione imperfecta diminutio duplex
394 neomensural_timesig ("Mensural 2/4 meter", "neomensural24",
395 false, true, true, false);
398 fet_endgroup ("timesig");