]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.132
authorfred <fred>
Wed, 27 Mar 2002 00:56:24 +0000 (00:56 +0000)
committerfred <fred>
Wed, 27 Mar 2002 00:56:24 +0000 (00:56 +0000)
CHANGES
buildscripts/mutopia-index.py
lily/align-interface.cc
lily/break-align-engraver.cc
lily/break-align-item.cc
lily/dynamic-engraver.cc
scm/grob-description.scm

diff --git a/CHANGES b/CHANGES
index 29b2aa7ecd94964dd194c0a2f4f68985011085b1..91841f2b9a14c45365e10e06f37ac1a492e3052a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,47 @@
+1.3.131.jcn2
+============
+
+* Fixes for ascii-script output.  Stylesheet needs some work, just as
+PostScript output.
+
+* Bugfix: convert-ly --to accepts argument.
+
+* Prepared Petites Preludes for (first?) submission to mutopia.
+
+* Bugfix: out-letter/%.ps generation for mutopia.
+
+* Bugfix: don't use $(message ) in makefiles; some versions of make
+choke on this.
+
+* Bugfix: ly2dvi.py: don't add magic `//' to TEXINPUTS,MFINPUTS; this
+chokes kpsewhich 3.3.1 (bug report filed).
+
+* Bugfix: file-path.cc: don't interpret relative path as system root.
+
+* Bugfix: --srcdir install.
+
+1.3.131.hwn1
+============
+
+* Documentation: piano pedals, breath marks, tutorial fixes,
+convertors, autochange, \override/\set/\revert, multi-stanza lyrics,
+\outputproperty
+
+* Bugfix: another fix for collapsing dynamics with partcombine.
+
+* Bugfix: add functionality of
+Side_position_interface::self_align_callback() into
+Align_interface::align_elements_to_extents(). Otherwise, combining
+both (such as in a break alignment) leads to weird behavior: the
+spacing information is written halfway during a callback sequence,
+leading to weird results.
+
+This fixes input/test/orchestscore.ly
+
+* Bugfix: x-offset of stem was off by 0.5 stem thickness.
+
+* Add grob-property attachment-angle: angle for stem to attach to note head. 
+
 1.3.130.hwn2
 ============
 
index f56ab3bca2b4d4a524d3b065b04359f8bf1274ed..a79e99cc6eea2059d6c47deda1a2d674f991b3a0 100644 (file)
@@ -3,7 +3,35 @@
 
 name = 'mutopia-index'
 
-import find
+# find.py -- deprecated in python 2.0
+import fnmatch
+import os
+
+_debug = 0
+
+_prune = ['(*)']
+
+def find(pattern, dir = os.curdir):
+        list = []
+        names = os.listdir(dir)
+        names.sort()
+        for name in names:
+                if name in (os.curdir, os.pardir):
+                        continue
+                fullname = os.path.join(dir, name)
+                if fnmatch.fnmatch(name, pattern):
+                        list.append(fullname)
+                if os.path.isdir(fullname) and not os.path.islink(fullname):
+                        for p in _prune:
+                                if fnmatch.fnmatch(name, p):
+                                        if _debug: print "skip", `fullname`
+                                        break
+                        else:
+                                if _debug: print "descend into", `fullname`
+                                list = list + find(pattern, fullname)
+        return list
+
+
 import re
 import os
 import sys
@@ -154,7 +182,7 @@ for opt in options:
 
 dirs  = []
 for f in files:
-       dirs = dirs + find.find ('out-www', f);
+       dirs = dirs + find ('out-www', f)
 
 if not dirs:
        dirs = ['.']
@@ -162,7 +190,7 @@ if not dirs:
 allfiles = []
 
 for d in dirs:
-       allfiles = allfiles + find.find ('*.ly.txt', d)
+       allfiles = allfiles + find ('*.ly.txt', d)
 
 print allfiles
 
index dfb79e812b60cc55f852988c4145a5249c8ab93c..5df19061aad3e580d2ec1f6c28a4c8c5bbc7e7c9 100644 (file)
@@ -26,7 +26,7 @@ Align_interface::alignment_callback (SCM element_smob, SCM axis)
   Grob * par = me->parent_l (ax);
   if (par && !to_boolean (par->get_grob_property ("alignment-done")))
     {
-      Align_interface::align_to_extents (par, ax);
+      Align_interface::align_elements_to_extents (par, ax);
     }
   return gh_double2scm (0.0);
 }
@@ -81,7 +81,7 @@ Align_interface::align_to_fixed_distance (Grob *me , Axis a)
   from the outside by setting minimum-space and extra-space in its
   children */
 void
-Align_interface::align_to_extents (Grob * me, Axis a)
+Align_interface::align_elements_to_extents (Grob * me, Axis a)
 {
   me->set_grob_property ("alignment-done", SCM_BOOL_T);
   
@@ -139,15 +139,30 @@ Align_interface::align_to_extents (Grob * me, Axis a)
     }
   
  
-  Real where_f=0;
+  /*
+    Read self-alignment-X and self-alignment-Y. This may seem like
+    code duplication. (and really: it is), but this is necessary to
+    prevent ugly cyclic dependencies that arise when you combine
+    self-alignment on a child with alignment of children.
+  */
+
+  String s ("self-alignment-");
+
+  s +=  (a == X_AXIS) ? "X" : "Y";
+
+  SCM align (me->get_grob_property (s.ch_C()));
+     
   Array<Real> translates ;
+  Interval total;
+  Real where_f=0;
+  
   for (int j=0 ;  j < elems.size(); j++) 
     {
       Real dy = 0.0;
       dy = - stacking_dir * dims[j][-stacking_dir];
       if (j)
        dy += stacking_dir * dims[j-1][stacking_dir];
-      
+
       if (j)
        {
          dy = (dy >? threshold[SMALLER] )
@@ -155,12 +170,19 @@ Align_interface::align_to_extents (Grob * me, Axis a)
        }
 
       where_f += stacking_dir * dy;
+      total.unite ( dims[j] +   where_f);
       translates.push (where_f);
     }
 
+  
+
+  Grob * align_center = unsmob_grob (align);
+  Real center_offset = 0.0;
+  
   /*
     also move the grobs that were empty, to maintain spatial order. 
    */
+  Array<Real> all_translates;
   if (translates.size  ())
     {
       int i =0;
@@ -172,11 +194,20 @@ Align_interface::align_to_extents (Grob * me, Axis a)
            {
              w = translates[i++];
            }
-         all_grobs[j]->translate_axis (w, a);
-
+         if (all_grobs[j] == align_center)
+           center_offset = w;
+         all_translates .push (w);
          j++;
        }
     }
+
+  if (isdir_b  (align))
+    {
+      center_offset = total.linear_combination (gh_scm2double (align));
+    }
+
+  for (int j = 0 ;  j < all_grobs.size (); j++)
+    all_grobs[j]->translate_axis (all_translates[j] - center_offset, a);
 }
 
 Axis
index 057ea369457d3236f043768ab698f6b3a16841b0..f17922a0179335610024ca71ad2dd4fc8d29b1a2 100644 (file)
@@ -110,12 +110,7 @@ Break_align_engraver::acknowledge_grob (Grob_info inf)
          SCM edge_sym = ly_symbol2scm ("Left_edge_item");
          Item * edge = new Item (get_property ("LeftEdge"));
 
-         /*
-           We must have left-edge in the middle.  Instrument-names
-           are left to left-edge, so they don't enter the staff.
-         */
-         align_l_->set_grob_property ("self-alignment-X", edge->self_scm ());
-         
+        
 
          /*
            If the element is empty, it will be ignored in the break
@@ -125,8 +120,12 @@ Break_align_engraver::acknowledge_grob (Grob_info inf)
          */
          edge->set_extent_callback (Grob::point_dimension_callback_proc, X_AXIS);
          
+         /*
+           We must have left-edge in the middle.  Instrument-names
+           are left to left-edge, so they don't enter the staff.
+         */
          align_l_->set_grob_property ("self-alignment-X", edge->self_scm ());
-
+         
          announce_grob (edge, 0);
          column_alist_ = scm_assoc_set_x (column_alist_, edge_sym, edge->self_scm ());
        }
index 36f536ba0fd4d2313b312feff9d9c26ae6e2abbf..4318f0b78d534e5e058987f08e5cf276494c7043 100644 (file)
@@ -64,6 +64,11 @@ Break_align_interface::self_align_callback (SCM element_smob, SCM axis)
       me->set_grob_property ("self-alignment-X", gh_int2scm (RIGHT));
     }
 
+  /*
+    Force break alignment itself to be done first, in the case
+   */
+  
+  
   return Side_position::aligned_on_self (element_smob, axis);  
 }
 
@@ -169,7 +174,7 @@ Break_align_interface::do_alignment (Grob *me)
   /*
     Force callbacks for alignment to be called   
   */
-  Align_interface::align_to_extents (me, X_AXIS);
+  Align_interface::align_elements_to_extents (me, X_AXIS);
 
   Real pre_space = elems[0]->relative_coordinate (column, X_AXIS);
 
@@ -199,10 +204,33 @@ Break_align_interface::do_alignment (Grob *me)
       stretch_distance = spring_len;
     }
 
+  
   /*
     Hint the spacing engine how much space to put in.
 
     The pairs are in the format of an interval (ie. CAR <  CDR).
+  */
+  /*
+    UGH UGH UGH
+
+    This is a side effect, and there is no guarantee that this info is
+    computed at a "sane" moment.
+
+    (just spent some time tracking a bug that was caused by this info
+    being written halfway:
+
+    self_alignment_callback (*)
+    -> child->relative_coordinate (self)
+    -> break_alignment
+    -> child->relative_coordinate (column)
+
+    the last call incorporates the value that should've been computed
+    in (*), but--of course-- is not yet.
+
+    The result is that an offsets of align_elements_to_extents () are
+    not compensated for, and spring_len is completely off.
+
+    
   */
   column->set_grob_property ("extra-space",
                            scm_cons (gh_double2scm (pre_space),
index 223a7303bb5e21fc89da37dc1c99612cc7f42b59..2aee3603d13b643874daf05d7cea6f0bd53c333d 100644 (file)
@@ -117,7 +117,6 @@ Dynamic_engraver::try_music (Music * m)
            It will disappear by itself when stop_translation_timestep
            () finds that there is nothing to support anymore.  */
          
-         line_spanner_ = 0;
          if (cresc_p_)
            cresc_p_->suicide ();
          cresc_p_ = 0;
index 7e814f043921df7c81c276c64702a2d92dd86efc..5c9e37c15137921e50e9d8cff8b91def71f59d0f 100644 (file)
@@ -87,7 +87,6 @@
                (breakable . #t)
                (stacking-dir . 1)
                (axes 0)
-               (X-offset-callbacks . (,Break_align_interface::self_align_callback))
                (space-alist . ,default-break-align-space-alist) 
                (meta . ,(grob-description "BreakAlignment"
                        axis-group-interface align-interface
        (NoteHead . (
                (style . default)
                (molecule-callback . ,Note_head::brew_molecule)
-               (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
+               (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
+               (attachment-angle . ,(* 20/360 3.14159))
                (meta . ,(grob-description  "NoteHead"
                        rhythmic-head-interface font-interface 
                        note-head-interface ))