]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/tie.cc: change 'heads to 'head-pair.
authorhanwen <hanwen>
Tue, 6 Jan 2004 00:36:22 +0000 (00:36 +0000)
committerhanwen <hanwen>
Tue, 6 Jan 2004 00:36:22 +0000 (00:36 +0000)
* 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.

26 files changed:
ChangeLog
Documentation/topdocs/NEWS.texi
VERSION
input/mutopia/F.Schubert/morgenlied.ly
input/regression/dots.ly
lily/beam-quanting.cc
lily/context-specced-music-iterator.cc
lily/dot-column.cc
lily/dots.cc
lily/extender-engraver.cc
lily/hyphen-spanner.cc
lily/include/beam.hh
lily/include/dot-column.hh
lily/include/dots.hh
lily/include/lyric-extender.hh
lily/lyric-extender.cc
lily/lyric-phrasing-engraver.cc
lily/parser.yy
lily/tie-engraver.cc
lily/tie.cc
lily/translator-group.cc
mf/feta-klef.mf
mf/feta-test-generic.mf
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/music-functions.scm

index 9f243e4dc92bdc466565bdc5ee325ffe7a2e052c..f91929957c368d43d0a970085746cdff3b794bf8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2004-01-06  Han-Wen Nienhuys   <hanwen@cs.uu.nl>
+
+       * 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   <hanwen@cs.uu.nl>
+
+       * mf/feta-klef.mf (test_staff): fatten up G clef
+       (test_staff): fatten up f clef.
+       
+
 2004-01-05  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * input/mutopia/E.Satie/petite-ouverture-a-danser.ly: 
index 35e9bf046da442db2590e25c05e1cb975be22d7f..1fc4109a519db2f9be33fbe7e0aa0f5b664565c8 100644 (file)
@@ -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 e44d858efc074870b121fbfa5c63105b73b11dd0..b670bde5b604cf19797576c4714b52538fb7ebd2 100644 (file)
--- 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
 
index 9cebde2262929db9feb2a2676cdc9470a8b5a9f1..f220dbed2c11102cd931c56560f2e8d56e0d8ba6 100644 (file)
@@ -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
     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 ) | 
     <g e>8( <es fis a> <d f b> <c e c'>) 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 <e c g> <e c g> |
     <d c a>4. r8 \clef bass  <d b f> <d b f> |
-    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 <d g>8 ( |
@@ -100,7 +106,7 @@ pianoRH = \notes \relative c''' \repeat volta 2 {
     r8 <e c g> <e c g> r <d b g > <d b g> |
     r <e c g> <e c g> r <f d b g> <f d b g> |
     r <e c g> <e c g> r <d b f> <d b f> |
-    c16( b c e g b c b c e g <e b'>) |
+    c16(_\f b c e g b c b c e g <e b'>) |
     <c c'>8 r r <c, g e>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 <bes' c>8( <a c>) r <f c'> |
+    \clef treble r4 <bes' c>8([ <a c>)] r <f c'> |
     \clef bass r8 dis( e) r c c |
     f,4. r8 g g |
     <c, c,>4. <e e,>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 <g b>8( |
-    <f c'>4.) <g c>4.( | <a c>4.) <g b,> |
+    <f c'>4.)
+
+    \once \property Voice.Slur \set #'height-limit = #1.0
+
+    <g c>4.( | <a c>4.) <g b,> |
     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)
+       }
+    }
 }
index 6a530e2f51ff71eea68f32ccbde1503ab21c4189..3409e44e175a1d75b4c05ec75b3a424eefdefd4c 100644 (file)
@@ -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,,
-       <b'' c d e>4.  <f g a b>
-       <g b d> <c, g' d' a'>
+    \stemDown
+    <b'' c d e>4.  <f g a b>
+    <g b d> <c, g' d' a'>
        
        
-       \context Staff <<
-            { f''  <b c> r4.  }\\
-            { b, <a b> r4. }
-       >>
+    <<
+       { f  <b c> r4.  }\\
+       { b, <a b> r4. }
+    >>
        
        
   }
index 54b308f326704bdc038b8e33ed74c5b3ef430597..5dee786850bdd46990abc675c89b3282cb7b66fd 100644 (file)
@@ -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<Grob> 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;
 }
 
index 44111de30f4c88bf1e625c325aac6d7207c49f48..15dc2ece077167d0c560c604208819e2bda208f5 100644 (file)
@@ -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);
index 736588a0e05282ba687abe2a9ba14682d8bce838..dbc20d40c4eb41eb960e923486b19fc7d9893d85 100644 (file)
@@ -6,6 +6,8 @@
   (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
+#include <set>
+
 #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<Grob> 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<int> taken_posns;
-  int conflicts = 0;
+  set<int> 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;
 }
 
index c71973054703b2403cdd324ea0dac0652d9dcf40..22d8e6995e791c3a244c69305722cd9a9def5863 100644 (file)
 #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)
index 8e60f9f9e3b33118a9776b99283a2e769682716e..eb2b31f7aa058f23e098b47ab8ca47dfac865d90 100644 (file)
@@ -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"));
index 536ff6feb8fcf8cfb4e268ad687fb41d955b3a2e..8334e494cc62a4caef7ac734dd133a68b3405443 100644 (file)
@@ -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");
 
+
index 1bfe58ae84f8e07babace6bd239b81cb9b2a69b7..e9252050421cbcff6810e016c50fef2359235df1 100644 (file)
@@ -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<Grob> const &stems,
                                  Array<Stem_info> const &stem_infos,
index e42e0c5e1a79fe711830bfd74205c80cfbfd821b..a4d8a52553be3bda1a2aa3a71a04b655e1d579c1 100644 (file)
@@ -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
index a6eb3ab89acca60f0ed58a2956df93c96b52a4ad..8b29433ba49446c9c8eed9c13195153343c91f8b 100644 (file)
@@ -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*);
 };
index 751e4f8ed5a395e1ac5497e1e96d611e2e463b4c..b07ceeec5b6cd8da08b973d8aa40c8b2c85fffaa 100644 (file)
@@ -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 ));
 };
 
index adb6340357b1722e2d887b7d6eb4717d7c5410a7..52ef6cedcf7ae5569926bbd1cda52485e3c5ef09 100644 (file)
@@ -6,6 +6,7 @@
   Han-Wen Nienhuys
 */
 
+#include <math.h>
 
 #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<Grob> 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 <? (r->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");
index 63697ebcb81cccce2dd329b6f252aabf26e6664b..b7e5f75ff799bea576f36715b217001a01411dfe 100644 (file)
@@ -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<Item*> (h));
+       Pointer_group_interface::add_grob (a->past_extenders_[j],ly_symbol2scm ("heads"), h);
     }
 }
 
index 0b0993c50210be17d67bea5577053987d000c9eb..ef36c806ea1ef7b3266883d0c27659439aab7b01 100644 (file)
@@ -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;
index bc3da26174418ab5ad98c010a31b7122fb6c97ce..cdc2bf0fb3a6bc40c205c0cceff26f8ed521265d 100644 (file)
@@ -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);
 }
index e82516c56926272fc42933172578dbe4a85ef404..8d5bee514998bea2056a8a4aba76ee4cf32727f2 100644 (file)
@@ -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<Spanner*> (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");
index eda211406f01ae4dcea8e3aeef72987c25cf3862..4a6109881a0694538d8a7f124165d18198515271 100644 (file)
@@ -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;
        }
index a20ecc3fcc39f6c3ac56073655dffc4b5d1ee207..34a6c853cf77120d61e7ec70e0554c5ab54a5c2e 100644 (file)
@@ -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;
 
index 5b7454c8f0baa1d49663ddb834127f3f2f7ae979..635e7f139112fc9189e79a7fe0c5c7b2ab4ec43f 100644 (file)
@@ -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;
index 8643310e0750a177b200e7712f80aa4810754529..69a7bfca343f0452b52ee681d9c3b65693befcd4 100644 (file)
@@ -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.
index f8e846082f783887f38c62e7b3129beacfda49d2..434ece6856695fe86e4d5c964f7ab4ceb830e5b3 100644 (file)
     (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 ))))
      . (
        (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 ))))
        ))
 
 
     (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))))
      . (
        (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))))
        ))
        (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 ))))
        ))
 
index c66215d17022a96a7d8ae127e508c38bb4e1f785..6ba56ac02134f33a3edf92989e2446298c2ab53f 100644 (file)
@@ -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