From: Han-Wen Nienhuys Date: Tue, 6 Jan 2004 00:36:22 +0000 (+0000) Subject: * lily/tie.cc: change 'heads to 'head-pair. X-Git-Tag: release/2.1.23~279 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6ecc01fbd54016594f4fcd9891fb3aa75272d0a3;p=lilypond.git * lily/tie.cc: change 'heads to 'head-pair. * lily/lyric-phrasing-engraver.cc (process_acknowledged_grobs): fill in 'heads field. * lily/lyric-extender.cc (brew_molecule): use heads for width, use minimum-length for short ones, and shorten so collisions with the next syllable are avoided. * lily/beam-quanting.cc (score_slopes_dy): add extra points for near-zero slopes. Only do DAMPING_DIRECTION_PENALTY for non-horizontal dy * lily/dots.cc: remove quantized_position callback. All Y positioning is done by dot-column.cc * lily/dot-column.cc (do_shifts): rewrite shifting routine: do exhaustive test of all dot positions. This fixes disappearing dots in dotted chords. --- diff --git a/ChangeLog b/ChangeLog index 9f243e4dc9..f91929957c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,31 @@ +2004-01-06 Han-Wen Nienhuys + + * lily/tie.cc: change 'heads to 'head-pair. + + * lily/lyric-phrasing-engraver.cc (process_acknowledged_grobs): + fill in 'heads field. + + * lily/lyric-extender.cc (brew_molecule): use heads for width, use + minimum-length for short ones, and shorten so collisions with the + next syllable are avoided. + + * lily/beam-quanting.cc (score_slopes_dy): add extra points for + near-zero slopes. + Only do DAMPING_DIRECTION_PENALTY for non-horizontal dy + + * lily/dots.cc: remove quantized_position callback. All Y + positioning is done by dot-column.cc + + * lily/dot-column.cc (do_shifts): rewrite shifting routine: do + exhaustive test of all dot positions. This fixes disappearing dots + in dotted chords. + +2004-01-05 Han-Wen Nienhuys + + * mf/feta-klef.mf (test_staff): fatten up G clef + (test_staff): fatten up f clef. + + 2004-01-05 Jan Nieuwenhuizen * input/mutopia/E.Satie/petite-ouverture-a-danser.ly: diff --git a/Documentation/topdocs/NEWS.texi b/Documentation/topdocs/NEWS.texi index 35e9bf046d..1fc4109a51 100644 --- a/Documentation/topdocs/NEWS.texi +++ b/Documentation/topdocs/NEWS.texi @@ -15,11 +15,11 @@ Spacing following barlines was improved for widely stretched lines. Lyric hyphens now conform to standard typesetting practice. @item -Lyrics are now aligned under note heads conforming engraving +Lyrics are now aligned under note heads conforming to engraving standards. The responsible code has been rewritten, and is drastically simpler from the previous version. To aid this rewrite, the syntactic -function of the extender line ( __ ) is been changed: it is now attached -to the lyric syllable. +function of the extender line ( __ ) has been changed: it is now +attached to the lyric syllable. @item When redefining a context, the associated identifier is also diff --git a/VERSION b/VERSION index e44d858efc..b670bde5b6 100644 --- a/VERSION +++ b/VERSION @@ -2,5 +2,5 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=1 PATCH_LEVEL=6 -MY_PATCH_LEVEL= +MY_PATCH_LEVEL=hwn1 diff --git a/input/mutopia/F.Schubert/morgenlied.ly b/input/mutopia/F.Schubert/morgenlied.ly index 9cebde2262..f220dbed2c 100644 --- a/input/mutopia/F.Schubert/morgenlied.ly +++ b/input/mutopia/F.Schubert/morgenlied.ly @@ -4,8 +4,8 @@ date = "27. Februar 1815" source = "Edition Peters" editor = "Paul Losse" - enteredby="Rune Zedeler" - maintainer="rune@zedeler.dk" + enteredby="Han-Wen Nienhuys" + maintainer="hanwen@xs4all.nl" texidoc = "The source is a rather tightly set Peters in Edition is a heavy font. The Peters edition (4622c) was `herausgegeben' by @@ -18,6 +18,10 @@ systems. Lily does so too if you tune down spacing-increment, but chooses line breaks differently. + Further manual tweaks: the slur in measure 12 has been flattened + manually. The beam in measure 3, left-hand, technically is wrong, + but has been added following the original. + " } @@ -32,11 +36,12 @@ manuscriptBreak = { \break } \include "params-init.ly" linewidth = #(* mm 160) indent = 8\mm + interscoreline = 2.\mm } modernAccidentals = { \property Staff.extraNatural = ##f - \property Staff.autoAccidentals = #'(Staff (same-octave . 0) (any-octave . 0) (same-octave . 3)) + \property Staff.autoAccidentals = #'(Staff (same-octave . 1) (any-octave . 0)) \property Staff.autoCautionaries = #'() } @@ -81,10 +86,11 @@ secondVerse = \lyrics { Ach, der Lie -- be sanf "" -- tes We -- hen schwellt mir das be -- weg -- te __ Herz, sanft, wie ein ge -- lieb -- ter Schmerz. __ Dürft ich nur auf gold -- nen Hö -- hen mich im Mor -- gen -- duft er -- ge -- hen! Sehn -- sucht - zieht mich him -- mel -- wärts, Sehn -- sucht zieht mich him -- mel -- wärts + zieht mich him -- mel -- wärts, Sehn -- sucht zieht mich him -- mel -- wärts. } pianoRH = \notes \relative c''' \repeat volta 2 { + \modernAccidentals g16(_\p fis a g fis g f e d c b a ) | 8( ) r8 r | r8 c'( e,) f r a | @@ -92,7 +98,7 @@ pianoRH = \notes \relative c''' \repeat volta 2 { r8_\> << { s8 s8-\! } << { fis( g) } \\ { c,4 } >> >> r8 | 4. r8 \clef bass | - e,16_" "_\markup { \bold\italic cresc } g c g e g d gis b gis d gis | + e,16_" "_\markup { \bold\italic cresc. } g c g e g d gis b gis d gis | c, e a e c e a,-\f d fis d a d | b d g d b g r4\fermata \clef treble g''8 | as4.( g 4.) | fis4. r4 8 ( | @@ -100,7 +106,7 @@ pianoRH = \notes \relative c''' \repeat volta 2 { r8 r | r r | r r | - c16( b c e g b c b c e g ) | + c16(_\f b c e g b c b c e g ) | 8 r r 8 r r\fermata | } @@ -108,7 +114,7 @@ pianoLH = \notes \relative c'' \repeat volta 2 { g16( fis a g fis g f e d c b a) | \clef bass g4.( c,8) r r - \clef treble r4 8( ) r | + \clef treble r4 8([ )] r | \clef bass r8 dis( e) r c c | f,4. r8 g g | 4. 4. | @@ -116,7 +122,11 @@ pianoLH = \notes \relative c'' \repeat volta 2 { g,8 r r g16 r16\fermata r8 g''8 | as4.( g ) | fis r4 8( | - 4.) 4.( | 4.) | + 4.) + + \once \property Voice.Slur \set #'height-limit = #1.0 + + 4.( | 4.) | c,4 r8 g4 r8 | c4 r8 g4 r8 | c4 r8 g4 r8 | @@ -138,7 +148,7 @@ pianoLH = \notes \relative c'' \repeat volta 2 { \new PianoStaff << \property PianoStaff.instrument = \markup { \bold - \huge "2. " } + \bigger\bigger \huge "2. " } \new Staff \pianoRH \new Staff \pianoLH >> @@ -151,12 +161,17 @@ pianoLH = \notes \relative c'' \repeat volta 2 { } \translator { \ScoreContext - Beam \override #'thickness = #0.6 + Beam \override #'thickness = #0.55 SpacingSpanner \set #'spacing-increment = #1.0 - Slur \set #'height-limit = #1.0 + Slur \set #'height-limit = #1.5 } - \translator { \PianoStaffContext - VerticalAlignment \override #'forced-distance = #10 - } -} + \translator { + \PianoStaffContext + VerticalAlignment \override #'forced-distance = #10 + } + \translator { + \StaffContext + minimumVerticalExtent = #'(-3. . 6) + } + } } diff --git a/input/regression/dots.ly b/input/regression/dots.ly index 6a530e2f51..3409e44e17 100644 --- a/input/regression/dots.ly +++ b/input/regression/dots.ly @@ -1,4 +1,3 @@ -#(ly:set-option 'old-relative) \version "1.9.8" \header{ texidoc=" @@ -16,14 +15,15 @@ a column. The dots go along as rests are shifted to avoid collisions. \context Voice \notes\relative c'' { \time 6/8 d4. g,, - 4. - + \stemDown + 4. + - \context Staff << - { f'' r4. }\\ - { b, r4. } - >> + << + { f r4. }\\ + { b, r4. } + >> } diff --git a/lily/beam-quanting.cc b/lily/beam-quanting.cc index 54b308f326..5dee786850 100644 --- a/lily/beam-quanting.cc +++ b/lily/beam-quanting.cc @@ -27,10 +27,12 @@ const int STEM_LENGTH_DEMERIT_FACTOR = 5; // possibly ridiculous, but too short stems just won't do const int STEM_LENGTH_LIMIT_PENALTY = 5000; -const int DAMPING_DIRECTIION_PENALTY = 800; +const int DAMPING_DIRECTION_PENALTY = 800; const int MUSICAL_DIRECTION_FACTOR = 400; const int IDEAL_SLOPE_FACTOR = 10; +const int ROUND_TO_ZERO_POINTS = 4; + extern bool debug_beam_quanting_flag; static Real @@ -210,7 +212,9 @@ Beam::quanting (SCM smob) for (int i = qscores.size (); i--;) { Real d = score_slopes_dy (qscores[i].yl, qscores[i].yr, - dy_mus, yr- yl, xstaff); + dy_mus, yr- yl, + xr - xl, + xstaff); qscores[i].demerits += d; #if DEBUG_QUANTING @@ -353,14 +357,21 @@ Beam::score_stem_lengths (Link_array const &stems, Real Beam::score_slopes_dy (Real yl, Real yr, Real dy_mus, Real dy_damp, + Real dx, bool xstaff) { Real dy = yr - yl; Real dem = 0.0; - if (sign (dy_damp) != sign (dy)) + + /* + DAMPING_DIRECTION_PENALTY is a very harsh measure, while for + complex beaming patterns, horizontal is often a good choice. + */ + if (sign (dy) + && sign (dy_damp) != sign (dy)) { - dem += DAMPING_DIRECTIION_PENALTY; + dem += DAMPING_DIRECTION_PENALTY; } dem += MUSICAL_DIRECTION_FACTOR * (0 >? (fabs (dy) - fabs (dy_mus))); @@ -376,6 +387,14 @@ Beam::score_slopes_dy (Real yl, Real yr, /* Huh, why would a too steep beam be better than a too flat one ? */ dem += shrink_extra_weight (fabs (dy_damp) - fabs (dy), 1.5) * slope_penalty; + + /* + almost zero slopes look like errors in horizontal beams. + */ + if (fabs (dy) > 1e-3 + && (dy / dx < 0.05)) + dem += ROUND_TO_ZERO_POINTS; + return dem; } diff --git a/lily/context-specced-music-iterator.cc b/lily/context-specced-music-iterator.cc index 44111de30f..15dc2ece07 100644 --- a/lily/context-specced-music-iterator.cc +++ b/lily/context-specced-music-iterator.cc @@ -30,7 +30,7 @@ Context_specced_music_iterator::construct_children () c_id = ly_scm2string (ci); Translator_group* a - =report_to ()->find_create_translator (ct, c_id); + = report_to ()->find_create_translator (ct, c_id); if (a) set_translator (a); diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 736588a0e0..dbc20d40c4 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -6,6 +6,8 @@ (c) 1997--2003 Han-Wen Nienhuys */ +#include + #include "dots.hh" #include "dot-column.hh" #include "rhythmic-head.hh" @@ -16,6 +18,8 @@ #include "axis-group-interface.hh" #include "stem.hh" +using std::set; + /* TODO: let Dot_column communicate with stem via Note_column. */ @@ -28,8 +32,14 @@ Dot_column::force_shift_callback (SCM element_smob, SCM axis) Axis a = (Axis) gh_scm2int (axis); assert (a == Y_AXIS); me = me->get_parent (X_AXIS); - SCM l = me->get_grob_property ("dots"); - do_shifts (l); + + if (!to_boolean (me->get_grob_property ("collision-done"))) + { + SCM l = me->get_grob_property ("dots"); + me->set_grob_property ("collision-done", SCM_BOOL_T); + + do_shifts (me, l); + } return gh_double2scm (0.0); } @@ -60,22 +70,18 @@ Dot_column::side_position (SCM element_smob, SCM axis) /* - Will fuck up in this case. + Put the dots in the spaces, close to the heads. - X. . - X.X . - |X . - | - | - |X . - | - | + This is somewhat gruesome; the problem really is + minimize (sum_j dist (head_j, dot_j)) - Should be smarter. - */ + over all configurations. This sounds like a messy optimization + problem to solve. + +*/ SCM -Dot_column::do_shifts (SCM l) +Dot_column::do_shifts (Grob*me, SCM l) { Link_array dots; while (gh_pair_p (l)) @@ -86,43 +92,54 @@ Dot_column::do_shifts (SCM l) dots.sort (compare_position); - if (dots.size () < 2) - return SCM_UNSPECIFIED; - Slice s; - s.set_empty (); - Array taken_posns; - int conflicts = 0; + set taken_posns; for (int i=0; i < dots.size (); i++) { - Real p = Staff_symbol_referencer::get_position (dots[i]); - for (int j=0; j < taken_posns.size (); j++) + Grob * d = dots[i]; + int p = int (Staff_symbol_referencer::get_position (d)); + + if (Staff_symbol_referencer::on_staffline (d, p) + || taken_posns.find (p) != taken_posns.end ()) { - if (taken_posns[j] == (int) p) - conflicts++; + int pd = p; + int pu = p; + if (Staff_symbol_referencer::on_staffline (d, p)) + { + pu ++; + pd --; + } + + Direction dir = to_dir (d->get_grob_property ("direction")); + if (dir != DOWN) + + while (1) + { + if (dir != DOWN) + { + if (taken_posns.find (pu) == taken_posns.end ()) + { + p = pu; + break; + } + pu += 2; + } + if (dir != UP) + { + if (taken_posns.find (pd) == taken_posns.end ()) + { + p = pd; + break; + } + pd -= 2; + } + } + Staff_symbol_referencer::set_position (d, p); } - taken_posns.push ((int)p); - s.unite (Slice ((int)p, - (int)p)); + + taken_posns.insert (p); } - - if (!conflicts) - return SCM_UNSPECIFIED; - int middle = s.center (); - /* - +1 -> off by one - */ - int pos = middle - dots.size () + 1; - if (! (pos % 2)) - pos ++; // center () rounds down. - - for (int i=0; i < dots.size (); pos += 2, i++) - { - Grob * d = dots[i]; - Staff_symbol_referencer::set_position (d,pos); - } - return SCM_UNSPECIFIED; } diff --git a/lily/dots.cc b/lily/dots.cc index c719730547..22d8e6995e 100644 --- a/lily/dots.cc +++ b/lily/dots.cc @@ -15,29 +15,6 @@ #include "staff-symbol-referencer.hh" #include "directional-element-interface.hh" - -MAKE_SCHEME_CALLBACK (Dots,quantised_position_callback,2); -SCM -Dots::quantised_position_callback (SCM element_smob, SCM axis) -{ - Grob *me = unsmob_grob (element_smob); - Axis a = (Axis) gh_scm2int (axis); - assert (a == Y_AXIS); - - SCM d= me->get_grob_property ("dot-count"); - if (gh_number_p (d) && gh_scm2int (d)) - { - if (!get_grob_direction (me)) - set_grob_direction (me, UP); - - if (Staff_symbol_referencer::on_staffline (me)) - return gh_double2scm (Staff_symbol_referencer::staff_space (me) / 2.0 * get_grob_direction (me)); - } - - return gh_double2scm (0.0); -} - - MAKE_SCHEME_CALLBACK (Dots,brew_molecule,1); SCM Dots::brew_molecule (SCM d) diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index 8e60f9f9e3..eb2b31f7aa 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -52,7 +52,7 @@ Extender_engraver::acknowledge_grob (Grob_info i) if (extender_) extender_->set_bound (LEFT, item); - if (finished_extender_ && !finished_extender_->get_bound (RIGHT)) + if (finished_extender_) finished_extender_->set_bound (RIGHT, item); } } @@ -77,6 +77,7 @@ Extender_engraver::finalize () typeset_grob (extender_); extender_ = 0; } + if (finished_extender_) { finished_extender_->warning (_("unterminated extender")); diff --git a/lily/hyphen-spanner.cc b/lily/hyphen-spanner.cc index 536ff6feb8..8334e494cc 100644 --- a/lily/hyphen-spanner.cc +++ b/lily/hyphen-spanner.cc @@ -83,8 +83,8 @@ Hyphen_spanner::brew_molecule (SCM smob) } - ADD_INTERFACE (Hyphen_spanner, "lyric-hyphen-interface", "A centred hyphen is a simple line between lyrics used to divide syllables", "thickness height dash-period length"); + diff --git a/lily/include/beam.hh b/lily/include/beam.hh index 1bfe58ae84..e925205042 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -45,7 +45,7 @@ public: DECLARE_SCHEME_CALLBACK (slope_damping, (SCM)); DECLARE_SCHEME_CALLBACK (shift_region_to_valid, (SCM)); DECLARE_SCHEME_CALLBACK (quanting, (SCM)); - static Real score_slopes_dy (Real, Real, Real, Real, bool); + static Real score_slopes_dy (Real, Real, Real, Real, Real, bool); static Real score_stem_lengths (Link_array const &stems, Array const &stem_infos, diff --git a/lily/include/dot-column.hh b/lily/include/dot-column.hh index e42e0c5e1a..a4d8a52553 100644 --- a/lily/include/dot-column.hh +++ b/lily/include/dot-column.hh @@ -24,6 +24,6 @@ public: static bool has_interface (Grob*); DECLARE_SCHEME_CALLBACK (force_shift_callback, (SCM ,SCM)); DECLARE_SCHEME_CALLBACK (side_position, (SCM ,SCM)); - static SCM do_shifts (SCM dotlist); + static SCM do_shifts (Grob*,SCM dotlist); }; #endif // DOT_COLUMN_HH diff --git a/lily/include/dots.hh b/lily/include/dots.hh index a6eb3ab89a..8b29433ba4 100644 --- a/lily/include/dots.hh +++ b/lily/include/dots.hh @@ -18,7 +18,6 @@ class Dots { public: - DECLARE_SCHEME_CALLBACK (quantised_position_callback, (SCM element, SCM axis)); DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM )); bool has_interface (Grob*); }; diff --git a/lily/include/lyric-extender.hh b/lily/include/lyric-extender.hh index 751e4f8ed5..b07ceeec5b 100644 --- a/lily/include/lyric-extender.hh +++ b/lily/include/lyric-extender.hh @@ -29,7 +29,6 @@ class Lyric_extender { public: static bool has_interface (Grob*); - static void set_textitem (Spanner*, Direction, Grob*); DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM )); }; diff --git a/lily/lyric-extender.cc b/lily/lyric-extender.cc index adb6340357..52ef6cedcf 100644 --- a/lily/lyric-extender.cc +++ b/lily/lyric-extender.cc @@ -6,6 +6,7 @@ Han-Wen Nienhuys */ +#include #include "box.hh" #include "warn.hh" @@ -15,6 +16,7 @@ #include "paper-def.hh" #include "lyric-extender.hh" #include "note-head.hh" +#include "group-interface.hh" MAKE_SCHEME_CALLBACK (Lyric_extender,brew_molecule,1) SCM @@ -25,21 +27,47 @@ Lyric_extender::brew_molecule (SCM smob) Item *r = me->get_bound (RIGHT); Grob *common = l->common_refpoint (r, X_AXIS); - Real left_point = l->extent (common, X_AXIS)[RIGHT]; Real sl = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); + Link_array heads (Pointer_group_interface__extract_grobs (me, (Grob*)0, + "heads")); + + common = common_refpoint_of_array (heads, common, X_AXIS); + + Real left_point = 0.0; + if (!heads.size() + || l->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))) + left_point = l->extent (common, X_AXIS)[RIGHT]; + else + left_point = heads[0]->extent (common, X_AXIS)[LEFT]; + + + if (isinf (left_point)) + return SCM_EOL; + /* It seems that short extenders are even lengthened to go past the note head, but haven't found a pattern in it yet. --hwn 1/1/04 */ - Real right_point = r->extent (common, X_AXIS) - [(Note_head::has_interface (r)) ? RIGHT : LEFT]; + + SCM minlen = me->get_grob_property ("minimum-length"); + Real right_point + = left_point + (gh_number_p (minlen) ? gh_scm2double (minlen) : 0.0); + + if (heads.size ()) + right_point = right_point >? heads.top ()->extent (common, X_AXIS)[RIGHT]; Real h = sl * gh_scm2double (me->get_grob_property ("thickness")); + right_point = right_point extent (common, X_AXIS)[LEFT] - h); + + if (isinf (right_point)) + return SCM_EOL; + + right_point += h; Real w = right_point - left_point; @@ -53,17 +81,8 @@ Lyric_extender::brew_molecule (SCM smob) return mol.smobbed_copy (); } -void -Lyric_extender::set_textitem (Spanner *me, Direction d, Grob *s) -{ - me->set_bound (d, s); - me->add_dependency (s); -} - - - ADD_INTERFACE (Lyric_extender,"lyric-extender-interface", "The extender is a simple line at the baseline of the lyric " " that helps show the length of a melissima (tied/slurred note).", - "thickness"); + "thickness heads"); diff --git a/lily/lyric-phrasing-engraver.cc b/lily/lyric-phrasing-engraver.cc index 63697ebcb8..b7e5f75ff7 100644 --- a/lily/lyric-phrasing-engraver.cc +++ b/lily/lyric-phrasing-engraver.cc @@ -13,6 +13,7 @@ source file of the GNU LilyPond music typesetter #include "note-head.hh" #include "lyric-extender.hh" #include "item.hh" +#include "group-interface.hh" struct Phrasing_association { @@ -190,7 +191,7 @@ Lyric_phrasing_engraver::process_acknowledged_grobs () } for (int j = a->past_extenders_.size(); j--;) - a->past_extenders_[j]->set_bound (RIGHT, dynamic_cast (h)); + Pointer_group_interface::add_grob (a->past_extenders_[j],ly_symbol2scm ("heads"), h); } } diff --git a/lily/parser.yy b/lily/parser.yy index 0b0993c502..ef36c806ea 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -925,7 +925,6 @@ grace_head: | ACCIACCATURA { $$ = scm_makfrom0str ("Acciaccatura"); } | APPOGGIATURA { $$ = scm_makfrom0str ("Appoggiatura"); } ; - Composite_music: CONTEXT STRING Music { @@ -940,7 +939,7 @@ Composite_music: $$ = csm; } | AUTOCHANGE STRING Music { - Music*chm = MY_MAKE_MUSIC("AutoChangeMusic"); + Music*chm = MY_MAKE_MUSIC("AutoChangeMusic"); chm->set_mus_property ("element", $3->self_scm ()); chm->set_mus_property ("iterator-ctor", Auto_change_iterator::constructor_proc); @@ -1262,6 +1261,10 @@ simple_property_def: } | PROPERTY STRING '.' STRING REVERT embedded_scm { Music *t = MY_MAKE_MUSIC("RevertProperty"); + + /* + UGH. + */ bool autobeam = gh_equal_p ($4, scm_makfrom0str ("autoBeamSettings")); bool itc = internal_type_checking_global_b; diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index bc3da26174..cdc2bf0fb3 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -186,8 +186,8 @@ Tie_engraver::typeset_tie (Grob *her) new_head_drul[d] = Tie::head (her, (Direction)-d); } while (flip (&d) != LEFT); - index_set_cell (her->get_grob_property ("heads"), LEFT, new_head_drul[LEFT]->self_scm ()); - index_set_cell (her->get_grob_property ("heads"), RIGHT, new_head_drul[RIGHT]->self_scm ()); + index_set_cell (her->get_grob_property ("head-pair"), LEFT, new_head_drul[LEFT]->self_scm ()); + index_set_cell (her->get_grob_property ("head-pair"), RIGHT, new_head_drul[RIGHT]->self_scm ()); typeset_grob (her); } diff --git a/lily/tie.cc b/lily/tie.cc index e82516c569..8d5bee5149 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -40,7 +40,7 @@ void Tie::set_head (Grob*me,Direction d, Grob * h) { assert (!head (me,d)); - index_set_cell (me->get_grob_property ("heads"), d, h->self_scm ()); + index_set_cell (me->get_grob_property ("head-pair"), d, h->self_scm ()); dynamic_cast (me)->set_bound (d, h); me->add_dependency (h); @@ -49,14 +49,14 @@ Tie::set_head (Grob*me,Direction d, Grob * h) void Tie::set_interface (Grob*me) { - me->set_grob_property ("heads", gh_cons (SCM_EOL, SCM_EOL)); + me->set_grob_property ("head-pair", gh_cons (SCM_EOL, SCM_EOL)); } Grob* Tie::head (Grob*me, Direction d) { - SCM c = me->get_grob_property ("heads"); + SCM c = me->get_grob_property ("head-pair"); c = index_get_cell (c, d); return unsmob_grob (c); @@ -337,4 +337,4 @@ Tie::brew_molecule (SCM smob) ADD_INTERFACE (Tie,"tie-interface", "A tie connecting two noteheads.\n" "direction = Forced direction for all ties", - "y-offset staffline-clearance control-points heads details thickness x-gap direction minimum-length"); + "y-offset staffline-clearance control-points head-pair details thickness x-gap direction minimum-length"); diff --git a/lily/translator-group.cc b/lily/translator-group.cc index eda211406f..4a6109881a 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -142,7 +142,7 @@ Translator_group::find_create_translator (SCM n, String id) Translator_group * new_group = path[i]->instantiate (output_def_); if (i == path.size () -1) - new_group->id_string_ = id; + new_group->id_string_ = id; current->add_fresh_group_translator (new_group); current = new_group; } diff --git a/mf/feta-klef.mf b/mf/feta-klef.mf index a20ecc3fcc..34a6c853cf 100644 --- a/mf/feta-klef.mf +++ b/mf/feta-klef.mf @@ -172,10 +172,8 @@ def draw_bass_clef(expr exact_center, reduction) = save dot_diam; reduced_ss# = staff_space# * reduction; - 2.2 dot_diam = round reduction* (staff_space - stafflinethickness); - right_thickness = 0.48; - left_thick = .25; + right_thickness = 0.37 staff_space + 1.2 stafflinethickness ; swoosh_width# = 2.1 reduced_ss#; % tip_protude := (-stafflinethickness, -.2 staff_space); tip_protude := (0, 0); @@ -202,10 +200,9 @@ def draw_bass_clef(expr exact_center, reduction) = y2l := vround_pixels (reduced_ss# + 0.5 stafflinethickness#); y2l - y2r = (1.0 + overshoot_top) * stafflinethickness; - y2 = .5 [y2l, y2r]; x3l - x1 = swoosh_width; - x3l - x3r = right_thickness * reduced_ss; + x3l - x3r = right_thickness; % try to correct: the top dot seems farther away if y3l = 0. y3l = 0.05 staff_space; @@ -277,7 +274,7 @@ def draw_gclef (expr reduction)= define_pixels(reduced_ss); pair downstroke_dir, center; - thinness = 0.1 staff_space + 0.4 stafflinethickness; + thinness = 0.08 staff_space + 0.7 stafflinethickness; downstroke_dir = unitvector (14, -75); downstroke_angle = angle downstroke_dir; @@ -285,7 +282,7 @@ def draw_gclef (expr reduction)= breapth_factor = 21.0 /14; inner_thick_end = 45; inner_start_angle = downstroke_angle - 43; - thickness = .3 reduced_ss + 1 stafflinethickness; + thickness = .32 reduced_ss + 1.1 stafflinethickness; thinnib = thinness; diff --git a/mf/feta-test-generic.mf b/mf/feta-test-generic.mf index 5b7454c8f0..635e7f1391 100644 --- a/mf/feta-test-generic.mf +++ b/mf/feta-test-generic.mf @@ -7,8 +7,8 @@ input feta-bolletjes; %input feta-banier; %input feta-slag; -input feta-eindelijk; -%input feta-klef; +%input feta-eindelijk; +input feta-klef; % input feta-toevallig; % input feta-schrift; % input feta-haak; diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index 8643310e07..69a7bfca34 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -245,7 +245,8 @@ name of character within font.") (grob-property-description 'grow-direction ly:dir? "crescendo or decrescendo?.") (grob-property-description 'hair-thickness number? "thickness, measured in stafflinethickness.") -(grob-property-description 'heads pair? "Pair of grob pointers, pointing to the two heads of the tie.") +(grob-property-description 'head-pair pair? "Pair of grob pointers, pointing to the two heads of the tie.") +(grob-property-description 'heads grob-list? "List of note heads.") (grob-property-description 'height ly:dimension? "in staffspace.") (grob-property-description 'height-limit ly:dimension? "Maximum slur height, long slurs approach this height. diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index f8e846082f..434ece6856 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -291,7 +291,7 @@ (DotColumn . ( (axes . (0)) - (direction . 1) + (direction . ,RIGHT) (X-extent-callback . ,Axis_group_interface::group_extent_callback) (X-offset-callbacks . (,Dot_column::side_position)) (meta . ((interfaces . (dot-column-interface axis-group-interface item-interface )))) @@ -301,7 +301,6 @@ . ( (molecule-callback . ,Dots::brew_molecule) (dot-count . 1) - (Y-offset-callbacks . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback)) (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface item-interface )))) )) @@ -469,12 +468,11 @@ (LyricHyphen . ( - (thickness . 1.0) + (thickness . 1.3) (height . 0.42) (dash-period . 10.0) (length . 0.66) (minimum-length . 0.5) - (maximum-length . 100) (molecule-callback . ,Hyphen_spanner::brew_molecule) (Y-extent-callback . ,Grob::point_dimension_callback) (meta . ((interfaces . (lyric-hyphen-interface spanner-interface)))) @@ -484,6 +482,7 @@ . ( (molecule-callback . ,Lyric_extender::brew_molecule) (thickness . 0.8) ; stafflinethickness; + (minimum-length . 1.5) (Y-extent-callback . ,Grob::point_dimension_callback) (meta . ((interfaces . (lyric-extender-interface spanner-interface)))) )) @@ -496,7 +495,7 @@ (font-family . roman) (font-series . bold-narrow) (font-shape . upright) - + (font-size . 1.0) (meta . ((interfaces . (rhythmic-grob-interface lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface )))) )) diff --git a/scm/music-functions.scm b/scm/music-functions.scm index c66215d170..6ba56ac021 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -207,7 +207,7 @@ i.e. this is not an override" (append (map (lambda (x) (make-grob-property-set x 'direction (if (odd? n) -1 1))) - '(Tie Slur Script TextScript Stem Dots)) + '(Tie Slur Script TextScript Stem Dots DotColumn)) (list (make-grob-property-set 'NoteColumn 'horizontal-shift (quotient n 2)) (make-grob-property-set 'MultiMeasureRest 'staff-position