1 %!PS-Adobe-1.0: lily.ps
8 /draw_beam % width slope thick
10 2 div /beam_thick exch def
13 beam_slope beam_wd mul /beam_ht exch def
14 0 beam_thick neg moveto
15 beam_wd beam_ht rlineto
16 0 beam_thick 2 mul rlineto
21 /draw_decrescendo % width height cons thick
28 cresc_wd cresc_cont moveto
31 cresc_wd cresc_cont neg moveto
36 /draw_crescendo % width height cons thick
44 cresc_wd cresc_ht lineto
46 0 cresc_cont neg moveto
47 cresc_wd cresc_ht neg lineto
53 1 copy mul exch 1 copy mul add sqrt
56 /draw_tuplet % height gap dx dy thick dir
66 tuplet_dy tuplet_dx div tuplet_gapx mul /tuplet_gapy exch def
70 0 tuplet_h dir mul lineto
71 tuplet_dx tuplet_gapx sub 2 div
72 tuplet_dy tuplet_gapy sub 2 div tuplet_h dir mul add lineto
73 tuplet_dx tuplet_gapx add 2 div
74 tuplet_dy tuplet_gapy add 2 div tuplet_h dir mul add moveto
75 tuplet_dx tuplet_dy tuplet_h dir mul add lineto
76 tuplet_dx tuplet_dy lineto
80 /difficult_draw_ez_ball % ch letter_col ball_col font
83 findfont 0.7 scalefont setfont
87 0.5 0 0.5 0 360 arc closepath fill stroke
92 0.5 0 0.4 0 360 arc closepath
97 % 0.25 is empiric centering. Change to taste
103 % 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