]> git.donarmstrong.com Git - lilypond.git/blob - mf/parmesan-rests.mf
*** empty log message ***
[lilypond.git] / mf / parmesan-rests.mf
1 % -%-Fundamental-%- -*-Metafont-*-
2 % parmesan-rests.mf -- implement ancient rests
3
4 % source file of LilyPond's pretty-but-neat music font
5
6 % (c) 2001--2005 Juergen Reuter <reuter@ipd.uka.de>
7
8 % Neo-mensural rests originally by
9 % Christian Mondrup and Mats Bengtsson
10
11
12 fet_begingroup("rests")
13
14
15 %%%%%%%%
16 %
17 %
18 %
19 % NEO-MENSURAL NOTATION
20 %
21 %
22 %
23
24 % Neo-mensural longa and breve are identical with default longa and breve.
25
26 neomens_block_rest_x# = 2/5 staff_space#;
27 neomens_block_rest_y# = 1/1 staff_space#;
28 neomens_half_block_rest_y# = 5/8 staff_space#;
29
30 define_pixels(neomens_block_rest_x,
31               neomens_block_rest_y, neomens_half_block_rest_y);
32
33 def neomens_half_block_rest =
34         draw_block ((0,0), (neomens_block_rest_x, neomens_half_block_rest_y));
35         enddef;
36
37 fet_beginchar("Neo-mensural maxima rest", "-3neomensural");
38         set_char_box(0, 3 neomens_block_rest_x#,
39                      neomens_block_rest_y#, neomens_block_rest_y#);
40         draw_block ((0,-neomens_block_rest_y),
41                      (neomens_block_rest_x, neomens_block_rest_y));
42         addto currentpicture also currentpicture shifted (2 neomens_block_rest_x, 0);
43 fet_endchar;
44
45 fet_beginchar("Neo-mensural longa rest", "-2neomensural");
46         set_char_box(0, neomens_block_rest_x#,
47                      neomens_block_rest_y#, neomens_block_rest_y#);
48         draw_block ((0,-neomens_block_rest_y),
49                     (neomens_block_rest_x, neomens_block_rest_y));
50 fet_endchar;
51
52 fet_beginchar("Neo-mensural breve rest", "-1neomensural");
53         set_char_box(0, neomens_block_rest_x#,
54                      0, neomens_block_rest_y#);
55         draw_block ((0,0), (neomens_block_rest_x, neomens_block_rest_y));
56 fet_endchar;
57
58 fet_beginchar("Neo-mensural whole rest", "0neomensural");
59         set_char_box(0, neomens_block_rest_x#,
60                      neomens_half_block_rest_y#,  0);
61         neomens_half_block_rest;
62         currentpicture :=
63                 currentpicture shifted (0,- neomens_half_block_rest_y);
64 fet_endchar;
65
66 fet_beginchar("Neo-mensural half rest", "1neomensural");
67         set_char_box(0, neomens_block_rest_x#,
68                      0, neomens_half_block_rest_y#);
69         neomens_half_block_rest;
70 fet_endchar;
71
72 neomensrestsize# = 0.8 staff_space#;
73
74 fet_beginchar("Neo-mensural 4th rest","2neomensural")
75         set_char_box(0,neomensrestsize#,0,neomensrestsize#);
76         pickup pencircle scaled 2 stafflinethickness;
77         lft x1 = 0;
78         bot y1 = 0;
79         lft x2 = 0;
80         top y2 = h;
81         rt x3 = w;
82         bot y3 = h/2;
83         draw z1 .. z2;
84         draw z2 .. z3;
85 fet_endchar
86
87 fet_beginchar("Neo-mensural 8th rest","3neomensural")
88         set_char_box(0,neomensrestsize#,0,neomensrestsize#);
89         pickup pencircle scaled 2 stafflinethickness;
90         rt x1 = w;
91         bot y1 = 0;
92         rt x2 = w;
93         top y2 = h;
94         lft x3 = 0;
95         bot y3 = h/2;
96         draw z1 .. z2;
97         draw z2 .. z3;
98 fet_endchar
99
100 fet_beginchar("Neo-mensural 16th rest","4neomensural")
101         set_char_box(0,neomensrestsize#,0,staff_space#);
102         pickup pencircle scaled 2 stafflinethickness;
103         rt x1 = w;
104         bot y1 = 0;
105         rt x2 = w;
106         top y2 = h;
107
108         draw z1 .. z2;
109
110         pickup pencircle scaled 2 stafflinethickness;
111         rt x3 = w;
112         top y3 = h;
113         lft x4 = 0;
114         bot y4 = h/2;
115         rt x5 = w;
116         top y5 = 5/8h;
117         lft x6 = 0;
118         bot y6 = h/8;
119
120         draw z3 .. z4;
121         draw z5 .. z6;
122 fet_endchar
123
124
125 %%%%%%%%
126 %
127 %
128 %
129 % MENSURAL NOTATION
130 %
131 %
132 %
133
134 pen_width# = 0.3 staff_space#;
135 pen_height# = 0;
136 pen_rotation = 30;
137 slight_pen_rotation = 15;
138
139 mens_block_rest_y# = 1/1 staff_space#;
140 mens_half_block_rest_y# = 5/8 staff_space#;
141
142 define_pixels(mens_block_rest_y, mens_half_block_rest_y,
143               pen_width, pen_height);
144
145 fet_beginchar("Mensural maxima rest", "-3mensural");
146         set_char_box(0, pen_width#,
147                      mens_block_rest_y#, 2mens_block_rest_y#);
148         pickup pencircle
149                 xscaled pen_width
150                 yscaled pen_height
151                 rotated slight_pen_rotation;
152         draw (w/2, -mens_block_rest_y) -- (w/2, 2 mens_block_rest_y);
153 fet_endchar;
154
155 fet_beginchar("Mensural longa rest", "-2mensural");
156         set_char_box(0, pen_width#,
157                      mens_block_rest_y#, mens_block_rest_y#);
158         pickup pencircle
159                 xscaled pen_width
160                 yscaled pen_height
161                 rotated slight_pen_rotation;
162         draw (w/2, -mens_block_rest_y) -- (w/2, mens_block_rest_y);
163 fet_endchar;
164
165 fet_beginchar("Mensural breve rest", "-1mensural");
166         set_char_box(0, pen_width#,
167                      0, mens_block_rest_y#);
168         pickup pencircle
169                 xscaled pen_width
170                 yscaled pen_height
171                 rotated slight_pen_rotation;
172         draw (w/2, 0) -- (w/2, mens_block_rest_y);
173 fet_endchar;
174
175 fet_beginchar("Mensural whole rest", "0mensural");
176         set_char_box(0, pen_width#,
177                      mens_half_block_rest_y#, 0);
178         pickup pencircle
179                 xscaled pen_width
180                 yscaled pen_height
181                 rotated slight_pen_rotation;
182         draw (w/2, 0) -- (w/2, -mens_half_block_rest_y);
183 fet_endchar;
184
185 fet_beginchar("Mensural half rest", "1mensural");
186         set_char_box(0, pen_width#,
187                      0, mens_half_block_rest_y#);
188         pickup pencircle
189                 xscaled pen_width
190                 yscaled pen_height
191                 rotated slight_pen_rotation;
192         draw (w/2, 0) -- (w/2, mens_half_block_rest_y);
193 fet_endchar;
194
195 mensrestsize# = .8staff_space#;
196
197 fet_beginchar("Mensural 4th rest","2mensural")
198         set_char_box(0,mensrestsize#,0,mensrestsize#);
199         pickup pencircle
200                 xscaled pen_width
201                 yscaled pen_height
202                 rotated pen_rotation;
203         lft x1 =      0;     y1 = 0;
204         lft x2 =      0; top y2 = 5/8 h;
205         rt  x3 =  1/5 w; bot y3 = 6/8 h;
206         rt  x4 =      w; bot y4 = 4/8 h;
207         draw z1 -- z2 -- z3 -- z4;
208 fet_endchar
209
210 fet_beginchar("Mensural 8th rest","3mensural")
211         set_char_box(0,mensrestsize#,0,mensrestsize#);
212         pickup pencircle
213                 xscaled pen_width
214                 yscaled pen_height
215                 rotated pen_rotation;
216         rt  x1 =      w;     y1 = 0;
217         rt  x2 =      w; top y2 = 5/8 h;
218         lft x3 =  1/5 w; bot y3 = 6/8 h;
219         lft x4 =      0; bot y4 = 4/8 h;
220         draw z1 -- z2 -- z3 -- z4;
221 fet_endchar
222
223 %
224 % FIXME: So far, I have never seen a semifusa rest printed.  Hence,
225 % the shape of this font character is currently pure invention.  --jr
226 %
227 fet_beginchar("Mensural 16th rest","4mensural")
228         set_char_box(0,mensrestsize#,0,staff_space#);
229         pickup pencircle
230                 xscaled pen_width
231                 yscaled pen_height
232                 rotated pen_rotation;
233
234         rt  x1 =      w;     y1 = 0;
235         rt  x2 =      w; top y2 = 5.5/8 h;
236         lft x3 =  1/5 w; bot y3 = 6.5/8 h;
237         lft x4 =      0; bot y4 = 4.5/8 h;
238         rt  x5 =      w; top y5 = 2.5/8 h;
239         lft x6 =  1/5 w; bot y6 = 3.5/8 h;
240         lft x7 =      0; bot y7 = 1.5/8 h;
241         draw z1 -- z2 -- z3 -- z4;
242         draw z5 -- z6 -- z7;
243 fet_endchar
244
245 fet_endgroup ("rests")