From: fred Date: Sun, 24 Mar 2002 20:04:26 +0000 (+0000) Subject: lilypond-0.1.38 X-Git-Tag: release/1.5.59~3510 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c2f7b9de03ec732215327353130505c5c025737a;p=lilypond.git lilypond-0.1.38 --- diff --git a/Documentation/INSTALL.pod b/Documentation/INSTALL.pod index 674ef65a4d..b9580ea831 100644 --- a/Documentation/INSTALL.pod +++ b/Documentation/INSTALL.pod @@ -328,10 +328,10 @@ simply type: bash configure make -Note: If you rely on broken DOS/Windows tools such as pkzip/WinZIP - to unpack the distribution, make sure the B source tree - is unpacked correctly, in particular the empty out directories - (F, F et. al.) +B If you rely on broken DOS/Windows tools such as pkzip/WinZIP +to unpack the distribution, make sure the B source tree +is unpacked correctly, in particular the empty out directories +(F, F et. al.) =head1 AUTHORS diff --git a/NEWS b/NEWS index 5f13289344..650f5ba4db 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,20 @@ +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) diff --git a/TODO b/TODO index 4a10ab8b8c..02e8452ce5 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,5 @@ 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 @@ -7,8 +7,14 @@ Most of the items are marked in the code as well, with full explanation. 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} diff --git a/VERSION b/VERSION index f9754fe8f7..1cd375d593 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ 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: diff --git a/flower/include/varray.hh b/flower/include/varray.hh index 191b9ca0b6..8386c20a8c 100644 --- a/flower/include/varray.hh +++ b/flower/include/varray.hh @@ -11,7 +11,7 @@ /// copy a bare (C-)array from #src# to #dest# sized #count# template 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++; } diff --git a/init/feta16.ly b/init/feta16.ly index 303b8a167b..4555b7c646 100644 --- a/init/feta16.ly +++ b/init/feta16.ly @@ -1,5 +1,5 @@ % 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 { @@ -9,11 +9,11 @@ "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 @@ -56,6 +56,7 @@ "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 diff --git a/init/feta20.ly b/init/feta20.ly index 44f58ca163..7df6b77078 100644 --- a/init/feta20.ly +++ b/init/feta20.ly @@ -1,19 +1,19 @@ % 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 @@ -23,7 +23,7 @@ "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 { @@ -56,6 +56,7 @@ "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 diff --git a/init/script.ly b/init/script.ly index a96f2adf76..3ccbb82b2e 100644 --- a/init/script.ly +++ b/init/script.ly @@ -19,6 +19,7 @@ ltoe = \script { "pedaltoe" 0 0 -1 0 0 } 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? diff --git a/init/table16.ly b/init/table16.ly index 644f0c0ac3..5940ed8b2f 100644 --- a/init/table16.ly +++ b/init/table16.ly @@ -17,7 +17,6 @@ table_sixteen= "finger" "\setfinger{%}" 0.0\pt 0.0\pt 0.0\pt 4.0\pt } "dynamics" = \table { - "mf" "\dynmf" "fff" "\dynfff" "ff" "\dynff" @@ -29,7 +28,6 @@ table_sixteen= "fp" "\dynfp" "sf" "\dynsf" "sfz" "\dynsfz" - } "align" = \table { "-1" "\leftalign{%}" @@ -68,7 +66,7 @@ table_sixteen= "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 } diff --git a/input/beams.ly b/input/beams.ly index 3dae027c33..6e897a8475 100644 --- a/input/beams.ly +++ b/input/beams.ly @@ -1,15 +1,13 @@ \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 < diff --git a/input/font.ly b/input/font.ly index f7fc274752..1ba29f30b2 100644 --- a/input/font.ly +++ b/input/font.ly @@ -26,8 +26,8 @@ TestedFeatures = "This file tests the Feta music-font" 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 }> @@ -43,12 +43,11 @@ TestedFeatures = "This file tests the Feta music-font" \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. @@ -70,7 +69,9 @@ TestedFeatures = "This file tests the Feta music-font" [: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. | diff --git a/input/stem.ly b/input/stem.ly new file mode 100644 index 0000000000..5442943342 --- /dev/null +++ b/input/stem.ly @@ -0,0 +1,48 @@ +\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.; + } +} diff --git a/lily/VERSION b/lily/VERSION index fe8619c0cc..45c0a9da44 100644 --- a/lily/VERSION +++ b/lily/VERSION @@ -1,4 +1,4 @@ MAJOR_VERSION = 0 MINOR_VERSION = 1 -PATCH_LEVEL = 37 +PATCH_LEVEL = 38 MY_PATCH_LEVEL = diff --git a/lily/abbreviation-beam.cc b/lily/abbreviation-beam.cc index ac36ae99d0..d9a4e5bac8 100644 --- a/lily/abbreviation-beam.cc +++ b/lily/abbreviation-beam.cc @@ -51,7 +51,7 @@ Abbreviation_beam::brew_molecule_p () const 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); diff --git a/lily/beam.cc b/lily/beam.cc index 268499b1b0..bde4ae2711 100644 --- a/lily/beam.cc +++ b/lily/beam.cc @@ -29,14 +29,17 @@ #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 @@ -53,80 +56,78 @@ Beam::add (Stem*s) } 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 internote_f (); + Real x0 = stems[0]->hpos_f (); + for (int j=0; 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 " <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 total; total[UP] = total[DOWN] = 0; @@ -134,12 +135,12 @@ Beam::set_default_dir() count[UP] = count[DOWN] = 0; Direction d = DOWN; - for (int i=0; i dir_ ? (1 + d * s->dir_)/2 - : s->get_center_distance(Direction(-d)); + : s->get_center_distance (Direction (-d)); if (current) { @@ -159,7 +160,7 @@ Beam::set_default_dir() */ dir_ = (total[UP] * count[DOWN] > total[DOWN] * count[UP]) ? UP : DOWN; - for (int i=0; i dir_ = dir_; @@ -169,102 +170,272 @@ Beam::set_default_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 sinfo; - for (int j=0; j 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 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 b; { Array flags; - for (int j=0; j beams_left_i_ = b[i]; @@ -293,13 +464,13 @@ Beam::set_grouping (Rhythmic_grouping def, Rhythmic_grouping cur) 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; @@ -312,7 +483,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const 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++) { @@ -327,8 +498,8 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const int rhalfs = here->beams_right_i_ - next->beams_left_i_; int rwholebeams = here->beams_right_i_ 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; @@ -342,9 +513,9 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const 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++) @@ -356,7 +527,7 @@ Beam::stem_beams (Stem *here, Stem *next, Stem *prev) const w /= 4; if (rhalfs) - a = paper()->lookup_l ()->beam (sl, w); + a = paper ()->lookup_l ()->beam (sl, w); for (; j < rwholebeams + rhalfs; j++) { diff --git a/lily/dynamic-grav.cc b/lily/dynamic-grav.cc index b451af045e..69859a59c3 100644 --- a/lily/dynamic-grav.cc +++ b/lily/dynamic-grav.cc @@ -103,13 +103,6 @@ void 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_) @@ -120,6 +113,13 @@ Dynamic_engraver::do_pre_move_processing() 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; + } } diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 5d605937c1..130df73d5d 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -15,12 +15,14 @@ direction */ class Beam: public Directional_spanner { public: + enum Pos { NONE, SIT = 1, STRADDLE = 2, HANG = 4, INTER = 8 }; + Link_array 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; /* *************** */ @@ -29,22 +31,24 @@ public: 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 diff --git a/lily/include/midi-def.hh b/lily/include/midi-def.hh index 964d87f15d..dbdcead0ff 100644 --- a/lily/include/midi-def.hh +++ b/lily/include/midi-def.hh @@ -24,11 +24,10 @@ public: 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); diff --git a/lily/include/staff-side.hh b/lily/include/staff-side.hh index 131b265186..ffc1e37d9f 100644 --- a/lily/include/staff-side.hh +++ b/lily/include/staff-side.hh @@ -19,12 +19,10 @@ */ class Staff_side : virtual Score_elem { Link_array 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: /** diff --git a/lily/lookup.cc b/lily/lookup.cc index 8fa2679722..319b038bad 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -191,6 +191,7 @@ Lookup::hairpin (Real &wid, bool decresc) const } ret.dim_.x() = Interval (0,wid); + // ret.translate_axis (-ret.dim_[Y_AXIS][DOWN], Y_AXIS); return ret; } diff --git a/lily/midi-def.cc b/lily/midi-def.cc index 7fc60a1d64..1415298439 100644 --- a/lily/midi-def.cc +++ b/lily/midi-def.cc @@ -28,13 +28,6 @@ Midi_def::Midi_def() 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() { } @@ -43,17 +36,25 @@ Real 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 @@ -61,17 +62,11 @@ Midi_def::print() const { #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); diff --git a/lily/staff-side.cc b/lily/staff-side.cc index 4099f2eece..980990cf65 100644 --- a/lily/staff-side.cc +++ b/lily/staff-side.cc @@ -16,7 +16,7 @@ Staff_side::Staff_side() { - y_=0; + y_=0; sym_int_ = Interval (0,0); dir_ = CENTER; inside_staff_b_ = false; @@ -59,7 +59,7 @@ Staff_side::get_position_f() const 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; } diff --git a/lily/stem.cc b/lily/stem.cc index 0e37c7d849..9bdfd99f80 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -84,7 +84,6 @@ Stem::stem_end_f () const return yextent_drul_[dir_]; } - void Stem::set_stemend (Real se) { @@ -273,19 +272,19 @@ Stem::abbrev_mol () const 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) diff --git a/lily/tex-beam.cc b/lily/tex-beam.cc index e26b1c481d..4380e8911f 100644 --- a/lily/tex-beam.cc +++ b/lily/tex-beam.cc @@ -54,15 +54,17 @@ Lookup::rule_symbol (Real height, Real width) const 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]; diff --git a/make/lelievijver.lsm b/make/lelievijver.lsm index 73b14ff867..524589af89 100644 --- a/make/lelievijver.lsm +++ b/make/lelievijver.lsm @@ -1,7 +1,7 @@ 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: @@ -16,8 +16,8 @@ Auteur: hanwen@stack.nl (Han-Wen Nienhuys) 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 diff --git a/make/lilypond.lsm b/make/lilypond.lsm index c57843175c..cc3aa4563b 100644 --- a/make/lilypond.lsm +++ b/make/lilypond.lsm @@ -1,7 +1,7 @@ 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 @@ -14,8 +14,8 @@ Author: hanwen@stack.nl (Han-Wen Nienhuys) 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 diff --git a/make/lilypond.spec b/make/lilypond.spec index e738cfb37f..57db1d4144 100644 --- a/make/lilypond.spec +++ b/make/lilypond.spec @@ -1,9 +1,9 @@ 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 @@ -33,7 +33,7 @@ make -C Documentation gifs 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 diff --git a/mf/TODO b/mf/TODO index 73738e3a3a..ffeed55f44 100644 --- a/mf/TODO +++ b/mf/TODO @@ -6,7 +6,6 @@ - lo-res fixes. - work out sizes of character fonts. - more symbols - * some scripts: flageolet * piano pedals, * trills * maxima notehead diff --git a/mf/feta-eindelijk.mf b/mf/feta-eindelijk.mf index d39637198b..7649ea0e8e 100644 --- a/mf/feta-eindelijk.mf +++ b/mf/feta-eindelijk.mf @@ -126,7 +126,7 @@ def rest_crook(expr a, w) = 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; @@ -143,7 +143,7 @@ fet_beginchar("16th rest","4","sixteenthrest"); 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); @@ -163,7 +163,7 @@ fet_beginchar("32th rest","5","thirtysecondrest"); 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); @@ -185,7 +185,7 @@ fet_beginchar("64th rest","6","sixtyfourthrest"); 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); @@ -212,7 +212,7 @@ fet_beginchar("128th rest","7","hundredtwentyeighthrest"); 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); diff --git a/mf/feta-generic.mf b/mf/feta-generic.mf index 0ccbec6bf2..98390a6713 100644 --- a/mf/feta-generic.mf +++ b/mf/feta-generic.mf @@ -25,9 +25,10 @@ if test = 0: 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 diff --git a/mf/feta-klef.mf b/mf/feta-klef.mf index 11ef0c228d..3d78d804f4 100644 --- a/mf/feta-klef.mf +++ b/mf/feta-klef.mf @@ -269,7 +269,7 @@ def draw_gclef (expr exact_center, reduction)= 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); @@ -278,10 +278,11 @@ def draw_gclef (expr exact_center, reduction)= 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} .. diff --git a/mf/feta-nummer-generic.mf b/mf/feta-nummer-generic.mf new file mode 100644 index 0000000000..141dd70dd0 --- /dev/null +++ b/mf/feta-nummer-generic.mf @@ -0,0 +1,31 @@ +% 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"); + diff --git a/mf/feta-nummer.mf b/mf/feta-nummer.mf index 99af95c965..c35ee4c2f2 100644 --- a/mf/feta-nummer.mf +++ b/mf/feta-nummer.mf @@ -4,9 +4,7 @@ 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); @@ -62,7 +60,7 @@ def draw_six = 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); @@ -73,7 +71,7 @@ def draw_six = ..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; @@ -85,14 +83,15 @@ fet_beginchar("Numeral 0", "0", "zero") 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; @@ -142,26 +141,24 @@ fet_beginchar("Numeral 2", "2", "two") 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") @@ -172,16 +169,15 @@ 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; @@ -192,8 +188,8 @@ fet_beginchar("Numeral 3", "3", "three") ..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") @@ -224,7 +220,7 @@ 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); @@ -271,7 +267,7 @@ fet_beginchar("Numeral 5", "5", "five") ..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") @@ -315,7 +311,7 @@ fi 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); @@ -357,7 +353,6 @@ fet_beginchar("Numeral 8", "8", "eight") 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)} diff --git a/mf/feta-nummer10.mf b/mf/feta-nummer10.mf index 3d0b1f0af5..f3f25459d8 100644 --- a/mf/feta-nummer10.mf +++ b/mf/feta-nummer10.mf @@ -1,30 +1,9 @@ % 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. diff --git a/mf/feta-nummer4.mf b/mf/feta-nummer4.mf index 8e9ca32cf4..efa2f9ac48 100644 --- a/mf/feta-nummer4.mf +++ b/mf/feta-nummer4.mf @@ -1,30 +1,10 @@ % 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. diff --git a/mf/feta-nummer5.mf b/mf/feta-nummer5.mf index 2affa3ded7..0a9fb3ffa3 100644 --- a/mf/feta-nummer5.mf +++ b/mf/feta-nummer5.mf @@ -1,30 +1,10 @@ % 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. diff --git a/mf/feta-nummer8.mf b/mf/feta-nummer8.mf index b7c900afbf..874cb8f8a0 100644 --- a/mf/feta-nummer8.mf +++ b/mf/feta-nummer8.mf @@ -1,30 +1,9 @@ % 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. diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf index f97a635d11..cec0283fcd 100644 --- a/mf/feta-schrift.mf +++ b/mf/feta-schrift.mf @@ -4,6 +4,7 @@ % source file of the Feta (Font-En-Tja) music font % % (c) 1997 Han-Wen Nienhuys +% Jan Nieuwenhuizen % @@ -65,7 +66,7 @@ fet_beginchar("> accent", "sforzato", "sforzatoaccent") 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 @@ -499,7 +500,26 @@ fet_beginchar("organ-toe", "pedaltoe", "pedaltoe") 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"); diff --git a/mf/feta-watzieik.mf b/mf/feta-watzieik.mf index b87363a983..a3676cc41c 100644 --- a/mf/feta-watzieik.mf +++ b/mf/feta-watzieik.mf @@ -11,8 +11,9 @@ define_pixels(beamheight); 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; diff --git a/tex/feta16.tex b/tex/feta16.tex index 6bfa5aad53..0b1ca72ee4 100644 --- a/tex/feta16.tex +++ b/tex/feta16.tex @@ -1,5 +1,5 @@ % 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 @@ -56,22 +56,23 @@ \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} diff --git a/tex/feta20.tex b/tex/feta20.tex index 5f4b5a3f40..1c841fa9b1 100644 --- a/tex/feta20.tex +++ b/tex/feta20.tex @@ -1,5 +1,5 @@ % 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 @@ -56,22 +56,23 @@ \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} diff --git a/tex/fetdefs.tex b/tex/fetdefs.tex index 85d4121aec..2a6385abf4 100644 --- a/tex/fetdefs.tex +++ b/tex/fetdefs.tex @@ -7,7 +7,7 @@ \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 @@ -15,7 +15,7 @@ \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{%