%!PS-Adobe-1.0: lily.ps
-%
-%staffrulethickness /stafflinethickness exch def
-%
+
+% 2 setlanguagelevel % hmm. auto_resize_dicts doesn't help either.
% round cappings
1 setlinecap
-%
+
/draw_beam % width slope thick
{
2 div /beam_thick exch def
0 beam_thick lineto
closepath fill
} bind def
-%
-/draw_decresc
+
+/draw_decrescendo % width height cons
{
stafflinethickness setlinewidth
/cresc_cont exch def
/cresc_ht exch def
/cresc_wd exch def
-%
+
cresc_wd cresc_cont moveto
0 cresc_ht lineto
stroke
0 cresc_ht neg lineto
stroke
} bind def
-%
-/draw_cresc
+
+/draw_crescendo % width height cons
{
stafflinethickness setlinewidth
/cresc_cont exch def
/cresc_ht exch def
/cresc_wd exch def
-%
+
0 cresc_cont moveto
cresc_wd cresc_ht lineto
stroke
cresc_wd cresc_ht neg lineto
stroke
} bind def
-%
+
/lily_distance
{
1 copy mul exch 1 copy mul add sqrt
} bind def
-%
-stafflinethickness 1.2 mul /plet_t exch def
-/draw_plet
+
+/draw_tuplet % dx dy thick dir
{
- plet_t setlinewidth
+% urg: the only Level-2 PS, check effect in print
+% true setstrokeadjust
+ /dir exch def
+ setlinewidth
+ 1 setlinecap
+ 1 setlinejoin
+ /tuplet_dy exch def
+ /tuplet_dx exch def
+ staffheight 2 div /tuplet_gapx exch def
+ tuplet_dy tuplet_dx div tuplet_gapx mul /tuplet_gapy exch def
+ staffheight 4 div dir mul /tuplet_h exch def
+
+ 0 0 moveto
+ 0 tuplet_h lineto
+ tuplet_dx tuplet_gapx sub 2 div
+ tuplet_dy tuplet_gapy sub 2 div tuplet_h add lineto
+ tuplet_dx tuplet_gapx add 2 div
+ tuplet_dy tuplet_gapy add 2 div tuplet_h add moveto
+ tuplet_dx tuplet_dy tuplet_h add lineto
+ tuplet_dx tuplet_dy lineto
+ stroke
+} bind def
+
+/draw_volta % w thick last
+{
+ /last exch def
+ setlinewidth
+ /volta_w exch def
+ staffheight 2 div /volta_h exch def
% urg: the only Level-2 PS, check effect in print
% true setstrokeadjust
1 setlinecap
1 setlinejoin
- /dir exch def
- /plet_dy exch def
- /plet_dx exch def
- staffheight 2 div /plet_gapx exch def
- plet_dy plet_dx div plet_gapx mul /plet_gapy exch def
- staffheight 4 div dir mul /plet_h exch def
-%
0 0 moveto
- 0 plet_h lineto
- plet_dx plet_gapx sub 2 div
- plet_dy plet_gapy sub 2 div plet_h add lineto
- plet_dx plet_gapx add 2 div
- plet_dy plet_gapy add 2 div plet_h add moveto
- plet_dx plet_dy plet_h add lineto
- plet_dx plet_dy lineto
+ 0 volta_h lineto
+ volta_w volta_h lineto
+ last 0 eq {
+ volta_w 0 lineto
+ } if
stroke
} bind def
-%
-/draw_slur
+
+% this is for drawing slurs.
+/draw_bezier_sandwich
{
stafflinethickness setlinewidth
moveto
grestore
stroke
} bind def
-%
+
/draw_dashed_slur
{
1 setlinecap
1 setlinejoin
setdash
setlinewidth
+ 8 -2 roll
moveto
curveto
stroke
} bind def
-%
-staffheight 4 div /interline exch def
-%
+
+
+
/bracket_traject
{
/traject_ds exch def
traject_ds traject_alpha cos mul add
exch
} bind def
-%
-interline 3 div /bracket_b exch def
-interline 2 mul /bracket_w exch def
-stafflinethickness 2 mul /bracket_t exch def
-interline 1.5 mul /bracket_v exch def
-bracket_v /bracket_u exch def
-50 /bracket_alpha exch def
-%
+
+
+
/half_bracket
{
%6
%1
0 0
} bind def
-%
+
/draw_half_bracket {
moveto
lineto
fill
grestore
} bind def
-%
+
/draw_bracket % height
{
2 div bracket_b add /bracket_h exch def
draw_half_bracket
stroke
} bind def
-%
+