1 %!PS-Adobe-1.0: lily.ps
10 1 copy mul exch 1 copy mul add sqrt
13 /draw_beam % width slope thick
15 2 div /beam_thick exch def
18 beam_slope beam_wd mul /beam_ht exch def
19 0 beam_thick neg moveto
20 beam_wd beam_ht rlineto
21 0 beam_thick 2 mul rlineto
26 /draw_repeat_slash % width slope thick
31 beamthick beamthick slope div euclidean_length
35 width slope width mul rlineto
37 % width neg width angle sin mul neg rlineto
41 /draw_hairpin % width start_h end_h thick
55 /draw_tuplet % height gap dx dy thick dir
65 tuplet_dy tuplet_dx div tuplet_gapx mul /tuplet_gapy exch def
69 0 tuplet_h dir mul lineto
70 tuplet_dx tuplet_gapx sub 2 div
71 tuplet_dy tuplet_gapy sub 2 div tuplet_h dir mul add lineto
72 tuplet_dx tuplet_gapx add 2 div
73 tuplet_dy tuplet_gapy add 2 div tuplet_h dir mul add moveto
74 tuplet_dx tuplet_dy tuplet_h dir mul add lineto
75 tuplet_dx tuplet_dy lineto
79 /difficult_draw_ez_ball % ch letter_col ball_col font
82 findfont 0.7 scalefont setfont
86 0.5 0 0.5 0 360 arc closepath fill stroke
91 0.5 0 0.4 0 360 arc closepath
96 % 0.25 is empiric centering. Change to taste
102 % simple, but does it work everywhere?
104 /draw_ez_ball % ch letter_col ball_col font
107 findfont 0.85 scalefont setfont
108 /origin { 0.45 0 } def
120 % 0.25 is empiric centering. Change to taste
127 /draw_volta % h w thick vert_start vert_end
141 volta_w volta_h lineto
148 % this is for drawing slurs.
149 /draw_bezier_sandwich % thickness controls
162 /draw_dashed_line % dash thickness dx dy
173 /draw_dashed_slur % dash thickness controls
190 /traject_alpha exch def
191 traject_ds traject_alpha sin mul add
193 traject_ds traject_alpha cos mul add
204 bracket_thick arch_height add half_height arch_thick sub arch_width add
205 arch_angle arch_height -0.15 mul bracket_traject
207 bracket_thick 0.5 mul half_height
208 0 arch_height 0.5 mul bracket_traject
212 bracket_thick half_height arch_thick sub
213 0 arch_height 0.4 mul bracket_traject
215 bracket_thick arch_height add half_height arch_thick sub arch_width add
216 arch_angle arch_height -0.25 mul bracket_traject
218 bracket_thick arch_height add half_height arch_thick sub arch_width add
220 bracket_thick half_height arch_thick sub
239 /draw_bracket % arch_angle arch_width arch_height bracket_height arch_thick bracket_thick
243 /bracket_thick exch def
245 /bracket_height exch def
246 /arch_height exch def
250 bracket_height 2 div bracket_thick add /half_height exch def
251 bracket_thick 0.5 mul setlinewidth