- draw z1 -- z2;
- draw z3 -- z4;
-fet_endchar;
-
-% whole note
-% Wanske, p.38
-fet_beginchar("Whole notehead", "0", "wholehead")
- draw_whole_head;
-fet_endchar;
-
-
-
-% half note
-% Wanske, p.39
-fet_beginchar("Half notehead", "1",
- "halfhead")
- setup_notehead_vars;
- % a_b:=1.49; % after text
- a_b:=1.50; % after drawing
- err_y_a:=0.157;
- tilt:=34;
- % superness:=0.66;
- superness:=0.67; % jcn
- % ai_a:=0.863;
- ai_a:=0.850; % jcn
- % ai_bi:=3.14;
- ai_bi:=3.30; % jcn
- err_y_ai:=0;
- err_x_bi:=-0.12;
- inner_tilt:=tilt;
- inner_superness:=0.80;
- b_h:=0.935;
- a_w:=1.12;
-
- notehead_calc;
- half_notehead_width# := wd#;
- notehead_draw;
-fet_endchar;
-
-
-
-% quarter note
-% Wanske p.38
-fet_beginchar("Quart notehead", "2", "quarthead")
- setup_notehead_vars;
- % a_b:=1.57; % after text
- a_b:=1.54; % after drawing
- err_y_a:=0.044;
- tilt:=32;
- superness:=0.707;
- ai_a:=0;
- ai_bi:=1;
- err_y_ai:=0;
- err_x_bi:=0;
- inner_tilt:=0;
- inner_superness:=0.707;
- b_h:=0.85;
- a_w:=1.09;
-
- notehead_calc;
- black_notehead_width# := wd#;
- notehead_draw;
-fet_endchar;
-
-
-% whole note
-% Wanske, p.38
-fet_beginchar("Whole diamondhead", "0diamond", "wholediamondhead")
- setup_notehead_vars;
-
- a_b:=1.80;
- err_y_a:=0; % no slant
- tilt:=0;
- superness:=0.495;
- ai_a:=0.350;
- % ai_bi:=1.23;
- ai_bi:=1.30; % jcn
- % err_y_ai:=0.0938;
- % err_x_bi:=0;
- err_y_ai:=0;
- err_x_bi:=0.115;
- % inner_tilt:=135;
- inner_tilt:=125; % jcn
- % inner_superness:=0.69;
- inner_superness:=0.6; % jcn
- b_h:=1; %no rotate-> no height correction
- a_w:=1; % no rotate-> no width correction
-
- notehead_calc;
- whole_notehead_width# := wd#;
- notehead_draw;
-fet_endchar;
-
-
-% half note
-% Wanske, p.39
-fet_beginchar("Half diamondhead", "1diamond",
- "halfdiamondhead")
- setup_notehead_vars;
-
- a_b := 1.50; % after drawing
- err_y_a:=0.157;
-
- tilt:=34;
- superness:=0.49; % jcn
- ai_a:=0.550; % jcn
- ai_bi:=3.30; % jcn
-
- err_y_ai:=0;
- err_x_bi:=-0.12;
- inner_tilt:=tilt;
- inner_superness:=0.80;
-
- b_h:= 1.03;
- a_w:= 1.2;
-
- notehead_calc;
- half_notehead_width# := wd#;
- notehead_draw;
-fet_endchar;
-
-
-% quarter note
-% Wanske p.38
-fet_beginchar("Quart diamondhead", "2diamond", "diamondhead")
- set_char_box(0, black_notehead_width#, noteheight#/2, noteheight#/2);
- save a_b,err_y_a,tilt,superness;
- save b_h,a_w;
- save a,beta,ai,bi, ht, wd;
-
- a_b:= 1.8;
- err_y_a:=-0.044;
- b_h:=0.90;
- a_w:=1.1;
- tilt:=35;
- superness:=0.495;
-
- ht# =noteheight#;
- 2beta#=ht#*b_h;
- a# = beta#*a_b;
-
- define_pixels(a,beta);
-
- black := distorted_ellipse(.72 noteheight, .45 noteheight, -.2 noteheight , 0, superness)
-
-% beta,a*err_y_a,0,superness);
-
- black:=black rotated tilt;
- black:=black shifted (w/2,0);
- fill black;
-fet_endchar;
-
-save triangle; path triangle;
-triangle = (-sqrt3/4,-1/2) -- (0,1) -- (sqrt3/4,-1/2) -- cycle;
-
-fet_beginchar("Whole trianglehead", "0triangle", "wholetrianglehead")
- set_char_box(0, 2(noteheight#+stafflinethickness#)/sqrt3*7/8,
- (noteheight#+stafflinethickness#)/2,(noteheight#+stafflinethickness#)/2);
- fill triangle scaled (7h/6) shifted (w/2,-h/6);
- unfill triangle scaled 0.72h shifted (w/2,-h/6);
-fet_endchar;
-fet_beginchar("Half trianglehead", "1triangle", "halftrianglehead")
- thick := 1.2stafflinethickness;
- set_char_box(0, 2noteheight#/sqrt3*7/8,noteheight#/2,noteheight#/2);
- fill triangle scaled (7h/6) shifted (w/2,-h/6);
- unfill triangle scaled 0.7h shifted (w/2,-h/6);
-fet_endchar;
-fet_beginchar("Quart trianglehead", "2triangle", "trianglehead")
- thick := 1.2stafflinethickness;
- set_char_box(0, 2noteheight#/sqrt3*7/8,noteheight#/2,noteheight#/2);
- fill triangle scaled (7h/6) shifted (w/2,-h/6);
-fet_endchar;
-
-
-slw := staff_space;
-slw# := staff_space#;
-slt := 1.25stafflinethickness;
-slt# := 1.25stafflinethickness#;
-slxt = 1.5slt;
-slxt# := 1.5slt#;
-slh := 1.5staff_space;
-slh# := 1.5staff_space#;
-
-fet_beginchar("Whole slashhead","0slash","wholeslashhead")
- wid := slw#+2slxt#+staff_space#;
- set_char_box(0,wid-stafflinethickness#,slh#/2,slh#/2);
- define_pixels (wid);
- pickup penrazor scaled slxt;
- draw (-b+slxt/2-stafflinethickness/2,-d) -- (-b+slxt/2+slw-stafflinethickness/2,h);
- draw (w-slxt/2-slw+stafflinethickness/2,-d) -- (w-slxt/2+stafflinethickness/2,h);
- pickup penrazor scaled slt rotated 90;
- draw (-b+slxt-stafflinethickness/2,-d+slt/2) -- (w-slw+stafflinethickness/2,-d+slt/2);
- draw (-b+slw-stafflinethickness/2,h-slt/2) -- (w-slxt+stafflinethickness/2,h-slt/2);
-fet_endchar;
-
-fet_beginchar("Half slashhead","1slash","halfslashhead")
- wid := slw#+2slxt#+0.6staff_space#;
- set_char_box(0,wid-stafflinethickness#,slh#/2,slh#/2);
- define_pixels (wid);
- pickup penrazor scaled slxt;
- draw (b+slxt/2-stafflinethickness/2,-d) -- (b+slxt/2+slw-stafflinethickness/2,h);
- draw (w-slxt/2-slw+stafflinethickness/2,-d) -- (w-slxt/2+stafflinethickness/2,h);
- pickup penrazor scaled slt rotated 90;
- draw (b+slxt-stafflinethickness/2,-d+slt/2) -- (w-slw+stafflinethickness/2,-d+slt/2);
- draw (b+slw-stafflinethickness/2,h-slt/2) -- (w-slxt+stafflinethickness/2,h-slt/2);
-fet_endchar;
-
-fet_beginchar("Quart slashhead","2slash","quartslashhead")
- wid := slw#+slxt#;
- set_char_box(0,slw#+slxt#-stafflinethickness#,slh#/2,slh#/2);
- define_pixels (wid);
- pickup penrazor scaled slxt;
- draw (b+slxt/2-stafflinethickness/2,-d) -- (b+slxt/2+slw-stafflinethickness/2,h);
-fet_endchar;
-
-% thick is the distance between the two parallel lines in the cross (distance between centres of lines)
-def draw_cross(expr thick) =
- pent := 1.2stafflinethickness;
- pickup pencircle scaled pent;
- % alfa is the slant of the lines (i.e. 1 means 45 degrees)
- alfa := (2h-pent)/(w-pent);
- % llen is the length of the little outer lines
- % llen = thick / sin(2atan(alfa))
- llen := thick/(ypart(dir(2angle(1,alfa))));
- xa := llen/sqrt(1+alfa**2);
- ya := xa*alfa;
- xl := w/2-xa-pent/2;
- yl := h-ya-pent/2;
- save crz; path crz;
- crz = (xa,0) -- (xa+xl,yl) -- (xl,yl+ya) -- (0,ya);
- draw crz shifted(w/2,0);
- draw crz xscaled -1 shifted(w/2,0);
- draw crz yscaled -1 shifted(w/2,0);
- draw crz scaled -1 shifted(w/2,0);