]> git.donarmstrong.com Git - lilypond.git/blob - mf/feta-beugel.mf
release: 1.3.113
[lilypond.git] / mf / feta-beugel.mf
1 input feta-macros;
2 input feta-params;
3
4 save code;
5 code :=0;
6
7
8 def draw_brace( expr height_sharp, width_sharp) = 
9         save pendir, height, width, thin, thick;
10         save penangle;
11         height# := height_sharp;
12         width#  := width_sharp;
13
14         beginchar(code, width#, height#/2, height#/2);
15         code := incr code;
16           
17         define_pixels (height, width);
18         thin = 2 stafflinethickness;
19         thick = .5 staff_space;
20         
21         z2 = .5 [z1, z3];
22         y3 = y1 + height/2;
23         x3 = x1 + width;
24         y1 =0;
25         x3 = - width / 2;
26
27         pair pendir;
28         pendir = unitvector(x3 - x1, y3/6 - y1);
29         penangle = angle pendir - 90;
30         penpos3(thin, penangle);
31         penpos2(thick, angle(z3 -z1) -90 );
32         penpos1(2/3 thin, penangle);
33         
34         penlabels(1,2,3);
35         fill z2r ..  simple_serif (z3r, z3l, 90)
36                 .. z2l .. simple_serif (z1l, z1r, 90) ..cycle;
37
38         addto currentpicture also currentpicture yscaled -1;
39 endchar;
40 enddef;
41
42
43 for x :=  1 step 1 until 160:
44         % note: define_pixels (x) multiplies x by hppp,
45         %       we must never get bigger than infinity
46         draw_brace (min (x * pt#, infinity/hppp - 1), staff_space#);
47 endfor