1 % -%-Fundamental-%- -*-Metafont-*-
2 % parmesan-heads.mf -- implement ancient note heads
4 % source file of LilyPond's pretty-but-neat music font
6 % (c) 2001--2006 Juergen Reuter <reuter@ipd.uka.de>
8 % Neo-mensural heads originally by
9 % Christian Mondrup and Mats Bengtsson
12 save black_notehead_width;
13 numeric black_notehead_width;
15 fet_begingroup ("noteheads")
20 % The head is assumed to be vertically centered around (0, 0).
21 % The left-most edge of the head should touch the vertical line
22 % that goes though the point (0, 0).
24 % set_char_box() conventions:
26 % * breapth: Ignored (as far as I know). Should be set to 0.
28 % * width: Should match the head's width.
30 % * depth: Should match the bottom edge of the head. Affects vertical
33 % * height: Should match the top edge of the head. Affects vertical
36 % TODO: should depth/height include appendages/stems?
39 noteheight# := staff_space# + (1 + overdone_heads) * stafflinethickness#;
40 define_pixels (noteheight);
52 def draw_neomensural_brevis (expr brevwid) =
53 save beamheight, head_width;
54 save holeheight, stem_width;
55 save serif_size, serif_protrude;
57 head_width# = brevwid;
58 holeheight = 3 stafflinethickness;
59 stem_width = 1.4 stafflinethickness;
61 define_pixels (head_width);
63 set_char_box (0, head_width#,
64 noteheight# / 2, noteheight# / 2);
66 2 beamheight + holeheight = noteheight;
67 serif_size = (holeheight - stafflinethickness) / 2;
68 serif_protrude = 1.5 serif_size;
71 z2l = (0, -stafflinethickness / 2);
72 z3r = z2r + serif_size * (1, -1);
75 z5l = z3l + (-serif_size, -serif_protrude);
77 penpos1 (stem_width, 0);
78 penpos2 (stem_width, 0);
79 penpos3 (beamheight, 90);
80 penpos4 (beamheight, 90);
81 penpos5 (stem_width, 180);
92 -- reverse pat_out yscaled -1;
94 -- reverse pat_out shifted (-x4r, 0)
105 -- reverse pat_in yscaled -1;
107 -- reverse pat_in shifted (-x4r, 0)
113 penlabels (1, 2, 3, 4, 5);
117 %%% This head does not seem to be used anywhere. Junk me? -- jr
118 def draw_neomensural_left_stemmed_head (expr wid) =
119 draw_neomensural_brevis (wid);
121 x6 = x7 = stem_width / 2;
123 y7 = y5 - 2.25 staff_space;
125 z17 = (x7, y7 - stem_width / 2);
127 penpos6 (stem_width, 0);
128 penpos7 (stem_width, 0);
142 %%% This head does not seem to be used anywhere. Junk me? -- jr
143 fet_beginchar ("Left stemmed notehead", "slneomensural");
144 draw_neomensural_left_stemmed_head (2 staff_space#);
149 % Find point on `curve' which gives the tangent between point `p'
150 % and `curve'. To guide the search, two auxiliary points must be
151 % specified, `p_in' and `p_out'. The line between `p' and `p_in'
152 % must intersect `curve', while the line between `p' and `p_out'
155 def find_tangent (expr p, curve, p_in, p_out) =
157 save mid, t, t_good, in, out;
164 mid := 0.5 [in, out];
165 exitif abs (out - mid) <= eps;
166 t := xpart (curve intersectiontimes (p -- mid));
175 point t_good of curve
181 % Some sources (eg. Musix/OpusTeX) think that the appendage should be on
182 % the left, some say right. Right wins democratically.
184 def draw_neomensural_longa (expr wid) =
185 draw_neomensural_brevis (wid);
191 z6 - z7 = (stem_width / 2, -staff_space);
192 theta = angle (z6 - z7) + 90;
194 penpos7 (stem_width, 0);
195 penpos6 (1.2 stem_width, theta);
197 z7' = find_tangent (z6l, pat_out,
198 (x7l + 0.5 stem_width, y7l),
199 (x7l - 0.5 stem_width, y7l));
213 % En wij presenteren U: de opvolgster van Emily
217 fet_beginchar ("Neo-mensural maxima notehead", "s-3neomensural");
218 draw_neomensural_longa (2.6 staff_space#);
222 fet_beginchar ("Neo-mensural longa notehead", "s-2neomensural");
223 draw_neomensural_longa (2 staff_space#);
227 fet_beginchar ("Neo-mensural brevis notehead", "s-1neomensural");
228 draw_neomensural_brevis (2 staff_space#);
232 def draw_neomensural_black_head (expr wid, height) =
234 save ne, nw, ne_dist, nw_dist;
235 pair ne, nw, ne_dist, nw_dist;
239 set_char_box (0, head_width#,
240 height / 2, height / 2);
242 charwx := head_width# / 2;
243 charwy := height / 2;
246 x2 = x4 = (x1 + x3) / 2;
248 pickup pencircle scaled blot_diameter;
255 ne := unitvector (z2 - z1);
256 nw_dist := (ne rotated 90) * 0.5 blot_diameter;
257 nw := unitvector (z2 - z3);
258 ne_dist := (nw rotated -90) * 0.5 blot_diameter;
261 .. (z1 + nw_dist){ne}
262 -- (z2 + nw_dist){ne}
264 .. (z2 + ne_dist){-nw}
265 -- (z3 + ne_dist){-nw}
267 .. (z3 - nw_dist){-ne}
268 -- (z4 - nw_dist){-ne}
270 .. (z4 - ne_dist){nw}
271 -- (z1 - ne_dist){nw}
278 def draw_neomensural_open_head (expr wid, height)=
279 draw_neomensural_black_head (wid, height);
283 diamNW = length (z2 - z1) + blot_diameter;
284 diamSW = length (z4 - z1) + blot_diameter;
286 save hole_widthNW, hole_widthSW;
288 hole_widthNW = 0.34 diamNW ;
289 hole_widthSW + 2.6 linethickness = diamSW;
291 (z7 + z5) / 2 = (w / 2, 0);
292 (z8 + z6) / 2 = (w / 2, 0);
293 z6 - z5 = hole_widthNW * unitvector (z2 - z1);
294 z7 - z6 = hole_widthSW * unitvector (z4 - z1);
307 % WL says the thin lines should be thinner.
309 fet_beginchar ("Harmonic notehead (Neo-mensural open)", "s0harmonic");
310 draw_neomensural_open_head (1.3 staff_space#, 1.3 noteheight#);
311 charwx := head_width#;
316 fet_beginchar ("Harmonic notehead (Neo-mensural black)", "s2harmonic");
317 draw_neomensural_black_head (1.3 staff_space#, 1.3 noteheight#);
318 charwx := head_width#;
323 fet_beginchar ("Neo-mensural semibrevis head", "s0neomensural");
324 draw_neomensural_open_head (staff_space#, noteheight#);
328 fet_beginchar ("Neo-mensural minima head", "s1neomensural");
329 draw_neomensural_open_head (staff_space#, noteheight#);
333 fet_beginchar ("Neo-mensural semiminima head", "s2neomensural");
334 draw_neomensural_black_head (staff_space#, noteheight#);
338 def draw_mensural_brevis (expr wid) =
339 % TODO. For the moment, fall back to draw_neomensural_brevis.
340 draw_neomensural_brevis (wid);
344 %%% This head does not seem to be used anywhere. Junk me? -- jr
345 def draw_mensural_left_stemmed_head (expr wid) =
346 draw_mensural_brevis (wid);
348 x6 = x7 = stem_width / 2;
350 y7 = y5 - 2.25 staff_space;
352 z17 = (x7, y7 - stem_width / 2);
354 penpos6 (stem_width, 0);
355 penpos7 (stem_width, 0);
369 def draw_mensural_longa (expr wid) =
370 draw_mensural_brevis (wid);
372 x6 = x7 = head_width - stem_width / 2;
374 y7 = y5 - 2.25 staff_space;
376 z17 = (x7, y7 - stem_width / 2);
378 penpos6 (stem_width, 0);
379 penpos7 (stem_width, 0);
393 %%% This head does not seem to be used anywhere. Junk me? -- jr
394 fet_beginchar ("Mensural left stemmed notehead", "slmensural");
395 draw_mensural_left_stemmed_head (staff_space#);
399 fet_beginchar ("Mensural maxima notehead", "s-3mensural");
400 draw_mensural_longa (2.0 staff_space#);
404 fet_beginchar ("Mensural longa notehead", "s-2mensural");
405 draw_mensural_longa (staff_space#);
409 fet_beginchar ("Mensural brevis notehead", "s-1mensural");
410 draw_mensural_brevis (staff_space#);
415 % Shift `curve' along the line given by the auxiliary points `p_in'
416 % and `p_out' until `line' is a tangent, and return the shift.
417 % If `curve' is shifted to position `p_in', it must intersect
418 % `line', while shifted to `p_out' it must not.
420 def find_tangent_shift (expr line, curve, p_in, p_out) =
422 save mid, t, t_good, in, out;
429 mid := 0.5 [in, out];
430 exitif abs (out - mid) <= eps;
431 t := xpart ((curve shifted mid) intersectiontimes line);
446 % Get subpath specified by `dir_in' and `dir_out' of `curve'
447 % which is then shifted by `offset'. Assure that result has
448 % the same orientation as `curve'.
450 def get_subpath (expr curve, dir_in, dir_out, offset) =
454 t_in := directiontime dir_in of curve;
455 t_out := directiontime dir_out of curve;
458 t_out := t_out + length curve;
461 (subpath (t_in, t_out) of curve) shifted offset
466 def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) =
467 save head_width, head_height;
468 save ellipse, ellipse_r;
469 path ellipse, ellipse_r;
471 head_height# = head_h;
472 head_width# / head_height# = tand (angle);
474 set_char_box (0, head_width#,
475 head_height# / 2, head_height# / 2);
477 charwx := head_width# / 2;
478 charwy := head_height# / 2 - linethickness#;
480 define_pixels (head_width, head_height);
482 ellipse := reverse fullcircle
483 xscaled (max (blot_diameter, pen_w * head_width))
484 yscaled (max (blot_diameter, pen_h * head_width))
487 z1 = find_tangent_shift (((0, h) -- (0, -h)), ellipse,
489 z2 = find_tangent_shift (((0, h) -- (w, h)), ellipse,
490 (w / 2, h), (w / 2, 0));
491 z3 = find_tangent_shift (((w, h) -- (w, -h)), ellipse,
493 z4 = find_tangent_shift (((0, -h) -- (w, -h)), ellipse,
494 (w / 2, -h), (w / 2, 0));
496 fill get_subpath (ellipse, z1 - z4, z2 - z1, z1)
497 -- get_subpath (ellipse, z2 - z1, z3 - z2, z2)
498 -- get_subpath (ellipse, z3 - z2, z4 - z3, z3)
499 -- get_subpath (ellipse, z4 - z3, z1 - z4, z4)
506 l12 := (directionpoint (z1 - z2) of ellipse) shifted z1
507 -- (directionpoint (z1 - z2) of ellipse) shifted z2;
508 l23 := (directionpoint (z2 - z3) of ellipse) shifted z2
509 -- (directionpoint (z2 - z3) of ellipse) shifted z3;
510 l34 := (directionpoint (z3 - z4) of ellipse) shifted z3
511 -- (directionpoint (z3 - z4) of ellipse) shifted z4;
512 l41 := (directionpoint (z4 - z1) of ellipse) shifted z4
513 -- (directionpoint (z4 - z1) of ellipse) shifted z1;
515 unfill l12 intersectionpoint l23
516 -- l23 intersectionpoint l34
517 -- l34 intersectionpoint l41
518 -- l41 intersectionpoint l12
526 fet_beginchar ("Mensural semibrevis head", "s0mensural");
527 draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
531 fet_beginchar ("Mensural minima head", "s1mensural");
532 draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
536 fet_beginchar ("Mensural semiminima head", "s2mensural");
537 draw_diamond_head (staff_space#, 0.15, 0.30, 30, false);
541 fet_beginchar ("Petrucci semibrevis head", "s0petrucci");
542 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
543 draw_neomensural_open_head (staff_space#, 1.8 staff_space#);
547 fet_beginchar ("Petrucci minima head", "s1petrucci");
548 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, true);
549 draw_neomensural_open_head (staff_space#, 1.8 staff_space#);
553 fet_beginchar ("Petrucci semiminima head", "s2petrucci");
554 % draw_diamond_head (1.8 staff_space#, 0.15, 0.40, 30, false);
555 draw_neomensural_black_head (staff_space#, 1.8 staff_space#);
563 % EDITIO VATICANA (including solesmes extensions)
568 % parameterized punctum
569 def punctum_char (expr verbose_name, internal_name,
570 linea, cavum, straight, auctum,
571 d_up, up_shift, down_shift, mag) =
572 fet_beginchar (verbose_name, "s" & internal_name);
575 a_b := 1.54; % b_h * a_b / a_w = wd / ht
579 save a, beta, ht, wd;
581 ht# = noteheight# * mag;
585 black_notehead_width# := wd#;
599 % convexity and eccentricity
600 save u_convexity, u_eccentricity;
603 u_convexity# := -0.01 ht#;
604 u_eccentricity# := 0.0 ht#; % dummy
606 u_convexity# := -0.03 ht#;
607 u_eccentricity# := +0.25 ht#;
609 u_convexity# := -0.05 ht#;
610 u_eccentricity# := 0.0 ht#; % dummy
613 save convexity, eccentricity;
615 convexity# := d_sign * u_convexity#;
616 eccentricity# := d_sign * u_eccentricity#;
629 define_pixels (convexity, eccentricity, yoffs, ht, wd);
631 pickup pencircle scaled linethickness;
633 save height, yoffs_bt, p, circle, circle_r;
634 path p, circle, circle_r;
637 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
639 define_pixels (height, yoffs_bt);
641 circle := fullcircle scaled linethickness;
650 save box_top, box_bt;
653 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
654 z2 = (0.21 wd, yoffs_bt + convexity);
655 z3 = (0.42 wd - linethickness/ 2,
656 yoffs_bt + eccentricity);
657 box_top# = height# + yoffs_bt# +
658 max (0, convexity#, eccentricity#);
659 box_bt# = yoffs_bt# +
660 min (0, convexity#, eccentricity#);
669 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
670 z2 = (0.21 wd, yoffs_bt + convexity);
671 z3 = (0.42 wd - linethickness / 2, yoffs_bt);
672 box_top# = height# + yoffs_bt# + max (0, convexity#);
673 box_bt# = yoffs_bt# + min (0, convexity#);
683 labels (1, 2, 3, 4, 5, 6);
688 dirs12 := direction (0 + epsilon) of p;
689 dirs2 := direction 1 of p;
690 dirs32 := direction (2 - epsilon) of p;
691 dirs45 := direction (3 + epsilon) of p;
692 dirs5 := direction 4 of p;
693 dirs65 := direction (5 - epsilon) of p;
695 fill get_subpath (circle, down, dirs12, z1)
697 .. get_subpath (circle, dirs32, up, z3)
698 -- get_subpath (circle, up, dirs45, z4)
700 .. get_subpath (circle, dirs65, down, z6)
708 pat123 := ((directionpoint -dirs12 of circle)
711 .. {dirs32}((directionpoint -dirs32 of circle)
715 pat456 := ((directionpoint -dirs45 of circle)
718 .. {dirs65}((directionpoint -dirs65 of circle)
723 t61 := ypart (pat61 intersectiontimes pat123);
724 t12 := xpart (pat123 intersectiontimes pat34);
725 t34 := ypart (pat34 intersectiontimes pat456);
726 t45 := xpart (pat456 intersectiontimes pat61);
728 unfill subpath (t61, t12) of pat123
729 -- subpath (t34, t45) of pat456
733 set_char_box (0.00 wd#, 0.42 wd#,
734 max (0, -box_bt#) + linethickness# / 2,
735 max (0, box_top#) + linethickness# / 2);
738 save linea_width, linea_height;
740 linea_width# = 0.6 linethickness#;
741 linea_height# = 0.7 ht#;
743 define_pixels (linea_width, linea_height);
745 pickup pencircle scaled 0.6 linethickness;
747 draw_block ((-0.10 wd - linea_width / 2,
749 (-0.10 wd + linea_width / 2,
751 draw_block ((+0.52 wd - linea_width / 2,
753 (+0.52 wd + linea_width / 2,
756 set_char_box (0, 0.62 wd# + linea_width#,
760 currentpicture := currentpicture
761 shifted (0.10 wd + linea_width / 2, 0);
767 % parameterized punctum
768 def plica_char (expr verbose_name, internal_name,
770 fet_beginchar (verbose_name, "s" & internal_name);
773 a_b := 1.54; % b_h * a_b / a_w = wd / ht
777 save a, beta, ht, wd;
779 ht# = noteheight# * mag;
783 black_notehead_width# := wd#;
797 % convexity and eccentricity
798 save convexity, eccentricity;
800 convexity# := d_sign * -0.10 ht#;
801 eccentricity# := d_sign * -0.12 ht#;
808 define_pixels (convexity, eccentricity, yoffs, ht, wd);
810 pickup pencircle scaled linethickness;
812 save height, yoffs_bt, p, circle, circle_r;
813 path p, circle, circle_r;
816 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
818 define_pixels (height, yoffs_bt);
820 circle := fullcircle scaled linethickness;
829 save box_top, box_bt;
831 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
832 z2 = (0.21 wd, yoffs_bt + convexity);
833 z3 = (0.42 wd - linethickness/ 2, yoffs_bt + eccentricity);
834 box_top# = height# + yoffs_bt# +
835 max (0, convexity#, eccentricity#);
836 box_bt# = yoffs_bt# +
837 min (0, convexity#, eccentricity#);
846 labels (1, 2, 3, 4, 5, 6);
851 dirs12 := direction (0 + epsilon) of p;
852 dirs2 := direction 1 of p;
853 dirs32 := direction (2 - epsilon) of p;
854 dirs45 := direction (3 + epsilon) of p;
855 dirs5 := direction 4 of p;
856 dirs65 := direction (5 - epsilon) of p;
858 fill get_subpath (circle, down, dirs12, z1)
860 .. get_subpath (circle, dirs32, up, z3)
861 -- get_subpath (circle, up, dirs45, z4)
863 .. get_subpath (circle, dirs65, down, z6)
866 pickup pencircle scaled 0.6 linethickness;
870 set_char_box (0.00 wd#, 0.42 wd#,
871 max (0, -box_bt#) + linethickness# / 2,
872 max (0, box_top#) + linethickness# / 2);
878 % parameterized punctum
879 def epiphonus_char (expr verbose_name, internal_name,
880 left_stem, d_up, down_shift, mag) =
881 fet_beginchar (verbose_name, "s" & internal_name);
884 a_b := 1.54; % b_h * a_b / a_w = wd / ht
888 save a, beta, ht, wd;
890 ht# = noteheight# * mag;
894 black_notehead_width# := wd#;
908 % convexity and eccentricity
911 convexity# := d_sign * -0.05ht#;
922 define_pixels (convexity, yoffs, ht, wd);
924 pickup pencircle scaled linethickness;
926 save height, yoffs_bt, p, circle, circle_r;
927 path p, circle, circle_r;
930 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
932 define_pixels (height, yoffs_bt);
934 circle := fullcircle scaled linethickness;
943 save box_top, box_bt;
945 z1 = (0.00 wd + linethickness / 2, yoffs_bt - 2.5 convexity);
946 z2 = (0.06 wd, yoffs_bt + 1.4 convexity);
947 z3 = (0.42 wd - linethickness / 2, yoffs_bt - 1.0 convexity);
948 box_top# = height# + yoffs_bt# +
949 max (-1.0 convexity#, 1.4 convexity#, 0);
950 box_bt# = yoffs_bt# +
951 min (-1.0 convexity#, 1.4 convexity#, 0);
962 labels (1, 2, 3, 4, 5, 6);
967 dirs12 := direction (0 + epsilon) of p;
968 dirs21 := direction (1 - epsilon) of p;
969 dirs23 := direction (1 + epsilon) of p;
970 dirs32 := direction (2 - epsilon) of p;
971 dirs45 := direction (3 + epsilon) of p;
972 dirs54 := direction (4 - epsilon) of p;
973 dirs56 := direction (4 + epsilon) of p;
974 dirs65 := direction (5 - epsilon) of p;
976 fill get_subpath (circle, down, dirs12, z1)
977 .. get_subpath (circle, dirs21, dirs23, z2)
978 .. get_subpath (circle, dirs32, up, z3)
979 -- get_subpath (circle, up, dirs45, z4)
980 .. get_subpath (circle, dirs54, dirs56, z5)
981 .. get_subpath (circle, dirs65, down, z6)
984 pickup pencircle scaled 0.6 linethickness;
989 z11 = (0.00 wd + 0.6 linethickness / 2, yoffs - 1.1 ht);
990 z12 = (0.00 wd + 0.6 linethickness / 2, yoffs);
991 draw_block ((0, yoffs - 1.1 ht - linethickness / 2),
992 (0.6 linethickness, yoffs));
993 stem_bt# = yoffs# - 1.1 ht#;
998 set_char_box (0.00 wd#, 0.42 wd#,
999 max (0, -box_bt#, -stem_bt#) + linethickness# / 2,
1000 max (0, box_top#) + linethickness# / 2);
1005 % parameterized punctum inclinatum
1006 def inclinatum_char (expr verbose_name, internal_name,
1007 small, stropha, auctum) =
1008 fet_beginchar (verbose_name, "s" & internal_name)
1014 ht# = 0.50 noteheight#;
1016 ht# = 0.80 noteheight#;
1019 draw_diamond_head (ht#, 0, 0, alpha, false);
1022 pickup pencircle xscaled 0.25 head_height
1023 yscaled 0.55 head_height
1031 za = (0, -0.25 head_height)
1032 rotated -(alpha + off_angle)
1033 shifted (0.48 head_width, -0.02 head_width);
1039 pickup pencircle scaled linethickness;
1044 za = (0, -0.5 head_height + linethickness);
1046 zc = za + (0.52 head_width, 0);
1048 draw za{(0, -1) rotated alpha}
1050 .. {(0, 1) rotated -alpha}zc;
1057 punctum_char ("Ed. Vat. punctum", "vaticana.punctum",
1058 false, false, false, false,
1059 false, false, false, 1.0);
1062 % punctum cavum (for OpusTeX compatibility)
1063 punctum_char ("Ed. Vat. punctum cavum", "vaticana.punctum.cavum",
1064 false, true, false, false,
1065 false, false, false, 1.0);
1068 % linea punctum (for OpusTeX compatibility)
1069 punctum_char ("Ed. Vat. linea punctum", "vaticana.linea.punctum",
1070 true, false, false, false,
1071 false, false, false, 1.0);
1074 % linea punctum cavum (for OpusTeX compatibility)
1075 punctum_char ("Ed. Vat. linea punctum cavum", "vaticana.linea.punctum.cavum",
1076 true, true, false, false,
1077 false, false, false, 1.0);
1080 % punctum inclinatum
1081 inclinatum_char ("Ed. Vat. inclinatum", "vaticana.inclinatum",
1082 false, false, false);
1086 punctum_char ("Ed. Vat. pes lower punctum", "vaticana.lpes",
1087 false, false, true, false,
1088 true, false, false, 1.0);
1092 punctum_char ("Ed. Vat. pes var lower punctum", "vaticana.vlpes",
1093 false, false, true, false,
1094 true, false, true, 1.0);
1098 punctum_char ("Ed. Vat. pes upper punctum", "vaticana.upes",
1099 false, false, true, false,
1100 false, false, false, 1.0);
1103 % pes upper punctum (shifted variation)
1105 % This note head is used instead of the regular pes upper punctum to
1106 % avoid collision with the lower punctum note of the pes when the upper
1107 % punctum sits directly on top of the lower punctum.
1109 punctum_char ("Ed. Vat. var pes upper punctum", "vaticana.vupes",
1110 false, false, true, false,
1111 false, true, false, 1.0);
1114 % small punctum as used in epiphonus
1115 punctum_char ("Ed. Vat. plica", "vaticana.plica",
1116 false, false, false, false,
1117 false, false, false, 0.6);
1120 % small punctum as used in epiphonus
1121 plica_char ("Ed. Vat. var plica", "vaticana.vplica",
1125 % eccentric punctum as used in epiphonus
1126 epiphonus_char ("Ed. Vat. epiphonus", "vaticana.epiphonus",
1127 false, true, false, 1.0);
1130 % eccentric punctum as used in epiphonus (shifted variation)
1132 % This note head is used instead of the regular epiphonus punctum to
1133 % avoid collision with the plica head when the plica sits directly on
1134 % top of the lower head.
1136 epiphonus_char ("Ed. Vat. var epiphonus", "vaticana.vepiphonus",
1137 false, true, true, 1.0);
1140 % small punctum as used in cephalicus
1141 punctum_char ("Ed. Vat. rev. plica", "vaticana.reverse.plica",
1142 false, false, false, false,
1143 true, false, false, 0.6);
1146 % small punctum as used in cephalicus
1147 plica_char ("Ed. Vat. rev. var plica", "vaticana.reverse.vplica",
1151 % eccentric punctum as used in cephalicus; without left stem
1152 epiphonus_char ("Ed. Vat. inner cephalicus", "vaticana.inner.cephalicus",
1153 false, false, false, 1.0);
1156 % eccentric punctum as used in cephalicus; with left stem
1157 epiphonus_char ("Ed. Vat. cephalicus", "vaticana.cephalicus",
1158 true, false, false, 1.0);
1162 fet_beginchar ("Ed. Vat. quilisma", "svaticana.quilisma")
1165 a_b:=1.54; % b_h*a_b/a_w = wd/ht
1169 save a, beta, ht, wd;
1171 2 beta# = ht# * b_h;
1174 set_char_box (0, 0.42 wd#, 0.28 ht#, 0.36 ht#);
1175 black_notehead_width# := wd#;
1177 define_pixels (ht, wd);
1178 pickup pencircle xscaled linethickness yscaled 0.44 ht;
1179 lft x1 = 0.00 wd; bot y1 = -0.28 ht;
1180 x2 = 0.11 wd; y2 = -0.14 ht;
1181 x3 = 0.12 wd; y3 = +0.03 ht;
1182 x4 = 0.25 wd; y4 = -0.09 ht;
1183 x5 = 0.26 wd; y5 = +0.08 ht;
1184 x6 = 0.40 wd; y6 = -0.04 ht;
1185 rt x7 = 0.42 wd; top y7 = +0.36 ht;
1186 draw z1 .. z2 -- z3 .. z4 -- z5 .. z6 -- z7;
1190 % solesmes punctum inclinatum parvum
1191 inclinatum_char ("Solesmes punctum inclinatum parvum", "solesmes.incl.parvum",
1192 true, false, false);
1195 % solesmes punctum auctum ascendens
1196 punctum_char ("Solesmes punctum auctum ascendens", "solesmes.auct.asc",
1197 false, false, false, true,
1198 true, false, false, 1.0);
1201 % solesmes punctum auctum descendens
1202 punctum_char ("Solesmes punctum auctum descendens", "solesmes.auct.desc",
1203 false, false, false, true,
1204 false, false, false, 1.0);
1207 % solesmes punctum inclinatum auctum
1208 inclinatum_char ("Solesmes punctum incl. auctum", "solesmes.incl.auctum",
1209 false, false, true);
1213 inclinatum_char ("Solesmes stropha", "solesmes.stropha",
1214 false, true, false);
1217 % solesmes stropha aucta
1218 inclinatum_char ("Solesmes stropha aucta", "solesmes.stropha.aucta",
1223 fet_beginchar ("Solesmes oriscus", "ssolesmes.oriscus")
1226 a_b := 1.54; % b_h*a_b/a_w = wd/ht
1230 save a, beta, ht, wd;
1232 2 beta# = ht# * b_h;
1235 black_notehead_width# := wd#;
1238 convexity# = +0.05 ht#;
1240 define_pixels (ht, wd, convexity);
1241 pickup pencircle xscaled blot_diameter yscaled 0.50 ht;
1242 lft x1 = 0.00 wd; y1 = -convexity;
1243 x2 = 0.16 wd; y2 = +convexity;
1244 x3 = 0.33 wd; y3 = -convexity;
1245 rt x4 = 0.50 wd; y4 = +convexity;
1246 draw z1 .. z2 .. z3 .. z4;
1247 set_char_box (0.00 wd#, 0.50 wd#,
1248 0.25 ht# + convexity#, 0.25 ht# + convexity#);
1262 fet_beginchar ("Ed. Med. inclinatum", "smedicaea.inclinatum")
1263 draw_diamond_head (1.2 staff_space#, 0, 0, 35, false);
1267 % parametrized punctum
1268 def punctum_char (expr verbose_name, internal_name,
1269 left_up_stem, left_down_stem) =
1270 fet_beginchar (verbose_name, "s" & internal_name);
1271 save a, beta, ht, wd;
1273 ht# = 2 staff_space#;
1275 black_notehead_width# := wd#;
1277 define_pixels (ht, wd);
1279 pickup pencircle xscaled blot_diameter
1282 z1 = (0.00 wd + blot_diameter / 2, 0);
1283 z2 = (0.4 wd - blot_diameter / 2, 0);
1288 pickup pencircle xscaled linethickness
1289 yscaled blot_diameter;
1292 z4 = (0.00 wd + linethickness / 2, blot_diameter / 2);
1293 z5 = (0.00 wd + linethickness / 2, -1.25 ht);
1297 set_char_box (0.0, 0.4 wd#, 1.25 ht#, 0.25 ht#);
1298 elseif left_up_stem:
1299 z4 = (0.00 wd + linethickness / 2, blot_diameter / 2);
1300 z5 = (0.00 wd + linethickness / 2, +1.25 ht);
1304 set_char_box (0.0, 0.4 wd#, 0.25 ht#, 1.25 ht#);
1306 set_char_box (0.0, 0.4 wd#, 0.25 ht#, 0.25 ht#);
1314 punctum_char ("Ed. Med. punctum", "medicaea.punctum",
1318 % left up-stemmed punctum
1319 punctum_char ("Ed. Med. reverse virga", "medicaea.rvirga",
1323 % virga (i.e. left down-stemmed punctum)
1324 punctum_char ("Ed. Med. virga", "medicaea.virga",
1337 % parametrized punctum
1338 def punctum_char (expr verbose_name, internal_name,
1340 fet_beginchar (verbose_name, "s" & internal_name);
1344 draw_diamond_head (staff_space#, 0, 0, alpha#, false);
1346 pickup pencircle xscaled blot_diameter
1347 yscaled 0.7 staff_space
1353 za = (head_width / 2, 0);
1354 bot zb = (head_width / 2, -1.5 staff_space);
1358 set_char_box (0, head_width#,
1359 1.5 staff_space#, head_height# / 2);
1365 punctum_char ("Hufnagel punctum", "hufnagel.punctum", false)
1368 punctum_char ("Hufnagel virga", "hufnagel.virga", true)
1371 fet_beginchar ("Hufnagel pes lower punctum", "shufnagel.lpes")
1372 save width, height, alpha;
1373 width# = 2*staff_space#;
1374 height# = 0.7*staff_space#;
1377 set_char_box (0, width#, height#/2, height#/2);
1379 pickup pencircle scaled linethickness;
1380 define_pixels (width, height);
1382 rt x3 = -lft x1 = width/2;
1384 y1 = y4 = -height/2;
1385 tand (alpha#) * (y2 - y1) = x2 - x1 = x3 - x4;
1387 filldraw z1 -- z2 -- z3 -- z4 -- cycle;
1389 currentpicture := currentpicture shifted (width/2, 0);
1392 fet_endgroup ("noteheads")