-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmuscript.ps
More file actions
623 lines (573 loc) · 23 KB
/
muscript.ps
File metadata and controls
623 lines (573 loc) · 23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
%%BeginResource: procset muscript
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This Postscript is Copyright (c) 2016, Peter J Billam %
% Permission is granted to any individual or institution to use, copy, %
% modify or redistribute this software, so long as it is not resold for %
% profit, and provided this notice is retained. It is provided "as is", %
% without any express or implied warranty. http://www.pjb.com.au %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
/blackblob { % usage: x y staveheight blackblob
gsave 3 1 roll translate
dup 0.17 mul exch 0.113 mul scale newpath
0 0 1 0 360 arc fill grestore
} bind def
/whiteblob { % usage: x y staveheight whiteblob
gsave 3 1 roll translate 0.14 setlinewidth
dup 0.183 mul exch 0.122 mul scale newpath
0 0 1 280 30 arc fill 0 0 1 100 210 arc fill
0 0 1 0 360 arc stroke grestore
} bind def
/breve { % usage: x y staveheight breve
gsave 3 1 roll translate 0.183 mul dup scale newpath
0.1 setlinewidth -1.2 -1 moveto -1.2 1 lineto 1.2 -1 moveto
1.2 1 lineto stroke newpath 0.3 setlinewidth
-1.2 -0.4 moveto 1.2 -0.4 lineto -1.2 0.4 moveto 1.2 0.4 lineto
stroke grestore
} bind def
/dot { % usage: x y staveheight dot
gsave 3 1 roll translate dup scale newpath
0 0 0.04 0 360 arc fill grestore
} bind def
/doubledot { % usage: x y staveheight doubledot
gsave 3 1 roll translate dup scale newpath
0 0 0.04 0 360 arc fill newpath 0.2 0 0.04 0 360 arc fill grestore
} bind def
/tripledot { % usage: x y staveheight tripledot 3.3c
gsave 3 1 roll translate dup scale newpath
0 0 0.04 0 360 arc fill newpath 0.2 0 0.04 0 360 arc fill
newpath 0.4 0 0.04 0 360 arc fill grestore
} bind def
/stave { % usage: x_left x_right y_topline staveheight stave
10 dict begin
[ /staveheight /first /x_right /x_left ] { exch def } forall
/second first staveheight 0.25 mul sub def
/third first staveheight 0.5 mul sub def
/fourth first staveheight 0.75 mul sub def
/fifth first staveheight sub def
.015 staveheight mul setlinewidth newpath
x_left first moveto x_right first lineto
x_left second moveto x_right second lineto
x_left third moveto x_right third lineto
x_left fourth moveto x_right fourth lineto
x_left fifth moveto x_right fifth lineto stroke
end
} bind def
/ledger { % usage: x y staveheight ledger
5 dict begin
[ /staveheight /y /x ] { exch def } forall
/x_left x staveheight 0.28 mul sub def
/x_right x staveheight 0.28 mul add def
.015 staveheight mul setlinewidth
newpath x_left y moveto x_right y lineto stroke
end
} bind def
/barline { % usage: x y_top y_bot staveheight barline
3 dict begin
0.02 mul setlinewidth [ /y_bot /y_top /x ] { exch def } forall
newpath x y_bot moveto x y_top lineto stroke
end
} bind def
/notestem { % usage: x y_top y_bot staveheight notestem
3 dict begin
0.02 mul setlinewidth [ /y_bot /y_top /x ] { exch def } forall
newpath x y_bot moveto x y_top lineto stroke
end
} bind def
/quaverstemup { % usage: x y_top y_bot staveheight quaverstemup
4 dict begin
[ /staveheight /y_bot /y_top /x ] { exch def } forall
staveheight 0.02 mul setlinewidth
newpath x y_bot moveto x y_top lineto stroke
gsave x y_top translate staveheight dup 0.85 mul scale
quavertail grestore
end
} bind def
/quaverstemdown { % usage: x y_top y_bot staveheight quaverstemdown
4 dict begin
[ /staveheight /y_bot /y_top /x ] { exch def } forall
staveheight 0.02 mul setlinewidth
newpath x y_bot moveto x y_top lineto stroke
gsave x y_bot translate staveheight 1.2 mul -0.8 staveheight mul scale
quavertail grestore
end
} bind def
/quavertail {
newpath 0 0 moveto 0 -0.10 0 -0.14 0.17 -0.33 curveto
0.27 -0.40 0.25 -0.70 0.15 -0.80 curveto
0.23 -0.70 0.24 -0.38 0 -0.28 curveto closepath fill
} bind def
/beam { % usage: x_mid_left y_mid_left x_mid_right y_mid_right staveheight beam
6 dict begin
[/staveheight /y_mid_right /x_mid_right /y_mid_left /x_mid_left ]
{exch def} forall
/halfbeamwidth staveheight 0.13 mul 0.5 mul def
newpath
x_mid_left y_mid_left halfbeamwidth add moveto
x_mid_left y_mid_left halfbeamwidth sub lineto
x_mid_right y_mid_right halfbeamwidth sub lineto
x_mid_right y_mid_right halfbeamwidth add lineto
closepath fill
end
} bind def
/tremolando { % usage: n x_mid y_mid staveheight tremolando
10 dict begin
[ /staveheight_t /y_mid /x_mid /n ] { exch def } forall
/dy staveheight_t 0.13 mul def /dx dy 1.6 mul def
n 1 eq {
x_mid dx sub y_mid dy sub x_mid dx add y_mid dy add
staveheight_t 0.85 mul beam
} if
n 2 eq {
x_mid dx sub y_mid dy 0.0 mul add x_mid dx add y_mid dy 1.4 mul add
staveheight_t 0.75 mul beam
x_mid dx sub y_mid dy 1.4 mul sub x_mid dx add y_mid dy 0.0 mul sub
staveheight_t 0.75 mul beam
} if
n 3 eq {
/dy dy 0.7 mul def
x_mid dx sub y_mid dy 0.6 mul add x_mid dx add y_mid dy 2.6 mul add
staveheight_t 0.5 mul beam
x_mid dx sub y_mid dy sub x_mid dx add y_mid dy add
staveheight_t 0.5 mul beam
x_mid dx sub y_mid dy 2.6 mul sub x_mid dx add y_mid dy 0.6 mul sub
staveheight_t 0.5 mul beam
} if
end
} bind def
/bracket { % usage: x y_top y_bot staveheight bracket
5 dict begin
[ /staveheight /y_bot /y_top /x ] { exch def } forall
staveheight .125 mul setlinewidth
newpath x y_top moveto x y_bot lineto stroke
staveheight .03 mul setlinewidth
/radius staveheight .25 mul def
newpath x y_top radius add radius 270 350 arc stroke
newpath x y_bot radius sub radius 10 90 arc stroke
end
} bind def
/repeatmark { % usage: x y_top staveheight repeatmark
3 dict begin
[ /staveheight /y_top /x ] { exch def } forall
gsave x y_top staveheight 0.375 mul sub translate
staveheight staveheight scale
newpath 0 0 0.06 0 360 arc fill grestore
gsave x y_top staveheight 0.625 mul sub translate
staveheight staveheight scale
newpath 0 0 0.06 0 360 arc fill grestore
end
} bind def
/bassclef { % usage: x y_top staveheight bassclef
4 dict begin
[ /staveheight /y_top /x ] { exch def } forall
/y_f y_top staveheight 0.25 mul sub def x y_f staveheight f_clef
end
} bind def
/bass8vaclef { % usage: x y_top staveheight bass8vaclef
4 dict begin
[ /staveheight /y_top /x ] { exch def } forall
/Times-Italic findfont staveheight 0.58 mul scalefont setfont
x staveheight 0.15 mul sub y_top staveheight 0.05 mul add moveto (8) show
/y_f y_top staveheight 0.25 mul sub def x y_f staveheight f_clef
end
} bind def
/bass8vabclef { % usage: x y_top staveheight bass8vabclef
4 dict begin
[ /staveheight /y_top /x ] { exch def } forall
/Times-Italic findfont staveheight 0.58 mul scalefont setfont
x staveheight 0.2 mul sub y_top staveheight 1.18 mul sub moveto (8) show
/y_f y_top staveheight 0.25 mul sub def x y_f staveheight f_clef
end
} bind def
/f_clef { % usage: x y_f staveheight f_clef
% gsave x y_f translate staveheight staveheight scale
gsave 3 1 roll translate dup scale % 2.4f
newpath .27 .15 .04 0 360 arc fill newpath .27 -.10 .04 0 360 arc fill
newpath -.214 0 0.086 0 360 arc fill newpath % start at left
-.3 0 moveto -.3 .18 -.23 .25 -.07 .25 curveto
-.07 .23 lineto -.21 .23 -.26 .16 -.21 0 curveto
closepath fill newpath % start at top
-.07 .25 moveto .11 .25 .18 .11 .18 -.07 curveto
.07 -.07 lineto .07 .11 0 .23 -.07 .23 curveto
closepath fill newpath % start at right
.18 -.07 moveto .18 -.25 .01 -.49 -.29 -.59 curveto
-.3 -.58 lineto -.08 -.51 .07 -.25 .07 -.07 curveto
closepath fill newpath -.3 -.58 0.02 0 360 arc fill grestore
} bind def
/tenorclef { % usage: x y_top staveheight tenorclef
4 dict begin
[ /staveheight /y_top /x ] { exch def } forall
/y_2nd y_top staveheight 0.25 mul sub def x y_2nd staveheight c_clef
end
} bind def
/altoclef { % usage: x y_top staveheight altoclef
4 dict begin
[ /staveheight /y_top /x ] { exch def } forall
/y_mid y_top staveheight 0.5 mul sub def x y_mid staveheight c_clef
end
} bind def
/c_clef { % usage: x y_middle_c staveheight c_clef
3 dict begin
[ /staveheight /y_middle_c /x ] { exch def } forall
gsave x y_middle_c translate staveheight staveheight scale
newpath .09 setlinewidth -.18 .5 moveto -.18 -.5 lineto stroke
newpath .024 setlinewidth -.075 .5 moveto -.075 -.5 lineto stroke
newpath -.07 0 moveto .07 .24 lineto .03 0 lineto .07 -.24 lineto
closepath fill tophalf 1 -1 scale tophalf grestore
end
} bind def
/tophalf {
newpath .028 setlinewidth .07 .24 moveto .07 .08 .13 .08 .16 .08 curveto
stroke newpath .07 .39 .055 0 360 arc fill newpath .015 .39 moveto
.015 .46 .05 .49 .19 .49 curveto .12 .469 lineto
.07 .469 .05 .43 .05 .39 curveto closepath fill newpath .19 .49 moveto
.23 .49 .30 .43 .30 .28 curveto .30 .14 .21 .066 .16 .066 curveto
.16 .094 lineto .21 .094 .21 .28 .21 .28 curveto
.21 .43 .19 .469 .12 .469 curveto closepath fill
} bind def
/trebleclef { % usage: x y_top staveheight trebleclef
4 dict begin
[ /staveheight /y_top /x ] { exch def } forall
/y_g y_top staveheight 0.75 mul sub def x y_g staveheight g_clef
end
} bind def
/treble8vaclef { % usage: x y_top staveheight treble8vaclef
4 dict begin
[ /staveheight /y_top /x ] { exch def } forall
/Times-Italic findfont staveheight 0.58 mul scalefont setfont
x staveheight 0.15 mul add y_top staveheight 0.3 mul add moveto (8) show
/y_g y_top staveheight 0.75 mul sub def x y_g staveheight g_clef
} bind def
/treble8vabclef { % usage: x y_top staveheight treble8vabclef
4 dict begin
[ /staveheight /y_top /x ] { exch def } forall
/Times-Italic findfont staveheight 0.58 mul scalefont setfont
x staveheight 0.05 mul add y_top staveheight 1.5 mul sub moveto (8) show
/y_g y_top staveheight 0.75 mul sub def x y_g staveheight g_clef
} bind def
/g_clef { % usage: x y_g staveheight g_clef
% gsave x y_g translate staveheight staveheight scale
gsave 3 1 roll translate dup scale % 2.4f
% start at bottom left blob ...
newpath -.17 -.479 .086 0 360 arc fill
newpath
-.256 -.479 moveto -.256 -.58 -.17 -.643 -.12 -.643 curveto
-.12 -.617 lineto -.21 -.622 -.13 -.58 -.21 -.479 curveto
closepath fill
newpath .026 setlinewidth
-.12 -.63 moveto .07 -.63 .11 -.48 .10 -.4 curveto -.05 .75 lineto stroke
newpath % from left of top loop
-.062 .751 moveto -.1 1.1 .06 1.18 .10 1.19 curveto % top
.125 1.12 lineto .06 1.09 -.084 1.05 -.038 .749 curveto
closepath fill
newpath % start at top
.10 1.19 moveto .36 .55 -.27 .45 -.27 .10 curveto % inside of left extreme
-.3 .16 lineto -.3 .6 .25 .65 .125 1.12 curveto
closepath fill
newpath % start at left
-.3 .16 moveto -.3 -.15 -.15 -.23 .02 -.23 curveto
.02 -.21 lineto -.15 -.21 -.27 -.15 -.27 .10 curveto
closepath fill
newpath % start at bottom
.02 -.23 moveto .2 -.23 .30 -.12 .30 .04 curveto % right extreme
.265 .04 lineto .27 -.11 .2 -.21 .02 -.21 curveto
closepath fill
newpath
.30 .04 moveto .30 .16 .17 .28 .07 .28 curveto % top of body
.07 .19 lineto .17 .19 .26 .16 .265 .04 curveto
closepath fill
newpath % start at top of body
.07 .28 moveto -.15 .28 -.15 .05 -.05 -.05 curveto % end
-.10 .05 -.08 .19 .07 .19 curveto
closepath fill
grestore
} bind def
/timesig { % usage (eg. for 6/8): x y_top staveheight (6) (8) timesig
4 dict begin
[ /botnum /topnum /staveheight /y_top /x ] { exch def } forall
gsave /Times-Bold findfont staveheight 0.6 mul scalefont setfont
x topnum stringwidth pop 0.5 mul sub y_top staveheight 0.45 mul sub moveto
topnum show
x botnum stringwidth pop 0.5 mul sub y_top staveheight 0.95 mul sub moveto
botnum show grestore
end
} bind def
/sharp { % usage: x y staveheight sharp
gsave 3 1 roll translate dup scale newpath
0.07 setlinewidth -0.13 0.02 moveto 0.13 0.12 lineto
-0.13 -0.12 moveto 0.13 -0.02 lineto stroke newpath
0.03 setlinewidth -0.065 -0.3 moveto -0.065 0.24 lineto
0.065 -0.24 moveto 0.065 0.28 lineto stroke grestore
} bind def
/natural { % usage: x y staveheight natural
gsave 3 1 roll translate dup scale newpath
0.07 setlinewidth -0.09 0.04 moveto 0.09 0.15 lineto
-0.09 -0.15 moveto 0.09 -0.04 lineto stroke
newpath 0.03 setlinewidth -0.09 -0.15 moveto -0.09 0.3 lineto
0.09 -0.3 moveto 0.09 0.15 lineto stroke grestore
} bind def
/flat { % usage: x y staveheight flat
gsave 3 1 roll translate dup scale newpath
0.03 setlinewidth -0.07 0.45 moveto -0.07 -0.15 lineto stroke
newpath 0.05 setlinewidth
-0.07 -0.15 moveto 0.15 0 0.3 0.2 -0.07 0.08 curveto stroke grestore
} bind def
/doublesharp { % usage: x y staveheight doublesharp
gsave 3 1 roll translate dup scale newpath
-.13 -.13 moveto -.11 -.03 lineto -.03 -.02 lineto
-.03 .02 lineto -.11 .03 lineto
-.13 .13 lineto -.03 .11 lineto -.02 .03 lineto
.02 .03 lineto .03 .11 lineto
.13 .13 lineto .11 .03 lineto .03 .02 lineto
.03 -.02 lineto .11 -.03 lineto
.13 -.13 lineto .03 -.11 lineto .02 -.03 lineto
-.02 -.03 lineto -.03 -.11 lineto
closepath fill grestore
} bind def
/hemidemisemiquaverrest { % x y staveheight hemidemisemiquaverrest 3.2m
gsave 3 1 roll translate dup scale 0.03 setlinewidth
newpath -0.10 0.180 0.048 0 360 arc fill
newpath 0.03 0.37 0.22 245 295 arc -0.02 -0.29 lineto stroke
newpath -0.107 0.065 0.048 0 360 arc fill
newpath -0.00 0.27 0.22 245 295 arc stroke
newpath -0.120 -0.060 0.048 0 360 arc fill
newpath -0.03 0.135 0.21 245 292 arc stroke
newpath -0.131 -0.175 0.048 0 360 arc fill
newpath -0.05 0.02 0.20 245 290 arc stroke grestore
} bind def
/demisemiquaverrest { % usage: x y staveheight demisemiquaverrest
gsave 3 1 roll translate dup scale 0.03 setlinewidth
newpath -0.09 0.18 0.048 0 360 arc fill
newpath 0.02 0.37 0.22 245 295 arc -0.01 -0.21 lineto stroke
newpath -0.10 0.065 0.048 0 360 arc fill
newpath -0.00 0.275 0.22 245 295 arc stroke
newpath -0.11 -0.065 0.048 0 360 arc fill
newpath -0.03 0.135 0.21 245 292 arc stroke grestore
} bind def
/semiquaverrest { % usage: x y staveheight semiquaverrest
gsave 3 1 roll translate dup scale 0.03 setlinewidth
newpath -0.09 0.07 0.05 0 360 arc fill
newpath 0.03 0.29 0.25 245 290 arc -0.02 -0.22 lineto stroke
newpath -0.11 -0.07 0.05 0 360 arc fill
newpath -0.01 0.14 0.22 245 285 arc stroke grestore
} bind def
/quaverrest { % usage: x y staveheight quaverrest
gsave 3 1 roll translate dup scale 0.035 setlinewidth
newpath -0.10 0.08 0.05 0 360 arc fill
newpath 0.02 0.29 0.24 245 290 arc -0.03 -0.2 lineto stroke
grestore
} bind def
/crochetrest { % usage: x y staveheight crochetrest
gsave 3 1 roll translate dup scale newpath
newpath 0.04 setlinewidth -0.1 0.3 moveto 0.1 0.1 lineto stroke
newpath 0.08 setlinewidth 0.03 0.17 moveto -0.07 0.07 lineto stroke
newpath 0.04 setlinewidth -0.098 0.098 moveto 0.08 -0.08 lineto
-0.1 -0.05 -0.2 -0.24 0.08 -0.3 curveto stroke grestore
} bind def
/minimrest { % usage: x y staveheight minimrest
gsave 3 1 roll translate dup scale newpath
0.07 setlinewidth -0.1 0.035 moveto 0.1 0.035 lineto stroke grestore
} bind def
/smbrest { % usage: x y staveheight smbrest
gsave 3 1 roll translate dup scale newpath
0.09 setlinewidth -0.13 -0.045 moveto 0.13 -0.045 lineto stroke grestore
} bind def
/breverest { % usage: x y staveheight breverest
gsave 3 1 roll translate dup scale newpath
0.25 setlinewidth -0.07 0.125 moveto 0.07 0.125 lineto stroke grestore
} bind def
/rightshow where { pop } { % might also be set by text.ps ...
/rightshow { % usage: x y font fontsize (string) rightshow
5 dict begin
[ /s /fontsize /font /y /x ] { exch def } forall
gsave font findfont fontsize scalefont setfont
% x s stringwidth pop sub y % bad pop! (woosh-fonts...)
x s stringwidth 3 1 roll % ys x xs
sub exch % xfinal ys
y exch sub
moveto s show grestore
end
} bind def
/leftshow { % usage: x y font fontsize (string) leftshow
5 dict begin
[ /s /fontsize /font /y /x ] { exch def } forall
gsave font findfont fontsize scalefont setfont
x y moveto s show grestore
end
} bind def
/centreshow { % usage: x y font fontsize (string) centreshow
3 dict begin
[ /s /fontsize /font ] { exch def } forall
gsave moveto font findfont fontsize scalefont setfont
gsave s false charpath flattenpath pathbbox grestore
exch 4 -1 roll pop pop s stringwidth pop -0.5 mul % dx/2
3 1 roll sub 0.5 mul % dy/2
rmoveto s show grestore
end
} bind def
/centrexshow { % usage: x y font fontsize (string) centrexshow
7 dict begin
[ /s /fontsize /font /y /x ] { exch def } forall
gsave font fontsize selectfont
s stringwidth /s_height exch def /s_width exch def % 2D! 20160607
x s_width 0.5 mul sub y s_height 0.5 mul sub moveto s show grestore
end
} bind def
} ifelse
/barnumber { % usage: x y staveheight (string) barnumber
5 dict begin
[ /s /staveheight /y /x ] { exch def } forall
gsave /Helvetica-Bold findfont staveheight 0.6 mul scalefont setfont
x s stringwidth pop 0.5 mul sub y moveto
s show grestore
end
} bind def
/crescendo { % usage: x_left y_left x_right y_right staveheight crescendo
5 dict begin
[ /staveheight /y_right /x_right /y_left /x_left ] {exch def} forall
.015 staveheight mul setlinewidth newpath
x_right y_right staveheight 0.13 mul add moveto x_left y_left lineto
x_right y_right staveheight 0.13 mul sub lineto stroke
end
} bind def
/diminuendo { % usage: x_left y_left x_right y_right staveheight diminuendo
5 dict begin
[ /staveheight /y_right /x_right /y_left /x_left ] { exch def } forall
.015 staveheight mul setlinewidth newpath
x_left y_left staveheight 0.13 mul add moveto x_right y_right lineto
x_left y_left staveheight 0.13 mul sub lineto stroke
end
} bind def
/slur { % usage: x_l y_l x_r y_r updown staveheight slur updown is +1 or -1
15 dict begin
[ /staveheight /updown /y_r /x_r /y_l /x_l ] { exch def } forall
/dx x_r x_l sub def /dy y_r y_l sub def
dx staveheight 2.0 mul lt { % short round tie
/x_lmid x_l x_l add x_r add 0.3333 mul def
/y_lmid y_l y_l add y_r add 0.3333 mul def
/x_rmid x_l x_r add x_r add 0.3333 mul def
/y_rmid y_l y_r add y_r add 0.3333 mul def
/dy_top staveheight 0.37 mul updown mul def
/dy_bot staveheight 0.30 mul updown mul def
} { % longer flatter tie
/x_lmid x_l staveheight add def
/y_lmid y_l dy staveheight mul dx div add def
/x_rmid x_r staveheight sub def
/y_rmid y_r dy staveheight mul dx div sub def
/dy_top staveheight 0.52 mul updown mul def
/dy_bot staveheight 0.46 mul updown mul def
} ifelse
newpath x_l y_l moveto
x_lmid y_lmid dy_top add x_rmid y_rmid dy_top add x_r y_r curveto
x_rmid y_rmid dy_bot add x_lmid y_lmid dy_bot add x_l y_l curveto
closepath fill
end
} bind def
/fermata { % usage: x y staveheight fermata
gsave 3 1 roll translate dup scale
0 -0.11 translate
newpath 0 0 .07 0 360 arc fill
newpath -.33 -.06 moveto -.33 .41 .33 .41 .33 -.06 curveto
.31 -.06 lineto .31 .31 -.31 .31 -.31 -.06 curveto -.33 -.06 lineto fill
grestore
} bind def
/mordent { % usage: x y staveheight mordent
gsave 3 1 roll translate 0.035 mul dup scale
0.5 setlinewidth newpath -8 -2 moveto -4 2 lineto -2 -2 moveto 2 2 lineto
4 -2 moveto 8 2 lineto 0 -4 moveto 0 4 lineto stroke
newpath 1 1 moveto 2 2 lineto 5 -1 lineto 4 -2 lineto closepath fill
newpath -1 -1 moveto -2 -2 lineto -5 1 lineto -4 2 lineto closepath fill
grestore
} bind def
/trill { % usage: x y staveheight trill
1 dict begin
/staveheight exch def gsave translate 1.2 1 scale
0 0 /Times-BoldItalic-ISO staveheight 0.5 mul (tr) centreshow grestore
end
} bind def
/trsharp { % usage: x y staveheight trsharp
3 dict begin
[ /staveheight_sh /y_sh /x_sh ] { exch def } forall
x_sh y_sh staveheight_sh trill
x_sh staveheight_sh .28 mul add y_sh staveheight_sh .11 mul add
staveheight_sh 0.7 mul sharp
end
} bind def
/trflat { % usage: x y staveheight trflat
3 dict begin
[ /staveheight_trf /y_trf /x_trf ] { exch def } forall
x_trf y_trf staveheight_trf trill
x_trf staveheight_trf .28 mul add y_trf staveheight_trf .11 mul add
staveheight_trf 0.7 mul flat
end
} bind def
/trnat { % usage: x y staveheight trnat
3 dict begin
[ /staveheight_trn /y_trn /x_trn ] { exch def } forall
x_trn y_trn staveheight_trn trill
x_trn staveheight_trn .28 mul add y_trn staveheight_trn .11 mul add
staveheight_trn 0.7 mul natural
end
} bind def
/turn { % usage: x y staveheight turn
gsave 3 1 roll translate 0.8 mul dup scale
newpath .2 .09 .06 0 360 arc fill newpath .25 .15 moveto
.33 .06 .33 -.06 .23 -.13 curveto 0.1 -.13 .05 -.1 0 -.05 curveto
0 .05 lineto .05 .01 .1 -.09 .23 -.09 curveto
.28 -.05 .29 .05 .25 .13 curveto closepath fill
newpath -.2 -.09 .06 0 360 arc fill newpath -.25 -.15 moveto
-.33 -.06 -.33 .06 -.23 .13 curveto -0.1 .13 -.05 .1 0 .05 curveto
0 -.05 lineto -.05 -.01 -.1 .09 -.23 .09 curveto
-.28 .05 -.29 -.05 -.25 -.13 curveto closepath fill grestore
} bind def
/tenuto { % usage: x y staveheight tenuto
gsave 3 1 roll translate dup scale newpath 0.05 setlinewidth
-0.13 0 moveto 0.13 0 lineto stroke grestore
} bind def
/emphasis { % usage: x y staveheight emphasis
gsave 3 1 roll translate dup scale newpath 0.03 setlinewidth
-0.18 0.08 moveto 0.18 0 lineto -0.18 -0.08 lineto stroke grestore
} bind def
/segno { % usage: x y staveheight segno
gsave 3 1 roll translate 1.3 mul dup -1 mul scale 80 rotate 0 0 1 turn
newpath .03 setlinewidth 0.1 0.2 moveto -0.1 -0.2 lineto stroke
newpath -.05 0.16 .035 0 360 arc fill
newpath .05 -0.16 .035 0 360 arc fill grestore
} bind def
/upbow { % usage: x y staveheight upbow
gsave 3 1 roll translate dup scale newpath 0.03 setlinewidth
0.08 0.17 moveto 0.0 -0.19 lineto -0.08 0.17 lineto stroke grestore
} bind def
/downbow { % usage: x y staveheight downbow
gsave 3 1 roll translate dup scale newpath 0.03 setlinewidth
-0.12 -0.15 moveto -0.12 0.15 lineto stroke
0.12 -0.15 moveto 0.12 0.15 lineto stroke
newpath .10 setlinewidth -0.12 0.12 moveto 0.12 0.12 lineto stroke
grestore
} bind def
/guitar_string { % usage: n x y staveheight guitar_string
1 dict begin
/staveheight exch def gsave translate staveheight dup scale
/n exch ( ) cvs def
0 0 (Helvetica-Bold) 0.36 n centreshow
newpath 0 0 0.22 0 360 arc .042 setlinewidth stroke grestore
end
} bind def
%%EndResource
/Times-Roman findfont dup length dict begin
{ 1 index /FID ne { def } { pop pop } ifelse } forall
/Encoding ISOLatin1Encoding def currentdict
end /Times-Roman-ISO exch definefont pop
/Times-Bold findfont dup length dict begin
{ 1 index /FID ne { def } { pop pop } ifelse } forall
/Encoding ISOLatin1Encoding def currentdict
end /Times-Bold-ISO exch definefont pop
/Times-BoldItalic findfont dup length dict begin
{ 1 index /FID ne { def } { pop pop } ifelse } forall
/Encoding ISOLatin1Encoding def currentdict
end /Times-BoldItalic-ISO exch definefont pop
/Times-Italic findfont dup length dict begin
{ 1 index /FID ne { def } { pop pop } ifelse } forall
/Encoding ISOLatin1Encoding def currentdict
end /Times-Italic-ISO exch definefont pop