1 % Feta (not the Font-En-Tja) music font -- ancient note heads
2 % This file is part of LilyPond, the GNU music typesetter.
4 % Copyright (C) 2001--2014 Juergen Reuter <reuter@ipd.uka.de>
6 % Neo-mensural heads originally by
7 % Christian Mondrup and Mats Bengtsson
9 % The LilyPond font is free software: you can redistribute it and/or modify
10 % it under the terms of the GNU General Public License as published by
11 % the Free Software Foundation, either version 3 of the License, or
12 % (at your option) any later version, or under the SIL Open Font License.
14 % LilyPond is distributed in the hope that it will be useful,
15 % but WITHOUT ANY WARRANTY; without even the implied warranty of
16 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 % GNU General Public License for more details.
19 % You should have received a copy of the GNU General Public License
20 % along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
22 save black_notehead_width;
23 numeric black_notehead_width;
25 fet_begingroup ("noteheads");
30 % The head is assumed to be vertically centered around (0, 0).
31 % The left-most edge of the head should touch the vertical line
32 % that goes though the point (0, 0).
34 % set_char_box() conventions:
36 % * breapth: Ignored (as far as I know). Should be set to 0.
38 % * width: Should match the head's width.
40 % * depth: Should match the bottom edge of the head. Affects vertical
43 % * height: Should match the top edge of the head. Affects vertical
46 % TODO: should depth/height include appendages/stems?
48 save overdone_heads, noteheight;
51 noteheight# := staff_space# + (1 + overdone_heads) * stafflinethickness#;
52 define_pixels (noteheight);
59 % NEO-MENSURAL NOTATION
64 def draw_neomensural_brevis (expr brevwid, holeheight, open, full) =
65 save beamheight, head_width, head_height;
66 save stem_width, serif_size, serif_protrude;
68 head_width# := brevwid;
69 head_height# := noteheight#;
70 stem_width := 1.3 linethickness;
72 define_pixels (head_width, head_height);
74 set_char_box (0, head_width#,
75 head_height# / 2, head_height# / 2);
77 2 beamheight + holeheight = head_height;
78 serif_size := blot_diameter;
79 serif_protrude := .15 head_height;
82 z2l = (0, - (holeheight - 2 serif_size) / 2);
83 z3r = z2r + serif_size * (1, -1);
86 z5l = z3l + (-serif_size, -serif_protrude);
88 penpos1 (stem_width, 0);
89 penpos2 (stem_width, 0);
90 penpos3 (beamheight, 90);
91 penpos4 (beamheight, 90);
92 penpos5 (stem_width, 180);
103 -- reverse pat_out yscaled -1;
105 -- reverse pat_out shifted (-x4r, 0)
120 -- reverse pat_in yscaled -1;
123 -- reverse pat_in shifted (-x4r, 0)
132 penlabels (1, 2, 3, 4, 5);
137 % Some sources (eg. Musix/OpusTeX) think that the appendage should be on
138 % the left, some say right. Right wins democratically.
140 def draw_neomensural_longa (expr wid, holeheight, direction) =
141 draw_neomensural_brevis (wid, holeheight, true, true);
146 x7 = head_width - stem_width / 2;
148 z6 - z7 = (stem_width / 2, -dir * staff_space);
149 theta = dir * angle (z6 - z7) + 90;
151 penpos7 (stem_width, 0);
152 penpos6 (1.2 stem_width, theta);
154 z7' = find_tangent (z6l, pat_out,
155 (x7l + 0.5 stem_width, y7l),
156 (x7l - 0.5 stem_width, y7l));
169 def draw_neomensural_black_head (expr width, height, concaveness) =
170 save head_width, head_height, stem_width;
171 save ne, nw, ne_dist, nw_dist;
172 pair ne, nw, ne_dist, nw_dist;
174 head_width# := width;
175 head_height# := height;
176 stem_width# := 1.3 linethickness#;
178 set_char_box (0, head_width#,
179 head_height# / 2, head_height# / 2);
181 charwx := head_width# / 2;
182 charwy := head_height# / 2 - 2 stem_width#;
185 x2 = x4 = 1/2 [x1, x3];
187 pickup pencircle scaled blot_diameter;
194 ne := unitvector (z2 - z1);
195 nw_dist := (ne rotated 90) * blot_diameter / 2;
196 nw := unitvector (z2 - z3);
197 ne_dist := (nw rotated -90) * blot_diameter / 2;
200 .. (z1 + nw_dist){ ne rotated -concaveness }
201 .. { ne rotated concaveness }(z2 + nw_dist)
203 .. (z2 + ne_dist){ nw rotated (180 - concaveness) }
204 .. { nw rotated (180 + concaveness) }(z3 + ne_dist)
206 .. (z3 - nw_dist){ ne rotated (180 - concaveness) }
207 .. { ne rotated (180 + concaveness) }(z4 - nw_dist)
209 .. (z4 - ne_dist){ nw rotated -concaveness }
210 .. { nw rotated concaveness }(z1 - ne_dist)
217 def draw_neomensural_open_head (expr width, height, concaveness)=
218 draw_neomensural_black_head (width, height, concaveness);
220 save headNW, headSW, stem_width;
222 headNW = length (z2 - z1) + blot_diameter;
223 headSW = length (z4 - z1) + blot_diameter;
224 stem_width = 1.3 linethickness;
226 save hole_widthNW, hole_widthSW;
228 hole_widthNW = .25 headNW;
229 hole_widthSW + 2 stem_width = headSW;
231 (rt z7 + lft z5) / 2 = (w / 2, 0);
232 (bot z8 + top z6) / 2 = (w / 2, 0);
233 z6 - z5 = (hole_widthNW - blot_diameter) * unitvector (z2 - z1);
234 z7 - z6 = (hole_widthSW - blot_diameter) * unitvector (z4 - z1);
255 % Neo-mensural maxima/longa/brevis
257 % En wij presenteren U: de opvolgster van Emily
262 save nm_maxima_width, nm_longa_width, nm_brevis_width;
263 save nm_holeheight, nm_red_holeheight;
265 nm_maxima_width := 2.6 staff_space#;
266 nm_longa_width := 2 staff_space#;
267 nm_brevis_width := nm_longa_width;
268 nm_holeheight := 4 linethickness;
269 nm_red_holeheight := 2.5 linethickness;
271 fet_beginchar ("Neo-mensural maxima notehead (up)", "uM3neomensural");
272 draw_neomensural_longa (nm_maxima_width, nm_holeheight, 1);
275 fet_beginchar ("Neo-mensural maxima notehead (down)", "dM3neomensural");
276 draw_neomensural_longa (nm_maxima_width, nm_holeheight, -1);
279 fet_beginchar ("Neo-mensural longa notehead (up)", "uM2neomensural");
280 draw_neomensural_longa (nm_longa_width, nm_holeheight, 1);
283 fet_beginchar ("Neo-mensural longa notehead (down)", "dM2neomensural");
284 draw_neomensural_longa (nm_longa_width, nm_holeheight, -1);
287 fet_beginchar ("Neo-mensural brevis notehead", "sM1neomensural");
288 draw_neomensural_brevis (nm_brevis_width, nm_holeheight, true, true);
291 fet_beginchar ("Neo-mensural maxima notehead (up, reduced hole)", "urM3neomensural");
292 draw_neomensural_longa (nm_maxima_width, nm_red_holeheight, 1);
295 fet_beginchar ("Neo-mensural maxima notehead (down, reduced hole)", "drM3neomensural");
296 draw_neomensural_longa (nm_maxima_width, nm_red_holeheight, -1);
299 fet_beginchar ("Neo-mensural longa notehead (up, reduced hole)", "urM2neomensural");
300 draw_neomensural_longa (nm_longa_width, nm_red_holeheight, 1);
303 fet_beginchar ("Neo-mensural longa notehead (down, reduced hole)", "drM2neomensural");
304 draw_neomensural_longa (nm_longa_width, nm_red_holeheight, -1);
307 fet_beginchar ("Neo-mensural brevis notehead (reduced hole)", "srM1neomensural");
308 draw_neomensural_brevis (nm_brevis_width, nm_red_holeheight, true, true);
313 % Neo-mensural semibrevis/minima/semiminima
316 save nm_height, nm_width;
317 nm_height := noteheight#;
318 nm_width := staff_space#;
319 fet_beginchar ("Neo-mensural semibrevis head", "s0neomensural");
320 draw_neomensural_open_head (nm_width, nm_height, 0);
323 fet_beginchar ("Neo-mensural minima head", "s1neomensural");
324 draw_neomensural_open_head (nm_width, nm_height, 0);
327 fet_beginchar ("Neo-mensural semiminima head", "s2neomensural");
328 draw_neomensural_black_head (nm_width, nm_height, 0);
341 % WL says the thin lines should be thinner.
344 fet_beginchar ("Harmonic notehead (Neo-mensural open)", "s0harmonic");
345 draw_neomensural_open_head (1.3 staff_space#, 1.3 noteheight#, 5);
346 charwx := head_width#;
350 fet_beginchar ("Harmonic notehead (Neo-mensural black)", "s2harmonic");
351 draw_neomensural_black_head (1.3 staff_space#, 1.3 noteheight#, 5);
352 charwx := head_width#;
361 % MENSURAL/PETRUCCI NOTATIONS
366 def draw_mensural_brevis (expr wid, holeheight, open, full) =
367 % TODO. For the moment, fall back to draw_neomensural_brevis.
368 draw_neomensural_brevis (wid, holeheight, open, full);
372 def draw_mensural_longa (expr wid, holeheight, open, full, direction, ligature) =
373 draw_mensural_brevis (wid, holeheight, open, full);
378 x6 = x7 = head_width - stem_width / 2;
380 y7 = dir * y5 -1.75 dir * staff_space;
382 z17 = (x7, y7 - dir * stem_width / 2);
384 penpos6 (stem_width, 0);
386 penpos7 (stem_width, 0);
388 penpos7 (1.5 stem_width, 0);
403 def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) =
404 save head_width, head_height;
405 save ellipse, ellipse_r;
406 path ellipse, ellipse_r, diamond_shape;
408 head_height# = head_h;
409 head_width# / head_height# = tand (angle);
411 set_char_box (0, head_width#,
412 head_height# / 2, head_height# / 2);
414 charwx := head_width# / 2;
415 charwy := head_height# / 2 - 2 linethickness#;
417 define_pixels (head_width, head_height);
419 ellipse := reverse fullcircle
420 xscaled (max (blot_diameter, pen_w * head_width))
421 yscaled (max (blot_diameter, pen_h * head_width))
424 z1 = find_tangent_shift (((0, h) -- (0, -h)), ellipse,
426 z2 = find_tangent_shift (((0, h) -- (w, h)), ellipse,
427 (w / 2, h), (w / 2, 0));
428 z3 = find_tangent_shift (((w, h) -- (w, -h)), ellipse,
430 z4 = find_tangent_shift (((0, -h) -- (w, -h)), ellipse,
431 (w / 2, -h), (w / 2, 0));
433 diamond_shape := get_subpath (ellipse, z1 - z4, z2 - z1, z1)
434 -- get_subpath (ellipse, z2 - z1, z3 - z2, z2)
435 -- get_subpath (ellipse, z3 - z2, z4 - z3, z3)
436 -- get_subpath (ellipse, z4 - z3, z1 - z4, z4)
444 l12 := (directionpoint (z1 - z2) of ellipse) shifted z1
445 -- (directionpoint (z1 - z2) of ellipse) shifted z2;
446 l23 := (directionpoint (z2 - z3) of ellipse) shifted z2
447 -- (directionpoint (z2 - z3) of ellipse) shifted z3;
448 l34 := (directionpoint (z3 - z4) of ellipse) shifted z3
449 -- (directionpoint (z3 - z4) of ellipse) shifted z4;
450 l41 := (directionpoint (z4 - z1) of ellipse) shifted z4
451 -- (directionpoint (z4 - z1) of ellipse) shifted z1;
453 unfill l12 intersectionpoint l23
454 -- l23 intersectionpoint l34
455 -- l34 intersectionpoint l41
456 -- l41 intersectionpoint l12
465 % Mensural/Petrucci maxima/longa/brevis
468 save m_maxima_width, m_longa_width, m_brevis_width,
469 m_holeheight, m_red_holeheight;
470 m_maxima_width := 2.0 staff_space#;
471 m_longa_width := staff_space#;
472 m_brevis_width := m_longa_width;
473 m_holeheight := nm_holeheight;
474 m_red_holeheight := nm_red_holeheight;
477 fet_beginchar ("Mensural maxima notehead (up)", "uM3mensural");
478 draw_mensural_longa (m_maxima_width, m_holeheight,
479 true, true, 1, false);
483 fet_beginchar ("Mensural maxima notehead (down)", "dM3mensural");
484 draw_mensural_longa (m_maxima_width, m_holeheight,
485 true, true, -1, false);
489 fet_beginchar ("Mensural maxima notehead (ligature)", "sM3ligmensural");
490 draw_mensural_brevis (m_maxima_width, m_holeheight, true, true);
494 fet_beginchar ("Mensural longa notehead (up)", "uM2mensural");
495 draw_mensural_longa (m_longa_width, m_holeheight,
496 true, true, 1, false);
500 fet_beginchar ("Mensural longa notehead (down)", "dM2mensural");
501 draw_mensural_longa (m_longa_width, m_holeheight,
502 true, true, -1, false);
505 fet_beginchar ("Mensural longa notehead (ligature)", "sM2ligmensural");
506 draw_mensural_longa (m_longa_width, m_holeheight,
507 true, true, -1, true);
511 fet_beginchar ("Mensural brevis notehead", "sM1mensural");
512 draw_mensural_brevis (m_brevis_width, m_holeheight, true, true);
516 fet_beginchar ("Mensural maxima notehead (up, reduced hole)",
518 draw_mensural_longa (m_maxima_width, m_red_holeheight,
519 true, true, 1, false);
523 fet_beginchar ("Mensural maxima notehead (down, reduced hole)",
525 draw_mensural_longa (m_maxima_width, m_red_holeheight,
526 true, true, -1, false);
530 fet_beginchar ("Mensural maxima notehead (ligature, reduced hole)",
532 draw_mensural_brevis (m_maxima_width, m_red_holeheight, true, true);
536 fet_beginchar ("Mensural longa notehead (up, reduced hole)",
538 draw_mensural_longa (m_longa_width, m_red_holeheight,
539 true, true, 1, false);
543 fet_beginchar ("Mensural longa notehead (down, reduced hole)",
545 draw_mensural_longa (m_longa_width, m_red_holeheight,
546 true, true, -1, false);
550 fet_beginchar ("Mensural longa notehead (ligature, reduced hole)",
552 draw_mensural_longa (m_longa_width, m_red_holeheight,
553 true, true, -1, true);
557 fet_beginchar ("Mensural brevis notehead (reduced hole)", "srM1mensural");
558 draw_mensural_brevis (m_brevis_width, m_red_holeheight, true, true);
563 % Semi-colored mensural/Petrucci maxima/longa/brevis
566 fet_beginchar ("Semi-colored mensural maxima notehead (up)",
568 draw_mensural_longa (m_maxima_width, m_holeheight,
569 true, false, 1, false);
573 fet_beginchar ("Semi-colored mensural maxima notehead (down)",
575 draw_mensural_longa (m_maxima_width, m_holeheight,
576 true, false, -1, false);
580 fet_beginchar ("Semi-colored mensural maxima notehead (ligature)",
581 "sM3semiligmensural");
582 draw_mensural_brevis (m_maxima_width, m_holeheight, true, false);
586 fet_beginchar ("Semi-colored mensural longa notehead (up)",
588 draw_mensural_longa (m_longa_width, m_holeheight,
589 true, false, 1, false);
593 fet_beginchar ("Semi-colored mensural longa notehead (down)",
595 draw_mensural_longa (m_longa_width, m_holeheight,
596 true, false, -1, false);
600 fet_beginchar ("Semi-colored mensural longa notehead (ligature)",
601 "sM2semiligmensural");
602 draw_mensural_longa (m_longa_width, m_holeheight,
603 true, false, -1, true);
607 fet_beginchar ("Semi-colored mensural brevis notehead", "sM1semimensural");
608 draw_mensural_brevis (m_brevis_width, m_holeheight, true, false);
612 fet_beginchar ("Semi-colored mensural maxima notehead (up, reduced hole)",
614 draw_mensural_longa (m_maxima_width, m_red_holeheight,
615 true, false, 1, false);
619 fet_beginchar ("Semi-colored mensural maxima notehead (down, reduced hole)",
621 draw_mensural_longa (m_maxima_width, m_red_holeheight,
622 true, false, -1, false);
626 fet_beginchar ("Semi-colored mensural maxima notehead (ligature, reduced hole)",
627 "srM3semiligmensural");
628 draw_mensural_brevis (m_maxima_width, m_red_holeheight, true, false);
632 fet_beginchar ("Semi-colored mensural longa notehead (up, reduced hole)",
634 draw_mensural_longa (m_longa_width, m_red_holeheight,
635 true, false, 1, false);
639 fet_beginchar ("Semi-colored mensural longa notehead (down, reduced hole)",
641 draw_mensural_longa (m_longa_width, m_red_holeheight,
642 true, false, -1, false);
646 fet_beginchar ("Semi-colored mensural longa notehead (ligature, reduced hole)",
647 "srM2semiligmensural");
648 draw_mensural_longa (m_longa_width, m_red_holeheight,
649 true, false, -1, true);
653 fet_beginchar ("Semi-colored mensural brevis notehead (reduced hole)",
655 draw_mensural_brevis (m_brevis_width, m_red_holeheight, true, false);
660 % Black mensural/Petrucci maxima/longa/brevis
663 fet_beginchar ("Black mensural maxima notehead (up)", "uM3blackmensural");
664 draw_mensural_longa (m_maxima_width, 0, false, false, 1, false);
668 fet_beginchar ("Black mensural maxima notehead (down)", "dM3blackmensural");
669 draw_mensural_longa (m_maxima_width, 0, false, false, -1, false);
673 fet_beginchar ("Black mensural maxima notehead (ligature)",
674 "sM3blackligmensural");
675 draw_mensural_brevis (m_maxima_width, 0, false, false);
679 fet_beginchar ("Black mensural longa notehead (up)", "uM2blackmensural");
680 draw_mensural_longa (m_longa_width, 0, false, false, 1, false);
684 fet_beginchar ("Black mensural longa notehead (down)", "dM2blackmensural");
685 draw_mensural_longa (m_longa_width, 0, false, false, -1, false);
689 fet_beginchar ("Black mensural longa notehead (ligature)",
690 "sM2blackligmensural");
691 draw_mensural_longa (m_longa_width, 0, false, false, -1, true);
695 fet_beginchar ("Black mensural brevis notehead", "sM1blackmensural");
696 draw_mensural_brevis (m_brevis_width, 0, false, false);
701 % Mensural semibrevis/minima/semiminima
704 fet_beginchar ("Mensural semibrevis head", "s0mensural");
705 draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
709 fet_beginchar ("Mensural minima head", "s1mensural");
710 draw_diamond_head (staff_space#, 0.15, 0.30, 30, true);
714 fet_beginchar ("Mensural semiminima head", "s2mensural");
715 draw_diamond_head (staff_space#, 0.15, 0.30, 30, false);
720 % Black mensural semibrevis/minima/semiminima
723 fet_beginchar ("Black mensural semibrevis head", "s0blackmensural");
724 draw_diamond_head (staff_space#, 0.15, 0.30, 30, false);
729 % Petrucci semibrevis/minima/semiminima
731 % These values can be measured in several sources.
732 % I used "Modulis ex sacris literis delecti, Liber primus"
733 % Josquin Desprez, BNF
735 save petrucci_width, petrucci_height;
736 petrucci_height := 1.4 noteheight#;
737 petrucci_width := .72 petrucci_height;
739 fet_beginchar ("Petrucci semibrevis head", "s0petrucci");
740 draw_neomensural_open_head (petrucci_width, petrucci_height, 0);
743 fet_beginchar ("Petrucci minima head", "s1petrucci");
744 draw_neomensural_open_head (petrucci_width, petrucci_height, 0);
747 fet_beginchar ("Petrucci semiminima head", "s2petrucci");
748 draw_neomensural_black_head (petrucci_width, petrucci_height, 0);
753 % Black Petrucci semibrevis/minima/semiminima
756 fet_beginchar ("Petrucci colored semibrevis head", "s0blackpetrucci");
757 draw_neomensural_black_head (petrucci_width, petrucci_height, 0);
760 fet_beginchar ("Petrucci colored minima head", "s1blackpetrucci");
761 draw_neomensural_black_head (petrucci_width, petrucci_height, 0);
764 fet_beginchar ("Petrucci colored semiminima head", "s2blackpetrucci");
765 draw_neomensural_black_head (petrucci_width, petrucci_height, 0);
773 % EDITIO VATICANA (including solesmes extensions)
778 def vat_punctum_char (expr verbose_name, internal_name,
779 linea, cavum, straight, auctum,
780 d_up, up_shift, down_shift, mag) =
781 fet_beginchar (verbose_name, "s" & internal_name);
784 a_b := 1.54; % b_h * a_b / a_w = wd / ht
788 save a, beta, ht, wd;
790 ht# = noteheight# * mag;
794 black_notehead_width# := wd#;
808 % convexity and eccentricity
809 save u_convexity, u_eccentricity;
812 u_convexity# := -0.01 ht#;
813 u_eccentricity# := 0.0 ht#; % dummy
815 u_convexity# := -0.03 ht#;
816 u_eccentricity# := +0.25 ht#;
818 u_convexity# := -0.05 ht#;
819 u_eccentricity# := 0.0 ht#; % dummy
822 save convexity, eccentricity;
824 convexity# := d_sign * u_convexity#;
825 eccentricity# := d_sign * u_eccentricity#;
838 define_pixels (convexity, eccentricity, yoffs, ht, wd);
840 pickup pencircle scaled linethickness;
842 save height, yoffs_bt, p, circle, circle_r;
843 path p, circle, circle_r;
846 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
848 define_pixels (height, yoffs_bt);
850 circle := fullcircle scaled linethickness;
859 save box_top, box_bt;
862 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
863 z2 = (0.21 wd, yoffs_bt + convexity);
864 z3 = (0.42 wd - linethickness/ 2,
865 yoffs_bt + eccentricity);
866 box_top# = height# + yoffs_bt# +
867 max (0, convexity#, eccentricity#);
868 box_bt# = yoffs_bt# +
869 min (0, convexity#, eccentricity#);
878 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
879 z2 = (0.21 wd, yoffs_bt + convexity);
880 z3 = (0.42 wd - linethickness / 2, yoffs_bt);
881 box_top# = height# + yoffs_bt# + max (0, convexity#);
882 box_bt# = yoffs_bt# + min (0, convexity#);
892 labels (1, 2, 3, 4, 5, 6);
897 dirs12 := direction (0 + epsilon) of p;
898 dirs2 := direction 1 of p;
899 dirs32 := direction (2 - epsilon) of p;
900 dirs45 := direction (3 + epsilon) of p;
901 dirs5 := direction 4 of p;
902 dirs65 := direction (5 - epsilon) of p;
904 fill get_subpath (circle, down, dirs12, z1)
906 .. get_subpath (circle, dirs32, up, z3)
907 -- get_subpath (circle, up, dirs45, z4)
909 .. get_subpath (circle, dirs65, down, z6)
917 pat123 := ((directionpoint -dirs12 of circle)
920 .. {dirs32}((directionpoint -dirs32 of circle)
924 pat456 := ((directionpoint -dirs45 of circle)
927 .. {dirs65}((directionpoint -dirs65 of circle)
932 t61 := ypart (pat61 intersectiontimes pat123);
933 t12 := xpart (pat123 intersectiontimes pat34);
934 t34 := ypart (pat34 intersectiontimes pat456);
935 t45 := xpart (pat456 intersectiontimes pat61);
937 unfill subpath (t61, t12) of pat123
938 -- subpath (t34, t45) of pat456
942 set_char_box (0.00 wd#, 0.42 wd#,
943 max (0, -box_bt#) + linethickness# / 2,
944 max (0, box_top#) + linethickness# / 2);
947 save linea_width, linea_height;
949 linea_width# = 0.6 linethickness#;
950 linea_height# = 0.7 ht#;
952 define_pixels (linea_width, linea_height);
954 pickup pencircle scaled 0.6 linethickness;
956 draw_rounded_block ((-0.10 wd - linea_width / 2,
958 (-0.10 wd + linea_width / 2,
961 draw_rounded_block ((+0.52 wd - linea_width / 2,
963 (+0.52 wd + linea_width / 2,
967 set_char_box (0, 0.62 wd# + linea_width#,
971 currentpicture := currentpicture
972 shifted (0.10 wd + linea_width / 2, 0);
978 def plica_char (expr verbose_name, internal_name,
980 fet_beginchar (verbose_name, "s" & internal_name);
983 a_b := 1.54; % b_h * a_b / a_w = wd / ht
987 save a, beta, ht, wd;
989 ht# = noteheight# * mag;
993 black_notehead_width# := wd#;
1007 % convexity and eccentricity
1008 save convexity, eccentricity;
1010 convexity# := d_sign * -0.10 ht#;
1011 eccentricity# := d_sign * -0.12 ht#;
1016 yoffs# := -0.11 ht#;
1018 define_pixels (convexity, eccentricity, yoffs, ht, wd);
1020 pickup pencircle scaled linethickness;
1022 save height, yoffs_bt, p, circle, circle_r;
1023 path p, circle, circle_r;
1026 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
1028 define_pixels (height, yoffs_bt);
1030 circle := fullcircle scaled linethickness;
1039 save box_top, box_bt;
1041 z1 = (0.00 wd + linethickness / 2, yoffs_bt);
1042 z2 = (0.21 wd, yoffs_bt + convexity);
1043 z3 = (0.42 wd - linethickness/ 2, yoffs_bt + eccentricity);
1044 box_top# = height# + yoffs_bt# +
1045 max (0, convexity#, eccentricity#);
1046 box_bt# = yoffs_bt# +
1047 min (0, convexity#, eccentricity#);
1056 labels (1, 2, 3, 4, 5, 6);
1061 dirs12 := direction (0 + epsilon) of p;
1062 dirs2 := direction 1 of p;
1063 dirs32 := direction (2 - epsilon) of p;
1064 dirs45 := direction (3 + epsilon) of p;
1065 dirs5 := direction 4 of p;
1066 dirs65 := direction (5 - epsilon) of p;
1068 fill get_subpath (circle, down, dirs12, z1)
1070 .. get_subpath (circle, dirs32, up, z3)
1071 -- get_subpath (circle, up, dirs45, z4)
1073 .. get_subpath (circle, dirs65, down, z6)
1076 pickup pencircle scaled 0.6 linethickness;
1080 set_char_box (0.00 wd#, 0.42 wd#,
1081 max (0, -box_bt#) + linethickness# / 2,
1082 max (0, box_top#) + linethickness# / 2);
1088 def epiphonus_char (expr verbose_name, internal_name,
1089 left_stem, d_up, down_shift, mag) =
1090 fet_beginchar (verbose_name, "s" & internal_name);
1093 a_b := 1.54; % b_h * a_b / a_w = wd / ht
1097 save a, beta, ht, wd;
1099 ht# = noteheight# * mag;
1103 black_notehead_width# := wd#;
1117 % convexity and eccentricity
1120 convexity# := d_sign * -0.05ht#;
1126 yoffs# := -0.11 ht#;
1131 define_pixels (convexity, yoffs, ht, wd);
1133 pickup pencircle scaled linethickness;
1135 save height, yoffs_bt, p, circle, circle_r;
1136 path p, circle, circle_r;
1139 yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
1141 define_pixels (height, yoffs_bt);
1143 circle := fullcircle scaled linethickness;
1152 save box_top, box_bt;
1154 z1 = (0.00 wd + linethickness / 2, yoffs_bt - 2.5 convexity);
1155 z2 = (0.06 wd, yoffs_bt + 1.4 convexity);
1156 z3 = (0.42 wd - linethickness / 2, yoffs_bt - 1.0 convexity);
1157 box_top# = height# + yoffs_bt# +
1158 max (-1.0 convexity#, 1.4 convexity#, 0);
1159 box_bt# = yoffs_bt# +
1160 min (-1.0 convexity#, 1.4 convexity#, 0);
1162 .. {curl 1}z2{right}
1169 labels (1, 2, 3, 4, 5, 6);
1174 dirs12 := direction (0 + epsilon) of p;
1175 dirs21 := direction (1 - epsilon) of p;
1176 dirs23 := direction (1 + epsilon) of p;
1177 dirs32 := direction (2 - epsilon) of p;
1178 dirs45 := direction (3 + epsilon) of p;
1179 dirs54 := direction (4 - epsilon) of p;
1180 dirs56 := direction (4 + epsilon) of p;
1181 dirs65 := direction (5 - epsilon) of p;
1183 fill get_subpath (circle, down, dirs12, z1)
1184 .. get_subpath (circle, dirs21, dirs23, z2)
1185 .. get_subpath (circle, dirs32, up, z3)
1186 -- get_subpath (circle, up, dirs45, z4)
1187 .. get_subpath (circle, dirs54, dirs56, z5)
1188 .. get_subpath (circle, dirs65, down, z6)
1194 pickup pencircle scaled 0.6 linethickness;
1196 lft x11 = x1 - linethickness / 2;
1197 bot y11 = yoffs - 1.1 ht - linethickness / 2;
1201 draw_rounded_block (bot lft z11, top rt z12,
1203 stem_bt# = yoffs# - 1.1 ht#;
1210 set_char_box (0.00 wd#, 0.42 wd#,
1211 max (0, -box_bt#, -stem_bt#) + linethickness# / 2,
1212 max (0, box_top#) + linethickness# / 2);
1217 def inclinatum_char (expr verbose_name, internal_name,
1218 small, stropha, auctum) =
1219 fet_beginchar (verbose_name, "s" & internal_name);
1225 ht# = 0.50 noteheight#;
1227 ht# = 0.80 noteheight#;
1230 draw_diamond_head (ht#, 0, 0, alpha, false);
1234 off_angle := alpha + 15;
1236 save stropha_ellipse, auctum_hook, circle;
1237 path stropha_ellipse, auctum_hook, circle;
1239 circle := reverse fullcircle scaled linethickness;
1241 stropha_ellipse := fullcircle xscaled 0.25 head_height
1242 yscaled 0.55 head_height
1246 + linethickness / 2 * dir (180 - off_angle)
1247 - directionpoint dir (90 - off_angle)
1249 z12 = directionpoint -dir (90 - off_angle) of diamond_shape +
1250 linethickness / 2 * dir (180 - off_angle);
1251 z13 = (0, -0.5 head_height + linethickness);
1253 auctum_hook := z12{-dir (90 - off_angle)}
1254 .. {dir (90 + alpha)}z13;
1258 if (stropha and not auctum):
1263 t_in := xpart ((stropha_ellipse shifted z11)
1265 get_subpath (diamond_shape,
1268 t_out := xpart ((stropha_ellipse shifted z11)
1270 get_subpath (diamond_shape,
1274 % the addition or subtraction of `1' is necessary
1275 % so that we get the right starting point
1276 fill get_subpath_i (diamond_shape,
1277 dir (angle (z2 - z1) - 1),
1278 dir (angle (z1 - z4) + 1),
1280 -- get_subpath (stropha_ellipse,
1281 direction t_in of stropha_ellipse,
1282 direction t_out of stropha_ellipse,
1289 if (auctum and not stropha):
1292 fill get_subpath (diamond_shape,
1294 -dir (90 - off_angle),
1296 .. get_subpath (circle,
1300 .. get_subpath (circle,
1301 dir (90 - off_angle),
1309 if (auctum and stropha):
1314 t := xpart ((stropha_ellipse shifted z11)
1316 get_subpath (diamond_shape, up, right,
1319 % the addition or subtraction of `1' is necessary
1320 % so that we get the right starting point
1321 fill get_subpath_i (diamond_shape,
1322 dir (angle (z2 - z1) - 1),
1323 -dir (90 - off_angle),
1325 .. get_subpath (circle,
1329 .. get_subpath (stropha_ellipse,
1330 dir (90 - off_angle),
1331 direction t of stropha_ellipse,
1342 vat_punctum_char ("Ed. Vat. punctum", "vaticana.punctum",
1343 false, false, false, false,
1344 false, false, false, 1.0);
1347 % punctum cavum (for OpusTeX compatibility)
1348 vat_punctum_char ("Ed. Vat. punctum cavum", "vaticana.punctum.cavum",
1349 false, true, false, false,
1350 false, false, false, 1.0);
1353 % linea punctum (for OpusTeX compatibility)
1354 vat_punctum_char ("Ed. Vat. linea punctum", "vaticana.linea.punctum",
1355 true, false, false, false,
1356 false, false, false, 1.0);
1359 % linea punctum cavum (for OpusTeX compatibility)
1360 vat_punctum_char ("Ed. Vat. linea punctum cavum", "vaticana.linea.punctum.cavum",
1361 true, true, false, false,
1362 false, false, false, 1.0);
1365 % punctum inclinatum
1366 inclinatum_char ("Ed. Vat. inclinatum", "vaticana.inclinatum",
1367 false, false, false);
1371 vat_punctum_char ("Ed. Vat. pes lower punctum", "vaticana.lpes",
1372 false, false, true, false,
1373 true, false, false, 1.0);
1377 vat_punctum_char ("Ed. Vat. pes var lower punctum", "vaticana.vlpes",
1378 false, false, true, false,
1379 true, false, true, 1.0);
1383 vat_punctum_char ("Ed. Vat. pes upper punctum", "vaticana.upes",
1384 false, false, true, false,
1385 false, false, false, 1.0);
1388 % pes upper punctum (shifted variation)
1390 % This note head is used instead of the regular pes upper punctum to
1391 % avoid collision with the lower punctum note of the pes when the upper
1392 % punctum sits directly on top of the lower punctum.
1394 vat_punctum_char ("Ed. Vat. var pes upper punctum", "vaticana.vupes",
1395 false, false, true, false,
1396 false, true, false, 1.0);
1399 % small punctum as used in epiphonus
1400 vat_punctum_char ("Ed. Vat. plica", "vaticana.plica",
1401 false, false, false, false,
1402 false, false, false, 0.6);
1405 % small punctum as used in epiphonus
1406 plica_char ("Ed. Vat. var plica", "vaticana.vplica",
1410 % eccentric punctum as used in epiphonus
1411 epiphonus_char ("Ed. Vat. epiphonus", "vaticana.epiphonus",
1412 false, true, false, 1.0);
1415 % eccentric punctum as used in epiphonus (shifted variation)
1417 % This note head is used instead of the regular epiphonus punctum to
1418 % avoid collision with the plica head when the plica sits directly on
1419 % top of the lower head.
1421 epiphonus_char ("Ed. Vat. var epiphonus", "vaticana.vepiphonus",
1422 false, true, true, 1.0);
1425 % small punctum as used in cephalicus
1426 vat_punctum_char ("Ed. Vat. rev. plica", "vaticana.reverse.plica",
1427 false, false, false, false,
1428 true, false, false, 0.6);
1431 % small punctum as used in cephalicus
1432 plica_char ("Ed. Vat. rev. var plica", "vaticana.reverse.vplica",
1436 % eccentric punctum as used in cephalicus; without left stem
1437 epiphonus_char ("Ed. Vat. inner cephalicus", "vaticana.inner.cephalicus",
1438 false, false, false, 1.0);
1441 % eccentric punctum as used in cephalicus; with left stem
1442 epiphonus_char ("Ed. Vat. cephalicus", "vaticana.cephalicus",
1443 true, false, false, 1.0);
1447 fet_beginchar ("Ed. Vat. quilisma", "svaticana.quilisma");
1450 a_b := 1.54; % b_h * a_b / a_w = wd / ht
1454 save a, beta, ht, wd;
1461 set_char_box (0, 0.42 wd#, 0.28 ht#, 0.36 ht#);
1463 black_notehead_width# := wd#;
1465 define_pixels (ht, wd);
1471 T := identity xscaled linethickness
1473 pickup pencircle transformed T;
1474 ellipse := reverse fullcircle transformed T;
1476 z1 = (rt 0.00 wd, top -0.28 ht);
1477 z2 = (0.11 wd, -0.14 ht);
1478 z3 = (0.12 wd, +0.03 ht);
1479 z4 = (0.25 wd, -0.09 ht);
1480 z5 = (0.25 wd, +0.08 ht);
1481 z6 = (lft 0.42 wd, -0.04 ht);
1482 z7 = (lft 0.40 wd, bot +0.36 ht);
1484 fill get_subpath (ellipse, z1 - z2, z2 - z1, z1)
1485 -- get_subpath (ellipse, z2 - z1, z1 - z2, z2)
1487 fill get_subpath (ellipse, z3 - z4, z4 - z3, z3)
1488 -- get_subpath (ellipse, z4 - z3, z3 - z4, z4)
1490 fill get_subpath (ellipse, z5 - z6, z6 - z5, z5)
1491 -- point 0 of get_subpath (ellipse, z6 - z5, z5 - z6, z6)
1492 -- get_subpath (ellipse, z7 - z6, z6 - z7, z7)
1493 -- get_subpath (ellipse, z6 - z7, z5 - z6, z6)
1496 labels (1, 2, 3, 4, 5, 6, 7);
1500 % solesmes punctum inclinatum parvum
1501 inclinatum_char ("Solesmes punctum inclinatum parvum", "solesmes.incl.parvum",
1502 true, false, false);
1505 % solesmes punctum auctum ascendens
1506 vat_punctum_char ("Solesmes punctum auctum ascendens", "solesmes.auct.asc",
1507 false, false, false, true,
1508 true, false, false, 1.0);
1511 % solesmes punctum auctum descendens
1512 vat_punctum_char ("Solesmes punctum auctum descendens", "solesmes.auct.desc",
1513 false, false, false, true,
1514 false, false, false, 1.0);
1517 % solesmes punctum inclinatum auctum
1518 inclinatum_char ("Solesmes punctum incl. auctum", "solesmes.incl.auctum",
1519 false, false, true);
1523 inclinatum_char ("Solesmes stropha", "solesmes.stropha",
1524 false, true, false);
1527 % solesmes stropha aucta
1528 inclinatum_char ("Solesmes stropha aucta", "solesmes.stropha.aucta",
1533 fet_beginchar ("Solesmes oriscus", "ssolesmes.oriscus");
1536 a_b := 1.54; % b_h * a_b / a_w = wd / ht
1540 save a, beta, ht, wd;
1546 black_notehead_width# := wd#;
1550 convexity# = +0.05 ht#;
1552 define_pixels (ht, wd, convexity);
1554 set_char_box (0.00 wd#, 0.50 wd#,
1555 0.25 ht# + convexity#, 0.25 ht# + convexity#);
1557 z1 = (0.00 wd + blot_diameter / 2, -convexity);
1558 z2 = (1/6 wd, +convexity);
1559 z3 = (2/6 wd, -convexity);
1560 z4 = (0.50 wd - blot_diameter / 2, +convexity);
1565 height = 2 ypart (directionpoint right of (z1
1574 T := identity xscaled blot_diameter
1575 yscaled (h + d - height);
1576 pickup pencircle transformed T;
1577 ellipse := fullcircle transformed T;
1579 % Adjust vertical coordinates to touch bounding box.
1586 d_ := direction 0 of (z1
1591 fill get_subpath (ellipse, -d_, d_, z1)
1594 .. get_subpath (ellipse, d_, -d_, z4)
1599 labels (1, 2, 3, 4);
1613 fet_beginchar ("Ed. Med. inclinatum", "smedicaea.inclinatum");
1614 draw_diamond_head (1.2 staff_space#, 0, 0, 35, false);
1618 def med_punctum_char (expr verbose_name, internal_name,
1619 left_up_stem, left_down_stem) =
1620 fet_beginchar (verbose_name, "s" & internal_name);
1623 ht# = 2 staff_space#;
1625 black_notehead_width# := wd#;
1627 define_pixels (ht, wd);
1632 ellipse := fullcircle xscaled blot_diameter
1635 z1 = (0.00 wd + blot_diameter / 2, 0);
1636 z2 = (0.4 wd - blot_diameter / 2, 0);
1640 pickup pencircle scaled linethickness;
1643 z4 = (0.00 wd + linethickness / 2, -1.25 ht);
1645 fill get_subpath (ellipse, left, down, z1)
1649 -- (rt x4, -.5 ht / 2)
1650 -- get_subpath (ellipse, right, left, z2)
1655 set_char_box (0.0, 0.4 wd#, 1.25 ht#, 0.25 ht#);
1656 elseif left_up_stem:
1657 z4 = (0.00 wd + linethickness / 2, +1.25 ht);
1659 fill get_subpath (ellipse, down, right, z1)
1660 -- get_subpath (ellipse, right, left, z2)
1661 -- (rt x4, .5 ht / 2)
1669 set_char_box (0.0, 0.4 wd#, 0.25 ht#, 1.25 ht#);
1671 fill get_subpath (ellipse, left, right, z1)
1672 -- get_subpath (ellipse, right, left, z2)
1675 set_char_box (0.0, 0.4 wd#, 0.25 ht#, 0.25 ht#);
1683 med_punctum_char ("Ed. Med. punctum", "medicaea.punctum",
1687 % left up-stemmed punctum
1688 med_punctum_char ("Ed. Med. reverse virga", "medicaea.rvirga",
1692 % virga (i.e. left down-stemmed punctum)
1693 med_punctum_char ("Ed. Med. virga", "medicaea.virga",
1706 def huf_punctum_char (expr verbose_name, internal_name,
1708 fet_beginchar (verbose_name, "s" & internal_name);
1713 draw_diamond_head (staff_space#, 0, 0, alpha, false);
1716 set_char_box (0, head_width#,
1717 1.5 staff_space#, head_height# / 2);
1722 ellipse := reverse fullcircle xscaled blot_diameter
1723 yscaled 0.7 staff_space
1726 z11 = (head_width / 2, 0);
1727 z12 = find_tangent_shift (((0, -d) -- (w, -d)), ellipse,
1728 (w / 2, -d), (w / 2, 0));
1730 fill get_subpath (ellipse, up, down, z11)
1731 -- get_subpath (ellipse, down, up, z12)
1741 huf_punctum_char ("Hufnagel punctum", "hufnagel.punctum", false)
1745 huf_punctum_char ("Hufnagel virga", "hufnagel.virga", true)
1749 fet_beginchar ("Hufnagel pes lower punctum", "shufnagel.lpes")
1750 save width, height, alpha;
1752 width# = 2 * staff_space#;
1753 height# = 0.7 * staff_space#;
1756 set_char_box (0, width#, height# / 2, height# / 2);
1758 define_pixels (width, height);
1763 circle := reverse fullcircle scaled linethickness;
1765 pickup pencircle scaled linethickness;
1767 rt x3 = -lft x1 = width / 2;
1768 y2 = y3 = height / 2;
1769 y1 = y4 = -height / 2;
1771 tand (alpha) * (y2 - y1) = x2 - x1 = x3 - x4;
1773 fill get_subpath (circle, left, z2 - z1, z1)
1774 -- get_subpath (circle, z2 - z1, right, z2)
1775 -- get_subpath (circle, right, z4 - z3, z3)
1776 -- get_subpath (circle, z4 - z3, left, z4)
1779 currentpicture := currentpicture shifted (width/2, 0);
1781 % labels (1, 2, 3, 4);
1787 %% Noteheads for Medieval East-Slavic (Kievan) Notation
1788 %% Code by Aleksandr Andreev <aleksandr.andreev@gmail.com>
1793 fet_beginchar ("Kievan final note", "sM2kievan");
1794 % This draws the Final Note.
1795 % It is the last note of a piece of music
1796 % equivalent to having a whole note and fermata in CMN.
1797 % It always has an invariant representation.
1799 vert_bar_thickness# := 2 * stafflinethickness#;
1800 vert_height# := 1.5 * staff_space#;
1801 blank_space# := 1.5 * stafflinethickness#;
1802 note_width# := vert_height# - 2 * vert_bar_thickness#;
1804 define_pixels (vert_height, blank_space, note_width);
1805 define_blacker_pixels (vert_bar_thickness);
1808 p := (0, blank_space)
1809 -- (0, staff_space - blank_space)
1810 -- (note_width + 0.5 vert_bar_thickness,
1811 staff_space - blank_space)
1812 -- (note_width + 0.5 vert_bar_thickness, blank_space)
1815 fill p reflectedabout ((0, 0), (1, 0));
1817 pickup pensquare xscaled vert_bar_thickness;
1819 draw (note_width + 0.5 * vert_bar_thickness, vert_height)
1820 -- (note_width + 0.5 * vert_bar_thickness, -vert_height);
1822 set_char_box (0, note_width# + vert_bar_thickness#,
1823 vert_height#, vert_height#);
1827 fet_beginchar ("Kievan recitative mark", "sM1kievan");
1828 inner_width# := 4 * staff_space#;
1829 vert_bar_thickness# := 2 * stafflinethickness#;
1830 vert_bar_height# := staff_space# - stafflinethickness#;
1831 blank_space# := 0.20 * vert_bar_height#;
1833 define_pixels (inner_width, blank_space, vert_bar_height);
1834 define_blacker_pixels (vert_bar_thickness);
1837 p := (2.5 * vert_bar_thickness, blank_space)
1838 -- (2.5 * vert_bar_thickness, vert_bar_height - blank_space)
1839 -- (3.5 * vert_bar_thickness + inner_width,
1840 vert_bar_height - blank_space)
1841 -- (3.5 * vert_bar_thickness + inner_width, blank_space)
1844 fill p reflectedabout ((0, 0), (1, 0));
1846 % draw the four vertical lines
1847 pickup pensquare xscaled vert_bar_thickness;
1848 p := (0.5 * vert_bar_thickness, vert_bar_height)
1849 -- (0.5 * vert_bar_thickness, -vert_bar_height);
1851 draw p shifted (2 * vert_bar_thickness, 0);
1852 draw p shifted (3 * vert_bar_thickness + inner_width, 0);
1853 draw p shifted (5 * vert_bar_thickness + inner_width, 0);
1855 set_char_box (0, 6 * vert_bar_thickness# + inner_width#,
1856 vert_bar_height#, vert_bar_height#);
1860 fet_beginchar ("Kievan whole note", "s0kievan");
1861 % the amount by which top and bottom diamond overlap
1862 overlap# := stafflinethickness#;
1863 height# := staff_space# - stafflinethickness#;
1864 width# := height# + overlap#;
1866 define_pixels (overlap, height, width);
1868 % parameters for superellipse are right, top, left, bottom
1869 fill superellipse ((width, 0.5 * (height + overlap)),
1870 (width/2, height + overlap),
1871 (0, 0.5 * (height + overlap)),
1872 (width/2, -overlap),
1874 fill superellipse ((width, -0.5 * (height + overlap)),
1876 (0, -0.5 * (height + overlap)),
1877 (width/2, -height - overlap),
1880 set_char_box (0, width#, height# + overlap#,
1881 height# + overlap#);
1885 fet_beginchar ("Kievan quarter note down", "d2kievan");
1886 z1 = (0.09 * staff_space, 0.33 * staff_space);
1887 z2 = (0.66 * staff_space, 0.37 * staff_space);
1888 z3 = (0.99 * staff_space, 0.36 * staff_space);
1889 z4 = (0.90 * staff_space, -1.05 * staff_space);
1890 z5 = (1.02 * staff_space, -2.19 * staff_space);
1891 z6 = (0.60 * staff_space, -2.49 * staff_space);
1892 z7 = (0.58 * staff_space, -1.91 * staff_space);
1893 z8 = (0.73 * staff_space, -0.35 * staff_space);
1894 z9 = (0.02 * staff_space, -0.39 * staff_space);
1895 z10 = (0, -0.24 * staff_space);
1912 set_char_box (0, 1.02 staff_space#,
1913 2.50 staff_space#, 0.40 staff_space#);
1917 fet_beginchar ("Kievan quarter note up", "u2kievan");
1918 z1 = (0.090 staff_space, -0.330 staff_space);
1919 z2 = (0.664 staff_space, -0.371 staff_space);
1920 z3 = (0.986 staff_space, -0.363 staff_space);
1921 z4 = (0.897 staff_space, 1.051 staff_space);
1922 z5 = (1.019 staff_space, 2.387 staff_space);
1923 z6 = (0.603 staff_space, 2.587 staff_space);
1924 z7 = (0.583 staff_space, 1.911 staff_space);
1925 z8 = (0.725 staff_space, 0.346 staff_space);
1926 z9 = (0.017 staff_space, 0.391 staff_space);
1927 z10 = (0, 0.240 staff_space);
1942 ... {dir -76.9}cycle;
1944 set_char_box (0, 1.02 staff_space#,
1945 0.40 staff_space#, 2.6 staff_space#);
1949 fet_beginchar ("Kievan half note (line position)", "s1kievan");
1950 % This draws the half note with a short tail up and a long tail down.
1951 % This version of the half note is used on any line of the staff.
1953 z1 = (1.031 staff_space, 0.945 staff_space);
1954 z2 = (0.945 staff_space, -0.122 staff_space);
1955 z3 = (1.059 staff_space, -1.393 staff_space);
1956 z4 = (0.713 staff_space, -1.564 staff_space);
1957 z5 = (0.672 staff_space, -0.729 staff_space);
1958 z6 = (0.684 staff_space, -0.318 staff_space);
1959 z7 = (0.448 staff_space, -0.326 staff_space);
1960 z8 = (0, -0.281 staff_space);
1961 z9 = (0.086 staff_space, 0.350 staff_space);
1962 z10 = (0.746 staff_space, 0.277 staff_space);
1963 z11 = (0.909 staff_space, 0.921 staff_space);
1980 set_char_box (0, 1.06 staff_space#,
1981 1.6 staff_space#, 1.0 staff_space#);
1985 fet_beginchar ("Kievan half note (space position)", "sr1kievan");
1986 % This draws the half note with a short tail down and a long tail up.
1987 % This version of the half note is used in any space of the staff.
1989 z1 = (1.071 staff_space, 1.426 staff_space);
1990 z2 = (0.974 staff_space, 0.191 staff_space);
1991 z3 = (1.059 staff_space, -0.994 staff_space);
1992 z4 = (0.713 staff_space, -1.169 staff_space);
1993 z5 = (0.676 staff_space, -0.436 staff_space);
1994 z6 = (0.684 staff_space, -0.310 staff_space);
1995 z7 = (0.448 staff_space, -0.322 staff_space);
1996 z8 = (0, -0.277 staff_space);
1997 z9 = (0.0856 staff_space, 0.359 staff_space);
1998 z10 = (0.746 staff_space, 0.281 staff_space);
1999 z11 = (0.807 staff_space, 0.847 staff_space);
2000 z12 = (0.945 staff_space, 1.401 staff_space);
2018 set_char_box (0, 1.1 staff_space#,
2019 1.0 staff_space#, 1.4 staff_space#);
2023 fet_beginchar ("Kievan eighth note (down)", "d3kievan");
2024 % This draws the eighth note.
2025 % This form of the eight note occurs on the third line or higher
2026 % and sometimes between the second line and the third line.
2028 z1 = (0.261 staff_space, 0.416 staff_space);
2029 z2 = (1.022 staff_space, 0.269 staff_space);
2030 z3 = (0.664 staff_space, -0.603 staff_space);
2031 z4 = (1.259 staff_space, -0.726 staff_space);
2032 z5 = (1.055 staff_space, -2.012 staff_space);
2033 z6 = (1.186 staff_space, -2.794 staff_space);
2034 z7 = (0.778 staff_space, -2.999 staff_space);
2035 z8 = (0.741 staff_space, -2.567 staff_space);
2036 z9 = (0.941 staff_space, -1.467 staff_space);
2037 z10 = (0.33 staff_space, -1.340 staff_space);
2038 z11 = (0.631 staff_space, -0.448 staff_space);
2039 z12 = (0, -0.334 staff_space);
2060 set_char_box (0, 1.25 staff_space#,
2061 3.0 staff_space#, 0.5 staff_space#);
2065 fet_beginchar ("Kievan eighth note (up)", "u3kievan");
2066 % This draws the flagged eighth note.
2067 % This version of the eighth note occurs on the second line or lower.
2069 % first, draw the upside down quarter note
2070 z1 = (0.090 staff_space, -0.33 staff_space);
2071 z2 = (0.664 staff_space, -0.371 staff_space);
2072 z3 = (0.986 staff_space, -0.363 staff_space);
2073 z4 = (0.896 staff_space, 1.051 staff_space);
2074 z5 = (1.019 staff_space, 2.387 staff_space);
2075 z6 = (0.603 staff_space, 2.587 staff_space);
2076 z7 = (0.583 staff_space, 1.911 staff_space);
2077 z8 = (0.725 staff_space, 0.346 staff_space);
2078 z9 = (0.016 staff_space, 0.391 staff_space);
2079 z10 = (0, 0.240 staff_space);
2094 ... {dir -76.9}cycle;
2096 % now, draw the stem
2097 z11 = (0.033 staff_space, 2.823 staff_space);
2098 z12 = (0.391 staff_space, 2.648 staff_space);
2099 z13 = (0.354 staff_space, 2.290 staff_space);
2100 z14 = (0.676 staff_space, 1.076 staff_space);
2101 z15 = (0.693 staff_space, 0.88 staff_space);
2102 z16 = (0.208 staff_space, 1.699 staff_space);
2103 z17 = (0.024 staff_space, 2.616 staff_space);
2114 set_char_box (0, 1.0 staff_space#,
2115 0.4 staff_space#, 2.9 staff_space#);
2118 fet_endgroup ("noteheads");