]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 12 Feb 2004 00:12:45 +0000 (00:12 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 12 Feb 2004 00:12:45 +0000 (00:12 +0000)
ChangeLog
lily/side-position-interface.cc
scm/define-grob-properties.scm
scm/part-combiner.scm

index 9e415d79be81a034ac427c6e9adf625454b1e62c..085a51ba2959e70e8f9960bdb585ac8fdbbdaaad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
 2004-02-11  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
-       * GNUmakefile.in (README_FILES): remove TODO.
+       * lily/side-position-interface.cc (general_side_position): if
+       staff-padding is set, then include staff in support too.
+
+       * GNUmakefile.in (README_FILES): remove TODO. Put in new CVS
+       module workbook
 
        * TODO: Remove.  Put in new CVS module /cvsroot/lilypond/workbook/
 
index 78be35c46072c55bc83be9977677debd7ff96bda..a974a4495844c270bd6a41c0437ff1216ff1f781 100644 (file)
@@ -69,8 +69,18 @@ Side_position_interface::general_side_position (Grob * me, Axis a, bool use_exte
   Real ss = Staff_symbol_referencer::staff_space (me);
   SCM support = me->get_grob_property ("side-support-elements");
   Grob *common = common_refpoint_of_list (support, me->get_parent (a), a);
-  
+  Grob * st = Staff_symbol_referencer::get_staff_symbol (me);
+  bool include_staff = (st
+                       && a == Y_AXIS
+                       && gh_number_p (me->get_grob_property ("staff-padding")));
+
   Interval dim;
+  if (include_staff)
+    {
+      common = st->common_refpoint (common, Y_AXIS);
+      dim = st->extent (common, Y_AXIS);
+    }
+    
   for (SCM s = support; s != SCM_EOL; s = ly_cdr (s))
     {
       Grob * e  = unsmob_grob (ly_car (s));
@@ -230,7 +240,7 @@ Side_position_interface::set_axis (Grob*me, Axis a)
 
 
 
-// ugh. doesn't cactch all variants. 
+// ugh. doesn't catch all variants. 
 Axis
 Side_position_interface::get_axis (Grob*me)
 {
@@ -249,8 +259,8 @@ ADD_INTERFACE (Side_position_interface,"side-position-interface",
               "Position a victim object (this one) next to other objects (the "
               "support).  In this case, the property @code{direction} signifies where to put the  "
               "victim object relative to the support (left or right, up or down?)\n\n "
-              "The routine puts objects at a distance of the staff if the property "
-              "@code{staff-padding} is defined. If undefined, the staff symbol is ignored." 
+              "The routine also takes the size the staff into account if "
+              "@code{staff-padding} is set. If undefined, the staff symbol is ignored." 
               ,
               "staff-padding side-support-elements direction-source "
               "direction side-relative-direction minimum-space padding");
index b2de46e0e92e76c0844b5636183ea678335f986a..9a653f51b8517c742b6de739f1ca11304397b493 100644 (file)
@@ -475,12 +475,8 @@ so that the line can be constructed from a whole number of squiggles.")
 
      (avoid-note-head ,boolean? "if set, the stem of a chord does not pass through all note head, but start at the last note head. Used by tablature.")
      (staff-padding ,ly:dimension?
-                   "Maintain this much space to the staff.  It's
-effect is similar to the padding mechanism, but this will keep objects
-above and below the staff in a row more often, when the heights of the
-notes vary.
-")
-
+                   "Maintain this much space between reference points
+and the staff.  Its effect is to align objects of differing sizes (like the dynamic @b{p} and @b{f})  on their baselines.")
      (use-breve-rest ,boolean? "boolean that tells multi-measure-rest
 to use a breve rest to represent the duration of 1 measure instead of
 whole rest.  It defaults to false.  It is set to true when the
index 17b7c47be280f1b4537493f38f8ce9e6f63061d6..82aaa7672ca2c45af39004c798f52d18cbef7a3d 100644 (file)
@@ -449,15 +449,20 @@ Only set if not set previously.
                    
        ))
      (define (put-range x a b)
+       (display (list "put range "  x a b "\n"))
        (do
           ((i a (1+ i)))
           ((> i b) b)
         (set! (configuration (vector-ref result i)) x)
         ))
      (define (put x)
-       (set! (configuration (vector-ref result ri)) x))
+      
+       (display (list "putting "  x "\n"))
+      (set! (configuration (vector-ref result ri)) x))
            
      (define (try-solo type start-idx current-idx)
+       "Find a maximum stretch that can be marked as solo. Only set
+the mark when there are no spanners active."
        (if (< current-idx (vector-length result))
           (let*
               ((now-state (vector-ref result current-idx))
@@ -483,9 +488,7 @@ Only set if not set previously.
           (1- current-idx)))
              
      (define (analyse-moment ri)
-       "Analyse 'apart  starting at RI. Return next index. 
-"
-       
+       "Analyse 'apart  starting at RI. Return next index. "
         (let*
           ((now-state (vector-ref result ri))
            (vs1 (car (voice-states now-state)))
@@ -495,6 +498,11 @@ Only set if not set previously.
            (n1 (length notes1))
            (n2 (length notes2)) )
 
+         (display (list "analysing "  (when now-state)
+                        "\n1= " vs1 
+                        "\n2= " vs2 
+                        "\n"))
+         
          (cond
           ((and (= n1 0) (= n2 0))
            (put 'apart-silence)
@@ -532,10 +540,11 @@ Only set if not set previously.
        ))
      
    (analyse-time-step 0)
-   (analyse-a2 0)
+;   (display result)
+;   (analyse-a2 0)
 ;   (display result)
    (analyse-solo12 0)
-;   (if pc-debug (display result))
+   (display result)
 
    (set! result (map
                 (lambda (x) (cons (when x) (configuration x)))