bash configure
make
-Note: If you rely on broken DOS/Windows tools such as pkzip/WinZIP
- to unpack the distribution, make sure the B<entire> source tree
- is unpacked correctly, in particular the empty out directories
- (F<flower/out>, F<lib/out> et. al.)
+B<Note> If you rely on broken DOS/Windows tools such as pkzip/WinZIP
+to unpack the distribution, make sure the B<entire> source tree
+is unpacked correctly, in particular the empty out directories
+(F<flower/out>, F<lib/out> et. al.)
=head1 AUTHORS
+pl 38
+ - bf: \> \! \ff (crescendo overlap)
+ - misc feta-fixes, flageolet sign.
+ - midi tempo fixes.
+pl 37.jcn3
+ - max beam slope "compile time parameterised" and set to 0.6
+ (oh, how we need runtime generated beams!)
+ - beam's left y-pos quantisation
+ - beam slopes' y-span quantisation
+ - stem.ly
+
+pl 37.jcn2
+ - feta: fixed sizes small numerals + flageolet
+
+
+*******
+dec 12
pl 37
- --postscript
- don't crash non-fitting grouping (thx, John)
Features you cannot find in the doco as working, should be mentioned here.
-
+
This is an assorted collection of stuff that will be done, might be
done, or is an idea that I want to think about
grep for TODO and ugh/ugr
0.2:
+ * -M bug
+
* unended beam: [c4
+ * continued hairpins
+
+ * height of dyns.
+
* output naming:
- default to basename[-serialnumber].{midi,tex}
TOPLEVEL_MAJOR_VERSION = 0
TOPLEVEL_MINOR_VERSION = 1
-TOPLEVEL_PATCH_LEVEL = 37
+TOPLEVEL_PATCH_LEVEL = 38
TOPLEVEL_MY_PATCH_LEVEL =
# use the above to send patches, always empty for released version:
/// copy a bare (C-)array from #src# to #dest# sized #count#
template<class T>
inline void arrcpy (T*dest, T*src, int count) {
- for (int i=0; i < count ; i++)
+ for (int i_shadows_local=0; i_shadows_local < count ; i_shadows_local++)
*dest++ = *src++;
}
% Creator: mf-to-table.py version 0.4
-% Automatically generated on Fri Dec 12 11:29:20 1997
+% Automatically generated on Wed Dec 24 16:38:34 1997
% Do not edit
% input from out/feta16.log
% name=\symboltables {
"0o" "\\outsidewholerest" -2.50\pt 8.50\pt -2.50\pt 0.40\pt
"1o" "\\outsidehalfrest" -2.50\pt 8.50\pt -0.40\pt 2.50\pt
"2" "\\quartrest" -0.00\pt 4.32\pt 3.00\pt 14.40\pt
- "3" "\\eighthrest" -0.00\pt 5.33\pt 4.00\pt 11.27\pt
- "4" "\\sixteenthrest" -0.00\pt 6.18\pt -0.00\pt 11.27\pt
- "5" "\\thirtysecondrest" -0.00\pt 6.98\pt -0.00\pt 15.27\pt
- "6" "\\sixtyfourthrest" -0.00\pt 7.49\pt -0.00\pt 19.27\pt
- "7" "\\hundredtwentyeighthrest" -0.00\pt 8.34\pt -0.00\pt 23.27\pt
+ "3" "\\eighthrest" -0.00\pt 5.33\pt 4.00\pt 11.37\pt
+ "4" "\\sixteenthrest" -0.00\pt 6.21\pt -0.00\pt 11.37\pt
+ "5" "\\thirtysecondrest" -0.00\pt 7.00\pt -0.00\pt 15.37\pt
+ "6" "\\sixtyfourthrest" -0.00\pt 7.51\pt -0.00\pt 19.37\pt
+ "7" "\\hundredtwentyeighthrest" -0.00\pt 8.36\pt -0.00\pt 23.37\pt
}
"accidentals" = \table {
"1" "\\sharp" -0.00\pt 4.40\pt -6.00\pt 6.00\pt
"trill" "\\trill" -0.00\pt 8.00\pt -0.00\pt 9.00\pt
"pedalheel" "\\pedalheel" -2.00\pt 2.00\pt -2.00\pt 2.67\pt
"pedaltoe" "\\pedaltoe" -2.00\pt 2.00\pt -0.00\pt 6.00\pt
+ "flageolet" "\\flageolet" -2.13\pt 2.13\pt -2.13\pt 2.13\pt
}
"flags" = \table {
"u3" "\\eighthflag" -0.20\pt 4.94\pt -12.26\pt 0.20\pt
% Creator: mf-to-table.py version 0.4
-% Automatically generated on Fri Dec 12 11:29:22 1997
+% Automatically generated on Wed Dec 24 16:38:42 1997
% Do not edit
% input from out/feta20.log
% name=\symboltables {
"rests" = \table {
- "0" "\\wholerest" -0.00\pt 7.50\pt -3.13\pt 0.00\pt
- "1" "\\halfrest" -0.00\pt 7.50\pt -0.00\pt 3.13\pt
- "0o" "\\outsidewholerest" -3.13\pt 10.62\pt -3.13\pt 0.50\pt
- "1o" "\\outsidehalfrest" -3.13\pt 10.62\pt -0.50\pt 3.13\pt
+ "0" "\\wholerest" -0.00\pt 7.50\pt -3.12\pt 0.00\pt
+ "1" "\\halfrest" -0.00\pt 7.50\pt -0.00\pt 3.12\pt
+ "0o" "\\outsidewholerest" -3.12\pt 10.62\pt -3.12\pt 0.50\pt
+ "1o" "\\outsidehalfrest" -3.12\pt 10.62\pt -0.50\pt 3.12\pt
"2" "\\quartrest" -0.00\pt 5.40\pt 3.75\pt 18.00\pt
- "3" "\\eighthrest" -0.00\pt 6.67\pt 5.00\pt 14.08\pt
- "4" "\\sixteenthrest" -0.00\pt 7.72\pt -0.00\pt 14.08\pt
- "5" "\\thirtysecondrest" -0.00\pt 8.72\pt -0.00\pt 19.08\pt
- "6" "\\sixtyfourthrest" -0.00\pt 9.36\pt -0.00\pt 24.08\pt
- "7" "\\hundredtwentyeighthrest" -0.00\pt 10.42\pt -0.00\pt 29.08\pt
+ "3" "\\eighthrest" -0.00\pt 6.67\pt 5.00\pt 14.21\pt
+ "4" "\\sixteenthrest" -0.00\pt 7.76\pt -0.00\pt 14.21\pt
+ "5" "\\thirtysecondrest" -0.00\pt 8.75\pt -0.00\pt 19.21\pt
+ "6" "\\sixtyfourthrest" -0.00\pt 9.38\pt -0.00\pt 24.21\pt
+ "7" "\\hundredtwentyeighthrest" -0.00\pt 10.45\pt -0.00\pt 29.21\pt
}
"accidentals" = \table {
"1" "\\sharp" -0.00\pt 5.50\pt -7.50\pt 7.50\pt
"2" "\\sharpsharp" -0.00\pt 5.00\pt -2.50\pt 2.50\pt
}
"dots" = \table {
- "dot" "\\dot" -0.00\pt 2.25\pt -1.13\pt 1.13\pt
+ "dot" "\\dot" -0.00\pt 2.25\pt -1.12\pt 1.12\pt
"repeatcolon" "\\repeatcolon" -0.00\pt 2.25\pt -2.50\pt 2.50\pt
}
"balls" = \table {
"trill" "\\trill" -0.00\pt 10.00\pt -0.00\pt 11.25\pt
"pedalheel" "\\pedalheel" -2.50\pt 2.50\pt -2.50\pt 3.33\pt
"pedaltoe" "\\pedaltoe" -2.50\pt 2.50\pt -0.00\pt 7.50\pt
+ "flageolet" "\\flageolet" -2.67\pt 2.67\pt -2.67\pt 2.67\pt
}
"flags" = \table {
"u3" "\\eighthflag" -0.25\pt 6.17\pt -15.33\pt 0.25\pt
rtoe = \script { "pedaltoe" 0 0 1 0 0 }
turn = \script { "turn" 0 0 1 0 0 }
open = \script { "open" 0 0 1 0 0 }
+flageolet = \script { "flageolet" 0 0 1 0 0 }
% could we do without this bloat?
"finger" "\setfinger{%}" 0.0\pt 0.0\pt 0.0\pt 4.0\pt
}
"dynamics" = \table {
-
"mf" "\dynmf"
"fff" "\dynfff"
"ff" "\dynff"
"fp" "\dynfp"
"sf" "\dynsf"
"sfz" "\dynsfz"
-
}
"align" = \table {
"-1" "\leftalign{%}"
"stem" "\stem{%}{%}"
"fill" "\hbox{}"
% ugh. 8pt
- "crescendosym" "\crescendosym{%}" 0.0\pt 0.0\pt -3.0\pt 3.0\pt
+ "crescendosym" "\crescendosym{%}" 0.0\pt 0.0\pt -2.0\pt 2.0\pt
"decrescendosym" "\decrescendosym{%}" 0.0\pt 0.0\pt -3.0\pt 3.0\pt
}
\header{
filename = "beams.ly";
-title = "";
-description = "";
composer = "heu";
enteredby = "jcn";
copyright = "PD";
TestedFeatures = "beams and beamflags";
}
-\version "0.1.7"
+\version "0.1.7";
\score{
\melodic \multi 3 <
a\fp a4.\sf a4.\sfz | % a\fz a\rf
[c8 c] [a' a']
[c a'] [a' c] |
- [c d e f] [as' ges' f' e']
- [cis' dis' c' des'] [cisis' disis' ceses' deses'] |
+ [c \< d e f] [as' ges' f' e']
+ [cis' dis' c' des'] [cisis' disis' \! ceses' deses'] |
\clef "bass";
r1 r2 r4 r8 r16 r32 r64 r128 r128 |
\multi 2 < { \stemup r2 r2} {\stemdown c c }>
\textstyle "finger";
c4^"1" d^"2" e^"3" f^"4" g^"5"
- % Music for the Martians?
+ % Music to the Martians!
< bes4^"6" e_"7" c_"8" >
- a'^"0"_"9"
+ a^"0"_"9"
- % ugh, \flageolet is like open, but maybe a perfect circle
- a^\open
+ a'^\flageolet
\textstyle "roman";
%{ % default abbreviations
c4 c4: c4:32 c4: c4 c2.
[:16 e1 g]
%}
\meter 1/2; a2 |
- \meter 3/2; a1. |
+ \meter 3/2; < a1.
+ { s4 \ppp \< s4 \! s4 \fff s4 \> s4 \! s4\ppp} >
+ |
\meter 2/4; a2 |
\meter 5/4; a1.. |
\meter 6/8; a2. |
--- /dev/null
+\header{
+title= "Stems and Beams";
+subtitle = "proofsheet";
+enteredby = "jcn";
+copyright = "public domain";
+TestedFeatures = "This file tests the length of stems and placement
+of beams";
+
+}
+
+\version "0.1.7";
+
+beamintervals = \melodic{
+ \meter 7/4;
+ \stemup;
+ \octave c';
+ [ c8 d ] [ c e ] [ c f ] [ c g ] [ c a ] [ c b ] [ c c' ] |
+ [ c 'b ] [ c 'a ] [ c 'g ] [ c 'f ] [ c 'e ] [ c 'd ] [ c 'c ] |
+ \octave c'';
+ [ c 'b ] [ c 'a ] [ c 'g ] [ c 'f ] [ c 'e ] [ c 'd ] [ c 'c ] |
+ \stemdown;
+ \octave c''';
+ [ c 'b ] [ c 'a ] [ c 'g ] [ c 'f ] [ c 'e ] [ c 'd ] [ c 'c ] |
+ \octave c'';
+ [ c 'b ] [ c 'a ] [ c 'g ] [ c 'f ] [ c 'e ] [ c 'd ] [ c 'c ] |
+ [ c d ] [ c e ] [ c f ] [ c g ] [ c a ] [ c b ] [ c c' ] |
+ }
+
+\score{
+ \melodic{
+ \octave c';
+ \stemup;
+ \meter 17/4;
+ 'g4 'a 'b c d e f g a b c' d' e' f' g' a' b' |
+ \stemdown
+ b' a' g' f' e' d' c' b a g f e d c 'b 'a 'g |
+ \beamintervals;
+ \transpose d \beamintervals;
+ \transpose e \beamintervals;
+ \transpose f \beamintervals;
+ \transpose g \beamintervals;
+ \transpose a \beamintervals;
+ \transpose b \beamintervals;
+ }
+ \paper{
+ gourlay_maxmeasures = 2.;
+ }
+}
MAJOR_VERSION = 0
MINOR_VERSION = 1
-PATCH_LEVEL = 37
+PATCH_LEVEL = 38
MY_PATCH_LEVEL =
Molecule sb = stem_beams (i, next, prev);
Real x = i->hpos_f ()-x0;
- sb.translate (Offset (x, (x * slope + left_pos)* inter_f));
+ sb.translate (Offset (x, (x * slope_f + left_y)* inter_f));
mol_p->add (sb);
}
mol_p->translate_axis (x0 - spanned_drul_[LEFT]->absolute_coordinate (X_AXIS), X_AXIS);
#include "lookup.hh"
#include "grouping.hh"
#include "stem-info.hh"
+#include "main.hh" // experimental features
-IMPLEMENT_IS_TYPE_B1(Beam, Spanner);
+IMPLEMENT_IS_TYPE_B1 (Beam, Spanner);
-Beam::Beam()
+const int MINIMUM_STEMLEN = 5;
+
+Beam::Beam ()
{
- slope = 0;
- left_pos = 0.0;
+ slope_f = 0;
+ left_y = 0.0;
}
void
}
Molecule*
-Beam::brew_molecule_p() const
+Beam::brew_molecule_p () const
{
Molecule *mol_p = new Molecule;
- // huh? inter-what
- // Real inter_f = paper()->interbeam_f ();
- Real inter_f = paper()->internote_f ();
- Real x0 = stems[0]->hpos_f();
- for (int j=0; j <stems.size(); j++)
+ Real inter_f = paper ()->internote_f ();
+ Real x0 = stems[0]->hpos_f ();
+ for (int j=0; j <stems.size (); j++)
{
Stem *i = stems[j];
Stem * prev = (j > 0)? stems[j-1] : 0;
- Stem * next = (j < stems.size()-1) ? stems[j+1] :0;
+ Stem * next = (j < stems.size ()-1) ? stems[j+1] :0;
Molecule sb = stem_beams (i, next, prev);
- Real x = i->hpos_f()-x0;
- sb.translate (Offset (x, (x * slope + left_pos)* inter_f));
+ Real x = i->hpos_f ()-x0;
+ sb.translate (Offset (x, (x * slope_f + left_y)* inter_f));
mol_p->add (sb);
}
- mol_p->translate_axis (x0 - spanned_drul_[LEFT]->absolute_coordinate(X_AXIS), X_AXIS);
+ mol_p->translate_axis (x0 - spanned_drul_[LEFT]->absolute_coordinate (X_AXIS), X_AXIS);
return mol_p;
}
Offset
-Beam::center() const
+Beam::center () const
{
- Real w=(paper()->note_width () + width ().length ())/2.0;
- return Offset (w, (left_pos + w* slope)*paper()->internote_f ());
+ Real w= (paper ()->note_width () + width ().length ())/2.0;
+ return Offset (w, (left_y + w* slope_f)*paper ()->internote_f ());
}
void
-Beam::do_pre_processing()
+Beam::do_pre_processing ()
{
if (!dir_)
- set_default_dir();
+ set_default_dir ();
}
void
-Beam::do_print() const
+Beam::do_print () const
{
#ifndef NPRINT
- DOUT << "slope " <<slope << "left ypos " << left_pos;
- Spanner::do_print();
+ DOUT << "slope_f " <<slope_f << "left ypos " << left_y;
+ Spanner::do_print ();
#endif
}
void
-Beam::do_post_processing()
+Beam::do_post_processing ()
{
- if (stems.size() < 2)
+ if (stems.size () < 2)
{
- warning (_("Beam with less than 2 stems"));
+ warning (_ ("Beam with less than 2 stems"));
transparent_b_ = true;
return ;
}
- solve_slope();
- set_stemlens();
+ solve_slope ();
+ set_stemlens ();
}
void
Beam::do_substitute_dependent (Score_elem*o,Score_elem*n)
{
- if (o->is_type_b (Stem::static_name()))
- stems.substitute ((Stem*)o->item(), n?(Stem*) n->item ():0);
+ if (o->is_type_b (Stem::static_name ()))
+ stems.substitute ((Stem*)o->item (), n? (Stem*) n->item ():0);
}
Interval
-Beam::do_width() const
+Beam::do_width () const
{
- return Interval (stems[0]->hpos_f(),
- stems.top()->hpos_f ());
+ return Interval (stems[0]->hpos_f (),
+ stems.top ()->hpos_f ());
}
void
-Beam::set_default_dir()
+Beam::set_default_dir ()
{
Drul_array<int> total;
total[UP] = total[DOWN] = 0;
count[UP] = count[DOWN] = 0;
Direction d = DOWN;
- for (int i=0; i <stems.size(); i++)
+ for (int i=0; i <stems.size (); i++)
do {
Stem *s = stems[i];
int current = s->dir_
? (1 + d * s->dir_)/2
- : s->get_center_distance(Direction(-d));
+ : s->get_center_distance (Direction (-d));
if (current)
{
*/
dir_ = (total[UP] * count[DOWN] > total[DOWN] * count[UP]) ? UP : DOWN;
- for (int i=0; i <stems.size(); i++)
+ for (int i=0; i <stems.size (); i++)
{
Stem *sl = stems[i];
sl->dir_ = dir_;
/*
should use minimum energy formulation (cf linespacing)
- [todo]
- the y of the (start) of the beam should be quantisized,
- so that no stafflines appear just in between two beam-flags
-
*/
void
-Beam::solve_slope()
+Beam::solve_slope ()
{
Array<Stem_info> sinfo;
- for (int j=0; j <stems.size(); j++)
+ for (int j=0; j <stems.size (); j++)
{
Stem *i = stems[j];
- i->set_default_extents();
- if (i->invisible_b())
+ i->set_default_extents ();
+ if (i->invisible_b ())
continue;
Stem_info info (i);
sinfo.push (info);
}
- if (! sinfo.size())
- slope = left_pos = 0;
- else if (sinfo.size() == 1)
+ if (! sinfo.size ())
+ slope_f = left_y = 0;
+ else if (sinfo.size () == 1)
{
- slope = 0;
- left_pos = sinfo[0].idealy_f_;
+ slope_f = 0;
+ left_y = sinfo[0].idealy_f_;
}
else
{
Real leftx = sinfo[0].x;
Least_squares l;
- for (int i=0; i < sinfo.size(); i++)
+ for (int i=0; i < sinfo.size (); i++)
{
sinfo[i].x -= leftx;
l.input.push (Offset (sinfo[i].x, sinfo[i].idealy_f_));
}
- l.minimise (slope, left_pos);
+ l.minimise (slope_f, left_y);
}
Real dy = 0.0;
- for (int i=0; i < sinfo.size(); i++)
+ for (int i=0; i < sinfo.size (); i++)
{
- Real y = sinfo[i].x * slope + left_pos;
+ Real y = sinfo[i].x * slope_f + left_y;
Real my = sinfo[i].miny_f_;
if (my - y > dy)
dy = my -y;
}
- left_pos += dy;
- left_pos *= dir_;
+ left_y += dy;
+ left_y *= dir_;
- slope *= dir_;
+ slope_f *= dir_;
/*
- This neat trick is by Werner Lemberg, damped = tanh (slope) corresponds
+ This neat trick is by Werner Lemberg, damped = tanh (slope_f) corresponds
with some tables in [Wanske]
*/
- slope = 0.6 * tanh (slope);
+ slope_f = 0.6 * tanh (slope_f);
+
+ quantise_yspan ();
- // ugh
- Real sl = slope*paper()->internote_f ();
- paper()->lookup_l ()->beam (sl, 20 PT);
- slope = sl /paper()->internote_f ();
+ // y-values traditionally use internote dimension: therefore slope = (y/in)/x
+ // but mf and beam-lookup use PT dimension for y (as used for x-values)
+ // ugh --- there goes our simplified but careful quantisation
+ Real sl = slope_f * paper ()->internote_f ();
+ paper ()->lookup_l ()->beam (sl, 20 PT);
+ slope_f = sl / paper ()->internote_f ();
}
void
-Beam::set_stemlens()
+Beam::quantise_yspan ()
{
+ /*
+ [Ross] (simplification of)
+ Try to set slope_f complying with y-span of:
+ - zero
+ - beam_thickness / 2 + staffline_thickness / 2
+ - beam_thickness + staffline_thickness
+ + n * interline
+ */
+ Real interline_f = paper ()->interline_f ();
+ Real internote_f = interline_f / 2;
+ Real staffline_thickness = paper ()->rule_thickness ();
+ Real beam_thickness = 0.48 * (interline_f - staffline_thickness);
+
+ const int QUANTS = 3;
+ Real qdy[QUANTS] = {
+ 0,
+ beam_thickness / 2 + staffline_thickness / 2,
+ beam_thickness + staffline_thickness
+ };
+
+ Real xspan_f = stems.top ()->hpos_f () - stems[0]->hpos_f ();
+ // y-values traditionally use internote dimension: therefore slope = (y/in)/x
+ Real yspan_f = xspan_f * abs (slope_f * internote_f);
+ int yspan_i = (int)(yspan_f / interline_f);
+ Real q = (yspan_f / interline_f - yspan_i) * interline_f;
+ int i = 0;
+ for (; i < QUANTS - 1; i++)
+ if ((q >= qdy[i]) && (q <= qdy[i + 1]))
+ {
+ if (q - qdy[i] < qdy[i + 1] - q)
+ break;
+ else
+ {
+ i++;
+ break;
+ }
+ }
+ q = qdy[i];
+
+ yspan_f = (Real)yspan_i * interline_f + q;
+ // y-values traditionally use internote dimension: therefore slope = (y/in)/x
+ slope_f = yspan_f / xspan_f / internote_f * sign (slope_f);
+}
+
+void
+Beam::quantise_left_y (Beam::Pos pos, bool extend_b)
+{
+ /*
+ quantising left y should suffice, as slope is quantised too
+ if extend then stems must not get shorter
+ */
+
+ Real interline_f = paper ()->interline_f ();
+ Real internote_f = interline_f / 2;
+ Real staffline_thickness = paper ()->rule_thickness ();
+ Real beam_thickness = 0.48 * (interline_f - staffline_thickness);
+
+ const int QUANTS = 6;
+ Real qy[QUANTS] = {
+ -staffline_thickness,
+ beam_thickness / 2,
+ beam_thickness + staffline_thickness / 2,
+ interline_f / 2 + beam_thickness / 2 + staffline_thickness / 2,
+ interline_f - staffline_thickness,
+ interline_f + beam_thickness / 2,
+ };
/*
- should check for visibility of stem..
+ ugh, using i triggers gcc 2.7.2.1 internal compiler error (far down):
+ for (int i = 0; i < QUANTS; i++)
*/
- Real x0 = stems[0]->hpos_f();
- for (int j=0; j <stems.size(); j++)
+ for (int ii = 0; ii < QUANTS; ii++)
+ qy[ii] -= beam_thickness / 2;
+ Pos qpos[QUANTS] = {
+ HANG,
+ STRADDLE,
+ SIT,
+ INTER,
+ HANG,
+ STRADDLE
+ };
+
+ // y-values traditionally use internote dimension
+ Real y = left_y * internote_f;
+ int y_i = (int)floor(y / interline_f);
+ y = (y / interline_f - y_i) * interline_f;
+
+ if (y < 0)
+ for (int ii = 0; ii < QUANTS; ii++)
+ qy[ii] -= interline_f;
+
+ int lower_i = 0;
+ int i = 0;
+ for (; i < QUANTS; i++)
{
- Stem *s = stems[j];
+ if (qy[i] > y)
+ break;
+ // found if lower_i is allowed, and nearer (from below) y than new pos
+ if ((pos & qpos[lower_i]) && (y - qy[lower_i] < y - qy[i]))
+ break;
+ // if new pos is allowed or old pos isn't: assign new pos
+ if ((pos & qpos[i]) || !(pos & qpos[lower_i]))
+ lower_i = i;
+ }
- Real x = s->hpos_f()-x0;
- s->set_stemend (left_pos + slope * x);
+ int upper_i = QUANTS - 1;
+ for (i = QUANTS - 1; i >= 0; i--)
+ {
+ if (qy[i] < y)
+ break;
+ // found if upper_i is allowed, and nearer (from above) y than new pos
+ if ((pos & qpos[upper_i]) && (qy[upper_i] - y < qy[i] - y))
+ break;
+ // if new pos is allowed or old pos isn't: assign new pos
+ if ((pos & qpos[i]) || !(pos & qpos[upper_i]))
+ upper_i = i;
}
+
+ // y-values traditionally use internote dimension
+ Real upper_y = (qy[upper_i] + interline_f * y_i) / internote_f;
+ Real lower_y = (qy[lower_i] + interline_f * y_i) / internote_f;
+
+ if (extend_b)
+ left_y = (dir_ > 0 ? upper_y : lower_y);
+ else
+ left_y = (upper_y - left_y < y - lower_y ? upper_y : lower_y);
+}
+
+void
+Beam::set_stemlens ()
+{
+ Real x0 = stems[0]->hpos_f ();
+ Real dy = 0;
+
+ Real interline_f = paper ()->interline_f ();
+ Real internote_f = interline_f / 2;
+ Real staffline_thickness = paper ()->rule_thickness ();
+ Real beam_thickness = 0.48 * (interline_f - staffline_thickness);
+ Real xspan_f = stems.top ()->hpos_f () - stems[0]->hpos_f ();
+ /*
+ ugh, y values are in "internote" dimension
+ */
+ Real yspan_f = xspan_f * abs (slope_f * internote_f);
+ int yspan_i = (int)(yspan_f / interline_f);
+
+ Pos left_pos = NONE;
+
+ if (yspan_f < staffline_thickness / 2)
+ left_pos = (Pos)(STRADDLE | SIT | HANG);
+ else
+ left_pos = (Pos) (sign (slope_f) > 0 ? STRADDLE | HANG
+ : SIT | STRADDLE);
+
+ /*
+ ugh, slope currently mangled by availability mf chars...
+ be more generous regarding beam position between stafflines
+ */
+ Real q = (yspan_f / interline_f - yspan_i) * interline_f;
+ if (q < interline_f / 3 - beam_thickness / 2)
+ left_pos = (Pos) (left_pos | INTER);
+
+ if (stems[0]->beams_right_i_ > 1)
+ left_pos = (Pos)(left_pos & (STRADDLE | INTER));
+
+ // ugh, rounding problems!
+ const Real EPSILON = interline_f / 10;
+ do
+ {
+ left_y += dy * dir_;
+ quantise_left_y (left_pos, dy);
+ dy = 0;
+ for (int j=0; j < stems.size (); j++)
+ {
+ Stem *s = stems[j];
+
+ Real x = s->hpos_f () - x0;
+ s->set_stemend (left_y + slope_f * x);
+ Real y = s->stem_length_f ();
+ if (y < MINIMUM_STEMLEN)
+ dy = dy >? (MINIMUM_STEMLEN - y);
+ }
+ } while (abs (dy) > EPSILON);
}
void
Beam::set_grouping (Rhythmic_grouping def, Rhythmic_grouping cur)
{
- def.OK();
- cur.OK();
- assert (cur.children.size() == stems.size ());
+ def.OK ();
+ cur.OK ();
+ assert (cur.children.size () == stems.size ());
cur.split (def);
Array<int> b;
{
Array<int> flags;
- for (int j=0; j <stems.size(); j++)
+ for (int j=0; j <stems.size (); j++)
{
Stem *s = stems[j];
b= cur.generate_beams (flags, fi);
b.insert (0,0);
b.push (0);
- assert (stems.size() == b.size ()/2);
+ assert (stems.size () == b.size ()/2);
}
- for (int j=0, i=0; i < b.size() && j <stems.size (); i+= 2, j++)
+ for (int j=0, i=0; i < b.size () && j <stems.size (); i+= 2, j++)
{
Stem *s = stems[j];
s->beams_left_i_ = b[i];
Molecule
Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const
{
- assert (!next || next->hpos_f() > here->hpos_f ());
- assert (!prev || prev->hpos_f() < here->hpos_f ());
- // Real dy=paper()->internote_f ()*2;
- Real dy = paper()->interbeam_f ();
- Real stemdx = paper()->rule_thickness ();
- Real sl = slope*paper()->internote_f ();
- paper()->lookup_l ()->beam (sl, 20 PT);
+ assert (!next || next->hpos_f () > here->hpos_f ());
+ assert (!prev || prev->hpos_f () < here->hpos_f ());
+ // Real dy=paper ()->internote_f ()*2;
+ Real dy = paper ()->interbeam_f ();
+ Real stemdx = paper ()->rule_thickness ();
+ Real sl = slope_f*paper ()->internote_f ();
+ paper ()->lookup_l ()->beam (sl, 20 PT);
Molecule leftbeams;
Molecule rightbeams;
Real w = (here->hpos_f () - prev->hpos_f ())/4;
Atom a;
if (lhalfs) // generates warnings if not
- a = paper()->lookup_l ()->beam (sl, w);
+ a = paper ()->lookup_l ()->beam (sl, w);
a.translate (Offset (-w, -w * sl));
for (int j = 0; j < lhalfs; j++)
{
int rhalfs = here->beams_right_i_ - next->beams_left_i_;
int rwholebeams = here->beams_right_i_ <? next->beams_left_i_;
- Real w = next->hpos_f() - here->hpos_f ();
- Atom a = paper()->lookup_l ()->beam (sl, w + stemdx);
+ Real w = next->hpos_f () - here->hpos_f ();
+ Atom a = paper ()->lookup_l ()->beam (sl, w + stemdx);
int j = 0;
Real gap_f = 0;
rightbeams.add (b);
}
// TODO: notehead widths differ for different types
- gap_f = paper()->note_width () / 2;
+ gap_f = paper ()->note_width () / 2;
w -= 2 * gap_f;
- a = paper()->lookup_l ()->beam (sl, w + stemdx);
+ a = paper ()->lookup_l ()->beam (sl, w + stemdx);
}
for (; j < rwholebeams; j++)
w /= 4;
if (rhalfs)
- a = paper()->lookup_l ()->beam (sl, w);
+ a = paper ()->lookup_l ()->beam (sl, w);
for (; j < rwholebeams + rhalfs; j++)
{
Dynamic_engraver::do_pre_move_processing()
{
Staff_symbol* s_l = get_staff_info().staff_sym_l_;
- if (dynamic_p_)
- {
-
- dynamic_p_->add_support (s_l);
- typeset_element (dynamic_p_);
- dynamic_p_ = 0;
- }
if (to_end_cresc_p_)
{
if (dynamic_p_)
typeset_element (to_end_cresc_p_);
to_end_cresc_p_ = 0;
}
+ if (dynamic_p_)
+ {
+
+ dynamic_p_->add_support (s_l);
+ typeset_element (dynamic_p_);
+ dynamic_p_ = 0;
+ }
}
direction */
class Beam: public Directional_spanner {
public:
+ enum Pos { NONE, SIT = 1, STRADDLE = 2, HANG = 4, INTER = 8 };
+
Link_array<Stem> stems;
/// the slope of the beam in posns / point (dimension)
- Real slope;
+ Real slope_f;
/// position of leftmost end of beam
- Real left_pos;
+ Real left_y;
/* *************** */
void add (Stem*);
void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current);
- void set_stemlens();
- SCORE_ELEM_CLONE(Beam);
+ void set_stemlens ();
+ SCORE_ELEM_CLONE (Beam);
protected:
- virtual Interval do_width() const;
- Offset center() const;
- void set_default_dir();
- virtual void do_pre_processing();
- virtual void do_post_processing();
+ virtual Interval do_width () const;
+ Offset center () const;
+ void set_default_dir ();
+ virtual void do_pre_processing ();
+ virtual void do_post_processing ();
virtual void do_substitute_dependent (Score_elem*, Score_elem*);
virtual void do_print() const;
+ virtual void quantise_left_y (Beam::Pos pos, bool extend_b);
virtual Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
- virtual void solve_slope();
- virtual Molecule*brew_molecule_p() const;
+ virtual void solve_slope ();
+ virtual void quantise_yspan ();
+ virtual Molecule*brew_molecule_p () const;
};
#endif // BEAM_HH
VIRTUAL_COPY_CONS(Midi_def, Music_output_def);
DECLARE_MY_RUNTIME_TYPEINFO;
- /// duration of whole note
- Real whole_seconds_f_;
+ /// duration of whole note measured in seconds.
+ Moment whole_in_seconds_mom_;
Midi_def();
- Midi_def (Midi_def const& midi_c_r);
~Midi_def();
Real duration_to_seconds_f (Moment);
*/
class Staff_side : virtual Score_elem {
Link_array<Score_elem> support_l_arr_;
- int staff_size_i_;
+
Interval support_height() const;
- Staff_symbol* staff_sym_l_;
Real get_position_f() const;
- void read_staff_sym();
public:
/**
}
ret.dim_.x() = Interval (0,wid);
+ // ret.translate_axis (-ret.dim_[Y_AXIS][DOWN], Y_AXIS);
return ret;
}
set_tempo (Moment (1, 4), 60);
}
-Midi_def::Midi_def (Midi_def const& s)
- : Music_output_def (s)
-{
- whole_seconds_f_ = s.whole_seconds_f_;
- outfile_str_ = s.outfile_str_;
-}
-
Midi_def::~Midi_def()
{
}
Midi_def::duration_to_seconds_f (Moment mom)
{
if (!mom)
- return 0;
+ return 0;
- return Moment (whole_seconds_f_) * mom;
+ return Moment (whole_in_seconds_mom_) * mom;
}
-
int
-Midi_def::get_tempo_i (Moment moment)
+Midi_def::get_tempo_i (Moment one_beat_mom)
+{
+ Moment wholes_per_min = Moment(60) /Moment(whole_in_seconds_mom_);
+ int beats_per_min = wholes_per_min / one_beat_mom;
+ return int (beats_per_min);
+}
+
+void
+Midi_def::set_tempo (Moment one_beat_mom, int beats_per_minute_i)
{
- return Moment (whole_seconds_f_) * Moment (60) * moment;
+ Moment beats_per_second = Moment (beats_per_minute_i) / Moment (60);
+ whole_in_seconds_mom_ = 1/(beats_per_second * one_beat_mom);
}
void
{
#ifndef NPRINT
DOUT << "Midi {";
- DOUT << "4/min: " << Real (60) / (whole_seconds_f_ * 4);
+ DOUT << "4/min: " << Real (60) / (whole_in_seconds_mom_ * 4);
DOUT << "out: " << outfile_str_;
DOUT << "}\n";
#endif
}
-void
-Midi_def::set_tempo (Moment moment, int count_per_minute_i)
-{
- whole_seconds_f_ = Moment (count_per_minute_i) / Moment (60) / moment;
-}
-
-IMPLEMENT_IS_TYPE_B1( Midi_def, Music_output_def);
+IMPLEMENT_IS_TYPE_B1(Midi_def, Music_output_def);
Staff_side::Staff_side()
{
- y_=0;
+ y_=0;
sym_int_ = Interval (0,0);
dir_ = CENTER;
inside_staff_b_ = false;
if (!dir_)
{
warning (_("Staff_side::get_position_i(): "
- "somebody forgot to set my vertical direction, returning -20"));
+ "somebody forgot to set my vertical direction, returning -20"));
return -20;
}
return yextent_drul_[dir_];
}
-
void
Stem::set_stemend (Real se)
{
Real beamdy = paper ()->interline_f () / 2;
int beams_i = 0;
- Real slope = paper ()->internote_f () / 4;
+ Real slope_f = paper ()->internote_f () / 4;
if (beam_l_) {
// huh?
- slope = 2 * beam_l_->slope;
+ slope_f = 2 * beam_l_->slope_f;
// ugh, rather calc from Abbreviation_req
beams_i = beams_right_i_ >? beams_left_i_;
}
- paper ()->lookup_l ()->beam (slope, 20 PT);
+ paper ()->lookup_l ()->beam (slope_f, 20 PT);
Molecule beams;
- Atom a (paper ()->lookup_l ()->beam (slope, w));
- a.translate (Offset(- w / 2, stem_end_f () - (w / 2 * slope)));
+ Atom a (paper ()->lookup_l ()->beam (slope_f, w));
+ a.translate (Offset(- w / 2, stem_end_f () - (w / 2 * slope_f)));
// ugh
if (!beams_i)
Atom
Lookup::beam (Real &slope, Real width) const
{
+ const Real MAX_SLOPE = 0.6;
+ const Real SLOPES = 20.0;
int sidx = 0;
- if (abs (slope) > 1.0)
+ if (abs (slope) > MAX_SLOPE)
{
- WARN << _("beam steeper than 1.0 (") << slope << ")\n";
- slope = sign (slope);
+ WARN << _("beam too steep (") << slope << ")\n";
+ slope = sign (slope) * MAX_SLOPE;
}
- sidx = int (rint (slope * 20.0));
- slope = sidx / 20.0;
+ sidx = int (rint (slope / MAX_SLOPE * SLOPES));
+ slope = MAX_SLOPE * sidx / SLOPES;
Interval xdims = (*symtables_p_)("beamslopes")->lookup ("slope").dim_[X_AXIS];
Real min_wid = xdims[LEFT];
Begin3
Titel: LilyPond
-Versie: 0.1.37
-Inschrijf datum: 12DEC97
+Versie: 0.1.38
+Inschrijf datum: 24DEC97
Beschrijving: LilyPond is de muziek typesetter van het GNU Project.
Het programma genereert muziek in zichtbare of
hoorbare vorm uit uit een muzikale definitie file:
jan@digicash.com (Jan Nieuwenhuizen)
Onderhouden door: hanwen@stack.nl (Han-Wen Nienhuys)
Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
- 395k lilypond-0.1.37.tar.gz
+ 395k lilypond-0.1.38.tar.gz
Oorspronkelijke plek: pcnov095.win.tue.nl /pub/lilypond/
- 395k lilypond-0.1.37.tar.gz
+ 395k lilypond-0.1.38.tar.gz
Copi"eer politie: GPL
End
Begin3
Title: LilyPond
-Version: 0.1.37
-Entered-date: 12DEC97
+Version: 0.1.38
+Entered-date: 24DEC97
Description: LilyPond is the GNU Project music typesetter. The program
generates visual or auditive output from a music
definition file: it can typeset formatted sheet music
jan@digicash.com (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 460k lilypond-0.1.37.tar.gz
+ 460k lilypond-0.1.38.tar.gz
Original-site: pcnov095.win.tue.nl /pub/lilypond/development/
- 460k lilypond-0.1.37.tar.gz
+ 460k lilypond-0.1.38.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 0.1.37
+Version: 0.1.38
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: alpha.gnu.org:/gnu/lilypond/development/lilypond-0.1.37.tar.gz
+Source0: alpha.gnu.org:/gnu/lilypond/development/lilypond-0.1.38.tar.gz
Summary: A program for typesetting music.
URL: http://www.stack.nl/~hanwen/lilypond
Packager: Han-Wen Nienhuys <hanwen@stack.nl>
make prefix="$RPM_BUILD_ROOT/usr" install
%files
%doc Documentation/out/AUTHORS.text Documentation/out/CodingStyle.text Documentation/out/INSTALL.text Documentation/out/MANIFESTO.text Documentation/out/convert-mudela.text Documentation/out/faq.text Documentation/out/gnu-music.text Documentation/out/index.text Documentation/out/internals.text Documentation/out/language.text Documentation/out/lilypond.text Documentation/out/links.text Documentation/out/literature.text Documentation/out/mi2mu.text Documentation/out/mudela-book.text Documentation/out/mutopia.text Documentation/out/other-packages.text BUGS TODO NEWS DEDICATION ANNOUNCE README
-%doc input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/font.ly input/font20.ly input/gallina.ly input/gallina.tex input/gourlay.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/sleur.ly input/slurs.ly input/standchen-16.ly input/standchen-16.tex input/standchen-20.ly input/standchen-20.tex input/standchen.ly input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wtk1-fugue1.ly input/wtk1-fugue2.ly input/wtk1-prelude1.ly Documentation/mudela-course.doc Documentation/mudela-man.doc
+%doc input/beams.ly input/cadenza.ly input/collisions.ly input/coriolan-alto.ly input/font.ly input/font20.ly input/gallina.ly input/gallina.tex input/gourlay.ly input/keys.ly input/kortjakje.ly input/multi.ly input/pedal.ly input/rhythm.ly input/scales.ly input/scripts.ly input/scsii-menuetto.ly input/scsii-menuetto.tex input/sleur.ly input/slurs.ly input/standchen-16.ly input/standchen-16.tex input/standchen-20.ly input/standchen-20.tex input/standchen.ly input/stem.ly input/toccata-fuga-E.ly input/twinkle-pop.ly input/twinkle.ly input/wtk1-fugue1.ly input/wtk1-fugue2.ly input/wtk1-prelude1.ly Documentation/mudela-course.doc Documentation/mudela-man.doc
%doc Documentation/out/lelie_logo.gif
/usr/bin/convert-mudela
/usr/bin/mudela-book
- lo-res fixes.
- work out sizes of character fonts.
- more symbols
- * some scripts: flageolet
* piano pedals,
* trills
* maxima notehead
enddef;
fet_beginchar("8th rest","3","eighthrest");
- set_char_box(0, 4/3interline#,-interline#, 8/3interline#+3/2stafflinethickness#);
+ set_char_box(0, 4/3interline#,-interline#, 8/3interline#+7/4stafflinethickness#);
save x,y, ht;
ht = h + d;
x1=w-stem/6; y1=ht-flare/4;
alpha=74;
cw#=7/6interline#;
% h#=5/3interline#+interline#+2stafflinethickness#;
- h#=5/3interline#+interline#+3/2stafflinethickness#;
+ h#=5/3interline#+interline#+7/4stafflinethickness#;
w#=cw#+(h#-3/2interline#)/tand(alpha);
set_char_box(0,w#,0,h#);
define_pixels(cw);
save alpha,cw,h,w;
alpha=76;
cw#=7/6interline#;
- h#=5/3interline#+2interline#+3/2stafflinethickness#;
+ h#=5/3interline#+2interline#+7/4stafflinethickness#;
w#=cw#+(h#-3/2interline#)/tand(alpha);
set_char_box(0,w#,0,h#);
define_pixels(cw);
save alpha,cw,h,w;
alpha=78;
cw#=7/6interline#;
- h#=5/3interline#+3interline#+3/2stafflinethickness#;
+ h#=5/3interline#+3interline#+7/4stafflinethickness#;
w#=cw#+(h#-3/2interline#)/tand(alpha);
set_char_box(0,w#,0,h#);
define_pixels(cw);
save alpha,cw,h,w;
alpha=78;
cw#=7/6interline#;
- h#=5/3interline#+4interline#+3/2stafflinethickness#;
+ h#=5/3interline#+4interline#+7/4stafflinethickness#;
w#=cw#+(h#-3/2interline#)/tand(alpha);
set_char_box(0,w#,0,h#);
define_pixels(cw);
input feta-banier;
input feta-klef;
else:
- input feta-bolletjes;
- input feta-banier;
+% input feta-bolletjes;
+% input feta-banier;
% input feta-eindelijk;
% input feta-klef;
% input feta-toevallig;
+ input feta-schrift;
fi
penpos7(thickness, 135);
penpos8(1.5 thinnib, - 70 + angle downstroke_dir);
- penpos9(1.5 thickness, -80);
+ penpos9(1.4 thickness, -80); % ugh
penpos10(whatever, downstroke_angle + 10);
penpos11(thinnib, downstroke_angle + 90);
penpos12(thinnib, -90);
filldraw z2l{right} .. z3l.. z4l{left} .. z5l{up} .. z7l{up}
%.. z8l
+ .. tension 1.2
.. z9l & z9l ..
{downstroke_dir}z10l --- z11l -- z11r --- z10r{- downstroke_dir}
.. tension .8
- .. z9r & z9r
+ .. z9r & z9r{dir (downstroke_angle+ 40)} % ugh
%.. z8r
.. z7r{down} .. z5r{down} .. z4r{right}
.. z3r .. z2r{left} ..
--- /dev/null
+% feta-nummer-generic.mf
+% part of LilyPond's pretty-but-neat music font
+
+test:=0;
+
+input autometric;
+fet_beginfont("feta-nummer", size);
+mode_setup;
+
+input feta-macros;
+input feta-params;
+height#:=designsize;
+
+save b,h; 4h+b=1.15; 10h+b=1;
+fatten:=designsize*h+b;
+save b,h; 4h+b=1.05; 10h+b=1;
+widen:=designsize*h+b;
+tense=0.85;
+thick#:=7/30height#*fatten;
+thin#:=thick#/4*fatten;
+hair#:=blot_diameter#;
+flare#:=9/8thick#/fatten;
+save b,h; 4h+b=1/8; 10h+b=1/6;
+kuulleke#:=thick#*designsize*h+b;
+foot_top#:=thick#;
+foot_width#:=9/4thick#;
+
+input feta-nummer;
+
+fet_endfont("feta-nummer");
+
fet_begingroup("nummer")
code := 47;
-define_pixels(height,thick,thick,thin,hair);
-foot_top#:=thick#;
-foot_width#:=9/4thick#/fatten;
+define_pixels(height,thick,thick,thin,hair,flare);
define_pixels(foot_top,foot_width);
define_pixels(kuulleke);
penpos5(7/8thick,180);
z5r=(0,y1);
penpos6(hair,90);
- z6r=(w-9/8thick*flaren,h);
+ z6r=(w-flare,h);
penpos7(7/8thick,180);
z7r=(0,h/2);
penpos10(7/8thick,180);
..tension t..z4r{left}
..tension t..z7r{up}..tension t..z6r{right}
..z6l{left}..tension t..z7l{down}..z10l{up}..cycle;
- draw_flare(z6r,0,-90,hair,thick*flaren);
+ draw_flare(z6r,0,-90,hair,flare);
unfill z2l{right}..tension t..z3l{down}..tension t
..z4l{left}..tension t..z10l{up}..tension t..cycle;
enddef;
message "h:"&decimal h;
penpos1(thin,90);
z1r=(w/2,h);
- penpos2(thick,0);
- z2r=(w,h/2);
+ penpos2(thick,180);
+ z2r=(0,h/2);
penpos3(thin,-90);
z3r=(w/2,0);
- penpos4(thick,180);
- z4r=(0,h/2);
+ penpos4(thick,0);
+ z4r=(w,h/2);
fill z1r..z2r..z3r..z4r..cycle;
save t; t=1/tense;
+ penlabels(1,2,3,4);
unfill z1l..tension t..z2l..tension t..z3l
..tension t..z4l..tension t..cycle;
fet_endchar;
z1=(0,0)+(1/2sqrt(2)*hair)*dir(45);
penpos3(hair,90+gamma);
z3=(w,thick)+(1/2sqrt(2)*hair)*dir(-135);
- penpos2(thick/fatten,90+alpha);
+ penpos2(thick,90+alpha);
x2-x1=x3-x2; y2=11/16thick/widen;
- penlabels(1,2,3);
fill z1r{dir(beta)}..{dir(alpha)}z2r..{dir(gamma)}z3r
..z3l{dir(180+gamma)}..{dir(180+alpha)}z2l
..{dir(180+beta)}z1l..cycle;
- penpos4(thin,90);
- z4r=(thick,2/5h);
- penpos5(thick,0);
- z5r=(w-thin/2,.72h);
- penpos6(thin,90);
- z6r=(1/2hair+thick*flaren,h);
- penlabels(4,5,6);
+ penpos4(thick,0);
+ z4r=(w-thin/2,.72h);
+ penpos5(thin,90);
+ z5r=(1/2hair+flare,h);
+ penlabels(1,2,3,4);
+ penlabels(5,6);
save t; t=tense;
- fill z1l{dir(beta)}..z4l{dir(theta)}..z5r{up}
- ..tension t..z6r{left}..z6l{right}
- ..z5l{down}..z4r{dir(180+theta)}
+ fill z1l{dir(beta)}..tension t..z4r{up}
+ ..tension t..z5r{left}..z5l{right}
+ ..z4l{down}..tension t
..{dir(180+beta)}z1r..cycle;
- draw_flare(z6r,180,90,thin,thick*flaren);
+ draw_flare(z5r,180,90,thin,flare);
fet_endchar;
fet_beginchar("Numeral 3", "3", "three")
z1l=(17/16thick,h);
penpos2(7/8thick,180);
z2l=(w-thick/8,3/4h+thick/16);
- penpos3(hair,90);
+ penpos3(thin,90);
z3=(w/2,h/2+1/8thick);
- penpos4(hair,90);
- z4=(5/8thick,y3);
+ penpos4(thin,90);
+ z4=(5/8thick+1/2thin,y3);
penpos5(thick,0);
z5r=(w,1/4h+thick/16);
penpos6(hair,-90);
z6r=(9/8thick,0);
- penpos7(thin+hair,90);
-% z7=(x2,y3);
+ penpos7(3/2thin,90);
z7=(x5,y3);
penlabels(1,2,3,4,5,6,7);
save alpha; alpha=25;
..tension t..z3l{left}..z4l{left}
..z4r{right}..z3r{right}..tension t..z2r{up}
..tension t..z1r{left}..cycle;
- draw_flare(z1l,180,90,hair,thick*flaren);
- draw_flare(z6r,180,-90,hair,9/8thick*flaren);
+ draw_flare(z1l,180,90,hair,7/8flare);
+ draw_flare(z6r,180,-90,hair,flare);
fet_endchar;
fet_beginchar("Numeral 4", "4", "four")
save alpha; alpha=beta;
calc_kuulleke(thick,alpha);
- z1r=(w-3/4thick,height-(thin+1/2hair)/cosd(alpha));
+ z1r=(w-3/4thick,height-(3/2thin)/cosd(alpha));
penpos5(thick,0);
z5=(x1,foot_top);
..tension t..z11r{left}
..z11l{right}..tension t..z10l{up}..tension t
..z9l{left}..z8l{dir(180+beta+10)}..cycle;
- draw_flare(z11r,180,-90,hair,9/8thick*flaren);
+ draw_flare(z11r,180,-90,hair,flare);
fet_endchar;
fet_beginchar("Numeral 6", "6", "six")
z1=(3/2thin,h-(thick+thin)/2);
penpos3(thin,90+beta);
z3=(w,h)+(1/2sqrt(2)*thin)*dir(-135);
- penpos2(thick/fatten,90+alpha);
+ penpos2(thick,90+alpha);
x2=1/2[x1,x3]-1/4thick; y2=h-15/16thick+thin*widen;
penpos4(thin,0);
penpos9(hair,90+180+beta);
z9=(2/3w,h/2);
penlabels(1,2,3,4,5,6,7,8,9);
-% save t; t=0.85;
save t; t=tense;
fill z2r{dir(180+beta)}..z3r{down}..z4r{right}
..z5r{dir(90+alpha)}..z6r{dir(90+alpha)}
% feta-nummer10.mf
% part of LilyPond's pretty-but-neat music font
-input autometric;
+size:=10;
-fet_beginfont("feta-nummer", 10);
-
-mode_setup;
-
-test:=0;
-input feta-macros;
-input feta-params;
-
-height#:=designsize;
-
-fatten:=1;
-widen:=1;
-flaren:=1;
-tense=0.85;
-thick#:=7/30height#*fatten;
-thin#:=thick#/4*fatten;
-hair#:=blot_diameter#;
-kuulleke#:=1/8thick#;
-
-input feta-nummer;
-
-fet_endfont("feta-nummer");
+input feta-nummer-generic;
end.
% feta-nummer4.mf
% part of LilyPond's pretty-but-neat music font
-input autometric;
+% size:=4;
+size:=16*4/15;
-fet_beginfont("feta-nummer", 4);
-
-mode_setup;
-
-test:=0;
-input feta-macros;
-input feta-params;
-
-height#:=designsize;
-
-fatten:=1.15;
-widen:=1.05;
-flaren:=0.88;
-tense=0.85;
-thick#:=7/30height#*fatten;
-hair#:=blot_diameter#;
-thin#:=hair#;
-kuulleke#:=1/8thick#;
-
-input feta-nummer;
-
-fet_endfont("feta-nummer");
+input feta-nummer-generic.mf;
end.
% feta-nummer5.mf
% part of LilyPond's pretty-but-neat music font
-input autometric;
+% size:=5;
+size:=20*4/15;
-fet_beginfont("feta-nummer", 5);
-
-mode_setup;
-
-test:=0;
-input feta-macros;
-input feta-params;
-
-height#:=designsize;
-
-fatten:=1.12;
-widen:=1.03;
-flaren:=0.9;
-tense=0.85;
-thick#:=7/30height#*fatten;
-hair#:=blot_diameter#;
-thin#:=hair#;
-kuulleke#:=1/8thick#;
-
-input feta-nummer;
-
-fet_endfont("feta-nummer");
+input feta-nummer-generic.mf;
end.
% feta-nummer8.mf
% part of LilyPond's pretty-but-neat music font
-input autometric;
+size:=8;
-fet_beginfont("feta-nummer", 8);
-
-mode_setup;
-
-test:=0;
-input feta-macros;
-input feta-params;
-
-height#:=designsize;
-
-fatten:=1;
-widen:=1;
-flaren:=1;
-tense=0.85;
-thick#:=7/30height#*fatten;
-thin#:=thick#/4*fatten;
-hair#:=blot_diameter#;
-kuulleke#:=1/8thick#;
-
-input feta-nummer;
-
-fet_endfont("feta-nummer");
+input feta-nummer-generic.mf;
end.
% source file of the Feta (Font-En-Tja) music font
%
% (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+% Jan Nieuwenhuizen <jan@digicash.com>
%
set_char_box(.9 interline#, .9 interline#, .5 interline#, .5 interline#);
save thickness, diminish;
- thickness = 2 stafflinethickness;
+ thickness = 3/2 stafflinethickness;
pickup pencircle scaled thickness;
% prevent blobs at crossing lines
labels(1,2,3);
fet_endchar;
+fet_beginchar("Flageolet", "flageolet", "flageolet")
+ save height,width,thickness;
+ height#=4/15 staffsize#;
+ width#=height#;
+ thickness#=blot_diameter#;
+ define_pixels(height,width,thickness);
+ set_char_box(width#/2,width#/2,height#/2,height#/2);
+
+ pickup pencircle scaled thickness;
+ x1= .5 [x2, x4];
+ x1 = 0;
+ top y1=height/2;
+ rt x4 - lft x2 =width;
+ y2 = 0;
+ y4=y2;
+ x3=x1;
+ bot y3=-height/2;
-
+ penlabels(1,2,3,4);
+ draw z1..z2..z3..z4..cycle;
+fet_endchar;
fet_endgroup("scripts");
pen beam_pen;
beam_pen:=penrazor scaled beamheight rotated 90;
-elem_tan:=0.05;
+max_slope:=0.6;
slopes:=20;
+elem_tan:=max_slope/slopes;
lengths:=6;
elem_factor := 2;
elem_initial_len:=2;
% Creator: mf-to-table.py version 0.4
-% Automatically generated on Fri Dec 12 11:29:20 1997
+% Automatically generated on Wed Dec 24 16:38:34 1997
% Do not edit
% input from out/feta16.log
% name
\fetdef\trill{41}
\fetdef\pedalheel{42}
\fetdef\pedaltoe{43}
+\fetdef\flageolet{44}
% flags
-\fetdef\eighthflag{44}
-\fetdef\sixteenthflag{45}
-\fetdef\thirtysecondflag{46}
-\fetdef\sixtyfourthflag{47}
-\fetdef\deighthflag{48}
-\fetdef\dsixteenthflag{49}
-\fetdef\dthirtysecondflag{50}
-\fetdef\dsixtyfourthflag{51}
+\fetdef\eighthflag{45}
+\fetdef\sixteenthflag{46}
+\fetdef\thirtysecondflag{47}
+\fetdef\sixtyfourthflag{48}
+\fetdef\deighthflag{49}
+\fetdef\dsixteenthflag{50}
+\fetdef\dthirtysecondflag{51}
+\fetdef\dsixtyfourthflag{52}
% clefs
-\fetdef\altoclef{52}
-\fetdef\caltoclef{53}
-\fetdef\bassclef{54}
-\fetdef\cbassclef{55}
-\fetdef\violinclef{56}
-\fetdef\cviolinclef{57}
+\fetdef\altoclef{53}
+\fetdef\caltoclef{54}
+\fetdef\bassclef{55}
+\fetdef\cbassclef{56}
+\fetdef\violinclef{57}
+\fetdef\cviolinclef{58}
% Creator: mf-to-table.py version 0.4
-% Automatically generated on Fri Dec 12 11:29:22 1997
+% Automatically generated on Wed Dec 24 16:38:42 1997
% Do not edit
% input from out/feta20.log
% name
\fetdef\trill{41}
\fetdef\pedalheel{42}
\fetdef\pedaltoe{43}
+\fetdef\flageolet{44}
% flags
-\fetdef\eighthflag{44}
-\fetdef\sixteenthflag{45}
-\fetdef\thirtysecondflag{46}
-\fetdef\sixtyfourthflag{47}
-\fetdef\deighthflag{48}
-\fetdef\dsixteenthflag{49}
-\fetdef\dthirtysecondflag{50}
-\fetdef\dsixtyfourthflag{51}
+\fetdef\eighthflag{45}
+\fetdef\sixteenthflag{46}
+\fetdef\thirtysecondflag{47}
+\fetdef\sixtyfourthflag{48}
+\fetdef\deighthflag{49}
+\fetdef\dsixteenthflag{50}
+\fetdef\dthirtysecondflag{51}
+\fetdef\dsixtyfourthflag{52}
% clefs
-\fetdef\altoclef{52}
-\fetdef\caltoclef{53}
-\fetdef\bassclef{54}
-\fetdef\cbassclef{55}
-\fetdef\violinclef{56}
-\fetdef\cviolinclef{57}
+\fetdef\altoclef{53}
+\fetdef\caltoclef{54}
+\fetdef\bassclef{55}
+\fetdef\cbassclef{56}
+\fetdef\violinclef{57}
+\fetdef\cviolinclef{58}
\font\fetanummer=feta-nummer8
\font\dynfont=feta-din10 scaled \magstep1
\font\bracefont=feta-braces16
- \font\fingerfont=feta-nummer4
+ \font\fingerfont=feta-nummer4
}
\def\fettwentydefs{
\font\fontentja=feta20
\font\fetanummer=feta-nummer10
\font\dynfont=feta-din10 scaled \magstep2
\font\bracefont=feta-braces20
- \font\fingerfont=feta-nummer5
+ \font\fingerfont=feta-nummer5
}
\def\fetdef#1#2{\def#1{%