From: Jan Nieuwenhuizen Date: Thu, 15 Aug 2002 21:15:30 +0000 (+0000) Subject: * scm/grob-property-description.scm (height-limit, ratio): Add. X-Git-Tag: release/1.5.74~16 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=354ac69cdebb0f47e4c44bcfc03855bc531ecbb3;p=lilypond.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 1bb89a5288..4a20e9ca7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2002-08-15 Jan Nieuwenhuizen + * 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 diff --git a/lily/slur.cc b/lily/slur.cc index a81985c0e0..bade56d2e3 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -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"); diff --git a/scm/grob-description.scm b/scm/grob-description.scm index ad6a813adf..f6829adbca 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -620,15 +620,17 @@ (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)))) )) @@ -731,15 +733,17 @@ (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)))) )) diff --git a/scm/grob-property-description.scm b/scm/grob-property-description.scm index c49c3e8c86..02a50b8ff6 100644 --- a/scm/grob-property-description.scm +++ b/scm/grob-property-description.scm @@ -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")