2 % part of LilyPond's pretty-but-neat music font
4 % most beautiful noteheads are pronounced, not circular,
5 % and not even symmetric.
6 % These examples are inspired by [Wanske] [see literature list]
8 %noteheight#:=interline#;
10 % even more pronounced (almost overdone), just like the original
11 noteheight#:=interline#+1.5stafflinethickness#;
15 def setup_notehead_vars =
16 save a_b,err_y_a,tilt,superness;
17 save ai_a,ai_bi,err_y_ai,err_x_bi,inner_tilt,inner_superness;
21 % setup addititional vars and calc them
23 save a,beta,ai,bi, ht, wd;
30 define_pixels(a,beta);
32 set_char_box(0, wd#, .5 ht#, .5 ht#);
36 % draw the outer and inner ellipse.
39 black=distorted_ellipse(a,beta,a*err_y_a,0,superness);
40 white=distorted_ellipse(ai,bi,ai*err_y_ai,bi*err_x_bi,inner_superness);
43 x1=-x3=a; x2=x4=0; y1=y3=0; y2=-y4=b;
47 black:=black rotated tilt;
48 black:=black shifted (w/2,0);
49 white:=white rotated inner_tilt;
50 white:=white shifted (w/2,0);
59 fet_begingroup("balls");
63 fet_beginchar("Whole notehead", "0", "wholeball")
67 err_y_a:=0; % no slant
78 inner_tilt:=125; % jcn
79 % inner_superness:=0.69;
80 inner_superness:=0.68; % jcn
81 b_h:=1; %no rotate-> no height correction
82 a_w:=1; % no rotate-> no width correction
91 fet_beginchar("Half notehead", "1",
94 % a_b:=1.49; % after text
95 a_b:=1.50; % after drawing
99 superness:=0.67; % jcn
107 inner_superness:=0.80;
118 fet_beginchar("Quart notehead", "2", "quartball")
120 % a_b:=1.57; % after text
121 a_b:=1.54; % after drawing
130 inner_superness:=0.707;
140 % from MO*gen.mf; (pass the barfbag?)
141 def add_mirror (expr pone, ptwo) =
142 addto currentpicture also currentpicture
143 reflectedabout (round(pone), round(ptwo))
146 def fill_square (expr xwidth, ywidth, zshift) =
147 fill unitsquare xscaled xwidth yscaled ywidth shifted zshift
153 define_pixels(nhh,nhw);
155 fet_beginchar("Brevis notehead","-1","breveball");
156 set_char_box(0, 2interline#,.5 interline#, .5interline#);
157 fill_square (5/4nhw, .25nhh, (0,.25nhh));
158 add_mirror (origin, right);
159 x1=x2=0; x3=x4=5/4nhw; y1=-y2=y3=-y4=.7nhh;
160 pickup pencircle scaled stafflinethickness;
161 draw z1--z2; draw z3--z4;
162 push_picture(currentpicture);
165 fet_beginchar("Longa notehead","-2","longaball");
166 set_char_box(0, 2 interline#,.5interline#, .5interline# );
167 currentpicture := pop_picture;
168 pickup pencircle scaled stafflinethickness;
169 draw (5/4nhw,-.7nhh)--(5/4nhw,-1.7nhh);
172 % fet_endgroup("noteheads");
173 fet_endgroup("balls");