]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/beam-quanting.cc (score_forbidden_quants): remove
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 18 Jul 2004 15:04:09 +0000 (15:04 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 18 Jul 2004 15:04:09 +0000 (15:04 +0000)
interquant check. The penalty of 1000 is much too harsh, and the
inter case should be caught by check-staff-line-in-gap check.

* input/mutopia/W.A.Mozart/mozart-hrn-3.ly:
remove texttagline.

* lily/new-slur.cc: cleanup, split in functions.

* lily/new-slur.cc (score_encompass): variable head-distance penalty.

* lily/new-slur.cc (print): use debug-slur-quanting paper var.

ChangeLog
input/mutopia/W.A.Mozart/mozart-hrn-3.ly
input/regression/new-slur.ly
lily/beam-quanting.cc
lily/new-slur.cc
ly/engraver-init.ly
po/lilypond.pot

index 28254cb4b15b9a96ec29ec39d4808517f4ae8e0c..907a93b73f9f425897608d8b5d07972f2d2bc8d3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,13 @@
 2004-07-18  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/beam-quanting.cc (score_forbidden_quants): remove
+       interquant check. The penalty of 1000 is much too harsh, and the
+       inter case should be caught by check-staff-line-in-gap check.
+
        * lily/scm-option.cc: move debug-beam to \paper.
 
        * scripts/lilypond-book.py (Lilypond_snippet.write_ly): create
-       .txt files to appease makeinfobm.
+       .txt files to appease makeinfo.
 
        * input/mutopia/W.A.Mozart/mozart-hrn-3.ly:
        remove texttagline.
index 46184fe9c5d79c33040eeb121b5e746445cb8471..aa31630e4e3d327fd47d687971a28966a10c29ce 100644 (file)
@@ -1,4 +1,4 @@
-5\header{
+\header{
   title =       "Konzert Nr. 3 Es dur"
   subtitle = "für Horn und Orchester"
   composer =    "Wolfgang Amadeus Mozart (1756-1791)"
index abffc02d033448790d0eb71d13500f2c9960d049..cef25e3dc64c54d8d83560bf622af75eccf789b6 100644 (file)
        {r8  <as es> r <f des> r }
    >>
     s4
-    
-    f'=''16( e)    d( c)
-    s2.
+
+    g='8[( a b b! ]  c4  bes) 
+    bes='8( f' des bes) as4( bes)
+    r8 d( f e d c b a)
+    cis=''4( d)  f'=''16( e)    d( c)
+    s4
     
     c'=''2(~c8 d16 c b8 a)
     
index 6c9424d4cca69b2edd4a893e56f2c63c0b727444..0cdba71128ae172d091809500d56e5e6f47cbfdf 100644 (file)
@@ -451,28 +451,13 @@ Beam::score_forbidden_quants (Real yl, Real yr,
   
   Real extra_demerit = SECONDARY_BEAM_DEMERIT / (beam_counts[LEFT] >? beam_counts[RIGHT]);
 
-  /*
-    Inside the staff, inter quants are forbidden.
-   */
-  Real dem = 0.0;
   Direction d = LEFT;
-  do
-    {
-      if (fabs (y[d]) <= (radius + 0.5) && fabs (my_modf (y[d]) - 0.5) < BEAM_EPS)
-       dem += INTER_QUANT_PENALTY;
-    }
-  while ((flip (&d))!= LEFT); 
-
-
+  Real dem = 0.0;
+  
   do
     {
       for (int j = 1; j <= beam_counts[d]; j++)
        {
-         /*
-           see if the outer staffline falls in a beam-gap
-           
-           This test is too weak; we should really check all lines.
-          */
          Direction stem_dir = dirs[d];
 
          /*
index 883e19c0066037c2c3b3317b2f3a0110ec4e76b5..828204a5cd75ae51c7ef2c911c37875c30b4e5fb 100644 (file)
@@ -28,6 +28,7 @@
 #include "stem.hh"
 #include "stencil.hh"
 #include "warn.hh"
+#include "beam.hh"
 
 /*
   TODO:
@@ -296,6 +297,11 @@ New_slur::get_encompass_info (Grob *me,
       && !stem->extent (stem, Y_AXIS).is_empty ())
     {
       ei.stem_ = stem->extent (common[Y_AXIS], Y_AXIS)[dir];
+      if (Grob * b = Stem::get_beam (stem))
+       {
+         ei.stem_ += stem_dir * 0.5  *Beam::get_thickness (b);
+       }
+      
     }
   else
     ei.stem_ = ei.head_;
@@ -630,7 +636,8 @@ New_slur::enumerate_attachments (Grob * me,  Grob *common[],
              {
                if (extremes[d].stem_extent_[Y_AXIS].contains (os[d][Y_AXIS]))
                  {
-                   os[d][X_AXIS] -=  d * extremes[d].slur_head_extent_.length ();
+                   os[d][X_AXIS] =  extremes[d].slur_head_extent_[-d]
+                     - d * 0.3;
                  }
                else if (dir *extremes[d].stem_extent_[Y_AXIS][dir] < dir * os[d][Y_AXIS])
                  {
@@ -693,21 +700,24 @@ New_slur::score_encompass (Grob * me,  Grob *common[],
            continue;
          
          Real y = bez.get_other_coordinate (X_AXIS, x);
-         Real head_dy = (y - infos[j].head_);
-         if (dir * head_dy < 0)
-           {
-             demerit += score_param->HEAD_ENCOMPASS_PENALTY;
-           }
-         else 
-           {
-             Real hd =  
-               (head_dy) ? (1/(fabs (head_dy)  - 1/score_param->FREE_HEAD_DISTANCE))
-               : score_param->HEAD_ENCOMPASS_PENALTY;
-             hd = (hd >? 0)<? score_param->HEAD_ENCOMPASS_PENALTY; 
 
-             demerit += hd;      
-           }
-         
+         if (j && j < infos.size () -1)
+           {
+             Real head_dy = (y - infos[j].head_);
+             if (dir * head_dy < 0)
+               {
+                 demerit += score_param->HEAD_ENCOMPASS_PENALTY;
+               }
+             else 
+               {
+                 Real hd =  
+                   (head_dy) ? (1/fabs (head_dy)  - 1/score_param->FREE_HEAD_DISTANCE)
+                   : score_param->HEAD_ENCOMPASS_PENALTY;
+                 hd = (hd >? 0)<? score_param->HEAD_ENCOMPASS_PENALTY; 
+
+                 demerit += hd;          
+               }
+           }     
          if (dir * (y - infos[j].stem_) < 0)
            demerit += score_param->STEM_ENCOMPASS_PENALTY;
          else if (j && j < encompasses.size () - 1)  
@@ -803,7 +813,10 @@ New_slur::score_slopes (Grob * me,  Grob *common[],
       Real demerit = 0.0;
 
       if (!has_beams)
-       demerit += score_param->STEEPER_SLOPE_FACTOR *  (dir * (fabs (slur_dy) - fabs (dy)) >? 0);
+       /*
+         0.2: account for staffline offset.
+        */
+       demerit += score_param->STEEPER_SLOPE_FACTOR *  (dir * (fabs (slur_dy) - fabs (dy + 0.2)) >? 0); 
 
       demerit += ((fabs (slur_dy/slur_dz[X_AXIS]) - score_param->MAX_SLOPE)>?0)  * score_param->MAX_SLOPE_FACTOR;
       
index a8b80d096a778051359a84bbb7e9c7b439e74e70..4702d2c6debdbc24840d26de9e3e44d4b18f6cbb 100644 (file)
@@ -534,7 +534,7 @@ AncientRemoveEmptyStaffContext = \context {
        ;; c&p from define-grobs.scm
        
        (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
-       (Voice Stem stem-shorten (0.4 0))
+       (Voice Stem stem-shorten (0.4 0.4))
        (Voice Stem  font-size -3)
        (Voice NoteHead  font-size -3)
        (Voice Dots  font-size -3)
index 5d230c1afb206989bab0b5c3975be2a4a69b7271..73a00db5c558e9a7cdb574e3fbca90641e9a960f 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-07-18 15:06+0200\n"
+"POT-Creation-Date: 2004-07-18 16:01+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -151,6 +151,8 @@ msgstr ""
 #. for --output-format.
 #. Bug in option parser: --output=foe is taken as an abbreviation
 #. for --output-format.
+#. Bug in option parser: --output=foe is taken as an abbreviation
+#. for --output-format.
 #: lilypond-book.py:82 old-lilypond-book.py:123 main.cc:138 lily/main.cc:125
 msgid "EXT"
 msgstr ""
@@ -750,6 +752,7 @@ msgstr ""
 #. FIXME: broken sentence
 #. FIXME: broken sentence
 #. FIXME: broken sentence
+#. FIXME: broken sentence
 #: all-font-metrics.cc:100 lily/all-font-metrics.cc:95
 #, c-format
 msgid "checksum mismatch for font file: `%s'"
@@ -807,15 +810,15 @@ msgstr ""
 msgid "barcheck failed at: %s"
 msgstr ""
 
-#: beam.cc:151 lily/beam.cc:151
+#: beam.cc:151 lily/beam.cc:151 lily/beam.cc:149
 msgid "beam has less than two visible stems"
 msgstr ""
 
-#: beam.cc:156 lily/beam.cc:156
+#: beam.cc:156 lily/beam.cc:156 lily/beam.cc:154
 msgid "removing beam with less than two stems"
 msgstr ""
 
-#: beam.cc:1040 lily/beam.cc:1040
+#: beam.cc:1040 lily/beam.cc:1040 lily/beam.cc:1038
 msgid "no viable initial configuration found: may not find good beam slope"
 msgstr ""
 
@@ -922,6 +925,12 @@ msgstr ""
 #.
 #. last->translator_id_string ()  = get_change ()->change_to_id_string ();
 #.
+#.
+#. We could change the current translator's id, but that would make
+#. errors hard to catch
+#.
+#. last->translator_id_string ()  = get_change ()->change_to_id_string ();
+#.
 #: change-iterator.cc:93 lily/change-iterator.cc:93
 msgid "I'm one myself"
 msgstr ""
@@ -1275,6 +1284,7 @@ msgstr ""
 #. No version number or newline here.  It confuses help2man.
 #. No version number or newline here.  It confuses help2man.
 #. No version number or newline here.  It confuses help2man.
+#. No version number or newline here.  It confuses help2man.
 #: main.cc:196 lily/main.cc:181
 #, c-format
 msgid "Usage: %s [OPTIONS]... FILE..."
@@ -1408,6 +1418,9 @@ msgstr ""
 #.
 #. music for the softenon children?
 #.
+#.
+#. music for the softenon children?
+#.
 #: new-fingering-engraver.cc:155 lily/new-fingering-engraver.cc:153
 msgid "music for the martians."
 msgstr ""
@@ -1612,6 +1625,7 @@ msgstr ""
 #. this shouldn't happen, but let's continue anyway.
 #. this shouldn't happen, but let's continue anyway.
 #. this shouldn't happen, but let's continue anyway.
+#. this shouldn't happen, but let's continue anyway.
 #: separation-item.cc:53 separation-item.cc:97 lily/separation-item.cc:53
 #: lily/separation-item.cc:97
 msgid "Separation_item:  I've been drinking too much"
@@ -1650,6 +1664,8 @@ msgstr ""
 #. eaten start event?
 #. How to shut up this warning, when Voice_devnull_engraver has
 #. eaten start event?
+#. How to shut up this warning, when Voice_devnull_engraver has
+#. eaten start event?
 #: slur-engraver.cc:139 lily/slur-engraver.cc:139
 msgid "can't find start of slur"
 msgstr ""
@@ -1751,6 +1767,8 @@ msgstr ""
 #. more of a programming error.
 #. Not using ngettext's plural feature here, as this message is
 #. more of a programming error.
+#. Not using ngettext's plural feature here, as this message is
+#. more of a programming error.
 #: tfm-reader.cc:108 lily/tfm-reader.cc:108
 #, c-format
 msgid "TFM header of `%s' has only %u word (s)"
@@ -1793,6 +1811,8 @@ msgstr ""
 #. (Here really with a warning!)
 #. If there is no such symbol, we default to the numbered style.
 #. (Here really with a warning!)
+#. If there is no such symbol, we default to the numbered style.
+#. (Here really with a warning!)
 #: time-signature.cc:95 lily/time-signature.cc:95
 #, c-format
 msgid "time signature symbol `%s' not found; reverting to numbered style"
@@ -1858,6 +1878,11 @@ msgstr ""
 #.
 #. OTOH, Tristan Keuris writes 8/20 in his Intermezzi.
 #.
+#.
+#. Todo: should make typecheck?
+#.
+#. OTOH, Tristan Keuris writes 8/20 in his Intermezzi.
+#.
 #: time-signature-engraver.cc:57 lily/time-signature-engraver.cc:57
 #, c-format
 msgid "Found strange time signature %d/%d."
@@ -2058,7 +2083,7 @@ msgid "Use help as  SYMBOL to get online help."
 msgstr ""
 
 #: lily/scm-option.cc:133 lily/scm-option.cc:161 lily/scm-option.cc:136
-#: lily/scm-option.cc:164
+#: lily/scm-option.cc:164 lily/scm-option.cc:132 lily/scm-option.cc:160
 #, c-format
 msgid "No such internal option: %s"
 msgstr ""