| 1 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2 |
% this is xgreggen.mf (c) |
| 3 |
% |
| 4 |
% Version T.67 [January 97] |
| 5 |
% |
| 6 |
% |
| 7 |
% This file is part of MusiXTeX |
| 8 |
% |
| 9 |
% MusiXTeX 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 2, or (at your option) |
| 12 |
% any later version. |
| 13 |
% |
| 14 |
% MusiXTeX 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. |
| 18 |
% |
| 19 |
% You should have received a copy of the GNU General Public License |
| 20 |
% along with MusiXTeX; see the file COPYING. If not, write to |
| 21 |
% the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 22 |
% Boston, MA 02111-1307, USA. |
| 23 |
% |
| 24 |
|
| 25 |
nhw#:=1.2*nhh#; |
| 26 |
|
| 27 |
thin#:=1/50designsize; |
| 28 |
med#:=1/33designsize; |
| 29 |
thick#:=1/16designsize; |
| 30 |
|
| 31 |
thinwidth := 0.125pt; |
| 32 |
beamht#:=0.48nhh#; |
| 33 |
%gregwidth#:=0.5*sqrt(2)*nhh#; |
| 34 |
gregwidth#:=0.6*nhh#; |
| 35 |
smallgreg:=0.5; |
| 36 |
|
| 37 |
define_pixels(nhh,nhw,beamht,gregwidth); |
| 38 |
define_blacker_pixels(thin,med,thick); |
| 39 |
|
| 40 |
pair ne,se,sw,nw; %northeast,southeast,southwest,northwest |
| 41 |
ne = up+right; se = down+right; sw = down+left; nw = up+left; |
| 42 |
|
| 43 |
font_x_height nhh#; |
| 44 |
font_quad nhw#; |
| 45 |
|
| 46 |
pair pone, ptwo; |
| 47 |
transform t; |
| 48 |
path p; |
| 49 |
|
| 50 |
hlthick=.2pt; |
| 51 |
lthick=.4pt; |
| 52 |
|
| 53 |
greglangle:=18; gregrlangle:=180+greglangle; |
| 54 |
greguangle:=26; gregruangle:=180+greguangle; |
| 55 |
orisuangle:=40; orisruangle:=180+orisuangle; |
| 56 |
|
| 57 |
diamwidth:=.96 gregwidth; greg_min_diam:=gregwidth-diamwidth; |
| 58 |
diamheight:=1.33 gregwidth; |
| 59 |
deminutae:=0.66; gregwidth_dem:=gregwidth*deminutae; |
| 60 |
aucta_fact:=0.33gregwidth; |
| 61 |
shave:=.3gregwidth; |
| 62 |
|
| 63 |
pen line_pen, med_pen, coda_pen, thin_pen; |
| 64 |
med_pen:= pencircle scaled med; |
| 65 |
line_pen:= pencircle scaled lthick; |
| 66 |
coda_pen:= pencircle xscaled 1.25thick yscaled max(1,.75med); |
| 67 |
thin_pen:= pencircle scaled max(1,.25pt); |
| 68 |
|
| 69 |
picture save_pic, elem_pic; |
| 70 |
|
| 71 |
%%%%%%%%%%%%%%% |
| 72 |
% basic def's % |
| 73 |
%%%%%%%%%%%%%%% |
| 74 |
|
| 75 |
def savepic = save_pic:= currentpicture enddef; |
| 76 |
def save_elempic = elem_pic:= currentpicture enddef; |
| 77 |
def callpic = currentpicture:= save_pic enddef; |
| 78 |
|
| 79 |
def mirror (expr pone, ptwo) = |
| 80 |
currentpicture:=currentpicture reflectedabout(round(pone),round(ptwo)) |
| 81 |
enddef; |
| 82 |
|
| 83 |
def add_mirror (expr pone, ptwo) = |
| 84 |
addto currentpicture also currentpicture |
| 85 |
reflectedabout (round(pone), round(ptwo)) |
| 86 |
enddef; |
| 87 |
|
| 88 |
def call_mirror (expr pone, ptwo) = callpic; mirror (pone, ptwo) enddef; |
| 89 |
|
| 90 |
def add_shift (expr pone, ptwo) = |
| 91 |
addto currentpicture also currentpicture shifted (pone, ptwo) |
| 92 |
enddef; |
| 93 |
|
| 94 |
def call_add_shift (expr pone, ptwo) = |
| 95 |
callpic; add_shift (pone, ptwo) |
| 96 |
enddef; |
| 97 |
|
| 98 |
def add_elempic (expr pone, ptwo) = |
| 99 |
addto currentpicture also elem_pic shifted (pone, ptwo) |
| 100 |
enddef; |
| 101 |
|
| 102 |
def call_add_save_elempic (expr pone, ptwo) = |
| 103 |
callpic; add_elempic(pone, ptwo); savepic |
| 104 |
enddef; |
| 105 |
|
| 106 |
def shift_pic (expr pone, ptwo) = |
| 107 |
currentpicture:=currentpicture shifted (round(pone),round(ptwo)) |
| 108 |
enddef; |
| 109 |
|
| 110 |
def fill_circle (expr diameter, zshift) = |
| 111 |
fill fullcircle scaled diameter shifted zshift |
| 112 |
enddef; |
| 113 |
|
| 114 |
def fill_square (expr xwidth, ywidth, zshift) = |
| 115 |
fill unitsquare xscaled xwidth yscaled ywidth shifted zshift |
| 116 |
enddef; |
| 117 |
|
| 118 |
% |
| 119 |
|
| 120 |
% eobasicdefs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 121 |
|
| 122 |
%%%%%%% |
| 123 |
message ("<noteheads>"); |
| 124 |
%%%%%%% |
| 125 |
|
| 126 |
NHW=nhw+hlthick; |
| 127 |
|
| 128 |
beginchar(0, gregwidth#, .5nhh#, .5nhh#); "dummy square"; |
| 129 |
endchar; |
| 130 |
|
| 131 |
beginchar(18, smallgreg*gregwidth#, .5nhh#, .5nhh#); "small dummy square"; |
| 132 |
endchar; |
| 133 |
|
| 134 |
|
| 135 |
beginchar(1, 0, .5nhh#, .5nhh#); "filled diamond"; |
| 136 |
x1:=0.5greg_min_diam+hlthick; x3=gregwidth-x1; x2=x4=0.5gregwidth; |
| 137 |
y1=y3=0; y2=-y4=0.5diamheight; |
| 138 |
pickup pencircle scaled lthick; |
| 139 |
fill z1--z2--z3--z4--cycle; |
| 140 |
draw z1--z2--z3--z4--cycle; |
| 141 |
penlabels (1,2,3,4); |
| 142 |
endchar; |
| 143 |
|
| 144 |
beginchar(2, 0, .5nhh#, .5nhh#); "filled diamond aucta"; |
| 145 |
x1:=0.5greg_min_diam+hlthick; x3=gregwidth-x1; x2=x4=0.5gregwidth; |
| 146 |
y1=y3=0; y2=-y4=0.5diamheight; |
| 147 |
x5=x1+hlthick; y5=1.5y4; |
| 148 |
pickup pencircle scaled lthick; |
| 149 |
fill z1--z2--z3{sw+down}..{left+0.3up}z5--z5{right}..z4--cycle; |
| 150 |
draw z1--z2--z3{sw+down}..{left+0.3up}z5--z5{right}..z4--cycle; |
| 151 |
penlabels (1,2,3,4,5); |
| 152 |
endchar; |
| 153 |
|
| 154 |
beginchar(3, 0, .5nhh#, .5nhh#); "apostropha"; |
| 155 |
x1:=0.5greg_min_diam+hlthick; x3=gregwidth-x1; x2=x4+0.1gregwidth=0.5gregwidth; |
| 156 |
y1=y3=0; y2=0.5gregwidth+0.5greg_min_diam-hlthick; |
| 157 |
y4=-y2-0.2gregwidth; |
| 158 |
pickup pencircle scaled lthick; |
| 159 |
fill z1--z2--z3{left+1.5down}..{left+0.6down}z4--z4{right+2up}..{left+0.1up}cycle; |
| 160 |
draw z1--z2--z3{left+1.5down}..{left+0.6down}z4--z4{right+2up}..{left+0.1up}cycle; |
| 161 |
penlabels (1,2,3,4); |
| 162 |
endchar; |
| 163 |
|
| 164 |
beginchar(4, 0, .5nhh#, .5nhh#); "filled diamond deminutae"; |
| 165 |
x1:=0.5greg_min_diam*deminutae+hlthick; |
| 166 |
x3=gregwidth_dem-x1; x2=x4=0.5gregwidth_dem; |
| 167 |
y1=y3=0; y2=-y4=0.5diamheight*deminutae; |
| 168 |
pickup pencircle scaled lthick; |
| 169 |
fill z1--z2--z3--z4--cycle; |
| 170 |
draw z1--z2--z3--z4--cycle; |
| 171 |
penlabels (1,2,3,4); |
| 172 |
endchar; |
| 173 |
|
| 174 |
beginchar(5, 0, .5nhh#, .5nhh#); "gregorian punctum"; |
| 175 |
x1=x4=hlthick; x2=x3=gregwidth+hlthick; y1=y2=-y3=-y4=.5gregwidth-hlthick; |
| 176 |
pickup pencircle scaled lthick; |
| 177 |
fill z1{dir greguangle}..z2--z3..{dir gregrlangle}z4--cycle; |
| 178 |
draw z1{dir greguangle}..z2--z3..{dir gregrlangle}z4--cycle; |
| 179 |
shift_pic(0,-hlthick); |
| 180 |
savepic; |
| 181 |
penlabels (1,2,3,4); |
| 182 |
endchar; |
| 183 |
|
| 184 |
beginchar(13, 0, .5nhh#, .5nhh#); "mirrored gregorian punctum"; |
| 185 |
callpic; |
| 186 |
mirror(origin, right); |
| 187 |
endchar; |
| 188 |
|
| 189 |
beginchar(6, 0, .5nhh#, .5nhh#); "gregorian virga left"; |
| 190 |
callpic; |
| 191 |
fill_square (lthick, 1.5nhh,(0, -1.5nhh)); |
| 192 |
endchar; |
| 193 |
|
| 194 |
beginchar(7, 0, .5nhh#, .5nhh#); "gregorian virga right"; |
| 195 |
callpic; |
| 196 |
fill_square (lthick, 1.5nhh,(gregwidth, -1.5nhh)); |
| 197 |
endchar; |
| 198 |
|
| 199 |
beginchar(8, 0, .5nhh#, .5nhh#); "gregorian punctum aucta down"; |
| 200 |
x1=x4=hlthick; x2=x3=gregwidth+hlthick; |
| 201 |
y1=y2+aucta_fact=-y3-aucta_fact=-y4=.5gregwidth-hlthick; |
| 202 |
pickup pencircle scaled lthick; |
| 203 |
fill z1{dir greguangle}..z2--z3..{dir gregrlangle}z4--cycle; |
| 204 |
draw z1{dir greguangle}..z2--z3..{dir gregrlangle}z4--cycle; |
| 205 |
shift_pic(0,-hlthick); |
| 206 |
savepic; |
| 207 |
penlabels (1,2,3,4); |
| 208 |
endchar; |
| 209 |
|
| 210 |
beginchar(9, 0, .5nhh#, .5nhh#); "gregorian punctum aucta up"; |
| 211 |
callpic; |
| 212 |
mirror(origin,right); |
| 213 |
endchar; |
| 214 |
|
| 215 |
beginchar(10, 0, .5nhh#, .5nhh#); "oriscus"; |
| 216 |
x1=x4=hlthick; x2=x3=gregwidth+hlthick; y1=y2=-y3=-y4=.5gregwidth-hlthick; |
| 217 |
pickup pencircle scaled lthick; |
| 218 |
fill z1{dir orisuangle}..{dir orisuangle}z2--z3{dir orisruangle}..{dir orisruangle}z4--cycle; |
| 219 |
draw z1{dir orisuangle}..{dir orisuangle}z2--z3{dir orisruangle}..{dir orisruangle}z4--cycle; |
| 220 |
penlabels (1,2,3,4); |
| 221 |
endchar; |
| 222 |
|
| 223 |
beginchar(11, 0, .5nhh#, .5nhh#); "apostropha aucta"; |
| 224 |
x1:=0.5greg_min_diam+hlthick; x3=gregwidth-x1; x2=x4=0.5gregwidth; |
| 225 |
y1=y3=0; y2=0.5gregwidth+0.5greg_min_diam-hlthick; |
| 226 |
y4=-y2-0.2gregwidth; y5=y4; x5=x1; |
| 227 |
pickup pencircle scaled lthick; |
| 228 |
fill z1--z2--z3{left+1.5down}..{left+0.6down}z4..z5--z5{right}..{left+0.1up}cycle; |
| 229 |
draw z1--z2--z3{left+1.5down}..{left+0.6down}z4..z5--z5{right}..{left+0.1up}cycle; |
| 230 |
penlabels (1,2,3,4,5); |
| 231 |
endchar; |
| 232 |
|
| 233 |
beginchar(12, 0, .5nhh#, .5nhh#); "small gregorian punctum"; |
| 234 |
x1=x4=hlthick; x2=x3=smallgreg*gregwidth+hlthick; |
| 235 |
y1=y2=-y3=-y4=.5smallgreg*gregwidth-hlthick; |
| 236 |
pickup pencircle scaled lthick; |
| 237 |
fill z1{dir greguangle}..z2--z3..{dir gregrlangle}z4--cycle; |
| 238 |
draw z1{dir greguangle}..z2--z3..{dir gregrlangle}z4--cycle; |
| 239 |
shift_pic(0,-hlthick); |
| 240 |
savepic; |
| 241 |
endchar; |
| 242 |
|
| 243 |
beginchar(14, 0, .5nhh#, .5nhh#); "mirrored small gregorian punctum"; |
| 244 |
callpic; |
| 245 |
mirror(origin, right); |
| 246 |
endchar; |
| 247 |
|
| 248 |
beginchar(15, gregwidth#, .5nhh#, .5nhh#); "podatus bottom"; |
| 249 |
fill_square(gregwidth+lthick, gregwidth, (0, -0.5gregwidth)); |
| 250 |
endchar; |
| 251 |
|
| 252 |
beginchar(16, gregwidth#, .5nhh#, .5nhh#); "small podatus bottom"; |
| 253 |
fill_square(gregwidth+lthick, gregwidth-shave, (0, -0.5gregwidth)); |
| 254 |
endchar; |
| 255 |
|
| 256 |
beginchar(17, 0, .5nhh#, .5nhh#); "gregorian punctum shaved bottom"; |
| 257 |
x1=x4=hlthick; x2=x3=gregwidth+hlthick; y1=y2=-y3+shave=-y4+shave=.5gregwidth-hlthick; |
| 258 |
pickup pencircle scaled lthick; |
| 259 |
fill z1{dir greguangle}..z2--z3..{dir gregrlangle}z4--cycle; |
| 260 |
draw z1{dir greguangle}..z2--z3..{dir gregrlangle}z4--cycle; |
| 261 |
shift_pic(0,-hlthick); |
| 262 |
savepic; |
| 263 |
penlabels (1,2,3,4); |
| 264 |
endchar; |
| 265 |
|
| 266 |
def square (expr mw)= |
| 267 |
fill_square (sqrt(2)*.5mw, max(1,thin), origin) rotated -45; |
| 268 |
fill_square (sqrt(2)*.5mw, .15nhw, (0,-.15nhw)) rotated 45; |
| 269 |
save_elempic; |
| 270 |
mirror (origin,up); |
| 271 |
mirror (origin,left); |
| 272 |
shift_pic (mw+.5,0); |
| 273 |
add_elempic(0,0); |
| 274 |
% mirror (origin,right);% I've seen this too, somewhere ... |
| 275 |
enddef; |
| 276 |
|
| 277 |
beginchar(118, 0, .5nhh#, .5nhh#); "deep porrectus"; |
| 278 |
x1=x4=0; x2=x3=3*gregwidth+lthick; |
| 279 |
y1=-y4=.5gregwidth-lthick; y2=y1-2nhh; y3=y4-2nhh; |
| 280 |
z5=z1+(0,0.3gregwidth); |
| 281 |
fill z5..{right+0.4down}z2--z3{left+0.4up}..z4--cycle; shift_pic(0,hlthick); |
| 282 |
fill_square (med, 1.5nhh,(0, -2nhh)); |
| 283 |
penlabels (1,2,3,4,5); |
| 284 |
endchar; |
| 285 |
|
| 286 |
beginchar(119, 0, .5nhh#, .5nhh#); "low porrectus"; |
| 287 |
x1=x4=0; x2=x3=3*gregwidth+lthick; |
| 288 |
y1=-y4=.5gregwidth-lthick; y2=y1-1.5nhh; y3=y4-1.5nhh; |
| 289 |
z5=z1+(0,0.2gregwidth); |
| 290 |
fill z1..{right+0.4down}z2--z3{left+0.4up}..z4--cycle; shift_pic(0,hlthick); |
| 291 |
fill_square (med, 1.5nhh,(0, -2nhh)); |
| 292 |
penlabels (1,2,3,4,5); |
| 293 |
endchar; |
| 294 |
|
| 295 |
beginchar(120, 0, .5nhh#, .5nhh#); "porrectus"; |
| 296 |
x1=x4=0; x2=x3=3*gregwidth+lthick; |
| 297 |
y1=-y4=.5gregwidth-lthick; y2=y1-nhh; y3=y4-nhh; |
| 298 |
z5=z1+(0,0.1gregwidth); |
| 299 |
fill z5..{right}z2--z3{left}..z4--cycle; shift_pic(0,hlthick); |
| 300 |
fill_square (med, 1.5nhh,(0, -1.5nhh)); |
| 301 |
penlabels (1,2,3,4,5); |
| 302 |
endchar; |
| 303 |
|
| 304 |
beginchar(121, 0, .5nhh#, .5nhh#); "soft porrectus"; |
| 305 |
x1=x4=0; x2=x3=3*gregwidth+lthick; |
| 306 |
y1=-y4=.5gregwidth-lthick; y2=y1-0.5nhh; y3=y4-0.5nhh; |
| 307 |
z5=z1+(0,0.1gregwidth); |
| 308 |
fill z5..{right}z2--z3{left}..z4--cycle; shift_pic(0,hlthick); |
| 309 |
fill_square (med, 1.5nhh,(0, -1.5nhh)); |
| 310 |
penlabels (1,2,3,4,5); |
| 311 |
endchar; |
| 312 |
|
| 313 |
def quilisma(expr ymidtop, ymidbot) = |
| 314 |
ydiff:=0.15gregwidth; |
| 315 |
qdecalage:=.2*gregwidth; |
| 316 |
ydepth:=0.25gregwidth; |
| 317 |
x1=x14=-qdecalage+hlthick; |
| 318 |
x7=x8=gregwidth+hlthick; |
| 319 |
y1+ydiff-0.5ydepth=ymidtop=y7-ydiff-0.5ydepth; |
| 320 |
y14+ydiff-0.5ydepth=ymidbot=y8-ydiff-0.5ydepth; |
| 321 |
3x3=2x1+x7; 3x5=x1+2x7; |
| 322 |
3y3=2y1+y7; 3y5=y1+2y7; |
| 323 |
2x2=x1+x3; 2x4=x3+x5; 2x6=x5+x7; |
| 324 |
2y2=y1+y3-2ydepth; 2y4=y3+y5-2ydepth; 2y6=y5+y7-2ydepth; |
| 325 |
3x12=2x14+x8; 3x10=x14+2x8; |
| 326 |
3y12=2y14+y8; 3y10=y14+2y8; |
| 327 |
2x13=x14+x12; 2x11=x12+x10; 2x9=x10+x8; |
| 328 |
2y13=y14+y12-2ydepth; 2y11=y12+y10-2ydepth; 2y9=y10+y8-2ydepth; |
| 329 |
|
| 330 |
pickup line_pen; |
| 331 |
|
| 332 |
|
| 333 |
draw z1{down+0.1right}..z2..z3..z4..z5..z6..{up+0.1right}z7--z8{down}..z9..z10..z11..z12..z13..{up+0.1left}z14--cycle; |
| 334 |
fill z1{down+0.1right}..z2..z3..z4..z5..z6..{up+0.1right}z7--z8{down}..z9..z10..z11..z12..z13..{up+0.1left}z14--cycle; |
| 335 |
shift_pic(0,-hlthick); |
| 336 |
enddef; |
| 337 |
|
| 338 |
beginchar(125, 0, .5nhh#, .5nhh#); "quilisma"; |
| 339 |
quilisma(0.5gregwidth-hlthick, -0.5gregwidth+hlthick); |
| 340 |
endchar; |
| 341 |
|
| 342 |
beginchar(126, 0, .5nhh#, .5nhh#); "bottom quilisma"; |
| 343 |
quilisma(0.5gregwidth-hlthick-0.8shave, -0.5gregwidth+hlthick); |
| 344 |
endchar; |
| 345 |
|
| 346 |
%%%%%%% |
| 347 |
message ("<clefs>"); |
| 348 |
%%%%%%% |
| 349 |
keygregwidth:=0.5*sqrt(2)*nhw; |
| 350 |
|
| 351 |
beginchar(98, 8/3nhw#, 3.25nhh#, 0); "gregorian C clef"; |
| 352 |
x1=x4=0; x2=x3=keygregwidth; y1=y2=-y3=-y4=.5keygregwidth-lthick; |
| 353 |
fill z1{dir 15}..z2--z3{dir 165}..z4--cycle; |
| 354 |
save_elempic; |
| 355 |
pickup med_pen; draw bot rt z1..{down}(-.01nhw,-.5nhh); |
| 356 |
shift_pic(nhw,2.5nhh); |
| 357 |
add_mirror ((0,2nhh),(1,2nhh)); |
| 358 |
savepic; |
| 359 |
shift_pic (0,-2nhh); |
| 360 |
endchar; |
| 361 |
|
| 362 |
beginchar(122, 8/3nhw#, 4.25nhh#, 0); "gregorian F clef"; |
| 363 |
callpic; |
| 364 |
add_elempic (.1nhw+0.5med,2nhh); |
| 365 |
fill_square (med, 1.5nhh, (.75nhw,.8nhh)); |
| 366 |
shift_pic (1/3nhw,-2nhh); |
| 367 |
endchar; |
| 368 |
|
| 369 |
end |