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 /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 /draw_volta % h w thick vert_start vert_end
117 volta_w volta_h lineto
124 % this is for drawing slurs.
125 /draw_bezier_sandwich % thickness controls
138 /draw_dashed_line % dash thickness dx dy
149 /draw_dashed_slur % dash thickness controls
166 /traject_alpha exch def
167 traject_ds traject_alpha sin mul add
169 traject_ds traject_alpha cos mul add
180 bracket_thick arch_height add half_height arch_thick sub arch_width add
181 arch_angle arch_height -0.15 mul bracket_traject
183 bracket_thick 0.5 mul half_height
184 0 arch_height 0.5 mul bracket_traject
188 bracket_thick half_height arch_thick sub
189 0 arch_height 0.4 mul bracket_traject
191 bracket_thick arch_height add half_height arch_thick sub arch_width add
192 arch_angle arch_height -0.25 mul bracket_traject
194 bracket_thick arch_height add half_height arch_thick sub arch_width add
196 bracket_thick half_height arch_thick sub
215 /draw_bracket % arch_angle arch_width arch_height bracket_height arch_thick bracket_thick
219 /bracket_thick exch def
221 /bracket_height exch def
222 /arch_height exch def
226 bracket_height 2 div bracket_thick add /half_height exch def
227 bracket_thick 0.5 mul setlinewidth