]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/grob-property-description.scm (height-limit, ratio): Add.
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 15 Aug 2002 21:15:30 +0000 (21:15 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 15 Aug 2002 21:15:30 +0000 (21:15 +0000)
* lily/slur.cc:
* scm/grob-description.scm (Slur, PhrasingSlur): Move height-limit
and ratio out of details.

ChangeLog
lily/slur.cc
scm/grob-description.scm
scm/grob-property-description.scm

index 1bb89a52885d5989542c324ca4e0e5152eb455da..4a20e9ca7cabb3ba43f4914206ca8e68396b1629 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2002-08-15  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * scm/grob-property-description.scm (height-limit, ratio): Add.
+
+       * lily/slur.cc: 
+       * scm/grob-description.scm (Slur, PhrasingSlur): Move height-limit
+       and ratio out of details.
+
        * lily/scores.cc (Input_file_settings): Initalize global_header_.
 
        * lily/include/file-results.hh (class Input_file_settings): Add
index a81985c0e0eec7000e4e0bf6afeadac31aad7ca1..bade56d2e36438cc51cb7ddeb81951bf3340cbeb 100644 (file)
@@ -574,11 +574,11 @@ Slur::set_control_points (Grob*me)
   Real staff_space = Staff_symbol_referencer::staff_space ((Grob*)me);
 
   SCM details = me->get_grob_property ("details");
-  SCM h_inf_scm = scm_assq (ly_symbol2scm ("height-limit"), details);
-  SCM r_0_scm = scm_assq (ly_symbol2scm ("ratio"), details);
+  SCM h_inf_scm = me->get_grob_property ("height-limit");
+  SCM r_0_scm = me->get_grob_property ("ratio");
 
-  Real r_0 = gh_scm2double (ly_cdr (r_0_scm));
-  Real h_inf = staff_space * gh_scm2double (ly_cdr (h_inf_scm));
+  Real r_0 = gh_scm2double (r_0_scm);
+  Real h_inf = staff_space * gh_scm2double (h_inf_scm);
   
   Slur_bezier_bow bb (get_encompass_offsets (me),
                      Directional_element_interface::get (me),
@@ -691,5 +691,5 @@ Slur::get_curve (Grob*me)
 
 ADD_INTERFACE (Slur,"slur-interface",
   "A slur",
-  "slope-limit de-uglify-parameters details attachment direction attachment-offset beautiful y-free control-points extremity-rules extremity-offset-alist thickness dashed");
+  "attachment attachment-offset beautiful control-points dashed details de-uglify-parameters direction extremity-rules extremity-offset-alist height-limit ratio slope-limit thickness y-free");
 
index ad6a813adfcccff410adf64239ce698790e90b6f..f6829adbca15ebe1b493126a0d9eb8d44968ce4b 100644 (file)
        (extremity-offset-alist . ,default-phrasing-slur-extremity-offset-alist)
        (de-uglify-parameters . (1.5  0.8  -2.0))
        (Y-extent-callback . ,Slur::height)
-       (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
-                   (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
-                   (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
-                   (bezier-area-steps . 1.0)))
+       (height-limit . 2.0)
+       (ratio . 0.333)
        (beautiful . 0.5)
        (y-free . 0.75)
        (attachment . (#f . #f))
        (attachment-offset . ((0 . 0) . (0 . 0)))
        (slope-limit . 0.8)
+       (details . ((force-blowfit . 0.5)
+                   (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
+                   (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
+                   (bezier-area-steps . 1.0)))
        (meta . ((interfaces . (slur-interface spanner-interface))))
        ))
 
        (extremity-offset-alist . ,default-slur-extremity-offset-alist)
        (de-uglify-parameters . (1.5  0.8  -2.0))
        (Y-extent-callback . ,Slur::height)
-       (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
-                   (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
-                   (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
-                   (bezier-area-steps . 1.0)))
+       (height-limit . 2.0)
+       (ratio . 0.333)
        (beautiful . 0.5)
        (y-free . 0.75)
        (attachment . (#f . #f))
        (attachment-offset . ((0 . 0) . (0 . 0)))
        (slope-limit . 0.8)
+       (details . ((force-blowfit . 0.5)
+                   (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
+                   (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
+                   (bezier-area-steps . 1.0)))
        (meta . ((interfaces . (slur-interface spanner-interface))))
        ))
 
index c49c3e8c86899007affadefc78b953cdc8b5edd3..02a50b8ff625eb26ceac48c3b6a5ef0d3f39e496 100644 (file)
@@ -226,6 +226,31 @@ beaming style: stems stop at innermost beams.")
 (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 'height number? "in staffspace.")
+(grob-property-description 'height-limit number? "Maximum slur height,
+  long slurs approach this height.
+
+  For small width w, the height should be proportional to w, for w ->
+  infinity, the height should rise to limit h_infinity asymptotically.
+
+  Hence we take F (x) such that
+@quotation
+@example  
+  F (0) = 0 , F' (0) = 1, and F (infinity) = 1
+@end example
+@end quotation
+  where
+@quotation
+@example  
+  h = height-limit * F (x * ratio / height-limit)
+@end example
+@end quotation
+  Currently, for F we use
+@quotation
+@example  
+  F (x) = 2/pi * atan (pi * x/2)
+@end example
+@end quotation
+")
 (grob-property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting. This is used by @ref{note-collision-interface}.")
 (grob-property-description 'ideal-distances list? "(OBJ . (DIST . STRENGTH)) pairs.")
 (grob-property-description 'interfaces list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.")
@@ -333,6 +358,7 @@ as a real penalty.")
 (grob-property-description 'pitches list? "list of musical-pitch.")
 (grob-property-description 'positions pair? "cons of staff positions (LEFT . RIGHT")
 (grob-property-description 'raise number? "height for text to be raised (a negative value lowers the text.")
+(grob-property-description 'ratio number? "Slur parameter.  See height-limit.")
 (grob-property-description 'right-padding number? "space right of accs.")
 (grob-property-description 'right-trim-amount number? "shortening of the lyric extender on the right.")
 (grob-property-description 'right-widen boolean? "Whether the right edge of a piano pedal bracket should be widened by the second element of edge-widen")