-% solfa.mf - implements solfa shaped notes
-%
-% (c) 2001--2005 Glen Prideaux <glenprideaux@iname.com>
-
-% We can use the regular distorted-elliptical head in the feta font
-% for the sol head, but we can't use the triangle or diamond heads for
-% the do or me because they're too narrow and their lines too thin.
-
-fet_begingroup("solfa");
-
-noteheight#:=staff_space# + overdone_heads * stafflinethickness#;
-define_pixels(noteheight);
-
-fet_endgroup("solfa")
-
-def drawdoshape =
- save noteshape, noteishape, dx, dy, ai_a, bi_b;
- path noteshape, noteishape;
- noteshape = noteishape = triangle;
- (dx,dy)=(0,0.0);
- (ai_a,bi_b)=(i_o,i_o);
- draw_solfa_note_shape;
-enddef;
-
-
-fet_beginchar("Whole dohead", "s0do")
- pickup pencircle scaled blot_diameter;
- save a_b, i_o;
- a_b = 1.8;
- i_o = 0.6;
-
- drawdoshape;
-fet_endchar;
-
-fet_beginchar("Half dohead", "s1do")
- save a_b, i_o;
- a_b = 1.5;
- i_o = 0.6;
-
- drawdoshape;
-fet_endchar;
-
-fet_beginchar("Quart dohead", "s2do")
- save a_b, noteshape;
- path noteshape;
- a_b = 1.54;
-
- noteshape = triangle;
- draw_solfa_quarter_note_shape;
-
-fet_endchar;
-save reshape; path reshape;
-reshape = (-1,1)--(-1,0.2){down} ... (0,-1) ... {up}(1,0.2)--(1,1)--cycle;
-
-fet_beginchar("Whole rehead", "s0re")
- save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
- path noteshape, noteishape;
- noteshape = reshape;
- noteishape = reshape;
- a_b = 1.8;
- bi_b = 0.65;
- ai_a = 0.8;
- (dx,dy)=(0,-0.1);
- draw_solfa_note_shape;
-fet_endchar;
-
-fet_beginchar("Half rehead", "s1re")
- save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
- path noteshape, noteishape;
- noteshape = reshape;
- noteishape = reshape;
- a_b = 1.5;
- bi_b = 0.65;
- ai_a = 0.8;
- (dx,dy)=(0,-0.1);
- draw_solfa_note_shape;
-fet_endchar;
-
-fet_beginchar("Quart rehead", "s2re")
- save a_b, noteshape;
- path noteshape;
- a_b = 1.54;
-
- noteshape = reshape;
- draw_solfa_quarter_note_shape;
-fet_endchar;
-
-
-
-
-% fa - scalene triangle:
-% for stem up: (0,h/2) -- (w,h/2) -- (w,-h/2) -- cycle;
-% for stem down: (w,-h/2) -- (0,1h/2) -- (0,h/2) -- cycle;
-% (one is a 180 degree rotation of the other)
-% stem attachment: (doesn't much matter)
-
-save fashape; path fashape;
-fashape = (-1,1)--(1,1)--(1,-1)--cycle;
-
-fet_beginchar("Whole fahead", "s0fa")
- save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
- path noteshape, noteishape;
- noteshape = fashape;
- noteishape = fashape;
- a_b = 1.8;
- bi_b = 0.6;
- ai_a = 0.6;
- (dx,dy)=(0.2,.05);
- draw_solfa_note_shape;
-fet_endchar;
-
-fet_beginchar("Half stemup fahead", "u1fa")
- save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
- path noteshape, noteishape;
- noteshape = fashape;
- noteishape = fashape;
- a_b = 1.5;
- bi_b = 0.6;
- ai_a = 0.6;
- (dx,dy)=(0.2,.05);
- draw_solfa_note_shape;
-fet_endchar;
-
-fet_beginchar("Quart stemup fahead", "u2fa")
- save a_b, noteshape;
- path noteshape;
- a_b = 1.54;
-
- noteshape = fashape;
- draw_solfa_quarter_note_shape;
-fet_endchar;
-
-fet_beginchar("Half stemdn fahead", "d1fa")
- save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
- path noteshape, noteishape;
- noteshape = fashape rotated 180;
- noteishape = fashape rotated 180;
- a_b = 1.5;
- bi_b = 0.6;
- ai_a = 0.6;
- (dx,dy)=(-0.2,-.05);
- draw_solfa_note_shape;
-fet_endchar;
-
-fet_beginchar("Quart stemdn fahead", "d2fa")
- save a_b, noteshape;
- path noteshape;
- a_b = 1.54;
-
- noteshape = fashape rotated 180;
- draw_solfa_quarter_note_shape;
-fet_endchar;
-
-
-% sol - oval ... the standard "round" note
-
-
-% la - rectangle: (0,h/2)--(w,h.2)--(w,-h/2)--(0,-h/2)--cycle;
-% stem attachment: (doesn't much matter)
-save lashape; path lashape;
-lashape = (-1,-1)--(-1,1)--(1,1)--(1,-1)--cycle;
-
-fet_beginchar("Whole lahead", "s0la")
- save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
- path noteshape, noteishape;
- noteshape = lashape;
- noteishape = lashape;
- a_b = 1.8;
- bi_b = 0.6;
- ai_a = 0.85;
- (dx,dy)=(0,0);
- draw_solfa_note_shape;
-fet_endchar;
-
-fet_beginchar("Half lahead", "s1la")
- save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
- path noteshape, noteishape;
- noteshape = lashape;
- noteishape = lashape;
- a_b = 1.5;
- bi_b = 0.6;
- ai_a = 0.85;
- (dx,dy)=(0,0);
- draw_solfa_note_shape;
-fet_endchar;
-
-fet_beginchar("Quart lahead", "s2la")
- save a_b, noteshape;
- path noteshape;
- a_b = 1.54;
-
- noteshape = lashape;
- draw_solfa_quarter_note_shape;
-fet_endchar;
-
-
-
-% ti - an "icecream cone" with about 2/3 of
-% the height in the cone and only 1/3 in the curved top:
-% (0,h/6)--(w/2,-h/2)--(w,h/6)..(w/2,h/2)..cycle;
-% stem attachment: h/6
-save tishape; path tishape;
-tishape = (0,-1)--(-1,0.3)..(0,1)..(1,0.3)--cycle;
-
-fet_beginchar("Whole tihead", "s0ti")
- save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
- path noteshape, noteishape;
- noteshape = tishape;
- noteishape = tishape;
- a_b = 1.8;
- bi_b = 0.75;
- ai_a = 0.75;
- (dx,dy)=(0,-.02);
- draw_solfa_note_shape;
-fet_endchar;
-
-fet_beginchar("Half tihead", "s1ti")
- save a_b, ai_a, bi_b, dx, dy, noteshape, noteishape;
- path noteshape, noteishape;
- noteshape = tishape;
- noteishape = tishape;
- a_b = 1.5;
- bi_b = 0.75;
- ai_a = 0.75;
- (dx,dy)=(0,-.02);
- draw_solfa_note_shape;
-fet_endchar;
-
-fet_beginchar("Quart tihead", "s2ti")
- save a_b, noteshape;
- path noteshape;
- a_b = 1.54;
-
- noteshape = tishape;
- draw_solfa_quarter_note_shape;
-fet_endchar;
-
-