-%
-brevis_wid# := 2 staff_space#;
-
-def draw_brevis(expr exact_center, reduction, small_width, small_height) =
- %
- % inspired by function draw_brevis of
- % feta-bolletjes.mf
- %
- save reduced_slt, reduced_nht;
- save stem_width, head_width;
- save serif_size, serif_protrude;
- save holeheight, beamheight;
-
- reduced_slt# = stafflinethickness# * reduction;
- reduced_nht# = noteheight# * reduction;
- stem_width# = 1.4 reduced_slt#;
- if small_width:
- head_width# = 0.5brevis_wid# * reduction;
- else:
- head_width# = brevis_wid# * reduction;
- fi;
- if small_height:
- serif_size# = 0.64 reduced_slt#;
- serif_protrude# = 0.96 serif_size#;
- holeheight# = 3 reduced_slt#;
- beamheight# = 0.32(reduced_nht# - holeheight#);
- else:
- serif_size# = 1.0 reduced_slt#;
- serif_protrude# = 1.5 serif_size#;
- holeheight# = 3 reduced_slt#;
- beamheight# = 0.5(reduced_nht# - holeheight#);
- fi;
- define_pixels(reduced_slt);
- define_pixels(stem_width);
- define_pixels(head_width);
- define_pixels(serif_size);
- define_pixels(serif_protrude);
- define_pixels(beamheight);
-
- penpos1(stem_width, 0);
- penpos2(stem_width, 0);
- penpos3(beamheight, 90);
- penpos4(beamheight, 90);
- penpos5(stem_width, 180);
-
- z1l = exact_center;
- z2l = z1l + (0, -reduced_slt/2);
- z3r = z2r + serif_size*(1,-1);
- y4r = y3r;
- x4l = x1l + head_width/2;
- z5l = z3l + (-serif_size, -serif_protrude);
-
- penlabels(1,2,3,4,5);
- fill z1r -- z1l -- z5r{down} .. z5l{up} .. z3l{right}
- -- z4l -- z4r -- z3r{left} .. z2r{up} -- cycle;
-enddef;
-
-
-def draw_mensural_i_c_clef(expr exact_center, reduction) =
- draw_brevis(exact_center, reduction, false, false);
-
- save reduced_il, reduced_slt;
- save stem_width;
-
- reduced_il# = staff_space# * reduction;
- reduced_slt# = stafflinethickness# * reduction;
- stem_width# = 1.4 reduced_slt#;
-
- define_pixels(reduced_il);
- define_pixels(reduced_slt);
- define_pixels(stem_width);
-
- penpos6(stem_width, 0);
- penpos7(stem_width, 0);
- z6l = exact_center;
- z7l = z6l + (0, -2reduced_il);
- fill z6l -- z7l -- z7r -- z6r -- cycle;
- penpos8(stem_width, 0);
- penpos9(stem_width, 0);
- z8l = z6l + (-3reduced_slt, 0);
- z9l = z8l + (0, -2reduced_il);
- fill z8l -- z9l -- z9r -- z8r -- cycle;
-
- addto currentpicture also currentpicture
- yscaled -1 shifted (0, 2*(ypart exact_center));
- addto currentpicture also currentpicture
- xscaled -1 shifted (2x4l,0);
-
- set_char_box(0, 2head_width#,
- 6reduced_slt#*reduction, 6reduced_slt#*reduction);
-enddef;
-
-
-fet_beginchar("mensural c clef", "mensural1_c", "mens1cclef")
- if test = 1:
- draw_staff(-1,3, 0.0);
- fi;
- draw_mensural_i_c_clef((0,0), 1.0);
-fet_endchar;
-fet_beginchar("mensural c clef", "mensural1_c_change", "cmens1cclef")
- draw_mensural_i_c_clef((1.3 staff_space#,0), .8);
-fet_endchar;
-
-
-def draw_mensural_ii_c_clef(expr exact_center, reduction) =
- draw_brevis(exact_center, reduction, true, true);
-
- save reduced_il, reduced_slt;
- save stem_width, interline;
-
- reduced_il# = staff_space# * reduction;
- reduced_slt# = stafflinethickness# * reduction;
- stem_width# = 1.4 reduced_slt#;
- interline# = staff_space#;
-
- define_pixels(reduced_il);
- define_pixels(reduced_slt);
- define_pixels(stem_width);
- define_pixels(interline);
-
- penpos6(stem_width, 0);
- penpos7(stem_width, 0);
- z6l = exact_center + (0, -interline/2);
- z7l = z6l + (0, -1.5reduced_il);
- fill z6l -- z7l -- z7r -- z6r -- cycle;
-
- addto currentpicture also currentpicture
- yscaled -1 shifted (0, 2*(ypart exact_center) - interline);
- addto currentpicture also currentpicture
- yscaled -1 shifted (0, 4*(ypart exact_center));
- addto currentpicture also currentpicture
- xscaled -1 shifted (2x4l,0);
-
- set_char_box(0, 2head_width#,
- noteheight#*4*reduction, noteheight#*4*reduction);
-enddef;
-
-
-fet_beginchar("mensural c clef", "mensural2_c", "mens2cclef")
- if test = 1:
- draw_staff(-1,3, 0.0);
- fi;
- draw_mensural_ii_c_clef((0,0), 1.0);
-fet_endchar;
-fet_beginchar("mensural c clef", "mensural2_c_change", "cmens2cclef")
- draw_mensural_ii_c_clef((1.3 staff_space#,0), .8);
-fet_endchar;
-
-
-def draw_mensural_iii_c_clef(expr exact_center, reduction) =
- % inspired by Ockeghem, "Missa Prolationum", in: MGG, volume
- % 9, table 94.
- draw_mensural_ii_c_clef(exact_center, reduction);
-
- addto currentpicture also currentpicture
- shifted (0, -interline);
-
- set_char_box(0, 2head_width#,
- noteheight#*6*reduction, noteheight#*6*reduction);
-enddef;
-
-
-fet_beginchar("mensural c clef", "mensural3_c", "mens3cclef")
- if test = 1:
- draw_staff(-1,3, 0.0);
- fi;
- draw_mensural_iii_c_clef((0,0), 1.0);
-fet_endchar;
-fet_beginchar("mensural c clef", "mensural3_c_change", "cmens3cclef")
- draw_mensural_iii_c_clef((0,0), .8);
-fet_endchar;
-
-def draw_diamond(expr exact_center, reduction) =
- save stem_width, reduced_il, reduced_nht, holeheight, beamheight;
- save rh_height, rh_width;
-
- stem_width# = 1.4 reduced_slt#;
- reduced_il# = staff_space# * reduction;
- reduced_nht# = noteheight# * reduction;
- holeheight# = 3 reduced_slt#;
- beamheight# = 0.4(reduced_nht# - holeheight#);
-
- rh_height# = 1.2reduced_il#;
- rh_width# / rh_height# = 0.58; % tan(30)
-
- define_pixels(beamheight);
- define_pixels(stem_width);
- define_pixels(rh_height);
- define_pixels(rh_width);
-
- pickup pencircle
- xscaled beamheight
- yscaled stem_width
- rotated 45;
-
- draw
- exact_center + (-rh_width/2, 0) --
- exact_center + (0, rh_height/2) --
- exact_center + (+rh_width/2, 0) --
- exact_center + (0, -rh_height/2) --
- cycle;
-enddef;
-
-def draw_mensural_i_f_clef(expr exact_center, reduction) =
- %
- % inspired by Gaspar van Weerbeke, "Virgo Maria" (1502), in:
- % MGG, volume 9, col. 653 ("Motette"), fig. 3.; also by
- % Andr'e Campra, "Entr'ee des s'er'enades" (1710), in: MGG,
- % volume 2, col. 1649 ("Contredanse"), fig. 2.
- %
- draw_brevis(exact_center, reduction, true, false);
-
- save reduced_il, reduced_slt;
- save stem_width, interline;
-
- reduced_il# = staff_space# * reduction;
- reduced_slt# = stafflinethickness# * reduction;
- stem_width# = 1.4 reduced_slt#;
- interline# = staff_space#;
-
- define_pixels(reduced_il);
- define_pixels(reduced_slt);
- define_pixels(stem_width);
- define_pixels(interline);
-
- addto currentpicture also currentpicture
- yscaled -1 shifted (0, 2*(ypart exact_center));
- addto currentpicture also currentpicture
- xscaled -1 shifted (2x4l,0);
-
- penpos6(stem_width, 0);
- penpos7(stem_width, 0);
- z6r = exact_center + (2x4l, 0);
- z7r = z6r + (0, -4reduced_il);
- fill z6l -- z7l -- z7r -- z6r -- cycle;
-
- draw_diamond(exact_center +
- (1.6interline*reduction, interline/2), reduction);
- %% some editions put a stem on top of the upper note head:
- % penpos8(stem_width, 0);
- % penpos9(stem_width, 0);
- % z8l = exact_center + (1.6interline*reduction, interline*reduction);
- % z9l = z8l + (0, 1.5interline*reduction);
- % fill z8l -- z9l -- z9r -- z8r -- cycle;
-
- draw_diamond(exact_center +
- (1.6interline*reduction, -interline/2), reduction);
- penpos10(stem_width, 0);
- penpos11(stem_width, 0);
- z10r = exact_center + (1.6interline*reduction, -interline*reduction);
- z11r = z10r + (0, -3.5interline*reduction);
- fill z10l -- z11l -- z11r -- z10r -- cycle;
-
- set_char_box(0, 3head_width#,
- 3.5noteheight#*reduction, 1.5noteheight#*reduction);
-enddef;
-
-
-fet_beginchar("mensural f clef", "mensural1_f", "mens1fclef")
- if test = 1:
- draw_staff(-1,3, 0.0);
- fi;
- draw_mensural_i_f_clef((0,0), 1.0);
-fet_endchar;
-fet_beginchar("mensural f clef", "mensural1_f_change", "cmens1fclef")
- draw_mensural_i_f_clef((0,0), .8);
-fet_endchar;
-
-
-def draw_mensural_ii_f_clef(expr exact_center, reduction) =
- %
- % inspired by Philippe le Duc, "Dite Signori" (1590), in: MGG,
- % volume 3, col. 848 ("Duc"); also by John Dowland, "The First
- % Booke of Songes" (1597), in: MGG, volume 3, col. 721
- % ("Dowland"), fig. 3.
-
- save reduced_slt, stem_width, reduced_nht, holeheight, beamheight;
-
- reduced_slt# = stafflinethickness# * reduction;
- stem_width# = 1.4 reduced_slt#;
- reduced_nht# = noteheight# * reduction;
- holeheight# = 3 reduced_slt#;
- beamheight# = 0.4(reduced_nht# - holeheight#);
-
- define_pixels(beamheight, stem_width, staff_space);
-
- pickup pencircle
- xscaled beamheight
- yscaled stem_width
- rotated 45;
-
- draw
- exact_center + (1.0 staff_space, 0.6 staff_space) --
- exact_center + (1.25 staff_space, 0.4 staff_space);
-
- draw
- exact_center + (1.0 staff_space, -0.4 staff_space) --
- exact_center + (1.25 staff_space, -0.6 staff_space);
-
- draw halfcircle scaled 1.2 staff_space rotated -90
- shifted (-exact_center + (+0.1 staff_space, 0));
-
- set_char_box(0, 3staff_space#, 3staff_space#, 0);
-enddef;
-
-fet_beginchar("mensural f clef", "mensural2_f", "mens2fclef")
- if test = 1:
- draw_staff(-1,3, 0.0);
- fi;
- draw_mensural_ii_f_clef((0,0), 1.0);
-fet_endchar;
-fet_beginchar("mensural f clef", "mensural2_f_change", "cmens2fclef")
- draw_mensural_ii_f_clef((0,0), .8);
-fet_endchar;